public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc+uboot@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] sunxi: Fix clock_twi_onoff for sun6i
Date: Thu, 17 Mar 2016 09:50:16 +0000	[thread overview]
Message-ID: <1458208216.30744.27.camel@hellion.org.uk> (raw)
In-Reply-To: <1458158841-26812-1-git-send-email-hdegoede@redhat.com>

On Wed, 2016-03-16 at 21:07 +0100, Hans de Goede wrote:
> The clock_sun6i.c implementation was not deasserting the reset for
> the regular i2c controllers, this commit fixes this.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

All 3 patches: Acked-by: Ian Campbell <ijc@hellion.org.uk>

> ---
> ?arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++---
> ?1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
> b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
> index 700b605..4e1e1a4 100644
> --- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
> +++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
> @@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state)
> ?		return 0;
> ?	}
> ?
> -	/* set the apb clock gate for twi */
> -	if (state)
> +	/* set the apb clock gate and reset for twi */
> +	if (state) {
> ?		setbits_le32(&ccm->apb2_gate,
> ?			?????CLK_GATE_OPEN <<
> (APB2_GATE_TWI_SHIFT+port));
> -	else
> +		setbits_le32(&ccm->apb2_reset_cfg,
> +			?????1 << (APB2_RESET_TWI_SHIFT + port));
> +	} else {
> +		clrbits_le32(&ccm->apb2_reset_cfg,
> +			?????1 << (APB2_RESET_TWI_SHIFT + port));
> ?		clrbits_le32(&ccm->apb2_gate,
> ?			?????CLK_GATE_OPEN <<
> (APB2_GATE_TWI_SHIFT+port));
> +	}
> ?
> ?	return 0;
> ?}

      parent reply	other threads:[~2016-03-17  9:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 20:07 [U-Boot] [PATCH 1/3] sunxi: Fix clock_twi_onoff for sun6i Hans de Goede
2016-03-16 20:07 ` [U-Boot] [PATCH 2/3] sunxi: Fix clock_twi_onoff for sun8i-a83 Hans de Goede
2016-03-16 20:07 ` [U-Boot] [PATCH 3/3] sunxi: Fix clock_twi_onoff for sun9i Hans de Goede
2016-03-17  9:50 ` Ian Campbell [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=1458208216.30744.27.camel@hellion.org.uk \
    --to=ijc+uboot@hellion.org.uk \
    --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