Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 1 | /* |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 2 | * arch/arm/plat-omap/usb.c -- platform level USB initialization |
| 3 | * |
| 4 | * Copyright (C) 2004 Texas Instruments, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | |
| 21 | #undef DEBUG |
| 22 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 23 | #include <linux/module.h> |
| 24 | #include <linux/kernel.h> |
| 25 | #include <linux/types.h> |
| 26 | #include <linux/errno.h> |
| 27 | #include <linux/init.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 28 | #include <linux/platform_device.h> |
David Brownell | 3a16f7b | 2006-06-29 12:27:23 -0700 | [diff] [blame] | 29 | #include <linux/usb/otg.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 30 | #include <linux/io.h> |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 31 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 32 | #include <asm/irq.h> |
| 33 | #include <asm/system.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 34 | #include <mach/hardware.h> |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 35 | |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 36 | #include <plat/control.h> |
| 37 | #include <plat/mux.h> |
| 38 | #include <plat/usb.h> |
| 39 | #include <plat/board.h> |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 40 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 41 | #define INT_USB_IRQ_GEN IH2_BASE + 20 |
| 42 | #define INT_USB_IRQ_NISO IH2_BASE + 30 |
| 43 | #define INT_USB_IRQ_ISO IH2_BASE + 29 |
| 44 | #define INT_USB_IRQ_HGEN INT_USB_HHC_1 |
| 45 | #define INT_USB_IRQ_OTG IH2_BASE + 8 |
| 46 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 47 | /* These routines should handle the standard chip-specific modes |
| 48 | * for usb0/1/2 ports, covering basic mux and transceiver setup. |
| 49 | * |
| 50 | * Some board-*.c files will need to set up additional mux options, |
| 51 | * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup. |
| 52 | */ |
| 53 | |
| 54 | /* TESTED ON: |
| 55 | * - 1611B H2 (with usb1 mini-AB) using standard Mini-B or OTG cables |
| 56 | * - 5912 OSK OHCI (with usb0 standard-A), standard A-to-B cables |
| 57 | * - 5912 OSK UDC, with *nonstandard* A-to-A cable |
| 58 | * - 1510 Innovator UDC with bundled usb0 cable |
| 59 | * - 1510 Innovator OHCI with bundled usb1/usb2 cable |
| 60 | * - 1510 Innovator OHCI with custom usb0 cable, feeding 5V VBUS |
| 61 | * - 1710 custom development board using alternate pin group |
| 62 | * - 1710 H3 (with usb1 mini-AB) using standard Mini-B or OTG cables |
| 63 | */ |
| 64 | |
| 65 | /*-------------------------------------------------------------------------*/ |
| 66 | |
Tony Lindgren | 1a8bfa1 | 2005-11-10 14:26:50 +0000 | [diff] [blame] | 67 | #if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP15XX) |
| 68 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 69 | static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device) |
| 70 | { |
| 71 | u32 syscon1 = 0; |
| 72 | |
| 73 | if (nwires == 0) { |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 74 | if (!cpu_is_omap15xx()) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 75 | u32 l; |
| 76 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 77 | /* pulldown D+/D- */ |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 78 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 79 | l &= ~(3 << 1); |
| 80 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 81 | } |
| 82 | return 0; |
| 83 | } |
| 84 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 85 | if (is_device) { |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 86 | if (cpu_is_omap7xx()) { |
Cory Maccarrone | 106997c | 2009-12-11 16:16:34 -0800 | [diff] [blame] | 87 | omap_cfg_reg(AA17_7XX_USB_DM); |
| 88 | omap_cfg_reg(W16_7XX_USB_PU_EN); |
| 89 | omap_cfg_reg(W17_7XX_USB_VBUSI); |
| 90 | omap_cfg_reg(W18_7XX_USB_DMCK_OUT); |
| 91 | omap_cfg_reg(W19_7XX_USB_DCRST); |
| 92 | } else |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 93 | omap_cfg_reg(W4_USB_PUEN); |
| 94 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 95 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 96 | if (nwires == 2) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 97 | u32 l; |
| 98 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 99 | // omap_cfg_reg(P9_USB_DP); |
| 100 | // omap_cfg_reg(R8_USB_DM); |
| 101 | |
| 102 | if (cpu_is_omap15xx()) { |
| 103 | /* This works on 1510-Innovator */ |
| 104 | return 0; |
| 105 | } |
| 106 | |
| 107 | /* NOTES: |
| 108 | * - peripheral should configure VBUS detection! |
| 109 | * - only peripherals may use the internal D+/D- pulldowns |
| 110 | * - OTG support on this port not yet written |
| 111 | */ |
| 112 | |
Cory Maccarrone | 45f780a | 2009-11-22 10:10:52 -0800 | [diff] [blame] | 113 | /* Don't do this for omap7xx -- it causes USB to not work correctly */ |
| 114 | if (!cpu_is_omap7xx()) { |
| 115 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 116 | l &= ~(7 << 4); |
| 117 | if (!is_device) |
| 118 | l |= (3 << 1); |
| 119 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
| 120 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 121 | |
| 122 | return 3 << 16; |
| 123 | } |
| 124 | |
| 125 | /* alternate pin config, external transceiver */ |
| 126 | if (cpu_is_omap15xx()) { |
| 127 | printk(KERN_ERR "no usb0 alt pin config on 15xx\n"); |
| 128 | return 0; |
| 129 | } |
| 130 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 131 | omap_cfg_reg(V6_USB0_TXD); |
| 132 | omap_cfg_reg(W9_USB0_TXEN); |
| 133 | omap_cfg_reg(W5_USB0_SE0); |
| 134 | if (nwires != 3) |
| 135 | omap_cfg_reg(Y5_USB0_RCV); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 136 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 137 | /* NOTE: SPEED and SUSP aren't configured here. OTG hosts |
| 138 | * may be able to use I2C requests to set those bits along |
Simon Arlott | 6cbdc8c | 2007-05-11 20:40:30 +0100 | [diff] [blame] | 139 | * with VBUS switching and overcurrent detection. |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 140 | */ |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 141 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 142 | if (nwires != 6) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 143 | u32 l; |
| 144 | |
| 145 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 146 | l &= ~CONF_USB2_UNI_R; |
| 147 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
| 148 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 149 | |
| 150 | switch (nwires) { |
| 151 | case 3: |
| 152 | syscon1 = 2; |
| 153 | break; |
| 154 | case 4: |
| 155 | syscon1 = 1; |
| 156 | break; |
| 157 | case 6: |
| 158 | syscon1 = 3; |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 159 | { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 160 | u32 l; |
| 161 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 162 | omap_cfg_reg(AA9_USB0_VP); |
| 163 | omap_cfg_reg(R9_USB0_VM); |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 164 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 165 | l |= CONF_USB2_UNI_R; |
| 166 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 167 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 168 | break; |
| 169 | default: |
| 170 | printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", |
| 171 | 0, nwires); |
| 172 | } |
| 173 | return syscon1 << 16; |
| 174 | } |
| 175 | |
| 176 | static u32 __init omap_usb1_init(unsigned nwires) |
| 177 | { |
| 178 | u32 syscon1 = 0; |
| 179 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 180 | if (!cpu_is_omap15xx() && nwires != 6) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 181 | u32 l; |
| 182 | |
| 183 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 184 | l &= ~CONF_USB1_UNI_R; |
| 185 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
| 186 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 187 | if (nwires == 0) |
| 188 | return 0; |
| 189 | |
| 190 | /* external transceiver */ |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 191 | omap_cfg_reg(USB1_TXD); |
| 192 | omap_cfg_reg(USB1_TXEN); |
| 193 | if (nwires != 3) |
| 194 | omap_cfg_reg(USB1_RCV); |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 195 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 196 | if (cpu_is_omap15xx()) { |
| 197 | omap_cfg_reg(USB1_SEO); |
| 198 | omap_cfg_reg(USB1_SPEED); |
| 199 | // SUSP |
| 200 | } else if (cpu_is_omap1610() || cpu_is_omap5912()) { |
| 201 | omap_cfg_reg(W13_1610_USB1_SE0); |
| 202 | omap_cfg_reg(R13_1610_USB1_SPEED); |
| 203 | // SUSP |
| 204 | } else if (cpu_is_omap1710()) { |
| 205 | omap_cfg_reg(R13_1710_USB1_SE0); |
| 206 | // SUSP |
| 207 | } else { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 208 | pr_debug("usb%d cpu unrecognized\n", 1); |
| 209 | return 0; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 210 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 211 | |
| 212 | switch (nwires) { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 213 | case 2: |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 214 | goto bad; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 215 | case 3: |
| 216 | syscon1 = 2; |
| 217 | break; |
| 218 | case 4: |
| 219 | syscon1 = 1; |
| 220 | break; |
| 221 | case 6: |
| 222 | syscon1 = 3; |
| 223 | omap_cfg_reg(USB1_VP); |
| 224 | omap_cfg_reg(USB1_VM); |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 225 | if (!cpu_is_omap15xx()) { |
| 226 | u32 l; |
| 227 | |
| 228 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 229 | l |= CONF_USB1_UNI_R; |
| 230 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
| 231 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 232 | break; |
| 233 | default: |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 234 | bad: |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 235 | printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", |
| 236 | 1, nwires); |
| 237 | } |
| 238 | return syscon1 << 20; |
| 239 | } |
| 240 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 241 | static u32 __init omap_usb2_init(unsigned nwires, unsigned alt_pingroup) |
| 242 | { |
| 243 | u32 syscon1 = 0; |
| 244 | |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 245 | /* NOTE omap1 erratum: must leave USB2_UNI_R set if usb0 in use */ |
| 246 | if (alt_pingroup || nwires == 0) |
| 247 | return 0; |
| 248 | |
| 249 | if (!cpu_is_omap15xx() && nwires != 6) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 250 | u32 l; |
| 251 | |
| 252 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 253 | l &= ~CONF_USB2_UNI_R; |
| 254 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
| 255 | } |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 256 | |
| 257 | /* external transceiver */ |
| 258 | if (cpu_is_omap15xx()) { |
| 259 | omap_cfg_reg(USB2_TXD); |
| 260 | omap_cfg_reg(USB2_TXEN); |
| 261 | omap_cfg_reg(USB2_SEO); |
| 262 | if (nwires != 3) |
| 263 | omap_cfg_reg(USB2_RCV); |
| 264 | /* there is no USB2_SPEED */ |
| 265 | } else if (cpu_is_omap16xx()) { |
| 266 | omap_cfg_reg(V6_USB2_TXD); |
| 267 | omap_cfg_reg(W9_USB2_TXEN); |
| 268 | omap_cfg_reg(W5_USB2_SE0); |
| 269 | if (nwires != 3) |
| 270 | omap_cfg_reg(Y5_USB2_RCV); |
| 271 | // FIXME omap_cfg_reg(USB2_SPEED); |
| 272 | } else { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 273 | pr_debug("usb%d cpu unrecognized\n", 1); |
| 274 | return 0; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 275 | } |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 276 | // omap_cfg_reg(USB2_SUSP); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 277 | |
| 278 | switch (nwires) { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 279 | case 2: |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 280 | goto bad; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 281 | case 3: |
| 282 | syscon1 = 2; |
| 283 | break; |
| 284 | case 4: |
| 285 | syscon1 = 1; |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 286 | break; |
| 287 | case 5: |
Tony Lindgren | dba638d | 2010-07-05 16:31:28 +0300 | [diff] [blame] | 288 | goto bad; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 289 | case 6: |
| 290 | syscon1 = 3; |
| 291 | if (cpu_is_omap15xx()) { |
| 292 | omap_cfg_reg(USB2_VP); |
| 293 | omap_cfg_reg(USB2_VM); |
| 294 | } else { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 295 | u32 l; |
| 296 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 297 | omap_cfg_reg(AA9_USB2_VP); |
| 298 | omap_cfg_reg(R9_USB2_VM); |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 299 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
| 300 | l |= CONF_USB2_UNI_R; |
| 301 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 302 | } |
| 303 | break; |
| 304 | default: |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 305 | bad: |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 306 | printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", |
| 307 | 2, nwires); |
| 308 | } |
| 309 | return syscon1 << 24; |
| 310 | } |
| 311 | |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 312 | #else |
| 313 | #define omap_usb0_init NULL |
| 314 | #define omap_usb1_init NULL |
| 315 | #define omap_usb2_init NULL |
Tony Lindgren | 1a8bfa1 | 2005-11-10 14:26:50 +0000 | [diff] [blame] | 316 | #endif |
| 317 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 318 | /*-------------------------------------------------------------------------*/ |
| 319 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 320 | #ifdef CONFIG_USB_GADGET_OMAP |
| 321 | |
| 322 | static struct resource udc_resources[] = { |
| 323 | /* order is significant! */ |
| 324 | { /* registers */ |
| 325 | .start = UDC_BASE, |
| 326 | .end = UDC_BASE + 0xff, |
| 327 | .flags = IORESOURCE_MEM, |
| 328 | }, { /* general IRQ */ |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 329 | .start = INT_USB_IRQ_GEN, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 330 | .flags = IORESOURCE_IRQ, |
| 331 | }, { /* PIO IRQ */ |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 332 | .start = INT_USB_IRQ_NISO, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 333 | .flags = IORESOURCE_IRQ, |
| 334 | }, { /* SOF IRQ */ |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 335 | .start = INT_USB_IRQ_ISO, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 336 | .flags = IORESOURCE_IRQ, |
| 337 | }, |
| 338 | }; |
| 339 | |
| 340 | static u64 udc_dmamask = ~(u32)0; |
| 341 | |
| 342 | static struct platform_device udc_device = { |
| 343 | .name = "omap_udc", |
| 344 | .id = -1, |
| 345 | .dev = { |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 346 | .dma_mask = &udc_dmamask, |
| 347 | .coherent_dma_mask = 0xffffffff, |
| 348 | }, |
| 349 | .num_resources = ARRAY_SIZE(udc_resources), |
| 350 | .resource = udc_resources, |
| 351 | }; |
| 352 | |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 353 | static inline void udc_device_init(struct omap_usb_config *pdata) |
| 354 | { |
| 355 | pdata->udc_device = &udc_device; |
| 356 | } |
| 357 | |
| 358 | #else |
| 359 | |
| 360 | static inline void udc_device_init(struct omap_usb_config *pdata) |
| 361 | { |
| 362 | } |
| 363 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 364 | #endif |
| 365 | |
| 366 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
| 367 | |
| 368 | /* The dmamask must be set for OHCI to work */ |
| 369 | static u64 ohci_dmamask = ~(u32)0; |
| 370 | |
| 371 | static struct resource ohci_resources[] = { |
| 372 | { |
| 373 | .start = OMAP_OHCI_BASE, |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 374 | .end = OMAP_OHCI_BASE + 0xff, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 375 | .flags = IORESOURCE_MEM, |
| 376 | }, |
| 377 | { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 378 | .start = INT_USB_IRQ_HGEN, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 379 | .flags = IORESOURCE_IRQ, |
| 380 | }, |
| 381 | }; |
| 382 | |
| 383 | static struct platform_device ohci_device = { |
| 384 | .name = "ohci", |
| 385 | .id = -1, |
| 386 | .dev = { |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 387 | .dma_mask = &ohci_dmamask, |
| 388 | .coherent_dma_mask = 0xffffffff, |
| 389 | }, |
| 390 | .num_resources = ARRAY_SIZE(ohci_resources), |
| 391 | .resource = ohci_resources, |
| 392 | }; |
| 393 | |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 394 | static inline void ohci_device_init(struct omap_usb_config *pdata) |
| 395 | { |
| 396 | pdata->ohci_device = &ohci_device; |
| 397 | } |
| 398 | |
| 399 | #else |
| 400 | |
| 401 | static inline void ohci_device_init(struct omap_usb_config *pdata) |
| 402 | { |
| 403 | } |
| 404 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 405 | #endif |
| 406 | |
| 407 | #if defined(CONFIG_USB_OTG) && defined(CONFIG_ARCH_OMAP_OTG) |
| 408 | |
| 409 | static struct resource otg_resources[] = { |
| 410 | /* order is significant! */ |
| 411 | { |
| 412 | .start = OTG_BASE, |
| 413 | .end = OTG_BASE + 0xff, |
| 414 | .flags = IORESOURCE_MEM, |
| 415 | }, { |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 416 | .start = INT_USB_IRQ_OTG, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 417 | .flags = IORESOURCE_IRQ, |
| 418 | }, |
| 419 | }; |
| 420 | |
| 421 | static struct platform_device otg_device = { |
| 422 | .name = "omap_otg", |
| 423 | .id = -1, |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 424 | .num_resources = ARRAY_SIZE(otg_resources), |
| 425 | .resource = otg_resources, |
| 426 | }; |
| 427 | |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 428 | static inline void otg_device_init(struct omap_usb_config *pdata) |
| 429 | { |
| 430 | pdata->otg_device = &otg_device; |
| 431 | } |
| 432 | |
| 433 | #else |
| 434 | |
| 435 | static inline void otg_device_init(struct omap_usb_config *pdata) |
| 436 | { |
| 437 | } |
| 438 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 439 | #endif |
| 440 | |
| 441 | /*-------------------------------------------------------------------------*/ |
| 442 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 443 | // FIXME correct answer depends on hmc_mode, |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 444 | // as does (on omap1) any nonzero value for config->otg port number |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 445 | #ifdef CONFIG_USB_GADGET_OMAP |
| 446 | #define is_usb0_device(config) 1 |
| 447 | #else |
| 448 | #define is_usb0_device(config) 0 |
| 449 | #endif |
| 450 | |
| 451 | /*-------------------------------------------------------------------------*/ |
| 452 | |
| 453 | #ifdef CONFIG_ARCH_OMAP_OTG |
| 454 | |
| 455 | void __init |
| 456 | omap_otg_init(struct omap_usb_config *config) |
| 457 | { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 458 | u32 syscon; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 459 | int status; |
| 460 | int alt_pingroup = 0; |
| 461 | |
| 462 | /* NOTE: no bus or clock setup (yet?) */ |
| 463 | |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 464 | syscon = omap_readl(OTG_SYSCON_1) & 0xffff; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 465 | if (!(syscon & OTG_RESET_DONE)) |
| 466 | pr_debug("USB resets not complete?\n"); |
| 467 | |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 468 | //omap_writew(0, OTG_IRQ_EN); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 469 | |
| 470 | /* pin muxing and transceiver pinouts */ |
| 471 | if (config->pins[0] > 2) /* alt pingroup 2 */ |
| 472 | alt_pingroup = 1; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 473 | syscon |= config->usb0_init(config->pins[0], is_usb0_device(config)); |
| 474 | syscon |= config->usb1_init(config->pins[1]); |
| 475 | syscon |= config->usb2_init(config->pins[2], alt_pingroup); |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 476 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); |
| 477 | omap_writel(syscon, OTG_SYSCON_1); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 478 | |
| 479 | syscon = config->hmc_mode; |
| 480 | syscon |= USBX_SYNCHRO | (4 << 16) /* B_ASE0_BRST */; |
| 481 | #ifdef CONFIG_USB_OTG |
| 482 | if (config->otg) |
| 483 | syscon |= OTG_EN; |
| 484 | #endif |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 485 | if (cpu_class_is_omap1()) |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 486 | pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", |
| 487 | omap_readl(USB_TRANSCEIVER_CTRL)); |
| 488 | pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); |
| 489 | omap_writel(syscon, OTG_SYSCON_2); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 490 | |
| 491 | printk("USB: hmc %d", config->hmc_mode); |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 492 | if (!alt_pingroup) |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 493 | printk(", usb2 alt %d wires", config->pins[2]); |
| 494 | else if (config->pins[0]) |
| 495 | printk(", usb0 %d wires%s", config->pins[0], |
| 496 | is_usb0_device(config) ? " (dev)" : ""); |
| 497 | if (config->pins[1]) |
| 498 | printk(", usb1 %d wires", config->pins[1]); |
| 499 | if (!alt_pingroup && config->pins[2]) |
| 500 | printk(", usb2 %d wires", config->pins[2]); |
| 501 | if (config->otg) |
| 502 | printk(", Mini-AB on usb%d", config->otg - 1); |
| 503 | printk("\n"); |
| 504 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 505 | if (cpu_class_is_omap1()) { |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 506 | u16 w; |
| 507 | |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 508 | /* leave USB clocks/controllers off until needed */ |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 509 | w = omap_readw(ULPD_SOFT_REQ); |
| 510 | w &= ~SOFT_USB_CLK_REQ; |
| 511 | omap_writew(w, ULPD_SOFT_REQ); |
| 512 | |
| 513 | w = omap_readw(ULPD_CLOCK_CTRL); |
| 514 | w &= ~USB_MCLK_EN; |
| 515 | w |= DIS_USB_PVCI_CLK; |
| 516 | omap_writew(w, ULPD_CLOCK_CTRL); |
Tony Lindgren | c40fae95 | 2006-12-07 13:58:10 -0800 | [diff] [blame] | 517 | } |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 518 | syscon = omap_readl(OTG_SYSCON_1); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 519 | syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; |
| 520 | |
| 521 | #ifdef CONFIG_USB_GADGET_OMAP |
| 522 | if (config->otg || config->register_dev) { |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 523 | struct platform_device *udc_device = config->udc_device; |
| 524 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 525 | syscon &= ~DEV_IDLE_EN; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 526 | udc_device->dev.platform_data = config; |
Cory Maccarrone | 45f780a | 2009-11-22 10:10:52 -0800 | [diff] [blame] | 527 | /* IRQ numbers for omap7xx */ |
| 528 | if(cpu_is_omap7xx()) { |
| 529 | udc_resources[1].start = INT_7XX_USB_GENI; |
| 530 | udc_resources[2].start = INT_7XX_USB_NON_ISO; |
| 531 | udc_resources[3].start = INT_7XX_USB_ISO; |
| 532 | } |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 533 | status = platform_device_register(udc_device); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 534 | if (status) |
| 535 | pr_debug("can't register UDC device, %d\n", status); |
| 536 | } |
| 537 | #endif |
| 538 | |
| 539 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
| 540 | if (config->otg || config->register_host) { |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 541 | struct platform_device *ohci_device = config->ohci_device; |
| 542 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 543 | syscon &= ~HST_IDLE_EN; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 544 | ohci_device->dev.platform_data = config; |
Alistair Buxton | 207b0e9 | 2009-09-22 06:01:08 +0100 | [diff] [blame] | 545 | if (cpu_is_omap7xx()) |
Alistair Buxton | 372b1c3 | 2009-09-18 04:09:39 +0100 | [diff] [blame] | 546 | ohci_resources[1].start = INT_7XX_USB_HHC_1; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 547 | status = platform_device_register(ohci_device); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 548 | if (status) |
| 549 | pr_debug("can't register OHCI device, %d\n", status); |
| 550 | } |
| 551 | #endif |
| 552 | |
| 553 | #ifdef CONFIG_USB_OTG |
| 554 | if (config->otg) { |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 555 | struct platform_device *otg_device = config->otg_device; |
| 556 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 557 | syscon &= ~OTG_IDLE_EN; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 558 | otg_device->dev.platform_data = config; |
Alistair Buxton | 207b0e9 | 2009-09-22 06:01:08 +0100 | [diff] [blame] | 559 | if (cpu_is_omap7xx()) |
Alistair Buxton | 372b1c3 | 2009-09-18 04:09:39 +0100 | [diff] [blame] | 560 | otg_resources[1].start = INT_7XX_USB_OTG; |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 561 | status = platform_device_register(otg_device); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 562 | if (status) |
| 563 | pr_debug("can't register OTG device, %d\n", status); |
| 564 | } |
| 565 | #endif |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 566 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); |
| 567 | omap_writel(syscon, OTG_SYSCON_1); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 568 | |
| 569 | status = 0; |
| 570 | } |
| 571 | |
| 572 | #else |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 573 | void omap_otg_init(struct omap_usb_config *config) {} |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 574 | #endif |
| 575 | |
| 576 | /*-------------------------------------------------------------------------*/ |
| 577 | |
Tony Lindgren | 1a8bfa1 | 2005-11-10 14:26:50 +0000 | [diff] [blame] | 578 | #ifdef CONFIG_ARCH_OMAP15XX |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 579 | |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 580 | /* ULPD_DPLL_CTRL */ |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 581 | #define DPLL_IOB (1 << 13) |
| 582 | #define DPLL_PLL_ENABLE (1 << 4) |
| 583 | #define DPLL_LOCK (1 << 0) |
| 584 | |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 585 | /* ULPD_APLL_CTRL */ |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 586 | #define APLL_NDPLL_SWITCH (1 << 0) |
| 587 | |
| 588 | |
| 589 | static void __init omap_1510_usb_init(struct omap_usb_config *config) |
| 590 | { |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 591 | unsigned int val; |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 592 | u16 w; |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 593 | |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 594 | config->usb0_init(config->pins[0], is_usb0_device(config)); |
| 595 | config->usb1_init(config->pins[1]); |
| 596 | config->usb2_init(config->pins[2], 0); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 597 | |
| 598 | val = omap_readl(MOD_CONF_CTRL_0) & ~(0x3f << 1); |
| 599 | val |= (config->hmc_mode << 1); |
| 600 | omap_writel(val, MOD_CONF_CTRL_0); |
| 601 | |
| 602 | printk("USB: hmc %d", config->hmc_mode); |
| 603 | if (config->pins[0]) |
| 604 | printk(", usb0 %d wires%s", config->pins[0], |
| 605 | is_usb0_device(config) ? " (dev)" : ""); |
| 606 | if (config->pins[1]) |
| 607 | printk(", usb1 %d wires", config->pins[1]); |
| 608 | if (config->pins[2]) |
| 609 | printk(", usb2 %d wires", config->pins[2]); |
| 610 | printk("\n"); |
| 611 | |
| 612 | /* use DPLL for 48 MHz function clock */ |
Tony Lindgren | f35ae63 | 2008-07-03 12:24:43 +0300 | [diff] [blame] | 613 | pr_debug("APLL %04x DPLL %04x REQ %04x\n", omap_readw(ULPD_APLL_CTRL), |
| 614 | omap_readw(ULPD_DPLL_CTRL), omap_readw(ULPD_SOFT_REQ)); |
| 615 | |
| 616 | w = omap_readw(ULPD_APLL_CTRL); |
| 617 | w &= ~APLL_NDPLL_SWITCH; |
| 618 | omap_writew(w, ULPD_APLL_CTRL); |
| 619 | |
| 620 | w = omap_readw(ULPD_DPLL_CTRL); |
| 621 | w |= DPLL_IOB | DPLL_PLL_ENABLE; |
| 622 | omap_writew(w, ULPD_DPLL_CTRL); |
| 623 | |
| 624 | w = omap_readw(ULPD_SOFT_REQ); |
| 625 | w |= SOFT_UDC_REQ | SOFT_DPLL_REQ; |
| 626 | omap_writew(w, ULPD_SOFT_REQ); |
| 627 | |
| 628 | while (!(omap_readw(ULPD_DPLL_CTRL) & DPLL_LOCK)) |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 629 | cpu_relax(); |
| 630 | |
| 631 | #ifdef CONFIG_USB_GADGET_OMAP |
| 632 | if (config->register_dev) { |
Tony Lindgren | 1a8bfa1 | 2005-11-10 14:26:50 +0000 | [diff] [blame] | 633 | int status; |
| 634 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 635 | udc_device.dev.platform_data = config; |
| 636 | status = platform_device_register(&udc_device); |
| 637 | if (status) |
| 638 | pr_debug("can't register UDC device, %d\n", status); |
| 639 | /* udc driver gates 48MHz by D+ pullup */ |
| 640 | } |
| 641 | #endif |
| 642 | |
| 643 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
| 644 | if (config->register_host) { |
Tony Lindgren | 1a8bfa1 | 2005-11-10 14:26:50 +0000 | [diff] [blame] | 645 | int status; |
| 646 | |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 647 | ohci_device.dev.platform_data = config; |
| 648 | status = platform_device_register(&ohci_device); |
| 649 | if (status) |
| 650 | pr_debug("can't register OHCI device, %d\n", status); |
| 651 | /* hcd explicitly gates 48MHz */ |
| 652 | } |
| 653 | #endif |
| 654 | } |
| 655 | |
| 656 | #else |
| 657 | static inline void omap_1510_usb_init(struct omap_usb_config *config) {} |
| 658 | #endif |
| 659 | |
| 660 | /*-------------------------------------------------------------------------*/ |
| 661 | |
Felipe Balbi | b0b5aa3 | 2009-03-23 18:07:49 -0700 | [diff] [blame] | 662 | void __init omap_usb_init(struct omap_usb_config *pdata) |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 663 | { |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame^] | 664 | pdata->usb0_init = omap_usb0_init; |
| 665 | pdata->usb1_init = omap_usb1_init; |
| 666 | pdata->usb2_init = omap_usb2_init; |
| 667 | udc_device_init(pdata); |
| 668 | ohci_device_init(pdata); |
| 669 | otg_device_init(pdata); |
| 670 | |
| 671 | if (cpu_is_omap7xx() || cpu_is_omap16xx()) |
Felipe Balbi | b0b5aa3 | 2009-03-23 18:07:49 -0700 | [diff] [blame] | 672 | omap_otg_init(pdata); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 673 | else if (cpu_is_omap15xx()) |
Felipe Balbi | b0b5aa3 | 2009-03-23 18:07:49 -0700 | [diff] [blame] | 674 | omap_1510_usb_init(pdata); |
| 675 | else |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 676 | printk(KERN_ERR "USB: No init for your chip yet\n"); |
Tony Lindgren | 5e1c5ff | 2005-07-10 19:58:15 +0100 | [diff] [blame] | 677 | } |
| 678 | |