From: Lukasz Majewski <lukma@denx.de>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Hartley Sweeten <hsweeten@visionengravers.com>,
Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Hubert Feurstein <hubert.feurstein@contec.at>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Linus Walleij <linus.walleij@linaro.org>,
Imre Kaloz <kaloz@openwrt.org>,
Krzysztof Halasa <khalasa@piap.pl>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Simtec Linux Team <linux@simtec.co.uk>,
Liviu Dudau <liviu.dudau@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Ard Biesheuvel <ardb@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH 05/12] ARM: ep93xx: multiplatform support
Date: Tue, 5 Apr 2022 11:44:07 +0200 [thread overview]
Message-ID: <20220405114407.6720647b@ktm> (raw)
In-Reply-To: <20220405091750.3076973-6-arnd@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 7747 bytes --]
Hi Arnd,
Thank you very much for converting this architecture to use the
multiplatform config.
> From: Arnd Bergmann <arnd@arndb.de>
>
> With the clock support and the interrupts out of the way, ep93xx can
> be compiled into the same kernel image as the other ARMv4/v5
> platforms. The last obstacle are the two workarounds for broken boot
> loaders that require us to re-initialize the ethernet controller
> and/or the watchdog on certain machines.
>
> Move this code into the decompressor sources directly, checking for
> each possibly affected machine individually.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/Kconfig | 16 -----
> .../compressed/misc-ep93xx.h} | 69
> +++++++++---------- arch/arm/boot/compressed/misc.c |
> 4 ++ arch/arm/configs/ep93xx_defconfig | 2 +
> arch/arm/mach-ep93xx/Kconfig | 12 ++++
> 5 files changed, 51 insertions(+), 52 deletions(-)
> rename arch/arm/{mach-ep93xx/include/mach/uncompress.h =>
> boot/compressed/misc-ep93xx.h} (51%)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 5177e54cc14c..2bd611beefe1 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -347,22 +347,6 @@ config ARCH_MULTIPLATFORM
> select SPARSE_IRQ
> select USE_OF
>
> -config ARCH_EP93XX
> - bool "EP93xx-based"
> - select ARCH_SPARSEMEM_ENABLE
> - select ARM_AMBA
> - imply ARM_PATCH_PHYS_VIRT
> - select ARM_VIC
> - select AUTO_ZRELADDR
> - select CLKSRC_MMIO
> - select CPU_ARM920T
> - select GPIOLIB
> - select COMMON_CLK
> - select IRQ_DOMAIN
> - select SPARSE_IRQ
> - help
> - This enables support for the Cirrus EP93xx series of CPUs.
> -
> config ARCH_FOOTBRIDGE
> bool "FootBridge"
> select CPU_SA110
> diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h
> b/arch/arm/boot/compressed/misc-ep93xx.h similarity index 51%
> rename from arch/arm/mach-ep93xx/include/mach/uncompress.h
> rename to arch/arm/boot/compressed/misc-ep93xx.h
> index e20bcab702b2..3dc942589cba 100644
> --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
> +++ b/arch/arm/boot/compressed/misc-ep93xx.h
> @@ -1,54 +1,25 @@
> /* SPDX-License-Identifier: GPL-2.0-or-later */
> /*
> - * arch/arm/mach-ep93xx/include/mach/uncompress.h
> - *
> * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
> */
>
> #include <asm/mach-types.h>
>
> -static unsigned char __raw_readb(unsigned int ptr)
> -{
> - return *((volatile unsigned char *)ptr);
> -}
> -
> -static unsigned int __raw_readl(unsigned int ptr)
> +static inline unsigned int __raw_readl(unsigned int ptr)
> {
> return *((volatile unsigned int *)ptr);
> }
>
> -static void __raw_writeb(unsigned char value, unsigned int ptr)
> +static inline void __raw_writeb(unsigned char value, unsigned int
> ptr) {
> *((volatile unsigned char *)ptr) = value;
> }
>
> -static void __raw_writel(unsigned int value, unsigned int ptr)
> +static inline void __raw_writel(unsigned int value, unsigned int ptr)
> {
> *((volatile unsigned int *)ptr) = value;
> }
>
> -#define PHYS_UART_DATA (CONFIG_DEBUG_UART_PHYS + 0x00)
> -#define PHYS_UART_FLAG (CONFIG_DEBUG_UART_PHYS + 0x18)
> -#define UART_FLAG_TXFF 0x20
> -
> -static inline void putc(int c)
> -{
> - int i;
> -
> - for (i = 0; i < 10000; i++) {
> - /* Transmit fifo not full? */
> - if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
> - break;
> - }
> -
> - __raw_writeb(c, PHYS_UART_DATA);
> -}
> -
> -static inline void flush(void)
> -{
> -}
> -
> -
> /*
> * Some bootloaders don't turn off DMA from the ethernet MAC before
> * jumping to linux, which means that we might end up with bits of RX
> @@ -58,7 +29,7 @@ static inline void flush(void)
> #define PHYS_ETH_SELF_CTL 0x80010020
> #define ETH_SELF_CTL_RESET 0x00000001
>
> -static void ethernet_reset(void)
> +static inline void ep93xx_ethernet_reset(void)
> {
> unsigned int v;
>
> @@ -75,15 +46,41 @@ static void ethernet_reset(void)
> #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000
> #define TS72XX_WDT_FEED_VAL 0x05
>
> -static void __maybe_unused ts72xx_watchdog_disable(void)
> +static inline void __maybe_unused ts72xx_watchdog_disable(void)
> {
> __raw_writeb(TS72XX_WDT_FEED_VAL, TS72XX_WDT_FEED_PHYS_BASE);
> __raw_writeb(0, TS72XX_WDT_CONTROL_PHYS_BASE);
> }
>
> -static void arch_decomp_setup(void)
> +static inline void ep93xx_decomp_setup(void)
> {
> if (machine_is_ts72xx())
> ts72xx_watchdog_disable();
> - ethernet_reset();
> +
> + if (machine_is_adssphere() ||
> + machine_is_edb9301() ||
> + machine_is_edb9302() ||
> + machine_is_edb9302a() ||
> + machine_is_edb9302a() ||
> + machine_is_edb9307() ||
> + machine_is_edb9307a() ||
> + machine_is_edb9307a() ||
> + machine_is_edb9312() ||
> + machine_is_edb9315() ||
> + machine_is_edb9315a() ||
> + machine_is_edb9315a() ||
> + machine_is_gesbc9312() ||
> + machine_is_micro9() ||
> + machine_is_micro9l() ||
> + machine_is_micro9m() ||
> + machine_is_micro9s() ||
> + machine_is_micro9m() ||
> + machine_is_micro9l() ||
> + machine_is_micro9s() ||
> + machine_is_sim_one() ||
> + machine_is_snapper_cl15() ||
> + machine_is_ts72xx() ||
> + machine_is_bk3() ||
> + machine_is_vision_ep9307())
> + ep93xx_ethernet_reset();
> }
> diff --git a/arch/arm/boot/compressed/misc.c
> b/arch/arm/boot/compressed/misc.c index c3c66ff2d696..cb2e069dc73f
> 100644 --- a/arch/arm/boot/compressed/misc.c
> +++ b/arch/arm/boot/compressed/misc.c
> @@ -23,6 +23,7 @@ unsigned int __machine_arch_type;
> #include <linux/types.h>
> #include <linux/linkage.h>
> #include "misc.h"
> +#include "misc-ep93xx.h"
>
> static void putstr(const char *ptr);
>
> @@ -143,6 +144,9 @@ decompress_kernel(unsigned long output_start,
> unsigned long free_mem_ptr_p, free_mem_end_ptr =
> free_mem_ptr_end_p; __machine_arch_type = arch_id;
>
> +#ifdef CONFIG_ARCH_EP93XX
> + ep93xx_decomp_setup();
> +#endif
> arch_decomp_setup();
>
> putstr("Uncompressing Linux...");
> diff --git a/arch/arm/configs/ep93xx_defconfig
> b/arch/arm/configs/ep93xx_defconfig index 88d5ecc2121e..fef802b7af8c
> 100644 --- a/arch/arm/configs/ep93xx_defconfig
> +++ b/arch/arm/configs/ep93xx_defconfig
> @@ -11,6 +11,8 @@ CONFIG_MODULE_UNLOAD=y
> CONFIG_MODULE_FORCE_UNLOAD=y
> # CONFIG_BLK_DEV_BSG is not set
> CONFIG_PARTITION_ADVANCED=y
> +CONFIG_ARCH_MULTI_V4T=y
> +# CONFIG_ARCH_MULTI_V7 is not set
> CONFIG_ARCH_EP93XX=y
> CONFIG_MACH_ADSSPHERE=y
> CONFIG_MACH_EDB9301=y
> diff --git a/arch/arm/mach-ep93xx/Kconfig
> b/arch/arm/mach-ep93xx/Kconfig index 15c68a646d51..aa502ab57404 100644
> --- a/arch/arm/mach-ep93xx/Kconfig
> +++ b/arch/arm/mach-ep93xx/Kconfig
> @@ -1,4 +1,16 @@
> # SPDX-License-Identifier: GPL-2.0-only
> +menuconfig ARCH_EP93XX
> + bool "EP93xx-based"
> + depends on ARCH_MULTI_V4T
> + select ARCH_SPARSEMEM_ENABLE
> + select ARM_AMBA
> + select ARM_VIC
> + select CLKSRC_MMIO
> + select CPU_ARM920T
> + select GPIOLIB
> + help
> + This enables support for the Cirrus EP93xx series of CPUs.
> +
> if ARCH_EP93XX
>
> menu "Cirrus EP93xx Implementation Options"
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-04-05 20:23 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 9:17 [PATCH 00/12] ARM: ARMv5 multiplatform conversions Arnd Bergmann
2022-04-05 9:17 ` [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile Arnd Bergmann
2022-04-05 14:15 ` Sudeep Holla
2022-04-05 18:33 ` Arnd Bergmann
2022-04-05 16:30 ` Linus Walleij
2022-04-05 9:17 ` [PATCH 02/12] ARM: ep93xx: renumber interrupts Arnd Bergmann
2022-04-05 9:42 ` Lukasz Majewski
2022-04-07 8:29 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ Arnd Bergmann
2022-04-05 9:42 ` Lukasz Majewski
2022-04-07 8:30 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local Arnd Bergmann
2022-04-05 9:43 ` Lukasz Majewski
2022-04-07 8:31 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 05/12] ARM: ep93xx: multiplatform support Arnd Bergmann
2022-04-05 9:44 ` Lukasz Majewski [this message]
2022-04-07 8:32 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 06/12] ARM: dove: " Arnd Bergmann
2022-04-05 9:17 ` [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104 Arnd Bergmann
2022-04-07 7:27 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq Arnd Bergmann
2022-04-07 7:29 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support Arnd Bergmann
2022-04-07 7:30 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 10/12] ARM: iop32x: enable " Arnd Bergmann
2022-04-05 9:17 ` [PATCH 11/12] ARM: rework endianess selection Arnd Bergmann
2022-04-05 9:17 ` [PATCH 12/12] ARM: ixp4xx: enable multiplatform support Arnd Bergmann
2022-04-07 7:07 ` [PATCH 00/12] ARM: ARMv5 multiplatform conversions Krzysztof Kozlowski
2022-04-07 7:31 ` Arnd Bergmann
2022-04-07 9:23 ` Alexander Sverdlin
2022-04-07 10:08 ` Arnd Bergmann
2022-04-07 10:37 ` Alexander Sverdlin
2022-04-07 20:42 ` Linus Walleij
2022-04-08 15:12 ` Arnd Bergmann
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=20220405114407.6720647b@ktm \
--to=lukma@denx.de \
--cc=alexander.sverdlin@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andrew@lunn.ch \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=geert+renesas@glider.be \
--cc=gregory.clement@bootlin.com \
--cc=hsweeten@visionengravers.com \
--cc=hubert.feurstein@contec.at \
--cc=kaloz@openwrt.org \
--cc=khalasa@piap.pl \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@simtec.co.uk \
--cc=liviu.dudau@arm.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=patches@opensource.cirrus.com \
--cc=sboyd@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=sudeep.holla@arm.com \
/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