225
static struct clk_lookup periph_clocks_lookups[] = {
226
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
227
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
228
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
229
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
230
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
231
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
232
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
233
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
234
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
237
static struct clk_lookup usart_clocks_lookups[] = {
238
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
239
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
240
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
241
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
226
245
* The four programmable clocks.
227
246
* You must configure pin multiplexing to bring these signals out.
258
277
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
259
278
clk_register(periph_clocks[i]);
280
clkdev_add_table(periph_clocks_lookups,
281
ARRAY_SIZE(periph_clocks_lookups));
282
clkdev_add_table(usart_clocks_lookups,
283
ARRAY_SIZE(usart_clocks_lookups));
261
285
clk_register(&pck0);
262
286
clk_register(&pck1);
263
287
clk_register(&pck2);
264
288
clk_register(&pck3);
291
static struct clk_lookup console_clock_lookup;
293
void __init at91cap9_set_console_clock(int id)
295
if (id >= ARRAY_SIZE(usart_clocks_lookups))
298
console_clock_lookup.con_id = "usart";
299
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
300
clkdev_add(&console_clock_lookup);
267
303
/* --------------------------------------------------------------------
269
305
* -------------------------------------------------------------------- */
303
339
* AT91CAP9 processor initialization
304
340
* -------------------------------------------------------------------- */
306
void __init at91cap9_initialize(unsigned long main_clock)
342
void __init at91cap9_map_io(void)
308
344
/* Map peripherals */
309
345
iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc));
348
void __init at91cap9_initialize(unsigned long main_clock)
311
350
at91_arch_reset = at91cap9_reset;
312
351
pm_power_off = at91cap9_poweroff;
313
352
at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);