projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added support for the TQM8272 board from TQ
[oweals/u-boot.git]
/
cpu
/
mpc8260
/
cpu.c
diff --git
a/cpu/mpc8260/cpu.c
b/cpu/mpc8260/cpu.c
index 73881eef304291077cd2089d638a8f9479e97c55..94651dc4a69846731d2e8bae49645e5b2eb63c95 100644
(file)
--- a/
cpu/mpc8260/cpu.c
+++ b/
cpu/mpc8260/cpu.c
@@
-1,5
+1,5
@@
/*
/*
- * (C) Copyright 2000
+ * (C) Copyright 2000
-2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@
-22,12
+22,12
@@
*/
/*
*/
/*
- * CPU specific code for the MPC82
60
+ * CPU specific code for the MPC82
5x / MPC826x / MPC827x / MPC828x
*
* written or collected and sometimes rewritten by
* Magnus Damm <damm@bitsmart.com>
*
*
* written or collected and sometimes rewritten by
* Magnus Damm <damm@bitsmart.com>
*
- * m
inor modifications
by
+ * m
odified
by
* Wolfgang Denk <wd@denx.de>
*
* modified for 8260 by
* Wolfgang Denk <wd@denx.de>
*
* modified for 8260 by
@@
-35,6
+35,9
@@
*
* added 8260 masks by
* Marius Groeger <mag@sysgo.de>
*
* added 8260 masks by
* Marius Groeger <mag@sysgo.de>
+ *
+ * added HiP7 (824x/827x/8280) processors support by
+ * Yuli Barcohen <yuli@arabellasw.com>
*/
#include <common.h>
*/
#include <common.h>
@@
-44,10
+47,14
@@
#include <asm/processor.h>
#include <asm/cpm_8260.h>
#include <asm/processor.h>
#include <asm/cpm_8260.h>
+DECLARE_GLOBAL_DATA_PTR;
+
+#if defined(CONFIG_GET_CPU_STR_F)
+extern int get_cpu_str_f (char *buf);
+#endif
+
int checkcpu (void)
{
int checkcpu (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong clock = gd->cpu_clk;
uint pvr = get_pvr ();
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong clock = gd->cpu_clk;
uint pvr = get_pvr ();
@@
-56,15
+63,34
@@
int checkcpu (void)
puts ("CPU: ");
puts ("CPU: ");
- if (((pvr >> 16) & 0xff) != 0x81)
+ switch (pvr) {
+ case PVR_8260:
+ case PVR_8260_HIP3:
+ k = 3;
+ break;
+ case PVR_8260_HIP4:
+ k = 4;
+ break;
+ case PVR_8260_HIP7R1:
+ case PVR_8260_HIP7RA:
+ case PVR_8260_HIP7:
+ k = 7;
+ break;
+ default:
return -1; /* whoops! not an MPC8260 */
return -1; /* whoops! not an MPC8260 */
+ }
rev = pvr & 0xff;
immr = immap->im_memctl.memc_immr;
if ((immr & IMMR_ISB_MSK) != CFG_IMMR)
return -1; /* whoops! someone moved the IMMR */
rev = pvr & 0xff;
immr = immap->im_memctl.memc_immr;
if ((immr & IMMR_ISB_MSK) != CFG_IMMR)
return -1; /* whoops! someone moved the IMMR */
- printf ("MPC8260 (Rev %02x, Mask ", rev);
+#if defined(CONFIG_GET_CPU_STR_F)
+ get_cpu_str_f (buf);
+ printf ("%s (HiP%d Rev %02x, Mask ", buf, k, rev);
+#else
+ printf (CPU_ID_STR " (HiP%d Rev %02x, Mask ", k, rev);
+#endif
/*
* the bottom 16 bits of the immr are the Part Number and Mask Number
/*
* the bottom 16 bits of the immr are the Part Number and Mask Number
@@
-78,28
+104,55
@@
int checkcpu (void)
switch (m) {
case 0x0000:
switch (m) {
case 0x0000:
- p
rintf
("0.2 2J24M");
+ p
uts
("0.2 2J24M");
break;
case 0x0010:
break;
case 0x0010:
- p
rintf
("A.0 K22A");
+ p
uts
("A.0 K22A");
break;
case 0x0011:
break;
case 0x0011:
- p
rintf
("A.1 1K22A-XC");
+ p
uts
("A.1 1K22A-XC");
break;
case 0x0001:
break;
case 0x0001:
- p
rintf
("B.1 1K23A");
+ p
uts
("B.1 1K23A");
break;
case 0x0021:
break;
case 0x0021:
- p
rintf
("B.2 2K23A-XC");
+ p
uts
("B.2 2K23A-XC");
break;
case 0x0023:
break;
case 0x0023:
- p
rintf
("B.3 3K23A");
+ p
uts
("B.3 3K23A");
break;
case 0x0024:
break;
case 0x0024:
- p
rintf
("C.2 6K23A");
+ p
uts
("C.2 6K23A");
break;
case 0x0060:
break;
case 0x0060:
- printf ("A.0(A) 2K25A");
+ puts ("A.0(A) 2K25A");
+ break;
+ case 0x0062:
+ puts ("B.1 4K25A");
+ break;
+ case 0x0064:
+ puts ("C.0 5K25A");
+ break;
+ case 0x0A00:
+ puts ("0.0 0K49M");
+ break;
+ case 0x0A01:
+ puts ("0.1 1K49M");
+ break;
+ case 0x0A10:
+ puts ("1.0 1K49M");
+ break;
+ case 0x0C00:
+ puts ("0.0 0K50M");
+ break;
+ case 0x0C10:
+ puts ("1.0 1K50M");
+ break;
+ case 0x0D00:
+ puts ("0.0 0K50M");
+ break;
+ case 0x0D10:
+ puts ("1.0 1K50M");
break;
default:
printf ("unknown [immr=0x%04x,k=0x%04x]", m, k);
break;
default:
printf ("unknown [immr=0x%04x,k=0x%04x]", m, k);
@@
-176,8
+229,9
@@
void upmconfig (uint upm, uint * table, uint size)
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
+#if !defined(CONFIG_HAVE_OWN_RESET)
int
int
-do_reset (cmd_tbl_t * cmdtp,
bd_t * bd,
int flag, int argc, char *argv[])
+do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
ulong msr, addr;
{
ulong msr, addr;
@@
-209,6
+263,7
@@
do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
return 1;
}
return 1;
}
+#endif /* CONFIG_HAVE_OWN_RESET */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
@@
-218,8
+273,6
@@
do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
*/
unsigned long get_tbclk (void)
{
*/
unsigned long get_tbclk (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
ulong tbclk;
tbclk = (gd->bus_clk + 3L) / 4L;
ulong tbclk;
tbclk = (gd->bus_clk + 3L) / 4L;