aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/mpc83xx/cpu_init.c')
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu_init.c90
1 files changed, 10 insertions, 80 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index fcac9f63a8..af8facad53 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -12,6 +12,12 @@
12#include <usb/ehci-ci.h> 12#include <usb/ehci-ci.h>
13#endif 13#endif
14 14
15#include "lblaw/lblaw.h"
16#include "elbc/elbc.h"
17#include "sysio/sysio.h"
18#include "arbiter/arbiter.h"
19#include "initreg/initreg.h"
20
15DECLARE_GLOBAL_DATA_PTR; 21DECLARE_GLOBAL_DATA_PTR;
16 22
17#ifdef CONFIG_QE 23#ifdef CONFIG_QE
@@ -47,62 +53,6 @@ static void config_qe_ioports(void)
47 */ 53 */
48void cpu_init_f (volatile immap_t * im) 54void cpu_init_f (volatile immap_t * im)
49{ 55{
50 __be32 acr_mask =
51#ifdef CONFIG_SYS_ACR_PIPE_DEP /* Arbiter pipeline depth */
52 ACR_PIPE_DEP |
53#endif
54#ifdef CONFIG_SYS_ACR_RPTCNT /* Arbiter repeat count */
55 ACR_RPTCNT |
56#endif
57#ifdef CONFIG_SYS_ACR_APARK /* Arbiter address parking mode */
58 ACR_APARK |
59#endif
60#ifdef CONFIG_SYS_ACR_PARKM /* Arbiter parking master */
61 ACR_PARKM |
62#endif
63 0;
64 __be32 acr_val =
65#ifdef CONFIG_SYS_ACR_PIPE_DEP /* Arbiter pipeline depth */
66 (CONFIG_SYS_ACR_PIPE_DEP << ACR_PIPE_DEP_SHIFT) |
67#endif
68#ifdef CONFIG_SYS_ACR_RPTCNT /* Arbiter repeat count */
69 (CONFIG_SYS_ACR_RPTCNT << ACR_RPTCNT_SHIFT) |
70#endif
71#ifdef CONFIG_SYS_ACR_APARK /* Arbiter address parking mode */
72 (CONFIG_SYS_ACR_APARK << ACR_APARK_SHIFT) |
73#endif
74#ifdef CONFIG_SYS_ACR_PARKM /* Arbiter parking master */
75 (CONFIG_SYS_ACR_PARKM << ACR_PARKM_SHIFT) |
76#endif
77 0;
78 __be32 spcr_mask =
79#ifdef CONFIG_SYS_SPCR_OPT /* Optimize transactions between CSB and other dev */
80 SPCR_OPT |
81#endif
82#ifdef CONFIG_SYS_SPCR_TSECEP /* all eTSEC's Emergency priority */
83 SPCR_TSECEP |
84#endif
85#ifdef CONFIG_SYS_SPCR_TSEC1EP /* TSEC1 Emergency priority */
86 SPCR_TSEC1EP |
87#endif
88#ifdef CONFIG_SYS_SPCR_TSEC2EP /* TSEC2 Emergency priority */
89 SPCR_TSEC2EP |
90#endif
91 0;
92 __be32 spcr_val =
93#ifdef CONFIG_SYS_SPCR_OPT
94 (CONFIG_SYS_SPCR_OPT << SPCR_OPT_SHIFT) |
95#endif
96#ifdef CONFIG_SYS_SPCR_TSECEP /* all eTSEC's Emergency priority */
97 (CONFIG_SYS_SPCR_TSECEP << SPCR_TSECEP_SHIFT) |
98#endif
99#ifdef CONFIG_SYS_SPCR_TSEC1EP /* TSEC1 Emergency priority */
100 (CONFIG_SYS_SPCR_TSEC1EP << SPCR_TSEC1EP_SHIFT) |
101#endif
102#ifdef CONFIG_SYS_SPCR_TSEC2EP /* TSEC2 Emergency priority */
103 (CONFIG_SYS_SPCR_TSEC2EP << SPCR_TSEC2EP_SHIFT) |
104#endif
105 0;
106 __be32 sccr_mask = 56 __be32 sccr_mask =
107#ifdef CONFIG_SYS_SCCR_ENCCM /* Encryption clock mode */ 57#ifdef CONFIG_SYS_SCCR_ENCCM /* Encryption clock mode */
108 SCCR_ENCCM | 58 SCCR_ENCCM |
@@ -179,28 +129,6 @@ void cpu_init_f (volatile immap_t * im)
179 (CONFIG_SYS_SCCR_SATACM << SCCR_SATACM_SHIFT) | 129 (CONFIG_SYS_SCCR_SATACM << SCCR_SATACM_SHIFT) |
180#endif 130#endif
181 0; 131 0;
182 __be32 lcrr_mask =
183#ifdef CONFIG_SYS_LCRR_DBYP /* PLL bypass */
184 LCRR_DBYP |
185#endif
186#ifdef CONFIG_SYS_LCRR_EADC /* external address delay */
187 LCRR_EADC |
188#endif
189#ifdef CONFIG_SYS_LCRR_CLKDIV /* system clock divider */
190 LCRR_CLKDIV |
191#endif
192 0;
193 __be32 lcrr_val =
194#ifdef CONFIG_SYS_LCRR_DBYP /* PLL bypass */
195 CONFIG_SYS_LCRR_DBYP |
196#endif
197#ifdef CONFIG_SYS_LCRR_EADC
198 CONFIG_SYS_LCRR_EADC |
199#endif
200#ifdef CONFIG_SYS_LCRR_CLKDIV /* system clock divider */
201 CONFIG_SYS_LCRR_CLKDIV |
202#endif
203 0;
204 132
205 /* Pointer is writable since we allocated a register for it */ 133 /* Pointer is writable since we allocated a register for it */
206 gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET); 134 gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
@@ -240,7 +168,7 @@ void cpu_init_f (volatile immap_t * im)
240 168
241 /* System General Purpose Register */ 169 /* System General Purpose Register */
242#ifdef CONFIG_SYS_SICRH 170#ifdef CONFIG_SYS_SICRH
243#if defined(CONFIG_MPC834x) || defined(CONFIG_MPC8313) 171#if defined(CONFIG_ARCH_MPC834X) || defined(CONFIG_ARCH_MPC8313)
244 /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */ 172 /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
245 __raw_writel((im->sysconf.sicrh & 0x0000000C) | CONFIG_SYS_SICRH, 173 __raw_writel((im->sysconf.sicrh & 0x0000000C) | CONFIG_SYS_SICRH,
246 &im->sysconf.sicrh); 174 &im->sysconf.sicrh);
@@ -312,7 +240,7 @@ void cpu_init_f (volatile immap_t * im)
312 im->gpio[1].dat = CONFIG_SYS_GPIO2_DAT; 240 im->gpio[1].dat = CONFIG_SYS_GPIO2_DAT;
313 im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR; 241 im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR;
314#endif 242#endif
315#if defined(CONFIG_USB_EHCI_FSL) && defined(CONFIG_MPC831x) 243#if defined(CONFIG_USB_EHCI_FSL) && defined(CONFIG_ARCH_MPC831X)
316 uint32_t temp; 244 uint32_t temp;
317 struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB1_ADDR; 245 struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB1_ADDR;
318 246
@@ -464,6 +392,7 @@ static int print_83xx_arb_event(int force)
464} 392}
465#endif /* CONFIG_DISPLAY_AER_xxxx */ 393#endif /* CONFIG_DISPLAY_AER_xxxx */
466 394
395#ifndef CONFIG_CPU_MPC83XX
467/* 396/*
468 * Figure out the cause of the reset 397 * Figure out the cause of the reset
469 */ 398 */
@@ -505,3 +434,4 @@ int prt_83xx_rsr(void)
505 434
506 return 0; 435 return 0;
507} 436}
437#endif