blob: a8caa8a5966676fd307773500f320f02d81ffc8c [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * Copyright 2004-2009 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
Bryan Wu1394f032007-05-06 14:50:22 -07005 *
Robin Getz96f10502009-09-24 14:11:24 +00006 * Licensed under the GPL-2 or later.
Bryan Wu1394f032007-05-06 14:50:22 -07007 */
8
9#include <linux/device.h>
10#include <linux/platform_device.h>
Mike Frysingerde8c43f2008-01-24 17:14:04 +080011#include <linux/mtd/mtd.h>
12#include <linux/mtd/partitions.h>
13#include <linux/mtd/physmap.h>
Bryan Wu1394f032007-05-06 14:50:22 -070014#include <linux/spi/spi.h>
Michael Hennerich140a9ae2007-05-21 18:09:13 +080015#include <linux/irq.h>
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080016#include <linux/interrupt.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080017#include <asm/dma.h>
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080018#include <asm/bfin5xx_spi.h>
Bryan Wu5d448dd2007-11-12 23:24:42 +080019#include <asm/portmux.h>
Michael Hennerich14b03202008-05-07 11:41:26 +080020#include <asm/dpmc.h>
Bryan Wu1394f032007-05-06 14:50:22 -070021
22/*
23 * Name the Board for the /proc/cpuinfo
24 */
Mike Frysingerfe85cad2008-11-18 17:48:22 +080025const char bfin_board_name[] = "ADI BF561-EZKIT";
Bryan Wu1394f032007-05-06 14:50:22 -070026
Michael Hennerich140a9ae2007-05-21 18:09:13 +080027#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
Michael Hennerich3f375692008-11-18 17:48:22 +080028#include <linux/usb/isp1760.h>
29static struct resource bfin_isp1760_resources[] = {
30 [0] = {
31 .start = 0x2C0F0000,
32 .end = 0x203C0000 + 0xfffff,
Michael Hennerich140a9ae2007-05-21 18:09:13 +080033 .flags = IORESOURCE_MEM,
34 },
Michael Hennerich3f375692008-11-18 17:48:22 +080035 [1] = {
36 .start = IRQ_PF10,
37 .end = IRQ_PF10,
Michael Hennerich140a9ae2007-05-21 18:09:13 +080038 .flags = IORESOURCE_IRQ,
39 },
40};
41
Michael Hennerich3f375692008-11-18 17:48:22 +080042static struct isp1760_platform_data isp1760_priv = {
43 .is_isp1761 = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080044 .bus_width_16 = 1,
45 .port1_otg = 0,
46 .analog_oc = 0,
47 .dack_polarity_high = 0,
48 .dreq_polarity_high = 0,
49};
50
51static struct platform_device bfin_isp1760_device = {
52 .name = "isp1760-hcd",
Michael Hennerich140a9ae2007-05-21 18:09:13 +080053 .id = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080054 .dev = {
55 .platform_data = &isp1760_priv,
56 },
57 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
58 .resource = bfin_isp1760_resources,
Michael Hennerich140a9ae2007-05-21 18:09:13 +080059};
Michael Hennerich140a9ae2007-05-21 18:09:13 +080060#endif
61
Michael Henneriche9d76c22008-02-02 14:55:28 +080062#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
63#include <linux/usb/isp1362.h>
64
65static struct resource isp1362_hcd_resources[] = {
66 {
67 .start = 0x2c060000,
68 .end = 0x2c060000,
69 .flags = IORESOURCE_MEM,
70 }, {
71 .start = 0x2c060004,
72 .end = 0x2c060004,
73 .flags = IORESOURCE_MEM,
74 }, {
75 .start = IRQ_PF8,
76 .end = IRQ_PF8,
77 .flags = IORESOURCE_IRQ,
78 },
79};
80
81static struct isp1362_platform_data isp1362_priv = {
82 .sel15Kres = 1,
83 .clknotstop = 0,
84 .oc_enable = 0,
85 .int_act_high = 0,
86 .int_edge_triggered = 0,
87 .remote_wakeup_connected = 0,
88 .no_power_switching = 1,
89 .power_switching_mode = 0,
90};
91
92static struct platform_device isp1362_hcd_device = {
93 .name = "isp1362-hcd",
94 .id = 0,
95 .dev = {
96 .platform_data = &isp1362_priv,
97 },
98 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
99 .resource = isp1362_hcd_resources,
100};
101#endif
102
Michael Hennerich83d9cde2008-02-02 16:25:17 +0800103#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
104static struct resource net2272_bfin_resources[] = {
105 {
106 .start = 0x2C000000,
107 .end = 0x2C000000 + 0x7F,
108 .flags = IORESOURCE_MEM,
109 }, {
110 .start = IRQ_PF10,
111 .end = IRQ_PF10,
112 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
113 },
114};
115
116static struct platform_device net2272_bfin_device = {
117 .name = "net2272",
118 .id = -1,
119 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
120 .resource = net2272_bfin_resources,
121};
122#endif
123
Bryan Wu1394f032007-05-06 14:50:22 -0700124/*
125 * USB-LAN EzExtender board
126 * Driver needs to know address, irq and flag pin.
127 */
128#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
Michael Hennerich61f09b52009-07-24 08:48:31 +0000129#include <linux/smc91x.h>
130
131static struct smc91x_platdata smc91x_info = {
132 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
133 .leda = RPC_LED_100_10,
134 .ledb = RPC_LED_TX_RX,
135};
136
Bryan Wu1394f032007-05-06 14:50:22 -0700137static struct resource smc91x_resources[] = {
138 {
139 .name = "smc91x-regs",
140 .start = 0x2C010300,
141 .end = 0x2C010300 + 16,
142 .flags = IORESOURCE_MEM,
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800143 }, {
Bryan Wu1394f032007-05-06 14:50:22 -0700144
145 .start = IRQ_PF9,
146 .end = IRQ_PF9,
147 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
148 },
149};
150
151static struct platform_device smc91x_device = {
152 .name = "smc91x",
153 .id = 0,
154 .num_resources = ARRAY_SIZE(smc91x_resources),
155 .resource = smc91x_resources,
Michael Hennerich61f09b52009-07-24 08:48:31 +0000156 .dev = {
157 .platform_data = &smc91x_info,
158 },
Bryan Wu1394f032007-05-06 14:50:22 -0700159};
160#endif
161
Michael Hennerich561cc182007-11-17 23:56:08 +0800162#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
163static struct resource ax88180_resources[] = {
164 [0] = {
165 .start = 0x2c000000,
166 .end = 0x2c000000 + 0x8000,
167 .flags = IORESOURCE_MEM,
168 },
169 [1] = {
170 .start = IRQ_PF10,
171 .end = IRQ_PF10,
172 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
173 },
174};
175
176static struct platform_device ax88180_device = {
177 .name = "ax88180",
178 .id = -1,
179 .num_resources = ARRAY_SIZE(ax88180_resources),
180 .resource = ax88180_resources,
181};
182#endif
183
Bryan Wu1394f032007-05-06 14:50:22 -0700184#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
185static struct resource bfin_uart_resources[] = {
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800186 {
187 .start = 0xFFC00400,
188 .end = 0xFFC004FF,
189 .flags = IORESOURCE_MEM,
190 },
Bryan Wu1394f032007-05-06 14:50:22 -0700191};
192
193static struct platform_device bfin_uart_device = {
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800194 .name = "bfin-uart",
195 .id = 1,
196 .num_resources = ARRAY_SIZE(bfin_uart_resources),
197 .resource = bfin_uart_resources,
Bryan Wu1394f032007-05-06 14:50:22 -0700198};
199#endif
200
Graf Yang5be36d22008-04-25 03:09:15 +0800201#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang5be36d22008-04-25 03:09:15 +0800202#ifdef CONFIG_BFIN_SIR0
Graf Yang42bd8bc2009-01-07 23:14:39 +0800203static struct resource bfin_sir0_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800204 {
205 .start = 0xFFC00400,
206 .end = 0xFFC004FF,
207 .flags = IORESOURCE_MEM,
208 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800209 {
210 .start = IRQ_UART0_RX,
211 .end = IRQ_UART0_RX+1,
212 .flags = IORESOURCE_IRQ,
213 },
214 {
215 .start = CH_UART0_RX,
216 .end = CH_UART0_RX+1,
217 .flags = IORESOURCE_DMA,
218 },
Graf Yang5be36d22008-04-25 03:09:15 +0800219};
220
Graf Yang42bd8bc2009-01-07 23:14:39 +0800221static struct platform_device bfin_sir0_device = {
Graf Yang5be36d22008-04-25 03:09:15 +0800222 .name = "bfin_sir",
223 .id = 0,
Graf Yang42bd8bc2009-01-07 23:14:39 +0800224 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
225 .resource = bfin_sir0_resources,
Graf Yang5be36d22008-04-25 03:09:15 +0800226};
227#endif
Graf Yang42bd8bc2009-01-07 23:14:39 +0800228#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800229
Mike Frysinger793dc272008-03-26 08:09:12 +0800230#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800231static struct mtd_partition ezkit_partitions[] = {
232 {
Robin Getzaa582972008-08-05 17:47:29 +0800233 .name = "bootloader(nor)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800234 .size = 0x40000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800235 .offset = 0,
236 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800237 .name = "linux kernel(nor)",
Grace Panac76d882008-04-24 06:33:56 +0800238 .size = 0x1C0000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800239 .offset = MTDPART_OFS_APPEND,
240 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800241 .name = "file system(nor)",
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800242 .size = MTDPART_SIZ_FULL,
243 .offset = MTDPART_OFS_APPEND,
244 }
245};
246
247static struct physmap_flash_data ezkit_flash_data = {
248 .width = 2,
249 .parts = ezkit_partitions,
250 .nr_parts = ARRAY_SIZE(ezkit_partitions),
251};
252
253static struct resource ezkit_flash_resource = {
254 .start = 0x20000000,
255 .end = 0x207fffff,
256 .flags = IORESOURCE_MEM,
257};
258
259static struct platform_device ezkit_flash_device = {
260 .name = "physmap-flash",
261 .id = 0,
262 .dev = {
263 .platform_data = &ezkit_flash_data,
264 },
265 .num_resources = 1,
266 .resource = &ezkit_flash_resource,
267};
Mike Frysinger793dc272008-03-26 08:09:12 +0800268#endif
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800269
Bryan Wu1394f032007-05-06 14:50:22 -0700270#if defined(CONFIG_SND_BLACKFIN_AD1836) \
271 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
272static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
273 .enable_dma = 0,
274 .bits_per_word = 16,
275};
276#endif
Michael Hennerich6e668932008-02-09 01:54:09 +0800277
278#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
279static struct bfin5xx_spi_chip spidev_chip_info = {
280 .enable_dma = 0,
281 .bits_per_word = 8,
282};
283#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700284
Mike Frysinger5bda2722008-06-07 15:03:01 +0800285#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800286/* SPI (0) */
287static struct resource bfin_spi0_resource[] = {
288 [0] = {
289 .start = SPI0_REGBASE,
290 .end = SPI0_REGBASE + 0xFF,
291 .flags = IORESOURCE_MEM,
292 },
293 [1] = {
294 .start = CH_SPI,
295 .end = CH_SPI,
Yi Li53122692009-06-05 12:11:11 +0000296 .flags = IORESOURCE_DMA,
297 },
298 [2] = {
299 .start = IRQ_SPI,
300 .end = IRQ_SPI,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800301 .flags = IORESOURCE_IRQ,
302 }
303};
304
Bryan Wu1394f032007-05-06 14:50:22 -0700305/* SPI controller data */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800306static struct bfin5xx_spi_master bfin_spi0_info = {
Bryan Wu1394f032007-05-06 14:50:22 -0700307 .num_chipselect = 8,
308 .enable_dma = 1, /* master has the ability to do dma transfer */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800309 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
Bryan Wu1394f032007-05-06 14:50:22 -0700310};
311
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800312static 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,
Bryan Wu1394f032007-05-06 14:50:22 -0700317 .dev = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800318 .platform_data = &bfin_spi0_info, /* Passed to driver */
Bryan Wu1394f032007-05-06 14:50:22 -0700319 },
320};
Mike Frysinger5bda2722008-06-07 15:03:01 +0800321#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700322
323static struct spi_board_info bfin_spi_board_info[] __initdata = {
324#if defined(CONFIG_SND_BLACKFIN_AD1836) \
325 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
326 {
Barry Songdac98172009-08-13 21:07:37 +0000327 .modalias = "ad1836",
Bryan Wu1394f032007-05-06 14:50:22 -0700328 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800329 .bus_num = 0,
Bryan Wu1394f032007-05-06 14:50:22 -0700330 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
331 .controller_data = &ad1836_spi_chip_info,
332 },
333#endif
Michael Hennerich6e668932008-02-09 01:54:09 +0800334#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
335 {
336 .modalias = "spidev",
337 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
338 .bus_num = 0,
339 .chip_select = 1,
340 .controller_data = &spidev_chip_info,
341 },
342#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700343};
344
Michael Hennerich2463ef22008-01-27 16:49:48 +0800345#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
346#include <linux/input.h>
347#include <linux/gpio_keys.h>
348
349static struct gpio_keys_button bfin_gpio_keys_table[] = {
350 {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"},
351 {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"},
352 {BTN_2, GPIO_PF7, 1, "gpio-keys: BTN2"},
353 {BTN_3, GPIO_PF8, 1, "gpio-keys: BTN3"},
354};
355
356static struct gpio_keys_platform_data bfin_gpio_keys_data = {
357 .buttons = bfin_gpio_keys_table,
358 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
359};
360
361static struct platform_device bfin_device_gpiokeys = {
362 .name = "gpio-keys",
363 .dev = {
364 .platform_data = &bfin_gpio_keys_data,
365 },
366};
367#endif
368
Mike Frysingercad2ab62008-02-22 17:01:31 +0800369static struct resource bfin_gpios_resources = {
370 .start = 0,
371 .end = MAX_BLACKFIN_GPIOS - 1,
372 .flags = IORESOURCE_IRQ,
373};
374
375static struct platform_device bfin_gpios_device = {
376 .name = "simple-gpio",
377 .id = -1,
378 .num_resources = 1,
379 .resource = &bfin_gpios_resources,
380};
381
Bryan Wue3163952008-01-24 16:19:15 +0800382#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
383#include <linux/i2c-gpio.h>
384
385static struct i2c_gpio_platform_data i2c_gpio_data = {
386 .sda_pin = 1,
387 .scl_pin = 0,
388 .sda_is_open_drain = 0,
389 .scl_is_open_drain = 0,
390 .udelay = 40,
391};
392
393static struct platform_device i2c_gpio_device = {
394 .name = "i2c-gpio",
395 .id = 0,
396 .dev = {
397 .platform_data = &i2c_gpio_data,
398 },
399};
400#endif
401
Michael Hennerich14b03202008-05-07 11:41:26 +0800402static const unsigned int cclk_vlev_datasheet[] =
403{
404 VRPAIR(VLEV_085, 250000000),
405 VRPAIR(VLEV_090, 300000000),
406 VRPAIR(VLEV_095, 313000000),
407 VRPAIR(VLEV_100, 350000000),
408 VRPAIR(VLEV_105, 400000000),
409 VRPAIR(VLEV_110, 444000000),
410 VRPAIR(VLEV_115, 450000000),
411 VRPAIR(VLEV_120, 475000000),
412 VRPAIR(VLEV_125, 500000000),
413 VRPAIR(VLEV_130, 600000000),
414};
415
416static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
417 .tuple_tab = cclk_vlev_datasheet,
418 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
419 .vr_settling_time = 25 /* us */,
420};
421
422static struct platform_device bfin_dpmc = {
423 .name = "bfin dpmc",
424 .dev = {
425 .platform_data = &bfin_dmpc_vreg_data,
426 },
427};
428
Bryan Wu1394f032007-05-06 14:50:22 -0700429static struct platform_device *ezkit_devices[] __initdata = {
Michael Hennerich14b03202008-05-07 11:41:26 +0800430
431 &bfin_dpmc,
432
Bryan Wu1394f032007-05-06 14:50:22 -0700433#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
434 &smc91x_device,
435#endif
Michael Hennerich561cc182007-11-17 23:56:08 +0800436
437#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
438 &ax88180_device,
439#endif
440
Michael Hennerich83d9cde2008-02-02 16:25:17 +0800441#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
442 &net2272_bfin_device,
443#endif
444
Michael Hennerich3f375692008-11-18 17:48:22 +0800445#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
446 &bfin_isp1760_device,
447#endif
448
Bryan Wu1394f032007-05-06 14:50:22 -0700449#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800450 &bfin_spi0_device,
Bryan Wu1394f032007-05-06 14:50:22 -0700451#endif
Michael Hennerich2463ef22008-01-27 16:49:48 +0800452
Bryan Wu1394f032007-05-06 14:50:22 -0700453#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
Mike Frysinger1f83b8f2007-07-12 22:58:21 +0800454 &bfin_uart_device,
Bryan Wu1394f032007-05-06 14:50:22 -0700455#endif
Michael Hennerich2463ef22008-01-27 16:49:48 +0800456
Graf Yang5be36d22008-04-25 03:09:15 +0800457#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang42bd8bc2009-01-07 23:14:39 +0800458#ifdef CONFIG_BFIN_SIR0
459 &bfin_sir0_device,
460#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800461#endif
462
Michael Hennerich2463ef22008-01-27 16:49:48 +0800463#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
464 &bfin_device_gpiokeys,
465#endif
Bryan Wue3163952008-01-24 16:19:15 +0800466
467#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
468 &i2c_gpio_device,
469#endif
Michael Henneriche9d76c22008-02-02 14:55:28 +0800470
471#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
472 &isp1362_hcd_device,
473#endif
474
Mike Frysingercad2ab62008-02-22 17:01:31 +0800475 &bfin_gpios_device,
Mike Frysinger793dc272008-03-26 08:09:12 +0800476
477#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800478 &ezkit_flash_device,
Mike Frysinger793dc272008-03-26 08:09:12 +0800479#endif
Bryan Wu1394f032007-05-06 14:50:22 -0700480};
481
482static int __init ezkit_init(void)
483{
484 int ret;
485
Mike Frysingerc0fc5252007-05-21 18:09:25 +0800486 printk(KERN_INFO "%s(): registering device resources\n", __func__);
487
488 ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
Bryan Wu1394f032007-05-06 14:50:22 -0700489 if (ret < 0)
490 return ret;
Mike Frysingerc0fc5252007-05-21 18:09:25 +0800491
492#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
493 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
494 SSYNC();
495#endif
496
Mike Frysinger5bda2722008-06-07 15:03:01 +0800497 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800498 return 0;
Bryan Wu1394f032007-05-06 14:50:22 -0700499}
500
501arch_initcall(ezkit_init);