All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: 'Marek Szyprowski' <m.szyprowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	'Kyungmin Park' <kyungmin.park@samsung.com>,
	'Joonyoung Shim' <jy0922.shim@samsung.com>,
	'Yulgon Kim' <yulgon.kim@samsung.com>
Subject: Re: [PATCH RESEND 1/4] ARM: EXYNOS: Add usb otg phy control for EXYNOS4210
Date: Wed, 16 May 2012 11:36:44 +0200	[thread overview]
Message-ID: <20120516113644.0610cdf7@lmajewski.digital.local> (raw)
In-Reply-To: <097801cd333c$59c94770$0d5bd650$%kim@samsung.com>

Hi Kukjin,

> Lukasz Majewski wrote:
> > 
> > This patch supports to control usb otg phy of EXYNOS4210.
> > 
> > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > [Rebased on the newest git/kgene/linux-samsung #for-next]
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > ---
> >  arch/arm/mach-exynos/include/mach/irqs.h     |    1 +
> >  arch/arm/mach-exynos/include/mach/map.h      |    4 +
> >  arch/arm/mach-exynos/include/mach/regs-pmu.h |    3 +
> >  arch/arm/mach-exynos/setup-usb-phy.c         |   95
> +++++++++++++++++++-----
> > --
> >  4 files changed, 78 insertions(+), 25 deletions(-)
> > 
> 
> [...]
> 
> Hi Lukasz,
> 
> I have small comments on this.
> 
> > +static int exynos4_usb_phy0_init(struct platform_device *pdev)
> > +{
> > +	u32 rstcon;
> > +
> > +	writel(readl(S5P_USBDEVICE_PHY_CONTROL) |
> > S5P_USBDEVICE_PHY_ENABLE,
> > +			S5P_USBDEVICE_PHY_CONTROL);
> > +
> > +	exynos4_usb_phy_clkset(pdev);
> > +
> > +	/* set to normal PHY0 */
> > +	writel((readl(EXYNOS4_PHYPWR) & ~PHY0_NORMAL_MASK),
> > EXYNOS4_PHYPWR); +
> > +	/* reset PHY0 and Link */
> > +	rstcon = readl(EXYNOS4_RSTCON) | PHY0_SWRST_MASK;
> > +	writel(rstcon, EXYNOS4_RSTCON);
> > +	udelay(10);
> > +
> > +	rstcon &= ~PHY0_SWRST_MASK;
> > +	writel(rstcon, EXYNOS4_RSTCON);
> > +	udelay(80);
> 
> Do we _really_ need above udelay(80)?
> 
> As I know, we only need it in the phy1_init() for EHCI and we don't
> need it here.

I will test if this removal not break anything. 

> 
> [...]
> 
> >  int s5p_usb_phy_init(struct platform_device *pdev, int type)
> >  {
> > -	if (type == S5P_USB_PHY_HOST)
> > +	if (type == S5P_USB_PHY_DEVICE)
> > +		return exynos4_usb_phy0_init(pdev);
> 
> I think, this should be exynos4210_usb_phy0_init(pdev), because this
> is available on only exynos4210 not 

> exynos4x12 and exynos5.

I will change the name and submit a patch.

> 
> > +	else if (type == S5P_USB_PHY_HOST)
> >  		return exynos4_usb_phy1_init(pdev);
> 
> Same as above.
> 
> > 
> >  	return -EINVAL;
> > @@ -144,7 +187,9 @@ int s5p_usb_phy_init(struct platform_device
> > *pdev, int type)
> > 
> >  int s5p_usb_phy_exit(struct platform_device *pdev, int type)
> >  {
> > -	if (type == S5P_USB_PHY_HOST)
> > +	if (type == S5P_USB_PHY_DEVICE)
> > +		return exynos4_usb_phy0_exit(pdev);
> 
> Same as above.
> 
> > +	else if (type == S5P_USB_PHY_HOST)
> >  		return exynos4_usb_phy1_exit(pdev);
> 
> Same as above.
> 
> If you're ok on my comments, could you please update it as soon as
> possible for v3.5?

I will prepare a patch.

> 
> Thanks.
> 
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> 



-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

  reply	other threads:[~2012-05-16  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 13:16 [PATCH RESEND 0/4] ARM: EXYNOS: Add s3c-hsotg support for Exynos4210 and S5PV210 boards Lukasz Majewski
2012-05-10 13:16 ` [PATCH RESEND 1/4] ARM: EXYNOS: Add usb otg phy control for EXYNOS4210 Lukasz Majewski
2012-05-16  8:17   ` Kukjin Kim
2012-05-16  9:36     ` Lukasz Majewski [this message]
2012-05-10 13:16 ` [PATCH RESEND 2/4] ARM: EXYNOS: Add s3c-hsotg device support for GONI board Lukasz Majewski
2012-05-10 13:16 ` [PATCH RESEND 3/4] ARM: EXYNOS: Add s3c-hsotg device support for NURI board Lukasz Majewski
2012-05-13  1:07   ` Kukjin Kim
2012-05-14  8:48     ` Lukasz Majewski
2012-05-14 14:01       ` Kukjin Kim
2012-05-10 13:16 ` [PATCH RESEND 4/4] ARM: EXYNOS: Add s3c-hsotg device support for Universal C210 board Lukasz Majewski
2012-05-12 23:53 ` [PATCH RESEND 0/4] ARM: EXYNOS: Add s3c-hsotg support for Exynos4210 and S5PV210 boards Kukjin Kim
2012-05-17  3:27 ` Tushar Behera
  -- strict thread matches above, loose matches on Subject: below --
2012-05-10 16:29 Lukasz Majewski
2012-05-10 16:29 ` [PATCH RESEND 1/4] ARM: EXYNOS: Add usb otg phy control for EXYNOS4210 Lukasz Majewski

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=20120516113644.0610cdf7@lmajewski.digital.local \
    --to=l.majewski@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=yulgon.kim@samsung.com \
    /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.