From 10a5ecd03f9f5c374f954cf50a4f85d73f8ce338 Mon Sep 17 00:00:00 2001 From: Graf Yang Date: Wed, 1 Jul 2009 04:08:01 +0000 Subject: Blackfin: update handling of anomaly 364 (wrong rev id in BF527-0.1) This anomaly only applies to the BF527-0.1, not the BF526-0.1, and not any other revision of the BF527. So make sure we don't go returning 0xffff for other cases. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/processor.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'arch/blackfin/include/asm') diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index d0be99be830..a36ad8dac06 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h @@ -105,23 +105,16 @@ static inline uint32_t __pure bfin_revid(void) /* Always use CHIPID, to work around ANOMALY_05000234 */ uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28; -#ifdef CONFIG_BF52x - /* ANOMALY_05000357 +#ifdef _BOOTROM_GET_DXE_ADDRESS_TWI + /* + * ANOMALY_05000364 * Incorrect Revision Number in DSPID Register */ - if (revid == 0) - switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) { - case 0x0010: - revid = 0; - break; - case 0x2796: - revid = 1; - break; - default: - revid = 0xFFFF; - break; - } + if (ANOMALY_05000364 && + bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI) == 0x2796) + revid = 1; #endif + return revid; } -- cgit v1.2.3 From ad863a9dc9887330b2ab753323063865c59d8db6 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 7 Jul 2009 02:47:14 +0000 Subject: Blackfin: fix handling of IPEND in interrupt context save The interrupt context save logic incorrectly stored the address of the IPEND register rather than its value due to a missing dereference. While we're here, also enable this code for all kernel debugging scenarios and not just when KGDB is enabled. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/context.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/blackfin/include/asm') diff --git a/arch/blackfin/include/asm/context.S b/arch/blackfin/include/asm/context.S index 16561ab18b3..f8a664f022b 100644 --- a/arch/blackfin/include/asm/context.S +++ b/arch/blackfin/include/asm/context.S @@ -223,9 +223,10 @@ [--sp] = RETN; [--sp] = RETE; [--sp] = SEQSTAT; -#ifdef CONFIG_KGDB - r1.l = lo(IPEND); - r1.h = hi(IPEND); +#ifdef CONFIG_DEBUG_KERNEL + p1.l = lo(IPEND); + p1.h = hi(IPEND); + r1 = [p1]; [--sp] = r1; #else [--sp] = r0; /* Skip IPEND as well. */ -- cgit v1.2.3 From c70c754ff916cedd969a73549799d2167ffefcd6 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Thu, 9 Jul 2009 09:58:52 +0000 Subject: Blackfin: drop per-cpu loops_per_jiffy tracking On Blackfin SMP, a per-cpu loops_per_jiffy is pointless since both cores always run at the same CCLK. In addition, the current implementation has flaws since the main consumer for loops_per_jiffy (asm/delay.h) uses the global kernel loops_per_jiffy and not the per_cpu one. So punt all of the per-cpu handling and go back to the global shared one. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/cpu.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/blackfin/include/asm') diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h index 565b8136855..fadfa82f93b 100644 --- a/arch/blackfin/include/asm/cpu.h +++ b/arch/blackfin/include/asm/cpu.h @@ -32,7 +32,6 @@ struct blackfin_cpudata { struct task_struct *idle; unsigned int imemctl; unsigned int dmemctl; - unsigned long loops_per_jiffy; unsigned long dcache_invld_count; unsigned long icache_invld_count; }; -- cgit v1.2.3 From 6843f405da9d0adf734d8f695311e29cc92a220c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 16 Jul 2009 13:53:37 -0400 Subject: Blackfin: define HARDIRQ_BITS again for now The default values of HARDIRQ_BITS and PREEMPT_BITS in common code leads to build failure: In file included from include/linux/interrupt.h:12, from include/linux/kernel_stat.h:8, from arch/blackfin/kernel/asm-offsets.c:32: include/linux/hardirq.h:66:2: error: #error PREEMPT_ACTIVE is too low! So until that gets resolved, just declare our own default value again. Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/hardirq.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/blackfin/include/asm') diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h index cbd52f86bb9..0b78b873df5 100644 --- a/arch/blackfin/include/asm/hardirq.h +++ b/arch/blackfin/include/asm/hardirq.h @@ -6,6 +6,9 @@ extern void ack_bad_irq(unsigned int irq); #define ack_bad_irq ack_bad_irq +/* Define until common code gets sane defaults */ +#define HARDIRQ_BITS 9 + #include #endif -- cgit v1.2.3