From 1e924e2f1e073684b845c95886183bac6a992fb0 Mon Sep 17 00:00:00 2001 From: Graf Yang Date: Fri, 19 Mar 2010 08:01:27 +0000 Subject: Blackfin: SMP: flush CoreB cache when shutting down When CoreB wakes up, it needs to read variables that CoreA might have modified, and might be in CoreB's cache. So kill CoreB's cache before going to sleep so that when we wake up, we are in a coherent state. Signed-off-by: Graf Yang Signed-off-by: Mike Frysinger diff --git a/arch/blackfin/mach-bf561/hotplug.c b/arch/blackfin/mach-bf561/hotplug.c index 42fc085..0123117 100644 --- a/arch/blackfin/mach-bf561/hotplug.c +++ b/arch/blackfin/mach-bf561/hotplug.c @@ -7,6 +7,7 @@ #include #include +#include #include int hotplug_coreb; @@ -14,8 +15,16 @@ int hotplug_coreb; void platform_cpu_die(void) { unsigned long iwr; + hotplug_coreb = 1; + /* + * When CoreB wakes up, the code in _coreb_trampoline_start cannot + * turn off the data cache. This causes the CoreB failed to boot. + * As a workaround, we invalidate all the data cache before sleep. + */ + blackfin_invalidate_entire_dcache(); + /* disable core timer */ bfin_write_TCNTL(0); -- cgit v0.10.2 From 4e3d96deff59d126cfa289645e136e295e65480f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Mar 2011 13:41:22 -0400 Subject: Blackfin: wire up new syncfs syscall Signed-off-by: Mike Frysinger diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h index c97497d..ff9a9f3 100644 --- a/arch/blackfin/include/asm/unistd.h +++ b/arch/blackfin/include/asm/unistd.h @@ -396,8 +396,9 @@ #define __NR_name_to_handle_at 375 #define __NR_open_by_handle_at 376 #define __NR_clock_adjtime 377 +#define __NR_syncfs 378 -#define __NR_syscall 378 +#define __NR_syscall 379 #define NR_syscalls __NR_syscall /* Old optional stuff no one actually uses */ diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 757943f..46ab457 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S @@ -1752,6 +1752,7 @@ ENTRY(_sys_call_table) .long _sys_name_to_handle_at /* 375 */ .long _sys_open_by_handle_at .long _sys_clock_adjtime + .long _sys_syncfs .rept NR_syscalls-(.-_sys_call_table)/4 .long _sys_ni_syscall -- cgit v0.10.2 From bee18bebda46bc112916a5124a23a9c7b244b82d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 21 Mar 2011 02:39:10 -0400 Subject: Blackfin: enable atomic64_t support Signed-off-by: Mike Frysinger diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 01615d4..672c216 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -31,6 +31,7 @@ config BLACKFIN select HAVE_OPROFILE select ARCH_WANT_OPTIONAL_GPIOLIB select HAVE_GENERIC_HARDIRQS + select GENERIC_ATOMIC64 select GENERIC_IRQ_PROBE select IRQ_PER_CPU if SMP select GENERIC_HARDIRQS_NO_DEPRECATED diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h index d27c627..e485089 100644 --- a/arch/blackfin/include/asm/atomic.h +++ b/arch/blackfin/include/asm/atomic.h @@ -121,4 +121,6 @@ static inline int atomic_test_mask(int mask, atomic_t *v) #endif +#include + #endif -- cgit v0.10.2 From de55aa33ca6928881ca5c402bb0f5db242fbcdba Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Mar 2011 21:06:16 -0400 Subject: Blackfin: bf54x: re-enable anomaly 05000353 for all revs Even though the anomaly sheet says that the the bootrom is fixed, tests have shown that the fix itself does not handle all cases. So until we get a ROM update, assume the reset code is still broken and we need to handle things ourselves. Signed-off-by: Mike Frysinger diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h index 4070079..ffd0537 100644 --- a/arch/blackfin/mach-bf548/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h @@ -81,7 +81,11 @@ /* PLL Status Register Is Inaccurate */ #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ -#define ANOMALY_05000353 (__SILICON_REVISION__ < 2) +/* + * Note: anomaly sheet says this is fixed with bf54x-0.2+, but testing + * shows that the fix itself does not cover all cases. + */ +#define ANOMALY_05000353 (1) /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ #define ANOMALY_05000355 (__SILICON_REVISION__ < 1) /* System Stalled During A Core Access To AMC While A Core Access To NFC FIFO Is Required */ -- cgit v0.10.2