~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-at91/at91cap9.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
        // irq0 .. irq1
223
223
};
224
224
 
 
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),
 
235
};
 
236
 
 
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),
 
242
};
 
243
 
225
244
/*
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]);
260
279
 
 
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));
 
284
 
261
285
        clk_register(&pck0);
262
286
        clk_register(&pck1);
263
287
        clk_register(&pck2);
264
288
        clk_register(&pck3);
265
289
}
266
290
 
 
291
static struct clk_lookup console_clock_lookup;
 
292
 
 
293
void __init at91cap9_set_console_clock(int id)
 
294
{
 
295
        if (id >= ARRAY_SIZE(usart_clocks_lookups))
 
296
                return;
 
297
 
 
298
        console_clock_lookup.con_id = "usart";
 
299
        console_clock_lookup.clk = usart_clocks_lookups[id].clk;
 
300
        clkdev_add(&console_clock_lookup);
 
301
}
 
302
 
267
303
/* --------------------------------------------------------------------
268
304
 *  GPIO
269
305
 * -------------------------------------------------------------------- */
303
339
 *  AT91CAP9 processor initialization
304
340
 * -------------------------------------------------------------------- */
305
341
 
306
 
void __init at91cap9_initialize(unsigned long main_clock)
 
342
void __init at91cap9_map_io(void)
307
343
{
308
344
        /* Map peripherals */
309
345
        iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc));
 
346
}
310
347
 
 
348
void __init at91cap9_initialize(unsigned long main_clock)
 
349
{
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);