Skip to contentSkip to conversation

ppc4xx: update PMC440 board support

PATCH Superseded Matthias Fuchs 2 participants 3 messages Oct 23, 2014 – Oct 24, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: update PMC440 board support

- switch to GENERIC_BOARD
- fix env support from eeprom

---
 board/esd/pmc440/cmd_pmc440.c |    6 +++---
 include/configs/PMC440.h      |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)
board/esd/pmc440/cmd_pmc440.c +3 -3
index 3481e46..40b135f 100644
@@ -347,16 +347,16 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		return 1;
 	}
 
-	base = gd->bd->bi_memsize;
+	base = (u32)gd->ram_size;
 #if defined(CONFIG_LOGBUFFER)
 	base -= LOGBUFF_LEN + LOGBUFF_OVERHEAD;
 #endif
 	/*
-	 * gd->bd->bi_memsize == physical ram size - CONFIG_SYS_MEM_TOP_HIDE
+	 * gd->ram_size == physical ram size - CONFIG_SYS_MEM_TOP_HIDE
 	 */
 	param = base - (pram << 10);
 	printf("PARAM: @%08x\n", param);
-	debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->bd->bi_memsize, base);
+	debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->ram_size, base);
 
 	/* clear entire PA ram */
 	memset((void*)param, 0, (pram << 10));
include/configs/PMC440.h +3 -0
index c5e2f16..dc2c976 100644
@@ -29,6 +29,8 @@
 #define CONFIG_SYS_TEXT_BASE	0xFFF90000
 #endif
 
+#define CONFIG_SYS_GENERIC_BOARD
+
 #define CONFIG_SYS_CLK_FREQ	33333400
 
 #if 0 /* temporary disabled because OS/9 does not like dcache on startup */
@@ -133,6 +135,7 @@
 #endif
 
 #ifdef CONFIG_ENV_IS_IN_EEPROM
+#define CONFIG_I2C_ENV_EEPROM_BUS	0
 #define CONFIG_ENV_OFFSET		0	/* environment starts@the beginning of the EEPROM */
 #define CONFIG_ENV_SIZE		0x1000	/* 4096 bytes may be used for env vars */
 #endif
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ppc4xx: update PMC440 board support

Hi Matthias,

On Thu, 23 Oct 2014 17:50:23 +0200
Matthias Fuchs <[email protected]> wrote:
...

include/configs/PMC440.h line 32

Quoted 9 lines
include/configs/PMC440.h +1 -0
index c5e2f16..dc2c976 100644
@@ -29,6 +29,8 @@
 #define CONFIG_SYS_TEXT_BASE	0xFFF90000
 #endif
 
+#define CONFIG_SYS_GENERIC_BOARD

you also need

#define CONFIG_DISPLAY_BOARDINFO

Otherwise the checkboard() won't get called and the board revision detection will be skipped. This will affect reset_phy() later. Please check.

Thanks,

Anatolij

#2 lore raw

PATCH 1/1 ppc4xx: update PMC440 board support

Hi Anatolij,

Quoted 19 lines · Anatolij Gustschin

Hi Matthias,

On Thu, 23 Oct 2014 17:50:23 +0200
Matthias Fuchs <[email protected]> wrote:
...

include/configs/PMC440.h line 32

Quoted 9 lines
include/configs/PMC440.h +1 -0
index c5e2f16..dc2c976 100644
@@ -29,6 +29,8 @@
 #define CONFIG_SYS_TEXT_BASE	0xFFF90000
 #endif
 
+#define CONFIG_SYS_GENERIC_BOARD

you also need

#define CONFIG_DISPLAY_BOARDINFO

Quoted 9 lines

Otherwise the checkboard() won't get called and the board revision detection will be skipped. This will affect reset_phy() later. Please check.

Thanks,

Anatolij

good catch. I did'n noticed the missing output line. v2 patch is on the road.

Matthias