2 * Copyright 2004-2009 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
6 * Licensed under the GPL-2 or later.
9 #include <linux/device.h>
10 #include <linux/delay.h>
11 #include <linux/platform_device.h>
12 #include <linux/mtd/mtd.h>
13 #include <linux/mtd/partitions.h>
14 #include <linux/mtd/physmap.h>
15 #include <linux/spi/spi.h>
16 #include <linux/spi/flash.h>
17 #include <linux/spi/mmc_spi.h>
18 #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
19 #include <linux/usb/isp1362.h>
21 #include <linux/gpio.h>
22 #include <linux/irq.h>
23 #include <linux/i2c.h>
24 #include <linux/gpio/machine.h>
26 #include <asm/bfin5xx_spi.h>
27 #include <asm/reboot.h>
28 #include <asm/portmux.h>
32 * Name the Board for the /proc/cpuinfo
34 const char bfin_board_name[] = "ADI BF533-STAMP";
36 #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
37 static struct platform_device rtc_device = {
44 * Driver needs to know address, irq and flag pin.
46 #if IS_ENABLED(CONFIG_SMC91X)
47 #include <linux/smc91x.h>
49 static struct smc91x_platdata smc91x_info = {
50 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
51 .leda = RPC_LED_100_10,
52 .ledb = RPC_LED_TX_RX,
55 static struct resource smc91x_resources[] = {
57 .name = "smc91x-regs",
59 .end = 0x20300300 + 16,
60 .flags = IORESOURCE_MEM,
64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
68 static struct platform_device smc91x_device = {
71 .num_resources = ARRAY_SIZE(smc91x_resources),
72 .resource = smc91x_resources,
74 .platform_data = &smc91x_info,
79 #if IS_ENABLED(CONFIG_USB_NET2272)
80 static struct resource net2272_bfin_resources[] = {
83 .end = 0x20300000 + 0x100,
84 .flags = IORESOURCE_MEM,
87 .flags = IORESOURCE_BUS,
91 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
95 static struct platform_device net2272_bfin_device = {
98 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
99 .resource = net2272_bfin_resources,
103 #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
104 static struct mtd_partition stamp_partitions[] = {
106 .name = "bootloader(nor)",
110 .name = "linux kernel(nor)",
112 .offset = MTDPART_OFS_APPEND,
114 .name = "file system(nor)",
115 .size = MTDPART_SIZ_FULL,
116 .offset = MTDPART_OFS_APPEND,
120 static struct physmap_flash_data stamp_flash_data = {
122 .parts = stamp_partitions,
123 .nr_parts = ARRAY_SIZE(stamp_partitions),
126 static struct resource stamp_flash_resource[] = {
131 .flags = IORESOURCE_MEM,
133 .start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */
134 .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */
135 .flags = IORESOURCE_MEM,
138 .flags = IORESOURCE_IRQ,
142 static struct platform_device stamp_flash_device = {
143 .name = "bfin-async-flash",
146 .platform_data = &stamp_flash_data,
148 .num_resources = ARRAY_SIZE(stamp_flash_resource),
149 .resource = stamp_flash_resource,
153 #if IS_ENABLED(CONFIG_MTD_M25P80)
154 static struct mtd_partition bfin_spi_flash_partitions[] = {
156 .name = "bootloader(spi)",
159 .mask_flags = MTD_CAP_ROM
161 .name = "linux kernel(spi)",
163 .offset = MTDPART_OFS_APPEND,
165 .name = "file system(spi)",
166 .size = MTDPART_SIZ_FULL,
167 .offset = MTDPART_OFS_APPEND,
171 static struct flash_platform_data bfin_spi_flash_data = {
173 .parts = bfin_spi_flash_partitions,
174 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
178 /* SPI flash chip (m25p64) */
179 static struct bfin5xx_spi_chip spi_flash_chip_info = {
180 .enable_dma = 0, /* use dma transfer with this chip*/
184 #if IS_ENABLED(CONFIG_MMC_SPI)
185 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
186 static int bfin_mmc_spi_init(struct device *dev,
187 irqreturn_t (*detect_int)(int, void *), void *data)
189 return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
190 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
191 "mmc-spi-detect", data);
194 static void bfin_mmc_spi_exit(struct device *dev, void *data)
196 free_irq(MMC_SPI_CARD_DETECT_INT, data);
199 static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
200 .init = bfin_mmc_spi_init,
201 .exit = bfin_mmc_spi_exit,
202 .detect_delay = 100, /* msecs */
205 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
211 static struct spi_board_info bfin_spi_board_info[] __initdata = {
212 #if IS_ENABLED(CONFIG_MTD_M25P80)
214 /* the modalias must be the same as spi device driver name */
215 .modalias = "m25p80", /* Name of spi_driver for this device */
216 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
217 .bus_num = 0, /* Framework bus number */
218 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
219 .platform_data = &bfin_spi_flash_data,
220 .controller_data = &spi_flash_chip_info,
225 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
227 .modalias = "ad1836",
228 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
231 .platform_data = "ad1836", /* only includes chip name for the moment */
236 #if IS_ENABLED(CONFIG_SPI_SPIDEV)
238 .modalias = "spidev",
239 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
244 #if IS_ENABLED(CONFIG_MMC_SPI)
246 .modalias = "mmc_spi",
247 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
250 .platform_data = &bfin_mmc_spi_pdata,
251 .controller_data = &mmc_spi_chip_info,
257 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
259 static struct resource bfin_spi0_resource[] = {
261 .start = SPI0_REGBASE,
262 .end = SPI0_REGBASE + 0xFF,
263 .flags = IORESOURCE_MEM,
268 .flags = IORESOURCE_DMA,
273 .flags = IORESOURCE_IRQ,
277 /* SPI controller data */
278 static struct bfin5xx_spi_master bfin_spi0_info = {
280 .enable_dma = 1, /* master has the ability to do dma transfer */
281 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
284 static struct platform_device bfin_spi0_device = {
286 .id = 0, /* Bus number */
287 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
288 .resource = bfin_spi0_resource,
290 .platform_data = &bfin_spi0_info, /* Passed to driver */
293 #endif /* spi master and devices */
295 #if IS_ENABLED(CONFIG_SERIAL_BFIN)
296 #ifdef CONFIG_SERIAL_BFIN_UART0
297 static struct resource bfin_uart0_resources[] = {
299 .start = BFIN_UART_THR,
300 .end = BFIN_UART_GCTL+2,
301 .flags = IORESOURCE_MEM,
304 .start = IRQ_UART0_TX,
306 .flags = IORESOURCE_IRQ,
309 .start = IRQ_UART0_RX,
311 .flags = IORESOURCE_IRQ,
314 .start = IRQ_UART0_ERROR,
315 .end = IRQ_UART0_ERROR,
316 .flags = IORESOURCE_IRQ,
319 .start = CH_UART0_TX,
321 .flags = IORESOURCE_DMA,
324 .start = CH_UART0_RX,
326 .flags = IORESOURCE_DMA,
330 static unsigned short bfin_uart0_peripherals[] = {
331 P_UART0_TX, P_UART0_RX, 0
334 static struct platform_device bfin_uart0_device = {
337 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
338 .resource = bfin_uart0_resources,
340 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
346 #if IS_ENABLED(CONFIG_BFIN_SIR)
347 #ifdef CONFIG_BFIN_SIR0
348 static struct resource bfin_sir0_resources[] = {
352 .flags = IORESOURCE_MEM,
355 .start = IRQ_UART0_RX,
356 .end = IRQ_UART0_RX+1,
357 .flags = IORESOURCE_IRQ,
360 .start = CH_UART0_RX,
361 .end = CH_UART0_RX+1,
362 .flags = IORESOURCE_DMA,
366 static struct platform_device bfin_sir0_device = {
369 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
370 .resource = bfin_sir0_resources,
375 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
376 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
377 static struct resource bfin_sport0_uart_resources[] = {
379 .start = SPORT0_TCR1,
380 .end = SPORT0_MRCS3+4,
381 .flags = IORESOURCE_MEM,
384 .start = IRQ_SPORT0_RX,
385 .end = IRQ_SPORT0_RX+1,
386 .flags = IORESOURCE_IRQ,
389 .start = IRQ_SPORT0_ERROR,
390 .end = IRQ_SPORT0_ERROR,
391 .flags = IORESOURCE_IRQ,
395 static unsigned short bfin_sport0_peripherals[] = {
396 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
397 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
400 static struct platform_device bfin_sport0_uart_device = {
401 .name = "bfin-sport-uart",
403 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
404 .resource = bfin_sport0_uart_resources,
406 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
410 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
411 static struct resource bfin_sport1_uart_resources[] = {
413 .start = SPORT1_TCR1,
414 .end = SPORT1_MRCS3+4,
415 .flags = IORESOURCE_MEM,
418 .start = IRQ_SPORT1_RX,
419 .end = IRQ_SPORT1_RX+1,
420 .flags = IORESOURCE_IRQ,
423 .start = IRQ_SPORT1_ERROR,
424 .end = IRQ_SPORT1_ERROR,
425 .flags = IORESOURCE_IRQ,
429 static unsigned short bfin_sport1_peripherals[] = {
430 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
431 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
434 static struct platform_device bfin_sport1_uart_device = {
435 .name = "bfin-sport-uart",
437 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
438 .resource = bfin_sport1_uart_resources,
440 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
446 #if IS_ENABLED(CONFIG_BFIN_SPORT)
447 static struct resource bfin_sport0_resources[] = {
449 .start = SPORT0_TCR1,
450 .end = SPORT0_MRCS3+4,
451 .flags = IORESOURCE_MEM,
454 .start = IRQ_SPORT0_TX,
455 .end = IRQ_SPORT0_TX+1,
456 .flags = IORESOURCE_IRQ,
459 .start = IRQ_SPORT0_RX,
460 .end = IRQ_SPORT0_RX+1,
461 .flags = IORESOURCE_IRQ,
464 .start = IRQ_SPORT0_ERROR,
465 .end = IRQ_SPORT0_ERROR,
466 .flags = IORESOURCE_IRQ,
469 .start = CH_SPORT0_TX,
471 .flags = IORESOURCE_DMA,
474 .start = CH_SPORT0_RX,
476 .flags = IORESOURCE_DMA,
479 static struct platform_device bfin_sport0_device = {
480 .name = "bfin_sport_raw",
482 .num_resources = ARRAY_SIZE(bfin_sport0_resources),
483 .resource = bfin_sport0_resources,
485 .platform_data = &bfin_sport0_peripherals,
490 #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
491 #include <linux/input.h>
492 #include <linux/gpio_keys.h>
494 static struct gpio_keys_button bfin_gpio_keys_table[] = {
495 {BTN_0, GPIO_PF5, 0, "gpio-keys: BTN0"},
496 {BTN_1, GPIO_PF6, 0, "gpio-keys: BTN1"},
497 {BTN_2, GPIO_PF8, 0, "gpio-keys: BTN2"},
500 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
501 .buttons = bfin_gpio_keys_table,
502 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
505 static struct platform_device bfin_device_gpiokeys = {
508 .platform_data = &bfin_gpio_keys_data,
513 #if IS_ENABLED(CONFIG_I2C_GPIO)
514 #include <linux/i2c-gpio.h>
516 static struct gpiod_lookup_table bfin_i2c_gpiod_table = {
517 .dev_id = "i2c-gpio",
519 GPIO_LOOKUP_IDX("BFIN-GPIO", GPIO_PF2, NULL, 0,
520 GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
521 GPIO_LOOKUP_IDX("BFIN-GPIO", GPIO_PF3, NULL, 1,
522 GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
526 static struct i2c_gpio_platform_data i2c_gpio_data = {
530 static struct platform_device i2c_gpio_device = {
534 .platform_data = &i2c_gpio_data,
539 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
540 #if IS_ENABLED(CONFIG_JOYSTICK_AD7142)
542 I2C_BOARD_INFO("ad7142_joystick", 0x2C),
546 #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
548 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
551 #if IS_ENABLED(CONFIG_INPUT_PCF8574)
553 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
557 #if IS_ENABLED(CONFIG_FB_BFIN_7393)
559 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
562 #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
564 I2C_BOARD_INFO("ad5252", 0x2f),
569 static const unsigned int cclk_vlev_datasheet[] =
571 VRPAIR(VLEV_085, 250000000),
572 VRPAIR(VLEV_090, 376000000),
573 VRPAIR(VLEV_095, 426000000),
574 VRPAIR(VLEV_100, 426000000),
575 VRPAIR(VLEV_105, 476000000),
576 VRPAIR(VLEV_110, 476000000),
577 VRPAIR(VLEV_115, 476000000),
578 VRPAIR(VLEV_120, 600000000),
579 VRPAIR(VLEV_125, 600000000),
580 VRPAIR(VLEV_130, 600000000),
583 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
584 .tuple_tab = cclk_vlev_datasheet,
585 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
586 .vr_settling_time = 25 /* us */,
589 static struct platform_device bfin_dpmc = {
592 .platform_data = &bfin_dmpc_vreg_data,
596 #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
597 IS_ENABLED(CONFIG_SND_BF5XX_AC97)
599 #include <asm/bfin_sport.h>
601 #define SPORT_REQ(x) \
602 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
603 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
605 static const u16 bfin_snd_pin[][7] = {
610 static struct bfin_snd_platform_data bfin_snd_data[] = {
612 .pin_req = &bfin_snd_pin[0][0],
615 .pin_req = &bfin_snd_pin[1][0],
619 #define BFIN_SND_RES(x) \
622 .start = SPORT##x##_TCR1, \
623 .end = SPORT##x##_TCR1, \
624 .flags = IORESOURCE_MEM \
627 .start = CH_SPORT##x##_RX, \
628 .end = CH_SPORT##x##_RX, \
629 .flags = IORESOURCE_DMA, \
632 .start = CH_SPORT##x##_TX, \
633 .end = CH_SPORT##x##_TX, \
634 .flags = IORESOURCE_DMA, \
637 .start = IRQ_SPORT##x##_ERROR, \
638 .end = IRQ_SPORT##x##_ERROR, \
639 .flags = IORESOURCE_IRQ, \
643 static struct resource bfin_snd_resources[][4] = {
649 #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
650 static struct platform_device bfin_i2s_pcm = {
651 .name = "bfin-i2s-pcm-audio",
656 #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
657 static struct platform_device bfin_ac97_pcm = {
658 .name = "bfin-ac97-pcm-audio",
663 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
664 static const char * const ad1836_link[] = {
668 static struct platform_device bfin_ad1836_machine = {
669 .name = "bfin-snd-ad1836",
672 .platform_data = (void *)ad1836_link,
677 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
678 static const unsigned ad73311_gpio[] = {
682 static struct platform_device bfin_ad73311_machine = {
683 .name = "bfin-snd-ad73311",
686 .platform_data = (void *)ad73311_gpio,
691 #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
692 static struct platform_device bfin_ad73311_codec_device = {
698 #if IS_ENABLED(CONFIG_SND_SOC_AD74111)
699 static struct platform_device bfin_ad74111_codec_device = {
705 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
706 static struct platform_device bfin_i2s = {
708 .id = CONFIG_SND_BF5XX_SPORT_NUM,
710 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
711 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
713 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
718 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
719 static struct platform_device bfin_ac97 = {
721 .id = CONFIG_SND_BF5XX_SPORT_NUM,
723 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
724 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
726 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
731 static struct platform_device *stamp_devices[] __initdata = {
735 #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
739 #if IS_ENABLED(CONFIG_SMC91X)
743 #if IS_ENABLED(CONFIG_USB_NET2272)
744 &net2272_bfin_device,
747 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
751 #if IS_ENABLED(CONFIG_SERIAL_BFIN)
752 #ifdef CONFIG_SERIAL_BFIN_UART0
757 #if IS_ENABLED(CONFIG_BFIN_SIR)
758 #ifdef CONFIG_BFIN_SIR0
763 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
764 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
765 &bfin_sport0_uart_device,
767 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
768 &bfin_sport1_uart_device,
772 #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
773 &bfin_device_gpiokeys,
776 #if IS_ENABLED(CONFIG_I2C_GPIO)
780 #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
784 #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
788 #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
792 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
793 &bfin_ad1836_machine,
796 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
797 &bfin_ad73311_machine,
800 #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
801 &bfin_ad73311_codec_device,
804 #if IS_ENABLED(CONFIG_SND_SOC_AD74111)
805 &bfin_ad74111_codec_device,
808 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
812 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
817 static int __init net2272_init(void)
819 #if IS_ENABLED(CONFIG_USB_NET2272)
822 /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */
823 ret = gpio_request(GPIO_PF0, "net2272");
827 ret = gpio_request(GPIO_PF1, "net2272");
833 ret = gpio_request(GPIO_PF11, "net2272");
840 gpio_direction_output(GPIO_PF0, 0);
841 gpio_direction_output(GPIO_PF1, 1);
843 /* Reset the USB chip */
844 gpio_direction_output(GPIO_PF11, 0);
846 gpio_set_value(GPIO_PF11, 1);
852 static int __init stamp_init(void)
856 printk(KERN_INFO "%s(): registering device resources\n", __func__);
858 #if IS_ENABLED(CONFIG_I2C_GPIO)
859 gpiod_add_lookup_table(&bfin_i2c_gpiod_table);
861 i2c_register_board_info(0, bfin_i2c_board_info,
862 ARRAY_SIZE(bfin_i2c_board_info));
864 ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
868 #if IS_ENABLED(CONFIG_SMC91X)
870 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
871 * the bfin-async-map driver takes care of flipping between
872 * flash and ethernet when necessary.
874 ret = gpio_request(GPIO_PF0, "enet_cpld");
876 gpio_direction_output(GPIO_PF0, 1);
882 pr_warning("unable to configure net2272; it probably won't work\n");
884 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
888 arch_initcall(stamp_init);
890 static struct platform_device *stamp_early_devices[] __initdata = {
891 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
892 #ifdef CONFIG_SERIAL_BFIN_UART0
897 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
898 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
899 &bfin_sport0_uart_device,
901 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
902 &bfin_sport1_uart_device,
907 void __init native_machine_early_platform_add_devices(void)
909 printk(KERN_INFO "register early platform devices\n");
910 early_platform_add_devices(stamp_early_devices,
911 ARRAY_SIZE(stamp_early_devices));
914 void native_machine_restart(char *cmd)
916 /* workaround pull up on cpld / flash pin not being strong enough */
917 gpio_request(GPIO_PF0, "flash_cpld");
918 gpio_direction_output(GPIO_PF0, 0);