diff options
author | Krishna Monian <kmonian@nvidia.com> | 2011-06-23 14:26:01 -0400 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-08 16:24:42 -0700 |
commit | 9634dbaecd490edbe835c22b00940c3fdf8e2d23 (patch) | |
tree | eccd1194b69881224375f016e2bffa4e8be033ca /arch/arm/mach-tegra/board-cardhu.c | |
parent | c60c5ef70d6af9fd81a232cbb9174421fd62b554 (diff) |
arm: tegra: cardhu: Fix warnings when USB_SUPPORT is disabled
Change-Id: Id798fd4c2d3a0484933bd2d1778fe9abb106a20e
Reviewed-on: http://git-master/r/38121
Tested-by: Krishna Monian <kmonian@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Vivek Aseeja <vaseeja@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 67 |
1 files changed, 37 insertions, 30 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index 7725e0a0f815..10e37ec75d37 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -577,34 +577,7 @@ static struct platform_device *cardhu_devices[] __initdata = { &ram_console_device, }; -static struct usb_phy_plat_data tegra_usb_phy_pdata[] = { - [0] = { - .instance = 0, - .vbus_gpio = -1, - .vbus_reg_supply = "vdd_vbus_micro_usb", - }, - [1] = { - .instance = 1, - .vbus_gpio = -1, - }, - [2] = { - .instance = 2, - .vbus_gpio = -1, - .vbus_reg_supply = "vdd_vbus_typea_usb", - }, -}; -static struct tegra_ulpi_config uhsic_phy_config = { - .enable_gpio = EN_HSIC_GPIO, - .reset_gpio = -1, -}; - -static struct tegra_ehci_platform_data tegra_ehci_uhsic_pdata = { - .phy_type = TEGRA_USB_PHY_TYPE_HSIC, - .phy_config = &uhsic_phy_config, - .operating_mode = TEGRA_USB_HOST, - .power_down_on_bus_suspend = 1, -}; static struct tegra_ehci_platform_data tegra_ehci_pdata[] = { [0] = { @@ -671,14 +644,45 @@ void tegra_usb_otg_host_unregister(struct platform_device *pdev) platform_device_unregister(pdev); } + +#define SERIAL_NUMBER_LENGTH 20 +static char usb_serial_num[SERIAL_NUMBER_LENGTH]; + +#ifdef CONFIG_USB_SUPPORT +static struct usb_phy_plat_data tegra_usb_phy_pdata[] = { + [0] = { + .instance = 0, + .vbus_gpio = -1, + .vbus_reg_supply = "vdd_vbus_micro_usb", + }, + [1] = { + .instance = 1, + .vbus_gpio = -1, + }, + [2] = { + .instance = 2, + .vbus_gpio = -1, + .vbus_reg_supply = "vdd_vbus_typea_usb", + }, +}; + +static struct tegra_ulpi_config uhsic_phy_config = { + .enable_gpio = EN_HSIC_GPIO, + .reset_gpio = -1, +}; + +static struct tegra_ehci_platform_data tegra_ehci_uhsic_pdata = { + .phy_type = TEGRA_USB_PHY_TYPE_HSIC, + .phy_config = &uhsic_phy_config, + .operating_mode = TEGRA_USB_HOST, + .power_down_on_bus_suspend = 1, +}; + static struct tegra_otg_platform_data tegra_otg_pdata = { .host_register = &tegra_usb_otg_host_register, .host_unregister = &tegra_usb_otg_host_unregister, }; -#define SERIAL_NUMBER_LENGTH 20 -static char usb_serial_num[SERIAL_NUMBER_LENGTH]; - static void cardhu_usb_init(void) { struct board_info bi; @@ -722,6 +726,9 @@ static void cardhu_usb_init(void) #endif } +#else +static void cardhu_usb_init(void) { } +#endif static void cardhu_gps_init(void) { |