diff mbox

[U-Boot,v4,4/7] arm: atmel: sama5d3: the offset of MULA is 18

Message ID 1384485158-24027-5-git-send-email-voice.shen@atmel.com
State Accepted, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Bo Shen Nov. 15, 2013, 3:12 a.m. UTC
The offset of MULA field in PLLA register in sama5d3 is 18,
and the length only 7 bits.

Signed-off-by: Bo Shen <voice.shen@atmel.com>

---
Changes in v4:
  - None
Changes in v3:
  - None
Changes in v2:
  - None

 arch/arm/include/asm/arch-at91/at91_pmc.h |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Andreas Bießmann Dec. 1, 2013, 9:48 p.m. UTC | #1
Dear Bo Shen,

Bo Shen <voice.shen@atmel.com> writes:
>The offset of MULA field in PLLA register in sama5d3 is 18,
>and the length only 7 bits.
>
>Signed-off-by: Bo Shen <voice.shen@atmel.com>
>
>---
>Changes in v4:
>  - None
>Changes in v3:
>  - None
>Changes in v2:
>  - None
>
> arch/arm/include/asm/arch-at91/at91_pmc.h |    4 ++++
> 1 file changed, 4 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-at91/at91_pmc.h b/arch/arm/include/asm/arch-at91/at91_pmc.h
index 3efdc37..b6e542e 100644
--- a/arch/arm/include/asm/arch-at91/at91_pmc.h
+++ b/arch/arm/include/asm/arch-at91/at91_pmc.h
@@ -73,7 +73,11 @@  typedef struct at91_pmc {
 #define AT91_PMC_PLLXR_DIV(x)		(x & 0xFF)
 #define AT91_PMC_PLLXR_PLLCOUNT(x)	((x & 0x3F) << 8)
 #define AT91_PMC_PLLXR_OUT(x)		((x & 0x03) << 14)
+#ifdef CONFIG_SAMA5D3
+#define AT91_PMC_PLLXR_MUL(x)		((x & 0x7F) << 18)
+#else
 #define AT91_PMC_PLLXR_MUL(x)		((x & 0x7FF) << 16)
+#endif
 #define AT91_PMC_PLLAR_29		0x20000000
 #define AT91_PMC_PLLBR_USBDIV_1		0x00000000
 #define AT91_PMC_PLLBR_USBDIV_2		0x10000000