usb: xhci: tegra: read padctl data from new place
Ajay Gupta [Tue, 14 May 2013 19:30:42 +0000 (12:30 -0700)]
xusb platform device will now have padctl data inside baord_data
which is a struct inside tegra_xusb_platform_data

Bug 1268244

Change-Id: I147eacfcdeaec22d7d101a739af82ccb2b3febf0
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/228500
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/usb/host/xhci-tegra.c

index 3044af0..805c9a2 100644 (file)
@@ -33,6 +33,7 @@
 #include <mach/tegra_usb_pad_ctrl.h>
 #include <mach/tegra_usb_pmc.h>
 #include <mach/mc.h>
+#include <mach/xusb.h>
 #include "xhci-tegra.h"
 #include "xhci.h"
 
@@ -201,6 +202,8 @@ struct tegra_xhci_hcd {
        void __iomem *fpci_base;
        void __iomem *ipfs_base;
 
+       struct tegra_xusb_platform_data *pdata;
+       struct tegra_xusb_board_data *bdata;
        struct tegra_xusb_pad_data *xusb_padctl;
 
        /* mailbox variables */
@@ -2662,7 +2665,9 @@ static int tegra_xhci_probe(struct platform_device *pdev)
        if (ret)
                dev_err(&pdev->dev, "could not unpowergate xusbc partition\n");
 
-       tegra->xusb_padctl = dev_get_platdata(&pdev->dev);
+       tegra->pdata = dev_get_platdata(&pdev->dev);
+       tegra->bdata = tegra->pdata->bdata;
+       tegra->xusb_padctl = tegra->bdata->padctl_data;
 
        /* reset the pointer back to NULL. driver uses it */
        /* platform_set_drvdata(pdev, NULL); */