Commit 2ca35530 authored by David Mondou's avatar David Mondou
Browse files

Fix 0010 patch

parent 36dc2441
From 6f8e7d4b64a5cd4f0f4d5f902b4d70dd608a52ee Mon Sep 17 00:00:00 2001
From: Tony K Nadackal <tony.kn@gadgeon.com>
Date: Thu, 10 May 2018 16:54:40 +0530
Subject: [PATCH] BugFix: Added board id of 300B
---
board/rigado/vesta/plugin.S | 5 +++--
board/rigado/vesta/vesta.c | 5 +++--
common/cmd_getboard.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/board/rigado/vesta/plugin.S b/board/rigado/vesta/plugin.S
index ea63de5..f9cdba9 100644
--- a/board/rigado/vesta/plugin.S
+++ b/board/rigado/vesta/plugin.S
@@ -22,7 +22,8 @@
#define OCOTP_GP1 0x021bc660
#define OCOTP_GP2 0x021bc670
#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
+#define VESTA_300B 0x01F80000
+#define VESTA_300B1 0x007c0000
#define MX6ULL_CPU_ID 0x65
/* DDR script */
@@ -392,7 +393,7 @@
ldr r2, =#ULL_ID_MASK
and r1, r1, r2
- ldr r2, =VESTA_300B
+ ldr r2, =VESTA_300B1
cmp r1, r2
beq v300B
b end
diff --git a/board/rigado/vesta/vesta.c b/board/rigado/vesta/vesta.c
index e662df1..0377831 100644
--- a/board/rigado/vesta/vesta.c
+++ b/board/rigado/vesta/vesta.c
@@ -45,7 +45,8 @@
#define OCOTP_GP1 0x021bc660
#define OCOTP_GP2 0x021bc670
#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
+#define VESTA_300B 0x01F80000
+#define VESTA_300B1 0x007c0000
#ifdef CONFIG_FSL_FASTBOOT
#include <fsl_fastboot.h>
@@ -635,7 +636,7 @@ int checkboard(void)
if (is_cpu_type(MXC_CPU_MX6ULL)) {
board_id = (readl(OCOTP_GP1) != 0 )?readl(OCOTP_GP1):readl(OCOTP_GP2);
- if ((board_id & ULL_ID_MASK) == VESTA_300B){
+ if (((board_id & ULL_ID_MASK) == VESTA_300B) || ((board_id & ULL_ID_MASK) == VESTA_300B1)) {
puts("Board: Vesta 300B\n");
}
else {
diff --git a/common/cmd_getboard.c b/common/cmd_getboard.c
index fd9c587..6b1300e 100644
--- a/common/cmd_getboard.c
+++ b/common/cmd_getboard.c
@@ -29,7 +29,8 @@
#define OCOTP_GP1 0x021bc660
#define OCOTP_GP2 0x021bc670
#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
+#define VESTA_300B 0x01F80000
+#define VESTA_300B1 0x007c0000
DECLARE_GLOBAL_DATA_PTR;
@@ -39,7 +40,7 @@ static int do_getboard(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
if (is_cpu_type(MXC_CPU_MX6ULL)) {
board_id = (readl(OCOTP_GP1) != 0)?readl(OCOTP_GP1):readl(OCOTP_GP2);
- if ((board_id & ULL_ID_MASK) == VESTA_300B){
+ if (((board_id & ULL_ID_MASK) == VESTA_300B) || ((board_id & ULL_ID_MASK) == VESTA_300B1)) {
setenv("board_type", "vesta-300B");
setenv("fdt_file", "zImage-vesta-300B.dtb");
}
--
2.7.4
From bd039dc775091256be37b9434d8fe31e7979ea74 Mon Sep 17 00:00:00 2001
From: Tony K Nadackal <tony.kn@gadgeon.com>
Date: Thu, 10 May 2018 16:54:40 +0530
Subject: [PATCH] BugFix: Changes board detection logic for 300B boards
---
board/rigado/vesta/plugin.S | 25 -------------------------
board/rigado/vesta/vesta.c | 14 +-------------
common/cmd_getboard.c | 16 ++--------------
3 files changed, 3 insertions(+), 52 deletions(-)
diff --git a/board/rigado/vesta/plugin.S b/board/rigado/vesta/plugin.S
index ea63de5..ced9f15 100644
--- a/board/rigado/vesta/plugin.S
+++ b/board/rigado/vesta/plugin.S
@@ -19,10 +19,6 @@
#define VESTA_64M_NOR 0x1
/*ULL board id registers */
-#define OCOTP_GP1 0x021bc660
-#define OCOTP_GP2 0x021bc670
-#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
#define MX6ULL_CPU_ID 0x65
/* DDR script */
@@ -374,29 +370,8 @@
and r1, r1, #0xFF
ldr r2, =#MX6ULL_CPU_ID
cmp r1, r2
- bne ulcmp
-
- ldr r0, =OCOTP_BASE_ADDR
-
-/*OCOTP_GP1 offset 0x660 */
- ldr r1, [r0, #0x660]
- ldr r2, =#ULL_ID_MASK
- and r1, r1, r2
-
- ldr r2, =VESTA_300B
- cmp r1, r2
beq v500
-/*OCOTP_GP2 offset 0x670 */
- ldr r1, [r0, #0x670]
- ldr r2, =#ULL_ID_MASK
- and r1, r1, r2
-
- ldr r2, =VESTA_300B
- cmp r1, r2
- beq v300B
- b end
-
ulcmp:
ldr r0, =OCOTP_BASE_ADDR
/*OCOTP_GP34 offset 0x940 */
diff --git a/board/rigado/vesta/vesta.c b/board/rigado/vesta/vesta.c
index e662df1..2fea84b 100644
--- a/board/rigado/vesta/vesta.c
+++ b/board/rigado/vesta/vesta.c
@@ -41,12 +41,6 @@
#define VESTA_RAD 0x0
#define VESTA_64M_NOR 0x1
-/*ULL board id registers */
-#define OCOTP_GP1 0x021bc660
-#define OCOTP_GP2 0x021bc670
-#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
-
#ifdef CONFIG_FSL_FASTBOOT
#include <fsl_fastboot.h>
#ifdef CONFIG_ANDROID_RECOVERY
@@ -634,13 +628,7 @@ int checkboard(void)
unsigned int board_id;
if (is_cpu_type(MXC_CPU_MX6ULL)) {
- board_id = (readl(OCOTP_GP1) != 0 )?readl(OCOTP_GP1):readl(OCOTP_GP2);
- if ((board_id & ULL_ID_MASK) == VESTA_300B){
- puts("Board: Vesta 300B\n");
- }
- else {
- printf ("Board id not recognized\n");
- }
+ puts("Board: Vesta 500\n");
}
else if (is_cpu_type(MXC_CPU_MX6UL)) {
board_id = readl(OCOTP_GP34);
diff --git a/common/cmd_getboard.c b/common/cmd_getboard.c
index fd9c587..56ba1cb 100644
--- a/common/cmd_getboard.c
+++ b/common/cmd_getboard.c
@@ -25,12 +25,6 @@
#define VESTA_RAD 0x0
#define VESTA_64M_NOR 0x1
-/*ULL board id registers */
-#define OCOTP_GP1 0x021bc660
-#define OCOTP_GP2 0x021bc670
-#define ULL_ID_MASK 0x0FFC0000
-#define VESTA_300B 0x007c0000
-
DECLARE_GLOBAL_DATA_PTR;
static int do_getboard(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -38,14 +32,8 @@ static int do_getboard(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
unsigned int board_id;
if (is_cpu_type(MXC_CPU_MX6ULL)) {
- board_id = (readl(OCOTP_GP1) != 0)?readl(OCOTP_GP1):readl(OCOTP_GP2);
- if ((board_id & ULL_ID_MASK) == VESTA_300B){
- setenv("board_type", "vesta-300B");
- setenv("fdt_file", "zImage-vesta-300B.dtb");
- }
- else {
- printf ("Board id not recognized\n");
- }
+ setenv("board_type", "vesta-500");
+ setenv("fdt_file", "zImage-vesta-500.dtb");
}
else if (is_cpu_type(MXC_CPU_MX6UL)) {
board_id = readl(OCOTP_GP34);
--
2.7.4
......@@ -32,7 +32,7 @@ SRC_URI += "file://0006-Added-defconfig-for-general-machine.patch"
SRC_URI += "file://0007-GCC-6.4-compatibility-fix.patch"
SRC_URI += "file://0008-Added-support-for-SPI-flash-chips-MACRONIX-SPANSION.patch"
SRC_URI += "file://0009-Added-defconfig-for-boards-with-qspi-flash.patch"
SRC_URI += "file://0010-BugFix-Changes-board-detection-logic-for-300B-boards.patch"
SRC_URI += "file://0010-BugFix-Added-board-id-of-300B.patch"
SRC_URI += "file://0011-Enable_retry_Disable_bootdelay.patch"
SRC_URI += "file://0012-Fix_multiple_definition_warning.patch"
SRC_URI += "file://0013-Rename-300B-to-500.patch"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment