[U-Boot] [PATCH 0/4] arm: rmobile: kzm9g: update

From: Tetsuyuki Kobayashi koba@kmckk.co.jp
Hi, Iwamatsu-san
These are minor bug fixes for kzm9g board.
Tetsuyuki Kobayashi (4): arm: rmobile: kzm9g: add NFS_TIMEOUT in config file arm: rmobile: kzm9g: remove unrelated config arm: rmobile: kzm9g: fix CPU info arm: rmobile: kzm9g: separate cpu_rev to integer and fraction
arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 20 ++++++++++++++++---- arch/arm/cpu/armv7/rmobile/cpu_info.c | 23 ++++++++++++++++------- include/configs/kzm9g.h | 3 +-- 3 files changed, 33 insertions(+), 13 deletions(-)

From: Tetsuyuki Kobayashi koba@kmckk.co.jp
Set NFS_TIMEOUT to 10,000 msec.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp --- This patch needs "net: nfs: make NFS_TIMEOUT configurable", which is applied in u-boot-master next branch, to take effect.
include/configs/kzm9g.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index 14f088f..a4d2c37 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -150,6 +150,7 @@ #define CONFIG_SMC911X #define CONFIG_SMC911X_BASE (0x10000000) #define CONFIG_SMC911X_32_BIT +#define CONFIG_NFS_TIMEOUT 10000UL
/* I2C */ #define CONFIG_CMD_I2C

Applied my rmobile branch.
Thanks. Nobuhiro
On Thu, Jul 26, 2012 at 1:24 PM, Tetsuyuki Kobayshi koba@kmckk.co.jp wrote:
From: Tetsuyuki Kobayashi koba@kmckk.co.jp
Set NFS_TIMEOUT to 10,000 msec.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp
This patch needs "net: nfs: make NFS_TIMEOUT configurable", which is applied in u-boot-master next branch, to take effect.
include/configs/kzm9g.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index 14f088f..a4d2c37 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -150,6 +150,7 @@ #define CONFIG_SMC911X #define CONFIG_SMC911X_BASE (0x10000000) #define CONFIG_SMC911X_32_BIT +#define CONFIG_NFS_TIMEOUT 10000UL
/* I2C */
#define CONFIG_CMD_I2C
1.7.9.5

From: Tetsuyuki Kobayashi koba@kmckk.co.jp
Remove CONFIG_INTEGRATOR and CONFIG_ARCH_CINTEGRATOR. These are not for kzm9g.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp --- include/configs/kzm9g.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index a4d2c37..bc6dc72 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -48,8 +48,6 @@
#define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTARGS "root=/dev/null console=ttySC4,115200" -#define CONFIG_INTEGRATOR -#define CONFIG_ARCH_CINTEGRATOR #define CONFIG_BOOTDELAY 3
#define CONFIG_VERSION_VARIABLE

Applied my rmobile branch.
Thanks. Nobuhiro
On Thu, Jul 26, 2012 at 1:24 PM, Tetsuyuki Kobayshi koba@kmckk.co.jp wrote:
From: Tetsuyuki Kobayashi koba@kmckk.co.jp
Remove CONFIG_INTEGRATOR and CONFIG_ARCH_CINTEGRATOR. These are not for kzm9g.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp
include/configs/kzm9g.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index a4d2c37..bc6dc72 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -48,8 +48,6 @@
#define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTARGS "root=/dev/null console=ttySC4,115200" -#define CONFIG_INTEGRATOR -#define CONFIG_ARCH_CINTEGRATOR #define CONFIG_BOOTDELAY 3
#define CONFIG_VERSION_VARIABLE
1.7.9.5

From: Tetsuyuki Kobayashi koba@kmckk.co.jp
CPU info register was read wrongly by mistake. And function rmobile_get_cpu_rev() was not called properly.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp --- arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 6 +++--- arch/arm/cpu/armv7/rmobile/cpu_info.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c index f5273cf..a715efa 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c @@ -30,19 +30,19 @@ u32 rmobile_get_cpu_type(void) u32 type; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
- id = readl(hpb->cccr); + id = readl(&hpb->cccr); type = (id >> 8) & 0xFF;
return type; }
-u32 get_cpu_rev(void) +u32 rmobile_get_cpu_rev(void) { u32 id; u32 rev; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
- id = readl(hpb->cccr); + id = readl(&hpb->cccr); rev = (id >> 4) & 0xF;
return rev; diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 2148958..957a4fc 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -62,7 +62,7 @@ int print_cpuinfo(void) break; default: printf("CPU: Renesas Electronics CPU rev %d\n", - get_cpu_rev()); + rmobile_get_cpu_rev()); break; } return 0;

Applied my rmobile branch.
Thanks. Nobuhiro
On Thu, Jul 26, 2012 at 1:24 PM, Tetsuyuki Kobayshi koba@kmckk.co.jp wrote:
From: Tetsuyuki Kobayashi koba@kmckk.co.jp
CPU info register was read wrongly by mistake. And function rmobile_get_cpu_rev() was not called properly.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp
arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 6 +++--- arch/arm/cpu/armv7/rmobile/cpu_info.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c index f5273cf..a715efa 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c @@ -30,19 +30,19 @@ u32 rmobile_get_cpu_type(void) u32 type; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
id = readl(hpb->cccr);
id = readl(&hpb->cccr); type = (id >> 8) & 0xFF; return type;
}
-u32 get_cpu_rev(void) +u32 rmobile_get_cpu_rev(void) { u32 id; u32 rev; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
id = readl(hpb->cccr);
id = readl(&hpb->cccr); rev = (id >> 4) & 0xF; return rev;
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 2148958..957a4fc 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -62,7 +62,7 @@ int print_cpuinfo(void) break; default: printf("CPU: Renesas Electronics CPU rev %d\n",
get_cpu_rev());
rmobile_get_cpu_rev()); break; } return 0;
-- 1.7.9.5

From: Tetsuyuki Kobayashi koba@kmckk.co.jp
According to SoC document, revision info is separated to integer part and fracton part. So I separete rmobile_get_cpu_rev() to rmobile_get_cpu_rev_integer() and rmobile_get_cpu_rev_fraction().
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp --- arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 16 ++++++++++++++-- arch/arm/cpu/armv7/rmobile/cpu_info.c | 23 ++++++++++++++++------- 2 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c index a715efa..8239155 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c @@ -36,14 +36,26 @@ u32 rmobile_get_cpu_type(void) return type; }
-u32 rmobile_get_cpu_rev(void) +u32 rmobile_get_cpu_rev_integer(void) { u32 id; u32 rev; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
id = readl(&hpb->cccr); - rev = (id >> 4) & 0xF; + rev = ((id >> 4) & 0xF) + 1; + + return rev; +} + +u32 rmobile_get_cpu_rev_fraction(void) +{ + u32 id; + u32 rev; + struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE; + + id = readl(&hpb->cccr); + rev = id & 0xF;
return rev; } diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 957a4fc..87287ce 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -46,23 +46,32 @@ static u32 __rmobile_get_cpu_type(void) u32 rmobile_get_cpu_type(void) __attribute__((weak, alias("__rmobile_get_cpu_type")));
-static u32 __rmobile_get_cpu_rev(void) +static u32 __rmobile_get_cpu_rev_integer(void) { return 0; } -u32 rmobile_get_cpu_rev(void) - __attribute__((weak, alias("__rmobile_get_cpu_rev"))); +u32 rmobile_get_cpu_rev_integer(void) + __attribute__((weak, alias("__rmobile_get_cpu_rev_integer"))); + +static u32 __rmobile_get_cpu_rev_fraction(void) +{ + return 0; +} +u32 rmobile_get_cpu_rev_fraction(void) + __attribute__((weak, alias("__rmobile_get_cpu_rev_fraction")));
int print_cpuinfo(void) { switch (rmobile_get_cpu_type()) { case 0x37: - printf("CPU: Renesas Electronics SH73A0 rev %d\n", - rmobile_get_cpu_rev()); + printf("CPU: Renesas Electronics SH73A0 rev %d.%d\n", + rmobile_get_cpu_rev_integer(), + rmobile_get_cpu_rev_fraction()); break; default: - printf("CPU: Renesas Electronics CPU rev %d\n", - rmobile_get_cpu_rev()); + printf("CPU: Renesas Electronics CPU rev %d.%d\n", + rmobile_get_cpu_rev_integer(), + rmobile_get_cpu_rev_fraction()); break; } return 0;

Applied my rmobile branch.
Thanks. Nobuhiro
On Thu, Jul 26, 2012 at 1:24 PM, Tetsuyuki Kobayshi koba@kmckk.co.jp wrote:
From: Tetsuyuki Kobayashi koba@kmckk.co.jp
According to SoC document, revision info is separated to integer part and fracton part. So I separete rmobile_get_cpu_rev() to rmobile_get_cpu_rev_integer() and rmobile_get_cpu_rev_fraction().
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp
arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 16 ++++++++++++++-- arch/arm/cpu/armv7/rmobile/cpu_info.c | 23 ++++++++++++++++------- 2 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c index a715efa..8239155 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c @@ -36,14 +36,26 @@ u32 rmobile_get_cpu_type(void) return type; }
-u32 rmobile_get_cpu_rev(void) +u32 rmobile_get_cpu_rev_integer(void) { u32 id; u32 rev; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
id = readl(&hpb->cccr);
rev = (id >> 4) & 0xF;
rev = ((id >> 4) & 0xF) + 1;
return rev;
+}
+u32 rmobile_get_cpu_rev_fraction(void) +{
u32 id;
u32 rev;
struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
id = readl(&hpb->cccr);
rev = id & 0xF; return rev;
} diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 957a4fc..87287ce 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -46,23 +46,32 @@ static u32 __rmobile_get_cpu_type(void) u32 rmobile_get_cpu_type(void) __attribute__((weak, alias("__rmobile_get_cpu_type")));
-static u32 __rmobile_get_cpu_rev(void) +static u32 __rmobile_get_cpu_rev_integer(void) { return 0; } -u32 rmobile_get_cpu_rev(void)
__attribute__((weak, alias("__rmobile_get_cpu_rev")));
+u32 rmobile_get_cpu_rev_integer(void)
__attribute__((weak, alias("__rmobile_get_cpu_rev_integer")));
+static u32 __rmobile_get_cpu_rev_fraction(void) +{
return 0;
+} +u32 rmobile_get_cpu_rev_fraction(void)
__attribute__((weak, alias("__rmobile_get_cpu_rev_fraction")));
int print_cpuinfo(void) { switch (rmobile_get_cpu_type()) { case 0x37:
printf("CPU: Renesas Electronics SH73A0 rev %d\n",
rmobile_get_cpu_rev());
printf("CPU: Renesas Electronics SH73A0 rev %d.%d\n",
rmobile_get_cpu_rev_integer(),
rmobile_get_cpu_rev_fraction()); break; default:
printf("CPU: Renesas Electronics CPU rev %d\n",
rmobile_get_cpu_rev());
printf("CPU: Renesas Electronics CPU rev %d.%d\n",
rmobile_get_cpu_rev_integer(),
rmobile_get_cpu_rev_fraction()); break; } return 0;
-- 1.7.9.5
participants (2)
-
Nobuhiro Iwamatsu
-
Tetsuyuki Kobayshi