Path: blob/master/arch/powerpc/kernel/cpu_setup_44x.S
10817 views
/*1* This file contains low level CPU setup functions.2* Valentine Barshak <[email protected]>3* MontaVista Software, Inc (c) 20074*5* Based on cpu_setup_6xx code by6* Benjamin Herrenschmidt <[email protected]>7*8* This program is free software; you can redistribute it and/or9* modify it under the terms of the GNU General Public License10* as published by the Free Software Foundation; either version11* 2 of the License, or (at your option) any later version.12*13*/1415#include <asm/processor.h>16#include <asm/cputable.h>17#include <asm/ppc_asm.h>1819_GLOBAL(__setup_cpu_440ep)20b __init_fpu_44x21_GLOBAL(__setup_cpu_440epx)22mflr r423bl __init_fpu_44x24bl __plb_disable_wrp25bl __fixup_440A_mcheck26mtlr r427blr28_GLOBAL(__setup_cpu_440grx)29mflr r430bl __plb_disable_wrp31bl __fixup_440A_mcheck32mtlr r433blr34_GLOBAL(__setup_cpu_460ex)35_GLOBAL(__setup_cpu_460gt)36_GLOBAL(__setup_cpu_460sx)37_GLOBAL(__setup_cpu_apm821xx)38mflr r439bl __init_fpu_44x40bl __fixup_440A_mcheck41mtlr r442blr4344_GLOBAL(__setup_cpu_440x5)45_GLOBAL(__setup_cpu_440gx)46_GLOBAL(__setup_cpu_440spe)47b __fixup_440A_mcheck4849/* enable APU between CPU and FPU */50_GLOBAL(__init_fpu_44x)51mfspr r3,SPRN_CCR052/* Clear DAPUIB flag in CCR0 */53rlwinm r3,r3,0,12,1054mtspr SPRN_CCR0,r355isync56blr5758/*59* Workaround for the incorrect write to DDR SDRAM errata.60* The write address can be corrupted during writes to61* DDR SDRAM when write pipelining is enabled on PLB0.62* Disable write pipelining here.63*/64#define DCRN_PLB4A0_ACR 0x816566_GLOBAL(__plb_disable_wrp)67mfdcr r3,DCRN_PLB4A0_ACR68/* clear WRP bit in PLB4A0_ACR */69rlwinm r3,r3,0,8,670mtdcr DCRN_PLB4A0_ACR,r371isync72blr73747576