Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77562
b: refs/heads/master
c: a8bcf41
h: refs/heads/master
v: v3
  • Loading branch information
eric miao authored and Russell King committed Jan 26, 2008
1 parent 41fc2d2 commit 03e946d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 88d456386c2b3ac96e7170f5bc555b3c43f5a951
refs/heads/master: a8bcf4108d6322ef157ae3c224a57beb8870af38
13 changes: 11 additions & 2 deletions trunk/drivers/usb/host/ohci-pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/device.h>
#include <linux/signal.h>
#include <linux/platform_device.h>
#include <linux/clk.h>

#include <asm/mach-types.h>
#include <asm/hardware.h>
Expand All @@ -32,6 +33,8 @@

#define UHCRHPS(x) __REG2( 0x4C000050, (x)<<2 )

static struct clk *usb_clk;

/*
PMM_NPS_MODE -- PMM Non-power switching mode
Ports are powered continuously.
Expand Down Expand Up @@ -80,7 +83,7 @@ static int pxa27x_start_hc(struct device *dev)

inf = dev->platform_data;

pxa_set_cken(CKEN_USBHOST, 1);
clk_enable(usb_clk);

UHCHR |= UHCHR_FHR;
udelay(11);
Expand Down Expand Up @@ -123,7 +126,7 @@ static void pxa27x_stop_hc(struct device *dev)
UHCCOMS |= 1;
udelay(10);

pxa_set_cken(CKEN_USBHOST, 0);
clk_disable(usb_clk);
}


Expand Down Expand Up @@ -158,6 +161,10 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
return -ENOMEM;
}

usb_clk = clk_get(&pdev->dev, "USBCLK");
if (IS_ERR(usb_clk))
return PTR_ERR(usb_clk);

hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x");
if (!hcd)
return -ENOMEM;
Expand Down Expand Up @@ -201,6 +208,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err1:
usb_put_hcd(hcd);
clk_put(usb_clk);
return retval;
}

Expand All @@ -225,6 +233,7 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev)
iounmap(hcd->regs);
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);
clk_put(usb_clk);
}

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit 03e946d

Please sign in to comment.