Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 2 | * Copyright 2004-2009 Analog Devices Inc. |
| 3 | * 2005 National ICT Australia (NICTA) |
| 4 | * Aidan Williams <aidan@nicta.com.au> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 5 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 6 | * Licensed under the GPL-2 or later. |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <linux/device.h> |
| 10 | #include <linux/platform_device.h> |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 11 | #include <linux/mtd/mtd.h> |
| 12 | #include <linux/mtd/partitions.h> |
| 13 | #include <linux/mtd/physmap.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 14 | #include <linux/spi/spi.h> |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 15 | #include <linux/irq.h> |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 16 | #include <linux/interrupt.h> |
Steven Miao | 4ba7b5f | 2014-07-16 14:37:31 +0800 | [diff] [blame] | 17 | #include <linux/gpio.h> |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 18 | #include <linux/delay.h> |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 19 | #include <asm/dma.h> |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 20 | #include <asm/bfin5xx_spi.h> |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 21 | #include <asm/portmux.h> |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 22 | #include <asm/dpmc.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 23 | |
| 24 | /* |
| 25 | * Name the Board for the /proc/cpuinfo |
| 26 | */ |
Mike Frysinger | fe85cad | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 27 | const char bfin_board_name[] = "ADI BF561-EZKIT"; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 28 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 29 | #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 30 | #include <linux/usb/isp1760.h> |
| 31 | static struct resource bfin_isp1760_resources[] = { |
| 32 | [0] = { |
| 33 | .start = 0x2C0F0000, |
| 34 | .end = 0x203C0000 + 0xfffff, |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 35 | .flags = IORESOURCE_MEM, |
| 36 | }, |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 37 | [1] = { |
| 38 | .start = IRQ_PF10, |
| 39 | .end = IRQ_PF10, |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 40 | .flags = IORESOURCE_IRQ, |
| 41 | }, |
| 42 | }; |
| 43 | |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 44 | static struct isp1760_platform_data isp1760_priv = { |
| 45 | .is_isp1761 = 0, |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 46 | .bus_width_16 = 1, |
| 47 | .port1_otg = 0, |
| 48 | .analog_oc = 0, |
| 49 | .dack_polarity_high = 0, |
| 50 | .dreq_polarity_high = 0, |
| 51 | }; |
| 52 | |
| 53 | static struct platform_device bfin_isp1760_device = { |
Michael Hennerich | c6feb76 | 2009-10-15 10:37:33 +0000 | [diff] [blame] | 54 | .name = "isp1760", |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 55 | .id = 0, |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 56 | .dev = { |
| 57 | .platform_data = &isp1760_priv, |
| 58 | }, |
| 59 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), |
| 60 | .resource = bfin_isp1760_resources, |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 61 | }; |
Michael Hennerich | 140a9ae | 2007-05-21 18:09:13 +0800 | [diff] [blame] | 62 | #endif |
| 63 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 64 | #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame] | 65 | #include <linux/usb/isp1362.h> |
| 66 | |
| 67 | static struct resource isp1362_hcd_resources[] = { |
| 68 | { |
| 69 | .start = 0x2c060000, |
| 70 | .end = 0x2c060000, |
| 71 | .flags = IORESOURCE_MEM, |
| 72 | }, { |
| 73 | .start = 0x2c060004, |
| 74 | .end = 0x2c060004, |
| 75 | .flags = IORESOURCE_MEM, |
| 76 | }, { |
| 77 | .start = IRQ_PF8, |
| 78 | .end = IRQ_PF8, |
Michael Hennerich | 9e75894 | 2010-03-18 12:51:49 +0000 | [diff] [blame] | 79 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame] | 80 | }, |
| 81 | }; |
| 82 | |
| 83 | static struct isp1362_platform_data isp1362_priv = { |
| 84 | .sel15Kres = 1, |
| 85 | .clknotstop = 0, |
| 86 | .oc_enable = 0, |
| 87 | .int_act_high = 0, |
| 88 | .int_edge_triggered = 0, |
| 89 | .remote_wakeup_connected = 0, |
| 90 | .no_power_switching = 1, |
| 91 | .power_switching_mode = 0, |
| 92 | }; |
| 93 | |
| 94 | static struct platform_device isp1362_hcd_device = { |
| 95 | .name = "isp1362-hcd", |
| 96 | .id = 0, |
| 97 | .dev = { |
| 98 | .platform_data = &isp1362_priv, |
| 99 | }, |
| 100 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), |
| 101 | .resource = isp1362_hcd_resources, |
| 102 | }; |
| 103 | #endif |
| 104 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 105 | #if IS_ENABLED(CONFIG_USB_NET2272) |
Michael Hennerich | 83d9cde | 2008-02-02 16:25:17 +0800 | [diff] [blame] | 106 | static struct resource net2272_bfin_resources[] = { |
| 107 | { |
| 108 | .start = 0x2C000000, |
| 109 | .end = 0x2C000000 + 0x7F, |
| 110 | .flags = IORESOURCE_MEM, |
| 111 | }, { |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 112 | .start = 1, |
| 113 | .flags = IORESOURCE_BUS, |
| 114 | }, { |
Michael Hennerich | 83d9cde | 2008-02-02 16:25:17 +0800 | [diff] [blame] | 115 | .start = IRQ_PF10, |
| 116 | .end = IRQ_PF10, |
| 117 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
| 118 | }, |
| 119 | }; |
| 120 | |
| 121 | static struct platform_device net2272_bfin_device = { |
| 122 | .name = "net2272", |
| 123 | .id = -1, |
| 124 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), |
| 125 | .resource = net2272_bfin_resources, |
| 126 | }; |
| 127 | #endif |
| 128 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 129 | /* |
| 130 | * USB-LAN EzExtender board |
| 131 | * Driver needs to know address, irq and flag pin. |
| 132 | */ |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 133 | #if IS_ENABLED(CONFIG_SMC91X) |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 134 | #include <linux/smc91x.h> |
| 135 | |
| 136 | static struct smc91x_platdata smc91x_info = { |
| 137 | .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT, |
| 138 | .leda = RPC_LED_100_10, |
| 139 | .ledb = RPC_LED_TX_RX, |
| 140 | }; |
| 141 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 142 | static struct resource smc91x_resources[] = { |
| 143 | { |
| 144 | .name = "smc91x-regs", |
| 145 | .start = 0x2C010300, |
| 146 | .end = 0x2C010300 + 16, |
| 147 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 148 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 149 | |
| 150 | .start = IRQ_PF9, |
| 151 | .end = IRQ_PF9, |
| 152 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 153 | }, |
| 154 | }; |
| 155 | |
| 156 | static struct platform_device smc91x_device = { |
| 157 | .name = "smc91x", |
| 158 | .id = 0, |
| 159 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 160 | .resource = smc91x_resources, |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 161 | .dev = { |
| 162 | .platform_data = &smc91x_info, |
| 163 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 164 | }; |
| 165 | #endif |
| 166 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 167 | #if IS_ENABLED(CONFIG_SERIAL_BFIN) |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 168 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 169 | static struct resource bfin_uart0_resources[] = { |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 170 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 171 | .start = BFIN_UART_THR, |
| 172 | .end = BFIN_UART_GCTL+2, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 173 | .flags = IORESOURCE_MEM, |
| 174 | }, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 175 | { |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 176 | .start = IRQ_UART_TX, |
| 177 | .end = IRQ_UART_TX, |
| 178 | .flags = IORESOURCE_IRQ, |
| 179 | }, |
| 180 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 181 | .start = IRQ_UART_RX, |
Sonic Zhang | edb0a64 | 2011-08-01 17:53:21 +0800 | [diff] [blame] | 182 | .end = IRQ_UART_RX, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 183 | .flags = IORESOURCE_IRQ, |
| 184 | }, |
| 185 | { |
| 186 | .start = IRQ_UART_ERROR, |
| 187 | .end = IRQ_UART_ERROR, |
| 188 | .flags = IORESOURCE_IRQ, |
| 189 | }, |
| 190 | { |
| 191 | .start = CH_UART_TX, |
| 192 | .end = CH_UART_TX, |
| 193 | .flags = IORESOURCE_DMA, |
| 194 | }, |
| 195 | { |
| 196 | .start = CH_UART_RX, |
| 197 | .end = CH_UART_RX, |
| 198 | .flags = IORESOURCE_DMA, |
| 199 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 200 | }; |
| 201 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 202 | static unsigned short bfin_uart0_peripherals[] = { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 203 | P_UART0_TX, P_UART0_RX, 0 |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 204 | }; |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 205 | |
| 206 | static struct platform_device bfin_uart0_device = { |
| 207 | .name = "bfin-uart", |
| 208 | .id = 0, |
| 209 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
| 210 | .resource = bfin_uart0_resources, |
| 211 | .dev = { |
| 212 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ |
| 213 | }, |
| 214 | }; |
| 215 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 216 | #endif |
| 217 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 218 | #if IS_ENABLED(CONFIG_BFIN_SIR) |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 219 | #ifdef CONFIG_BFIN_SIR0 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 220 | static struct resource bfin_sir0_resources[] = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 221 | { |
| 222 | .start = 0xFFC00400, |
| 223 | .end = 0xFFC004FF, |
| 224 | .flags = IORESOURCE_MEM, |
| 225 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 226 | { |
| 227 | .start = IRQ_UART0_RX, |
| 228 | .end = IRQ_UART0_RX+1, |
| 229 | .flags = IORESOURCE_IRQ, |
| 230 | }, |
| 231 | { |
| 232 | .start = CH_UART0_RX, |
| 233 | .end = CH_UART0_RX+1, |
| 234 | .flags = IORESOURCE_DMA, |
| 235 | }, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 236 | }; |
| 237 | |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 238 | static struct platform_device bfin_sir0_device = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 239 | .name = "bfin_sir", |
| 240 | .id = 0, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 241 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
| 242 | .resource = bfin_sir0_resources, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 243 | }; |
| 244 | #endif |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 245 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 246 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 247 | #if IS_ENABLED(CONFIG_MTD_PHYSMAP) |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 248 | static struct mtd_partition ezkit_partitions[] = { |
| 249 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 250 | .name = "bootloader(nor)", |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 251 | .size = 0x40000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 252 | .offset = 0, |
| 253 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 254 | .name = "linux kernel(nor)", |
Grace Pan | ac76d88 | 2008-04-24 06:33:56 +0800 | [diff] [blame] | 255 | .size = 0x1C0000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 256 | .offset = MTDPART_OFS_APPEND, |
| 257 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 258 | .name = "file system(nor)", |
Mike Frysinger | 5607204 | 2011-05-09 18:46:17 -0400 | [diff] [blame] | 259 | .size = 0x800000 - 0x40000 - 0x1C0000 - 0x2000 * 8, |
| 260 | .offset = MTDPART_OFS_APPEND, |
| 261 | }, { |
| 262 | .name = "config(nor)", |
| 263 | .size = 0x2000 * 7, |
| 264 | .offset = MTDPART_OFS_APPEND, |
| 265 | }, { |
| 266 | .name = "u-boot env(nor)", |
| 267 | .size = 0x2000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 268 | .offset = MTDPART_OFS_APPEND, |
| 269 | } |
| 270 | }; |
| 271 | |
| 272 | static struct physmap_flash_data ezkit_flash_data = { |
| 273 | .width = 2, |
| 274 | .parts = ezkit_partitions, |
| 275 | .nr_parts = ARRAY_SIZE(ezkit_partitions), |
| 276 | }; |
| 277 | |
| 278 | static struct resource ezkit_flash_resource = { |
| 279 | .start = 0x20000000, |
| 280 | .end = 0x207fffff, |
| 281 | .flags = IORESOURCE_MEM, |
| 282 | }; |
| 283 | |
| 284 | static struct platform_device ezkit_flash_device = { |
| 285 | .name = "physmap-flash", |
| 286 | .id = 0, |
| 287 | .dev = { |
| 288 | .platform_data = &ezkit_flash_data, |
| 289 | }, |
| 290 | .num_resources = 1, |
| 291 | .resource = &ezkit_flash_resource, |
| 292 | }; |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 293 | #endif |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 294 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 295 | #if IS_ENABLED(CONFIG_SPI_BFIN5XX) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 296 | /* SPI (0) */ |
| 297 | static struct resource bfin_spi0_resource[] = { |
| 298 | [0] = { |
| 299 | .start = SPI0_REGBASE, |
| 300 | .end = SPI0_REGBASE + 0xFF, |
| 301 | .flags = IORESOURCE_MEM, |
| 302 | }, |
| 303 | [1] = { |
| 304 | .start = CH_SPI, |
| 305 | .end = CH_SPI, |
Yi Li | 5312269 | 2009-06-05 12:11:11 +0000 | [diff] [blame] | 306 | .flags = IORESOURCE_DMA, |
| 307 | }, |
| 308 | [2] = { |
| 309 | .start = IRQ_SPI, |
| 310 | .end = IRQ_SPI, |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 311 | .flags = IORESOURCE_IRQ, |
| 312 | } |
| 313 | }; |
| 314 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 315 | /* SPI controller data */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 316 | static struct bfin5xx_spi_master bfin_spi0_info = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 317 | .num_chipselect = 8, |
| 318 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 319 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 320 | }; |
| 321 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 322 | static struct platform_device bfin_spi0_device = { |
| 323 | .name = "bfin-spi", |
| 324 | .id = 0, /* Bus number */ |
| 325 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 326 | .resource = bfin_spi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 327 | .dev = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 328 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 329 | }, |
| 330 | }; |
Mike Frysinger | 5bda272 | 2008-06-07 15:03:01 +0800 | [diff] [blame] | 331 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 332 | |
| 333 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 334 | #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 335 | { |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 336 | .modalias = "ad183x", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 337 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 338 | .bus_num = 0, |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 339 | .chip_select = 4, |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 340 | .platform_data = "ad1836", /* only includes chip name for the moment */ |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 341 | .mode = SPI_MODE_3, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 342 | }, |
| 343 | #endif |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 344 | #if IS_ENABLED(CONFIG_SPI_SPIDEV) |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 345 | { |
| 346 | .modalias = "spidev", |
| 347 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 348 | .bus_num = 0, |
| 349 | .chip_select = 1, |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 350 | }, |
| 351 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 354 | #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 355 | #include <linux/input.h> |
| 356 | #include <linux/gpio_keys.h> |
| 357 | |
| 358 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
| 359 | {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"}, |
| 360 | {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"}, |
| 361 | {BTN_2, GPIO_PF7, 1, "gpio-keys: BTN2"}, |
| 362 | {BTN_3, GPIO_PF8, 1, "gpio-keys: BTN3"}, |
| 363 | }; |
| 364 | |
| 365 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { |
| 366 | .buttons = bfin_gpio_keys_table, |
| 367 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), |
| 368 | }; |
| 369 | |
| 370 | static struct platform_device bfin_device_gpiokeys = { |
| 371 | .name = "gpio-keys", |
| 372 | .dev = { |
| 373 | .platform_data = &bfin_gpio_keys_data, |
| 374 | }, |
| 375 | }; |
| 376 | #endif |
| 377 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 378 | #if IS_ENABLED(CONFIG_I2C_GPIO) |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 379 | #include <linux/i2c-gpio.h> |
| 380 | |
| 381 | static struct i2c_gpio_platform_data i2c_gpio_data = { |
Mike Frysinger | 3d7dc88 | 2010-07-02 21:02:50 +0000 | [diff] [blame] | 382 | .sda_pin = GPIO_PF1, |
| 383 | .scl_pin = GPIO_PF0, |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 384 | .sda_is_open_drain = 0, |
| 385 | .scl_is_open_drain = 0, |
Aaron Wu | 7c8e62d | 2011-12-12 18:04:54 +0800 | [diff] [blame] | 386 | .udelay = 10, |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 387 | }; |
| 388 | |
| 389 | static struct platform_device i2c_gpio_device = { |
| 390 | .name = "i2c-gpio", |
| 391 | .id = 0, |
| 392 | .dev = { |
| 393 | .platform_data = &i2c_gpio_data, |
| 394 | }, |
| 395 | }; |
| 396 | #endif |
| 397 | |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 398 | static const unsigned int cclk_vlev_datasheet[] = |
| 399 | { |
| 400 | VRPAIR(VLEV_085, 250000000), |
| 401 | VRPAIR(VLEV_090, 300000000), |
| 402 | VRPAIR(VLEV_095, 313000000), |
| 403 | VRPAIR(VLEV_100, 350000000), |
| 404 | VRPAIR(VLEV_105, 400000000), |
| 405 | VRPAIR(VLEV_110, 444000000), |
| 406 | VRPAIR(VLEV_115, 450000000), |
| 407 | VRPAIR(VLEV_120, 475000000), |
| 408 | VRPAIR(VLEV_125, 500000000), |
| 409 | VRPAIR(VLEV_130, 600000000), |
| 410 | }; |
| 411 | |
| 412 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { |
| 413 | .tuple_tab = cclk_vlev_datasheet, |
| 414 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), |
| 415 | .vr_settling_time = 25 /* us */, |
| 416 | }; |
| 417 | |
| 418 | static struct platform_device bfin_dpmc = { |
| 419 | .name = "bfin dpmc", |
| 420 | .dev = { |
| 421 | .platform_data = &bfin_dmpc_vreg_data, |
| 422 | }, |
| 423 | }; |
| 424 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 425 | #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 426 | #include <linux/videodev2.h> |
| 427 | #include <media/blackfin/bfin_capture.h> |
| 428 | #include <media/blackfin/ppi.h> |
| 429 | |
| 430 | static const unsigned short ppi_req[] = { |
| 431 | P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3, |
| 432 | P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, |
| 433 | P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2, |
| 434 | 0, |
| 435 | }; |
| 436 | |
| 437 | static const struct ppi_info ppi_info = { |
| 438 | .type = PPI_TYPE_PPI, |
| 439 | .dma_ch = CH_PPI0, |
| 440 | .irq_err = IRQ_PPI1_ERROR, |
| 441 | .base = (void __iomem *)PPI0_CONTROL, |
| 442 | .pin_req = ppi_req, |
| 443 | }; |
| 444 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 445 | #if IS_ENABLED(CONFIG_VIDEO_ADV7183) |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 446 | #include <media/adv7183.h> |
| 447 | static struct v4l2_input adv7183_inputs[] = { |
| 448 | { |
| 449 | .index = 0, |
| 450 | .name = "Composite", |
| 451 | .type = V4L2_INPUT_TYPE_CAMERA, |
| 452 | .std = V4L2_STD_ALL, |
Scott Jiang | c38670b | 2012-06-20 18:46:54 -0400 | [diff] [blame] | 453 | .capabilities = V4L2_IN_CAP_STD, |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 454 | }, |
| 455 | { |
| 456 | .index = 1, |
| 457 | .name = "S-Video", |
| 458 | .type = V4L2_INPUT_TYPE_CAMERA, |
| 459 | .std = V4L2_STD_ALL, |
Scott Jiang | c38670b | 2012-06-20 18:46:54 -0400 | [diff] [blame] | 460 | .capabilities = V4L2_IN_CAP_STD, |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 461 | }, |
| 462 | { |
| 463 | .index = 2, |
| 464 | .name = "Component", |
| 465 | .type = V4L2_INPUT_TYPE_CAMERA, |
| 466 | .std = V4L2_STD_ALL, |
Scott Jiang | c38670b | 2012-06-20 18:46:54 -0400 | [diff] [blame] | 467 | .capabilities = V4L2_IN_CAP_STD, |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 468 | }, |
| 469 | }; |
| 470 | |
| 471 | static struct bcap_route adv7183_routes[] = { |
| 472 | { |
| 473 | .input = ADV7183_COMPOSITE4, |
| 474 | .output = ADV7183_8BIT_OUT, |
| 475 | }, |
| 476 | { |
| 477 | .input = ADV7183_SVIDEO0, |
| 478 | .output = ADV7183_8BIT_OUT, |
| 479 | }, |
| 480 | { |
| 481 | .input = ADV7183_COMPONENT0, |
| 482 | .output = ADV7183_8BIT_OUT, |
| 483 | }, |
| 484 | }; |
| 485 | |
| 486 | |
| 487 | static const unsigned adv7183_gpio[] = { |
| 488 | GPIO_PF13, /* reset pin */ |
| 489 | GPIO_PF2, /* output enable pin */ |
| 490 | }; |
| 491 | |
| 492 | static struct bfin_capture_config bfin_capture_data = { |
| 493 | .card_name = "BF561", |
| 494 | .inputs = adv7183_inputs, |
| 495 | .num_inputs = ARRAY_SIZE(adv7183_inputs), |
| 496 | .routes = adv7183_routes, |
| 497 | .i2c_adapter_id = 0, |
| 498 | .board_info = { |
| 499 | .type = "adv7183", |
| 500 | .addr = 0x20, |
| 501 | .platform_data = (void *)adv7183_gpio, |
| 502 | }, |
| 503 | .ppi_info = &ppi_info, |
| 504 | .ppi_control = (PACK_EN | DLEN_8 | DMA32 | FLD_SEL), |
| 505 | }; |
| 506 | #endif |
| 507 | |
| 508 | static struct platform_device bfin_capture_device = { |
| 509 | .name = "bfin_capture", |
| 510 | .dev = { |
| 511 | .platform_data = &bfin_capture_data, |
| 512 | }, |
| 513 | }; |
| 514 | #endif |
| 515 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 516 | #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 517 | static struct platform_device bfin_i2s = { |
| 518 | .name = "bfin-i2s", |
| 519 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
| 520 | /* TODO: add platform data here */ |
| 521 | }; |
| 522 | #endif |
| 523 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 524 | #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 525 | static struct platform_device bfin_ac97 = { |
| 526 | .name = "bfin-ac97", |
| 527 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
| 528 | /* TODO: add platform data here */ |
| 529 | }; |
| 530 | #endif |
| 531 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 532 | #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) |
Scott Jiang | 63f49dc | 2012-08-10 18:06:09 -0400 | [diff] [blame] | 533 | static const char * const ad1836_link[] = { |
Lars-Peter Clausen | 34f4095 | 2013-05-28 19:22:16 +0200 | [diff] [blame] | 534 | "bfin-i2s.0", |
Scott Jiang | 63f49dc | 2012-08-10 18:06:09 -0400 | [diff] [blame] | 535 | "spi0.4", |
| 536 | }; |
| 537 | static struct platform_device bfin_ad1836_machine = { |
| 538 | .name = "bfin-snd-ad1836", |
| 539 | .id = -1, |
| 540 | .dev = { |
| 541 | .platform_data = (void *)ad1836_link, |
| 542 | }, |
| 543 | }; |
| 544 | #endif |
| 545 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 546 | static struct platform_device *ezkit_devices[] __initdata = { |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 547 | |
| 548 | &bfin_dpmc, |
| 549 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 550 | #if IS_ENABLED(CONFIG_SMC91X) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 551 | &smc91x_device, |
| 552 | #endif |
Michael Hennerich | 561cc18 | 2007-11-17 23:56:08 +0800 | [diff] [blame] | 553 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 554 | #if IS_ENABLED(CONFIG_USB_NET2272) |
Michael Hennerich | 83d9cde | 2008-02-02 16:25:17 +0800 | [diff] [blame] | 555 | &net2272_bfin_device, |
| 556 | #endif |
| 557 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 558 | #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 559 | &bfin_isp1760_device, |
| 560 | #endif |
| 561 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 562 | #if IS_ENABLED(CONFIG_SPI_BFIN5XX) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 563 | &bfin_spi0_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 564 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 565 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 566 | #if IS_ENABLED(CONFIG_SERIAL_BFIN) |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 567 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 568 | &bfin_uart0_device, |
| 569 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 570 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 571 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 572 | #if IS_ENABLED(CONFIG_BFIN_SIR) |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 573 | #ifdef CONFIG_BFIN_SIR0 |
| 574 | &bfin_sir0_device, |
| 575 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 576 | #endif |
| 577 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 578 | #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 579 | &bfin_device_gpiokeys, |
| 580 | #endif |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 581 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 582 | #if IS_ENABLED(CONFIG_I2C_GPIO) |
Bryan Wu | e316395 | 2008-01-24 16:19:15 +0800 | [diff] [blame] | 583 | &i2c_gpio_device, |
| 584 | #endif |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame] | 585 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 586 | #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) |
Michael Hennerich | e9d76c2 | 2008-02-02 14:55:28 +0800 | [diff] [blame] | 587 | &isp1362_hcd_device, |
| 588 | #endif |
| 589 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 590 | #if IS_ENABLED(CONFIG_MTD_PHYSMAP) |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 591 | &ezkit_flash_device, |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 592 | #endif |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 593 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 594 | #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) |
Bob Liu | dda6779 | 2012-01-05 11:11:20 +0800 | [diff] [blame] | 595 | &bfin_capture_device, |
| 596 | #endif |
| 597 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 598 | #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 599 | &bfin_i2s, |
| 600 | #endif |
| 601 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 602 | #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 603 | &bfin_ac97, |
| 604 | #endif |
Scott Jiang | 63f49dc | 2012-08-10 18:06:09 -0400 | [diff] [blame] | 605 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 606 | #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) |
Scott Jiang | 63f49dc | 2012-08-10 18:06:09 -0400 | [diff] [blame] | 607 | &bfin_ad1836_machine, |
| 608 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 609 | }; |
| 610 | |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 611 | static int __init net2272_init(void) |
| 612 | { |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 613 | #if IS_ENABLED(CONFIG_USB_NET2272) |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 614 | int ret; |
| 615 | |
| 616 | ret = gpio_request(GPIO_PF11, "net2272"); |
| 617 | if (ret) |
| 618 | return ret; |
| 619 | |
| 620 | /* Reset the USB chip */ |
| 621 | gpio_direction_output(GPIO_PF11, 0); |
| 622 | mdelay(2); |
| 623 | gpio_set_value(GPIO_PF11, 1); |
| 624 | #endif |
| 625 | |
| 626 | return 0; |
| 627 | } |
| 628 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 629 | static int __init ezkit_init(void) |
| 630 | { |
| 631 | int ret; |
| 632 | |
Mike Frysinger | c0fc525 | 2007-05-21 18:09:25 +0800 | [diff] [blame] | 633 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
| 634 | |
| 635 | ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 636 | if (ret < 0) |
| 637 | return ret; |
Mike Frysinger | c0fc525 | 2007-05-21 18:09:25 +0800 | [diff] [blame] | 638 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 639 | #if IS_ENABLED(CONFIG_SMC91X) |
Mike Frysinger | c0fc525 | 2007-05-21 18:09:25 +0800 | [diff] [blame] | 640 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); |
| 641 | SSYNC(); |
| 642 | #endif |
| 643 | |
Steven Miao | c4a2c58 | 2014-04-12 02:07:27 +0800 | [diff] [blame] | 644 | #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) |
Barry Song | 027285e | 2010-06-28 08:39:37 +0000 | [diff] [blame] | 645 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); |
| 646 | bfin_write_FIO0_FLAG_S(1 << 15); |
| 647 | SSYNC(); |
| 648 | /* |
| 649 | * This initialization lasts for approximately 4500 MCLKs. |
| 650 | * MCLK = 12.288MHz |
| 651 | */ |
| 652 | udelay(400); |
| 653 | #endif |
| 654 | |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 655 | if (net2272_init()) |
| 656 | pr_warning("unable to configure net2272; it probably won't work\n"); |
| 657 | |
Mike Frysinger | 5bda272 | 2008-06-07 15:03:01 +0800 | [diff] [blame] | 658 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 659 | return 0; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 660 | } |
| 661 | |
| 662 | arch_initcall(ezkit_init); |
Sonic Zhang | c13ce9f | 2009-09-23 09:37:46 +0000 | [diff] [blame] | 663 | |
| 664 | static struct platform_device *ezkit_early_devices[] __initdata = { |
| 665 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) |
| 666 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 667 | &bfin_uart0_device, |
| 668 | #endif |
| 669 | #endif |
| 670 | }; |
| 671 | |
| 672 | void __init native_machine_early_platform_add_devices(void) |
| 673 | { |
| 674 | printk(KERN_INFO "register early platform devices\n"); |
| 675 | early_platform_add_devices(ezkit_early_devices, |
| 676 | ARRAY_SIZE(ezkit_early_devices)); |
| 677 | } |