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>
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user