Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 1 | /* |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 2 | * Copyright 2004-2009 Analog Devices Inc. |
| 3 | * 2008-2009 Bluetechnix |
| 4 | * 2005 National ICT Australia (NICTA) |
| 5 | * Aidan Williams <aidan@nicta.com.au> |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 6 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 7 | * Licensed under the GPL-2 or later. |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <linux/device.h> |
| 11 | #include <linux/etherdevice.h> |
Lars-Peter Clausen | 9059054 | 2011-11-11 11:06:38 +0100 | [diff] [blame] | 12 | #include <linux/export.h> |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/mtd/mtd.h> |
| 15 | #include <linux/mtd/partitions.h> |
| 16 | #include <linux/mtd/physmap.h> |
| 17 | #include <linux/spi/spi.h> |
| 18 | #include <linux/spi/flash.h> |
| 19 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 20 | #include <linux/usb/isp1362.h> |
| 21 | #endif |
| 22 | #include <linux/ata_platform.h> |
| 23 | #include <linux/irq.h> |
| 24 | #include <asm/dma.h> |
| 25 | #include <asm/bfin5xx_spi.h> |
| 26 | #include <asm/portmux.h> |
| 27 | #include <asm/dpmc.h> |
Harald Krapfenbauer | 9c21453 | 2009-09-10 15:30:03 +0000 | [diff] [blame] | 28 | #include <linux/spi/mmc_spi.h> |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 29 | |
| 30 | /* |
| 31 | * Name the Board for the /proc/cpuinfo |
| 32 | */ |
| 33 | const char bfin_board_name[] = "Bluetechnix TCM BF537"; |
| 34 | |
Sonic Zhang | 7d157fb | 2011-11-07 18:40:10 +0800 | [diff] [blame] | 35 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 36 | /* all SPI peripherals info goes here */ |
| 37 | |
| 38 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 39 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
| 40 | { |
| 41 | .name = "bootloader(spi)", |
| 42 | .size = 0x00020000, |
| 43 | .offset = 0, |
| 44 | .mask_flags = MTD_CAP_ROM |
| 45 | }, { |
| 46 | .name = "linux kernel(spi)", |
| 47 | .size = 0xe0000, |
| 48 | .offset = 0x20000 |
| 49 | }, { |
| 50 | .name = "file system(spi)", |
| 51 | .size = 0x700000, |
| 52 | .offset = 0x00100000, |
| 53 | } |
| 54 | }; |
| 55 | |
| 56 | static struct flash_platform_data bfin_spi_flash_data = { |
| 57 | .name = "m25p80", |
| 58 | .parts = bfin_spi_flash_partitions, |
| 59 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), |
| 60 | .type = "m25p64", |
| 61 | }; |
| 62 | |
| 63 | /* SPI flash chip (m25p64) */ |
| 64 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
| 65 | .enable_dma = 0, /* use dma transfer with this chip*/ |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 66 | }; |
| 67 | #endif |
| 68 | |
Michael Hennerich | f3f704d | 2009-03-06 00:27:57 +0800 | [diff] [blame] | 69 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
| 70 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
| 71 | .enable_dma = 0, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 72 | }; |
| 73 | #endif |
| 74 | |
| 75 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 76 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 77 | { |
| 78 | /* the modalias must be the same as spi device driver name */ |
| 79 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
| 80 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
| 81 | .bus_num = 0, /* Framework bus number */ |
| 82 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ |
| 83 | .platform_data = &bfin_spi_flash_data, |
| 84 | .controller_data = &spi_flash_chip_info, |
| 85 | .mode = SPI_MODE_3, |
| 86 | }, |
| 87 | #endif |
| 88 | |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 89 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 90 | { |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 91 | .modalias = "ad183x", |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 92 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 93 | .bus_num = 0, |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 94 | .chip_select = 4, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 95 | }, |
| 96 | #endif |
| 97 | |
Michael Hennerich | f3f704d | 2009-03-06 00:27:57 +0800 | [diff] [blame] | 98 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 99 | { |
Michael Hennerich | f3f704d | 2009-03-06 00:27:57 +0800 | [diff] [blame] | 100 | .modalias = "mmc_spi", |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 101 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
| 102 | .bus_num = 0, |
Harald Krapfenbauer | 9c21453 | 2009-09-10 15:30:03 +0000 | [diff] [blame] | 103 | .chip_select = 1, |
Michael Hennerich | f3f704d | 2009-03-06 00:27:57 +0800 | [diff] [blame] | 104 | .controller_data = &mmc_spi_chip_info, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 105 | .mode = SPI_MODE_3, |
| 106 | }, |
| 107 | #endif |
| 108 | }; |
| 109 | |
| 110 | /* SPI (0) */ |
| 111 | static struct resource bfin_spi0_resource[] = { |
| 112 | [0] = { |
| 113 | .start = SPI0_REGBASE, |
| 114 | .end = SPI0_REGBASE + 0xFF, |
| 115 | .flags = IORESOURCE_MEM, |
| 116 | }, |
| 117 | [1] = { |
| 118 | .start = CH_SPI, |
| 119 | .end = CH_SPI, |
Yi Li | 5312269 | 2009-06-05 12:11:11 +0000 | [diff] [blame] | 120 | .flags = IORESOURCE_DMA, |
| 121 | }, |
| 122 | [2] = { |
| 123 | .start = IRQ_SPI, |
| 124 | .end = IRQ_SPI, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 125 | .flags = IORESOURCE_IRQ, |
| 126 | } |
| 127 | }; |
| 128 | |
| 129 | /* SPI controller data */ |
| 130 | static struct bfin5xx_spi_master bfin_spi0_info = { |
| 131 | .num_chipselect = 8, |
| 132 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
| 133 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
| 134 | }; |
| 135 | |
| 136 | static struct platform_device bfin_spi0_device = { |
| 137 | .name = "bfin-spi", |
| 138 | .id = 0, /* Bus number */ |
| 139 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 140 | .resource = bfin_spi0_resource, |
| 141 | .dev = { |
| 142 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
| 143 | }, |
| 144 | }; |
| 145 | #endif /* spi master and devices */ |
| 146 | |
| 147 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 148 | static struct platform_device rtc_device = { |
| 149 | .name = "rtc-bfin", |
| 150 | .id = -1, |
| 151 | }; |
| 152 | #endif |
| 153 | |
| 154 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) |
| 155 | static struct platform_device hitachi_fb_device = { |
| 156 | .name = "hitachi-tx09", |
| 157 | }; |
| 158 | #endif |
| 159 | |
| 160 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 161 | #include <linux/smc91x.h> |
| 162 | |
| 163 | static struct smc91x_platdata smc91x_info = { |
| 164 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
| 165 | .leda = RPC_LED_100_10, |
| 166 | .ledb = RPC_LED_TX_RX, |
| 167 | }; |
| 168 | |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 169 | static struct resource smc91x_resources[] = { |
| 170 | { |
| 171 | .start = 0x20200300, |
| 172 | .end = 0x20200300 + 16, |
| 173 | .flags = IORESOURCE_MEM, |
| 174 | }, { |
| 175 | .start = IRQ_PF14, |
| 176 | .end = IRQ_PF14, |
| 177 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 178 | }, |
| 179 | }; |
| 180 | |
| 181 | static struct platform_device smc91x_device = { |
| 182 | .name = "smc91x", |
| 183 | .id = 0, |
| 184 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 185 | .resource = smc91x_resources, |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 186 | .dev = { |
| 187 | .platform_data = &smc91x_info, |
| 188 | }, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 189 | }; |
| 190 | #endif |
| 191 | |
| 192 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 193 | static struct resource isp1362_hcd_resources[] = { |
| 194 | { |
| 195 | .start = 0x20308000, |
| 196 | .end = 0x20308000, |
| 197 | .flags = IORESOURCE_MEM, |
| 198 | }, { |
| 199 | .start = 0x20308004, |
| 200 | .end = 0x20308004, |
| 201 | .flags = IORESOURCE_MEM, |
| 202 | }, { |
| 203 | .start = IRQ_PG15, |
| 204 | .end = IRQ_PG15, |
Michael Hennerich | 9e75894 | 2010-03-18 12:51:49 +0000 | [diff] [blame] | 205 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 206 | }, |
| 207 | }; |
| 208 | |
| 209 | static struct isp1362_platform_data isp1362_priv = { |
| 210 | .sel15Kres = 1, |
| 211 | .clknotstop = 0, |
| 212 | .oc_enable = 0, |
| 213 | .int_act_high = 0, |
| 214 | .int_edge_triggered = 0, |
| 215 | .remote_wakeup_connected = 0, |
| 216 | .no_power_switching = 1, |
| 217 | .power_switching_mode = 0, |
| 218 | }; |
| 219 | |
| 220 | static struct platform_device isp1362_hcd_device = { |
| 221 | .name = "isp1362-hcd", |
| 222 | .id = 0, |
| 223 | .dev = { |
| 224 | .platform_data = &isp1362_priv, |
| 225 | }, |
| 226 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), |
| 227 | .resource = isp1362_hcd_resources, |
| 228 | }; |
| 229 | #endif |
| 230 | |
| 231 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 232 | static struct resource net2272_bfin_resources[] = { |
| 233 | { |
Harald Krapfenbauer | 9c21453 | 2009-09-10 15:30:03 +0000 | [diff] [blame] | 234 | .start = 0x20300000, |
| 235 | .end = 0x20300000 + 0x100, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 236 | .flags = IORESOURCE_MEM, |
| 237 | }, { |
Harald Krapfenbauer | 9c21453 | 2009-09-10 15:30:03 +0000 | [diff] [blame] | 238 | .start = IRQ_PG13, |
| 239 | .end = IRQ_PG13, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 240 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 241 | }, |
| 242 | }; |
| 243 | |
| 244 | static struct platform_device net2272_bfin_device = { |
| 245 | .name = "net2272", |
| 246 | .id = -1, |
| 247 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), |
| 248 | .resource = net2272_bfin_resources, |
| 249 | }; |
| 250 | #endif |
| 251 | |
| 252 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
| 253 | static struct mtd_partition cm_partitions[] = { |
| 254 | { |
| 255 | .name = "bootloader(nor)", |
| 256 | .size = 0x40000, |
| 257 | .offset = 0, |
| 258 | }, { |
| 259 | .name = "linux kernel(nor)", |
Harald Krapfenbauer | 9c21453 | 2009-09-10 15:30:03 +0000 | [diff] [blame] | 260 | .size = 0x100000, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 261 | .offset = MTDPART_OFS_APPEND, |
| 262 | }, { |
| 263 | .name = "file system(nor)", |
| 264 | .size = MTDPART_SIZ_FULL, |
| 265 | .offset = MTDPART_OFS_APPEND, |
| 266 | } |
| 267 | }; |
| 268 | |
| 269 | static struct physmap_flash_data cm_flash_data = { |
| 270 | .width = 2, |
| 271 | .parts = cm_partitions, |
| 272 | .nr_parts = ARRAY_SIZE(cm_partitions), |
| 273 | }; |
| 274 | |
| 275 | static unsigned cm_flash_gpios[] = { GPIO_PF4, GPIO_PF5 }; |
| 276 | |
| 277 | static struct resource cm_flash_resource[] = { |
| 278 | { |
| 279 | .name = "cfi_probe", |
| 280 | .start = 0x20000000, |
| 281 | .end = 0x201fffff, |
| 282 | .flags = IORESOURCE_MEM, |
| 283 | }, { |
| 284 | .start = (unsigned long)cm_flash_gpios, |
| 285 | .end = ARRAY_SIZE(cm_flash_gpios), |
| 286 | .flags = IORESOURCE_IRQ, |
| 287 | } |
| 288 | }; |
| 289 | |
| 290 | static struct platform_device cm_flash_device = { |
| 291 | .name = "gpio-addr-flash", |
| 292 | .id = 0, |
| 293 | .dev = { |
| 294 | .platform_data = &cm_flash_data, |
| 295 | }, |
| 296 | .num_resources = ARRAY_SIZE(cm_flash_resource), |
| 297 | .resource = cm_flash_resource, |
| 298 | }; |
| 299 | #endif |
| 300 | |
| 301 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 302 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 303 | static struct resource bfin_uart0_resources[] = { |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 304 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 305 | .start = UART0_THR, |
| 306 | .end = UART0_GCTL+2, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 307 | .flags = IORESOURCE_MEM, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 308 | }, |
| 309 | { |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 310 | .start = IRQ_UART0_TX, |
| 311 | .end = IRQ_UART0_TX, |
| 312 | .flags = IORESOURCE_IRQ, |
| 313 | }, |
| 314 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 315 | .start = IRQ_UART0_RX, |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 316 | .end = IRQ_UART0_RX, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 317 | .flags = IORESOURCE_IRQ, |
| 318 | }, |
| 319 | { |
| 320 | .start = IRQ_UART0_ERROR, |
| 321 | .end = IRQ_UART0_ERROR, |
| 322 | .flags = IORESOURCE_IRQ, |
| 323 | }, |
| 324 | { |
| 325 | .start = CH_UART0_TX, |
| 326 | .end = CH_UART0_TX, |
| 327 | .flags = IORESOURCE_DMA, |
| 328 | }, |
| 329 | { |
| 330 | .start = CH_UART0_RX, |
| 331 | .end = CH_UART0_RX, |
| 332 | .flags = IORESOURCE_DMA, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 333 | }, |
| 334 | }; |
| 335 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 336 | static unsigned short bfin_uart0_peripherals[] = { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 337 | P_UART0_TX, P_UART0_RX, 0 |
| 338 | }; |
| 339 | |
| 340 | static struct platform_device bfin_uart0_device = { |
| 341 | .name = "bfin-uart", |
| 342 | .id = 0, |
| 343 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
| 344 | .resource = bfin_uart0_resources, |
| 345 | .dev = { |
| 346 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ |
| 347 | }, |
| 348 | }; |
| 349 | #endif |
| 350 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 351 | static struct resource bfin_uart1_resources[] = { |
| 352 | { |
| 353 | .start = UART1_THR, |
| 354 | .end = UART1_GCTL+2, |
| 355 | .flags = IORESOURCE_MEM, |
| 356 | }, |
| 357 | { |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 358 | .start = IRQ_UART1_TX, |
| 359 | .end = IRQ_UART1_TX, |
| 360 | .flags = IORESOURCE_IRQ, |
| 361 | }, |
| 362 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 363 | .start = IRQ_UART1_RX, |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 364 | .end = IRQ_UART1_RX, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 365 | .flags = IORESOURCE_IRQ, |
| 366 | }, |
| 367 | { |
| 368 | .start = IRQ_UART1_ERROR, |
| 369 | .end = IRQ_UART1_ERROR, |
| 370 | .flags = IORESOURCE_IRQ, |
| 371 | }, |
| 372 | { |
| 373 | .start = CH_UART1_TX, |
| 374 | .end = CH_UART1_TX, |
| 375 | .flags = IORESOURCE_DMA, |
| 376 | }, |
| 377 | { |
| 378 | .start = CH_UART1_RX, |
| 379 | .end = CH_UART1_RX, |
| 380 | .flags = IORESOURCE_DMA, |
| 381 | }, |
| 382 | }; |
| 383 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 384 | static unsigned short bfin_uart1_peripherals[] = { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 385 | P_UART1_TX, P_UART1_RX, 0 |
| 386 | }; |
| 387 | |
| 388 | static struct platform_device bfin_uart1_device = { |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 389 | .name = "bfin-uart", |
| 390 | .id = 1, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 391 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
| 392 | .resource = bfin_uart1_resources, |
| 393 | .dev = { |
| 394 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ |
| 395 | }, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 396 | }; |
| 397 | #endif |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 398 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 399 | |
| 400 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 401 | #ifdef CONFIG_BFIN_SIR0 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 402 | static struct resource bfin_sir0_resources[] = { |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 403 | { |
| 404 | .start = 0xFFC00400, |
| 405 | .end = 0xFFC004FF, |
| 406 | .flags = IORESOURCE_MEM, |
| 407 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 408 | { |
| 409 | .start = IRQ_UART0_RX, |
| 410 | .end = IRQ_UART0_RX+1, |
| 411 | .flags = IORESOURCE_IRQ, |
| 412 | }, |
| 413 | { |
| 414 | .start = CH_UART0_RX, |
| 415 | .end = CH_UART0_RX+1, |
| 416 | .flags = IORESOURCE_DMA, |
| 417 | }, |
| 418 | }; |
| 419 | |
| 420 | static struct platform_device bfin_sir0_device = { |
| 421 | .name = "bfin_sir", |
| 422 | .id = 0, |
| 423 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
| 424 | .resource = bfin_sir0_resources, |
| 425 | }; |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 426 | #endif |
| 427 | #ifdef CONFIG_BFIN_SIR1 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 428 | static struct resource bfin_sir1_resources[] = { |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 429 | { |
| 430 | .start = 0xFFC02000, |
| 431 | .end = 0xFFC020FF, |
| 432 | .flags = IORESOURCE_MEM, |
| 433 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 434 | { |
| 435 | .start = IRQ_UART1_RX, |
| 436 | .end = IRQ_UART1_RX+1, |
| 437 | .flags = IORESOURCE_IRQ, |
| 438 | }, |
| 439 | { |
| 440 | .start = CH_UART1_RX, |
| 441 | .end = CH_UART1_RX+1, |
| 442 | .flags = IORESOURCE_DMA, |
| 443 | }, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 444 | }; |
| 445 | |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 446 | static struct platform_device bfin_sir1_device = { |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 447 | .name = "bfin_sir", |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 448 | .id = 1, |
| 449 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
| 450 | .resource = bfin_sir1_resources, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 451 | }; |
| 452 | #endif |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 453 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 454 | |
| 455 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
| 456 | static struct resource bfin_twi0_resource[] = { |
| 457 | [0] = { |
| 458 | .start = TWI0_REGBASE, |
| 459 | .end = TWI0_REGBASE, |
| 460 | .flags = IORESOURCE_MEM, |
| 461 | }, |
| 462 | [1] = { |
| 463 | .start = IRQ_TWI, |
| 464 | .end = IRQ_TWI, |
| 465 | .flags = IORESOURCE_IRQ, |
| 466 | }, |
| 467 | }; |
| 468 | |
| 469 | static struct platform_device i2c_bfin_twi_device = { |
| 470 | .name = "i2c-bfin-twi", |
| 471 | .id = 0, |
| 472 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), |
| 473 | .resource = bfin_twi0_resource, |
| 474 | }; |
| 475 | #endif |
| 476 | |
| 477 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 478 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
| 479 | static struct resource bfin_sport0_uart_resources[] = { |
| 480 | { |
| 481 | .start = SPORT0_TCR1, |
| 482 | .end = SPORT0_MRCS3+4, |
| 483 | .flags = IORESOURCE_MEM, |
| 484 | }, |
| 485 | { |
| 486 | .start = IRQ_SPORT0_RX, |
| 487 | .end = IRQ_SPORT0_RX+1, |
| 488 | .flags = IORESOURCE_IRQ, |
| 489 | }, |
| 490 | { |
| 491 | .start = IRQ_SPORT0_ERROR, |
| 492 | .end = IRQ_SPORT0_ERROR, |
| 493 | .flags = IORESOURCE_IRQ, |
| 494 | }, |
| 495 | }; |
| 496 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 497 | static unsigned short bfin_sport0_peripherals[] = { |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 498 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, |
Sonic Zhang | e54b673 | 2010-11-12 02:45:38 +0000 | [diff] [blame] | 499 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0 |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 500 | }; |
| 501 | |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 502 | static struct platform_device bfin_sport0_uart_device = { |
| 503 | .name = "bfin-sport-uart", |
| 504 | .id = 0, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 505 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), |
| 506 | .resource = bfin_sport0_uart_resources, |
| 507 | .dev = { |
| 508 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ |
| 509 | }, |
| 510 | }; |
| 511 | #endif |
| 512 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
| 513 | static struct resource bfin_sport1_uart_resources[] = { |
| 514 | { |
| 515 | .start = SPORT1_TCR1, |
| 516 | .end = SPORT1_MRCS3+4, |
| 517 | .flags = IORESOURCE_MEM, |
| 518 | }, |
| 519 | { |
| 520 | .start = IRQ_SPORT1_RX, |
| 521 | .end = IRQ_SPORT1_RX+1, |
| 522 | .flags = IORESOURCE_IRQ, |
| 523 | }, |
| 524 | { |
| 525 | .start = IRQ_SPORT1_ERROR, |
| 526 | .end = IRQ_SPORT1_ERROR, |
| 527 | .flags = IORESOURCE_IRQ, |
| 528 | }, |
| 529 | }; |
| 530 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 531 | static unsigned short bfin_sport1_peripherals[] = { |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 532 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, |
Sonic Zhang | e54b673 | 2010-11-12 02:45:38 +0000 | [diff] [blame] | 533 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0 |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 534 | }; |
| 535 | |
| 536 | static struct platform_device bfin_sport1_uart_device = { |
| 537 | .name = "bfin-sport-uart", |
| 538 | .id = 1, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 539 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), |
| 540 | .resource = bfin_sport1_uart_resources, |
| 541 | .dev = { |
| 542 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ |
| 543 | }, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 544 | }; |
| 545 | #endif |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 546 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 547 | |
| 548 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 549 | #include <linux/bfin_mac.h> |
| 550 | static const unsigned short bfin_mac_peripherals[] = P_MII0; |
| 551 | |
| 552 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
| 553 | { |
| 554 | .addr = 1, |
| 555 | .irq = IRQ_MAC_PHYINT, |
| 556 | }, |
| 557 | }; |
| 558 | |
| 559 | static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { |
| 560 | .phydev_number = 1, |
| 561 | .phydev_data = bfin_phydev_data, |
| 562 | .phy_mode = PHY_INTERFACE_MODE_MII, |
| 563 | .mac_peripherals = bfin_mac_peripherals, |
| 564 | }; |
| 565 | |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 566 | static struct platform_device bfin_mii_bus = { |
| 567 | .name = "bfin_mii_bus", |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 568 | .dev = { |
| 569 | .platform_data = &bfin_mii_bus_data, |
| 570 | } |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 571 | }; |
| 572 | |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 573 | static struct platform_device bfin_mac_device = { |
| 574 | .name = "bfin_mac", |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 575 | .dev = { |
| 576 | .platform_data = &bfin_mii_bus, |
| 577 | } |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 578 | }; |
| 579 | #endif |
| 580 | |
| 581 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
Mike Frysinger | fe5aeb9 | 2008-08-05 18:29:56 +0800 | [diff] [blame] | 582 | #define PATA_INT IRQ_PF14 |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 583 | |
| 584 | static struct pata_platform_info bfin_pata_platform_data = { |
| 585 | .ioport_shift = 2, |
Yong Zhang | 7832bb5 | 2011-09-07 16:10:03 +0800 | [diff] [blame] | 586 | .irq_type = IRQF_TRIGGER_HIGH, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 587 | }; |
| 588 | |
| 589 | static struct resource bfin_pata_resources[] = { |
| 590 | { |
| 591 | .start = 0x2030C000, |
| 592 | .end = 0x2030C01F, |
| 593 | .flags = IORESOURCE_MEM, |
| 594 | }, |
| 595 | { |
| 596 | .start = 0x2030D018, |
| 597 | .end = 0x2030D01B, |
| 598 | .flags = IORESOURCE_MEM, |
| 599 | }, |
| 600 | { |
| 601 | .start = PATA_INT, |
| 602 | .end = PATA_INT, |
| 603 | .flags = IORESOURCE_IRQ, |
| 604 | }, |
| 605 | }; |
| 606 | |
| 607 | static struct platform_device bfin_pata_device = { |
| 608 | .name = "pata_platform", |
| 609 | .id = -1, |
| 610 | .num_resources = ARRAY_SIZE(bfin_pata_resources), |
| 611 | .resource = bfin_pata_resources, |
| 612 | .dev = { |
| 613 | .platform_data = &bfin_pata_platform_data, |
| 614 | } |
| 615 | }; |
| 616 | #endif |
| 617 | |
| 618 | static const unsigned int cclk_vlev_datasheet[] = |
| 619 | { |
| 620 | VRPAIR(VLEV_085, 250000000), |
| 621 | VRPAIR(VLEV_090, 376000000), |
| 622 | VRPAIR(VLEV_095, 426000000), |
| 623 | VRPAIR(VLEV_100, 426000000), |
| 624 | VRPAIR(VLEV_105, 476000000), |
| 625 | VRPAIR(VLEV_110, 476000000), |
| 626 | VRPAIR(VLEV_115, 476000000), |
| 627 | VRPAIR(VLEV_120, 500000000), |
| 628 | VRPAIR(VLEV_125, 533000000), |
| 629 | VRPAIR(VLEV_130, 600000000), |
| 630 | }; |
| 631 | |
| 632 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { |
| 633 | .tuple_tab = cclk_vlev_datasheet, |
| 634 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), |
| 635 | .vr_settling_time = 25 /* us */, |
| 636 | }; |
| 637 | |
| 638 | static struct platform_device bfin_dpmc = { |
| 639 | .name = "bfin dpmc", |
| 640 | .dev = { |
| 641 | .platform_data = &bfin_dmpc_vreg_data, |
| 642 | }, |
| 643 | }; |
| 644 | |
| 645 | static struct platform_device *cm_bf537_devices[] __initdata = { |
| 646 | |
| 647 | &bfin_dpmc, |
| 648 | |
| 649 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) |
| 650 | &hitachi_fb_device, |
| 651 | #endif |
| 652 | |
| 653 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 654 | &rtc_device, |
| 655 | #endif |
| 656 | |
| 657 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 658 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 659 | &bfin_uart0_device, |
| 660 | #endif |
| 661 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 662 | &bfin_uart1_device, |
| 663 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 664 | #endif |
| 665 | |
| 666 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 667 | #ifdef CONFIG_BFIN_SIR0 |
| 668 | &bfin_sir0_device, |
| 669 | #endif |
| 670 | #ifdef CONFIG_BFIN_SIR1 |
| 671 | &bfin_sir1_device, |
| 672 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 673 | #endif |
| 674 | |
| 675 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
| 676 | &i2c_bfin_twi_device, |
| 677 | #endif |
| 678 | |
| 679 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 680 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 681 | &bfin_sport0_uart_device, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 682 | #endif |
| 683 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 684 | &bfin_sport1_uart_device, |
| 685 | #endif |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 686 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 687 | |
| 688 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 689 | &isp1362_hcd_device, |
| 690 | #endif |
| 691 | |
| 692 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 693 | &smc91x_device, |
| 694 | #endif |
| 695 | |
| 696 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 697 | &bfin_mii_bus, |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 698 | &bfin_mac_device, |
| 699 | #endif |
| 700 | |
| 701 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 702 | &net2272_bfin_device, |
| 703 | #endif |
| 704 | |
Sonic Zhang | 7d157fb | 2011-11-07 18:40:10 +0800 | [diff] [blame] | 705 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 706 | &bfin_spi0_device, |
| 707 | #endif |
| 708 | |
| 709 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 710 | &bfin_pata_device, |
| 711 | #endif |
| 712 | |
| 713 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
| 714 | &cm_flash_device, |
| 715 | #endif |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 716 | }; |
| 717 | |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 718 | static int __init net2272_init(void) |
| 719 | { |
| 720 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 721 | int ret; |
| 722 | |
| 723 | ret = gpio_request(GPIO_PG14, "net2272"); |
| 724 | if (ret) |
| 725 | return ret; |
| 726 | |
| 727 | /* Reset USB Chip, PG14 */ |
| 728 | gpio_direction_output(GPIO_PG14, 0); |
| 729 | mdelay(2); |
| 730 | gpio_set_value(GPIO_PG14, 1); |
| 731 | #endif |
| 732 | |
| 733 | return 0; |
| 734 | } |
| 735 | |
Mike Frysinger | 7f6678c | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 736 | static int __init tcm_bf537_init(void) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 737 | { |
| 738 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
| 739 | platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); |
Sonic Zhang | 7d157fb | 2011-11-07 18:40:10 +0800 | [diff] [blame] | 740 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 741 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
| 742 | #endif |
| 743 | |
| 744 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
Thomas Gleixner | bc2f6bd | 2011-02-06 18:23:38 +0000 | [diff] [blame] | 745 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 746 | #endif |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 747 | |
| 748 | if (net2272_init()) |
| 749 | pr_warning("unable to configure net2272; it probably won't work\n"); |
| 750 | |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 751 | return 0; |
| 752 | } |
| 753 | |
Mike Frysinger | 7f6678c | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 754 | arch_initcall(tcm_bf537_init); |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 755 | |
Sonic Zhang | c13ce9f | 2009-09-23 09:37:46 +0000 | [diff] [blame] | 756 | static struct platform_device *cm_bf537_early_devices[] __initdata = { |
| 757 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) |
| 758 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 759 | &bfin_uart0_device, |
| 760 | #endif |
| 761 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 762 | &bfin_uart1_device, |
| 763 | #endif |
| 764 | #endif |
| 765 | |
| 766 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) |
| 767 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
| 768 | &bfin_sport0_uart_device, |
| 769 | #endif |
| 770 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
| 771 | &bfin_sport1_uart_device, |
| 772 | #endif |
| 773 | #endif |
| 774 | }; |
| 775 | |
| 776 | void __init native_machine_early_platform_add_devices(void) |
| 777 | { |
| 778 | printk(KERN_INFO "register early platform devices\n"); |
| 779 | early_platform_add_devices(cm_bf537_early_devices, |
| 780 | ARRAY_SIZE(cm_bf537_early_devices)); |
| 781 | } |
| 782 | |
Danny Kukawka | fa63c6d | 2012-02-16 07:09:30 +0000 | [diff] [blame] | 783 | int bfin_get_ether_addr(char *addr) |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 784 | { |
Danny Kukawka | fa63c6d | 2012-02-16 07:09:30 +0000 | [diff] [blame] | 785 | return 1; |
Mike Frysinger | b9da3b9 | 2008-08-13 15:49:35 +0800 | [diff] [blame] | 786 | } |
| 787 | EXPORT_SYMBOL(bfin_get_ether_addr); |