public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
Date: Mon, 23 Apr 2012 12:20:54 +0200	[thread overview]
Message-ID: <4F952D06.2000203@denx.de> (raw)
In-Reply-To: <4F9526FC.1090600@denx.de>

On 23/04/2012 11:55, Stefano Babic wrote:

> 
>> +static void init_anatop_reg(void)
>> +{
>> +	struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
>> +	int reg = readl(&anatop->reg_core);
>> +
>> +	/*
>> +	 * Increase the VDDSOC to 1.2V
>> +	 * Mask out the REG_CORE[22:18] bits (REG2_TRIG)
>> +	 * and set them to 1.2V (0.7V + 0x14 * 0.025V)
>> +	 */
>> +	reg = (reg & ~(0x1F << 18)) | (0x14 << 18);
> 
> Everything clear, but what do you mind to add an accessor to set this
> voltage ? It is straightforward, and more boards could use it.

Well, sometimes I am quite obscure, maybe I need more coffeine before
writing my answers ;-)

What I mean is to change the function name to something like
set_vddsoc(mV), and exporting it dropping the static clause.

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

      parent reply	other threads:[~2012-04-23 10:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13  8:00 [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init Dirk Behme
2012-04-18 10:41 ` Dirk Behme
2012-04-18 11:05 ` Jason Liu
2012-04-23  9:55 ` Stefano Babic
2012-04-23 10:16   ` Dirk Behme
2012-04-23 10:20   ` Stefano Babic [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=4F952D06.2000203@denx.de \
    --to=sbabic@denx.de \
    --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