drivers/clk/at91/at91sam9260.c
Source file repositories/reference/linux-study-clean/drivers/clk/at91/at91sam9260.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/at91/at91sam9260.c- Extension
.c- Size
- 14856 bytes
- Lines
- 516
- Domain
- Driver Families
- Bucket
- drivers/clk
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk-provider.hlinux/mfd/syscon.hlinux/slab.hdt-bindings/clock/at91.hpmc.h
Detected Declarations
struct sckstruct pckstruct at91sam926x_datafunction at91sam926x_pmc_setupfunction at91sam9260_pmc_setupfunction at91sam9261_pmc_setupfunction at91sam9263_pmc_setupfunction at91sam9g20_pmc_setup
Annotated Snippet
struct sck {
char *n;
char *p;
u8 id;
};
struct pck {
char *n;
u8 id;
};
struct at91sam926x_data {
const struct clk_pll_layout *plla_layout;
const struct clk_pll_characteristics *plla_characteristics;
const struct clk_pll_layout *pllb_layout;
const struct clk_pll_characteristics *pllb_characteristics;
const struct clk_master_characteristics *mck_characteristics;
const struct sck *sck;
const struct pck *pck;
u8 num_sck;
u8 num_pck;
u8 num_progck;
bool has_slck;
};
static DEFINE_SPINLOCK(at91sam9260_mck_lock);
static const struct clk_master_characteristics sam9260_mck_characteristics = {
.output = { .min = 0, .max = 105000000 },
.divisors = { 1, 2, 4, 0 },
};
static u8 sam9260_plla_out[] = { 0, 2 };
static u16 sam9260_plla_icpll[] = { 1, 1 };
static const struct clk_range sam9260_plla_outputs[] = {
{ .min = 80000000, .max = 160000000 },
{ .min = 150000000, .max = 240000000 },
};
static const struct clk_pll_characteristics sam9260_plla_characteristics = {
.input = { .min = 1000000, .max = 32000000 },
.num_output = ARRAY_SIZE(sam9260_plla_outputs),
.output = sam9260_plla_outputs,
.icpll = sam9260_plla_icpll,
.out = sam9260_plla_out,
};
static u8 sam9260_pllb_out[] = { 1 };
static u16 sam9260_pllb_icpll[] = { 1 };
static const struct clk_range sam9260_pllb_outputs[] = {
{ .min = 70000000, .max = 130000000 },
};
static const struct clk_pll_characteristics sam9260_pllb_characteristics = {
.input = { .min = 1000000, .max = 5000000 },
.num_output = ARRAY_SIZE(sam9260_pllb_outputs),
.output = sam9260_pllb_outputs,
.icpll = sam9260_pllb_icpll,
.out = sam9260_pllb_out,
};
static const struct sck at91sam9260_systemck[] = {
{ .n = "uhpck", .p = "usbck", .id = 6 },
{ .n = "udpck", .p = "usbck", .id = 7 },
{ .n = "pck0", .p = "prog0", .id = 8 },
{ .n = "pck1", .p = "prog1", .id = 9 },
};
static const struct pck at91sam9260_periphck[] = {
{ .n = "pioA_clk", .id = 2 },
{ .n = "pioB_clk", .id = 3 },
{ .n = "pioC_clk", .id = 4 },
{ .n = "adc_clk", .id = 5 },
{ .n = "usart0_clk", .id = 6 },
{ .n = "usart1_clk", .id = 7 },
{ .n = "usart2_clk", .id = 8 },
{ .n = "mci0_clk", .id = 9 },
{ .n = "udc_clk", .id = 10 },
{ .n = "twi0_clk", .id = 11 },
{ .n = "spi0_clk", .id = 12 },
{ .n = "spi1_clk", .id = 13 },
{ .n = "ssc0_clk", .id = 14 },
{ .n = "tc0_clk", .id = 17 },
{ .n = "tc1_clk", .id = 18 },
{ .n = "tc2_clk", .id = 19 },
{ .n = "ohci_clk", .id = 20 },
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/mfd/syscon.h`, `linux/slab.h`, `dt-bindings/clock/at91.h`, `pmc.h`.
- Detected declarations: `struct sck`, `struct pck`, `struct at91sam926x_data`, `function at91sam926x_pmc_setup`, `function at91sam9260_pmc_setup`, `function at91sam9261_pmc_setup`, `function at91sam9263_pmc_setup`, `function at91sam9g20_pmc_setup`.
- Atlas domain: Driver Families / drivers/clk.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.