Skip to content

Commit a5752e5

Browse files
Nicolas Ferrebebarino
authored andcommitted
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>
1 parent 36844bd commit a5752e5

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎drivers/clk/at91/pmc.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ static const struct at91_pmc_caps at91sam9x5_caps = {
206206
AT91_PMC_MOSCRCS | AT91_PMC_CFDEV,
207207
};
208208

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+
209217
static const struct at91_pmc_caps sama5d3_caps = {
210218
.available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY |
211219
AT91_PMC_LOCKU | AT91_PMC_PCK0RDY |
@@ -436,6 +444,13 @@ static void __init of_at91sam9x5_pmc_setup(struct device_node *np)
436444
CLK_OF_DECLARE(at91sam9x5_clk_pmc, "atmel,at91sam9x5-pmc",
437445
of_at91sam9x5_pmc_setup);
438446

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+
439454
static void __init of_sama5d3_pmc_setup(struct device_node *np)
440455
{
441456
of_at91_pmc_setup(np, &sama5d3_caps);

‎include/dt-bindings/clock/at91.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
#define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */
1919
#define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */
2020
#define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */
21+
#define AT91_PMC_GCKRDY 24 /* Generated Clocks */
2122

2223
#endif

‎include/linux/clk/at91_pmc.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ extern void __iomem *at91_pmc_base;
164164
#define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */
165165
#define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */
166166
#define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */
167+
#define AT91_PMC_GCKRDY (1 << 24) /* Generated Clocks */
167168
#define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */
168169

169170
#define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */

0 commit comments

Comments
 (0)