Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nicolas Ferre and committed by
Stephen Boyd
a5752e57 36844bdf

+17
+15
drivers/clk/at91/pmc.c
··· 206 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 217 static const struct at91_pmc_caps sama5d3_caps = { 210 218 .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | 211 219 AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | ··· 443 435 } 444 436 CLK_OF_DECLARE(at91sam9x5_clk_pmc, "atmel,at91sam9x5-pmc", 445 437 of_at91sam9x5_pmc_setup); 438 + 439 + static void __init of_sama5d2_pmc_setup(struct device_node *np) 440 + { 441 + of_at91_pmc_setup(np, &sama5d2_caps); 442 + } 443 + CLK_OF_DECLARE(sama5d2_clk_pmc, "atmel,sama5d2-pmc", 444 + of_sama5d2_pmc_setup); 446 445 447 446 static void __init of_sama5d3_pmc_setup(struct device_node *np) 448 447 {
+1
include/dt-bindings/clock/at91.h
··· 18 18 #define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */ 19 19 #define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */ 20 20 #define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */ 21 + #define AT91_PMC_GCKRDY 24 /* Generated Clocks */ 21 22 22 23 #endif
+1
include/linux/clk/at91_pmc.h
··· 164 164 #define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */ 165 165 #define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */ 166 166 #define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ 167 + #define AT91_PMC_GCKRDY (1 << 24) /* Generated Clocks */ 167 168 #define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ 168 169 169 170 #define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */