diff options
author | Roger Quadros <rogerq@ti.com> | 2013-02-13 12:16:25 +0100 |
---|---|---|
committer | Roger Quadros <rogerq@ti.com> | 2013-02-13 12:22:35 +0100 |
commit | 9d9c6ae79c5e3452721c5eaebdd793edde9d93df (patch) | |
tree | ba3a6a90f83c5fd867eec2e905c19d160cc51415 /drivers/mfd/omap-usb-tll.c | |
parent | ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3) (diff) | |
download | linux-9d9c6ae79c5e3452721c5eaebdd793edde9d93df.tar.xz linux-9d9c6ae79c5e3452721c5eaebdd793edde9d93df.zip |
mfd: omap-usb-host: Consolidate OMAP USB-HS platform data (part 2/3)
Let's have a single platform data structure for the OMAP's High-Speed
USB host subsystem instead of having 3 separate ones i.e. one for
board data, one for USB Host (UHH) module and one for USB-TLL module.
This makes the code much simpler and avoids creating multiple copies of
platform data.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
For the ehci-omap.c part:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Diffstat (limited to 'drivers/mfd/omap-usb-tll.c')
-rw-r--r-- | drivers/mfd/omap-usb-tll.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index eb869153206d..e45948969907 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -98,7 +98,7 @@ struct usbtll_omap { struct clk *usbtll_p1_fck; struct clk *usbtll_p2_fck; - struct usbtll_omap_platform_data platdata; + struct usbhs_omap_platform_data *pdata; /* secure the register updates */ spinlock_t lock; }; @@ -203,7 +203,7 @@ static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode) static int usbtll_omap_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct usbtll_omap_platform_data *pdata = dev->platform_data; + struct usbhs_omap_platform_data *pdata = dev->platform_data; void __iomem *base; struct resource *res; struct usbtll_omap *tll; @@ -223,8 +223,7 @@ static int usbtll_omap_probe(struct platform_device *pdev) spin_lock_init(&tll->lock); - for (i = 0; i < OMAP3_HS_USB_PORTS; i++) - tll->platdata.port_mode[i] = pdata->port_mode[i]; + tll->pdata = pdata; tll->usbtll_p1_fck = clk_get(dev, "usb_tll_hs_usb_ch0_clk"); if (IS_ERR(tll->usbtll_p1_fck)) { @@ -362,7 +361,7 @@ static int usbtll_omap_remove(struct platform_device *pdev) static int usbtll_runtime_resume(struct device *dev) { struct usbtll_omap *tll = dev_get_drvdata(dev); - struct usbtll_omap_platform_data *pdata = &tll->platdata; + struct usbhs_omap_platform_data *pdata = tll->pdata; unsigned long flags; dev_dbg(dev, "usbtll_runtime_resume\n"); @@ -388,7 +387,7 @@ static int usbtll_runtime_resume(struct device *dev) static int usbtll_runtime_suspend(struct device *dev) { struct usbtll_omap *tll = dev_get_drvdata(dev); - struct usbtll_omap_platform_data *pdata = &tll->platdata; + struct usbhs_omap_platform_data *pdata = tll->pdata; unsigned long flags; dev_dbg(dev, "usbtll_runtime_suspend\n"); |