stamp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  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/irq.h>
  41. #include <linux/i2c.h>
  42. #include <asm/dma.h>
  43. #include <asm/bfin5xx_spi.h>
  44. #include <asm/reboot.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[] = "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_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
  105. static struct mtd_partition stamp_partitions[] = {
  106. {
  107. .name = "bootloader(nor)",
  108. .size = 0x40000,
  109. .offset = 0,
  110. }, {
  111. .name = "linux kernel(nor)",
  112. .size = 0xE0000,
  113. .offset = MTDPART_OFS_APPEND,
  114. }, {
  115. .name = "file system(nor)",
  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 = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */
  133. .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */
  134. .flags = IORESOURCE_MEM,
  135. }, {
  136. .start = GPIO_PF0,
  137. .flags = IORESOURCE_IRQ,
  138. }
  139. };
  140. static struct platform_device stamp_flash_device = {
  141. .name = "bfin-async-flash",
  142. .id = 0,
  143. .dev = {
  144. .platform_data = &stamp_flash_data,
  145. },
  146. .num_resources = ARRAY_SIZE(stamp_flash_resource),
  147. .resource = stamp_flash_resource,
  148. };
  149. #endif
  150. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  151. static struct mtd_partition bfin_spi_flash_partitions[] = {
  152. {
  153. .name = "bootloader(spi)",
  154. .size = 0x00040000,
  155. .offset = 0,
  156. .mask_flags = MTD_CAP_ROM
  157. }, {
  158. .name = "linux kernel(spi)",
  159. .size = 0xe0000,
  160. .offset = MTDPART_OFS_APPEND,
  161. }, {
  162. .name = "file system(spi)",
  163. .size = MTDPART_SIZ_FULL,
  164. .offset = MTDPART_OFS_APPEND,
  165. }
  166. };
  167. static struct flash_platform_data bfin_spi_flash_data = {
  168. .name = "m25p80",
  169. .parts = bfin_spi_flash_partitions,
  170. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  171. .type = "m25p64",
  172. };
  173. /* SPI flash chip (m25p64) */
  174. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  175. .enable_dma = 0, /* use dma transfer with this chip*/
  176. .bits_per_word = 8,
  177. };
  178. #endif
  179. #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
  180. /* SPI ADC chip */
  181. static struct bfin5xx_spi_chip spi_adc_chip_info = {
  182. .enable_dma = 1, /* use dma transfer with this chip*/
  183. .bits_per_word = 16,
  184. };
  185. #endif
  186. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  187. static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
  188. .enable_dma = 0,
  189. .bits_per_word = 16,
  190. };
  191. #endif
  192. #if defined(CONFIG_PBX)
  193. static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
  194. .ctl_reg = 0x4, /* send zero */
  195. .enable_dma = 0,
  196. .bits_per_word = 8,
  197. .cs_change_per_word = 1,
  198. };
  199. #endif
  200. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  201. static struct bfin5xx_spi_chip spi_mmc_chip_info = {
  202. .enable_dma = 1,
  203. .bits_per_word = 8,
  204. };
  205. #endif
  206. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  207. static struct bfin5xx_spi_chip spidev_chip_info = {
  208. .enable_dma = 0,
  209. .bits_per_word = 8,
  210. };
  211. #endif
  212. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  213. #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
  214. {
  215. /* the modalias must be the same as spi device driver name */
  216. .modalias = "m25p80", /* Name of spi_driver for this device */
  217. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  218. .bus_num = 0, /* Framework bus number */
  219. .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
  220. .platform_data = &bfin_spi_flash_data,
  221. .controller_data = &spi_flash_chip_info,
  222. .mode = SPI_MODE_3,
  223. },
  224. #endif
  225. #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
  226. {
  227. .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
  228. .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
  229. .bus_num = 0, /* Framework bus number */
  230. .chip_select = 1, /* Framework chip select. */
  231. .platform_data = NULL, /* No spi_driver specific config */
  232. .controller_data = &spi_adc_chip_info,
  233. },
  234. #endif
  235. #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  236. {
  237. .modalias = "ad1836-spi",
  238. .max_speed_hz = 31250000, /* max spi clock (SCK) speed in HZ */
  239. .bus_num = 0,
  240. .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
  241. .controller_data = &ad1836_spi_chip_info,
  242. },
  243. #endif
  244. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  245. {
  246. .modalias = "spi_mmc_dummy",
  247. .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
  248. .bus_num = 0,
  249. .chip_select = 0,
  250. .platform_data = NULL,
  251. .controller_data = &spi_mmc_chip_info,
  252. .mode = SPI_MODE_3,
  253. },
  254. {
  255. .modalias = "spi_mmc",
  256. .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
  257. .bus_num = 0,
  258. .chip_select = CONFIG_SPI_MMC_CS_CHAN,
  259. .platform_data = NULL,
  260. .controller_data = &spi_mmc_chip_info,
  261. .mode = SPI_MODE_3,
  262. },
  263. #endif
  264. #if defined(CONFIG_PBX)
  265. {
  266. .modalias = "fxs-spi",
  267. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  268. .bus_num = 0,
  269. .chip_select = 8 - CONFIG_J11_JUMPER,
  270. .controller_data = &spi_si3xxx_chip_info,
  271. .mode = SPI_MODE_3,
  272. },
  273. {
  274. .modalias = "fxo-spi",
  275. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  276. .bus_num = 0,
  277. .chip_select = 8 - CONFIG_J19_JUMPER,
  278. .controller_data = &spi_si3xxx_chip_info,
  279. .mode = SPI_MODE_3,
  280. },
  281. #endif
  282. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  283. {
  284. .modalias = "spidev",
  285. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  286. .bus_num = 0,
  287. .chip_select = 1,
  288. .controller_data = &spidev_chip_info,
  289. },
  290. #endif
  291. };
  292. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  293. /* SPI (0) */
  294. static struct resource bfin_spi0_resource[] = {
  295. [0] = {
  296. .start = SPI0_REGBASE,
  297. .end = SPI0_REGBASE + 0xFF,
  298. .flags = IORESOURCE_MEM,
  299. },
  300. [1] = {
  301. .start = CH_SPI,
  302. .end = CH_SPI,
  303. .flags = IORESOURCE_IRQ,
  304. }
  305. };
  306. /* SPI controller data */
  307. static struct bfin5xx_spi_master bfin_spi0_info = {
  308. .num_chipselect = 8,
  309. .enable_dma = 1, /* master has the ability to do dma transfer */
  310. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  311. };
  312. static struct platform_device bfin_spi0_device = {
  313. .name = "bfin-spi",
  314. .id = 0, /* Bus number */
  315. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  316. .resource = bfin_spi0_resource,
  317. .dev = {
  318. .platform_data = &bfin_spi0_info, /* Passed to driver */
  319. },
  320. };
  321. #endif /* spi master and devices */
  322. #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
  323. static struct platform_device bfin_fb_device = {
  324. .name = "bf537-fb",
  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. };
  335. static struct platform_device bfin_uart_device = {
  336. .name = "bfin-uart",
  337. .id = 1,
  338. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  339. .resource = bfin_uart_resources,
  340. };
  341. #endif
  342. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  343. static struct resource bfin_sir_resources[] = {
  344. #ifdef CONFIG_BFIN_SIR0
  345. {
  346. .start = 0xFFC00400,
  347. .end = 0xFFC004FF,
  348. .flags = IORESOURCE_MEM,
  349. },
  350. #endif
  351. };
  352. static struct platform_device bfin_sir_device = {
  353. .name = "bfin_sir",
  354. .id = 0,
  355. .num_resources = ARRAY_SIZE(bfin_sir_resources),
  356. .resource = bfin_sir_resources,
  357. };
  358. #endif
  359. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  360. static struct platform_device bfin_sport0_uart_device = {
  361. .name = "bfin-sport-uart",
  362. .id = 0,
  363. };
  364. static struct platform_device bfin_sport1_uart_device = {
  365. .name = "bfin-sport-uart",
  366. .id = 1,
  367. };
  368. #endif
  369. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  370. #include <linux/input.h>
  371. #include <linux/gpio_keys.h>
  372. static struct gpio_keys_button bfin_gpio_keys_table[] = {
  373. {BTN_0, GPIO_PF5, 0, "gpio-keys: BTN0"},
  374. {BTN_1, GPIO_PF6, 0, "gpio-keys: BTN1"},
  375. {BTN_2, GPIO_PF8, 0, "gpio-keys: BTN2"},
  376. };
  377. static struct gpio_keys_platform_data bfin_gpio_keys_data = {
  378. .buttons = bfin_gpio_keys_table,
  379. .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
  380. };
  381. static struct platform_device bfin_device_gpiokeys = {
  382. .name = "gpio-keys",
  383. .dev = {
  384. .platform_data = &bfin_gpio_keys_data,
  385. },
  386. };
  387. #endif
  388. static struct resource bfin_gpios_resources = {
  389. .start = 0,
  390. .end = MAX_BLACKFIN_GPIOS - 1,
  391. .flags = IORESOURCE_IRQ,
  392. };
  393. static struct platform_device bfin_gpios_device = {
  394. .name = "simple-gpio",
  395. .id = -1,
  396. .num_resources = 1,
  397. .resource = &bfin_gpios_resources,
  398. };
  399. #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
  400. #include <linux/i2c-gpio.h>
  401. static struct i2c_gpio_platform_data i2c_gpio_data = {
  402. .sda_pin = 2,
  403. .scl_pin = 3,
  404. .sda_is_open_drain = 0,
  405. .scl_is_open_drain = 0,
  406. .udelay = 40,
  407. };
  408. static struct platform_device i2c_gpio_device = {
  409. .name = "i2c-gpio",
  410. .id = 0,
  411. .dev = {
  412. .platform_data = &i2c_gpio_data,
  413. },
  414. };
  415. #endif
  416. #ifdef CONFIG_I2C_BOARDINFO
  417. static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
  418. #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
  419. {
  420. I2C_BOARD_INFO("ad7142_joystick", 0x2C),
  421. .irq = 39,
  422. },
  423. #endif
  424. #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
  425. {
  426. I2C_BOARD_INFO("pcf8574_lcd", 0x22),
  427. },
  428. #endif
  429. #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
  430. {
  431. I2C_BOARD_INFO("pcf8574_keypad", 0x27),
  432. .irq = 39,
  433. },
  434. #endif
  435. };
  436. #endif
  437. static const unsigned int cclk_vlev_datasheet[] =
  438. {
  439. VRPAIR(VLEV_085, 250000000),
  440. VRPAIR(VLEV_090, 376000000),
  441. VRPAIR(VLEV_095, 426000000),
  442. VRPAIR(VLEV_100, 426000000),
  443. VRPAIR(VLEV_105, 476000000),
  444. VRPAIR(VLEV_110, 476000000),
  445. VRPAIR(VLEV_115, 476000000),
  446. VRPAIR(VLEV_120, 600000000),
  447. VRPAIR(VLEV_125, 600000000),
  448. VRPAIR(VLEV_130, 600000000),
  449. };
  450. static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
  451. .tuple_tab = cclk_vlev_datasheet,
  452. .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
  453. .vr_settling_time = 25 /* us */,
  454. };
  455. static struct platform_device bfin_dpmc = {
  456. .name = "bfin dpmc",
  457. .dev = {
  458. .platform_data = &bfin_dmpc_vreg_data,
  459. },
  460. };
  461. static struct platform_device *stamp_devices[] __initdata = {
  462. &bfin_dpmc,
  463. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  464. &rtc_device,
  465. #endif
  466. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  467. &smc91x_device,
  468. #endif
  469. #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
  470. &bfin_fb_adv7393_device,
  471. #endif
  472. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  473. &net2272_bfin_device,
  474. #endif
  475. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  476. &bfin_spi0_device,
  477. #endif
  478. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  479. &bfin_uart_device,
  480. #endif
  481. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  482. &bfin_sir_device,
  483. #endif
  484. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  485. &bfin_sport0_uart_device,
  486. &bfin_sport1_uart_device,
  487. #endif
  488. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  489. &bfin_device_gpiokeys,
  490. #endif
  491. #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
  492. &i2c_gpio_device,
  493. #endif
  494. &bfin_gpios_device,
  495. #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
  496. &stamp_flash_device,
  497. #endif
  498. };
  499. static int __init stamp_init(void)
  500. {
  501. int ret;
  502. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  503. #ifdef CONFIG_I2C_BOARDINFO
  504. i2c_register_board_info(0, bfin_i2c_board_info,
  505. ARRAY_SIZE(bfin_i2c_board_info));
  506. #endif
  507. ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
  508. if (ret < 0)
  509. return ret;
  510. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  511. /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
  512. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
  513. bfin_write_FIO_FLAG_S(PF0);
  514. SSYNC();
  515. #endif
  516. spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
  517. return 0;
  518. }
  519. arch_initcall(stamp_init);
  520. void native_machine_restart(char *cmd)
  521. {
  522. /* workaround pull up on cpld / flash pin not being strong enough */
  523. bfin_write_FIO_INEN(~PF0);
  524. bfin_write_FIO_DIR(PF0);
  525. bfin_write_FIO_FLAG_C(PF0);
  526. }