From: Felipe Balbi <balbi@ti.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: mark.rutland@arm.com, linux-doc@vger.kernel.org,
dwalker@fifo99.com, linux@arm.linux.org.uk,
swarren@wwwdotorg.org, grant.likely@linaro.org,
davidb@codeaurora.org, devicetree@vger.kernel.org,
jackp@codeaurora.org, pawel.moll@arm.com,
ijc+devicetree@hellion.org.uk, linux-arm-msm@vger.kernel.org,
rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org,
dsegal@codeaurora.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
balbi@ti.com, mgautam@codeaurora.org, bryanh@codeaurora.org,
rob@landley.net
Subject: Re: [PATCH v3 01/13] usb: phy: msm: Move mach depndend code to platform data
Date: Mon, 14 Oct 2013 17:52:07 -0500 [thread overview]
Message-ID: <20131014225207.GD7446@radagast> (raw)
In-Reply-To: <1381764280-28420-2-git-send-email-iivanov@mm-sol.com>
[-- Attachment #1.1: Type: text/plain, Size: 5889 bytes --]
Hi,
On Mon, Oct 14, 2013 at 06:24:28PM +0300, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> This patch fix compilation error and is an intermediate step
> before the addition of DeviceTree support for newer targets.
>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> ---
> arch/arm/mach-msm/board-msm7x30.c | 35 +++++++++++++++++++++++++++++++++++
> arch/arm/mach-msm/board-qsd8x50.c | 35 +++++++++++++++++++++++++++++++++++
> drivers/usb/phy/phy-msm-usb.c | 34 ++++++++++++++--------------------
> include/linux/usb/msm_hsusb.h | 3 +++
> 4 files changed, 87 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index f9af5a4..46de789 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -30,6 +30,7 @@
> #include <asm/memory.h>
> #include <asm/setup.h>
>
> +#include <mach/clk.h>
> #include <mach/msm_iomap.h>
> #include <mach/dma.h>
>
> @@ -60,10 +61,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> 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 5f933bc..9169ec3 100644
> --- a/arch/arm/mach-msm/board-qsd8x50.c
> +++ b/arch/arm/mach-msm/board-qsd8x50.c
> @@ -31,6 +31,7 @@
> #include <mach/irqs.h>
> #include <mach/sirc.h>
> #include <mach/vreg.h>
> +#include <mach/clk.h>
> #include <linux/platform_data/mmc-msm_sdcc.h>
>
> #include "devices.h"
> @@ -81,10 +82,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> static struct platform_device *devices[] __initdata = {
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index e9d4cd9..118798d 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -40,8 +40,6 @@
> #include <linux/usb/msm_hsusb_hw.h>
> #include <linux/regulator/consumer.h>
>
> -#include <mach/clk.h>
> -
> #define MSM_USB_BASE (motg->regs)
> #define DRIVER_NAME "msm_otg"
>
> @@ -308,33 +306,29 @@ static void ulpi_init(struct msm_otg *motg)
>
> static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
> {
> - int ret;
> + int ret = 0;
> +
> + if (!motg->pdata->link_clk_reset)
> + return ret;
> +
> + ret = motg->pdata->link_clk_reset(motg->clk, assert);
> + if (ret)
> + dev_err(motg->phy.dev, "usb link clk reset failed\n");
>
> - if (assert) {
> - ret = clk_reset(motg->clk, CLK_RESET_ASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk assert failed\n");
> - } else {
> - ret = clk_reset(motg->clk, CLK_RESET_DEASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk deassert failed\n");
> - }
> return ret;
> }
>
> static int msm_otg_phy_clk_reset(struct msm_otg *motg)
> {
> - int ret;
> + int ret = 0;
>
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT);
> - if (ret) {
> - dev_err(motg->phy.dev, "usb phy clk assert failed\n");
> + if (!motg->pdata->phy_clk_reset)
> return ret;
> - }
> - usleep_range(10000, 12000);
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT);
> +
> + ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
> if (ret)
> - dev_err(motg->phy.dev, "usb phy clk deassert failed\n");
> + dev_err(motg->phy.dev, "usb phy clk assert failed\n");
seems like you're doing more than *just* fixing the build error. Which
build error do you get ?
--
balbi
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 01/13] usb: phy: msm: Move mach depndend code to platform data
Date: Mon, 14 Oct 2013 17:52:07 -0500 [thread overview]
Message-ID: <20131014225207.GD7446@radagast> (raw)
In-Reply-To: <1381764280-28420-2-git-send-email-iivanov@mm-sol.com>
Hi,
On Mon, Oct 14, 2013 at 06:24:28PM +0300, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> This patch fix compilation error and is an intermediate step
> before the addition of DeviceTree support for newer targets.
>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> ---
> arch/arm/mach-msm/board-msm7x30.c | 35 +++++++++++++++++++++++++++++++++++
> arch/arm/mach-msm/board-qsd8x50.c | 35 +++++++++++++++++++++++++++++++++++
> drivers/usb/phy/phy-msm-usb.c | 34 ++++++++++++++--------------------
> include/linux/usb/msm_hsusb.h | 3 +++
> 4 files changed, 87 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index f9af5a4..46de789 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -30,6 +30,7 @@
> #include <asm/memory.h>
> #include <asm/setup.h>
>
> +#include <mach/clk.h>
> #include <mach/msm_iomap.h>
> #include <mach/dma.h>
>
> @@ -60,10 +61,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> 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 5f933bc..9169ec3 100644
> --- a/arch/arm/mach-msm/board-qsd8x50.c
> +++ b/arch/arm/mach-msm/board-qsd8x50.c
> @@ -31,6 +31,7 @@
> #include <mach/irqs.h>
> #include <mach/sirc.h>
> #include <mach/vreg.h>
> +#include <mach/clk.h>
> #include <linux/platform_data/mmc-msm_sdcc.h>
>
> #include "devices.h"
> @@ -81,10 +82,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> static struct platform_device *devices[] __initdata = {
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index e9d4cd9..118798d 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -40,8 +40,6 @@
> #include <linux/usb/msm_hsusb_hw.h>
> #include <linux/regulator/consumer.h>
>
> -#include <mach/clk.h>
> -
> #define MSM_USB_BASE (motg->regs)
> #define DRIVER_NAME "msm_otg"
>
> @@ -308,33 +306,29 @@ static void ulpi_init(struct msm_otg *motg)
>
> static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
> {
> - int ret;
> + int ret = 0;
> +
> + if (!motg->pdata->link_clk_reset)
> + return ret;
> +
> + ret = motg->pdata->link_clk_reset(motg->clk, assert);
> + if (ret)
> + dev_err(motg->phy.dev, "usb link clk reset failed\n");
>
> - if (assert) {
> - ret = clk_reset(motg->clk, CLK_RESET_ASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk assert failed\n");
> - } else {
> - ret = clk_reset(motg->clk, CLK_RESET_DEASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk deassert failed\n");
> - }
> return ret;
> }
>
> static int msm_otg_phy_clk_reset(struct msm_otg *motg)
> {
> - int ret;
> + int ret = 0;
>
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT);
> - if (ret) {
> - dev_err(motg->phy.dev, "usb phy clk assert failed\n");
> + if (!motg->pdata->phy_clk_reset)
> return ret;
> - }
> - usleep_range(10000, 12000);
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT);
> +
> + ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
> if (ret)
> - dev_err(motg->phy.dev, "usb phy clk deassert failed\n");
> + dev_err(motg->phy.dev, "usb phy clk assert failed\n");
seems like you're doing more than *just* fixing the build error. Which
build error do you get ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131014/4ad9da10/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: <balbi@ti.com>, <rob.herring@calxeda.com>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <swarren@wwwdotorg.org>,
<ijc+devicetree@hellion.org.uk>, <rob@landley.net>,
<davidb@codeaurora.org>, <dwalker@fifo99.com>,
<bryanh@codeaurora.org>, <linux@arm.linux.org.uk>,
<gregkh@linuxfoundation.org>, <grant.likely@linaro.org>,
<jackp@codeaurora.org>, <mgautam@codeaurora.org>,
<dsegal@codeaurora.org>, <linux-usb@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 01/13] usb: phy: msm: Move mach depndend code to platform data
Date: Mon, 14 Oct 2013 17:52:07 -0500 [thread overview]
Message-ID: <20131014225207.GD7446@radagast> (raw)
In-Reply-To: <1381764280-28420-2-git-send-email-iivanov@mm-sol.com>
[-- Attachment #1: Type: text/plain, Size: 5889 bytes --]
Hi,
On Mon, Oct 14, 2013 at 06:24:28PM +0300, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> This patch fix compilation error and is an intermediate step
> before the addition of DeviceTree support for newer targets.
>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> ---
> arch/arm/mach-msm/board-msm7x30.c | 35 +++++++++++++++++++++++++++++++++++
> arch/arm/mach-msm/board-qsd8x50.c | 35 +++++++++++++++++++++++++++++++++++
> drivers/usb/phy/phy-msm-usb.c | 34 ++++++++++++++--------------------
> include/linux/usb/msm_hsusb.h | 3 +++
> 4 files changed, 87 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index f9af5a4..46de789 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -30,6 +30,7 @@
> #include <asm/memory.h>
> #include <asm/setup.h>
>
> +#include <mach/clk.h>
> #include <mach/msm_iomap.h>
> #include <mach/dma.h>
>
> @@ -60,10 +61,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> 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 5f933bc..9169ec3 100644
> --- a/arch/arm/mach-msm/board-qsd8x50.c
> +++ b/arch/arm/mach-msm/board-qsd8x50.c
> @@ -31,6 +31,7 @@
> #include <mach/irqs.h>
> #include <mach/sirc.h>
> #include <mach/vreg.h>
> +#include <mach/clk.h>
> #include <linux/platform_data/mmc-msm_sdcc.h>
>
> #include "devices.h"
> @@ -81,10 +82,44 @@ static int hsusb_phy_init_seq[] = {
> -1
> };
>
> +static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
> +{
> + int ret;
> +
> + if (assert) {
> + ret = clk_reset(link_clk, CLK_RESET_ASSERT);
> + if (ret)
> + pr_err("usb hs_clk assert failed\n");
> + } else {
> + ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb hs_clk deassert failed\n");
> + }
> + return ret;
> +}
> +
> +static int hsusb_phy_clk_reset(struct clk *phy_clk)
> +{
> + int ret;
> +
> + ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
> + if (ret) {
> + pr_err("usb phy clk assert failed\n");
> + return ret;
> + }
> + usleep_range(10000, 12000);
> + ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
> + if (ret)
> + pr_err("usb phy clk deassert failed\n");
> + return ret;
> +}
> +
> static struct msm_otg_platform_data msm_otg_pdata = {
> .phy_init_seq = hsusb_phy_init_seq,
> .mode = USB_PERIPHERAL,
> .otg_control = OTG_PHY_CONTROL,
> + .link_clk_reset = hsusb_link_clk_reset,
> + .phy_clk_reset = hsusb_phy_clk_reset,
> };
>
> static struct platform_device *devices[] __initdata = {
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index e9d4cd9..118798d 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -40,8 +40,6 @@
> #include <linux/usb/msm_hsusb_hw.h>
> #include <linux/regulator/consumer.h>
>
> -#include <mach/clk.h>
> -
> #define MSM_USB_BASE (motg->regs)
> #define DRIVER_NAME "msm_otg"
>
> @@ -308,33 +306,29 @@ static void ulpi_init(struct msm_otg *motg)
>
> static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
> {
> - int ret;
> + int ret = 0;
> +
> + if (!motg->pdata->link_clk_reset)
> + return ret;
> +
> + ret = motg->pdata->link_clk_reset(motg->clk, assert);
> + if (ret)
> + dev_err(motg->phy.dev, "usb link clk reset failed\n");
>
> - if (assert) {
> - ret = clk_reset(motg->clk, CLK_RESET_ASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk assert failed\n");
> - } else {
> - ret = clk_reset(motg->clk, CLK_RESET_DEASSERT);
> - if (ret)
> - dev_err(motg->phy.dev, "usb hs_clk deassert failed\n");
> - }
> return ret;
> }
>
> static int msm_otg_phy_clk_reset(struct msm_otg *motg)
> {
> - int ret;
> + int ret = 0;
>
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT);
> - if (ret) {
> - dev_err(motg->phy.dev, "usb phy clk assert failed\n");
> + if (!motg->pdata->phy_clk_reset)
> return ret;
> - }
> - usleep_range(10000, 12000);
> - ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT);
> +
> + ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
> if (ret)
> - dev_err(motg->phy.dev, "usb phy clk deassert failed\n");
> + dev_err(motg->phy.dev, "usb phy clk assert failed\n");
seems like you're doing more than *just* fixing the build error. Which
build error do you get ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-10-14 22:52 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 15:24 [PATCH v3 00/13] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 01/13] usb: phy: msm: Move mach depndend code to platform data Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 22:52 ` Felipe Balbi [this message]
2013-10-14 22:52 ` Felipe Balbi
2013-10-14 22:52 ` Felipe Balbi
2013-10-15 7:01 ` Ivan T. Ivanov
2013-10-15 7:01 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 02/13] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 22:52 ` Felipe Balbi
2013-10-14 22:52 ` Felipe Balbi
2013-10-14 22:52 ` Felipe Balbi
2013-10-14 15:24 ` [PATCH v3 03/13] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 04/13] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 07/13] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 08/13] usb: phy: msm: Drop default usb_dr_mode from platform data Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
[not found] ` <1381764280-28420-1-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2013-10-14 15:24 ` [PATCH v3 05/13] usb: phy: msm: Fix WARNING: quoted string split across lines Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 06/13] usb: phy: msm: Fix WARNING: Prefer seq_puts to seq_printf Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 09/13] usb: phy: msm: Remove unused pclk_src_name Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 10/13] usb: phy: msm: Switch clock consumer strings Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 12/13] usb: phy: msm: Properly check core interrupt number Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 22:59 ` Felipe Balbi
2013-10-14 22:59 ` Felipe Balbi
2013-10-14 22:59 ` Felipe Balbi
2013-10-15 7:12 ` Ivan T. Ivanov
2013-10-15 7:12 ` Ivan T. Ivanov
2013-10-15 7:12 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 11/13] usb: phy: msm: Remove HSUSB prefix from requlator names Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 13/13] usb: phy: msm: Add device tree support and binding information Ivan T. Ivanov
2013-10-14 15:24 ` Ivan T. Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131014225207.GD7446@radagast \
--to=balbi@ti.com \
--cc=bryanh@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dsegal@codeaurora.org \
--cc=dwalker@fifo99.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=iivanov@mm-sol.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jackp@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mgautam@codeaurora.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.