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 1/4] MX5: Modify the PLL decoding algorithm
Date: Fri, 23 Sep 2011 11:15:14 +0200	[thread overview]
Message-ID: <4E7C4E22.7040700@denx.de> (raw)
In-Reply-To: <CAFQ4atTQtLKOpU6HTeyYy_VdRM95gyX+V_z8qOi6iH0ySbe2gQ@mail.gmail.com>

On 09/22/2011 05:20 AM, Jason Hui wrote:
> On Thu, Sep 15, 2011 at 8:09 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> The PLL decoding algorithm didn't take into account many configuration bits.
>> Adjust it according to Linux kernel. Also, add PLL4 for MX53.
>>
>> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
>> ---
>>  arch/arm/cpu/armv7/mx5/clock.c           |   77 ++++++++++++++++++++++++++----
>>  arch/arm/include/asm/arch-mx5/imx-regs.h |    3 +
>>  2 files changed, 70 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c
>> index 00610a0..9f37f7f 100644
>> --- a/arch/arm/cpu/armv7/mx5/clock.c
>> +++ b/arch/arm/cpu/armv7/mx5/clock.c
>> @@ -29,11 +29,13 @@
>>  #include <asm/arch/imx-regs.h>
>>  #include <asm/arch/crm_regs.h>
>>  #include <asm/arch/clock.h>
>> +#include <div64.h>
>>
>>  enum pll_clocks {
>>        PLL1_CLOCK = 0,
>>        PLL2_CLOCK,
>>        PLL3_CLOCK,
>> +       PLL4_CLOCK,
>>        PLL_CLOCKS,
>>  };
>>
>> @@ -41,25 +43,76 @@ struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = {
>>        [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR,
>>        [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR,
>>        [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR,
>> +#ifdef CONFIG_MX53
>> +       [PLL4_CLOCK] = (struct mxc_pll_reg *)PLL4_BASE_ADDR,
>> +#endif
>>  };
>>
>> +#define        MXC_DPLLC_CTL_HFSM              (1 << 7)
>> +#define        MXC_DPLLC_CTL_DPDCK0_2_EN       (1 << 12)
>> +
>> +#define        MXC_DPLLC_OP_PDF_MASK           0xf
>> +#define        MXC_DPLLC_OP_MFI_MASK           (0xf << 4)
>> +#define        MXC_DPLLC_OP_MFI_OFFSET         4
>> +
>> +#define        MXC_DPLLC_MFD_MFD_MASK          0x7ffffff
>> +
>> +#define        MXC_DPLLC_MFN_MFN_MASK          0x7ffffff
> 
> Can we put this stuff to crm_reg.h file?

Right. Clock related defines are in the crm_reg.h file

Best regards,
Stefano Babic

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

  reply	other threads:[~2011-09-23  9:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15  0:09 [U-Boot] [PATCH 0/4] Clock fix and MXC I2C rework series Marek Vasut
2011-09-15  0:09 ` [U-Boot] [PATCH 1/4] MX5: Modify the PLL decoding algorithm Marek Vasut
2011-09-22  3:20   ` Jason Hui
2011-09-23  9:15     ` Stefano Babic [this message]
2011-09-23  9:43   ` [U-Boot] [PATCH 1/4 V2] " Marek Vasut
2011-09-15  0:09 ` [U-Boot] [PATCH 2/4] MX5: Add AHB clock reporting and fix IPG clock reporting Marek Vasut
2011-09-22  3:05   ` Jason Hui
2011-09-22  3:41     ` Marek Vasut
2011-09-22  4:46       ` Jason Hui
2011-09-22 19:20   ` [U-Boot] [PATCH 2/4 V2] " Marek Vasut
2011-09-23  2:09     ` Jason Hui
2011-09-15  0:09 ` [U-Boot] [PATCH 3/4] MX5: Clean up the output of "clocks" command Marek Vasut
2011-09-19 10:03   ` Stefano Babic
2011-09-22  1:58   ` Jason Hui
2011-09-15  0:09 ` [U-Boot] [PATCH 4/4] I2C: mxc_i2c rework Marek Vasut
2011-09-15  4:16   ` [U-Boot] [PATCH 4/4 V2] " Marek Vasut
2011-09-19  6:13     ` Heiko Schocher
2011-09-20  2:30     ` [U-Boot] [PATCH 4/4 V3] " Marek Vasut
2011-09-20  2:35       ` [U-Boot] [PATCH 4/4 V4] " Marek Vasut
2011-09-22  2:45         ` Jason Hui
2011-09-22  3:43           ` Marek Vasut
2011-09-22  4:54             ` Jason Hui
2011-09-22  5:47               ` Marek Vasut
2011-09-22  6:49                 ` Jason Hui
2011-09-22 19:22         ` [U-Boot] [PATCH 4/4 V5] " Marek Vasut
2011-09-23  3:32           ` Jason Hui
2011-09-23  4:31             ` Fabio Estevam
2011-09-23  6:21             ` Marek Vasut
2011-09-23  7:46             ` Stefano Babic
2011-09-26  6:30               ` Heiko Schocher
2011-10-14 16:28           ` Anatolij Gustschin
2011-09-19 10:11   ` [U-Boot] [PATCH 4/4] " Stefano Babic
2011-09-19 10:24     ` Marek Vasut
2011-09-20 10:07     ` Jason Liu

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=4E7C4E22.7040700@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