Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Platform device support for Au1x00 SoCs. |
| 3 | * |
| 4 | * Copyright 2004, Matt Porter <mporter@kernel.crashing.org> |
| 5 | * |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 6 | * (C) Copyright Embedded Alley Solutions, Inc 2005 |
| 7 | * Author: Pantelis Antoniou <pantelis@embeddedalley.com> |
| 8 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any |
| 11 | * warranty of any kind, whether express or implied. |
| 12 | */ |
Sergei Shtylyov | ce28f94 | 2008-04-23 22:43:55 +0400 | [diff] [blame] | 13 | |
Ralf Baechle | 4b62220 | 2008-07-15 18:44:29 +0100 | [diff] [blame] | 14 | #include <linux/dma-mapping.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 15 | #include <linux/platform_device.h> |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 16 | #include <linux/serial_8250.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <linux/init.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
Pete Popov | 26a940e | 2005-09-15 08:03:12 +0000 | [diff] [blame] | 19 | #include <asm/mach-au1x00/au1xxx.h> |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 20 | #include <asm/mach-au1x00/au1xxx_dbdma.h> |
| 21 | #include <asm/mach-au1x00/au1100_mmc.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 23 | #define PORT(_base, _irq) \ |
| 24 | { \ |
| 25 | .mapbase = _base, \ |
| 26 | .irq = _irq, \ |
| 27 | .regshift = 2, \ |
| 28 | .iotype = UPIO_AU, \ |
| 29 | .flags = UPF_SKIP_TEST | UPF_IOREMAP \ |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | static struct plat_serial8250_port au1x00_uart_data[] = { |
| 33 | #if defined(CONFIG_SERIAL_8250_AU1X00) |
| 34 | #if defined(CONFIG_SOC_AU1000) |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 35 | PORT(UART0_PHYS_ADDR, AU1000_UART0_INT), |
| 36 | PORT(UART1_PHYS_ADDR, AU1000_UART1_INT), |
| 37 | PORT(UART2_PHYS_ADDR, AU1000_UART2_INT), |
| 38 | PORT(UART3_PHYS_ADDR, AU1000_UART3_INT), |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 39 | #elif defined(CONFIG_SOC_AU1500) |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 40 | PORT(UART0_PHYS_ADDR, AU1500_UART0_INT), |
| 41 | PORT(UART3_PHYS_ADDR, AU1500_UART3_INT), |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 42 | #elif defined(CONFIG_SOC_AU1100) |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 43 | PORT(UART0_PHYS_ADDR, AU1100_UART0_INT), |
| 44 | PORT(UART1_PHYS_ADDR, AU1100_UART1_INT), |
| 45 | PORT(UART3_PHYS_ADDR, AU1100_UART3_INT), |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 46 | #elif defined(CONFIG_SOC_AU1550) |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 47 | PORT(UART0_PHYS_ADDR, AU1550_UART0_INT), |
| 48 | PORT(UART1_PHYS_ADDR, AU1550_UART1_INT), |
| 49 | PORT(UART3_PHYS_ADDR, AU1550_UART3_INT), |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 50 | #elif defined(CONFIG_SOC_AU1200) |
Manuel Lauss | b6e6d12 | 2009-10-15 19:07:34 +0200 | [diff] [blame] | 51 | PORT(UART0_PHYS_ADDR, AU1200_UART0_INT), |
| 52 | PORT(UART1_PHYS_ADDR, AU1200_UART1_INT), |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 53 | #endif |
| 54 | #endif /* CONFIG_SERIAL_8250_AU1X00 */ |
| 55 | { }, |
| 56 | }; |
| 57 | |
| 58 | static struct platform_device au1xx0_uart_device = { |
| 59 | .name = "serial8250", |
| 60 | .id = PLAT8250_DEV_AU1X00, |
| 61 | .dev = { |
| 62 | .platform_data = au1x00_uart_data, |
| 63 | }, |
| 64 | }; |
| 65 | |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 66 | /* OHCI (USB full speed host controller) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | static struct resource au1xxx_usb_ohci_resources[] = { |
| 68 | [0] = { |
| 69 | .start = USB_OHCI_BASE, |
Jordan Crouse | d5fb7f1 | 2006-01-20 14:09:54 -0800 | [diff] [blame] | 70 | .end = USB_OHCI_BASE + USB_OHCI_LEN - 1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | .flags = IORESOURCE_MEM, |
| 72 | }, |
| 73 | [1] = { |
Manuel Lauss | 7881446 | 2009-10-07 20:15:15 +0200 | [diff] [blame] | 74 | .start = FOR_PLATFORM_C_USB_HOST_INT, |
| 75 | .end = FOR_PLATFORM_C_USB_HOST_INT, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | .flags = IORESOURCE_IRQ, |
| 77 | }, |
| 78 | }; |
| 79 | |
| 80 | /* The dmamask must be set for OHCI to work */ |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 81 | static u64 ohci_dmamask = DMA_BIT_MASK(32); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | |
| 83 | static struct platform_device au1xxx_usb_ohci_device = { |
| 84 | .name = "au1xxx-ohci", |
| 85 | .id = 0, |
| 86 | .dev = { |
| 87 | .dma_mask = &ohci_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 88 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | }, |
| 90 | .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources), |
| 91 | .resource = au1xxx_usb_ohci_resources, |
| 92 | }; |
| 93 | |
Pete Popov | 3b495f2 | 2005-04-04 01:06:19 +0000 | [diff] [blame] | 94 | /*** AU1100 LCD controller ***/ |
| 95 | |
| 96 | #ifdef CONFIG_FB_AU1100 |
| 97 | static struct resource au1100_lcd_resources[] = { |
| 98 | [0] = { |
| 99 | .start = LCD_PHYS_ADDR, |
| 100 | .end = LCD_PHYS_ADDR + 0x800 - 1, |
| 101 | .flags = IORESOURCE_MEM, |
| 102 | }, |
| 103 | [1] = { |
| 104 | .start = AU1100_LCD_INT, |
| 105 | .end = AU1100_LCD_INT, |
| 106 | .flags = IORESOURCE_IRQ, |
| 107 | } |
| 108 | }; |
| 109 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 110 | static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32); |
Pete Popov | 3b495f2 | 2005-04-04 01:06:19 +0000 | [diff] [blame] | 111 | |
| 112 | static struct platform_device au1100_lcd_device = { |
| 113 | .name = "au1100-lcd", |
| 114 | .id = 0, |
| 115 | .dev = { |
| 116 | .dma_mask = &au1100_lcd_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 117 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Pete Popov | 3b495f2 | 2005-04-04 01:06:19 +0000 | [diff] [blame] | 118 | }, |
| 119 | .num_resources = ARRAY_SIZE(au1100_lcd_resources), |
| 120 | .resource = au1100_lcd_resources, |
| 121 | }; |
| 122 | #endif |
| 123 | |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 124 | #ifdef CONFIG_SOC_AU1200 |
| 125 | /* EHCI (USB high speed host controller) */ |
| 126 | static struct resource au1xxx_usb_ehci_resources[] = { |
| 127 | [0] = { |
| 128 | .start = USB_EHCI_BASE, |
| 129 | .end = USB_EHCI_BASE + USB_EHCI_LEN - 1, |
| 130 | .flags = IORESOURCE_MEM, |
| 131 | }, |
| 132 | [1] = { |
Manuel Lauss | 7881446 | 2009-10-07 20:15:15 +0200 | [diff] [blame] | 133 | .start = AU1200_USB_INT, |
| 134 | .end = AU1200_USB_INT, |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 135 | .flags = IORESOURCE_IRQ, |
| 136 | }, |
| 137 | }; |
| 138 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 139 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 140 | |
| 141 | static struct platform_device au1xxx_usb_ehci_device = { |
| 142 | .name = "au1xxx-ehci", |
| 143 | .id = 0, |
| 144 | .dev = { |
| 145 | .dma_mask = &ehci_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 146 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 147 | }, |
| 148 | .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources), |
| 149 | .resource = au1xxx_usb_ehci_resources, |
| 150 | }; |
| 151 | |
| 152 | /* Au1200 UDC (USB gadget controller) */ |
| 153 | static struct resource au1xxx_usb_gdt_resources[] = { |
| 154 | [0] = { |
| 155 | .start = USB_UDC_BASE, |
| 156 | .end = USB_UDC_BASE + USB_UDC_LEN - 1, |
| 157 | .flags = IORESOURCE_MEM, |
| 158 | }, |
| 159 | [1] = { |
| 160 | .start = AU1200_USB_INT, |
| 161 | .end = AU1200_USB_INT, |
| 162 | .flags = IORESOURCE_IRQ, |
| 163 | }, |
| 164 | }; |
| 165 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 166 | static u64 udc_dmamask = DMA_BIT_MASK(32); |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 167 | |
| 168 | static struct platform_device au1xxx_usb_gdt_device = { |
| 169 | .name = "au1xxx-udc", |
| 170 | .id = 0, |
| 171 | .dev = { |
| 172 | .dma_mask = &udc_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 173 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 174 | }, |
| 175 | .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources), |
| 176 | .resource = au1xxx_usb_gdt_resources, |
| 177 | }; |
| 178 | |
| 179 | /* Au1200 UOC (USB OTG controller) */ |
| 180 | static struct resource au1xxx_usb_otg_resources[] = { |
| 181 | [0] = { |
| 182 | .start = USB_UOC_BASE, |
| 183 | .end = USB_UOC_BASE + USB_UOC_LEN - 1, |
| 184 | .flags = IORESOURCE_MEM, |
| 185 | }, |
| 186 | [1] = { |
| 187 | .start = AU1200_USB_INT, |
| 188 | .end = AU1200_USB_INT, |
| 189 | .flags = IORESOURCE_IRQ, |
| 190 | }, |
| 191 | }; |
| 192 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 193 | static u64 uoc_dmamask = DMA_BIT_MASK(32); |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 194 | |
| 195 | static struct platform_device au1xxx_usb_otg_device = { |
| 196 | .name = "au1xxx-uoc", |
| 197 | .id = 0, |
| 198 | .dev = { |
| 199 | .dma_mask = &uoc_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 200 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 201 | }, |
| 202 | .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources), |
| 203 | .resource = au1xxx_usb_otg_resources, |
| 204 | }; |
| 205 | |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 206 | static struct resource au1200_lcd_resources[] = { |
| 207 | [0] = { |
| 208 | .start = LCD_PHYS_ADDR, |
| 209 | .end = LCD_PHYS_ADDR + 0x800 - 1, |
| 210 | .flags = IORESOURCE_MEM, |
| 211 | }, |
| 212 | [1] = { |
| 213 | .start = AU1200_LCD_INT, |
| 214 | .end = AU1200_LCD_INT, |
| 215 | .flags = IORESOURCE_IRQ, |
| 216 | } |
| 217 | }; |
| 218 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 219 | static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32); |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 220 | |
| 221 | static struct platform_device au1200_lcd_device = { |
| 222 | .name = "au1200-lcd", |
| 223 | .id = 0, |
| 224 | .dev = { |
| 225 | .dma_mask = &au1200_lcd_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 226 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 227 | }, |
| 228 | .num_resources = ARRAY_SIZE(au1200_lcd_resources), |
| 229 | .resource = au1200_lcd_resources, |
| 230 | }; |
Pete Popov | 26a940e | 2005-09-15 08:03:12 +0000 | [diff] [blame] | 231 | |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 232 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); |
Pete Popov | ba264b3 | 2005-09-21 06:18:27 +0000 | [diff] [blame] | 233 | |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 234 | extern struct au1xmmc_platform_data au1xmmc_platdata[2]; |
| 235 | |
| 236 | static struct resource au1200_mmc0_resources[] = { |
| 237 | [0] = { |
| 238 | .start = SD0_PHYS_ADDR, |
| 239 | .end = SD0_PHYS_ADDR + 0x7ffff, |
| 240 | .flags = IORESOURCE_MEM, |
| 241 | }, |
| 242 | [1] = { |
| 243 | .start = AU1200_SD_INT, |
| 244 | .end = AU1200_SD_INT, |
| 245 | .flags = IORESOURCE_IRQ, |
| 246 | }, |
| 247 | [2] = { |
| 248 | .start = DSCR_CMD0_SDMS_TX0, |
| 249 | .end = DSCR_CMD0_SDMS_TX0, |
| 250 | .flags = IORESOURCE_DMA, |
| 251 | }, |
| 252 | [3] = { |
| 253 | .start = DSCR_CMD0_SDMS_RX0, |
| 254 | .end = DSCR_CMD0_SDMS_RX0, |
| 255 | .flags = IORESOURCE_DMA, |
| 256 | } |
| 257 | }; |
| 258 | |
| 259 | static struct platform_device au1200_mmc0_device = { |
Pete Popov | ba264b3 | 2005-09-21 06:18:27 +0000 | [diff] [blame] | 260 | .name = "au1xxx-mmc", |
| 261 | .id = 0, |
| 262 | .dev = { |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 263 | .dma_mask = &au1xxx_mmc_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 264 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 265 | .platform_data = &au1xmmc_platdata[0], |
Pete Popov | ba264b3 | 2005-09-21 06:18:27 +0000 | [diff] [blame] | 266 | }, |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 267 | .num_resources = ARRAY_SIZE(au1200_mmc0_resources), |
| 268 | .resource = au1200_mmc0_resources, |
Pete Popov | ba264b3 | 2005-09-21 06:18:27 +0000 | [diff] [blame] | 269 | }; |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 270 | |
| 271 | #ifndef CONFIG_MIPS_DB1200 |
| 272 | static struct resource au1200_mmc1_resources[] = { |
| 273 | [0] = { |
| 274 | .start = SD1_PHYS_ADDR, |
| 275 | .end = SD1_PHYS_ADDR + 0x7ffff, |
| 276 | .flags = IORESOURCE_MEM, |
| 277 | }, |
| 278 | [1] = { |
| 279 | .start = AU1200_SD_INT, |
| 280 | .end = AU1200_SD_INT, |
| 281 | .flags = IORESOURCE_IRQ, |
| 282 | }, |
| 283 | [2] = { |
| 284 | .start = DSCR_CMD0_SDMS_TX1, |
| 285 | .end = DSCR_CMD0_SDMS_TX1, |
| 286 | .flags = IORESOURCE_DMA, |
| 287 | }, |
| 288 | [3] = { |
| 289 | .start = DSCR_CMD0_SDMS_RX1, |
| 290 | .end = DSCR_CMD0_SDMS_RX1, |
| 291 | .flags = IORESOURCE_DMA, |
| 292 | } |
| 293 | }; |
| 294 | |
| 295 | static struct platform_device au1200_mmc1_device = { |
| 296 | .name = "au1xxx-mmc", |
| 297 | .id = 1, |
| 298 | .dev = { |
| 299 | .dma_mask = &au1xxx_mmc_dmamask, |
Yang Hongyang | 284901a | 2009-04-06 19:01:15 -0700 | [diff] [blame] | 300 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 301 | .platform_data = &au1xmmc_platdata[1], |
| 302 | }, |
| 303 | .num_resources = ARRAY_SIZE(au1200_mmc1_resources), |
| 304 | .resource = au1200_mmc1_resources, |
| 305 | }; |
| 306 | #endif /* #ifndef CONFIG_MIPS_DB1200 */ |
Pete Popov | ba264b3 | 2005-09-21 06:18:27 +0000 | [diff] [blame] | 307 | #endif /* #ifdef CONFIG_SOC_AU1200 */ |
| 308 | |
Manuel Lauss | 8b798c4 | 2008-01-27 18:14:52 +0100 | [diff] [blame] | 309 | /* All Alchemy demoboards with I2C have this #define in their headers */ |
| 310 | #ifdef SMBUS_PSC_BASE |
| 311 | static struct resource pbdb_smbus_resources[] = { |
| 312 | { |
Sergei Shtylyov | 8e07c2c | 2008-04-05 22:16:21 +0400 | [diff] [blame] | 313 | .start = CPHYSADDR(SMBUS_PSC_BASE), |
| 314 | .end = CPHYSADDR(SMBUS_PSC_BASE + 0xfffff), |
Manuel Lauss | 8b798c4 | 2008-01-27 18:14:52 +0100 | [diff] [blame] | 315 | .flags = IORESOURCE_MEM, |
| 316 | }, |
| 317 | }; |
| 318 | |
| 319 | static struct platform_device pbdb_smbus_device = { |
| 320 | .name = "au1xpsc_smbus", |
| 321 | .id = 0, /* bus number */ |
| 322 | .num_resources = ARRAY_SIZE(pbdb_smbus_resources), |
| 323 | .resource = pbdb_smbus_resources, |
| 324 | }; |
| 325 | #endif |
| 326 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | static struct platform_device *au1xxx_platform_devices[] __initdata = { |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 328 | &au1xx0_uart_device, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | &au1xxx_usb_ohci_device, |
Pete Popov | 3b495f2 | 2005-04-04 01:06:19 +0000 | [diff] [blame] | 330 | #ifdef CONFIG_FB_AU1100 |
| 331 | &au1100_lcd_device, |
| 332 | #endif |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 333 | #ifdef CONFIG_SOC_AU1200 |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 334 | &au1xxx_usb_ehci_device, |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 335 | &au1xxx_usb_gdt_device, |
| 336 | &au1xxx_usb_otg_device, |
| 337 | &au1200_lcd_device, |
Manuel Lauss | f591eb1 | 2008-10-21 08:59:14 +0200 | [diff] [blame] | 338 | &au1200_mmc0_device, |
| 339 | #ifndef CONFIG_MIPS_DB1200 |
| 340 | &au1200_mmc1_device, |
| 341 | #endif |
Pete Popov | 64abf64 | 2005-09-14 16:17:59 +0000 | [diff] [blame] | 342 | #endif |
Manuel Lauss | 8b798c4 | 2008-01-27 18:14:52 +0100 | [diff] [blame] | 343 | #ifdef SMBUS_PSC_BASE |
| 344 | &pbdb_smbus_device, |
| 345 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | }; |
| 347 | |
Sergei Shtylyov | c1dcb14 | 2008-04-30 23:18:41 +0400 | [diff] [blame] | 348 | static int __init au1xxx_platform_init(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | { |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 350 | unsigned int uartclk = get_au1x00_uart_baud_base() * 16; |
| 351 | int i; |
| 352 | |
| 353 | /* Fill up uartclk. */ |
Sergei Shtylyov | c1dcb14 | 2008-04-30 23:18:41 +0400 | [diff] [blame] | 354 | for (i = 0; au1x00_uart_data[i].flags; i++) |
Sergei Shtylyov | 6e76645 | 2008-04-04 00:02:53 +0400 | [diff] [blame] | 355 | au1x00_uart_data[i].uartclk = uartclk; |
| 356 | |
Sergei Shtylyov | c1dcb14 | 2008-04-30 23:18:41 +0400 | [diff] [blame] | 357 | return platform_add_devices(au1xxx_platform_devices, |
| 358 | ARRAY_SIZE(au1xxx_platform_devices)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | } |
| 360 | |
| 361 | arch_initcall(au1xxx_platform_init); |