Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: arch/blackfin/mach-bf533/ezkit.c |
Simon Arlott | d2d50aa | 2007-06-11 15:31:30 +0800 | [diff] [blame] | 3 | * Based on: Original Work |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 4 | * Author: Aidan Williams <aidan@nicta.com.au> |
| 5 | * |
| 6 | * Created: 2005 |
| 7 | * Description: |
| 8 | * |
| 9 | * Modified: Robin Getz <rgetz@blackfin.uclinux.org> - Named the boards |
| 10 | * Copyright 2005 National ICT Australia (NICTA) |
| 11 | * Copyright 2004-2006 Analog Devices Inc. |
| 12 | * |
| 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> |
| 32 | #include <linux/platform_device.h> |
| 33 | #include <linux/mtd/mtd.h> |
| 34 | #include <linux/mtd/partitions.h> |
| 35 | #include <linux/spi/spi.h> |
| 36 | #include <linux/spi/flash.h> |
Mike Frysinger | 67f2d33 | 2008-02-09 01:49:23 +0800 | [diff] [blame] | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
Mike Frysinger | f02bcec | 2007-11-15 21:29:15 +0800 | [diff] [blame] | 38 | #include <linux/usb/isp1362.h> |
Mike Frysinger | 67f2d33 | 2008-02-09 01:49:23 +0800 | [diff] [blame] | 39 | #endif |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 40 | #include <linux/irq.h> |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 41 | #include <asm/dma.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 42 | #include <asm/bfin5xx_spi.h> |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 43 | #include <asm/portmux.h> |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 44 | #include <asm/dpmc.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 45 | |
| 46 | /* |
| 47 | * Name the Board for the /proc/cpuinfo |
| 48 | */ |
Mike Frysinger | fe85cad | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 49 | const char bfin_board_name[] = "ADI BF533-EZKIT"; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | |
| 51 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 52 | static struct platform_device rtc_device = { |
| 53 | .name = "rtc-bfin", |
| 54 | .id = -1, |
| 55 | }; |
| 56 | #endif |
| 57 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 58 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) |
| 59 | static struct platform_device bfin_fb_adv7393_device = { |
| 60 | .name = "bfin-adv7393", |
| 61 | }; |
| 62 | #endif |
| 63 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 64 | /* |
| 65 | * USB-LAN EzExtender board |
| 66 | * Driver needs to know address, irq and flag pin. |
| 67 | */ |
| 68 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 69 | static struct resource smc91x_resources[] = { |
| 70 | { |
| 71 | .name = "smc91x-regs", |
| 72 | .start = 0x20310300, |
| 73 | .end = 0x20310300 + 16, |
| 74 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 75 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 76 | .start = IRQ_PF9, |
| 77 | .end = IRQ_PF9, |
| 78 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 79 | }, |
| 80 | }; |
| 81 | static struct platform_device smc91x_device = { |
| 82 | .name = "smc91x", |
| 83 | .id = 0, |
| 84 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 85 | .resource = smc91x_resources, |
| 86 | }; |
| 87 | #endif |
| 88 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 89 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 90 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
| 91 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 92 | .name = "bootloader(spi)", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 93 | .size = 0x00020000, |
| 94 | .offset = 0, |
| 95 | .mask_flags = MTD_CAP_ROM |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 96 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 97 | .name = "linux kernel(spi)", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 98 | .size = 0xe0000, |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 99 | .offset = MTDPART_OFS_APPEND, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 100 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 101 | .name = "file system(spi)", |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 102 | .size = MTDPART_SIZ_FULL, |
| 103 | .offset = MTDPART_OFS_APPEND, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 104 | } |
| 105 | }; |
| 106 | |
| 107 | static struct flash_platform_data bfin_spi_flash_data = { |
| 108 | .name = "m25p80", |
| 109 | .parts = bfin_spi_flash_partitions, |
| 110 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), |
| 111 | .type = "m25p64", |
| 112 | }; |
| 113 | |
| 114 | /* SPI flash chip (m25p64) */ |
| 115 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
| 116 | .enable_dma = 0, /* use dma transfer with this chip*/ |
| 117 | .bits_per_word = 8, |
| 118 | }; |
| 119 | #endif |
| 120 | |
| 121 | #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE) |
| 122 | /* SPI ADC chip */ |
| 123 | static struct bfin5xx_spi_chip spi_adc_chip_info = { |
| 124 | .enable_dma = 1, /* use dma transfer with this chip*/ |
| 125 | .bits_per_word = 16, |
| 126 | }; |
| 127 | #endif |
| 128 | |
| 129 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 130 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
| 131 | .enable_dma = 0, |
| 132 | .bits_per_word = 16, |
| 133 | }; |
| 134 | #endif |
| 135 | |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 136 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
| 137 | static struct bfin5xx_spi_chip spidev_chip_info = { |
| 138 | .enable_dma = 0, |
| 139 | .bits_per_word = 8, |
| 140 | }; |
| 141 | #endif |
| 142 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 143 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 144 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 145 | { |
| 146 | /* the modalias must be the same as spi device driver name */ |
| 147 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
| 148 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 149 | .bus_num = 0, /* Framework bus number */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 150 | .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/ |
| 151 | .platform_data = &bfin_spi_flash_data, |
| 152 | .controller_data = &spi_flash_chip_info, |
| 153 | .mode = SPI_MODE_3, |
| 154 | }, |
| 155 | #endif |
| 156 | |
| 157 | #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE) |
| 158 | { |
| 159 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ |
| 160 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 161 | .bus_num = 0, /* Framework bus number */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 162 | .chip_select = 1, /* Framework chip select. */ |
| 163 | .platform_data = NULL, /* No spi_driver specific config */ |
| 164 | .controller_data = &spi_adc_chip_info, |
| 165 | }, |
| 166 | #endif |
| 167 | |
| 168 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 169 | { |
| 170 | .modalias = "ad1836-spi", |
| 171 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 172 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 173 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
| 174 | .controller_data = &ad1836_spi_chip_info, |
| 175 | }, |
| 176 | #endif |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 177 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
| 178 | { |
| 179 | .modalias = "spidev", |
| 180 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 181 | .bus_num = 0, |
| 182 | .chip_select = 1, |
| 183 | .controller_data = &spidev_chip_info, |
| 184 | }, |
| 185 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 186 | }; |
| 187 | |
Mike Frysinger | 5bda272 | 2008-06-07 15:03:01 +0800 | [diff] [blame] | 188 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 189 | /* SPI (0) */ |
| 190 | static struct resource bfin_spi0_resource[] = { |
| 191 | [0] = { |
| 192 | .start = SPI0_REGBASE, |
| 193 | .end = SPI0_REGBASE + 0xFF, |
| 194 | .flags = IORESOURCE_MEM, |
| 195 | }, |
| 196 | [1] = { |
| 197 | .start = CH_SPI, |
| 198 | .end = CH_SPI, |
| 199 | .flags = IORESOURCE_IRQ, |
| 200 | } |
| 201 | }; |
| 202 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 203 | /* SPI controller data */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 204 | static struct bfin5xx_spi_master bfin_spi0_info = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 205 | .num_chipselect = 8, |
| 206 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 207 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 208 | }; |
| 209 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 210 | static struct platform_device bfin_spi0_device = { |
| 211 | .name = "bfin-spi", |
| 212 | .id = 0, /* Bus number */ |
| 213 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 214 | .resource = bfin_spi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 215 | .dev = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 216 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 217 | }, |
| 218 | }; |
| 219 | #endif /* spi master and devices */ |
| 220 | |
| 221 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
| 222 | static struct resource bfin_uart_resources[] = { |
| 223 | { |
| 224 | .start = 0xFFC00400, |
| 225 | .end = 0xFFC004FF, |
| 226 | .flags = IORESOURCE_MEM, |
| 227 | }, |
| 228 | }; |
| 229 | |
| 230 | static struct platform_device bfin_uart_device = { |
| 231 | .name = "bfin-uart", |
| 232 | .id = 1, |
| 233 | .num_resources = ARRAY_SIZE(bfin_uart_resources), |
| 234 | .resource = bfin_uart_resources, |
| 235 | }; |
| 236 | #endif |
| 237 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 238 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 239 | #ifdef CONFIG_BFIN_SIR0 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 240 | static struct resource bfin_sir0_resources[] = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 241 | { |
| 242 | .start = 0xFFC00400, |
| 243 | .end = 0xFFC004FF, |
| 244 | .flags = IORESOURCE_MEM, |
| 245 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 246 | { |
| 247 | .start = IRQ_UART0_RX, |
| 248 | .end = IRQ_UART0_RX+1, |
| 249 | .flags = IORESOURCE_IRQ, |
| 250 | }, |
| 251 | { |
| 252 | .start = CH_UART0_RX, |
| 253 | .end = CH_UART0_RX+1, |
| 254 | .flags = IORESOURCE_DMA, |
| 255 | }, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 256 | }; |
| 257 | |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 258 | static struct platform_device bfin_sir0_device = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 259 | .name = "bfin_sir", |
| 260 | .id = 0, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 261 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
| 262 | .resource = bfin_sir0_resources, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 263 | }; |
| 264 | #endif |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 265 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 266 | |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 267 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 268 | #include <linux/input.h> |
| 269 | #include <linux/gpio_keys.h> |
| 270 | |
| 271 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
| 272 | {BTN_0, GPIO_PF7, 1, "gpio-keys: BTN0"}, |
| 273 | {BTN_1, GPIO_PF8, 1, "gpio-keys: BTN1"}, |
| 274 | {BTN_2, GPIO_PF9, 1, "gpio-keys: BTN2"}, |
| 275 | {BTN_3, GPIO_PF10, 1, "gpio-keys: BTN3"}, |
| 276 | }; |
| 277 | |
| 278 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { |
| 279 | .buttons = bfin_gpio_keys_table, |
| 280 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), |
| 281 | }; |
| 282 | |
| 283 | static struct platform_device bfin_device_gpiokeys = { |
| 284 | .name = "gpio-keys", |
| 285 | .dev = { |
| 286 | .platform_data = &bfin_gpio_keys_data, |
| 287 | }, |
| 288 | }; |
| 289 | #endif |
| 290 | |
Mike Frysinger | cad2ab6 | 2008-02-22 17:01:31 +0800 | [diff] [blame] | 291 | static struct resource bfin_gpios_resources = { |
| 292 | .start = 0, |
| 293 | .end = MAX_BLACKFIN_GPIOS - 1, |
| 294 | .flags = IORESOURCE_IRQ, |
| 295 | }; |
| 296 | |
| 297 | static struct platform_device bfin_gpios_device = { |
| 298 | .name = "simple-gpio", |
| 299 | .id = -1, |
| 300 | .num_resources = 1, |
| 301 | .resource = &bfin_gpios_resources, |
| 302 | }; |
| 303 | |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 304 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
| 305 | #include <linux/i2c-gpio.h> |
| 306 | |
| 307 | static struct i2c_gpio_platform_data i2c_gpio_data = { |
| 308 | .sda_pin = 1, |
| 309 | .scl_pin = 0, |
| 310 | .sda_is_open_drain = 0, |
| 311 | .scl_is_open_drain = 0, |
| 312 | .udelay = 40, |
| 313 | }; |
| 314 | |
| 315 | static struct platform_device i2c_gpio_device = { |
| 316 | .name = "i2c-gpio", |
| 317 | .id = 0, |
| 318 | .dev = { |
| 319 | .platform_data = &i2c_gpio_data, |
| 320 | }, |
| 321 | }; |
| 322 | #endif |
| 323 | |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 324 | static const unsigned int cclk_vlev_datasheet[] = |
| 325 | { |
| 326 | VRPAIR(VLEV_085, 250000000), |
| 327 | VRPAIR(VLEV_090, 376000000), |
| 328 | VRPAIR(VLEV_095, 426000000), |
| 329 | VRPAIR(VLEV_100, 426000000), |
| 330 | VRPAIR(VLEV_105, 476000000), |
| 331 | VRPAIR(VLEV_110, 476000000), |
| 332 | VRPAIR(VLEV_115, 476000000), |
| 333 | VRPAIR(VLEV_120, 600000000), |
| 334 | VRPAIR(VLEV_125, 600000000), |
| 335 | VRPAIR(VLEV_130, 600000000), |
| 336 | }; |
| 337 | |
| 338 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { |
| 339 | .tuple_tab = cclk_vlev_datasheet, |
| 340 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), |
| 341 | .vr_settling_time = 25 /* us */, |
| 342 | }; |
| 343 | |
| 344 | static struct platform_device bfin_dpmc = { |
| 345 | .name = "bfin dpmc", |
| 346 | .dev = { |
| 347 | .platform_data = &bfin_dmpc_vreg_data, |
| 348 | }, |
| 349 | }; |
| 350 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 351 | static struct platform_device *ezkit_devices[] __initdata = { |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 352 | |
| 353 | &bfin_dpmc, |
| 354 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 355 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 356 | &smc91x_device, |
| 357 | #endif |
| 358 | |
| 359 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 360 | &bfin_spi0_device, |
| 361 | #endif |
| 362 | |
| 363 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) |
| 364 | &bfin_fb_adv7393_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 365 | #endif |
| 366 | |
| 367 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 368 | &rtc_device, |
| 369 | #endif |
| 370 | |
Sonic Zhang | e062cea | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 371 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
| 372 | &bfin_uart_device, |
| 373 | #endif |
| 374 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 375 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 376 | #ifdef CONFIG_BFIN_SIR0 |
| 377 | &bfin_sir0_device, |
| 378 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 379 | #endif |
| 380 | |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 381 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 382 | &bfin_device_gpiokeys, |
| 383 | #endif |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 384 | |
| 385 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
| 386 | &i2c_gpio_device, |
| 387 | #endif |
Mike Frysinger | cad2ab6 | 2008-02-22 17:01:31 +0800 | [diff] [blame] | 388 | |
| 389 | &bfin_gpios_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 390 | }; |
| 391 | |
| 392 | static int __init ezkit_init(void) |
| 393 | { |
Harvey Harrison | b85d858 | 2008-04-23 09:39:01 +0800 | [diff] [blame] | 394 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 395 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 396 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 397 | return 0; |
| 398 | } |
| 399 | |
| 400 | arch_initcall(ezkit_init); |