public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARMv7: OMAP: Add init function for TWL4030 GBPR1 register
Date: Thu, 01 Mar 2012 10:41:51 +0200	[thread overview]
Message-ID: <4F4F364F.3030808@compulab.co.il> (raw)
In-Reply-To: <1330548734-18571-1-git-send-email-jsolnit@gmail.com>

Hi Jonathan,

On 02/29/12 22:52, Jonathan Solnit wrote:
> The OMAP ROM code modifies the GBPR1 register, which can cause

s/GBPR1/GPBR1/

> unintended consequences. 

What do you mean by this?
Can you please elaborate, what issues do you see?
Also, why does the OMAP ROM code needs to touch the GPBR1?

> This patch adds a function to restore GBPR1 to
> its default value.
> 
> Signed-off-by: Jonathan Solnit <jsolnit@gmail.com>
> ---
>  drivers/power/twl4030.c |    8 ++++++++
>  include/twl4030.h       |   17 +++++++++++++++++
>  2 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
> index 4a4ddeb..ddaa7e1 100644
> --- a/drivers/power/twl4030.c
> +++ b/drivers/power/twl4030.c
> @@ -103,3 +103,11 @@ void twl4030_power_mmc_init(void)
>  				TWL4030_PM_RECEIVER_VMMC1_DEV_GRP,
>  				TWL4030_PM_RECEIVER_DEV_GRP_P1);
>  }
> +
> +void twl4030_madc_clk_init(void)
> +{
> +	/* Restore the default MADC clk */
> +	twl4030_i2c_write_u8(TWL4030_CHIP_INTBR,
> +				TWL4030_INTBR_GPBR1_MADC_HFCLK_EN | TWL4030_INTBR_GPBR1_DFLT_MADC_CLK_EN,
> +				TWL4030_INTBR_GPBR1);
> +}
> diff --git a/include/twl4030.h b/include/twl4030.h
> index 9cd32ab..60bfa79 100644
> --- a/include/twl4030.h
> +++ b/include/twl4030.h
> @@ -482,6 +482,18 @@
>  #define TWL4030_USB_PHY_CLK_CTRL			0xFE
>  #define TWL4030_USB_PHY_CLK_CTRL_STS			0xFF
>  
> +/* General Purpose */
> +#define TWL4030_INTBR_GPBR1						0x91
> +
> +#define TWL4030_INTBR_GPBR1_MADC_HFCLK_EN		(0x1 << 7)
> +#define TWL4030_INTBR_GPBR1_MADC_3MHZ_EN		(0x1 << 6)
> +#define TWL4030_INTBR_GPBR1_VBAT_MON_EN			(0x1 << 5)
> +#define TWL4030_INTBR_GPBR1_DFLT_MADC_CLK_EN	(0x1 << 4)
> +#define TWL4030_INTBR_GPBR1_PWM1_EN				(0x1 << 3)
> +#define TWL4030_INTBR_GPBR1_PWM0_EN				(0x1 << 2)
> +#define TWL4030_INTBR_GPBR1_PWM1_CLK_EN			(0x1 << 1)
> +#define TWL4030_INTBR_GPBR1_PWM0_CLK_EN			(0x1 << 0)
> +
>  /*
>   * Convience functions to read and write from TWL4030
>   *
> @@ -530,4 +542,9 @@ void twl4030_led_init(unsigned char ledon_mask);
>   */
>  int twl4030_usb_ulpi_init(void);
>  
> +/*
> + * MADC Clock
> + */
> +void twl4030_madc_clk_init(void);
> +
>  #endif /* TWL4030_H */

-- 
Regards,
Igor.

  reply	other threads:[~2012-03-01  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 20:52 [U-Boot] [PATCH] ARMv7: OMAP: Add init function for TWL4030 GBPR1 register Jonathan Solnit
2012-03-01  8:41 ` Igor Grinberg [this message]
2012-03-01 17:47   ` Jonathan Solnit
2012-03-04  7:45     ` Igor Grinberg
2012-03-05 19:00       ` Jonathan Solnit
2012-03-05 19:07       ` Tom Rini

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=4F4F364F.3030808@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --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