Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172783
b: refs/heads/master
c: 45f780a
h: refs/heads/master
i:
  172781: 7a36d39
  172779: f3cb05a
  172775: 79f84e4
  172767: 5d32800
v: v3
  • Loading branch information
Cory Maccarrone authored and Tony Lindgren committed Nov 22, 2009
1 parent eb73c45 commit 82866f8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 490a56652295825e3006f8703d96da2ef6580318
refs/heads/master: 45f780a06153544ab84fd1da3a8b28c07f61da1d
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap1/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config ARCH_OMAP850
depends on ARCH_OMAP1
bool "OMAP850 Based System"
select CPU_ARM926T
select ARCH_OMAP_OTG

config ARCH_OMAP15XX
depends on ARCH_OMAP1
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static struct omap_clk omap_clks[] = {
/* CK_GEN3 clocks */
CLK(NULL, "tc_ck", &tc_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
CLK(NULL, "tipb_ck", &tipb_ck, CK_1510 | CK_310),
CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX),
CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX | CK_7XX),
CLK(NULL, "tc1_ck", &tc1_ck, CK_16XX),
CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX),
CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310),
Expand All @@ -120,6 +120,7 @@ static struct omap_clk omap_clks[] = {
CLK(NULL, "usb_hhc_ck", &usb_hhc_ck1510, CK_1510 | CK_310),
CLK(NULL, "usb_hhc_ck", &usb_hhc_ck16xx, CK_16XX),
CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX),
CLK(NULL, "usb_dc_ck", &usb_dc_ck7xx, CK_7XX),
CLK(NULL, "mclk", &mclk_1510, CK_1510 | CK_310),
CLK(NULL, "mclk", &mclk_16xx, CK_16XX),
CLK(NULL, "bclk", &bclk_1510, CK_1510 | CK_310),
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-omap1/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@ static struct clk usb_dc_ck = {
.enable_bit = 4,
};

static struct clk usb_dc_ck7xx = {
.name = "usb_dc_ck",
.ops = &clkops_generic,
/* Direct from ULPD, no parent */
.rate = 48000000,
.flags = RATE_FIXED,
.enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
.enable_bit = 8,
};

static struct clk mclk_1510 = {
.name = "mclk",
.ops = &clkops_generic,
Expand Down
20 changes: 14 additions & 6 deletions trunk/arch/arm/plat-omap/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,14 @@ static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device)
* - OTG support on this port not yet written
*/

l = omap_readl(USB_TRANSCEIVER_CTRL);
l &= ~(7 << 4);
if (!is_device)
l |= (3 << 1);
omap_writel(l, USB_TRANSCEIVER_CTRL);
/* Don't do this for omap7xx -- it causes USB to not work correctly */
if (!cpu_is_omap7xx()) {
l = omap_readl(USB_TRANSCEIVER_CTRL);
l &= ~(7 << 4);
if (!is_device)
l |= (3 << 1);
omap_writel(l, USB_TRANSCEIVER_CTRL);
}

return 3 << 16;
}
Expand Down Expand Up @@ -603,7 +606,12 @@ omap_otg_init(struct omap_usb_config *config)
if (config->otg || config->register_dev) {
syscon &= ~DEV_IDLE_EN;
udc_device.dev.platform_data = config;
/* FIXME patch IRQ numbers for omap730 */
/* IRQ numbers for omap7xx */
if(cpu_is_omap7xx()) {
udc_resources[1].start = INT_7XX_USB_GENI;
udc_resources[2].start = INT_7XX_USB_NON_ISO;
udc_resources[3].start = INT_7XX_USB_ISO;
}
status = platform_device_register(&udc_device);
if (status)
pr_debug("can't register UDC device, %d\n", status);
Expand Down
19 changes: 17 additions & 2 deletions trunk/drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,7 @@ static inline int machine_without_vbus_sense(void)
|| machine_is_omap_h4()
#endif
|| machine_is_sx1()
|| cpu_is_omap7xx() /* No known omap7xx boards with vbus sense */
);
}

Expand Down Expand Up @@ -2838,6 +2839,16 @@ static int __init omap_udc_probe(struct platform_device *pdev)
udelay(100);
}

if (cpu_is_omap7xx()) {
dc_clk = clk_get(&pdev->dev, "usb_dc_ck");
hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck");
BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk));
/* can't use omap_udc_enable_clock yet */
clk_enable(dc_clk);
clk_enable(hhc_clk);
udelay(100);
}

INFO("OMAP UDC rev %d.%d%s\n",
omap_readw(UDC_REV) >> 4, omap_readw(UDC_REV) & 0xf,
config->otg ? ", Mini-AB" : "");
Expand Down Expand Up @@ -2970,7 +2981,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
goto cleanup3;
}
#endif
if (cpu_is_omap16xx()) {
if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
udc->dc_clk = dc_clk;
udc->hhc_clk = hhc_clk;
clk_disable(hhc_clk);
Expand Down Expand Up @@ -3008,7 +3019,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
if (xceiv)
otg_put_transceiver(xceiv);

if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) {
clk_disable(hhc_clk);
clk_disable(dc_clk);
clk_put(hhc_clk);
Expand Down Expand Up @@ -3115,6 +3126,10 @@ static struct platform_driver udc_driver = {

static int __init udc_init(void)
{
/* Disable DMA for omap7xx -- it doesn't work right. */
if (cpu_is_omap7xx())
use_dma = 0;

INFO("%s, version: " DRIVER_VERSION
#ifdef USE_ISO
" (iso)"
Expand Down

0 comments on commit 82866f8

Please sign in to comment.