Blackfin arch: make ADI board names consistent
[linux-2.6/mini2440.git] / arch / blackfin / mach-bf537 / boards / generic_board.c
blobe9a49711434767cdc90a24b977761db4589a0572
1 /*
2 * File: arch/blackfin/mach-bf537/boards/generic_board.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
6 * Created:
7 * Description:
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2008 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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.
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.
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
31 #include <linux/device.h>
32 #include <linux/etherdevice.h>
33 #include <linux/platform_device.h>
34 #include <linux/mtd/mtd.h>
35 #include <linux/mtd/partitions.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/irq.h>
42 #include <linux/interrupt.h>
43 #include <linux/usb/sl811.h>
44 #include <asm/dma.h>
45 #include <asm/bfin5xx_spi.h>
46 #include <asm/reboot.h>
47 #include <asm/portmux.h>
48 #include <linux/spi/ad7877.h>
51 * Name the Board for the /proc/cpuinfo
53 const char bfin_board_name[] = "UNKNOWN BOARD";
56 * Driver needs to know address, irq and flag pin.
59 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
60 #include <linux/usb/isp1760.h>
61 static struct resource bfin_isp1760_resources[] = {
62 [0] = {
63 .start = 0x203C0000,
64 .end = 0x203C0000 + 0x000fffff,
65 .flags = IORESOURCE_MEM,
67 [1] = {
68 .start = IRQ_PF7,
69 .end = IRQ_PF7,
70 .flags = IORESOURCE_IRQ,
74 static struct isp1760_platform_data isp1760_priv = {
75 .is_isp1761 = 0,
76 .port1_disable = 0,
77 .bus_width_16 = 1,
78 .port1_otg = 0,
79 .analog_oc = 0,
80 .dack_polarity_high = 0,
81 .dreq_polarity_high = 0,
84 static struct platform_device bfin_isp1760_device = {
85 .name = "isp1760-hcd",
86 .id = 0,
87 .dev = {
88 .platform_data = &isp1760_priv,
90 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
91 .resource = bfin_isp1760_resources,
93 #endif
95 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
96 static struct resource bfin_pcmcia_cf_resources[] = {
98 .start = 0x20310000, /* IO PORT */
99 .end = 0x20312000,
100 .flags = IORESOURCE_MEM,
101 }, {
102 .start = 0x20311000, /* Attribute Memory */
103 .end = 0x20311FFF,
104 .flags = IORESOURCE_MEM,
105 }, {
106 .start = IRQ_PF4,
107 .end = IRQ_PF4,
108 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
109 }, {
110 .start = 6, /* Card Detect PF6 */
111 .end = 6,
112 .flags = IORESOURCE_IRQ,
116 static struct platform_device bfin_pcmcia_cf_device = {
117 .name = "bfin_cf_pcmcia",
118 .id = -1,
119 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
120 .resource = bfin_pcmcia_cf_resources,
122 #endif
124 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
125 static struct platform_device rtc_device = {
126 .name = "rtc-bfin",
127 .id = -1,
129 #endif
131 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
132 static struct resource smc91x_resources[] = {
134 .name = "smc91x-regs",
135 .start = 0x20300300,
136 .end = 0x20300300 + 16,
137 .flags = IORESOURCE_MEM,
138 }, {
140 .start = IRQ_PF7,
141 .end = IRQ_PF7,
142 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
145 static struct platform_device smc91x_device = {
146 .name = "smc91x",
147 .id = 0,
148 .num_resources = ARRAY_SIZE(smc91x_resources),
149 .resource = smc91x_resources,
151 #endif
153 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
154 static struct resource dm9000_resources[] = {
155 [0] = {
156 .start = 0x203FB800,
157 .end = 0x203FB800 + 1,
158 .flags = IORESOURCE_MEM,
160 [1] = {
161 .start = 0x203FB800 + 4,
162 .end = 0x203FB800 + 5,
163 .flags = IORESOURCE_MEM,
165 [2] = {
166 .start = IRQ_PF9,
167 .end = IRQ_PF9,
168 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
172 static struct platform_device dm9000_device = {
173 .name = "dm9000",
174 .id = -1,
175 .num_resources = ARRAY_SIZE(dm9000_resources),
176 .resource = dm9000_resources,
178 #endif
180 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
181 static struct resource sl811_hcd_resources[] = {
183 .start = 0x20340000,
184 .end = 0x20340000,
185 .flags = IORESOURCE_MEM,
186 }, {
187 .start = 0x20340004,
188 .end = 0x20340004,
189 .flags = IORESOURCE_MEM,
190 }, {
191 .start = CONFIG_USB_SL811_BFIN_IRQ,
192 .end = CONFIG_USB_SL811_BFIN_IRQ,
193 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
197 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
198 void sl811_port_power(struct device *dev, int is_on)
200 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
201 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
204 #endif
206 static struct sl811_platform_data sl811_priv = {
207 .potpg = 10,
208 .power = 250, /* == 500mA */
209 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
210 .port_power = &sl811_port_power,
211 #endif
214 static struct platform_device sl811_hcd_device = {
215 .name = "sl811-hcd",
216 .id = 0,
217 .dev = {
218 .platform_data = &sl811_priv,
220 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
221 .resource = sl811_hcd_resources,
223 #endif
225 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
226 static struct resource isp1362_hcd_resources[] = {
228 .start = 0x20360000,
229 .end = 0x20360000,
230 .flags = IORESOURCE_MEM,
231 }, {
232 .start = 0x20360004,
233 .end = 0x20360004,
234 .flags = IORESOURCE_MEM,
235 }, {
236 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
237 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
238 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
242 static struct isp1362_platform_data isp1362_priv = {
243 .sel15Kres = 1,
244 .clknotstop = 0,
245 .oc_enable = 0,
246 .int_act_high = 0,
247 .int_edge_triggered = 0,
248 .remote_wakeup_connected = 0,
249 .no_power_switching = 1,
250 .power_switching_mode = 0,
253 static struct platform_device isp1362_hcd_device = {
254 .name = "isp1362-hcd",
255 .id = 0,
256 .dev = {
257 .platform_data = &isp1362_priv,
259 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
260 .resource = isp1362_hcd_resources,
262 #endif
264 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
265 static struct platform_device bfin_mac_device = {
266 .name = "bfin_mac",
268 #endif
270 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
271 static struct resource net2272_bfin_resources[] = {
273 .start = 0x20300000,
274 .end = 0x20300000 + 0x100,
275 .flags = IORESOURCE_MEM,
276 }, {
277 .start = IRQ_PF7,
278 .end = IRQ_PF7,
279 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
283 static struct platform_device net2272_bfin_device = {
284 .name = "net2272",
285 .id = -1,
286 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
287 .resource = net2272_bfin_resources,
289 #endif
291 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
292 /* all SPI peripherals info goes here */
294 #if defined(CONFIG_MTD_M25P80) \
295 || defined(CONFIG_MTD_M25P80_MODULE)
296 static struct mtd_partition bfin_spi_flash_partitions[] = {
298 .name = "bootloader(spi)",
299 .size = 0x00020000,
300 .offset = 0,
301 .mask_flags = MTD_CAP_ROM
302 }, {
303 .name = "linux kernel(spi)",
304 .size = 0xe0000,
305 .offset = 0x20000
306 }, {
307 .name = "file system(spi)",
308 .size = 0x700000,
309 .offset = 0x00100000,
313 static struct flash_platform_data bfin_spi_flash_data = {
314 .name = "m25p80",
315 .parts = bfin_spi_flash_partitions,
316 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
317 .type = "m25p64",
320 /* SPI flash chip (m25p64) */
321 static struct bfin5xx_spi_chip spi_flash_chip_info = {
322 .enable_dma = 0, /* use dma transfer with this chip*/
323 .bits_per_word = 8,
325 #endif
327 #if defined(CONFIG_SPI_ADC_BF533) \
328 || defined(CONFIG_SPI_ADC_BF533_MODULE)
329 /* SPI ADC chip */
330 static struct bfin5xx_spi_chip spi_adc_chip_info = {
331 .enable_dma = 1, /* use dma transfer with this chip*/
332 .bits_per_word = 16,
334 #endif
336 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
337 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
338 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
339 .enable_dma = 0,
340 .bits_per_word = 16,
342 #endif
344 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
345 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
346 .enable_dma = 0,
347 .bits_per_word = 16,
349 #endif
351 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
352 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
353 .enable_dma = 1,
354 .bits_per_word = 8,
356 #endif
358 #if defined(CONFIG_PBX)
359 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
360 .ctl_reg = 0x4, /* send zero */
361 .enable_dma = 0,
362 .bits_per_word = 8,
363 .cs_change_per_word = 1,
365 #endif
367 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
368 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
369 .enable_dma = 0,
370 .bits_per_word = 16,
373 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
374 .model = 7877,
375 .vref_delay_usecs = 50, /* internal, no capacitor */
376 .x_plate_ohms = 419,
377 .y_plate_ohms = 486,
378 .pressure_max = 1000,
379 .pressure_min = 0,
380 .stopacq_polarity = 1,
381 .first_conversion_delay = 3,
382 .acquisition_time = 1,
383 .averaging = 1,
384 .pen_down_acc_interval = 1,
386 #endif
388 static struct spi_board_info bfin_spi_board_info[] __initdata = {
389 #if defined(CONFIG_MTD_M25P80) \
390 || defined(CONFIG_MTD_M25P80_MODULE)
392 /* the modalias must be the same as spi device driver name */
393 .modalias = "m25p80", /* Name of spi_driver for this device */
394 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
395 .bus_num = 0, /* Framework bus number */
396 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
397 .platform_data = &bfin_spi_flash_data,
398 .controller_data = &spi_flash_chip_info,
399 .mode = SPI_MODE_3,
401 #endif
403 #if defined(CONFIG_SPI_ADC_BF533) \
404 || defined(CONFIG_SPI_ADC_BF533_MODULE)
406 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
407 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
408 .bus_num = 0, /* Framework bus number */
409 .chip_select = 1, /* Framework chip select. */
410 .platform_data = NULL, /* No spi_driver specific config */
411 .controller_data = &spi_adc_chip_info,
413 #endif
415 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
416 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
418 .modalias = "ad1836-spi",
419 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
420 .bus_num = 0,
421 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
422 .controller_data = &ad1836_spi_chip_info,
424 #endif
425 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
427 .modalias = "ad9960-spi",
428 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
429 .bus_num = 0,
430 .chip_select = 1,
431 .controller_data = &ad9960_spi_chip_info,
433 #endif
434 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
436 .modalias = "spi_mmc_dummy",
437 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
438 .bus_num = 0,
439 .chip_select = 0,
440 .platform_data = NULL,
441 .controller_data = &spi_mmc_chip_info,
442 .mode = SPI_MODE_3,
445 .modalias = "spi_mmc",
446 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
447 .bus_num = 0,
448 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
449 .platform_data = NULL,
450 .controller_data = &spi_mmc_chip_info,
451 .mode = SPI_MODE_3,
453 #endif
454 #if defined(CONFIG_PBX)
456 .modalias = "fxs-spi",
457 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
458 .bus_num = 0,
459 .chip_select = 8 - CONFIG_J11_JUMPER,
460 .controller_data = &spi_si3xxx_chip_info,
461 .mode = SPI_MODE_3,
464 .modalias = "fxo-spi",
465 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
466 .bus_num = 0,
467 .chip_select = 8 - CONFIG_J19_JUMPER,
468 .controller_data = &spi_si3xxx_chip_info,
469 .mode = SPI_MODE_3,
471 #endif
472 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
474 .modalias = "ad7877",
475 .platform_data = &bfin_ad7877_ts_info,
476 .irq = IRQ_PF6,
477 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
478 .bus_num = 0,
479 .chip_select = 1,
480 .controller_data = &spi_ad7877_chip_info,
482 #endif
485 /* SPI controller data */
486 static struct bfin5xx_spi_master bfin_spi0_info = {
487 .num_chipselect = 8,
488 .enable_dma = 1, /* master has the ability to do dma transfer */
489 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
492 /* SPI (0) */
493 static struct resource bfin_spi0_resource[] = {
494 [0] = {
495 .start = SPI0_REGBASE,
496 .end = SPI0_REGBASE + 0xFF,
497 .flags = IORESOURCE_MEM,
499 [1] = {
500 .start = CH_SPI,
501 .end = CH_SPI,
502 .flags = IORESOURCE_IRQ,
506 static struct platform_device bfin_spi0_device = {
507 .name = "bfin-spi",
508 .id = 0, /* Bus number */
509 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
510 .resource = bfin_spi0_resource,
511 .dev = {
512 .platform_data = &bfin_spi0_info, /* Passed to driver */
515 #endif /* spi master and devices */
517 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
518 static struct platform_device bfin_fb_device = {
519 .name = "bf537-lq035",
521 #endif
523 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
524 static struct platform_device bfin_fb_adv7393_device = {
525 .name = "bfin-adv7393",
527 #endif
529 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
530 static struct resource bfin_uart_resources[] = {
532 .start = 0xFFC00400,
533 .end = 0xFFC004FF,
534 .flags = IORESOURCE_MEM,
535 }, {
536 .start = 0xFFC02000,
537 .end = 0xFFC020FF,
538 .flags = IORESOURCE_MEM,
542 static struct platform_device bfin_uart_device = {
543 .name = "bfin-uart",
544 .id = 1,
545 .num_resources = ARRAY_SIZE(bfin_uart_resources),
546 .resource = bfin_uart_resources,
548 #endif
550 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
551 static struct resource bfin_sir_resources[] = {
552 #ifdef CONFIG_BFIN_SIR0
554 .start = 0xFFC00400,
555 .end = 0xFFC004FF,
556 .flags = IORESOURCE_MEM,
558 #endif
559 #ifdef CONFIG_BFIN_SIR1
561 .start = 0xFFC02000,
562 .end = 0xFFC020FF,
563 .flags = IORESOURCE_MEM,
565 #endif
568 static struct platform_device bfin_sir_device = {
569 .name = "bfin_sir",
570 .id = 0,
571 .num_resources = ARRAY_SIZE(bfin_sir_resources),
572 .resource = bfin_sir_resources,
574 #endif
576 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
577 static struct resource bfin_twi0_resource[] = {
578 [0] = {
579 .start = TWI0_REGBASE,
580 .end = TWI0_REGBASE + 0xFF,
581 .flags = IORESOURCE_MEM,
583 [1] = {
584 .start = IRQ_TWI,
585 .end = IRQ_TWI,
586 .flags = IORESOURCE_IRQ,
590 static struct platform_device i2c_bfin_twi_device = {
591 .name = "i2c-bfin-twi",
592 .id = 0,
593 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
594 .resource = bfin_twi0_resource,
596 #endif
598 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
599 static struct platform_device bfin_sport0_uart_device = {
600 .name = "bfin-sport-uart",
601 .id = 0,
604 static struct platform_device bfin_sport1_uart_device = {
605 .name = "bfin-sport-uart",
606 .id = 1,
608 #endif
610 static struct platform_device *stamp_devices[] __initdata = {
611 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
612 &bfin_pcmcia_cf_device,
613 #endif
615 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
616 &rtc_device,
617 #endif
619 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
620 &sl811_hcd_device,
621 #endif
623 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
624 &isp1362_hcd_device,
625 #endif
627 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
628 &smc91x_device,
629 #endif
631 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
632 &dm9000_device,
633 #endif
635 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
636 &bfin_mac_device,
637 #endif
639 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
640 &net2272_bfin_device,
641 #endif
643 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
644 &bfin_isp1760_device,
645 #endif
647 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
648 &bfin_spi0_device,
649 #endif
651 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
652 &bfin_fb_device,
653 #endif
655 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
656 &bfin_fb_adv7393_device,
657 #endif
659 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
660 &bfin_uart_device,
661 #endif
663 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
664 &bfin_sir_device,
665 #endif
667 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
668 &i2c_bfin_twi_device,
669 #endif
671 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
672 &bfin_sport0_uart_device,
673 &bfin_sport1_uart_device,
674 #endif
677 static int __init stamp_init(void)
679 printk(KERN_INFO "%s(): registering device resources\n", __func__);
680 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
681 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
682 spi_register_board_info(bfin_spi_board_info,
683 ARRAY_SIZE(bfin_spi_board_info));
684 #endif
686 return 0;
689 arch_initcall(stamp_init);
691 void native_machine_restart(char *cmd)
693 /* workaround reboot hang when booting from SPI */
694 if ((bfin_read_SYSCR() & 0x7) == 0x3)
695 bfin_gpio_reset_spi0_ssel1();
698 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
699 void bfin_get_ether_addr(char *addr)
701 random_ether_addr(addr);
702 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
704 EXPORT_SYMBOL(bfin_get_ether_addr);
705 #endif