diff options
author | Pete Popov <ppopov@embeddedalley.com> | 2005-09-14 12:17:59 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:32:20 -0400 |
commit | 64abf64d10b3a547becefeb26394dfbefac273fb (patch) | |
tree | 2960d858aa3490548385f77fbd460c6dc60e1e5b /arch/mips/au1000/common | |
parent | 4f94afa258c3e574a8d985160e87146a5183944b (diff) |
Misc au1200 updates.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000/common')
-rw-r--r-- | arch/mips/au1000/common/platform.c | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c index 3ca3cb8a8a73..0c3fd726c3d6 100644 --- a/arch/mips/au1000/common/platform.c +++ b/arch/mips/au1000/common/platform.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/mach-au1x00/au1000.h> | 15 | #include <asm/mach-au1x00/au1000.h> |
16 | 16 | ||
17 | /* OHCI (USB full speed host controller) */ | ||
17 | static struct resource au1xxx_usb_ohci_resources[] = { | 18 | static struct resource au1xxx_usb_ohci_resources[] = { |
18 | [0] = { | 19 | [0] = { |
19 | .start = USB_OHCI_BASE, | 20 | .start = USB_OHCI_BASE, |
@@ -71,12 +72,129 @@ static struct platform_device au1100_lcd_device = { | |||
71 | }; | 72 | }; |
72 | #endif | 73 | #endif |
73 | 74 | ||
75 | #ifdef CONFIG_SOC_AU1200 | ||
76 | /* EHCI (USB high speed host controller) */ | ||
77 | static struct resource au1xxx_usb_ehci_resources[] = { | ||
78 | [0] = { | ||
79 | .start = USB_EHCI_BASE, | ||
80 | .end = USB_EHCI_BASE + USB_EHCI_LEN - 1, | ||
81 | .flags = IORESOURCE_MEM, | ||
82 | }, | ||
83 | [1] = { | ||
84 | .start = AU1000_USB_HOST_INT, | ||
85 | .end = AU1000_USB_HOST_INT, | ||
86 | .flags = IORESOURCE_IRQ, | ||
87 | }, | ||
88 | }; | ||
89 | |||
90 | static u64 ehci_dmamask = ~(u32)0; | ||
91 | |||
92 | static struct platform_device au1xxx_usb_ehci_device = { | ||
93 | .name = "au1xxx-ehci", | ||
94 | .id = 0, | ||
95 | .dev = { | ||
96 | .dma_mask = &ehci_dmamask, | ||
97 | .coherent_dma_mask = 0xffffffff, | ||
98 | }, | ||
99 | .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources), | ||
100 | .resource = au1xxx_usb_ehci_resources, | ||
101 | }; | ||
102 | |||
103 | /* Au1200 UDC (USB gadget controller) */ | ||
104 | static struct resource au1xxx_usb_gdt_resources[] = { | ||
105 | [0] = { | ||
106 | .start = USB_UDC_BASE, | ||
107 | .end = USB_UDC_BASE + USB_UDC_LEN - 1, | ||
108 | .flags = IORESOURCE_MEM, | ||
109 | }, | ||
110 | [1] = { | ||
111 | .start = AU1200_USB_INT, | ||
112 | .end = AU1200_USB_INT, | ||
113 | .flags = IORESOURCE_IRQ, | ||
114 | }, | ||
115 | }; | ||
116 | |||
117 | static u64 udc_dmamask = ~(u32)0; | ||
118 | |||
119 | static struct platform_device au1xxx_usb_gdt_device = { | ||
120 | .name = "au1xxx-udc", | ||
121 | .id = 0, | ||
122 | .dev = { | ||
123 | .dma_mask = &udc_dmamask, | ||
124 | .coherent_dma_mask = 0xffffffff, | ||
125 | }, | ||
126 | .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources), | ||
127 | .resource = au1xxx_usb_gdt_resources, | ||
128 | }; | ||
129 | |||
130 | /* Au1200 UOC (USB OTG controller) */ | ||
131 | static struct resource au1xxx_usb_otg_resources[] = { | ||
132 | [0] = { | ||
133 | .start = USB_UOC_BASE, | ||
134 | .end = USB_UOC_BASE + USB_UOC_LEN - 1, | ||
135 | .flags = IORESOURCE_MEM, | ||
136 | }, | ||
137 | [1] = { | ||
138 | .start = AU1200_USB_INT, | ||
139 | .end = AU1200_USB_INT, | ||
140 | .flags = IORESOURCE_IRQ, | ||
141 | }, | ||
142 | }; | ||
143 | |||
144 | static u64 uoc_dmamask = ~(u32)0; | ||
145 | |||
146 | static struct platform_device au1xxx_usb_otg_device = { | ||
147 | .name = "au1xxx-uoc", | ||
148 | .id = 0, | ||
149 | .dev = { | ||
150 | .dma_mask = &uoc_dmamask, | ||
151 | .coherent_dma_mask = 0xffffffff, | ||
152 | }, | ||
153 | .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources), | ||
154 | .resource = au1xxx_usb_otg_resources, | ||
155 | }; | ||
156 | |||
157 | /*** AU1200 LCD controller ***/ | ||
158 | static struct resource au1200_lcd_resources[] = { | ||
159 | [0] = { | ||
160 | .start = LCD_PHYS_ADDR, | ||
161 | .end = LCD_PHYS_ADDR + 0x800 - 1, | ||
162 | .flags = IORESOURCE_MEM, | ||
163 | }, | ||
164 | [1] = { | ||
165 | .start = AU1200_LCD_INT, | ||
166 | .end = AU1200_LCD_INT, | ||
167 | .flags = IORESOURCE_IRQ, | ||
168 | } | ||
169 | }; | ||
170 | |||
171 | static u64 au1200_lcd_dmamask = ~(u32)0; | ||
172 | |||
173 | static struct platform_device au1200_lcd_device = { | ||
174 | .name = "au1200-lcd", | ||
175 | .id = 0, | ||
176 | .dev = { | ||
177 | .dma_mask = &au1200_lcd_dmamask, | ||
178 | .coherent_dma_mask = 0xffffffff, | ||
179 | }, | ||
180 | .num_resources = ARRAY_SIZE(au1200_lcd_resources), | ||
181 | .resource = au1200_lcd_resources, | ||
182 | }; | ||
183 | #endif | ||
74 | 184 | ||
75 | static struct platform_device *au1xxx_platform_devices[] __initdata = { | 185 | static struct platform_device *au1xxx_platform_devices[] __initdata = { |
76 | &au1xxx_usb_ohci_device, | 186 | &au1xxx_usb_ohci_device, |
77 | #ifdef CONFIG_FB_AU1100 | 187 | #ifdef CONFIG_FB_AU1100 |
78 | &au1100_lcd_device, | 188 | &au1100_lcd_device, |
79 | #endif | 189 | #endif |
190 | #ifdef CONFIG_SOC_AU1200 | ||
191 | #if 0 /* fixme */ | ||
192 | &au1xxx_usb_ehci_device, | ||
193 | #endif | ||
194 | &au1xxx_usb_gdt_device, | ||
195 | &au1xxx_usb_otg_device, | ||
196 | &au1200_lcd_device, | ||
197 | #endif | ||
80 | }; | 198 | }; |
81 | 199 | ||
82 | int au1xxx_platform_init(void) | 200 | int au1xxx_platform_init(void) |