[U-Boot] [PATCH 0/4] small fixes and updates for keymile common code

This patches are small updates found in the daily work with the new reworked u-boot branch for keymile boards. This patch serie is based on the alreaedy posted bigger serie: http://lists.denx.de/pipermail/u-boot/2011-June/093885.html
Holger Brunck (2): km/common: add printings to boardid commands km/common: use u-boot.kwb for u-boot update function on arm
Stefan Bigler (2): km/common: moved eeprom config to pbec specific part km/common: i2c deblock: enabled print of i2c deblock status
board/keymile/common/common.c | 9 ++++++++- include/configs/km/keymile-common.h | 7 ------- include/configs/km/km-powerpc.h | 7 +++++++ include/configs/km/km_arm.h | 7 +++++++ 4 files changed, 22 insertions(+), 8 deletions(-)

Be verbose if do_setboardid was called and print correct names of variables in do_checkboardidhwk.
Signed-off-by: Holger Brunck holger.brunck@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de --- board/keymile/common/common.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 841bdee..7f388e1 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -270,6 +270,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, } sprintf((char *)buf, "%s", p); setenv("boardid", (char *)buf); + printf("set boardid=%s\n", buf);
p = get_local_var("IVM_HWKey"); if (p == NULL) { @@ -278,6 +279,8 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, } sprintf((char *)buf, "%s", p); setenv("hwkey", (char *)buf); + printf("set hwkey=%s\n", buf); + printf("Execute manually saveenv for persistent storage.\n");
return 0; } @@ -421,7 +424,8 @@ int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc, printf("boardid=0x%3lX, hwkey=%ld\n", envbid, envhwkey); rc = 0; /* match */ } else { - printf("Error: env bId=0x%3lX, hwKey=%ld\n", envbid, envhwkey); + printf("Error: env boardid=0x%3lX, hwkey=%ld\n", envbid, + envhwkey); printf(" IVM bId=0x%3lX, hwKey=%ld\n", ivmbid, ivmhwkey); rc = 1; /* don't match */ }

Dear Holger Brunck,
In message 1309854242-11354-2-git-send-email-holger.brunck@keymile.com you wrote:
Be verbose if do_setboardid was called and print correct names of variables in do_checkboardidhwk.
Signed-off-by: Holger Brunck holger.brunck@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de
board/keymile/common/common.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Now we use the standard u-boot make to build the Kirkwood binary. The output file is u-boot.kwb. So use this name for the tftp update function to avoid confusion, because this is the binary we need on Kirkwood.
Signed-off-by: Holger Brunck holger.brunck@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de --- include/configs/km/keymile-common.h | 1 - include/configs/km/km-powerpc.h | 1 + include/configs/km/km_arm.h | 1 + 3 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 6a31d26..d749b2b 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -248,7 +248,6 @@ "stderr=serial\0" \ "stdin=serial\0" \ "stdout=serial\0" \ - "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ "" #endif /* CONFIG_KM_DEF_ENV */
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h index 4cec57c..7610358 100644 --- a/include/configs/km/km-powerpc.h +++ b/include/configs/km/km-powerpc.h @@ -75,6 +75,7 @@ "cramfsload ${fdt_addr_r} " \ "fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0" \ "fdt_addr_r=" xstr(CONFIG_KM_FDT_ADDR) "\0" \ + "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ "update=" \ "protect off " xstr(BOOTFLASH_START) " +${filesize} && "\ "erase " xstr(BOOTFLASH_START) " +${filesize} && " \ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index 23717f4..d41fcb7 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -74,6 +74,7 @@ #define CONFIG_KM_DEF_ENV_CPU \ "boot=bootm ${load_addr_r} - -\0" \ "cramfsloadfdt=true\0" \ + "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.kwb\0" \ CONFIG_KM_DEF_ENV_UPDATE \ ""

Dear Holger Brunck,
In message 1309854242-11354-3-git-send-email-holger.brunck@keymile.com you wrote:
Now we use the standard u-boot make to build the Kirkwood binary. The output file is u-boot.kwb. So use this name for the tftp update function to avoid confusion, because this is the binary we need on Kirkwood.
Signed-off-by: Holger Brunck holger.brunck@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de
include/configs/km/keymile-common.h | 1 - include/configs/km/km-powerpc.h | 1 + include/configs/km/km_arm.h | 1 + 3 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

From: Stefan Bigler stefan.bigler@keymile.com
Moved eeprom config to specific part, to allow bigger eeprom write pages for km_kirkwood designs. Write page only used for env eeprom in std use cases. 24C128 has page size of 64bytes -> 8 time faster.
Signed-off-by: Stefan Bigler stefan.bigler@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de --- include/configs/km/keymile-common.h | 6 ------ include/configs/km/km-powerpc.h | 6 ++++++ include/configs/km/km_arm.h | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index d749b2b..bc1edaf 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -88,12 +88,6 @@ #define CONFIG_SYS_I2C_INIT_BOARD #define CONFIG_I2C_MUX
-/* EEprom support */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS -#define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 - /* Support the IVM EEprom */ #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 #define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400 diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h index 7610358..506755b 100644 --- a/include/configs/km/km-powerpc.h +++ b/include/configs/km/km-powerpc.h @@ -29,6 +29,12 @@ #define CONFIG_CMD_DTT #define CONFIG_JFFS2_CMDLINE
+/* EEprom support 24C08, 24C16, 24C64 */ +#define CONFIG_SYS_I2C_MULTI_EEPROMS +#define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 /* 8 Byte write page */ +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 + #define CONFIG_ENV_SIZE 0x04000 /* Size of Environment */ #define CONFIG_FLASH_CFI_MTD
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index d41fcb7..2e3b182 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -195,6 +195,12 @@ int get_scl(void);
#endif
+/* EEprom support 24C128, 24C256 valid for environment eeprom */ +#define CONFIG_SYS_I2C_MULTI_EEPROMS +#define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 Byte write page */ +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 + #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2

Dear Holger Brunck,
In message 1309854242-11354-4-git-send-email-holger.brunck@keymile.com you wrote:
From: Stefan Bigler stefan.bigler@keymile.com
Moved eeprom config to specific part, to allow bigger eeprom write pages for km_kirkwood designs. Write page only used for env eeprom in std use cases. 24C128 has page size of 64bytes -> 8 time faster.
Signed-off-by: Stefan Bigler stefan.bigler@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de
include/configs/km/keymile-common.h | 6 ------ include/configs/km/km-powerpc.h | 6 ++++++ include/configs/km/km_arm.h | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

From: Stefan Bigler stefan.bigler@keymile.com
Enable printout of i2c deblocking status if chips were in block state or deblocking failed.
Signed-off-by: Stefan Bigler stefan.bigler@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de --- board/keymile/common/common.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 7f388e1..fce9d58 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -139,6 +139,7 @@ int i2c_make_abort(void) sda_state = get_sda(); if (scl_state && sda_state) { ret = 0; + printf("[INFO] i2c abort after %d clocks\n", i); break; } } @@ -146,6 +147,8 @@ int i2c_make_abort(void) if (ret == 0) for (i = 0; i < 5; i++) i2c_write_start_seq(); + else + printf("[ERROR] i2c abort failed\n");
/* respect stop setup time */ udelay(DELAY_ABORT_SEQ);

Dear Holger Brunck,
In message 1309854242-11354-5-git-send-email-holger.brunck@keymile.com you wrote:
From: Stefan Bigler stefan.bigler@keymile.com
Enable printout of i2c deblocking status if chips were in block state or deblocking failed.
Signed-off-by: Stefan Bigler stefan.bigler@keymile.com cc: Valentin Longchamp valentin.longchamp@keymile.com cc: Heiko Schocher hs@denx.de cc: Wolfgang Denk wd@denx.de
board/keymile/common/common.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (2)
-
Holger Brunck
-
Wolfgang Denk