blob: 51c3bab14a69facc7336835375699d55e6eedc20 [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001/*
2 * File: arch/blackfin/mach-bf537/boards/stamp.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
Michael Hennericha628a8b2008-01-22 17:29:16 +080011 * Copyright 2004-2008 Analog Devices Inc.
Bryan Wu1394f032007-05-06 14:50:22 -070012 *
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
31#include <linux/device.h>
Mike Frysinger43f73fe2007-12-24 19:35:35 +080032#include <linux/etherdevice.h>
Bryan Wu1394f032007-05-06 14:50:22 -070033#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)
Mike Frysingerf02bcec2007-11-15 21:29:15 +080039#include <linux/usb/isp1362.h>
Bryan Wu1394f032007-05-06 14:50:22 -070040#endif
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080041#include <linux/irq.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080042#include <asm/dma.h>
Bryan Wu1394f032007-05-06 14:50:22 -070043#include <asm/bfin5xx_spi.h>
Bryan Wu5d448dd2007-11-12 23:24:42 +080044#include <asm/portmux.h>
David Brownell27f5d752007-10-04 18:06:16 -070045#include <linux/usb/sl811.h>
Bryan Wu1394f032007-05-06 14:50:22 -070046
47#include <linux/spi/ad7877.h>
48
49/*
50 * Name the Board for the /proc/cpuinfo
51 */
Mike Frysinger066954a2007-10-21 22:36:06 +080052const char bfin_board_name[] = "PNAV-1.0";
Bryan Wu1394f032007-05-06 14:50:22 -070053
54/*
55 * Driver needs to know address, irq and flag pin.
56 */
57
58#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
59static struct resource bfin_pcmcia_cf_resources[] = {
60 {
61 .start = 0x20310000, /* IO PORT */
62 .end = 0x20312000,
63 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080064 }, {
Simon Arlottd2d50aa2007-06-11 15:31:30 +080065 .start = 0x20311000, /* Attribute Memory */
Bryan Wu1394f032007-05-06 14:50:22 -070066 .end = 0x20311FFF,
67 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080068 }, {
Bryan Wu1394f032007-05-06 14:50:22 -070069 .start = IRQ_PF4,
70 .end = IRQ_PF4,
71 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080072 }, {
Bryan Wu1394f032007-05-06 14:50:22 -070073 .start = 6, /* Card Detect PF6 */
74 .end = 6,
75 .flags = IORESOURCE_IRQ,
76 },
77};
78
79static struct platform_device bfin_pcmcia_cf_device = {
80 .name = "bfin_cf_pcmcia",
81 .id = -1,
82 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
83 .resource = bfin_pcmcia_cf_resources,
84};
85#endif
86
87#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
88static struct platform_device rtc_device = {
89 .name = "rtc-bfin",
90 .id = -1,
91};
92#endif
93
94#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
95static struct resource smc91x_resources[] = {
96 {
97 .name = "smc91x-regs",
98 .start = 0x20300300,
99 .end = 0x20300300 + 16,
100 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800101 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700102
103 .start = IRQ_PF7,
104 .end = IRQ_PF7,
105 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
106 },
107};
108static struct platform_device smc91x_device = {
109 .name = "smc91x",
110 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources,
113};
114#endif
115
116#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
117static struct resource sl811_hcd_resources[] = {
118 {
119 .start = 0x20340000,
120 .end = 0x20340000,
121 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800122 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700123 .start = 0x20340004,
124 .end = 0x20340004,
125 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800126 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700127 .start = CONFIG_USB_SL811_BFIN_IRQ,
128 .end = CONFIG_USB_SL811_BFIN_IRQ,
129 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
130 },
131};
132
133#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
134void sl811_port_power(struct device *dev, int is_on)
135{
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800136 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
Michael Hennerichacbcd262008-01-22 18:36:20 +0800137 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
Bryan Wu1394f032007-05-06 14:50:22 -0700138
Bryan Wu1394f032007-05-06 14:50:22 -0700139}
140#endif
141
142static struct sl811_platform_data sl811_priv = {
143 .potpg = 10,
144 .power = 250, /* == 500mA */
145#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
146 .port_power = &sl811_port_power,
147#endif
148};
149
150static struct platform_device sl811_hcd_device = {
151 .name = "sl811-hcd",
152 .id = 0,
153 .dev = {
154 .platform_data = &sl811_priv,
155 },
156 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
157 .resource = sl811_hcd_resources,
158};
159#endif
160
161#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
162static struct resource isp1362_hcd_resources[] = {
163 {
164 .start = 0x20360000,
165 .end = 0x20360000,
166 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800167 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700168 .start = 0x20360004,
169 .end = 0x20360004,
170 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800171 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700172 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
173 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
174 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
175 },
176};
177
178static struct isp1362_platform_data isp1362_priv = {
179 .sel15Kres = 1,
180 .clknotstop = 0,
181 .oc_enable = 0,
182 .int_act_high = 0,
183 .int_edge_triggered = 0,
184 .remote_wakeup_connected = 0,
185 .no_power_switching = 1,
186 .power_switching_mode = 0,
187};
188
189static struct platform_device isp1362_hcd_device = {
190 .name = "isp1362-hcd",
191 .id = 0,
192 .dev = {
193 .platform_data = &isp1362_priv,
194 },
195 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
196 .resource = isp1362_hcd_resources,
197};
198#endif
199
200#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
201static struct platform_device bfin_mac_device = {
202 .name = "bfin_mac",
203};
204#endif
205
206#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
207static struct resource net2272_bfin_resources[] = {
208 {
209 .start = 0x20300000,
210 .end = 0x20300000 + 0x100,
211 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800212 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700213 .start = IRQ_PF7,
214 .end = IRQ_PF7,
215 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
216 },
217};
218
219static struct platform_device net2272_bfin_device = {
220 .name = "net2272",
221 .id = -1,
222 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
223 .resource = net2272_bfin_resources,
224};
225#endif
226
227#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
228/* all SPI peripherals info goes here */
229
230#if defined(CONFIG_MTD_M25P80) \
231 || defined(CONFIG_MTD_M25P80_MODULE)
232static struct mtd_partition bfin_spi_flash_partitions[] = {
233 {
234 .name = "bootloader",
235 .size = 0x00020000,
236 .offset = 0,
237 .mask_flags = MTD_CAP_ROM
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800238 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700239 .name = "kernel",
240 .size = 0xe0000,
241 .offset = 0x20000
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800242 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700243 .name = "file system",
244 .size = 0x700000,
245 .offset = 0x00100000,
246 }
247};
248
249static struct flash_platform_data bfin_spi_flash_data = {
250 .name = "m25p80",
251 .parts = bfin_spi_flash_partitions,
252 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
253 .type = "m25p64",
254};
255
256/* SPI flash chip (m25p64) */
257static struct bfin5xx_spi_chip spi_flash_chip_info = {
258 .enable_dma = 0, /* use dma transfer with this chip*/
259 .bits_per_word = 8,
260};
261#endif
262
263#if defined(CONFIG_SPI_ADC_BF533) \
264 || defined(CONFIG_SPI_ADC_BF533_MODULE)
265/* SPI ADC chip */
266static struct bfin5xx_spi_chip spi_adc_chip_info = {
267 .enable_dma = 1, /* use dma transfer with this chip*/
268 .bits_per_word = 16,
269};
270#endif
271
272#if defined(CONFIG_SND_BLACKFIN_AD1836) \
273 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
274static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
275 .enable_dma = 0,
276 .bits_per_word = 16,
277};
278#endif
279
280#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
281static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
282 .enable_dma = 0,
283 .bits_per_word = 16,
284};
285#endif
286
287#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
288static struct bfin5xx_spi_chip spi_mmc_chip_info = {
289 .enable_dma = 1,
290 .bits_per_word = 8,
291};
292#endif
293
Bryan Wu1394f032007-05-06 14:50:22 -0700294#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
295static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
Michael Hennerichc7d48962007-11-15 21:33:31 +0800296 .cs_change_per_word = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700297 .enable_dma = 0,
298 .bits_per_word = 16,
299};
300
301static const struct ad7877_platform_data bfin_ad7877_ts_info = {
302 .model = 7877,
303 .vref_delay_usecs = 50, /* internal, no capacitor */
304 .x_plate_ohms = 419,
305 .y_plate_ohms = 486,
306 .pressure_max = 1000,
307 .pressure_min = 0,
308 .stopacq_polarity = 1,
309 .first_conversion_delay = 3,
310 .acquisition_time = 1,
311 .averaging = 1,
312 .pen_down_acc_interval = 1,
313};
314#endif
315
316static struct spi_board_info bfin_spi_board_info[] __initdata = {
317#if defined(CONFIG_MTD_M25P80) \
318 || defined(CONFIG_MTD_M25P80_MODULE)
319 {
320 /* the modalias must be the same as spi device driver name */
321 .modalias = "m25p80", /* Name of spi_driver for this device */
322 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800323 .bus_num = 0, /* Framework bus number */
Bryan Wu1394f032007-05-06 14:50:22 -0700324 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
325 .platform_data = &bfin_spi_flash_data,
326 .controller_data = &spi_flash_chip_info,
327 .mode = SPI_MODE_3,
328 },
329#endif
330
331#if defined(CONFIG_SPI_ADC_BF533) \
332 || defined(CONFIG_SPI_ADC_BF533_MODULE)
333 {
334 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
335 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800336 .bus_num = 0, /* Framework bus number */
Bryan Wu1394f032007-05-06 14:50:22 -0700337 .chip_select = 1, /* Framework chip select. */
338 .platform_data = NULL, /* No spi_driver specific config */
339 .controller_data = &spi_adc_chip_info,
340 },
341#endif
342
343#if defined(CONFIG_SND_BLACKFIN_AD1836) \
344 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
345 {
346 .modalias = "ad1836-spi",
347 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800348 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700349 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
350 .controller_data = &ad1836_spi_chip_info,
351 },
352#endif
353#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
354 {
355 .modalias = "ad9960-spi",
356 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800357 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700358 .chip_select = 1,
359 .controller_data = &ad9960_spi_chip_info,
360 },
361#endif
362#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
363 {
364 .modalias = "spi_mmc_dummy",
365 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800366 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700367 .chip_select = 7,
368 .platform_data = NULL,
369 .controller_data = &spi_mmc_chip_info,
370 .mode = SPI_MODE_3,
371 },
372 {
373 .modalias = "spi_mmc",
374 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800375 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700376 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
377 .platform_data = NULL,
378 .controller_data = &spi_mmc_chip_info,
379 .mode = SPI_MODE_3,
380 },
381#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700382#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
383{
384 .modalias = "ad7877",
385 .platform_data = &bfin_ad7877_ts_info,
386 .irq = IRQ_PF2,
387 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
Michael Hennerichc7d48962007-11-15 21:33:31 +0800388 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700389 .chip_select = 5,
390 .controller_data = &spi_ad7877_chip_info,
391},
392#endif
393
394};
395
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800396/* SPI (0) */
397static struct resource bfin_spi0_resource[] = {
398 [0] = {
399 .start = SPI0_REGBASE,
400 .end = SPI0_REGBASE + 0xFF,
401 .flags = IORESOURCE_MEM,
402 },
403 [1] = {
404 .start = CH_SPI,
405 .end = CH_SPI,
406 .flags = IORESOURCE_IRQ,
407 }
408};
409
Bryan Wu1394f032007-05-06 14:50:22 -0700410/* SPI controller data */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800411static struct bfin5xx_spi_master bfin_spi0_info = {
Bryan Wu1394f032007-05-06 14:50:22 -0700412 .num_chipselect = 8,
413 .enable_dma = 1, /* master has the ability to do dma transfer */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800414 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
Bryan Wu1394f032007-05-06 14:50:22 -0700415};
416
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800417static struct platform_device bfin_spi0_device = {
418 .name = "bfin-spi",
419 .id = 0, /* Bus number */
420 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
421 .resource = bfin_spi0_resource,
Bryan Wu1394f032007-05-06 14:50:22 -0700422 .dev = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800423 .platform_data = &bfin_spi0_info, /* Passed to driver */
Bryan Wu1394f032007-05-06 14:50:22 -0700424 },
425};
426#endif /* spi master and devices */
427
428#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
429static struct platform_device bfin_fb_device = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800430 .name = "bf537-lq035",
Bryan Wu1394f032007-05-06 14:50:22 -0700431};
432#endif
433
434#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
435static struct resource bfin_uart_resources[] = {
436 {
437 .start = 0xFFC00400,
438 .end = 0xFFC004FF,
439 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800440 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700441 .start = 0xFFC02000,
442 .end = 0xFFC020FF,
443 .flags = IORESOURCE_MEM,
444 },
445};
446
447static struct platform_device bfin_uart_device = {
448 .name = "bfin-uart",
449 .id = 1,
450 .num_resources = ARRAY_SIZE(bfin_uart_resources),
451 .resource = bfin_uart_resources,
452};
453#endif
454
Graf Yang5be36d22008-04-25 03:09:15 +0800455#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
456static struct resource bfin_sir_resources[] = {
457#ifdef CONFIG_BFIN_SIR0
458 {
459 .start = 0xFFC00400,
460 .end = 0xFFC004FF,
461 .flags = IORESOURCE_MEM,
462 },
463#endif
464#ifdef CONFIG_BFIN_SIR1
465 {
466 .start = 0xFFC02000,
467 .end = 0xFFC020FF,
468 .flags = IORESOURCE_MEM,
469 },
470#endif
471};
472
473static struct platform_device bfin_sir_device = {
474 .name = "bfin_sir",
475 .id = 0,
476 .num_resources = ARRAY_SIZE(bfin_sir_resources),
477 .resource = bfin_sir_resources,
478};
479#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700480
481static struct platform_device *stamp_devices[] __initdata = {
482#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
483 &bfin_pcmcia_cf_device,
484#endif
485
486#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
487 &rtc_device,
488#endif
489
490#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
491 &sl811_hcd_device,
492#endif
493
494#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
495 &isp1362_hcd_device,
496#endif
497
498#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
499 &smc91x_device,
500#endif
501
502#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
503 &bfin_mac_device,
504#endif
505
506#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
507 &net2272_bfin_device,
508#endif
509
510#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800511 &bfin_spi0_device,
Bryan Wu1394f032007-05-06 14:50:22 -0700512#endif
513
514#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
515 &bfin_fb_device,
516#endif
517
518#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
519 &bfin_uart_device,
520#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800521
522#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
523 &bfin_sir_device,
524#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700525};
526
527static int __init stamp_init(void)
528{
Harvey Harrisonb85d8582008-04-23 09:39:01 +0800529 printk(KERN_INFO "%s(): registering device resources\n", __func__);
Bryan Wu1394f032007-05-06 14:50:22 -0700530 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
531#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
532 spi_register_board_info(bfin_spi_board_info,
533 ARRAY_SIZE(bfin_spi_board_info));
534#endif
535 return 0;
536}
537
538arch_initcall(stamp_init);
Mike Frysinger137b1522007-11-22 16:07:03 +0800539
Mike Frysinger9862cc52007-11-15 21:21:20 +0800540void bfin_get_ether_addr(char *addr)
Mike Frysinger137b1522007-11-22 16:07:03 +0800541{
542 random_ether_addr(addr);
543 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
544}
Mike Frysinger9862cc52007-11-15 21:21:20 +0800545EXPORT_SYMBOL(bfin_get_ether_addr);