summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-11-14 16:54:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-11-14 16:54:37 +0100
commit66544641b2dd00c37e16d8e1ac39a34ec4e57cb8 (patch)
treee6da99bd0d182f7f49a5c414425a4d40265274d4 /arch/arm
parent5f41ca465e2afae789ac76faa8dcfbac849b4ff9 (diff)
parenta4b49c69c3ad1cf0e92943921a699fbe586b5706 (diff)
downloadbarebox-66544641b2dd00c37e16d8e1ac39a34ec4e57cb8.tar.gz
barebox-66544641b2dd00c37e16d8e1ac39a34ec4e57cb8.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/configs/am335x_mlo_defconfig1
-rw-r--r--arch/arm/configs/am35xx_pfc200_xload_defconfig1
-rw-r--r--arch/arm/configs/archosg9_defconfig1
-rw-r--r--arch/arm/configs/archosg9_xload_defconfig1
-rw-r--r--arch/arm/configs/omap3430_sdp3430_per_uart_defconfig1
-rw-r--r--arch/arm/configs/omap3530_beagle_defconfig1
-rw-r--r--arch/arm/configs/omap3530_beagle_per_uart_defconfig1
-rw-r--r--arch/arm/configs/omap3530_beagle_xload_defconfig1
-rw-r--r--arch/arm/configs/omap3_evm_defconfig1
-rw-r--r--arch/arm/configs/omap_defconfig1
-rw-r--r--arch/arm/configs/panda_defconfig1
-rw-r--r--arch/arm/configs/panda_xload_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycard-omap3-xload_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycard-omap3_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycard-omap4-xload_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycard-omap4_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycore-omap4460_defconfig1
-rw-r--r--arch/arm/include/asm/unwind.h7
-rw-r--r--arch/arm/lib32/unwind.c116
-rw-r--r--arch/arm/mach-imx/include/mach/imx8mq.h7
-rw-r--r--arch/arm/mach-imx/romapi.c2
23 files changed, 91 insertions, 60 deletions
diff --git a/arch/arm/configs/am335x_mlo_defconfig b/arch/arm/configs/am335x_mlo_defconfig
index 83bb20e4b5..57602ba309 100644
--- a/arch/arm/configs/am335x_mlo_defconfig
+++ b/arch/arm/configs/am335x_mlo_defconfig
@@ -21,7 +21,6 @@ CONFIG_SHELL_NONE=y
CONFIG_CONSOLE_ACTIVATE_NONE=y
CONFIG_OFDEVICE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_SPI_OMAP3=y
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/am35xx_pfc200_xload_defconfig b/arch/arm/configs/am35xx_pfc200_xload_defconfig
index da55382f05..710e39ff61 100644
--- a/arch/arm/configs/am35xx_pfc200_xload_defconfig
+++ b/arch/arm/configs/am35xx_pfc200_xload_defconfig
@@ -17,7 +17,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index aafd849185..dd509fca72 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -67,7 +67,6 @@ CONFIG_CMD_TIME=y
CONFIG_NET=y
CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT=y
CONFIG_NET_USB=y
CONFIG_NET_USB_SMSC95XX=y
diff --git a/arch/arm/configs/archosg9_xload_defconfig b/arch/arm/configs/archosg9_xload_defconfig
index 27f471cf0b..b6a0475d40 100644
--- a/arch/arm/configs/archosg9_xload_defconfig
+++ b/arch/arm/configs/archosg9_xload_defconfig
@@ -14,7 +14,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT=y
# CONFIG_SPI is not set
CONFIG_MCI=y
diff --git a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
index d43355cdf1..646a392b6b 100644
--- a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
+++ b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
@@ -23,5 +23,4 @@ CONFIG_CMD_LOADB=y
# CONFIG_CMD_CLEAR is not set
# CONFIG_CMD_ECHO is not set
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index 5d09abf615..e959bdfde3 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -72,7 +72,6 @@ CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_NET_USB=y
CONFIG_NET_USB_ASIX=y
CONFIG_NET_USB_SMSC95XX=y
diff --git a/arch/arm/configs/omap3530_beagle_per_uart_defconfig b/arch/arm/configs/omap3530_beagle_per_uart_defconfig
index e4112b4910..2439bd955e 100644
--- a/arch/arm/configs/omap3530_beagle_per_uart_defconfig
+++ b/arch/arm/configs/omap3530_beagle_per_uart_defconfig
@@ -22,5 +22,4 @@ CONFIG_CMD_LOADB=y
# CONFIG_CMD_CLEAR is not set
# CONFIG_CMD_ECHO is not set
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
diff --git a/arch/arm/configs/omap3530_beagle_xload_defconfig b/arch/arm/configs/omap3530_beagle_xload_defconfig
index e9484ed852..0a47479f18 100644
--- a/arch/arm/configs/omap3530_beagle_xload_defconfig
+++ b/arch/arm/configs/omap3530_beagle_xload_defconfig
@@ -17,7 +17,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 973acbff68..8c5df029a7 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -21,5 +21,4 @@ CONFIG_CMD_RESET=y
# CONFIG_CMD_RM is not set
# CONFIG_CMD_RMDIR is not set
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
diff --git a/arch/arm/configs/omap_defconfig b/arch/arm/configs/omap_defconfig
index ae4d1a67da..433d9bdd7d 100644
--- a/arch/arm/configs/omap_defconfig
+++ b/arch/arm/configs/omap_defconfig
@@ -100,7 +100,6 @@ CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
CONFIG_OF_BAREBOX_DRIVERS=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_NET_CPSW=y
CONFIG_DRIVER_NET_DAVINCI_EMAC=y
CONFIG_MICREL_PHY=y
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig
index 9c1efe168a..b199e7990b 100644
--- a/arch/arm/configs/panda_defconfig
+++ b/arch/arm/configs/panda_defconfig
@@ -62,7 +62,6 @@ CONFIG_CMD_TIME=y
CONFIG_NET=y
CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_NET_USB=y
CONFIG_NET_USB_SMSC95XX=y
# CONFIG_SPI is not set
diff --git a/arch/arm/configs/panda_xload_defconfig b/arch/arm/configs/panda_xload_defconfig
index e3d87c42dd..bc33882c85 100644
--- a/arch/arm/configs/panda_xload_defconfig
+++ b/arch/arm/configs/panda_xload_defconfig
@@ -12,7 +12,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
diff --git a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
index 6eab808f7c..26a539f7f7 100644
--- a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
@@ -17,7 +17,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index 6cc1c1e80b..a9abf12a13 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -54,7 +54,6 @@ CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
CONFIG_NET_RESOLV=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_NET_SMC911X=y
# CONFIG_SPI is not set
CONFIG_MTD=y
diff --git a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
index af3ada6343..a1859140db 100644
--- a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
@@ -13,7 +13,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index 2f3970725d..a0bb846a6d 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -36,7 +36,6 @@ CONFIG_CMD_GPIO=y
CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_NET_KS8851_MLL=y
# CONFIG_SPI is not set
CONFIG_MTD=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
index 61f85c837f..19365a6fcd 100644
--- a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
@@ -15,7 +15,6 @@ CONFIG_SHELL_NONE=y
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
index 77f124b33f..14cab44b5d 100644
--- a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
@@ -16,7 +16,6 @@ CONFIG_SHELL_NONE=y
CONFIG_CONSOLE_SIMPLE=y
CONFIG_PARTITION=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
# CONFIG_SPI is not set
CONFIG_MTD=y
# CONFIG_MTD_WRITE is not set
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index e65a76570b..7d5369cb23 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -49,7 +49,6 @@ CONFIG_CMD_TIME=y
CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_NET_SMC911X=y
CONFIG_SMSC_PHY=y
# CONFIG_SPI is not set
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h
index 319527ec9b..37aba2aa4c 100644
--- a/arch/arm/include/asm/unwind.h
+++ b/arch/arm/include/asm/unwind.h
@@ -16,14 +16,15 @@ enum unwind_reason_code {
};
struct unwind_idx {
- unsigned long addr;
+ unsigned long addr_offset;
unsigned long insn;
};
struct unwind_table {
struct list_head list;
- struct unwind_idx *start;
- struct unwind_idx *stop;
+ const struct unwind_idx *start;
+ const struct unwind_idx *origin;
+ const struct unwind_idx *stop;
unsigned long begin_addr;
unsigned long end_addr;
};
diff --git a/arch/arm/lib32/unwind.c b/arch/arm/lib32/unwind.c
index 79bf7420d7..6f73cb1b73 100644
--- a/arch/arm/lib32/unwind.c
+++ b/arch/arm/lib32/unwind.c
@@ -28,7 +28,7 @@ EXPORT_SYMBOL(__aeabi_unwind_cpp_pr2);
struct unwind_ctrl_block {
unsigned long vrs[16]; /* virtual register set */
- unsigned long *insn; /* pointer to the current instructions word */
+ const unsigned long *insn; /* pointer to the current instructions word */
int entries; /* number of entries left to interpret */
int byte; /* current byte number in the instructions word */
};
@@ -42,8 +42,9 @@ enum regs {
#define THREAD_SIZE 8192
-extern struct unwind_idx __start_unwind_idx[];
-extern struct unwind_idx __stop_unwind_idx[];
+extern const struct unwind_idx __start_unwind_idx[];
+static const struct unwind_idx *__origin_unwind_idx;
+extern const struct unwind_idx __stop_unwind_idx[];
/* Convert a prel31 symbol to an absolute address */
#define prel31_to_addr(ptr) \
@@ -71,44 +72,99 @@ static void dump_backtrace_entry(unsigned long where, unsigned long from,
}
/*
- * Binary search in the unwind index. The entries entries are
+ * Binary search in the unwind index. The entries are
* guaranteed to be sorted in ascending order by the linker.
+ *
+ * start = first entry
+ * origin = first entry with positive offset (or stop if there is no such entry)
+ * stop - 1 = last entry
*/
-static struct unwind_idx *search_index(unsigned long addr,
- struct unwind_idx *first,
- struct unwind_idx *last)
+static const struct unwind_idx *search_index(unsigned long addr,
+ const struct unwind_idx *start,
+ const struct unwind_idx *origin,
+ const struct unwind_idx *stop)
{
- pr_debug("%s(%08lx, %p, %p)\n", __func__, addr, first, last);
+ unsigned long addr_prel31;
+
+ pr_debug("%s(%08lx, %p, %p, %p)\n",
+ __func__, addr, start, origin, stop);
+
+ /*
+ * only search in the section with the matching sign. This way the
+ * prel31 numbers can be compared as unsigned longs.
+ */
+ if (addr < (unsigned long)start)
+ /* negative offsets: [start; origin) */
+ stop = origin;
+ else
+ /* positive offsets: [origin; stop) */
+ start = origin;
+
+ /* prel31 for address relavive to start */
+ addr_prel31 = (addr - (unsigned long)start) & 0x7fffffff;
+
+ while (start < stop - 1) {
+ const struct unwind_idx *mid = start + ((stop - start) >> 1);
+
+ /*
+ * As addr_prel31 is relative to start an offset is needed to
+ * make it relative to mid.
+ */
+ if (addr_prel31 - ((unsigned long)mid - (unsigned long)start) <
+ mid->addr_offset)
+ stop = mid;
+ else {
+ /* keep addr_prel31 relative to start */
+ addr_prel31 -= ((unsigned long)mid -
+ (unsigned long)start);
+ start = mid;
+ }
+ }
- if (addr < first->addr) {
+ if (likely(start->addr_offset <= addr_prel31))
+ return start;
+ else {
pr_warning("unwind: Unknown symbol address %08lx\n", addr);
return NULL;
- } else if (addr >= last->addr)
- return last;
+ }
+}
- while (first < last - 1) {
- struct unwind_idx *mid = first + ((last - first + 1) >> 1);
+static const struct unwind_idx *unwind_find_origin(
+ const struct unwind_idx *start, const struct unwind_idx *stop)
+{
+ pr_debug("%s(%p, %p)\n", __func__, start, stop);
+ while (start < stop - 1) {
+ const struct unwind_idx *mid = start + ((stop - start) >> 1);
- if (addr < mid->addr)
- last = mid;
+ if (mid->addr_offset >= 0x40000000)
+ /* negative offset */
+ start = mid;
else
- first = mid;
+ /* positive offset */
+ stop = mid;
}
- return first;
-}
+ pr_debug("%s -> %p\n", __func__, stop);
+ return stop;
+ }
-static struct unwind_idx *unwind_find_idx(unsigned long addr)
+static const struct unwind_idx *unwind_find_idx(unsigned long addr)
{
- struct unwind_idx *idx = NULL;
+ const struct unwind_idx *idx = NULL;
pr_debug("%s(%08lx)\n", __func__, addr);
- if (is_kernel_text(addr))
+ if (is_kernel_text(addr)) {
+ if (unlikely(!__origin_unwind_idx))
+ __origin_unwind_idx =
+ unwind_find_origin(__start_unwind_idx,
+ __stop_unwind_idx);
+
/* main unwind table */
idx = search_index(addr, __start_unwind_idx,
- __stop_unwind_idx - 1);
- else {
+ __origin_unwind_idx,
+ __stop_unwind_idx);
+ } else {
/* module unwinding not supported */
}
@@ -232,7 +288,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
int unwind_frame(struct stackframe *frame)
{
unsigned long high, low;
- struct unwind_idx *idx;
+ const struct unwind_idx *idx;
struct unwind_ctrl_block ctrl;
/* only go to a higher address on the stack */
@@ -342,15 +398,3 @@ void dump_stack(void)
{
unwind_backtrace(NULL);
}
-
-static int unwind_init(void)
-{
- struct unwind_idx *idx;
-
- /* Convert the symbol addresses to absolute values */
- for (idx = __start_unwind_idx; idx < __stop_unwind_idx; idx++)
- idx->addr = prel31_to_addr(&idx->addr);
-
- return 0;
-}
-core_initcall(unwind_init);
diff --git a/arch/arm/mach-imx/include/mach/imx8mq.h b/arch/arm/mach-imx/include/mach/imx8mq.h
index d02c5f23cf..e58a3935f7 100644
--- a/arch/arm/mach-imx/include/mach/imx8mq.h
+++ b/arch/arm/mach-imx/include/mach/imx8mq.h
@@ -58,10 +58,13 @@ static inline int imx8mq_cpu_revision(void)
{
void __iomem *anatop = IOMEM(MX8MQ_ANATOP_BASE_ADDR);
void __iomem *ocotp = IOMEM(MX8MQ_OCOTP_BASE_ADDR);
+ void __iomem *rom = IOMEM(0x0);
uint32_t revision = FIELD_GET(DIGPROG_MINOR,
readl(anatop + MX8MQ_ANATOP_DIGPROG));
uint32_t rom_version;
+ OPTIMIZER_HIDE_VAR(rom);
+
if (revision != IMX_CHIP_REV_1_0)
return revision;
/*
@@ -74,9 +77,9 @@ static inline int imx8mq_cpu_revision(void)
* For B0 chip, the DIGPROG is not updated, still TO1.0.
* we have to check ROM version further
*/
- rom_version = readb(IOMEM(IMX8MQ_ROM_VERSION_A0));
+ rom_version = readb(IOMEM(rom + IMX8MQ_ROM_VERSION_A0));
if (rom_version != IMX_CHIP_REV_1_0) {
- rom_version = readb(IOMEM(IMX8MQ_ROM_VERSION_B0));
+ rom_version = readb(IOMEM(rom + IMX8MQ_ROM_VERSION_B0));
if (rom_version >= IMX_CHIP_REV_2_0)
revision = IMX_CHIP_REV_2_0;
}
diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx/romapi.c
index 5d00d71154..56bf7e135f 100644
--- a/arch/arm/mach-imx/romapi.c
+++ b/arch/arm/mach-imx/romapi.c
@@ -35,6 +35,8 @@ int imx8mp_bootrom_load_image(void)
{
struct rom_api *rom_api = (void *)0x980;
+ OPTIMIZER_HIDE_VAR(rom_api);
+
return imx8m_bootrom_load_image(rom_api);
}