Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: arch/blackfin/mach-bf533/boards/cm_bf561.c |
| 3 | * Based on: arch/blackfin/mach-bf533/boards/ezkit.c |
Simon Arlott | d2d50aa | 2007-06-11 15:31:30 +0800 | [diff] [blame] | 4 | * Author: Aidan Williams <aidan@nicta.com.au> Copyright 2005 |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 5 | * |
| 6 | * Created: 2006 |
| 7 | * Description: Board description file |
| 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> |
| 32 | #include <linux/mtd/mtd.h> |
| 33 | #include <linux/mtd/partitions.h> |
| 34 | #include <linux/spi/spi.h> |
| 35 | #include <linux/spi/flash.h> |
Mike Frysinger | b964c59 | 2008-05-10 00:06:10 +0800 | [diff] [blame] | 36 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
Mike Frysinger | f02bcec | 2007-11-15 21:29:15 +0800 | [diff] [blame] | 37 | #include <linux/usb/isp1362.h> |
Mike Frysinger | b964c59 | 2008-05-10 00:06:10 +0800 | [diff] [blame] | 38 | #endif |
Jeff Garzik | 0a87e3e | 2008-02-01 18:02:30 -0500 | [diff] [blame] | 39 | #include <linux/ata_platform.h> |
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 | 066954a | 2007-10-21 22:36:06 +0800 | [diff] [blame] | 49 | const char bfin_board_name[] = "Bluetechnix CM BF561"; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | |
| 51 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Simon Arlott | d2d50aa | 2007-06-11 15:31:30 +0800 | [diff] [blame] | 52 | /* all SPI peripherals info goes here */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 53 | |
| 54 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 55 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
| 56 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 57 | .name = "bootloader(spi)", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 58 | .size = 0x00020000, |
| 59 | .offset = 0, |
| 60 | .mask_flags = MTD_CAP_ROM |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 61 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 62 | .name = "linux kernel(spi)", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 63 | .size = 0xe0000, |
| 64 | .offset = 0x20000 |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 65 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 66 | .name = "file system(spi)", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 67 | .size = 0x700000, |
| 68 | .offset = 0x00100000, |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | static struct flash_platform_data bfin_spi_flash_data = { |
| 73 | .name = "m25p80", |
| 74 | .parts = bfin_spi_flash_partitions, |
| 75 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), |
| 76 | .type = "m25p64", |
| 77 | }; |
| 78 | |
| 79 | /* SPI flash chip (m25p64) */ |
| 80 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
| 81 | .enable_dma = 0, /* use dma transfer with this chip*/ |
| 82 | .bits_per_word = 8, |
| 83 | }; |
| 84 | #endif |
| 85 | |
| 86 | #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE) |
| 87 | /* SPI ADC chip */ |
| 88 | static struct bfin5xx_spi_chip spi_adc_chip_info = { |
| 89 | .enable_dma = 1, /* use dma transfer with this chip*/ |
| 90 | .bits_per_word = 16, |
| 91 | }; |
| 92 | #endif |
| 93 | |
| 94 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 95 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
| 96 | .enable_dma = 0, |
| 97 | .bits_per_word = 16, |
| 98 | }; |
| 99 | #endif |
| 100 | |
| 101 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) |
| 102 | static struct bfin5xx_spi_chip ad9960_spi_chip_info = { |
| 103 | .enable_dma = 0, |
| 104 | .bits_per_word = 16, |
| 105 | }; |
| 106 | #endif |
| 107 | |
| 108 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) |
| 109 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { |
| 110 | .enable_dma = 1, |
| 111 | .bits_per_word = 8, |
| 112 | }; |
| 113 | #endif |
| 114 | |
| 115 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 116 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
| 117 | { |
| 118 | /* the modalias must be the same as spi device driver name */ |
| 119 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
| 120 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 121 | .bus_num = 0, /* Framework bus number */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 122 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ |
| 123 | .platform_data = &bfin_spi_flash_data, |
| 124 | .controller_data = &spi_flash_chip_info, |
| 125 | .mode = SPI_MODE_3, |
| 126 | }, |
| 127 | #endif |
| 128 | |
| 129 | #if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE) |
| 130 | { |
| 131 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ |
| 132 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 133 | .bus_num = 0, /* Framework bus number */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 134 | .chip_select = 1, /* Framework chip select. */ |
| 135 | .platform_data = NULL, /* No spi_driver specific config */ |
| 136 | .controller_data = &spi_adc_chip_info, |
| 137 | }, |
| 138 | #endif |
| 139 | |
| 140 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
| 141 | { |
| 142 | .modalias = "ad1836-spi", |
| 143 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 144 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 145 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
| 146 | .controller_data = &ad1836_spi_chip_info, |
| 147 | }, |
| 148 | #endif |
| 149 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) |
| 150 | { |
| 151 | .modalias = "ad9960-spi", |
| 152 | .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 153 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 154 | .chip_select = 1, |
| 155 | .controller_data = &ad9960_spi_chip_info, |
| 156 | }, |
| 157 | #endif |
| 158 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) |
| 159 | { |
| 160 | .modalias = "spi_mmc", |
| 161 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 162 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 163 | .chip_select = CONFIG_SPI_MMC_CS_CHAN, |
| 164 | .platform_data = NULL, |
| 165 | .controller_data = &spi_mmc_chip_info, |
| 166 | .mode = SPI_MODE_3, |
| 167 | }, |
| 168 | #endif |
| 169 | }; |
| 170 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 171 | /* SPI (0) */ |
| 172 | static struct resource bfin_spi0_resource[] = { |
| 173 | [0] = { |
| 174 | .start = SPI0_REGBASE, |
| 175 | .end = SPI0_REGBASE + 0xFF, |
| 176 | .flags = IORESOURCE_MEM, |
| 177 | }, |
| 178 | [1] = { |
| 179 | .start = CH_SPI, |
| 180 | .end = CH_SPI, |
| 181 | .flags = IORESOURCE_IRQ, |
| 182 | } |
| 183 | }; |
| 184 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 185 | /* SPI controller data */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 186 | static struct bfin5xx_spi_master bfin_spi0_info = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 187 | .num_chipselect = 8, |
| 188 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 189 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 190 | }; |
| 191 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 192 | static struct platform_device bfin_spi0_device = { |
| 193 | .name = "bfin-spi", |
| 194 | .id = 0, /* Bus number */ |
| 195 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 196 | .resource = bfin_spi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 197 | .dev = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 198 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 199 | }, |
| 200 | }; |
| 201 | #endif /* spi master and devices */ |
| 202 | |
| 203 | |
Michael Hennerich | 0d4a89b | 2008-01-27 19:58:46 +0800 | [diff] [blame] | 204 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) |
| 205 | static struct platform_device hitachi_fb_device = { |
| 206 | .name = "hitachi-tx09", |
| 207 | }; |
| 208 | #endif |
| 209 | |
| 210 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 211 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 212 | |
| 213 | static struct resource smc91x_resources[] = { |
| 214 | { |
| 215 | .name = "smc91x-regs", |
| 216 | .start = 0x28000300, |
| 217 | .end = 0x28000300 + 16, |
| 218 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 219 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 220 | .start = IRQ_PF0, |
| 221 | .end = IRQ_PF0, |
| 222 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 223 | }, |
| 224 | }; |
| 225 | static struct platform_device smc91x_device = { |
| 226 | .name = "smc91x", |
| 227 | .id = 0, |
| 228 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 229 | .resource = smc91x_resources, |
| 230 | }; |
| 231 | #endif |
| 232 | |
Mike Frysinger | c97618d | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 233 | static struct resource bfin_gpios_resources = { |
| 234 | .start = 0, |
| 235 | .end = MAX_BLACKFIN_GPIOS - 1, |
| 236 | .flags = IORESOURCE_IRQ, |
| 237 | }; |
| 238 | |
| 239 | static struct platform_device bfin_gpios_device = { |
| 240 | .name = "simple-gpio", |
| 241 | .id = -1, |
| 242 | .num_resources = 1, |
| 243 | .resource = &bfin_gpios_resources, |
| 244 | }; |
| 245 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 246 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 247 | static struct resource isp1362_hcd_resources[] = { |
| 248 | { |
| 249 | .start = 0x24008000, |
| 250 | .end = 0x24008000, |
| 251 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 252 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 253 | .start = 0x24008004, |
| 254 | .end = 0x24008004, |
| 255 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 256 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 257 | .start = IRQ_PF47, |
| 258 | .end = IRQ_PF47, |
| 259 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 260 | }, |
| 261 | }; |
| 262 | |
| 263 | static struct isp1362_platform_data isp1362_priv = { |
| 264 | .sel15Kres = 1, |
| 265 | .clknotstop = 0, |
| 266 | .oc_enable = 0, |
| 267 | .int_act_high = 0, |
| 268 | .int_edge_triggered = 0, |
| 269 | .remote_wakeup_connected = 0, |
| 270 | .no_power_switching = 1, |
| 271 | .power_switching_mode = 0, |
| 272 | }; |
| 273 | |
| 274 | static struct platform_device isp1362_hcd_device = { |
| 275 | .name = "isp1362-hcd", |
| 276 | .id = 0, |
| 277 | .dev = { |
| 278 | .platform_data = &isp1362_priv, |
| 279 | }, |
| 280 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), |
| 281 | .resource = isp1362_hcd_resources, |
| 282 | }; |
| 283 | #endif |
| 284 | |
| 285 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
| 286 | static struct resource bfin_uart_resources[] = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 287 | { |
| 288 | .start = 0xFFC00400, |
| 289 | .end = 0xFFC004FF, |
| 290 | .flags = IORESOURCE_MEM, |
| 291 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 292 | }; |
| 293 | |
| 294 | static struct platform_device bfin_uart_device = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 295 | .name = "bfin-uart", |
| 296 | .id = 1, |
| 297 | .num_resources = ARRAY_SIZE(bfin_uart_resources), |
| 298 | .resource = bfin_uart_resources, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 299 | }; |
| 300 | #endif |
| 301 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 302 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 303 | #ifdef CONFIG_BFIN_SIR0 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 304 | static struct resource bfin_sir0_resources[] = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 305 | { |
| 306 | .start = 0xFFC00400, |
| 307 | .end = 0xFFC004FF, |
| 308 | .flags = IORESOURCE_MEM, |
| 309 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 310 | { |
| 311 | .start = IRQ_UART0_RX, |
| 312 | .end = IRQ_UART0_RX+1, |
| 313 | .flags = IORESOURCE_IRQ, |
| 314 | }, |
| 315 | { |
| 316 | .start = CH_UART0_RX, |
| 317 | .end = CH_UART0_RX+1, |
| 318 | .flags = IORESOURCE_DMA, |
| 319 | }, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 320 | }; |
| 321 | |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 322 | static struct platform_device bfin_sir0_device = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 323 | .name = "bfin_sir", |
| 324 | .id = 0, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 325 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
| 326 | .resource = bfin_sir0_resources, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 327 | }; |
| 328 | #endif |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 329 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 330 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 331 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
Mike Frysinger | fe5aeb9 | 2008-08-05 18:29:56 +0800 | [diff] [blame] | 332 | #define PATA_INT IRQ_PF46 |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 333 | |
| 334 | static struct pata_platform_info bfin_pata_platform_data = { |
| 335 | .ioport_shift = 2, |
| 336 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, |
| 337 | }; |
| 338 | |
| 339 | static struct resource bfin_pata_resources[] = { |
| 340 | { |
| 341 | .start = 0x2400C000, |
| 342 | .end = 0x2400C001F, |
| 343 | .flags = IORESOURCE_MEM, |
| 344 | }, |
| 345 | { |
| 346 | .start = 0x2400D018, |
| 347 | .end = 0x2400D01B, |
| 348 | .flags = IORESOURCE_MEM, |
| 349 | }, |
| 350 | { |
| 351 | .start = PATA_INT, |
| 352 | .end = PATA_INT, |
| 353 | .flags = IORESOURCE_IRQ, |
| 354 | }, |
| 355 | }; |
| 356 | |
| 357 | static struct platform_device bfin_pata_device = { |
| 358 | .name = "pata_platform", |
| 359 | .id = -1, |
| 360 | .num_resources = ARRAY_SIZE(bfin_pata_resources), |
| 361 | .resource = bfin_pata_resources, |
| 362 | .dev = { |
| 363 | .platform_data = &bfin_pata_platform_data, |
| 364 | } |
| 365 | }; |
| 366 | #endif |
| 367 | |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 368 | static const unsigned int cclk_vlev_datasheet[] = |
| 369 | { |
| 370 | VRPAIR(VLEV_085, 250000000), |
| 371 | VRPAIR(VLEV_090, 300000000), |
| 372 | VRPAIR(VLEV_095, 313000000), |
| 373 | VRPAIR(VLEV_100, 350000000), |
| 374 | VRPAIR(VLEV_105, 400000000), |
| 375 | VRPAIR(VLEV_110, 444000000), |
| 376 | VRPAIR(VLEV_115, 450000000), |
| 377 | VRPAIR(VLEV_120, 475000000), |
| 378 | VRPAIR(VLEV_125, 500000000), |
| 379 | VRPAIR(VLEV_130, 600000000), |
| 380 | }; |
| 381 | |
| 382 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { |
| 383 | .tuple_tab = cclk_vlev_datasheet, |
| 384 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), |
| 385 | .vr_settling_time = 25 /* us */, |
| 386 | }; |
| 387 | |
| 388 | static struct platform_device bfin_dpmc = { |
| 389 | .name = "bfin dpmc", |
| 390 | .dev = { |
| 391 | .platform_data = &bfin_dmpc_vreg_data, |
| 392 | }, |
| 393 | }; |
| 394 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 395 | static struct platform_device *cm_bf561_devices[] __initdata = { |
| 396 | |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 397 | &bfin_dpmc, |
| 398 | |
Michael Hennerich | 0d4a89b | 2008-01-27 19:58:46 +0800 | [diff] [blame] | 399 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) |
| 400 | &hitachi_fb_device, |
| 401 | #endif |
| 402 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 403 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 404 | &bfin_uart_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 405 | #endif |
| 406 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 407 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame^] | 408 | #ifdef CONFIG_BFIN_SIR0 |
| 409 | &bfin_sir0_device, |
| 410 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 411 | #endif |
| 412 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 413 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 414 | &isp1362_hcd_device, |
| 415 | #endif |
| 416 | |
| 417 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 418 | &smc91x_device, |
| 419 | #endif |
| 420 | |
| 421 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 422 | &bfin_spi0_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 423 | #endif |
| 424 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 425 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 426 | &bfin_pata_device, |
| 427 | #endif |
Mike Frysinger | c97618d | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 428 | |
| 429 | &bfin_gpios_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | static int __init cm_bf561_init(void) |
| 433 | { |
Harvey Harrison | b85d858 | 2008-04-23 09:39:01 +0800 | [diff] [blame] | 434 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 435 | platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); |
| 436 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 437 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
| 438 | #endif |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 439 | |
| 440 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 441 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
| 442 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 443 | return 0; |
| 444 | } |
| 445 | |
| 446 | arch_initcall(cm_bf561_init); |