SAM4CM: Fixes from Macs N
This commit is contained in:
parent
f189350bdc
commit
9d9a7e3934
@ -64,7 +64,7 @@
|
||||
UNUSED(SAM_IRQ_RESERVED_7) /* Vector 16+7: Reserved */
|
||||
VECTOR(sam_uart0, SAM_IRQ_UART0) /* Vector 16+8: Universal Asynchronous Receiver Transmitter 0 */
|
||||
UNUSED(SAM_IRQ_RESERVED_9) /* Vector 16+9: Reserved */
|
||||
//VECTOR(sam_smc, SAM_IRQ_SMC) /* Vector 16+10: Static Memory Controller */
|
||||
UNUSED(SAM_IRQ_RESERVED_10) /* Vector 16+10: Unused */
|
||||
VECTOR(sam_pioa, SAM_IRQ_PIOA) /* Vector 16+11: Parallel I/O Controller A */
|
||||
VECTOR(sam_piob, SAM_IRQ_PIOB) /* Vector 16+12: Parallel I/O Controller B */
|
||||
UNUSED(SAM_IRQ_RESERVED_13) /* Vector 16+13: Reserved */
|
||||
|
@ -414,19 +414,19 @@
|
||||
/* PMC Programmable Clock Register (0,1,2) */
|
||||
|
||||
#define PMC_PCK_CSS_SHIFT (0) /* Bits 0-2: Master Clock Source Selection */
|
||||
#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_MASK)
|
||||
# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_MASK) /* Slow Clock */
|
||||
# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_MASK) /* Main Clock */
|
||||
# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_MASK) /* PLLA Clock */
|
||||
#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_SHIFT)
|
||||
# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_SHIFT) /* Slow Clock */
|
||||
# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_SHIFT) /* Main Clock */
|
||||
# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_SHIFT) /* PLLA Clock */
|
||||
|
||||
#if defined(CONFIG_ARCH_CHIP_SAM4S)
|
||||
# define PMC_PCK_CSS_PLLB (3 << PMC_PCK_CSS_MASK) /* PLLB Clock */
|
||||
#if defined(CONFIG_ARCH_CHIP_SAM4CM) || defined(CONFIG_ARCH_CHIP_SAM4S)
|
||||
# define PMC_PCK_CSS_PLLB (3 << PMC_PCK_CSS_SHIFT) /* PLLB Clock */
|
||||
#elif defined(CONFIG_ARCH_CHIP_SAM3X) || defined(CONFIG_ARCH_CHIP_SAM3A) || \
|
||||
defined(CONFIG_ARCH_CHIP_SAM3U)
|
||||
# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_MASK) /* UPLL Clock */
|
||||
# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_SHIFT) /* UPLL Clock */
|
||||
#endif
|
||||
|
||||
# define PMC_PCK_CSS_MCK (4 << PMC_PCK_CSS_MASK) /* Master Clock */
|
||||
# define PMC_PCK_CSS_MCK (4 << PMC_PCK_CSS_SHIFT) /* Master Clock */
|
||||
|
||||
#define PMC_PCK_PRES_SHIFT (4) /* Bits 4-6: Programmable Clock Prescaler */
|
||||
#define PMC_PCK_PRES_MASK (7 << PMC_PCK_PRES_SHIFT)
|
||||
|
@ -239,16 +239,16 @@ static inline void sam_pmcsetup(void)
|
||||
//putreg32(PMC_PMMR_MASK, SAM_PMC_PMMR);
|
||||
#endif
|
||||
|
||||
/* Setup PLLA and wait for LOCKA */
|
||||
|
||||
putreg32(BOARD_CKGR_PLLAR, SAM_PMC_CKGR_PLLAR);
|
||||
sam_pmcwait(PMC_INT_LOCKA);
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_SAM4CM
|
||||
/* Setup PLLB and wait for LOCKB */
|
||||
|
||||
putreg32(BOARD_CKGR_PLLBR, SAM_PMC_CKGR_PLLBR);
|
||||
sam_pmcwait(PMC_INT_LOCKB);
|
||||
#else
|
||||
/* Setup PLLA and wait for LOCKA */
|
||||
|
||||
putreg32(BOARD_CKGR_PLLAR, SAM_PMC_CKGR_PLLAR);
|
||||
sam_pmcwait(PMC_INT_LOCKA);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
|
Loading…
Reference in New Issue
Block a user