Patchwork [U-Boot] AT91RM9200: fix AT91_PMC_MCKR_MDIV_* defines for this CPU

login
register
mail settings
Submitter clagix@gmail.com
Date Nov. 19, 2010, 1:20 a.m.
Message ID <4CE5D0EA.8070306@gmail.com>
Download mbox | patch
Permalink /patch/72181/
State Superseded
Delegated to: Reinhard Meyer
Headers show

Comments

clagix@gmail.com - Nov. 19, 2010, 1:20 a.m.
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 mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Reinhard Meyer - Dec. 5, 2010, 9:51 a.m.
Dear clagix@gmail.com,
> 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

This patch is not in git-format-patch format.
You hijacked another thread to post this message.

Please resubmit!

Best Regards,
Reinhard

Patch

--- 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
_______________________________________________