Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: arch/blackfin/mach-bf561/ezkit.c |
| 3 | * Based on: |
| 4 | * Author: |
| 5 | * |
| 6 | * Created: |
| 7 | * Description: |
| 8 | * |
| 9 | * Modified: |
| 10 | * Copyright 2004-2006 Analog Devices Inc. |
| 11 | * |
| 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
| 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License as published by |
| 16 | * the Free Software Foundation; either version 2 of the License, or |
| 17 | * (at your option) any later version. |
| 18 | * |
| 19 | * This program is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with this program; if not, see the file COPYING, or write |
| 26 | * to the Free Software Foundation, Inc., |
| 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 28 | */ |
| 29 | |
| 30 | #include <linux/device.h> |
| 31 | #include <linux/platform_device.h> |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 32 | #include <linux/mtd/mtd.h> |
| 33 | #include <linux/mtd/partitions.h> |
| 34 | #include <linux/mtd/physmap.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 35 | #include <linux/spi/spi.h> |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 36 | #include <linux/irq.h> |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 37 | #include <linux/interrupt.h> |
Jeff Garzik | 0a87e3e | 2008-02-01 18:02:30 -0500 | [diff] [blame] | 38 | #include <linux/ata_platform.h> |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 39 | #include <asm/dma.h> |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 40 | #include <asm/bfin5xx_spi.h> |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 41 | #include <asm/portmux.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 42 | |
| 43 | /* |
| 44 | * Name the Board for the /proc/cpuinfo |
| 45 | */ |
Mike Frysinger | 066954a | 2007-10-21 22:36:06 +0800 | [diff] [blame] | 46 | const char bfin_board_name[] = "ADDS-BF561-EZKIT"; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 47 | |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 48 | #define ISP1761_BASE 0x2C0F0000 |
| 49 | #define ISP1761_IRQ IRQ_PF10 |
| 50 | |
| 51 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
| 52 | static struct resource bfin_isp1761_resources[] = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 53 | { |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 54 | .name = "isp1761-regs", |
| 55 | .start = ISP1761_BASE + 0x00000000, |
| 56 | .end = ISP1761_BASE + 0x000fffff, |
| 57 | .flags = IORESOURCE_MEM, |
| 58 | }, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 59 | { |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 60 | .start = ISP1761_IRQ, |
| 61 | .end = ISP1761_IRQ, |
| 62 | .flags = IORESOURCE_IRQ, |
| 63 | }, |
| 64 | }; |
| 65 | |
| 66 | static struct platform_device bfin_isp1761_device = { |
| 67 | .name = "isp1761", |
| 68 | .id = 0, |
| 69 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), |
| 70 | .resource = bfin_isp1761_resources, |
| 71 | }; |
| 72 | |
| 73 | static struct platform_device *bfin_isp1761_devices[] = { |
| 74 | &bfin_isp1761_device, |
| 75 | }; |
| 76 | |
| 77 | int __init bfin_isp1761_init(void) |
| 78 | { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 79 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 80 | |
| 81 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
| 82 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); |
| 83 | |
| 84 | return platform_add_devices(bfin_isp1761_devices, num_devices); |
| 85 | } |
| 86 | |
| 87 | void __exit bfin_isp1761_exit(void) |
| 88 | { |
| 89 | platform_device_unregister(&bfin_isp1761_device); |
| 90 | } |
| 91 | |
| 92 | arch_initcall(bfin_isp1761_init); |
| 93 | #endif |
| 94 | |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame^] | 95 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 96 | #include <linux/usb/isp1362.h> |
| 97 | |
| 98 | static struct resource isp1362_hcd_resources[] = { |
| 99 | { |
| 100 | .start = 0x2c060000, |
| 101 | .end = 0x2c060000, |
| 102 | .flags = IORESOURCE_MEM, |
| 103 | }, { |
| 104 | .start = 0x2c060004, |
| 105 | .end = 0x2c060004, |
| 106 | .flags = IORESOURCE_MEM, |
| 107 | }, { |
| 108 | .start = IRQ_PF8, |
| 109 | .end = IRQ_PF8, |
| 110 | .flags = IORESOURCE_IRQ, |
| 111 | }, |
| 112 | }; |
| 113 | |
| 114 | static struct isp1362_platform_data isp1362_priv = { |
| 115 | .sel15Kres = 1, |
| 116 | .clknotstop = 0, |
| 117 | .oc_enable = 0, |
| 118 | .int_act_high = 0, |
| 119 | .int_edge_triggered = 0, |
| 120 | .remote_wakeup_connected = 0, |
| 121 | .no_power_switching = 1, |
| 122 | .power_switching_mode = 0, |
| 123 | }; |
| 124 | |
| 125 | static struct platform_device isp1362_hcd_device = { |
| 126 | .name = "isp1362-hcd", |
| 127 | .id = 0, |
| 128 | .dev = { |
| 129 | .platform_data = &isp1362_priv, |
| 130 | }, |
| 131 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), |
| 132 | .resource = isp1362_hcd_resources, |
| 133 | }; |
| 134 | #endif |
| 135 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 136 | /* |
| 137 | * USB-LAN EzExtender board |
| 138 | * Driver needs to know address, irq and flag pin. |
| 139 | */ |
| 140 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 141 | static struct resource smc91x_resources[] = { |
| 142 | { |
| 143 | .name = "smc91x-regs", |
| 144 | .start = 0x2C010300, |
| 145 | .end = 0x2C010300 + 16, |
| 146 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 147 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 148 | |
| 149 | .start = IRQ_PF9, |
| 150 | .end = IRQ_PF9, |
| 151 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 152 | }, |
| 153 | }; |
| 154 | |
| 155 | static struct platform_device smc91x_device = { |
| 156 | .name = "smc91x", |
| 157 | .id = 0, |
| 158 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 159 | .resource = smc91x_resources, |
| 160 | }; |
| 161 | #endif |
| 162 | |
Michael Hennerich | 561cc18 | 2007-11-17 23:56:08 +0800 | [diff] [blame] | 163 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) |
| 164 | static struct resource ax88180_resources[] = { |
| 165 | [0] = { |
| 166 | .start = 0x2c000000, |
| 167 | .end = 0x2c000000 + 0x8000, |
| 168 | .flags = IORESOURCE_MEM, |
| 169 | }, |
| 170 | [1] = { |
| 171 | .start = IRQ_PF10, |
| 172 | .end = IRQ_PF10, |
| 173 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), |
| 174 | }, |
| 175 | }; |
| 176 | |
| 177 | static struct platform_device ax88180_device = { |
| 178 | .name = "ax88180", |
| 179 | .id = -1, |
| 180 | .num_resources = ARRAY_SIZE(ax88180_resources), |
| 181 | .resource = ax88180_resources, |
| 182 | }; |
| 183 | #endif |
| 184 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 185 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
| 186 | static struct resource bfin_uart_resources[] = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 187 | { |
| 188 | .start = 0xFFC00400, |
| 189 | .end = 0xFFC004FF, |
| 190 | .flags = IORESOURCE_MEM, |
| 191 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 192 | }; |
| 193 | |
| 194 | static struct platform_device bfin_uart_device = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 195 | .name = "bfin-uart", |
| 196 | .id = 1, |
| 197 | .num_resources = ARRAY_SIZE(bfin_uart_resources), |
| 198 | .resource = bfin_uart_resources, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 199 | }; |
| 200 | #endif |
| 201 | |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 202 | static struct mtd_partition ezkit_partitions[] = { |
| 203 | { |
| 204 | .name = "Bootloader", |
| 205 | .size = 0x20000, |
| 206 | .offset = 0, |
| 207 | }, { |
| 208 | .name = "Kernel", |
| 209 | .size = 0xE0000, |
| 210 | .offset = MTDPART_OFS_APPEND, |
| 211 | }, { |
| 212 | .name = "RootFS", |
| 213 | .size = MTDPART_SIZ_FULL, |
| 214 | .offset = MTDPART_OFS_APPEND, |
| 215 | } |
| 216 | }; |
| 217 | |
| 218 | static struct physmap_flash_data ezkit_flash_data = { |
| 219 | .width = 2, |
| 220 | .parts = ezkit_partitions, |
| 221 | .nr_parts = ARRAY_SIZE(ezkit_partitions), |
| 222 | }; |
| 223 | |
| 224 | static struct resource ezkit_flash_resource = { |
| 225 | .start = 0x20000000, |
| 226 | .end = 0x207fffff, |
| 227 | .flags = IORESOURCE_MEM, |
| 228 | }; |
| 229 | |
| 230 | static struct platform_device ezkit_flash_device = { |
| 231 | .name = "physmap-flash", |
| 232 | .id = 0, |
| 233 | .dev = { |
| 234 | .platform_data = &ezkit_flash_data, |
| 235 | }, |
| 236 | .num_resources = 1, |
| 237 | .resource = &ezkit_flash_resource, |
| 238 | }; |
| 239 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 240 | #ifdef CONFIG_SPI_BFIN |
| 241 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
| 242 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 243 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
| 244 | .enable_dma = 0, |
| 245 | .bits_per_word = 16, |
| 246 | }; |
| 247 | #endif |
| 248 | #endif |
| 249 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 250 | /* SPI (0) */ |
| 251 | static struct resource bfin_spi0_resource[] = { |
| 252 | [0] = { |
| 253 | .start = SPI0_REGBASE, |
| 254 | .end = SPI0_REGBASE + 0xFF, |
| 255 | .flags = IORESOURCE_MEM, |
| 256 | }, |
| 257 | [1] = { |
| 258 | .start = CH_SPI, |
| 259 | .end = CH_SPI, |
| 260 | .flags = IORESOURCE_IRQ, |
| 261 | } |
| 262 | }; |
| 263 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 264 | /* SPI controller data */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 265 | static struct bfin5xx_spi_master bfin_spi0_info = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 266 | .num_chipselect = 8, |
| 267 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 268 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 269 | }; |
| 270 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 271 | static struct platform_device bfin_spi0_device = { |
| 272 | .name = "bfin-spi", |
| 273 | .id = 0, /* Bus number */ |
| 274 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 275 | .resource = bfin_spi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 276 | .dev = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 277 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 278 | }, |
| 279 | }; |
| 280 | |
| 281 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 282 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
| 283 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 284 | { |
| 285 | .modalias = "ad1836-spi", |
| 286 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 287 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 288 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
| 289 | .controller_data = &ad1836_spi_chip_info, |
| 290 | }, |
| 291 | #endif |
| 292 | }; |
| 293 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 294 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 295 | #define PATA_INT 55 |
| 296 | |
| 297 | static struct pata_platform_info bfin_pata_platform_data = { |
| 298 | .ioport_shift = 1, |
| 299 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, |
| 300 | }; |
| 301 | |
| 302 | static struct resource bfin_pata_resources[] = { |
| 303 | { |
| 304 | .start = 0x20314020, |
| 305 | .end = 0x2031403F, |
| 306 | .flags = IORESOURCE_MEM, |
| 307 | }, |
| 308 | { |
| 309 | .start = 0x2031401C, |
| 310 | .end = 0x2031401F, |
| 311 | .flags = IORESOURCE_MEM, |
| 312 | }, |
| 313 | { |
| 314 | .start = PATA_INT, |
| 315 | .end = PATA_INT, |
| 316 | .flags = IORESOURCE_IRQ, |
| 317 | }, |
| 318 | }; |
| 319 | |
| 320 | static struct platform_device bfin_pata_device = { |
| 321 | .name = "pata_platform", |
| 322 | .id = -1, |
| 323 | .num_resources = ARRAY_SIZE(bfin_pata_resources), |
| 324 | .resource = bfin_pata_resources, |
| 325 | .dev = { |
| 326 | .platform_data = &bfin_pata_platform_data, |
| 327 | } |
| 328 | }; |
| 329 | #endif |
| 330 | |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 331 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 332 | #include <linux/input.h> |
| 333 | #include <linux/gpio_keys.h> |
| 334 | |
| 335 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
| 336 | {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"}, |
| 337 | {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"}, |
| 338 | {BTN_2, GPIO_PF7, 1, "gpio-keys: BTN2"}, |
| 339 | {BTN_3, GPIO_PF8, 1, "gpio-keys: BTN3"}, |
| 340 | }; |
| 341 | |
| 342 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { |
| 343 | .buttons = bfin_gpio_keys_table, |
| 344 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), |
| 345 | }; |
| 346 | |
| 347 | static struct platform_device bfin_device_gpiokeys = { |
| 348 | .name = "gpio-keys", |
| 349 | .dev = { |
| 350 | .platform_data = &bfin_gpio_keys_data, |
| 351 | }, |
| 352 | }; |
| 353 | #endif |
| 354 | |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 355 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
| 356 | #include <linux/i2c-gpio.h> |
| 357 | |
| 358 | static struct i2c_gpio_platform_data i2c_gpio_data = { |
| 359 | .sda_pin = 1, |
| 360 | .scl_pin = 0, |
| 361 | .sda_is_open_drain = 0, |
| 362 | .scl_is_open_drain = 0, |
| 363 | .udelay = 40, |
| 364 | }; |
| 365 | |
| 366 | static struct platform_device i2c_gpio_device = { |
| 367 | .name = "i2c-gpio", |
| 368 | .id = 0, |
| 369 | .dev = { |
| 370 | .platform_data = &i2c_gpio_data, |
| 371 | }, |
| 372 | }; |
| 373 | #endif |
| 374 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 375 | static struct platform_device *ezkit_devices[] __initdata = { |
| 376 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 377 | &smc91x_device, |
| 378 | #endif |
Michael Hennerich | 561cc18 | 2007-11-17 23:56:08 +0800 | [diff] [blame] | 379 | |
| 380 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) |
| 381 | &ax88180_device, |
| 382 | #endif |
| 383 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 384 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 385 | &bfin_spi0_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 386 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 387 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 388 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 389 | &bfin_uart_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 390 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 391 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 392 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 393 | &bfin_pata_device, |
| 394 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 395 | |
| 396 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 397 | &bfin_device_gpiokeys, |
| 398 | #endif |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 399 | |
| 400 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
| 401 | &i2c_gpio_device, |
| 402 | #endif |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame^] | 403 | |
| 404 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 405 | &isp1362_hcd_device, |
| 406 | #endif |
| 407 | |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 408 | &ezkit_flash_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 409 | }; |
| 410 | |
| 411 | static int __init ezkit_init(void) |
| 412 | { |
| 413 | int ret; |
| 414 | |
Mike Frysinger | c0fc525 | 2007-05-21 18:09:25 +0800 | [diff] [blame] | 415 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
| 416 | |
| 417 | ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 418 | if (ret < 0) |
| 419 | return ret; |
Mike Frysinger | c0fc525 | 2007-05-21 18:09:25 +0800 | [diff] [blame] | 420 | |
| 421 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 422 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); |
| 423 | SSYNC(); |
| 424 | #endif |
| 425 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 426 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 427 | spi_register_board_info(bfin_spi_board_info, |
| 428 | ARRAY_SIZE(bfin_spi_board_info)); |
| 429 | #endif |
| 430 | |
| 431 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 432 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
| 433 | #endif |
| 434 | return 0; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 435 | } |
| 436 | |
| 437 | arch_initcall(ezkit_init); |