diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2012-07-24 10:33:12 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-24 10:33:12 -0400 |
commit | e5766aea5b9b7519654261c27b639f567b5415b4 (patch) | |
tree | a4c9cab5c07e5656d0199871e348765fb8a0269d /arch/mips/bcm63xx/irq.c | |
parent | 288752a8aa1be6cf89ee5066435a617efd97fb86 (diff) |
MIPS: BCM63XX: Add basic BCM6328 support
This includes CPU speed, memory size detection and working UART, but
lacking the appropriate drivers, no support for attached flash.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/3951/
Reviewed-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/bcm63xx/irq.c')
-rw-r--r-- | arch/mips/bcm63xx/irq.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c index 9a216a451d92..18e051ad18a5 100644 --- a/arch/mips/bcm63xx/irq.c +++ b/arch/mips/bcm63xx/irq.c | |||
@@ -27,6 +27,17 @@ static void __internal_irq_unmask_32(unsigned int irq) __maybe_unused; | |||
27 | static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused; | 27 | static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused; |
28 | 28 | ||
29 | #ifndef BCMCPU_RUNTIME_DETECT | 29 | #ifndef BCMCPU_RUNTIME_DETECT |
30 | #ifdef CONFIG_BCM63XX_CPU_6328 | ||
31 | #define irq_stat_reg PERF_IRQSTAT_6328_REG | ||
32 | #define irq_mask_reg PERF_IRQMASK_6328_REG | ||
33 | #define irq_bits 64 | ||
34 | #define is_ext_irq_cascaded 1 | ||
35 | #define ext_irq_start (BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE) | ||
36 | #define ext_irq_end (BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE) | ||
37 | #define ext_irq_count 4 | ||
38 | #define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6328 | ||
39 | #define ext_irq_cfg_reg2 0 | ||
40 | #endif | ||
30 | #ifdef CONFIG_BCM63XX_CPU_6338 | 41 | #ifdef CONFIG_BCM63XX_CPU_6338 |
31 | #define irq_stat_reg PERF_IRQSTAT_6338_REG | 42 | #define irq_stat_reg PERF_IRQSTAT_6338_REG |
32 | #define irq_mask_reg PERF_IRQMASK_6338_REG | 43 | #define irq_mask_reg PERF_IRQMASK_6338_REG |
@@ -118,6 +129,16 @@ static void bcm63xx_init_irq(void) | |||
118 | irq_mask_addr = bcm63xx_regset_address(RSET_PERF); | 129 | irq_mask_addr = bcm63xx_regset_address(RSET_PERF); |
119 | 130 | ||
120 | switch (bcm63xx_get_cpu_id()) { | 131 | switch (bcm63xx_get_cpu_id()) { |
132 | case BCM6328_CPU_ID: | ||
133 | irq_stat_addr += PERF_IRQSTAT_6328_REG; | ||
134 | irq_mask_addr += PERF_IRQMASK_6328_REG; | ||
135 | irq_bits = 64; | ||
136 | ext_irq_count = 4; | ||
137 | is_ext_irq_cascaded = 1; | ||
138 | ext_irq_start = BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE; | ||
139 | ext_irq_end = BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE; | ||
140 | ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328; | ||
141 | break; | ||
121 | case BCM6338_CPU_ID: | 142 | case BCM6338_CPU_ID: |
122 | irq_stat_addr += PERF_IRQSTAT_6338_REG; | 143 | irq_stat_addr += PERF_IRQSTAT_6338_REG; |
123 | irq_mask_addr += PERF_IRQMASK_6338_REG; | 144 | irq_mask_addr += PERF_IRQMASK_6338_REG; |