181
static struct clk_lookup periph_clocks_lookups[] = {
182
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
183
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
184
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
185
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
186
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk),
187
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
188
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
189
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
192
static struct clk_lookup usart_clocks_lookups[] = {
193
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
194
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
195
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
196
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
182
200
* The four programmable clocks.
183
201
* You must configure pin multiplexing to bring these signals out.
228
246
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
229
247
clk_register(periph_clocks[i]);
249
clkdev_add_table(periph_clocks_lookups,
250
ARRAY_SIZE(periph_clocks_lookups));
251
clkdev_add_table(usart_clocks_lookups,
252
ARRAY_SIZE(usart_clocks_lookups));
231
254
clk_register(&pck0);
232
255
clk_register(&pck1);
233
256
clk_register(&pck2);
237
260
clk_register(&hck1);
263
static struct clk_lookup console_clock_lookup;
265
void __init at91sam9261_set_console_clock(int id)
267
if (id >= ARRAY_SIZE(usart_clocks_lookups))
270
console_clock_lookup.con_id = "usart";
271
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
272
clkdev_add(&console_clock_lookup);
240
275
/* --------------------------------------------------------------------
242
277
* -------------------------------------------------------------------- */
267
302
* AT91SAM9261 processor initialization
268
303
* -------------------------------------------------------------------- */
270
void __init at91sam9261_initialize(unsigned long main_clock)
305
void __init at91sam9261_map_io(void)
272
307
/* Map peripherals */
273
308
iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
276
311
iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc));
278
313
iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
316
void __init at91sam9261_initialize(unsigned long main_clock)
281
318
at91_arch_reset = at91sam9_alt_reset;
282
319
pm_power_off = at91sam9261_poweroff;
283
320
at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)