diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2016-07-20 17:55:12 +0800 |
---|---|---|
committer | Andreas Bießmann <andreas@biessmann.org> | 2016-08-15 22:12:00 +0200 |
commit | 9e5935c04e891abb38a92a893f3457cdf304ef4f (patch) | |
tree | 69230fbc19be7d58a5bfd974456bfd643bfd0d23 /arch | |
parent | 03dcd410d70b7251ac82f78088123e23170591d4 (diff) | |
download | u-boot-imx-9e5935c04e891abb38a92a893f3457cdf304ef4f.zip u-boot-imx-9e5935c04e891abb38a92a893f3457cdf304ef4f.tar.gz u-boot-imx-9e5935c04e891abb38a92a893f3457cdf304ef4f.tar.bz2 |
clk: at91: Add clock driver
The patch is referred to at91 clock driver of Linux, to make
the clock node descriptions in DT aligned with the Linux's.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/include/mach/at91_pmc.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 680ceb0..2875ff2 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h @@ -149,6 +149,9 @@ typedef struct at91_pmc { #define AT91_PMC_PCR_PID_MASK (0x3f) #define AT91_PMC_PCR_GCKCSS (0x7 << 8) +#define AT91_PMC_PCR_GCKCSS_MASK 0x07 +#define AT91_PMC_PCR_GCKCSS_OFFSET 8 +#define AT91_PMC_PCR_GCKCSS_(x) ((x & 0x07) << 8) #define AT91_PMC_PCR_GCKCSS_SLOW_CLK (0x0 << 8) #define AT91_PMC_PCR_GCKCSS_MAIN_CLK (0x1 << 8) #define AT91_PMC_PCR_GCKCSS_PLLA_CLK (0x2 << 8) @@ -158,8 +161,9 @@ typedef struct at91_pmc { #define AT91_PMC_PCR_CMD_WRITE (0x1 << 12) #define AT91_PMC_PCR_DIV (0x3 << 16) #define AT91_PMC_PCR_GCKDIV (0xff << 20) -#define AT91_PMC_PCR_GCKDIV_(x) (((x) & 0xff) << 20) -#define AT91_PMC_PCR_GCKDIV_OFFSET 20 +#define AT91_PMC_PCR_GCKDIV_MASK 0xff +#define AT91_PMC_PCR_GCKDIV_OFFSET 20 +#define AT91_PMC_PCR_GCKDIV_(x) ((x & 0xff) << 20) #define AT91_PMC_PCR_EN (0x1 << 28) #define AT91_PMC_PCR_GCKEN (0x1 << 29) @@ -243,8 +247,9 @@ typedef struct at91_pmc { #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ +#define AT91_PMC_MOSCSELS BIT(16) /* Main Oscillator Selection Status */ +#define AT91_PMC_MOSCRCS BIT(17) /* 12 MHz RC Oscillator Status */ #define AT91_PMC_GCKRDY (1 << 24) - #define AT91_PMC_PROTKEY 0x504d4301 /* Activation Code */ /* PLL Charge Pump Current Register (PMC_PLLICPR) */ |