From f7e4d57bbaf7445b927cc82f74f603e8615d33ac Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 30 Mar 2010 19:18:37 +0900 Subject: [PATCH] s5pc1xx: add checking routines for EVT1-Fused Signed-off-by: Minkyu Kang --- board/samsung/universal/universal.c | 7 +++++-- common/cmd_usbd.c | 10 +++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index 33bdd95..55472b8 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -686,7 +686,10 @@ static void show_hw_revision(void) s5pc1xx_set_cpu_rev(0); } } else if (mach_is_kessler()) { - s5pc1xx_set_cpu_rev(1); + if (board_is_neptune() && hwrevision(2)) + s5pc1xx_set_cpu_rev(2); /* EVT1-Fused */ + else + s5pc1xx_set_cpu_rev(1); } else if (mach_is_geminus()) { if ((board_rev & 0xf) < 1) s5pc1xx_set_cpu_rev(0); @@ -697,7 +700,7 @@ static void show_hw_revision(void) } if (cpu_is_s5pc110()) - writel(0xc1100000 | (0xffff & s5pc1xx_get_cpu_rev()), + writel(0xc1100000 | (0xffff & (s5pc1xx_get_cpu_rev() ? 1 : 0)), S5PC110_INFORM3); empty_device_info_buffer(); diff --git a/common/cmd_usbd.c b/common/cmd_usbd.c index fe8b647..3dfe312 100644 --- a/common/cmd_usbd.c +++ b/common/cmd_usbd.c @@ -821,9 +821,17 @@ static int process_data(struct usbd_ops *usbd) if (*img_header == 0xea000012) img_rev = 0; + else if (*(img_header + 0x400) == 0xea000012) + img_rev = 2; if (img_rev != s5pc1xx_get_cpu_rev()) { - printf("CPU revision mismatch!\n"); + printf("CPU revision mismatch!\n" + "bootloader is %s%s\n" + "download image is %s%s\n", + s5pc1xx_get_cpu_rev() ? "EVT1" : "EVT0", + s5pc1xx_get_cpu_rev() == 2 ? "-Fused" : "", + img_rev ? "EVT1" : "EVT0", + img_rev == 2 ? "-Fused" : ""); *((ulong *) usbd->tx_data) = STATUS_ERROR; usbd->send_data(usbd->tx_data, usbd->tx_len); return 0; -- 2.7.4