]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/powerpc/kernel/cpu_setup_44x.S
31c18b52affb878031c69fda37421ff5e53c391f
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / cpu_setup_44x.S
1 /*
2  * This file contains low level CPU setup functions.
3  * Valentine Barshak <vbarshak@ru.mvista.com>
4  * MontaVista Software, Inc (c) 2007
5  *
6  * Based on cpu_setup_6xx code by
7  * Benjamin Herrenschmidt <benh@kernel.crashing.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version
12  * 2 of the License, or (at your option) any later version.
13  *
14  */
15
16 #include <asm/processor.h>
17 #include <asm/cputable.h>
18 #include <asm/ppc_asm.h>
19
20 _GLOBAL(__setup_cpu_440ep)
21         b       __init_fpu_44x
22 _GLOBAL(__setup_cpu_440epx)
23         mflr    r4
24         bl      __init_fpu_44x
25         bl      __plb_disable_wrp
26         bl      __fixup_440A_mcheck
27         mtlr    r4
28         blr
29 _GLOBAL(__setup_cpu_440grx)
30         mflr    r4
31         bl      __plb_disable_wrp
32         bl      __fixup_440A_mcheck
33         mtlr    r4
34         blr
35 _GLOBAL(__setup_cpu_460ex)
36 _GLOBAL(__setup_cpu_460gt)
37         mflr    r4
38         bl      __init_fpu_44x
39         bl      __fixup_440A_mcheck
40         mtlr    r4
41         blr
42
43 _GLOBAL(__setup_cpu_440gx)
44 _GLOBAL(__setup_cpu_440spe)
45         b       __fixup_440A_mcheck
46
47 /* enable APU between CPU and FPU */
48 _GLOBAL(__init_fpu_44x)
49         mfspr   r3,SPRN_CCR0
50         /* Clear DAPUIB flag in CCR0 */
51         rlwinm  r3,r3,0,12,10
52         mtspr   SPRN_CCR0,r3
53         isync
54         blr
55
56 /*
57  * Workaround for the incorrect write to DDR SDRAM errata.
58  * The write address can be corrupted during writes to
59  * DDR SDRAM when write pipelining is enabled on PLB0.
60  * Disable write pipelining here.
61  */
62 #define DCRN_PLB4A0_ACR 0x81
63
64 _GLOBAL(__plb_disable_wrp)
65         mfdcr   r3,DCRN_PLB4A0_ACR
66         /* clear WRP bit in PLB4A0_ACR */
67         rlwinm  r3,r3,0,8,6
68         mtdcr   DCRN_PLB4A0_ACR,r3
69         isync
70         blr
71