linux/arch/arm/mach-at91/at91x40.c
<<
>>
Prefs
   1/*
   2 * arch/arm/mach-at91/at91x40.c
   3 *
   4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
   5 * Copyright (C) 2005 SAN People
   6 *
   7 * This program is free software; you can redistribute it and/or modify
   8 * it under the terms of the GNU General Public License as published by
   9 * the Free Software Foundation; either version 2 of the License, or
  10 * (at your option) any later version.
  11 */
  12
  13#include <linux/kernel.h>
  14#include <linux/init.h>
  15#include <linux/irq.h>
  16#include <asm/mach/arch.h>
  17#include <mach/at91x40.h>
  18#include <mach/at91_st.h>
  19#include <mach/timex.h>
  20#include "generic.h"
  21
  22/*
  23 * Export the clock functions for the AT91X40. Some external code common
  24 * to all AT91 family parts relys on this, like the gpio and serial support.
  25 */
  26int clk_enable(struct clk *clk)
  27{
  28        return 0;
  29}
  30
  31void clk_disable(struct clk *clk)
  32{
  33}
  34
  35unsigned long clk_get_rate(struct clk *clk)
  36{
  37        return AT91X40_MASTER_CLOCK;
  38}
  39
  40void __init at91x40_initialize(unsigned long main_clock)
  41{
  42        at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
  43                        | (1 << AT91X40_ID_IRQ2);
  44}
  45
  46/*
  47 * The default interrupt priority levels (0 = lowest, 7 = highest).
  48 */
  49static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = {
  50        7,      /* Advanced Interrupt Controller (FIQ) */
  51        0,      /* System Peripherals */
  52        0,      /* USART 0 */
  53        0,      /* USART 1 */
  54        2,      /* Timer Counter 0 */
  55        2,      /* Timer Counter 1 */
  56        2,      /* Timer Counter 2 */
  57        0,      /* Watchdog timer */
  58        0,      /* Parallel IO Controller A */
  59        0,      /* Reserved */
  60        0,      /* Reserved */
  61        0,      /* Reserved */
  62        0,      /* Reserved */
  63        0,      /* Reserved */
  64        0,      /* Reserved */
  65        0,      /* Reserved */
  66        0,      /* External IRQ0 */
  67        0,      /* External IRQ1 */
  68        0,      /* External IRQ2 */
  69};
  70
  71void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
  72{
  73        if (!priority)
  74                priority = at91x40_default_irq_priority;
  75
  76        at91_aic_init(priority);
  77}
  78
  79