tcm_bf537.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. /*
  2. * File: arch/blackfin/mach-bf537/boards/tcm_bf537.c
  3. * Based on: arch/blackfin/mach-bf533/boards/cm_bf537.c
  4. * Author: Aidan Williams <aidan@nicta.com.au>
  5. *
  6. * Created: 2005
  7. * Description: Board description file
  8. *
  9. * Modified:
  10. * Copyright 2005 National ICT Australia (NICTA)
  11. * Copyright 2004-2006 Analog Devices Inc.
  12. *
  13. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License as published by
  17. * the Free Software Foundation; either version 2 of the License, or
  18. * (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, see the file COPYING, or write
  27. * to the Free Software Foundation, Inc.,
  28. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  29. */
  30. #include <linux/device.h>
  31. #include <linux/etherdevice.h>
  32. #include <linux/platform_device.h>
  33. #include <linux/mtd/mtd.h>
  34. #include <linux/mtd/partitions.h>
  35. #include <linux/mtd/physmap.h>
  36. #include <linux/spi/spi.h>
  37. #include <linux/spi/flash.h>
  38. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  39. #include <linux/usb/isp1362.h>
  40. #endif
  41. #include <linux/ata_platform.h>
  42. #include <linux/irq.h>
  43. #include <asm/dma.h>
  44. #include <asm/bfin5xx_spi.h>
  45. #include <asm/portmux.h>
  46. #include <asm/dpmc.h>
  47. /*
  48. * Name the Board for the /proc/cpuinfo
  49. */
  50. const char bfin_board_name[] = "Bluetechnix TCM BF537";
  51. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  52. /* all SPI peripherals info goes here */
  53. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  54. static struct mtd_partition bfin_spi_flash_partitions[] = {
  55. {
  56. .name = "bootloader(spi)",
  57. .size = 0x00020000,
  58. .offset = 0,
  59. .mask_flags = MTD_CAP_ROM
  60. }, {
  61. .name = "linux kernel(spi)",
  62. .size = 0xe0000,
  63. .offset = 0x20000
  64. }, {
  65. .name = "file system(spi)",
  66. .size = 0x700000,
  67. .offset = 0x00100000,
  68. }
  69. };
  70. static struct flash_platform_data bfin_spi_flash_data = {
  71. .name = "m25p80",
  72. .parts = bfin_spi_flash_partitions,
  73. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  74. .type = "m25p64",
  75. };
  76. /* SPI flash chip (m25p64) */
  77. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  78. .enable_dma = 0, /* use dma transfer with this chip*/
  79. .bits_per_word = 8,
  80. };
  81. #endif
  82. #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
  83. /* SPI ADC chip */
  84. static struct bfin5xx_spi_chip spi_adc_chip_info = {
  85. .enable_dma = 1, /* use dma transfer with this chip*/
  86. .bits_per_word = 16,
  87. };
  88. #endif
  89. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  90. static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
  91. .enable_dma = 0,
  92. .bits_per_word = 16,
  93. };
  94. #endif
  95. #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
  96. static struct bfin5xx_spi_chip mmc_spi_chip_info = {
  97. .enable_dma = 0,
  98. .bits_per_word = 8,
  99. };
  100. #endif
  101. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  102. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  103. {
  104. /* the modalias must be the same as spi device driver name */
  105. .modalias = "m25p80", /* Name of spi_driver for this device */
  106. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  107. .bus_num = 0, /* Framework bus number */
  108. .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
  109. .platform_data = &bfin_spi_flash_data,
  110. .controller_data = &spi_flash_chip_info,
  111. .mode = SPI_MODE_3,
  112. },
  113. #endif
  114. #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
  115. {
  116. .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
  117. .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
  118. .bus_num = 0, /* Framework bus number */
  119. .chip_select = 1, /* Framework chip select. */
  120. .platform_data = NULL, /* No spi_driver specific config */
  121. .controller_data = &spi_adc_chip_info,
  122. },
  123. #endif
  124. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  125. {
  126. .modalias = "ad1836-spi",
  127. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  128. .bus_num = 0,
  129. .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
  130. .controller_data = &ad1836_spi_chip_info,
  131. },
  132. #endif
  133. #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
  134. {
  135. .modalias = "mmc_spi",
  136. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  137. .bus_num = 0,
  138. .chip_select = 5,
  139. .controller_data = &mmc_spi_chip_info,
  140. .mode = SPI_MODE_3,
  141. },
  142. #endif
  143. };
  144. /* SPI (0) */
  145. static struct resource bfin_spi0_resource[] = {
  146. [0] = {
  147. .start = SPI0_REGBASE,
  148. .end = SPI0_REGBASE + 0xFF,
  149. .flags = IORESOURCE_MEM,
  150. },
  151. [1] = {
  152. .start = CH_SPI,
  153. .end = CH_SPI,
  154. .flags = IORESOURCE_DMA,
  155. },
  156. [2] = {
  157. .start = IRQ_SPI,
  158. .end = IRQ_SPI,
  159. .flags = IORESOURCE_IRQ,
  160. }
  161. };
  162. /* SPI controller data */
  163. static struct bfin5xx_spi_master bfin_spi0_info = {
  164. .num_chipselect = 8,
  165. .enable_dma = 1, /* master has the ability to do dma transfer */
  166. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  167. };
  168. static struct platform_device bfin_spi0_device = {
  169. .name = "bfin-spi",
  170. .id = 0, /* Bus number */
  171. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  172. .resource = bfin_spi0_resource,
  173. .dev = {
  174. .platform_data = &bfin_spi0_info, /* Passed to driver */
  175. },
  176. };
  177. #endif /* spi master and devices */
  178. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  179. static struct platform_device rtc_device = {
  180. .name = "rtc-bfin",
  181. .id = -1,
  182. };
  183. #endif
  184. #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
  185. static struct platform_device hitachi_fb_device = {
  186. .name = "hitachi-tx09",
  187. };
  188. #endif
  189. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  190. #include <linux/smc91x.h>
  191. static struct smc91x_platdata smc91x_info = {
  192. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
  193. .leda = RPC_LED_100_10,
  194. .ledb = RPC_LED_TX_RX,
  195. };
  196. static struct resource smc91x_resources[] = {
  197. {
  198. .start = 0x20200300,
  199. .end = 0x20200300 + 16,
  200. .flags = IORESOURCE_MEM,
  201. }, {
  202. .start = IRQ_PF14,
  203. .end = IRQ_PF14,
  204. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  205. },
  206. };
  207. static struct platform_device smc91x_device = {
  208. .name = "smc91x",
  209. .id = 0,
  210. .num_resources = ARRAY_SIZE(smc91x_resources),
  211. .resource = smc91x_resources,
  212. .dev = {
  213. .platform_data = &smc91x_info,
  214. },
  215. };
  216. #endif
  217. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  218. static struct resource isp1362_hcd_resources[] = {
  219. {
  220. .start = 0x20308000,
  221. .end = 0x20308000,
  222. .flags = IORESOURCE_MEM,
  223. }, {
  224. .start = 0x20308004,
  225. .end = 0x20308004,
  226. .flags = IORESOURCE_MEM,
  227. }, {
  228. .start = IRQ_PG15,
  229. .end = IRQ_PG15,
  230. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  231. },
  232. };
  233. static struct isp1362_platform_data isp1362_priv = {
  234. .sel15Kres = 1,
  235. .clknotstop = 0,
  236. .oc_enable = 0,
  237. .int_act_high = 0,
  238. .int_edge_triggered = 0,
  239. .remote_wakeup_connected = 0,
  240. .no_power_switching = 1,
  241. .power_switching_mode = 0,
  242. };
  243. static struct platform_device isp1362_hcd_device = {
  244. .name = "isp1362-hcd",
  245. .id = 0,
  246. .dev = {
  247. .platform_data = &isp1362_priv,
  248. },
  249. .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
  250. .resource = isp1362_hcd_resources,
  251. };
  252. #endif
  253. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  254. static struct resource net2272_bfin_resources[] = {
  255. {
  256. .start = 0x20200000,
  257. .end = 0x20200000 + 0x100,
  258. .flags = IORESOURCE_MEM,
  259. }, {
  260. .start = IRQ_PH14,
  261. .end = IRQ_PH14,
  262. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  263. },
  264. };
  265. static struct platform_device net2272_bfin_device = {
  266. .name = "net2272",
  267. .id = -1,
  268. .num_resources = ARRAY_SIZE(net2272_bfin_resources),
  269. .resource = net2272_bfin_resources,
  270. };
  271. #endif
  272. static struct resource bfin_gpios_resources = {
  273. .start = 0,
  274. .end = MAX_BLACKFIN_GPIOS - 1,
  275. .flags = IORESOURCE_IRQ,
  276. };
  277. static struct platform_device bfin_gpios_device = {
  278. .name = "simple-gpio",
  279. .id = -1,
  280. .num_resources = 1,
  281. .resource = &bfin_gpios_resources,
  282. };
  283. #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
  284. static struct mtd_partition cm_partitions[] = {
  285. {
  286. .name = "bootloader(nor)",
  287. .size = 0x40000,
  288. .offset = 0,
  289. }, {
  290. .name = "linux kernel(nor)",
  291. .size = 0xE0000,
  292. .offset = MTDPART_OFS_APPEND,
  293. }, {
  294. .name = "file system(nor)",
  295. .size = MTDPART_SIZ_FULL,
  296. .offset = MTDPART_OFS_APPEND,
  297. }
  298. };
  299. static struct physmap_flash_data cm_flash_data = {
  300. .width = 2,
  301. .parts = cm_partitions,
  302. .nr_parts = ARRAY_SIZE(cm_partitions),
  303. };
  304. static unsigned cm_flash_gpios[] = { GPIO_PF4, GPIO_PF5 };
  305. static struct resource cm_flash_resource[] = {
  306. {
  307. .name = "cfi_probe",
  308. .start = 0x20000000,
  309. .end = 0x201fffff,
  310. .flags = IORESOURCE_MEM,
  311. }, {
  312. .start = (unsigned long)cm_flash_gpios,
  313. .end = ARRAY_SIZE(cm_flash_gpios),
  314. .flags = IORESOURCE_IRQ,
  315. }
  316. };
  317. static struct platform_device cm_flash_device = {
  318. .name = "gpio-addr-flash",
  319. .id = 0,
  320. .dev = {
  321. .platform_data = &cm_flash_data,
  322. },
  323. .num_resources = ARRAY_SIZE(cm_flash_resource),
  324. .resource = cm_flash_resource,
  325. };
  326. #endif
  327. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  328. static struct resource bfin_uart_resources[] = {
  329. {
  330. .start = 0xFFC00400,
  331. .end = 0xFFC004FF,
  332. .flags = IORESOURCE_MEM,
  333. }, {
  334. .start = 0xFFC02000,
  335. .end = 0xFFC020FF,
  336. .flags = IORESOURCE_MEM,
  337. },
  338. };
  339. static struct platform_device bfin_uart_device = {
  340. .name = "bfin-uart",
  341. .id = 1,
  342. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  343. .resource = bfin_uart_resources,
  344. };
  345. #endif
  346. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  347. #ifdef CONFIG_BFIN_SIR0
  348. static struct resource bfin_sir0_resources[] = {
  349. {
  350. .start = 0xFFC00400,
  351. .end = 0xFFC004FF,
  352. .flags = IORESOURCE_MEM,
  353. },
  354. {
  355. .start = IRQ_UART0_RX,
  356. .end = IRQ_UART0_RX+1,
  357. .flags = IORESOURCE_IRQ,
  358. },
  359. {
  360. .start = CH_UART0_RX,
  361. .end = CH_UART0_RX+1,
  362. .flags = IORESOURCE_DMA,
  363. },
  364. };
  365. static struct platform_device bfin_sir0_device = {
  366. .name = "bfin_sir",
  367. .id = 0,
  368. .num_resources = ARRAY_SIZE(bfin_sir0_resources),
  369. .resource = bfin_sir0_resources,
  370. };
  371. #endif
  372. #ifdef CONFIG_BFIN_SIR1
  373. static struct resource bfin_sir1_resources[] = {
  374. {
  375. .start = 0xFFC02000,
  376. .end = 0xFFC020FF,
  377. .flags = IORESOURCE_MEM,
  378. },
  379. {
  380. .start = IRQ_UART1_RX,
  381. .end = IRQ_UART1_RX+1,
  382. .flags = IORESOURCE_IRQ,
  383. },
  384. {
  385. .start = CH_UART1_RX,
  386. .end = CH_UART1_RX+1,
  387. .flags = IORESOURCE_DMA,
  388. },
  389. };
  390. static struct platform_device bfin_sir1_device = {
  391. .name = "bfin_sir",
  392. .id = 1,
  393. .num_resources = ARRAY_SIZE(bfin_sir1_resources),
  394. .resource = bfin_sir1_resources,
  395. };
  396. #endif
  397. #endif
  398. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  399. static struct resource bfin_twi0_resource[] = {
  400. [0] = {
  401. .start = TWI0_REGBASE,
  402. .end = TWI0_REGBASE,
  403. .flags = IORESOURCE_MEM,
  404. },
  405. [1] = {
  406. .start = IRQ_TWI,
  407. .end = IRQ_TWI,
  408. .flags = IORESOURCE_IRQ,
  409. },
  410. };
  411. static struct platform_device i2c_bfin_twi_device = {
  412. .name = "i2c-bfin-twi",
  413. .id = 0,
  414. .num_resources = ARRAY_SIZE(bfin_twi0_resource),
  415. .resource = bfin_twi0_resource,
  416. };
  417. #endif
  418. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  419. static struct platform_device bfin_sport0_uart_device = {
  420. .name = "bfin-sport-uart",
  421. .id = 0,
  422. };
  423. static struct platform_device bfin_sport1_uart_device = {
  424. .name = "bfin-sport-uart",
  425. .id = 1,
  426. };
  427. #endif
  428. #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
  429. static struct platform_device bfin_mii_bus = {
  430. .name = "bfin_mii_bus",
  431. };
  432. static struct platform_device bfin_mac_device = {
  433. .name = "bfin_mac",
  434. .dev.platform_data = &bfin_mii_bus,
  435. };
  436. #endif
  437. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  438. #define PATA_INT IRQ_PF14
  439. static struct pata_platform_info bfin_pata_platform_data = {
  440. .ioport_shift = 2,
  441. .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
  442. };
  443. static struct resource bfin_pata_resources[] = {
  444. {
  445. .start = 0x2030C000,
  446. .end = 0x2030C01F,
  447. .flags = IORESOURCE_MEM,
  448. },
  449. {
  450. .start = 0x2030D018,
  451. .end = 0x2030D01B,
  452. .flags = IORESOURCE_MEM,
  453. },
  454. {
  455. .start = PATA_INT,
  456. .end = PATA_INT,
  457. .flags = IORESOURCE_IRQ,
  458. },
  459. };
  460. static struct platform_device bfin_pata_device = {
  461. .name = "pata_platform",
  462. .id = -1,
  463. .num_resources = ARRAY_SIZE(bfin_pata_resources),
  464. .resource = bfin_pata_resources,
  465. .dev = {
  466. .platform_data = &bfin_pata_platform_data,
  467. }
  468. };
  469. #endif
  470. static const unsigned int cclk_vlev_datasheet[] =
  471. {
  472. VRPAIR(VLEV_085, 250000000),
  473. VRPAIR(VLEV_090, 376000000),
  474. VRPAIR(VLEV_095, 426000000),
  475. VRPAIR(VLEV_100, 426000000),
  476. VRPAIR(VLEV_105, 476000000),
  477. VRPAIR(VLEV_110, 476000000),
  478. VRPAIR(VLEV_115, 476000000),
  479. VRPAIR(VLEV_120, 500000000),
  480. VRPAIR(VLEV_125, 533000000),
  481. VRPAIR(VLEV_130, 600000000),
  482. };
  483. static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
  484. .tuple_tab = cclk_vlev_datasheet,
  485. .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
  486. .vr_settling_time = 25 /* us */,
  487. };
  488. static struct platform_device bfin_dpmc = {
  489. .name = "bfin dpmc",
  490. .dev = {
  491. .platform_data = &bfin_dmpc_vreg_data,
  492. },
  493. };
  494. static struct platform_device *cm_bf537_devices[] __initdata = {
  495. &bfin_dpmc,
  496. #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
  497. &hitachi_fb_device,
  498. #endif
  499. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  500. &rtc_device,
  501. #endif
  502. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  503. &bfin_uart_device,
  504. #endif
  505. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  506. #ifdef CONFIG_BFIN_SIR0
  507. &bfin_sir0_device,
  508. #endif
  509. #ifdef CONFIG_BFIN_SIR1
  510. &bfin_sir1_device,
  511. #endif
  512. #endif
  513. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  514. &i2c_bfin_twi_device,
  515. #endif
  516. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  517. &bfin_sport0_uart_device,
  518. &bfin_sport1_uart_device,
  519. #endif
  520. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  521. &isp1362_hcd_device,
  522. #endif
  523. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  524. &smc91x_device,
  525. #endif
  526. #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
  527. &bfin_mii_bus,
  528. &bfin_mac_device,
  529. #endif
  530. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  531. &net2272_bfin_device,
  532. #endif
  533. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  534. &bfin_spi0_device,
  535. #endif
  536. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  537. &bfin_pata_device,
  538. #endif
  539. #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
  540. &cm_flash_device,
  541. #endif
  542. &bfin_gpios_device,
  543. };
  544. static int __init tcm_bf537_init(void)
  545. {
  546. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  547. platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices));
  548. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  549. spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
  550. #endif
  551. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  552. irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
  553. #endif
  554. return 0;
  555. }
  556. arch_initcall(tcm_bf537_init);
  557. void bfin_get_ether_addr(char *addr)
  558. {
  559. random_ether_addr(addr);
  560. printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
  561. }
  562. EXPORT_SYMBOL(bfin_get_ether_addr);