[U-Boot] [PATCH 4/6 V3] EXYNOS: Add power Enable/Disable for USB-EHCI

Minkyu Kang promsoft at gmail.com
Thu May 10 10:17:08 CEST 2012


Dear Rajeshwari Shinde,

On 8 May 2012 19:12, Rajeshwari Shinde <rajeshwari.s at samsung.com> wrote:
> This patch adds functions to enable/disable the power of USB
> host controller for EXYNOS5.
>
> Signed-off-by: Vivek Gautam <gautam.vivek at samsung.com>
> Signed-off-by: Che-Liang Chiou <clchiou at chromium.org>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
> ---
> Chnages in v2:
>        - Removed setting of SYSREG registers and moved to system.c.
>        - Enabling and Disabling of USB_PHY_CTRL was moved to single function.
> Changes in v3:
>        - Removed function to set PS_HOLD as it was not required for USB.
>        - Renamed power_enable_usb_phy and exynos5_enable_usb_phy to
>        set_usb_phy_ctrl and exynos5_set_usb_phy_ctrl.
>        - Added defination for POWER_USB_HOST_PHY_CTRL_DISABLE.
> This patch is based on:
> USB: EXYNOS: Add ehci support.patch
>  arch/arm/cpu/armv7/exynos/power.c        |   22 ++++++++++++++++++++++
>  arch/arm/include/asm/arch-exynos/power.h |    4 ++++
>  drivers/usb/host/ehci-exynos.c           |    5 +++++
>  3 files changed, 31 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
> index c765304..e09917f 100644
> --- a/arch/arm/cpu/armv7/exynos/power.c
> +++ b/arch/arm/cpu/armv7/exynos/power.c
> @@ -52,3 +52,25 @@ void set_mipi_phy_ctrl(unsigned int dev_index, unsigned int enable)
>        if (cpu_is_exynos4())
>                exynos4_mipi_phy_control(dev_index, enable);
>  }
> +
> +void exynos5_set_usb_phy_ctrl(unsigned int enable)

We have usb device also.
How about usbhost_phy instead of usb_phy?

> +{
> +       struct exynos5_power *power =
> +               (struct exynos5_power *)samsung_get_base_power();
> +
> +       if (enable) {
> +               /* Enabling USBHOST_PHY */
> +               setbits_le32(&power->usbhost_phy_control,
> +                               POWER_USB_HOST_PHY_CTRL_EN);
> +       } else {
> +               /* Disabling USBHOST_PHY */
> +               clrbits_le32(&power->usbhost_phy_control,
> +                               POWER_USB_HOST_PHY_CTRL_EN);
> +       }
> +}
> +
> +void set_usb_phy_ctrl(unsigned int enable)
> +{
> +       if (cpu_is_exynos5())
> +               exynos5_set_usb_phy_ctrl(enable);
> +}

Thanks.
Minkyu Kang.
-- 
from. prom.
www.promsoft.net


More information about the U-Boot mailing list