diff options
| author | Olof Johansson <olof@lixom.net> | 2014-01-09 03:07:32 -0500 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-01-09 03:07:32 -0500 |
| commit | 64576e439709738c0f55ab60cdba0ad18d5aa24e (patch) | |
| tree | 031394615b00dacbcec5c9e4b99f4494992ce375 | |
| parent | 3d7e0207ced354d1647195f53bcc670f9756c649 (diff) | |
| parent | c0f8a48723d1e7ec48f65c72f880bc49edea9a4a (diff) | |
Merge branch 'qcom/drivers' into next/drivers
* qcom/drivers:
tty: serial: Limit msm_serial_hs driver to platforms that use it
mmc: msm_sdcc: Limit driver to platforms that use it
usb: phy: msm: Move mach dependent code to platform data
Signed-off-by: Olof Johansson <olof@lixom.net>
| -rw-r--r-- | arch/arm/boot/dts/Makefile | 3 | ||||
| -rw-r--r-- | arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 6 | ||||
| -rw-r--r-- | arch/arm/boot/dts/qcom-msm8974.dtsi | 97 | ||||
| -rw-r--r-- | arch/arm/configs/msm_defconfig | 3 | ||||
| -rw-r--r-- | arch/arm/mach-msm/Kconfig | 15 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-dt.c | 9 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 35 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 35 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-trout.c | 12 | ||||
| -rw-r--r-- | drivers/mmc/host/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-msm-usb.c | 35 | ||||
| -rw-r--r-- | include/linux/usb/msm_hsusb.h | 3 |
13 files changed, 226 insertions, 31 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 402481775bbe..349610fba345 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
| @@ -106,7 +106,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ | |||
| 106 | kirkwood-ts219-6282.dtb | 106 | kirkwood-ts219-6282.dtb |
| 107 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb | 107 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb |
| 108 | dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \ | 108 | dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \ |
| 109 | qcom-msm8960-cdp.dtb | 109 | qcom-msm8960-cdp.dtb \ |
| 110 | qcom-apq8074-dragonboard.dtb | ||
| 110 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ | 111 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ |
| 111 | armada-370-mirabox.dtb \ | 112 | armada-370-mirabox.dtb \ |
| 112 | armada-370-netgear-rn102.dtb \ | 113 | armada-370-netgear-rn102.dtb \ |
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts new file mode 100644 index 000000000000..13ac3e222495 --- /dev/null +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #include "qcom-msm8974.dtsi" | ||
| 2 | |||
| 3 | / { | ||
| 4 | model = "Qualcomm APQ8074 Dragonboard"; | ||
| 5 | compatible = "qcom,apq8074-dragonboard", "qcom,apq8074"; | ||
| 6 | }; | ||
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi new file mode 100644 index 000000000000..6ac94967d2d3 --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | #include "skeleton.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "Qualcomm MSM8974"; | ||
| 7 | compatible = "qcom,msm8974"; | ||
| 8 | interrupt-parent = <&intc>; | ||
| 9 | |||
| 10 | soc: soc { | ||
| 11 | #address-cells = <1>; | ||
| 12 | #size-cells = <1>; | ||
| 13 | ranges; | ||
| 14 | compatible = "simple-bus"; | ||
| 15 | |||
| 16 | intc: interrupt-controller@f9000000 { | ||
| 17 | compatible = "qcom,msm-qgic2"; | ||
| 18 | interrupt-controller; | ||
| 19 | #interrupt-cells = <3>; | ||
| 20 | reg = <0xf9000000 0x1000>, | ||
| 21 | <0xf9002000 0x1000>; | ||
| 22 | }; | ||
| 23 | |||
| 24 | timer { | ||
| 25 | compatible = "arm,armv7-timer"; | ||
| 26 | interrupts = <1 2 0xf08>, | ||
| 27 | <1 3 0xf08>, | ||
| 28 | <1 4 0xf08>, | ||
| 29 | <1 1 0xf08>; | ||
| 30 | clock-frequency = <19200000>; | ||
| 31 | }; | ||
| 32 | |||
| 33 | timer@f9020000 { | ||
| 34 | #address-cells = <1>; | ||
| 35 | #size-cells = <1>; | ||
| 36 | ranges; | ||
| 37 | compatible = "arm,armv7-timer-mem"; | ||
| 38 | reg = <0xf9020000 0x1000>; | ||
| 39 | clock-frequency = <19200000>; | ||
| 40 | |||
| 41 | frame@f9021000 { | ||
| 42 | frame-number = <0>; | ||
| 43 | interrupts = <0 8 0x4>, | ||
| 44 | <0 7 0x4>; | ||
| 45 | reg = <0xf9021000 0x1000>, | ||
| 46 | <0xf9022000 0x1000>; | ||
| 47 | }; | ||
| 48 | |||
| 49 | frame@f9023000 { | ||
| 50 | frame-number = <1>; | ||
| 51 | interrupts = <0 9 0x4>; | ||
| 52 | reg = <0xf9023000 0x1000>; | ||
| 53 | status = "disabled"; | ||
| 54 | }; | ||
| 55 | |||
| 56 | frame@f9024000 { | ||
| 57 | frame-number = <2>; | ||
| 58 | interrupts = <0 10 0x4>; | ||
| 59 | reg = <0xf9024000 0x1000>; | ||
| 60 | status = "disabled"; | ||
| 61 | }; | ||
| 62 | |||
| 63 | frame@f9025000 { | ||
| 64 | frame-number = <3>; | ||
| 65 | interrupts = <0 11 0x4>; | ||
| 66 | reg = <0xf9025000 0x1000>; | ||
| 67 | status = "disabled"; | ||
| 68 | }; | ||
| 69 | |||
| 70 | frame@f9026000 { | ||
| 71 | frame-number = <4>; | ||
| 72 | interrupts = <0 12 0x4>; | ||
| 73 | reg = <0xf9026000 0x1000>; | ||
| 74 | status = "disabled"; | ||
| 75 | }; | ||
| 76 | |||
| 77 | frame@f9027000 { | ||
| 78 | frame-number = <5>; | ||
| 79 | interrupts = <0 13 0x4>; | ||
| 80 | reg = <0xf9027000 0x1000>; | ||
| 81 | status = "disabled"; | ||
| 82 | }; | ||
| 83 | |||
| 84 | frame@f9028000 { | ||
| 85 | frame-number = <6>; | ||
| 86 | interrupts = <0 14 0x4>; | ||
| 87 | reg = <0xf9028000 0x1000>; | ||
| 88 | status = "disabled"; | ||
| 89 | }; | ||
| 90 | }; | ||
| 91 | |||
| 92 | restart@fc4ab000 { | ||
| 93 | compatible = "qcom,pshold"; | ||
| 94 | reg = <0xfc4ab000 0x4>; | ||
| 95 | }; | ||
| 96 | }; | ||
| 97 | }; | ||
diff --git a/arch/arm/configs/msm_defconfig b/arch/arm/configs/msm_defconfig index 690b5f9c7462..c5698b7ce444 100644 --- a/arch/arm/configs/msm_defconfig +++ b/arch/arm/configs/msm_defconfig | |||
| @@ -20,6 +20,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
| 20 | CONFIG_ARCH_MSM=y | 20 | CONFIG_ARCH_MSM=y |
| 21 | CONFIG_ARCH_MSM8X60=y | 21 | CONFIG_ARCH_MSM8X60=y |
| 22 | CONFIG_ARCH_MSM8960=y | 22 | CONFIG_ARCH_MSM8960=y |
| 23 | CONFIG_ARCH_MSM8974=y | ||
| 23 | CONFIG_SMP=y | 24 | CONFIG_SMP=y |
| 24 | CONFIG_PREEMPT=y | 25 | CONFIG_PREEMPT=y |
| 25 | CONFIG_AEABI=y | 26 | CONFIG_AEABI=y |
| @@ -88,6 +89,8 @@ CONFIG_SSBI=y | |||
| 88 | CONFIG_DEBUG_GPIO=y | 89 | CONFIG_DEBUG_GPIO=y |
| 89 | CONFIG_GPIO_SYSFS=y | 90 | CONFIG_GPIO_SYSFS=y |
| 90 | CONFIG_POWER_SUPPLY=y | 91 | CONFIG_POWER_SUPPLY=y |
| 92 | CONFIG_POWER_RESET=y | ||
| 93 | CONFIG_POWER_RESET_MSM=y | ||
| 91 | CONFIG_THERMAL=y | 94 | CONFIG_THERMAL=y |
| 92 | CONFIG_REGULATOR=y | 95 | CONFIG_REGULATOR=y |
| 93 | CONFIG_MEDIA_SUPPORT=y | 96 | CONFIG_MEDIA_SUPPORT=y |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 2586c2865874..702553b96137 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
| @@ -44,6 +44,7 @@ endchoice | |||
| 44 | 44 | ||
| 45 | config ARCH_MSM8X60 | 45 | config ARCH_MSM8X60 |
| 46 | bool "MSM8X60" | 46 | bool "MSM8X60" |
| 47 | select ARCH_MSM_DT | ||
| 47 | select ARM_GIC | 48 | select ARM_GIC |
| 48 | select CPU_V7 | 49 | select CPU_V7 |
| 49 | select GPIO_MSM_V2 | 50 | select GPIO_MSM_V2 |
| @@ -52,15 +53,25 @@ config ARCH_MSM8X60 | |||
| 52 | 53 | ||
| 53 | config ARCH_MSM8960 | 54 | config ARCH_MSM8960 |
| 54 | bool "MSM8960" | 55 | bool "MSM8960" |
| 56 | select ARCH_MSM_DT | ||
| 55 | select ARM_GIC | 57 | select ARM_GIC |
| 56 | select CPU_V7 | 58 | select CPU_V7 |
| 57 | select HAVE_SMP | 59 | select HAVE_SMP |
| 58 | select GPIO_MSM_V2 | 60 | select GPIO_MSM_V2 |
| 59 | select MSM_SCM if SMP | 61 | select MSM_SCM if SMP |
| 60 | 62 | ||
| 63 | config ARCH_MSM8974 | ||
| 64 | bool "MSM8974" | ||
| 65 | select ARCH_MSM_DT | ||
| 66 | select ARM_GIC | ||
| 67 | select CPU_V7 | ||
| 68 | select HAVE_ARM_ARCH_TIMER | ||
| 69 | select HAVE_SMP | ||
| 70 | select MSM_SCM if SMP | ||
| 71 | select USE_OF | ||
| 72 | |||
| 61 | config ARCH_MSM_DT | 73 | config ARCH_MSM_DT |
| 62 | def_bool y | 74 | bool |
| 63 | depends on (ARCH_MSM8X60 || ARCH_MSM8960) | ||
| 64 | select SPARSE_IRQ | 75 | select SPARSE_IRQ |
| 65 | select USE_OF | 76 | select USE_OF |
| 66 | 77 | ||
diff --git a/arch/arm/mach-msm/board-dt.c b/arch/arm/mach-msm/board-dt.c index 16e6183ac9f1..1f11d93e700e 100644 --- a/arch/arm/mach-msm/board-dt.c +++ b/arch/arm/mach-msm/board-dt.c | |||
| @@ -26,7 +26,16 @@ static const char * const msm_dt_match[] __initconst = { | |||
| 26 | NULL | 26 | NULL |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | static const char * const apq8074_dt_match[] __initconst = { | ||
| 30 | "qcom,apq8074-dragonboard", | ||
| 31 | NULL | ||
| 32 | }; | ||
| 33 | |||
| 29 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") | 34 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") |
| 30 | .smp = smp_ops(msm_smp_ops), | 35 | .smp = smp_ops(msm_smp_ops), |
| 31 | .dt_compat = msm_dt_match, | 36 | .dt_compat = msm_dt_match, |
| 32 | MACHINE_END | 37 | MACHINE_END |
| 38 | |||
| 39 | DT_MACHINE_START(APQ_DT, "Qualcomm MSM (Flattened Device Tree)") | ||
| 40 | .dt_compat = apq8074_dt_match, | ||
| 41 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index f9af5a46e8b6..46de789ad3ae 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <asm/memory.h> | 30 | #include <asm/memory.h> |
| 31 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
| 32 | 32 | ||
| 33 | #include <mach/clk.h> | ||
| 33 | #include <mach/msm_iomap.h> | 34 | #include <mach/msm_iomap.h> |
| 34 | #include <mach/dma.h> | 35 | #include <mach/dma.h> |
| 35 | 36 | ||
| @@ -60,10 +61,44 @@ static int hsusb_phy_init_seq[] = { | |||
| 60 | -1 | 61 | -1 |
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 64 | static int hsusb_link_clk_reset(struct clk *link_clk, bool assert) | ||
| 65 | { | ||
| 66 | int ret; | ||
| 67 | |||
| 68 | if (assert) { | ||
| 69 | ret = clk_reset(link_clk, CLK_RESET_ASSERT); | ||
| 70 | if (ret) | ||
| 71 | pr_err("usb hs_clk assert failed\n"); | ||
| 72 | } else { | ||
| 73 | ret = clk_reset(link_clk, CLK_RESET_DEASSERT); | ||
| 74 | if (ret) | ||
| 75 | pr_err("usb hs_clk deassert failed\n"); | ||
| 76 | } | ||
| 77 | return ret; | ||
| 78 | } | ||
| 79 | |||
| 80 | static int hsusb_phy_clk_reset(struct clk *phy_clk) | ||
| 81 | { | ||
| 82 | int ret; | ||
| 83 | |||
| 84 | ret = clk_reset(phy_clk, CLK_RESET_ASSERT); | ||
| 85 | if (ret) { | ||
| 86 | pr_err("usb phy clk assert failed\n"); | ||
| 87 | return ret; | ||
| 88 | } | ||
| 89 | usleep_range(10000, 12000); | ||
| 90 | ret = clk_reset(phy_clk, CLK_RESET_DEASSERT); | ||
| 91 | if (ret) | ||
| 92 | pr_err("usb phy clk deassert failed\n"); | ||
| 93 | return ret; | ||
| 94 | } | ||
| 95 | |||
| 63 | static struct msm_otg_platform_data msm_otg_pdata = { | 96 | static struct msm_otg_platform_data msm_otg_pdata = { |
| 64 | .phy_init_seq = hsusb_phy_init_seq, | 97 | .phy_init_seq = hsusb_phy_init_seq, |
| 65 | .mode = USB_PERIPHERAL, | 98 | .mode = USB_PERIPHERAL, |
| 66 | .otg_control = OTG_PHY_CONTROL, | 99 | .otg_control = OTG_PHY_CONTROL, |
| 100 | .link_clk_reset = hsusb_link_clk_reset, | ||
| 101 | .phy_clk_reset = hsusb_phy_clk_reset, | ||
| 67 | }; | 102 | }; |
| 68 | 103 | ||
| 69 | struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = { | 104 | struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = { |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 5f933bc50783..9169ec324a43 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
| 32 | #include <mach/sirc.h> | 32 | #include <mach/sirc.h> |
| 33 | #include <mach/vreg.h> | 33 | #include <mach/vreg.h> |
| 34 | #include <mach/clk.h> | ||
| 34 | #include <linux/platform_data/mmc-msm_sdcc.h> | 35 | #include <linux/platform_data/mmc-msm_sdcc.h> |
| 35 | 36 | ||
| 36 | #include "devices.h" | 37 | #include "devices.h" |
| @@ -81,10 +82,44 @@ static int hsusb_phy_init_seq[] = { | |||
| 81 | -1 | 82 | -1 |
| 82 | }; | 83 | }; |
| 83 | 84 | ||
| 85 | static int hsusb_link_clk_reset(struct clk *link_clk, bool assert) | ||
| 86 | { | ||
| 87 | int ret; | ||
| 88 | |||
| 89 | if (assert) { | ||
| 90 | ret = clk_reset(link_clk, CLK_RESET_ASSERT); | ||
| 91 | if (ret) | ||
| 92 | pr_err("usb hs_clk assert failed\n"); | ||
| 93 | } else { | ||
| 94 | ret = clk_reset(link_clk, CLK_RESET_DEASSERT); | ||
| 95 | if (ret) | ||
| 96 | pr_err("usb hs_clk deassert failed\n"); | ||
| 97 | } | ||
| 98 | return ret; | ||
| 99 | } | ||
| 100 | |||
| 101 | static int hsusb_phy_clk_reset(struct clk *phy_clk) | ||
| 102 | { | ||
| 103 | int ret; | ||
| 104 | |||
| 105 | ret = clk_reset(phy_clk, CLK_RESET_ASSERT); | ||
| 106 | if (ret) { | ||
| 107 | pr_err("usb phy clk assert failed\n"); | ||
| 108 | return ret; | ||
| 109 | } | ||
| 110 | usleep_range(10000, 12000); | ||
| 111 | ret = clk_reset(phy_clk, CLK_RESET_DEASSERT); | ||
| 112 | if (ret) | ||
| 113 | pr_err("usb phy clk deassert failed\n"); | ||
| 114 | return ret; | ||
| 115 | } | ||
| 116 | |||
| 84 | static struct msm_otg_platform_data msm_otg_pdata = { | 117 | static struct msm_otg_platform_data msm_otg_pdata = { |
| 85 | .phy_init_seq = hsusb_phy_init_seq, | 118 | .phy_init_seq = hsusb_phy_init_seq, |
| 86 | .mode = USB_PERIPHERAL, | 119 | .mode = USB_PERIPHERAL, |
| 87 | .otg_control = OTG_PHY_CONTROL, | 120 | .otg_control = OTG_PHY_CONTROL, |
| 121 | .link_clk_reset = hsusb_link_clk_reset, | ||
| 122 | .phy_clk_reset = hsusb_phy_clk_reset, | ||
| 88 | }; | 123 | }; |
| 89 | 124 | ||
| 90 | static struct platform_device *devices[] __initdata = { | 125 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index ccf6621bc664..015d544aa017 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | 14 | * |
| 15 | */ | 15 | */ |
| 16 | #define pr_fmt(fmt) "%s: " fmt, __func__ | ||
| 16 | 17 | ||
| 17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| @@ -68,12 +69,11 @@ static void __init trout_init(void) | |||
| 68 | 69 | ||
| 69 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 70 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 70 | 71 | ||
| 71 | #ifdef CONFIG_MMC | 72 | if (IS_ENABLED(CONFIG_MMC)) { |
| 72 | rc = trout_init_mmc(system_rev); | 73 | rc = trout_init_mmc(system_rev); |
| 73 | if (rc) | 74 | if (rc) |
| 74 | printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); | 75 | pr_crit("MMC init failure (%d)\n", rc); |
| 75 | #endif | 76 | } |
| 76 | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | static struct map_desc trout_io_desc[] __initdata = { | 79 | static struct map_desc trout_io_desc[] __initdata = { |
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fc5099e44b2..4e8ca9d5570f 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig | |||
| @@ -324,7 +324,7 @@ config MMC_ATMELMCI | |||
| 324 | 324 | ||
| 325 | config MMC_MSM | 325 | config MMC_MSM |
| 326 | tristate "Qualcomm SDCC Controller Support" | 326 | tristate "Qualcomm SDCC Controller Support" |
| 327 | depends on MMC && ARCH_MSM | 327 | depends on MMC && (ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50) |
| 328 | help | 328 | help |
| 329 | This provides support for the SD/MMC cell found in the | 329 | This provides support for the SD/MMC cell found in the |
| 330 | MSM and QSD SOCs from Qualcomm. The controller also has | 330 | MSM and QSD SOCs from Qualcomm. The controller also has |
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index a3817ab8602f..a53159cd62f9 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig | |||
| @@ -1035,7 +1035,7 @@ config SERIAL_MSM_CONSOLE | |||
| 1035 | 1035 | ||
| 1036 | config SERIAL_MSM_HS | 1036 | config SERIAL_MSM_HS |
| 1037 | tristate "MSM UART High Speed: Serial Driver" | 1037 | tristate "MSM UART High Speed: Serial Driver" |
| 1038 | depends on ARCH_MSM | 1038 | depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 |
| 1039 | select SERIAL_CORE | 1039 | select SERIAL_CORE |
| 1040 | help | 1040 | help |
| 1041 | If you have a machine based on MSM family of SoCs, you | 1041 | If you have a machine based on MSM family of SoCs, you |
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index e9d4cd960ecd..9a47d4403e86 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c | |||
| @@ -40,8 +40,6 @@ | |||
| 40 | #include <linux/usb/msm_hsusb_hw.h> | 40 | #include <linux/usb/msm_hsusb_hw.h> |
| 41 | #include <linux/regulator/consumer.h> | 41 | #include <linux/regulator/consumer.h> |
| 42 | 42 | ||
| 43 | #include <mach/clk.h> | ||
| 44 | |||
| 45 | #define MSM_USB_BASE (motg->regs) | 43 | #define MSM_USB_BASE (motg->regs) |
| 46 | #define DRIVER_NAME "msm_otg" | 44 | #define DRIVER_NAME "msm_otg" |
| 47 | 45 | ||
| @@ -308,33 +306,30 @@ static void ulpi_init(struct msm_otg *motg) | |||
| 308 | 306 | ||
| 309 | static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) | 307 | static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) |
| 310 | { | 308 | { |
| 311 | int ret; | 309 | int ret = 0; |
| 310 | |||
| 311 | if (!motg->pdata->link_clk_reset) | ||
| 312 | return ret; | ||
| 313 | |||
| 314 | ret = motg->pdata->link_clk_reset(motg->clk, assert); | ||
| 315 | if (ret) | ||
| 316 | dev_err(motg->phy.dev, "usb link clk reset %s failed\n", | ||
| 317 | assert ? "assert" : "deassert"); | ||
| 312 | 318 | ||
| 313 | if (assert) { | ||
| 314 | ret = clk_reset(motg->clk, CLK_RESET_ASSERT); | ||
| 315 | if (ret) | ||
| 316 | dev_err(motg->phy.dev, "usb hs_clk assert failed\n"); | ||
| 317 | } else { | ||
| 318 | ret = clk_reset(motg->clk, CLK_RESET_DEASSERT); | ||
| 319 | if (ret) | ||
| 320 | dev_err(motg->phy.dev, "usb hs_clk deassert failed\n"); | ||
| 321 | } | ||
| 322 | return ret; | 319 | return ret; |
| 323 | } | 320 | } |
| 324 | 321 | ||
| 325 | static int msm_otg_phy_clk_reset(struct msm_otg *motg) | 322 | static int msm_otg_phy_clk_reset(struct msm_otg *motg) |
| 326 | { | 323 | { |
| 327 | int ret; | 324 | int ret = 0; |
| 328 | 325 | ||
| 329 | ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT); | 326 | if (!motg->pdata->phy_clk_reset) |
| 330 | if (ret) { | ||
| 331 | dev_err(motg->phy.dev, "usb phy clk assert failed\n"); | ||
| 332 | return ret; | 327 | return ret; |
| 333 | } | 328 | |
| 334 | usleep_range(10000, 12000); | 329 | ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk); |
| 335 | ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT); | ||
| 336 | if (ret) | 330 | if (ret) |
| 337 | dev_err(motg->phy.dev, "usb phy clk deassert failed\n"); | 331 | dev_err(motg->phy.dev, "usb phy clk reset failed\n"); |
| 332 | |||
| 338 | return ret; | 333 | return ret; |
| 339 | } | 334 | } |
| 340 | 335 | ||
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h index 22a396c13f3a..32754835a39b 100644 --- a/include/linux/usb/msm_hsusb.h +++ b/include/linux/usb/msm_hsusb.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 22 | #include <linux/usb/otg.h> | 22 | #include <linux/usb/otg.h> |
| 23 | #include <linux/clk.h> | ||
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| 25 | * Supported USB modes | 26 | * Supported USB modes |
| @@ -135,6 +136,8 @@ struct msm_otg_platform_data { | |||
| 135 | enum msm_usb_phy_type phy_type; | 136 | enum msm_usb_phy_type phy_type; |
| 136 | void (*setup_gpio)(enum usb_otg_state state); | 137 | void (*setup_gpio)(enum usb_otg_state state); |
| 137 | char *pclk_src_name; | 138 | char *pclk_src_name; |
| 139 | int (*link_clk_reset)(struct clk *link_clk, bool assert); | ||
| 140 | int (*phy_clk_reset)(struct clk *phy_clk); | ||
| 138 | }; | 141 | }; |
| 139 | 142 | ||
| 140 | /** | 143 | /** |
