* clps711x/cleanup: ARM: clps711x: Cleanup IRQ handling ARM clps711x: Removed unused header mach/time.h ARM: clps711x: Added note about support EP731x CPU to Kconfig ARM: clps711x: Added missing register definitions ARM: clps711x: Used own subarch directory for store header file
Unified · Split
| @@ -373,12 +373,12 @@ config ARCH_HIGHBANK · 372 unmodified lines | |||
| 373 | Support for the Calxeda Highbank SoC based boards. | 373 | Support for the Calxeda Highbank SoC based boards. |
| 374 | 374 | ||
| 375 | config ARCH_CLPS711X | 375 | config ARCH_CLPS711X |
| 376 | bool "Cirrus Logic CLPS711x/EP721x-based" | 376 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
| 377 | select CPU_ARM720T | 377 | select CPU_ARM720T |
| 378 | select ARCH_USES_GETTIMEOFFSET | 378 | select ARCH_USES_GETTIMEOFFSET |
| 379 | select NEED_MACH_MEMORY_H | 379 | select NEED_MACH_MEMORY_H |
| 380 | help | 380 | help |
| 381 | Support for Cirrus Logic 711x/721x based boards. | 381 | Support for Cirrus Logic 711x/721x/731x based boards. |
| 382 | 382 | ||
| 383 | config ARCH_CNS3XXX | 383 | config ARCH_CNS3XXX |
| 384 | bool "Cavium Networks CNS3XXX family" | 384 | bool "Cavium Networks CNS3XXX family" |
| @@ -66,12 +66,6 @@ static void int1_mask(struct irq_data *d) · 65 unmodified lines | |||
| 66 | 66 | ||
| 67 | static void int1_ack(struct irq_data *d) | 67 | static void int1_ack(struct irq_data *d) |
| 68 | { | 68 | { |
| 69 | u32 intmr1; | ||
| 70 | |||
| 71 | intmr1 = clps_readl(INTMR1); | ||
| 72 | intmr1 &= ~(1 << d->irq); | ||
| 73 | clps_writel(intmr1, INTMR1); | ||
| 74 | |||
| 75 | switch (d->irq) { | 69 | switch (d->irq) { |
| 76 | case IRQ_CSINT: clps_writel(0, COEOI); break; | 70 | case IRQ_CSINT: clps_writel(0, COEOI); break; |
| 77 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; | 71 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; |
| @@ -108,12 +102,6 @@ static void int2_mask(struct irq_data *d) · 30 unmodified lines | |||
| 108 | 102 | ||
| 109 | static void int2_ack(struct irq_data *d) | 103 | static void int2_ack(struct irq_data *d) |
| 110 | { | 104 | { |
| 111 | u32 intmr2; | ||
| 112 | |||
| 113 | intmr2 = clps_readl(INTMR2); | ||
| 114 | intmr2 &= ~(1 << (d->irq - 16)); | ||
| 115 | clps_writel(intmr2, INTMR2); | ||
| 116 | |||
| 117 | switch (d->irq) { | 105 | switch (d->irq) { |
| 118 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; | 106 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; |
| 119 | } | 107 | } |
| @@ -1,8 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/include/asm/hardware/clps7111.h | 2 | * This file contains the hardware definitions of the Cirrus Logic |
| 3 | * | 3 | * ARM7 CLPS711X internal registers. |
| 4 | * This file contains the hardware definitions of the CLPS7111 internal | ||
| 5 | * registers. | ||
| 6 | * | 4 | * |
| 7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. |
| 8 | * | 6 | * |
| @@ -20,8 +18,8 @@ · 11 unmodified lines | |||
| 20 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | */ | 20 | */ |
| 23 | #ifndef __ASM_HARDWARE_CLPS7111_H | 21 | #ifndef __MACH_CLPS711X_H |
| 24 | #define __ASM_HARDWARE_CLPS7111_H | 22 | #define __MACH_CLPS711X_H |
| 25 | 23 | ||
| 26 | #define CLPS711X_PHYS_BASE (0x80000000) | 24 | #define CLPS711X_PHYS_BASE (0x80000000) |
| 27 | 25 | ||
| @@ -43,7 +41,7 @@ · 15 unmodified lines | |||
| 43 | #define INTSR1 (0x0240) | 41 | #define INTSR1 (0x0240) |
| 44 | #define INTMR1 (0x0280) | 42 | #define INTMR1 (0x0280) |
| 45 | #define LCDCON (0x02c0) | 43 | #define LCDCON (0x02c0) |
| 46 | #define TC1D (0x0300) | 44 | #define TC1D (0x0300) |
| 47 | #define TC2D (0x0340) | 45 | #define TC2D (0x0340) |
| 48 | #define RTCDR (0x0380) | 46 | #define RTCDR (0x0380) |
| 49 | #define RTCMR (0x03c0) | 47 | #define RTCMR (0x03c0) |
| @@ -89,6 +87,14 @@ · 39 unmodified lines | |||
| 89 | #define LEDFLSH (0x22c0) | 87 | #define LEDFLSH (0x22c0) |
| 90 | #define SDCONF (0x2300) | 88 | #define SDCONF (0x2300) |
| 91 | #define SDRFPR (0x2340) | 89 | #define SDRFPR (0x2340) |
| 90 | #define UNIQID (0x2440) | ||
| 91 | #define DAI64FS (0x2600) | ||
| 92 | #define PLLW (0x2610) | ||
| 93 | #define PLLR (0xa5a8) | ||
| 94 | #define RANDID0 (0x2700) | ||
| 95 | #define RANDID1 (0x2704) | ||
| 96 | #define RANDID2 (0x2708) | ||
| 97 | #define RANDID3 (0x270c) | ||
| 92 | 98 | ||
| 93 | /* common bits: SYSCON1 / SYSCON2 */ | 99 | /* common bits: SYSCON1 / SYSCON2 */ |
| 94 | #define SYSCON_UARTEN (1 << 8) | 100 | #define SYSCON_UARTEN (1 << 8) |
| @@ -136,6 +142,8 @@ · 41 unmodified lines | |||
| 136 | #define SYSFLG1_CTXFF (1 << 25) | 142 | #define SYSFLG1_CTXFF (1 << 25) |
| 137 | #define SYSFLG1_SSIBUSY (1 << 26) | 143 | #define SYSFLG1_SSIBUSY (1 << 26) |
| 138 | #define SYSFLG1_ID (1 << 29) | 144 | #define SYSFLG1_ID (1 << 29) |
| 145 | #define SYSFLG1_VERID(x) (((x) >> 30) & 3) | ||
| 146 | #define SYSFLG1_VERID_MASK (3 << 30) | ||
| 139 | 147 | ||
| 140 | #define SYSFLG2_SSRXOF (1 << 0) | 148 | #define SYSFLG2_SSRXOF (1 << 0) |
| 141 | #define SYSFLG2_RESVAL (1 << 1) | 149 | #define SYSFLG2_RESVAL (1 << 1) |
| @@ -183,9 +191,12 @@ · 41 unmodified lines | |||
| 183 | #define UBRLCR_WRDLEN8 (3 << 17) | 191 | #define UBRLCR_WRDLEN8 (3 << 17) |
| 184 | #define UBRLCR_WRDLEN_MASK (3 << 17) | 192 | #define UBRLCR_WRDLEN_MASK (3 << 17) |
| 185 | 193 | ||
| 194 | #define SYNCIO_FRMLEN(x) (((x) & 0x3f) << 7) | ||
| 195 | #define SYNCIO_CFGLEN(x) ((x) & 0x7f) | ||
| 186 | #define SYNCIO_SMCKEN (1 << 13) | 196 | #define SYNCIO_SMCKEN (1 << 13) |
| 187 | #define SYNCIO_TXFRMEN (1 << 14) | 197 | #define SYNCIO_TXFRMEN (1 << 14) |
| 188 | 198 | ||
| 199 | #define DAIR_RESERVED (0x0404) | ||
| 189 | #define DAIR_DAIEN (1 << 16) | 200 | #define DAIR_DAIEN (1 << 16) |
| 190 | #define DAIR_ECS (1 << 17) | 201 | #define DAIR_ECS (1 << 17) |
| 191 | #define DAIR_LCTM (1 << 19) | 202 | #define DAIR_LCTM (1 << 19) |
| @@ -212,11 +223,23 @@ · 20 unmodified lines | |||
| 212 | #define DAISR_LCNE (1 << 11) | 223 | #define DAISR_LCNE (1 << 11) |
| 213 | #define DAISR_FIFO (1 << 12) | 224 | #define DAISR_FIFO (1 << 12) |
| 214 | 225 | ||
| 226 | #define DAI64FS_I2SF64 (1 << 0) | ||
| 227 | #define DAI64FS_AUDIOCLKEN (1 << 1) | ||
| 228 | #define DAI64FS_AUDIOCLKSRC (1 << 2) | ||
| 229 | #define DAI64FS_MCLK256EN (1 << 3) | ||
| 230 | #define DAI64FS_LOOPBACK (1 << 5) | ||
| 231 | |||
| 215 | #define SYSCON3_ADCCON (1 << 0) | 232 | #define SYSCON3_ADCCON (1 << 0) |
| 233 | #define SYSCON3_CLKCTL0 (1 << 1) | ||
| 234 | #define SYSCON3_CLKCTL1 (1 << 2) | ||
| 216 | #define SYSCON3_DAISEL (1 << 3) | 235 | #define SYSCON3_DAISEL (1 << 3) |
| 217 | #define SYSCON3_ADCCKNSEN (1 << 4) | 236 | #define SYSCON3_ADCCKNSEN (1 << 4) |
| 237 | #define SYSCON3_VERSN(x) (((x) >> 5) & 7) | ||
| 238 | #define SYSCON3_VERSN_MASK (7 << 5) | ||
| 218 | #define SYSCON3_FASTWAKE (1 << 8) | 239 | #define SYSCON3_FASTWAKE (1 << 8) |
| 219 | #define SYSCON3_DAIEN (1 << 9) | 240 | #define SYSCON3_DAIEN (1 << 9) |
| 241 | #define SYSCON3_128FS SYSCON3_DAIEN | ||
| 242 | #define SYSCON3_ENPD67 (1 << 10) | ||
| 220 | 243 | ||
| 221 | #define SDCONF_ACTIVE (1 << 10) | 244 | #define SDCONF_ACTIVE (1 << 10) |
| 222 | #define SDCONF_CLKCTL (1 << 9) | 245 | #define SDCONF_CLKCTL (1 << 9) |
| @@ -231,4 +254,25 @@ · 8 unmodified lines | |||
| 231 | #define SDCONF_CASLAT_2 (2) | 254 | #define SDCONF_CASLAT_2 (2) |
| 232 | #define SDCONF_CASLAT_3 (3) | 255 | #define SDCONF_CASLAT_3 (3) |
| 233 | 256 | ||
| 234 | #endif /* __ASM_HARDWARE_CLPS7111_H */ | 257 | #define MEMCFG_BUS_WIDTH_32 (1) |
| 258 | #define MEMCFG_BUS_WIDTH_16 (0) | ||
| 259 | #define MEMCFG_BUS_WIDTH_8 (3) | ||
| 260 | |||
| 261 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) | ||
| 262 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) | ||
| 263 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) | ||
| 264 | #define MEMCFG_WAITSTATE_5_3 (3 << 2) | ||
| 265 | #define MEMCFG_WAITSTATE_4_2 (4 << 2) | ||
| 266 | #define MEMCFG_WAITSTATE_3_2 (5 << 2) | ||
| 267 | #define MEMCFG_WAITSTATE_2_2 (6 << 2) | ||
| 268 | #define MEMCFG_WAITSTATE_1_2 (7 << 2) | ||
| 269 | #define MEMCFG_WAITSTATE_8_1 (8 << 2) | ||
| 270 | #define MEMCFG_WAITSTATE_7_1 (9 << 2) | ||
| 271 | #define MEMCFG_WAITSTATE_6_1 (10 << 2) | ||
| 272 | #define MEMCFG_WAITSTATE_5_1 (11 << 2) | ||
| 273 | #define MEMCFG_WAITSTATE_4_0 (12 << 2) | ||
| 274 | #define MEMCFG_WAITSTATE_3_0 (13 << 2) | ||
| 275 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) | ||
| 276 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) | ||
| 277 | |||
| 278 | #endif /* __MACH_CLPS711X_H */ | ||
| @@ -22,7 +22,7 @@ · 21 unmodified lines | |||
| 22 | #ifndef __MACH_HARDWARE_H | 22 | #ifndef __MACH_HARDWARE_H |
| 23 | #define __MACH_HARDWARE_H | 23 | #define __MACH_HARDWARE_H |
| 24 | 24 | ||
| 25 | #include <asm/hardware/clps7111.h> | 25 | #include <mach/clps711x.h> |
| 26 | 26 | ||
| 27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) | 27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) |
| 28 | 28 | ||
| @@ -35,7 +35,6 @@ · 34 unmodified lines | |||
| 35 | #define IRQ_SSEOTI 15 | 35 | #define IRQ_SSEOTI 15 |
| 36 | 36 | ||
| 37 | #define INT1_IRQS (0x0000fff0) | 37 | #define INT1_IRQS (0x0000fff0) |
| 38 | #define INT1_ACK_IRQS (0x00004f10) | ||
| 39 | 38 | ||
| 40 | /* | 39 | /* |
| 41 | * Interrupts from INTSR2 | 40 | * Interrupts from INTSR2 |
| @@ -47,7 +46,5 @@ · 5 unmodified lines | |||
| 47 | #define IRQ_URXINT2 (16+13) /* bit 13 */ | 46 | #define IRQ_URXINT2 (16+13) /* bit 13 */ |
| 48 | 47 | ||
| 49 | #define INT2_IRQS (0x30070000) | 48 | #define INT2_IRQS (0x30070000) |
| 50 | #define INT2_ACK_IRQS (0x00010000) | ||
| 51 | |||
| 52 | #define NR_IRQS 30 | ||
| 53 | 49 | ||
| 50 | #define NR_IRQS 30 | ||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-clps711x/include/mach/time.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #include <asm/leds.h> | ||
| 21 | #include <mach/hardware.h> | ||
| 22 | |||
| 23 | extern void clps711x_setup_timer(void); | ||
| 24 | |||
| 25 | /* | ||
| 26 | * IRQ handler for the timer | ||
| 27 | */ | ||
| 28 | static irqreturn_t | ||
| 29 | p720t_timer_interrupt(int irq, void *dev_id) | ||
| 30 | { | ||
| 31 | struct pt_regs *regs = get_irq_regs(); | ||
| 32 | do_leds(); | ||
| 33 | xtime_update(1); | ||
| 34 | #ifndef CONFIG_SMP | ||
| 35 | update_process_times(user_mode(regs)); | ||
| 36 | #endif | ||
| 37 | do_profile(regs); | ||
| 38 | return IRQ_HANDLED; | ||
| 39 | } | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Set up timer interrupt, and return the current time in seconds. | ||
| 43 | */ | ||
| 44 | void __init time_init(void) | ||
| 45 | { | ||
| 46 | clps711x_setup_timer(); | ||
| 47 | timer_irq.handler = p720t_timer_interrupt; | ||
| 48 | setup_irq(IRQ_TC2OI, &timer_irq); | ||
| 49 | } | ||
| @@ -17,7 +17,7 @@ · 16 unmodified lines | |||
| 17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ | 19 | */ |
| 20 | #include <asm/hardware/clps7111.h> | 20 | #include <mach/clps711x.h> |
| 21 | 21 | ||
| 22 | #ifdef CONFIG_DEBUG_CLPS711X_UART2 | 22 | #ifdef CONFIG_DEBUG_CLPS711X_UART2 |
| 23 | #define SYSFLGx SYSFLG2 | 23 | #define SYSFLGx SYSFLG2 |