diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2012-05-24 14:59:02 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-05-24 14:49:45 -0700 |
commit | d85b5e5703ef0113cbf10d4c5177a942c9b092ba (patch) | |
tree | d54441a0b0f6f5850367e3f7701eeb911a40d58a /arch/arm/mach-tegra/board-whistler-baseband.c | |
parent | 2285ec5a2c09d0f3e0469a65291ffe983918d112 (diff) |
usb: tegra: modify USB platform data structures
Modify USB structures of platform data. Based on the new
platform data structures modifying the initialization in
board files.
Bug 887361
Change-Id: Ie6347a078c9a596a4debe21a353e127ddde35220
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/103597
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-baseband.c')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-baseband.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-baseband.c b/arch/arm/mach-tegra/board-whistler-baseband.c index 143d14a8721d..eb50fb2f8237 100644 --- a/arch/arm/mach-tegra/board-whistler-baseband.c +++ b/arch/arm/mach-tegra/board-whistler-baseband.c @@ -24,10 +24,9 @@ #include "board.h" #include "board-whistler-baseband.h" -static int baseband_phy_on(void); -static int baseband_phy_off(void); -static void baseband_phy_restore_start(void); -static void baseband_phy_restore_end(void); +static void baseband_phy_init(void); +static void baseband_phy_on(void); +static void baseband_phy_off(void); static struct wake_lock mdm_wake_lock; @@ -57,30 +56,38 @@ static __initdata struct tegra_pingroup_config whistler_null_ulpi_pinmux[] = { TEGRA_TRI_NORMAL}, }; -static struct tegra_ulpi_trimmer e1219_trimmer = { 10, 1, 1, 1 }; - -static struct tegra_ulpi_config ehci2_null_ulpi_phy_config = { - .trimmer = &e1219_trimmer, - .post_phy_on = baseband_phy_on, +static struct tegra_usb_phy_platform_ops ulpi_null_plat_ops = { + .init = baseband_phy_init, .pre_phy_off = baseband_phy_off, - .phy_restore_start = baseband_phy_restore_start, - .phy_restore_end = baseband_phy_restore_end, - .phy_restore_gpio = MDM2AP_ACK, - .ulpi_dir_gpio = ULPI_DIR, - .ulpi_d0_gpio = ULPI_D0, - .ulpi_d1_gpio = ULPI_D1, + .post_phy_on = baseband_phy_on, }; -static struct tegra_ehci_platform_data ehci2_null_ulpi_platform_data = { - .operating_mode = TEGRA_USB_HOST, - .power_down_on_bus_suspend = 0, - .phy_config = &ehci2_null_ulpi_phy_config, - .phy_type = TEGRA_USB_PHY_TYPE_NULL_ULPI, +static struct tegra_usb_platform_data tegra_ehci2_ulpi_null_pdata = { + .port_otg = false, + .has_hostpc = true, + .phy_intf = TEGRA_USB_PHY_INTF_ULPI_NULL, + .op_mode = TEGRA_USB_OPMODE_HOST, + .u_data.host = { + .vbus_gpio = -1, + .vbus_reg = NULL, + .hot_plug = false, + .remote_wakeup_supported = false, + .power_off_on_suspend = false, + }, + .u_cfg.ulpi = { + .shadow_clk_delay = 10, + .clock_out_delay = 1, + .data_trimmer = 1, + .stpdirnxt_trimmer = 1, + .dir_trimmer = 1, + .clk = NULL, + }, + .ops = &ulpi_null_plat_ops, }; static int __init tegra_null_ulpi_init(void) { - tegra_ehci2_device.dev.platform_data = &ehci2_null_ulpi_platform_data; + tegra_ehci2_device.dev.platform_data = &tegra_ehci2_ulpi_null_pdata; platform_device_register(&tegra_ehci2_device); return 0; } @@ -98,7 +105,7 @@ static irqreturn_t mdm_start_thread(int irq, void *data) return IRQ_HANDLED; } -static int baseband_phy_on(void) +static void baseband_phy_init(void) { static bool phy_init; @@ -108,22 +115,15 @@ static int baseband_phy_on(void) phy_init = true; } pr_info("%s\n", __func__); - return 0; -} - -static int baseband_phy_off(void) -{ - pr_info("%s\n", __func__); - return 0; } -static void baseband_phy_restore_start(void) +static void baseband_phy_off(void) { /* set AP2MDM_ACK2 high */ gpio_set_value(AP2MDM_ACK2, 1); } -static void baseband_phy_restore_end(void) +static void baseband_phy_on (void) { /* set AP2MDM_ACK2 low */ gpio_set_value(AP2MDM_ACK2, 0); |