diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2015-06-18 08:43:29 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-10-01 15:39:44 -0400 |
commit | a5752e57bb63154fe9202d8d2282bad3bae3bced (patch) | |
tree | ee69d757fef97727d8041503b2bd07d3acefc4e6 | |
parent | 36844bdf651a2ae2d35ae4b11337671905b67bff (diff) |
clk: at91: add PMC sama5d2 support
Add support for the new sama5d2 SoC and adapt capabilities.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/at91/pmc.c | 15 | ||||
-rw-r--r-- | include/dt-bindings/clock/at91.h | 1 | ||||
-rw-r--r-- | include/linux/clk/at91_pmc.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index d1844f1f3729..dd2bd1cba40f 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c | |||
@@ -206,6 +206,14 @@ static const struct at91_pmc_caps at91sam9x5_caps = { | |||
206 | AT91_PMC_MOSCRCS | AT91_PMC_CFDEV, | 206 | AT91_PMC_MOSCRCS | AT91_PMC_CFDEV, |
207 | }; | 207 | }; |
208 | 208 | ||
209 | static const struct at91_pmc_caps sama5d2_caps = { | ||
210 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | | ||
211 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | | ||
212 | AT91_PMC_PCK1RDY | AT91_PMC_PCK2RDY | | ||
213 | AT91_PMC_MOSCSELS | AT91_PMC_MOSCRCS | | ||
214 | AT91_PMC_CFDEV | AT91_PMC_GCKRDY, | ||
215 | }; | ||
216 | |||
209 | static const struct at91_pmc_caps sama5d3_caps = { | 217 | static const struct at91_pmc_caps sama5d3_caps = { |
210 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | | 218 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | |
211 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | | 219 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | |
@@ -436,6 +444,13 @@ static void __init of_at91sam9x5_pmc_setup(struct device_node *np) | |||
436 | CLK_OF_DECLARE(at91sam9x5_clk_pmc, "atmel,at91sam9x5-pmc", | 444 | CLK_OF_DECLARE(at91sam9x5_clk_pmc, "atmel,at91sam9x5-pmc", |
437 | of_at91sam9x5_pmc_setup); | 445 | of_at91sam9x5_pmc_setup); |
438 | 446 | ||
447 | static void __init of_sama5d2_pmc_setup(struct device_node *np) | ||
448 | { | ||
449 | of_at91_pmc_setup(np, &sama5d2_caps); | ||
450 | } | ||
451 | CLK_OF_DECLARE(sama5d2_clk_pmc, "atmel,sama5d2-pmc", | ||
452 | of_sama5d2_pmc_setup); | ||
453 | |||
439 | static void __init of_sama5d3_pmc_setup(struct device_node *np) | 454 | static void __init of_sama5d3_pmc_setup(struct device_node *np) |
440 | { | 455 | { |
441 | of_at91_pmc_setup(np, &sama5d3_caps); | 456 | of_at91_pmc_setup(np, &sama5d3_caps); |
diff --git a/include/dt-bindings/clock/at91.h b/include/dt-bindings/clock/at91.h index 0b4cb999a3f7..ab3ee241d10c 100644 --- a/include/dt-bindings/clock/at91.h +++ b/include/dt-bindings/clock/at91.h | |||
@@ -18,5 +18,6 @@ | |||
18 | #define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */ | 18 | #define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */ |
19 | #define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */ | 19 | #define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */ |
20 | #define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */ | 20 | #define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */ |
21 | #define AT91_PMC_GCKRDY 24 /* Generated Clocks */ | ||
21 | 22 | ||
22 | #endif | 23 | #endif |
diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h index dfc59e2b64fb..dc2a0fa62eaa 100644 --- a/include/linux/clk/at91_pmc.h +++ b/include/linux/clk/at91_pmc.h | |||
@@ -164,6 +164,7 @@ extern void __iomem *at91_pmc_base; | |||
164 | #define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */ | 164 | #define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */ |
165 | #define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */ | 165 | #define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */ |
166 | #define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ | 166 | #define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ |
167 | #define AT91_PMC_GCKRDY (1 << 24) /* Generated Clocks */ | ||
167 | #define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ | 168 | #define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ |
168 | 169 | ||
169 | #define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */ | 170 | #define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */ |