[U-Boot-Users] Resubmit of PATCH MPC82XX RevA Support
Jon Loeliger
jdl at freescale.com
Thu Sep 23 21:31:07 CEST 2004
Wolfgang,
The following resubmission of the patch by Gridish Shlomi
adds support for the revA version of PQ27 and PQ27E.
I believe that this will fix the problems reported on this
list a week or two ago and discussed here:
RE: [U-Boot-Users] MPC8272ADS and uboot program check
Please let me know if this patch doesn't apply against
the current top-of-CVS.
This patch obsoletes the previous patch I submitted earlier
with the subject "PATCH MPC82XX RevA Support".
Thanks,
jdl
* Patch by Gridish Shlomi, 30 Aug 2004:
Added support to revA version of PQ27 and PQ27E.
Reverted baudrate back to original 115200 after unexplained
change to 38400 from rev 1.16 to 1.17.
diff -purN --exclude=CVS u-boot-u_boot_20040823/cpu/mpc8260/cpu.c
u-boot-ppc82xx/cpu/mpc8260/cpu.c
--- u-boot-u_boot_20040823/cpu/mpc8260/cpu.c Thu Apr 15 13:22:43 2004
+++ u-boot-ppc82xx/cpu/mpc8260/cpu.c Tue Sep 21 16:30:09 2004
@@ -68,6 +68,7 @@ int checkcpu (void)
k = 4;
break;
case PVR_8260_HIP7R1:
+ case PVR_8260_HIP7RA:
case PVR_8260_HIP7:
k = 7;
break;
@@ -129,9 +130,20 @@ int checkcpu (void)
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 0K50M");
+ break;
case 0x0D00:
- printf ("0.0 0K50M");
+ puts ("0.0 0K50M");
+ break;
+ case 0x0D10:
+ puts ("1.0 0K50M");
break;
default:
printf ("unknown [immr=0x%04x,k=0x%04x]", m, k);
diff -purN --exclude=CVS u-boot-u_boot_20040823/cpu/mpc8260/i2c.c
u-boot-ppc82xx/cpu/mpc8260/i2c.c
--- u-boot-u_boot_20040823/cpu/mpc8260/i2c.c Fri Jun 27 16:32:35 2003
+++ u-boot-ppc82xx/cpu/mpc8260/i2c.c Thu Sep 23 09:45:38 2004
@@ -149,7 +149,7 @@ i2c_roundrate(int hz, int speed, int fil
PRINTD(("\t\tmoddiv=%d, brgdiv=%d\n", moddiv, brgdiv));
- *brgval = (brgdiv / 2) - 3 - (2*filter);
+ *brgval = ((brgdiv + 1) / 2) - 3 - (2*filter);
if ((*brgval < 0) || (*brgval > 255)) {
PRINTD(("\t\trejected brgval=%d\n", *brgval));
@@ -158,7 +158,7 @@ i2c_roundrate(int hz, int speed, int fil
brgdiv = 2 * (*brgval + 3 + (2 * filter));
div = moddiv * brgdiv ;
- *totspeed = (hz + div - 1) / div;
+ *totspeed = hz / div;
PRINTD(("\t\taccepted brgval=%d, totspeed=%d\n", *brgval,
*totspeed));
diff -purN --exclude=CVS u-boot-u_boot_20040823/cpu/mpc8260/speed.c
u-boot-ppc82xx/cpu/mpc8260/speed.c
--- u-boot-u_boot_20040823/cpu/mpc8260/speed.c Tue Mar 23 16:14:28 2004
+++ u-boot-ppc82xx/cpu/mpc8260/speed.c Thu Sep 23 09:46:27 2004
@@ -125,7 +125,10 @@ int get_clocks (void)
busdf = (scmr & SCMR_BUSDF_MSK) >> SCMR_BUSDF_SHIFT;
cpmdf = (scmr & SCMR_CPMDF_MSK) >> SCMR_CPMDF_SHIFT;
- if ((get_pvr () == PVR_8260_HIP7) || (get_pvr () == PVR_8260_HIP7R1))
{ /* HiP7 */
+ /* HiP7, HiP7 Rev01, HiP7 RevA */
+ if ((get_pvr () == PVR_8260_HIP7) ||
+ (get_pvr () == PVR_8260_HIP7R1) ||
+ (get_pvr () == PVR_8260_HIP7RA)) {
pllmf = (scmr & SCMR_PLLMF_MSKH7) >> SCMR_PLLMF_SHIFT;
gd->vco_out = clkin * (pllmf + 1);
} else { /* HiP3, HiP4 */
diff -purN --exclude=CVS
u-boot-u_boot_20040823/include/asm-ppc/processor.h
u-boot-ppc82xx/include/asm-ppc/processor.h
--- u-boot-u_boot_20040823/include/asm-ppc/processor.h Fri Jul 9
18:27:15 2004
+++ u-boot-ppc82xx/include/asm-ppc/processor.h Tue Sep 21 16:30:09 2004
@@ -764,6 +764,7 @@
#define PVR_8260_HIP4 0x80811014
#define PVR_8260_HIP7 0x80822011
#define PVR_8260_HIP7R1 0x80822013
+#define PVR_8260_HIP7RA 0x80822014
/*
diff -purN --exclude=CVS
u-boot-u_boot_20040823/include/configs/MPC8260ADS.h
u-boot-ppc82xx/include/configs/MPC8260ADS.h
--- u-boot-u_boot_20040823/include/configs/MPC8260ADS.h Wed Jun 9
05:15:02 2004
+++ u-boot-ppc82xx/include/configs/MPC8260ADS.h Tue Sep 21 16:30:09 2004
@@ -175,7 +175,7 @@
#endif
#endif
-#define CONFIG_BAUDRATE 38400
+#define CONFIG_BAUDRATE 115200
#define CFG_EXCLUDE CFG_CMD_BEDBUG | \
CFG_CMD_BMP | \
More information about the U-Boot
mailing list