public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: usb_phy: Fix the phy_ctl offset on the A83T
Date: Wed, 12 Jul 2017 19:07:14 +0300	[thread overview]
Message-ID: <20170712190714.10dbe464@i7> (raw)
In-Reply-To: <20170712144425.13703-1-maxime.ripard@free-electrons.com>

On Wed, 12 Jul 2017 16:44:25 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> The A83T, just like the A33, has a USB phy with the phy_ctl at 0x410
> instead of 0x404.
> 
> Suggested-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/mach-sunxi/usb_phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c
> index 9bf0b5633d4a..1ca9739fbee3 100644
> --- a/arch/arm/mach-sunxi/usb_phy.c
> +++ b/arch/arm/mach-sunxi/usb_phy.c
> @@ -19,7 +19,7 @@
>  #include <errno.h>
>  
>  #define SUNXI_USB_PMU_IRQ_ENABLE	0x800
> -#ifdef CONFIG_MACH_SUN8I_A33
> +#if defined(CONFIG_MACH_SUN8I_A33) || defined(CONFIG_MACH_SUN8I_A83T)
>  #define SUNXI_USB_CSR			0x410
>  #else
>  #define SUNXI_USB_CSR			0x404

Is only A83T affected? Just in case, please check which SUNXI_USB_CSR
value is needed for the other SoC variants and add these SoCs
explicitly to the ifdef checks.

It also makes a lot of sense to get rid of the default #else
clause, because having it there is very error prone when adding
support for new SoCs. One may end up with a wrong default without
noticing.

-- 
Best regards,
Siarhei Siamashka

      reply	other threads:[~2017-07-12 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 14:44 [U-Boot] [PATCH] sunxi: usb_phy: Fix the phy_ctl offset on the A83T Maxime Ripard
2017-07-12 16:07 ` Siarhei Siamashka [this message]

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=20170712190714.10dbe464@i7 \
    --to=siarhei.siamashka@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox