public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: clagix at gmail.com <clagix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] AT91RM9200: fix AT91_PMC_MCKR_MDIV_* defines for this CPU
Date: Fri, 19 Nov 2010 02:20:42 +0100	[thread overview]
Message-ID: <4CE5D0EA.8070306@gmail.com> (raw)

The AT91RM9200 has a different bit assignment in PMC MCKR register than
it's successors (verified by Atmel's manuals on AT91RM9200 and AT91SAM926).
AT91RM9200 supports the additional divider of 3.

Signed-off-by: Guido Classen <clagix@gmail.com>

--- u-boot-git/arch/arm/include/asm/arch-at91/at91_pmc.h	2010-11-12 18:30:31.000000000 +0100
+++ u-boot-ccm2200/arch/arm/include/asm/arch-at91/at91_pmc.h	2010-11-16 22:00:56.000000000 +0100
@@ -91,10 +91,19 @@
  #define AT91_PMC_MCKR_PRES_64		0x00000018
  #define AT91_PMC_MCKR_PRES_MASK		0x0000001C

+#ifdef CONFIG_AT91RM9200
+#define AT91_PMC_MCKR_MDIV_1		0x00000000
+#define AT91_PMC_MCKR_MDIV_2		0x00000100
+#define AT91_PMC_MCKR_MDIV_3		0x00000200
+#define AT91_PMC_MCKR_MDIV_4		0x00000300
+#define AT91_PMC_MCKR_MDIV_MASK		0x00000300
+#else
  #define AT91_PMC_MCKR_MDIV_1		0x00000000
  #define AT91_PMC_MCKR_MDIV_2		0x00000100
  #define AT91_PMC_MCKR_MDIV_4		0x00000200
  #define AT91_PMC_MCKR_MDIV_MASK		0x00000300
+#endif

  #define AT91_PMC_MCKR_PLLADIV_1		0x00001000
  #define AT91_PMC_MCKR_PLLADIV_2		0x00002000

             reply	other threads:[~2010-11-19  1:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19  1:20 clagix at gmail.com [this message]
2010-12-05  9:51 ` [U-Boot] [PATCH] AT91RM9200: fix AT91_PMC_MCKR_MDIV_* defines for this CPU Reinhard Meyer
2010-12-06 18:03   ` Guido Classen
2010-12-17  8:05     ` Reinhard Meyer

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=4CE5D0EA.8070306@gmail.com \
    --to=clagix@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