From: Felipe Balbi <balbi@ti•com>
To: Peter Chen <peter.chen@freescale•com>
Cc: r58472@freescale•com, gregkh@linuxfoundation•org,
linux-usb@vger•kernel.org, balbi@ti•com, kernel@pengutronix•de,
shawn.guo@linaro•org, linuxppc-dev@lists•ozlabs.org,
linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH v3 2/3] usb: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap
Date: Mon, 14 Jan 2013 12:17:08 +0200 [thread overview]
Message-ID: <20130114101708.GC10874@arwen.pp.htv.fi> (raw)
In-Reply-To: <1358158361-25550-3-git-send-email-peter.chen@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
On Mon, Jan 14, 2013 at 06:12:40PM +0800, Peter Chen wrote:
> As mach/hardware.h is deleted, we can't visit platform code at driver.
> It has no phy driver to combine with this controller, so it has to use
> ioremap to map phy address as a workaround.
>
> Signed-off-by: Peter Chen <peter.chen@freescale•com>
> ---
> drivers/usb/gadget/fsl_mxc_udc.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
> index 6df45f7..0e858e6 100644
> --- a/drivers/usb/gadget/fsl_mxc_udc.c
> +++ b/drivers/usb/gadget/fsl_mxc_udc.c
> @@ -23,7 +23,8 @@ static struct clk *mxc_per_clk;
> static struct clk *mxc_ipg_clk;
>
> /* workaround ENGcm09152 for i.MX35 */
> -#define USBPHYCTRL_OTGBASE_OFFSET 0x608
> +#define MX35_USBPHYCTRL_OFFSET 0x600
> +#define USBPHYCTRL_OTGBASE_OFFSET 0x8
> #define USBPHYCTRL_EVDO (1 << 23)
>
> int fsl_udc_clk_init(enum fsl_udc_type devtype, struct platform_device *pdev)
> @@ -83,15 +84,16 @@ void fsl_udc_clk_finalize(enum fsl_udc_type devtype,
> struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
> if (devtype == IMX35_UDC) {
> unsigned int v;
> + void __iomem *phy_regs = ioremap((unsigned long)pdata->regs +
> + MX35_USBPHYCTRL_OFFSET, 512);
as I said before, this should be passed via struct resource, not pdata.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-14 10:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 10:12 [PATCH v3 0/3] Fix the Build error for fsl_mxc_udc.c Peter Chen
2013-01-14 10:12 ` [PATCH v3 1/3] usb: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id Peter Chen
2013-01-14 10:16 ` Felipe Balbi
2013-01-14 10:18 ` Marc Kleine-Budde
2013-01-14 10:24 ` Felipe Balbi
2013-01-14 10:34 ` Marc Kleine-Budde
2013-01-14 10:39 ` Felipe Balbi
2013-01-14 10:50 ` Marc Kleine-Budde
2013-01-14 10:53 ` Felipe Balbi
2013-01-14 11:03 ` Marc Kleine-Budde
2013-01-14 11:06 ` Felipe Balbi
2013-01-14 12:56 ` Peter Chen
2013-01-14 17:40 ` Felipe Balbi
2013-01-14 17:54 ` Marc Kleine-Budde
2013-01-14 17:57 ` Felipe Balbi
2013-01-15 1:31 ` Peter Chen
2013-01-14 10:12 ` [PATCH v3 2/3] usb: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap Peter Chen
2013-01-14 10:17 ` Felipe Balbi [this message]
2013-01-14 12:58 ` Peter Chen
2013-01-14 13:10 ` Russell King - ARM Linux
2013-01-14 13:16 ` Peter Chen
2013-01-14 10:12 ` [PATCH v3 3/3] ARM: i.MX clock: Change the connection-id for fsl-usb2-udc Peter Chen
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=20130114101708.GC10874@arwen.pp.htv.fi \
--to=balbi@ti$(echo .)com \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=kernel@pengutronix$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=peter.chen@freescale$(echo .)com \
--cc=r58472@freescale$(echo .)com \
--cc=shawn.guo@linaro$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox