Path: blob/master/arch/blackfin/mach-bf561/hotplug.c
10817 views
/*1* Copyright 2007-2009 Analog Devices Inc.2* Graff Yang <[email protected]>3*4* Licensed under the GPL-2 or later.5*/67#include <linux/smp.h>8#include <asm/blackfin.h>9#include <asm/cacheflush.h>10#include <mach/pll.h>1112int hotplug_coreb;1314void platform_cpu_die(void)15{16unsigned long iwr;1718hotplug_coreb = 1;1920/*21* When CoreB wakes up, the code in _coreb_trampoline_start cannot22* turn off the data cache. This causes the CoreB failed to boot.23* As a workaround, we invalidate all the data cache before sleep.24*/25blackfin_invalidate_entire_dcache();2627/* disable core timer */28bfin_write_TCNTL(0);2930/* clear ipi interrupt IRQ_SUPPLE_0 of CoreB */31bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | (1 << (10 + 1)));32SSYNC();3334/* set CoreB wakeup by ipi0, iwr will be discarded */35bfin_iwr_set_sup0(&iwr, &iwr, &iwr);36SSYNC();3738coreb_die();39}404142