From: Christian Marangi <ansuelsmth@gmail.com>
To: Russell King <linux@armlinux.org.uk>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Arnd Bergmann <arnd@arndb.de>, Ard Biesheuvel <ardb@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Nick Hawkins <nick.hawkins@hpe.com>,
John Crispin <john@phrozen.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Cc: Christian Marangi <ansuelsmth@gmail.com>
Subject: [PATCH] ARM: mach-qcom: fix support for ipq806x
Date: Fri, 21 Oct 2022 20:10:16 +0200 [thread overview]
Message-ID: <20221021181016.14740-1-ansuelsmth@gmail.com> (raw)
Add a specific config flag for Qcom IPQ806x as this SoC can't use
AUTO_ZRELADDR and require the PHYS_OFFSET set to 0x42000000.
This is needed as some legacy board (or some wrongly configured
bootloader) pass the wrong memory map and doesn't exclude the first
~20MB of RAM reserved for the hardware network accellerators.
With this change we can correctly support each board and prevent any
kind of misconfiguration done by the OEM.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/Kconfig | 3 ++-
arch/arm/mach-qcom/Kconfig | 13 +++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1af63e17b4ad..0818d35973ad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -282,6 +282,7 @@ config PHYS_OFFSET
default 0x30000000 if ARCH_S3C24XX
default 0xa0000000 if ARCH_IOP32X || ARCH_PXA
default 0xc0000000 if ARCH_EP93XX || ARCH_SA1100
+ default 0x42000000 if ARCH_IPQ806X
default 0
help
Please provide the physical address corresponding to the
@@ -1701,7 +1702,7 @@ config CRASH_DUMP
config AUTO_ZRELADDR
bool "Auto calculation of the decompressed kernel image address" if !ARCH_MULTIPLATFORM
- default !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100)
+ default !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100 || ARCH_IPQ806X)
help
ZRELADDR is the physical address where the decompressed kernel
image will be placed. If AUTO_ZRELADDR is selected, the address
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 12a812e61c16..b11b6e391ff0 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -46,4 +46,17 @@ config ARCH_MDM9615
bool "Enable support for MDM9615"
select CLKSRC_QCOM
+config ARCH_IPQ806X
+ bool "Enable support for IPQ806x"
+ help
+ Enable support for the Qualcomm IPQ806x.
+
+ IPQ806x require special PHYS_OFFSET and can't use AUTO_ZRELADDR.
+ The first ~20MB of RAM is reserved for the hardware network accelerators,
+ and the bootloader removes this section from the layout passed from the
+ ATAGS (when used by some bootloader doesn't even do that).
+
+ To support every system and handle legacy systems, hardcode PHYS_OFFSET and
+ disable AUTO_ZRELADDR.
+
endif
--
2.37.2
next reply other threads:[~2022-10-21 18:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 18:10 Christian Marangi [this message]
2022-10-21 21:44 ` [PATCH] ARM: mach-qcom: fix support for ipq806x Linus Walleij
2022-10-21 21:55 ` Christian Marangi
2022-10-22 14:21 ` Linus Walleij
2022-10-22 14:51 ` Jonathan McDowell
2022-10-24 19:57 ` Christian Marangi
2022-10-26 8:19 ` Linus Walleij
2024-01-17 13:17 ` Christian Marangi
2024-01-17 22:46 ` Christian Marangi
2024-01-18 9:02 ` Linus Walleij
2024-01-18 13:05 ` Christian Marangi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221021181016.14740-1-ansuelsmth@gmail.com \
--to=ansuelsmth@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=geert+renesas@glider.be \
--cc=john@phrozen.org \
--cc=konrad.dybcio@somainline.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nick.hawkins@hpe.com \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox