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

« back to all changes in this revision

Viewing changes to arch/arm/mach-at91/at91sam9261.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:
178
178
        // irq0 .. irq2
179
179
};
180
180
 
 
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),
 
190
};
 
191
 
 
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),
 
197
};
 
198
 
181
199
/*
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]);
230
248
 
 
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));
 
253
 
231
254
        clk_register(&pck0);
232
255
        clk_register(&pck1);
233
256
        clk_register(&pck2);
237
260
        clk_register(&hck1);
238
261
}
239
262
 
 
263
static struct clk_lookup console_clock_lookup;
 
264
 
 
265
void __init at91sam9261_set_console_clock(int id)
 
266
{
 
267
        if (id >= ARRAY_SIZE(usart_clocks_lookups))
 
268
                return;
 
269
 
 
270
        console_clock_lookup.con_id = "usart";
 
271
        console_clock_lookup.clk = usart_clocks_lookups[id].clk;
 
272
        clkdev_add(&console_clock_lookup);
 
273
}
 
274
 
240
275
/* --------------------------------------------------------------------
241
276
 *  GPIO
242
277
 * -------------------------------------------------------------------- */
267
302
 *  AT91SAM9261 processor initialization
268
303
 * -------------------------------------------------------------------- */
269
304
 
270
 
void __init at91sam9261_initialize(unsigned long main_clock)
 
305
void __init at91sam9261_map_io(void)
271
306
{
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));
277
312
        else
278
313
                iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
279
 
 
280
 
 
 
314
}
 
315
 
 
316
void __init at91sam9261_initialize(unsigned long main_clock)
 
317
{
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)