stamp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. /*
  2. * File: arch/blackfin/mach-bf533/stamp.c
  3. * Based on: arch/blackfin/mach-bf533/ezkit.c
  4. * Author: Aidan Williams <aidan@nicta.com.au>
  5. *
  6. * Created: 2005
  7. * Description: Board Info File for the BF533-STAMP
  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/platform_device.h>
  32. #include <linux/mtd/mtd.h>
  33. #include <linux/mtd/partitions.h>
  34. #include <linux/mtd/physmap.h>
  35. #include <linux/spi/spi.h>
  36. #include <linux/spi/flash.h>
  37. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  38. #include <linux/usb/isp1362.h>
  39. #endif
  40. #include <linux/ata_platform.h>
  41. #include <linux/irq.h>
  42. #include <linux/i2c.h>
  43. #include <asm/dma.h>
  44. #include <asm/bfin5xx_spi.h>
  45. #include <asm/reboot.h>
  46. #include <asm/portmux.h>
  47. /*
  48. * Name the Board for the /proc/cpuinfo
  49. */
  50. const char bfin_board_name[] = "ADDS-BF533-STAMP";
  51. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  52. static struct platform_device rtc_device = {
  53. .name = "rtc-bfin",
  54. .id = -1,
  55. };
  56. #endif
  57. /*
  58. * Driver needs to know address, irq and flag pin.
  59. */
  60. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  61. static struct resource smc91x_resources[] = {
  62. {
  63. .name = "smc91x-regs",
  64. .start = 0x20300300,
  65. .end = 0x20300300 + 16,
  66. .flags = IORESOURCE_MEM,
  67. }, {
  68. .start = IRQ_PF7,
  69. .end = IRQ_PF7,
  70. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  71. },
  72. };
  73. static struct platform_device smc91x_device = {
  74. .name = "smc91x",
  75. .id = 0,
  76. .num_resources = ARRAY_SIZE(smc91x_resources),
  77. .resource = smc91x_resources,
  78. };
  79. #endif
  80. #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
  81. static struct platform_device bfin_fb_adv7393_device = {
  82. .name = "bfin-adv7393",
  83. };
  84. #endif
  85. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  86. static struct resource net2272_bfin_resources[] = {
  87. {
  88. .start = 0x20300000,
  89. .end = 0x20300000 + 0x100,
  90. .flags = IORESOURCE_MEM,
  91. }, {
  92. .start = IRQ_PF10,
  93. .end = IRQ_PF10,
  94. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  95. },
  96. };
  97. static struct platform_device net2272_bfin_device = {
  98. .name = "net2272",
  99. .id = -1,
  100. .num_resources = ARRAY_SIZE(net2272_bfin_resources),
  101. .resource = net2272_bfin_resources,
  102. };
  103. #endif
  104. #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
  105. static struct mtd_partition stamp_partitions[] = {
  106. {
  107. .name = "Bootloader",
  108. .size = 0x40000,
  109. .offset = 0,
  110. }, {
  111. .name = "Kernel",
  112. .size = 0xE0000,
  113. .offset = MTDPART_OFS_APPEND,
  114. }, {
  115. .name = "RootFS",
  116. .size = MTDPART_SIZ_FULL,
  117. .offset = MTDPART_OFS_APPEND,
  118. }
  119. };
  120. static struct physmap_flash_data stamp_flash_data = {
  121. .width = 2,
  122. .parts = stamp_partitions,
  123. .nr_parts = ARRAY_SIZE(stamp_partitions),
  124. };
  125. static struct resource stamp_flash_resource[] = {
  126. {
  127. .name = "cfi_probe",
  128. .start = 0x20000000,
  129. .end = 0x203fffff,
  130. .flags = IORESOURCE_MEM,
  131. }, {
  132. .start = CONFIG_ENET_FLASH_PIN,
  133. .flags = IORESOURCE_IRQ,
  134. }
  135. };
  136. static struct platform_device stamp_flash_device = {
  137. .name = "BF5xx-Flash",
  138. .id = 0,
  139. .dev = {
  140. .platform_data = &stamp_flash_data,
  141. },
  142. .num_resources = ARRAY_SIZE(stamp_flash_resource),
  143. .resource = stamp_flash_resource,
  144. };
  145. #endif
  146. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  147. /* all SPI peripherals info goes here */
  148. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  149. static struct mtd_partition bfin_spi_flash_partitions[] = {
  150. {
  151. .name = "bootloader",
  152. .size = 0x00040000,
  153. .offset = 0,
  154. .mask_flags = MTD_CAP_ROM
  155. }, {
  156. .name = "kernel",
  157. .size = 0xe0000,
  158. .offset = MTDPART_OFS_APPEND,
  159. }, {
  160. .name = "file system",
  161. .size = MTDPART_SIZ_FULL,
  162. .offset = MTDPART_OFS_APPEND,
  163. }
  164. };
  165. static struct flash_platform_data bfin_spi_flash_data = {
  166. .name = "m25p80",
  167. .parts = bfin_spi_flash_partitions,
  168. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  169. .type = "m25p64",
  170. };
  171. /* SPI flash chip (m25p64) */
  172. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  173. .enable_dma = 0, /* use dma transfer with this chip*/
  174. .bits_per_word = 8,
  175. };
  176. #endif
  177. #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
  178. /* SPI ADC chip */
  179. static struct bfin5xx_spi_chip spi_adc_chip_info = {
  180. .enable_dma = 1, /* use dma transfer with this chip*/
  181. .bits_per_word = 16,
  182. };
  183. #endif
  184. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  185. static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
  186. .enable_dma = 0,
  187. .bits_per_word = 16,
  188. };
  189. #endif
  190. #if defined(CONFIG_PBX)
  191. static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
  192. .ctl_reg = 0x4, /* send zero */
  193. .enable_dma = 0,
  194. .bits_per_word = 8,
  195. .cs_change_per_word = 1,
  196. };
  197. #endif
  198. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  199. static struct bfin5xx_spi_chip spi_mmc_chip_info = {
  200. .enable_dma = 1,
  201. .bits_per_word = 8,
  202. };
  203. #endif
  204. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  205. static struct bfin5xx_spi_chip spidev_chip_info = {
  206. .enable_dma = 0,
  207. .bits_per_word = 8,
  208. };
  209. #endif
  210. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  211. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  212. {
  213. /* the modalias must be the same as spi device driver name */
  214. .modalias = "m25p80", /* Name of spi_driver for this device */
  215. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  216. .bus_num = 0, /* Framework bus number */
  217. .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
  218. .platform_data = &bfin_spi_flash_data,
  219. .controller_data = &spi_flash_chip_info,
  220. .mode = SPI_MODE_3,
  221. },
  222. #endif
  223. #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
  224. {
  225. .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
  226. .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
  227. .bus_num = 0, /* Framework bus number */
  228. .chip_select = 1, /* Framework chip select. */
  229. .platform_data = NULL, /* No spi_driver specific config */
  230. .controller_data = &spi_adc_chip_info,
  231. },
  232. #endif
  233. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  234. {
  235. .modalias = "ad1836-spi",
  236. .max_speed_hz = 31250000, /* max spi clock (SCK) speed in HZ */
  237. .bus_num = 0,
  238. .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
  239. .controller_data = &ad1836_spi_chip_info,
  240. },
  241. #endif
  242. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  243. {
  244. .modalias = "spi_mmc_dummy",
  245. .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
  246. .bus_num = 0,
  247. .chip_select = 0,
  248. .platform_data = NULL,
  249. .controller_data = &spi_mmc_chip_info,
  250. .mode = SPI_MODE_3,
  251. },
  252. {
  253. .modalias = "spi_mmc",
  254. .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
  255. .bus_num = 0,
  256. .chip_select = CONFIG_SPI_MMC_CS_CHAN,
  257. .platform_data = NULL,
  258. .controller_data = &spi_mmc_chip_info,
  259. .mode = SPI_MODE_3,
  260. },
  261. #endif
  262. #if defined(CONFIG_PBX)
  263. {
  264. .modalias = "fxs-spi",
  265. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  266. .bus_num = 0,
  267. .chip_select = 8 - CONFIG_J11_JUMPER,
  268. .controller_data = &spi_si3xxx_chip_info,
  269. .mode = SPI_MODE_3,
  270. },
  271. {
  272. .modalias = "fxo-spi",
  273. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  274. .bus_num = 0,
  275. .chip_select = 8 - CONFIG_J19_JUMPER,
  276. .controller_data = &spi_si3xxx_chip_info,
  277. .mode = SPI_MODE_3,
  278. },
  279. #endif
  280. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  281. {
  282. .modalias = "spidev",
  283. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  284. .bus_num = 0,
  285. .chip_select = 1,
  286. .controller_data = &spidev_chip_info,
  287. },
  288. #endif
  289. };
  290. /* SPI (0) */
  291. static struct resource bfin_spi0_resource[] = {
  292. [0] = {
  293. .start = SPI0_REGBASE,
  294. .end = SPI0_REGBASE + 0xFF,
  295. .flags = IORESOURCE_MEM,
  296. },
  297. [1] = {
  298. .start = CH_SPI,
  299. .end = CH_SPI,
  300. .flags = IORESOURCE_IRQ,
  301. }
  302. };
  303. /* SPI controller data */
  304. static struct bfin5xx_spi_master bfin_spi0_info = {
  305. .num_chipselect = 8,
  306. .enable_dma = 1, /* master has the ability to do dma transfer */
  307. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  308. };
  309. static struct platform_device bfin_spi0_device = {
  310. .name = "bfin-spi",
  311. .id = 0, /* Bus number */
  312. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  313. .resource = bfin_spi0_resource,
  314. .dev = {
  315. .platform_data = &bfin_spi0_info, /* Passed to driver */
  316. },
  317. };
  318. #endif /* spi master and devices */
  319. #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
  320. static struct platform_device bfin_fb_device = {
  321. .name = "bf537-fb",
  322. };
  323. #endif
  324. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  325. static struct resource bfin_uart_resources[] = {
  326. {
  327. .start = 0xFFC00400,
  328. .end = 0xFFC004FF,
  329. .flags = IORESOURCE_MEM,
  330. },
  331. };
  332. static struct platform_device bfin_uart_device = {
  333. .name = "bfin-uart",
  334. .id = 1,
  335. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  336. .resource = bfin_uart_resources,
  337. };
  338. #endif
  339. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  340. static struct platform_device bfin_sport0_uart_device = {
  341. .name = "bfin-sport-uart",
  342. .id = 0,
  343. };
  344. static struct platform_device bfin_sport1_uart_device = {
  345. .name = "bfin-sport-uart",
  346. .id = 1,
  347. };
  348. #endif
  349. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  350. #define PATA_INT 55
  351. static struct pata_platform_info bfin_pata_platform_data = {
  352. .ioport_shift = 1,
  353. .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
  354. };
  355. static struct resource bfin_pata_resources[] = {
  356. {
  357. .start = 0x20314020,
  358. .end = 0x2031403F,
  359. .flags = IORESOURCE_MEM,
  360. },
  361. {
  362. .start = 0x2031401C,
  363. .end = 0x2031401F,
  364. .flags = IORESOURCE_MEM,
  365. },
  366. {
  367. .start = PATA_INT,
  368. .end = PATA_INT,
  369. .flags = IORESOURCE_IRQ,
  370. },
  371. };
  372. static struct platform_device bfin_pata_device = {
  373. .name = "pata_platform",
  374. .id = -1,
  375. .num_resources = ARRAY_SIZE(bfin_pata_resources),
  376. .resource = bfin_pata_resources,
  377. .dev = {
  378. .platform_data = &bfin_pata_platform_data,
  379. }
  380. };
  381. #endif
  382. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  383. #include <linux/input.h>
  384. #include <linux/gpio_keys.h>
  385. static struct gpio_keys_button bfin_gpio_keys_table[] = {
  386. {BTN_0, GPIO_PF5, 0, "gpio-keys: BTN0"},
  387. {BTN_1, GPIO_PF6, 0, "gpio-keys: BTN1"},
  388. {BTN_2, GPIO_PF8, 0, "gpio-keys: BTN2"},
  389. };
  390. static struct gpio_keys_platform_data bfin_gpio_keys_data = {
  391. .buttons = bfin_gpio_keys_table,
  392. .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
  393. };
  394. static struct platform_device bfin_device_gpiokeys = {
  395. .name = "gpio-keys",
  396. .dev = {
  397. .platform_data = &bfin_gpio_keys_data,
  398. },
  399. };
  400. #endif
  401. static struct resource bfin_gpios_resources = {
  402. .start = 0,
  403. .end = MAX_BLACKFIN_GPIOS - 1,
  404. .flags = IORESOURCE_IRQ,
  405. };
  406. static struct platform_device bfin_gpios_device = {
  407. .name = "simple-gpio",
  408. .id = -1,
  409. .num_resources = 1,
  410. .resource = &bfin_gpios_resources,
  411. };
  412. #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
  413. #include <linux/i2c-gpio.h>
  414. static struct i2c_gpio_platform_data i2c_gpio_data = {
  415. .sda_pin = 2,
  416. .scl_pin = 3,
  417. .sda_is_open_drain = 0,
  418. .scl_is_open_drain = 0,
  419. .udelay = 40,
  420. };
  421. static struct platform_device i2c_gpio_device = {
  422. .name = "i2c-gpio",
  423. .id = 0,
  424. .dev = {
  425. .platform_data = &i2c_gpio_data,
  426. },
  427. };
  428. #endif
  429. #ifdef CONFIG_I2C_BOARDINFO
  430. static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
  431. #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
  432. {
  433. I2C_BOARD_INFO("ad7142_joystick", 0x2C),
  434. .type = "ad7142_joystick",
  435. .irq = 39,
  436. },
  437. #endif
  438. #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
  439. {
  440. I2C_BOARD_INFO("pcf8574_lcd", 0x22),
  441. .type = "pcf8574_lcd",
  442. },
  443. #endif
  444. #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
  445. {
  446. I2C_BOARD_INFO("pcf8574_keypad", 0x27),
  447. .type = "pcf8574_keypad",
  448. .irq = 39,
  449. },
  450. #endif
  451. };
  452. #endif
  453. static struct platform_device *stamp_devices[] __initdata = {
  454. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  455. &rtc_device,
  456. #endif
  457. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  458. &smc91x_device,
  459. #endif
  460. #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
  461. &bfin_fb_adv7393_device,
  462. #endif
  463. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  464. &net2272_bfin_device,
  465. #endif
  466. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  467. &bfin_spi0_device,
  468. #endif
  469. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  470. &bfin_uart_device,
  471. #endif
  472. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  473. &bfin_sport0_uart_device,
  474. &bfin_sport1_uart_device,
  475. #endif
  476. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  477. &bfin_pata_device,
  478. #endif
  479. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  480. &bfin_device_gpiokeys,
  481. #endif
  482. #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
  483. &i2c_gpio_device,
  484. #endif
  485. &bfin_gpios_device,
  486. #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
  487. &stamp_flash_device,
  488. #endif
  489. };
  490. static int __init stamp_init(void)
  491. {
  492. int ret;
  493. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  494. #ifdef CONFIG_I2C_BOARDINFO
  495. i2c_register_board_info(0, bfin_i2c_board_info,
  496. ARRAY_SIZE(bfin_i2c_board_info));
  497. #endif
  498. ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
  499. if (ret < 0)
  500. return ret;
  501. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  502. /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
  503. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN));
  504. bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN);
  505. SSYNC();
  506. #endif
  507. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  508. spi_register_board_info(bfin_spi_board_info,
  509. ARRAY_SIZE(bfin_spi_board_info));
  510. #endif
  511. #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
  512. irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
  513. #endif
  514. return 0;
  515. }
  516. arch_initcall(stamp_init);
  517. void native_machine_restart(char *cmd)
  518. {
  519. #define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN)
  520. bfin_write_FIO_INEN(~BIT_TO_SET);
  521. bfin_write_FIO_DIR(BIT_TO_SET);
  522. bfin_write_FIO_FLAG_C(BIT_TO_SET);
  523. }