[POWERPC] 4xx: Add PCI entry to 440EPx Sequoia DTS.
[deliverable/linux.git] / arch / powerpc / kernel / cpu_setup_44x.S
CommitLineData
84e3ad5b
VB
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
8112753b
VB
20_GLOBAL(__setup_cpu_440ep)
21 b __init_fpu_44x
22_GLOBAL(__setup_cpu_440epx)
340ffd26
VB
23 mflr r4
24 bl __init_fpu_44x
25 bl __plb_disable_wrp
47c0bd1a 26 bl __fixup_440A_mcheck
340ffd26
VB
27 mtlr r4
28 blr
29_GLOBAL(__setup_cpu_440grx)
30 b __plb_disable_wrp
47c0bd1a
BH
31_GLOBAL(__setup_cpu_440gx)
32_GLOBAL(__setup_cpu_440spe)
33 b __fixup_440A_mcheck
340ffd26 34
47c0bd1a
BH
35 /* Temporary fixup for arch/ppc until we kill the whole thing */
36#ifndef CONFIG_PPC_MERGE
37_GLOBAL(__fixup_440A_mcheck)
38 blr
39#endif
8112753b
VB
40
41/* enable APU between CPU and FPU */
42_GLOBAL(__init_fpu_44x)
43 mfspr r3,SPRN_CCR0
44 /* Clear DAPUIB flag in CCR0 */
45 rlwinm r3,r3,0,12,10
46 mtspr SPRN_CCR0,r3
47 isync
48 blr
49
340ffd26
VB
50/*
51 * Workaround for the incorrect write to DDR SDRAM errata.
52 * The write address can be corrupted during writes to
53 * DDR SDRAM when write pipelining is enabled on PLB0.
54 * Disable write pipelining here.
55 */
56#define DCRN_PLB4A0_ACR 0x81
57
58_GLOBAL(__plb_disable_wrp)
59 mfdcr r3,DCRN_PLB4A0_ACR
60 /* clear WRP bit in PLB4A0_ACR */
61 rlwinm r3,r3,0,8,6
62 mtdcr DCRN_PLB4A0_ACR,r3
63 isync
64 blr
65
This page took 0.057489 seconds and 5 git commands to generate.