Skip to contentSkip to conversation

ppc4xx: Update PMC405 board support

PATCH New Matthias Fuchs 2 participants 2 messages Feb 15, 2009 – Feb 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Update PMC405 board support

This patch prepares the good old PMC405 board support for upcoming PMC405V2 patches.

---
 board/esd/pmc405/config.mk |    6 +----
 board/esd/pmc405/pmc405.c  |   18 +++++++------
 include/configs/PMC405.h   |   58 ++++++++++++++++++++++----------------------
 3 files changed, 40 insertions(+), 42 deletions(-)
board/esd/pmc405/config.mk +1 -5
index fc2794d..5a3fc4b 100644
@@ -21,8 +21,4 @@
 # MA 02111-1307 USA
 #
 
-#
-# esd PMC405 boards
-#
-
-TEXT_BASE = 0xFFFC0000
+TEXT_BASE = 0xFFF80000
board/esd/pmc405/pmc405.c +10 -8
index dd58d01..10e7ce4 100644
@@ -2,7 +2,7 @@
  * (C) Copyright 2001-2003
  * Stefan Roese, DENX Software Engineering, sr at denx.de.
  *
- * (C) Copyright 2005
+ * (C) Copyright 2005-2009
  * Matthias Fuchs, esd gmbh germany, matthias.fuchs at esd-electronics.com
  *
  * See file CREDITS for list of people who contributed to this
@@ -26,6 +26,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <command.h>
 #include <malloc.h>
 
@@ -77,16 +78,16 @@ int board_early_init_f (void)
 					CONFIG_SYS_NONMONARCH | \
 					CONFIG_SYS_REV1_2) << 5));
 
-	if (!(in32(GPIO0_IR) & CONFIG_SYS_REV1_2)) {
+	if (!(in_be32((void*)GPIO0_IR) & CONFIG_SYS_REV1_2)) {
 		/* rev 1.2 boards */
 		mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_INTA_FAKE | \
 						CONFIG_SYS_SELF_RST) << 5));
 	}
 
-	out32(GPIO0_OR, 0);
+	out_be32((void*)GPIO0_OR, CONFIG_SYS_VPEN);
 	/* setup for output */
-	out32(GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK | \
-	      CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY);
+	out_be32((void*)GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK | \
+	      CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY | CONFIG_SYS_VPEN);
 
 	/*
 	 * - check if rev1_2 is low, then:
@@ -103,14 +104,15 @@ int misc_init_r (void)
 	gd->bd->bi_flashoffset = 0;
 
 	/* deassert EREADY# */
-	out32(GPIO0_OR, in32(GPIO0_OR) | CONFIG_SYS_XEREADY);
+	out_be32((void*)GPIO0_OR,
+		 in_be32((void*)GPIO0_OR) | CONFIG_SYS_XEREADY);
 	return (0);
 }
 
 ushort pmc405_pci_subsys_deviceid(void)
 {
 	ulong val;
-	val = in32(GPIO0_IR);
+	val = in_be32((void*)GPIO0_IR);
 	if (!(val & CONFIG_SYS_REV1_2)) { /* low=rev1.2 */
 		/* check monarch# signal */
 		if (val & CONFIG_SYS_NONMONARCH)
@@ -137,7 +139,7 @@ int checkboard (void)
 	else
 		puts(str);
 
-	val = in32(GPIO0_IR);
+	val = in_be32((void*)GPIO0_IR);
 	if (!(val & CONFIG_SYS_REV1_2)) { /* low=rev1.2 */
 		puts(" rev1.2 (");
 		if (val & CONFIG_SYS_NONMONARCH) /* monarch# signal */
include/configs/PMC405.h +29 -29

143 lines not on this page · raw message

Signature · 1 line
1.5.6.3
Applied
#1 lore raw

PATCH 1/1 ppc4xx: Update PMC405 board support

Quoted 2 lines · Matthias Fuchs

This patch prepares the good old PMC405 board support for upcoming PMC405V2 patches.

Applied to ppc4xx/master. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================