linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: SoC fixes
@ 2023-01-09 16:16 Arnd Bergmann
  2023-01-09 16:16 ` [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2023-01-09 16:16 UTC (permalink / raw)
  To: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-omap,
	Robert Jarzmik
  Cc: linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

These are three fixes for mistakes I discovered during the preparation
of the boardfile removal. Robert noticed the accidental removal
of PXA310 and PXA320 support because of a misplaced Kconfig statement,
and the two OMAP patches were build failures that got introduced
earlier but that I found while testing the removal.

If these look fine, I'll queue them for 6.2 and for stable backports,
basing the boardfile removal patches on top.

Arnd Bergmann (3):
  ARM: pxa: enable PXA310/PXA320 for DT-only build
  ARM: omap1: fix !ARCH_OMAP1_ANY link failures
  ARM: omap1: fix building gpio15xx

 arch/arm/mach-omap1/Kconfig     |  5 +----
 arch/arm/mach-omap1/Makefile    |  4 ----
 arch/arm/mach-omap1/gpio15xx.c  |  1 +
 arch/arm/mach-omap1/io.c        | 32 +++++++++++++++-----------------
 arch/arm/mach-omap1/mcbsp.c     | 21 ---------------------
 arch/arm/mach-omap1/pm.h        |  7 -------
 arch/arm/mach-pxa/Kconfig       |  2 ++
 include/linux/soc/ti/omap1-io.h |  4 ++--
 8 files changed, 21 insertions(+), 55 deletions(-)

-- 
2.39.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build
  2023-01-09 16:16 [PATCH 0/3] ARM: SoC fixes Arnd Bergmann
@ 2023-01-09 16:16 ` Arnd Bergmann
  2023-01-23 15:30   ` Robert Jarzmik
  2023-01-09 16:16 ` [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures Arnd Bergmann
  2023-01-09 16:16 ` [PATCH 3/3] ARM: omap1: fix building gpio15xx Arnd Bergmann
  2 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2023-01-09 16:16 UTC (permalink / raw)
  To: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-omap,
	Robert Jarzmik
  Cc: linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

After commit b5aaaa666a85 ("ARM: pxa: add Kconfig dependencies for
ATAGS based boards"), the default PXA build no longer includes support
for the board files that are considered unused.

As a side-effect of this, the PXA310 and PXA320 support is not built
into the kernel any more, even though it should work in principle as
long as the symbols are enabled. As Robert points out, there are dts
files for zylonite and cm-x300, though those have not made it into the
mainline kernel.

Link: https://lore.kernel.org/linux-arm-kernel/m2sfglh02h.fsf@free.fr/
Reported-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-pxa/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index b90d98bae68d..03e25af6f48c 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -45,6 +45,8 @@ config MACH_PXA27X_DT
 config MACH_PXA3XX_DT
 	bool "Support PXA3xx platforms from device tree"
 	select CPU_PXA300
+	select CPU_PXA310
+	select CPU_PXA320
 	select PINCTRL
 	select POWER_SUPPLY
 	select PXA3xx
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures
  2023-01-09 16:16 [PATCH 0/3] ARM: SoC fixes Arnd Bergmann
  2023-01-09 16:16 ` [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build Arnd Bergmann
@ 2023-01-09 16:16 ` Arnd Bergmann
  2023-01-10 21:14   ` Aaro Koskinen
  2023-01-09 16:16 ` [PATCH 3/3] ARM: omap1: fix building gpio15xx Arnd Bergmann
  2 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2023-01-09 16:16 UTC (permalink / raw)
  To: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-omap,
	Robert Jarzmik
  Cc: linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann, stable

From: Arnd Bergmann <arnd@arndb.de>

While compile-testing randconfig builds for the upcoming boardfile
removal, I noticed that an earlier patch of mine was completely
broken, and the introduction of CONFIG_ARCH_OMAP1_ANY only replaced
one set of build failures with another one, now resulting in
link failures like

ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe':
drivers/video/fbdev/omap/omapfb_main.c:1703: undefined reference to `omap_set_dma_priority'
ld: drivers/dma/ti/omap-dma.o: in function `omap_dma_free_chan_resources':
drivers/dma/ti/omap-dma.c:777: undefined reference to `omap_free_dma'
drivers/dma/ti/omap-dma.c:1685: undefined reference to `omap_get_plat_info'
ld: drivers/usb/gadget/udc/omap_udc.o: in function `next_in_dma':
drivers/usb/gadget/udc/omap_udc.c:820: undefined reference to `omap_get_dma_active_status'

I tried reworking it, but the resulting patch ended up much bigger than
simply avoiding the original problem of unused-function warnings like

arch/arm/mach-omap1/mcbsp.c:76:30: error: unused variable 'omap1_mcbsp_ops' [-Werror,-Wunused-variable]

As a result, revert the previous fix, and rearrange the code that
produces warnings to hide them. For mcbsp, the #ifdef check can
simply be removed as the cpu_is_omapxxx() checks already achieve
the same result, while in the io.c the easiest solution appears to
be to merge the common map bits into each soc specific portion.
This gets cleaned in a nicer way after omap7xx support gets dropped,
as the remaining SoCs all have the exact same I/O map.

Fixes: 615dce5bf736 ("ARM: omap1: fix build with no SoC selected")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/Kconfig     |  5 +----
 arch/arm/mach-omap1/Makefile    |  4 ----
 arch/arm/mach-omap1/io.c        | 32 +++++++++++++++-----------------
 arch/arm/mach-omap1/mcbsp.c     | 21 ---------------------
 arch/arm/mach-omap1/pm.h        |  7 -------
 include/linux/soc/ti/omap1-io.h |  4 ++--
 6 files changed, 18 insertions(+), 55 deletions(-)

diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 538a960257cc..7ec7ada287e0 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -4,6 +4,7 @@ menuconfig ARCH_OMAP1
 	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
 	depends on CPU_LITTLE_ENDIAN
 	depends on ATAGS
+	select ARCH_OMAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select CLKSRC_MMIO
@@ -45,10 +46,6 @@ config ARCH_OMAP16XX
 	select CPU_ARM926T
 	select OMAP_DM_TIMER
 
-config ARCH_OMAP1_ANY
-	select ARCH_OMAP
-	def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX
-
 config ARCH_OMAP
 	bool
 
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 506074b86333..0615cb0ba580 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -3,8 +3,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_ARCH_OMAP1_ANY
-
 # Common support
 obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \
 	 serial.o devices.o dma.o omap-dma.o fb.o
@@ -59,5 +57,3 @@ obj-$(CONFIG_ARCH_OMAP730)		+= gpio7xx.o
 obj-$(CONFIG_ARCH_OMAP850)		+= gpio7xx.o
 obj-$(CONFIG_ARCH_OMAP15XX)		+= gpio15xx.o
 obj-$(CONFIG_ARCH_OMAP16XX)		+= gpio16xx.o
-
-endif
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index d2db9b8aed3f..0074b011a05a 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -22,17 +22,14 @@
  * The machine specific code may provide the extra mapping besides the
  * default mapping provided here.
  */
-static struct map_desc omap_io_desc[] __initdata = {
+#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
+static struct map_desc omap7xx_io_desc[] __initdata = {
 	{
 		.virtual	= OMAP1_IO_VIRT,
 		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
 		.length		= OMAP1_IO_SIZE,
 		.type		= MT_DEVICE
-	}
-};
-
-#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
-static struct map_desc omap7xx_io_desc[] __initdata = {
+	},
 	{
 		.virtual	= OMAP7XX_DSP_BASE,
 		.pfn		= __phys_to_pfn(OMAP7XX_DSP_START),
@@ -49,6 +46,12 @@ static struct map_desc omap7xx_io_desc[] __initdata = {
 
 #ifdef CONFIG_ARCH_OMAP15XX
 static struct map_desc omap1510_io_desc[] __initdata = {
+	{
+		.virtual	= OMAP1_IO_VIRT,
+		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
+		.length		= OMAP1_IO_SIZE,
+		.type		= MT_DEVICE
+	},
 	{
 		.virtual	= OMAP1510_DSP_BASE,
 		.pfn		= __phys_to_pfn(OMAP1510_DSP_START),
@@ -65,6 +68,12 @@ static struct map_desc omap1510_io_desc[] __initdata = {
 
 #if defined(CONFIG_ARCH_OMAP16XX)
 static struct map_desc omap16xx_io_desc[] __initdata = {
+	{
+		.virtual	= OMAP1_IO_VIRT,
+		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
+		.length		= OMAP1_IO_SIZE,
+		.type		= MT_DEVICE
+	},
 	{
 		.virtual	= OMAP16XX_DSP_BASE,
 		.pfn		= __phys_to_pfn(OMAP16XX_DSP_START),
@@ -79,18 +88,9 @@ static struct map_desc omap16xx_io_desc[] __initdata = {
 };
 #endif
 
-/*
- * Maps common IO regions for omap1
- */
-static void __init omap1_map_common_io(void)
-{
-	iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
-}
-
 #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
 void __init omap7xx_map_io(void)
 {
-	omap1_map_common_io();
 	iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
 }
 #endif
@@ -98,7 +98,6 @@ void __init omap7xx_map_io(void)
 #ifdef CONFIG_ARCH_OMAP15XX
 void __init omap15xx_map_io(void)
 {
-	omap1_map_common_io();
 	iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
 }
 #endif
@@ -106,7 +105,6 @@ void __init omap15xx_map_io(void)
 #if defined(CONFIG_ARCH_OMAP16XX)
 void __init omap16xx_map_io(void)
 {
-	omap1_map_common_io();
 	iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
 }
 #endif
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 05c25c432449..b1632cbe37e6 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -89,7 +89,6 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
 #define OMAP1610_MCBSP2_BASE	0xfffb1000
 #define OMAP1610_MCBSP3_BASE	0xe1017000
 
-#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
 struct resource omap7xx_mcbsp_res[][6] = {
 	{
 		{
@@ -159,14 +158,7 @@ static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
 };
 #define OMAP7XX_MCBSP_RES_SZ		ARRAY_SIZE(omap7xx_mcbsp_res[1])
 #define OMAP7XX_MCBSP_COUNT		ARRAY_SIZE(omap7xx_mcbsp_res)
-#else
-#define omap7xx_mcbsp_res_0		NULL
-#define omap7xx_mcbsp_pdata		NULL
-#define OMAP7XX_MCBSP_RES_SZ		0
-#define OMAP7XX_MCBSP_COUNT		0
-#endif
 
-#ifdef CONFIG_ARCH_OMAP15XX
 struct resource omap15xx_mcbsp_res[][6] = {
 	{
 		{
@@ -266,14 +258,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
 };
 #define OMAP15XX_MCBSP_RES_SZ		ARRAY_SIZE(omap15xx_mcbsp_res[1])
 #define OMAP15XX_MCBSP_COUNT		ARRAY_SIZE(omap15xx_mcbsp_res)
-#else
-#define omap15xx_mcbsp_res_0		NULL
-#define omap15xx_mcbsp_pdata		NULL
-#define OMAP15XX_MCBSP_RES_SZ		0
-#define OMAP15XX_MCBSP_COUNT		0
-#endif
 
-#ifdef CONFIG_ARCH_OMAP16XX
 struct resource omap16xx_mcbsp_res[][6] = {
 	{
 		{
@@ -373,12 +358,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
 };
 #define OMAP16XX_MCBSP_RES_SZ		ARRAY_SIZE(omap16xx_mcbsp_res[1])
 #define OMAP16XX_MCBSP_COUNT		ARRAY_SIZE(omap16xx_mcbsp_res)
-#else
-#define omap16xx_mcbsp_res_0		NULL
-#define omap16xx_mcbsp_pdata		NULL
-#define OMAP16XX_MCBSP_RES_SZ		0
-#define OMAP16XX_MCBSP_COUNT		0
-#endif
 
 static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
 			struct omap_mcbsp_platform_data *config, int size)
diff --git a/arch/arm/mach-omap1/pm.h b/arch/arm/mach-omap1/pm.h
index d9165709c532..0d1f092821ff 100644
--- a/arch/arm/mach-omap1/pm.h
+++ b/arch/arm/mach-omap1/pm.h
@@ -106,13 +106,6 @@
 #define OMAP7XX_IDLECT3		0xfffece24
 #define OMAP7XX_IDLE_LOOP_REQUEST	0x0C00
 
-#if     !defined(CONFIG_ARCH_OMAP730) && \
-	!defined(CONFIG_ARCH_OMAP850) && \
-	!defined(CONFIG_ARCH_OMAP15XX) && \
-	!defined(CONFIG_ARCH_OMAP16XX)
-#warning "Power management for this processor not implemented yet"
-#endif
-
 #ifndef __ASSEMBLER__
 
 #include <linux/clk.h>
diff --git a/include/linux/soc/ti/omap1-io.h b/include/linux/soc/ti/omap1-io.h
index f7f12728d4a6..9a60f45899d3 100644
--- a/include/linux/soc/ti/omap1-io.h
+++ b/include/linux/soc/ti/omap1-io.h
@@ -5,7 +5,7 @@
 #ifndef __ASSEMBLER__
 #include <linux/types.h>
 
-#ifdef CONFIG_ARCH_OMAP1_ANY
+#ifdef CONFIG_ARCH_OMAP1
 /*
  * NOTE: Please use ioremap + __raw_read/write where possible instead of these
  */
@@ -15,7 +15,7 @@ extern u32 omap_readl(u32 pa);
 extern void omap_writeb(u8 v, u32 pa);
 extern void omap_writew(u16 v, u32 pa);
 extern void omap_writel(u32 v, u32 pa);
-#else
+#elif defined(CONFIG_COMPILE_TEST)
 static inline u8 omap_readb(u32 pa)  { return 0; }
 static inline u16 omap_readw(u32 pa) { return 0; }
 static inline u32 omap_readl(u32 pa) { return 0; }
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] ARM: omap1: fix building gpio15xx
  2023-01-09 16:16 [PATCH 0/3] ARM: SoC fixes Arnd Bergmann
  2023-01-09 16:16 ` [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build Arnd Bergmann
  2023-01-09 16:16 ` [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures Arnd Bergmann
@ 2023-01-09 16:16 ` Arnd Bergmann
  2023-01-10 21:15   ` Aaro Koskinen
  2 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2023-01-09 16:16 UTC (permalink / raw)
  To: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-omap,
	Robert Jarzmik
  Cc: linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

In some randconfig builds, the asm/irq.h header is not included
in gpio15xx.c, so add an explicit include to avoid a build fialure:

In file included from arch/arm/mach-omap1/gpio15xx.c:15:
arch/arm/mach-omap1/irqs.h:99:34: error: 'NR_IRQS_LEGACY' undeclared here (not in a function)
   99 | #define IH2_BASE                (NR_IRQS_LEGACY + 32)
      |                                  ^~~~~~~~~~~~~~
arch/arm/mach-omap1/irqs.h:105:38: note: in expansion of macro 'IH2_BASE'
  105 | #define INT_MPUIO               (5 + IH2_BASE)
      |                                      ^~~~~~~~
arch/arm/mach-omap1/gpio15xx.c:28:27: note: in expansion of macro 'INT_MPUIO'
   28 |                 .start  = INT_MPUIO,
      |                           ^~~~~~~~~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/gpio15xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
index c675f11de99d..61fa26efd865 100644
--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -11,6 +11,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/soc/ti/omap1-soc.h>
+#include <asm/irq.h>
 
 #include "irqs.h"
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures
  2023-01-09 16:16 ` [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures Arnd Bergmann
@ 2023-01-10 21:14   ` Aaro Koskinen
  0 siblings, 0 replies; 7+ messages in thread
From: Aaro Koskinen @ 2023-01-10 21:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Janusz Krzysztofik, Tony Lindgren, linux-omap, Robert Jarzmik,
	linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann, stable

Hi,

On Mon, Jan 09, 2023 at 05:16:35PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> While compile-testing randconfig builds for the upcoming boardfile
> removal, I noticed that an earlier patch of mine was completely
> broken, and the introduction of CONFIG_ARCH_OMAP1_ANY only replaced
> one set of build failures with another one, now resulting in
> link failures like
> 
> ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe':
> drivers/video/fbdev/omap/omapfb_main.c:1703: undefined reference to `omap_set_dma_priority'
> ld: drivers/dma/ti/omap-dma.o: in function `omap_dma_free_chan_resources':
> drivers/dma/ti/omap-dma.c:777: undefined reference to `omap_free_dma'
> drivers/dma/ti/omap-dma.c:1685: undefined reference to `omap_get_plat_info'
> ld: drivers/usb/gadget/udc/omap_udc.o: in function `next_in_dma':
> drivers/usb/gadget/udc/omap_udc.c:820: undefined reference to `omap_get_dma_active_status'
> 
> I tried reworking it, but the resulting patch ended up much bigger than
> simply avoiding the original problem of unused-function warnings like
> 
> arch/arm/mach-omap1/mcbsp.c:76:30: error: unused variable 'omap1_mcbsp_ops' [-Werror,-Wunused-variable]
> 
> As a result, revert the previous fix, and rearrange the code that
> produces warnings to hide them. For mcbsp, the #ifdef check can
> simply be removed as the cpu_is_omapxxx() checks already achieve
> the same result, while in the io.c the easiest solution appears to
> be to merge the common map bits into each soc specific portion.
> This gets cleaned in a nicer way after omap7xx support gets dropped,
> as the remaining SoCs all have the exact same I/O map.
> 
> Fixes: 615dce5bf736 ("ARM: omap1: fix build with no SoC selected")
> Cc: stable@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

A.

> ---
>  arch/arm/mach-omap1/Kconfig     |  5 +----
>  arch/arm/mach-omap1/Makefile    |  4 ----
>  arch/arm/mach-omap1/io.c        | 32 +++++++++++++++-----------------
>  arch/arm/mach-omap1/mcbsp.c     | 21 ---------------------
>  arch/arm/mach-omap1/pm.h        |  7 -------
>  include/linux/soc/ti/omap1-io.h |  4 ++--
>  6 files changed, 18 insertions(+), 55 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
> index 538a960257cc..7ec7ada287e0 100644
> --- a/arch/arm/mach-omap1/Kconfig
> +++ b/arch/arm/mach-omap1/Kconfig
> @@ -4,6 +4,7 @@ menuconfig ARCH_OMAP1
>  	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
>  	depends on CPU_LITTLE_ENDIAN
>  	depends on ATAGS
> +	select ARCH_OMAP
>  	select ARCH_HAS_HOLES_MEMORYMODEL
>  	select ARCH_OMAP
>  	select CLKSRC_MMIO
> @@ -45,10 +46,6 @@ config ARCH_OMAP16XX
>  	select CPU_ARM926T
>  	select OMAP_DM_TIMER
>  
> -config ARCH_OMAP1_ANY
> -	select ARCH_OMAP
> -	def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX
> -
>  config ARCH_OMAP
>  	bool
>  
> diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
> index 506074b86333..0615cb0ba580 100644
> --- a/arch/arm/mach-omap1/Makefile
> +++ b/arch/arm/mach-omap1/Makefile
> @@ -3,8 +3,6 @@
>  # Makefile for the linux kernel.
>  #
>  
> -ifdef CONFIG_ARCH_OMAP1_ANY
> -
>  # Common support
>  obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \
>  	 serial.o devices.o dma.o omap-dma.o fb.o
> @@ -59,5 +57,3 @@ obj-$(CONFIG_ARCH_OMAP730)		+= gpio7xx.o
>  obj-$(CONFIG_ARCH_OMAP850)		+= gpio7xx.o
>  obj-$(CONFIG_ARCH_OMAP15XX)		+= gpio15xx.o
>  obj-$(CONFIG_ARCH_OMAP16XX)		+= gpio16xx.o
> -
> -endif
> diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
> index d2db9b8aed3f..0074b011a05a 100644
> --- a/arch/arm/mach-omap1/io.c
> +++ b/arch/arm/mach-omap1/io.c
> @@ -22,17 +22,14 @@
>   * The machine specific code may provide the extra mapping besides the
>   * default mapping provided here.
>   */
> -static struct map_desc omap_io_desc[] __initdata = {
> +#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
> +static struct map_desc omap7xx_io_desc[] __initdata = {
>  	{
>  		.virtual	= OMAP1_IO_VIRT,
>  		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
>  		.length		= OMAP1_IO_SIZE,
>  		.type		= MT_DEVICE
> -	}
> -};
> -
> -#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
> -static struct map_desc omap7xx_io_desc[] __initdata = {
> +	},
>  	{
>  		.virtual	= OMAP7XX_DSP_BASE,
>  		.pfn		= __phys_to_pfn(OMAP7XX_DSP_START),
> @@ -49,6 +46,12 @@ static struct map_desc omap7xx_io_desc[] __initdata = {
>  
>  #ifdef CONFIG_ARCH_OMAP15XX
>  static struct map_desc omap1510_io_desc[] __initdata = {
> +	{
> +		.virtual	= OMAP1_IO_VIRT,
> +		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
> +		.length		= OMAP1_IO_SIZE,
> +		.type		= MT_DEVICE
> +	},
>  	{
>  		.virtual	= OMAP1510_DSP_BASE,
>  		.pfn		= __phys_to_pfn(OMAP1510_DSP_START),
> @@ -65,6 +68,12 @@ static struct map_desc omap1510_io_desc[] __initdata = {
>  
>  #if defined(CONFIG_ARCH_OMAP16XX)
>  static struct map_desc omap16xx_io_desc[] __initdata = {
> +	{
> +		.virtual	= OMAP1_IO_VIRT,
> +		.pfn		= __phys_to_pfn(OMAP1_IO_PHYS),
> +		.length		= OMAP1_IO_SIZE,
> +		.type		= MT_DEVICE
> +	},
>  	{
>  		.virtual	= OMAP16XX_DSP_BASE,
>  		.pfn		= __phys_to_pfn(OMAP16XX_DSP_START),
> @@ -79,18 +88,9 @@ static struct map_desc omap16xx_io_desc[] __initdata = {
>  };
>  #endif
>  
> -/*
> - * Maps common IO regions for omap1
> - */
> -static void __init omap1_map_common_io(void)
> -{
> -	iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
> -}
> -
>  #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
>  void __init omap7xx_map_io(void)
>  {
> -	omap1_map_common_io();
>  	iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
>  }
>  #endif
> @@ -98,7 +98,6 @@ void __init omap7xx_map_io(void)
>  #ifdef CONFIG_ARCH_OMAP15XX
>  void __init omap15xx_map_io(void)
>  {
> -	omap1_map_common_io();
>  	iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
>  }
>  #endif
> @@ -106,7 +105,6 @@ void __init omap15xx_map_io(void)
>  #if defined(CONFIG_ARCH_OMAP16XX)
>  void __init omap16xx_map_io(void)
>  {
> -	omap1_map_common_io();
>  	iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
>  }
>  #endif
> diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
> index 05c25c432449..b1632cbe37e6 100644
> --- a/arch/arm/mach-omap1/mcbsp.c
> +++ b/arch/arm/mach-omap1/mcbsp.c
> @@ -89,7 +89,6 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
>  #define OMAP1610_MCBSP2_BASE	0xfffb1000
>  #define OMAP1610_MCBSP3_BASE	0xe1017000
>  
> -#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
>  struct resource omap7xx_mcbsp_res[][6] = {
>  	{
>  		{
> @@ -159,14 +158,7 @@ static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
>  };
>  #define OMAP7XX_MCBSP_RES_SZ		ARRAY_SIZE(omap7xx_mcbsp_res[1])
>  #define OMAP7XX_MCBSP_COUNT		ARRAY_SIZE(omap7xx_mcbsp_res)
> -#else
> -#define omap7xx_mcbsp_res_0		NULL
> -#define omap7xx_mcbsp_pdata		NULL
> -#define OMAP7XX_MCBSP_RES_SZ		0
> -#define OMAP7XX_MCBSP_COUNT		0
> -#endif
>  
> -#ifdef CONFIG_ARCH_OMAP15XX
>  struct resource omap15xx_mcbsp_res[][6] = {
>  	{
>  		{
> @@ -266,14 +258,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
>  };
>  #define OMAP15XX_MCBSP_RES_SZ		ARRAY_SIZE(omap15xx_mcbsp_res[1])
>  #define OMAP15XX_MCBSP_COUNT		ARRAY_SIZE(omap15xx_mcbsp_res)
> -#else
> -#define omap15xx_mcbsp_res_0		NULL
> -#define omap15xx_mcbsp_pdata		NULL
> -#define OMAP15XX_MCBSP_RES_SZ		0
> -#define OMAP15XX_MCBSP_COUNT		0
> -#endif
>  
> -#ifdef CONFIG_ARCH_OMAP16XX
>  struct resource omap16xx_mcbsp_res[][6] = {
>  	{
>  		{
> @@ -373,12 +358,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
>  };
>  #define OMAP16XX_MCBSP_RES_SZ		ARRAY_SIZE(omap16xx_mcbsp_res[1])
>  #define OMAP16XX_MCBSP_COUNT		ARRAY_SIZE(omap16xx_mcbsp_res)
> -#else
> -#define omap16xx_mcbsp_res_0		NULL
> -#define omap16xx_mcbsp_pdata		NULL
> -#define OMAP16XX_MCBSP_RES_SZ		0
> -#define OMAP16XX_MCBSP_COUNT		0
> -#endif
>  
>  static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
>  			struct omap_mcbsp_platform_data *config, int size)
> diff --git a/arch/arm/mach-omap1/pm.h b/arch/arm/mach-omap1/pm.h
> index d9165709c532..0d1f092821ff 100644
> --- a/arch/arm/mach-omap1/pm.h
> +++ b/arch/arm/mach-omap1/pm.h
> @@ -106,13 +106,6 @@
>  #define OMAP7XX_IDLECT3		0xfffece24
>  #define OMAP7XX_IDLE_LOOP_REQUEST	0x0C00
>  
> -#if     !defined(CONFIG_ARCH_OMAP730) && \
> -	!defined(CONFIG_ARCH_OMAP850) && \
> -	!defined(CONFIG_ARCH_OMAP15XX) && \
> -	!defined(CONFIG_ARCH_OMAP16XX)
> -#warning "Power management for this processor not implemented yet"
> -#endif
> -
>  #ifndef __ASSEMBLER__
>  
>  #include <linux/clk.h>
> diff --git a/include/linux/soc/ti/omap1-io.h b/include/linux/soc/ti/omap1-io.h
> index f7f12728d4a6..9a60f45899d3 100644
> --- a/include/linux/soc/ti/omap1-io.h
> +++ b/include/linux/soc/ti/omap1-io.h
> @@ -5,7 +5,7 @@
>  #ifndef __ASSEMBLER__
>  #include <linux/types.h>
>  
> -#ifdef CONFIG_ARCH_OMAP1_ANY
> +#ifdef CONFIG_ARCH_OMAP1
>  /*
>   * NOTE: Please use ioremap + __raw_read/write where possible instead of these
>   */
> @@ -15,7 +15,7 @@ extern u32 omap_readl(u32 pa);
>  extern void omap_writeb(u8 v, u32 pa);
>  extern void omap_writew(u16 v, u32 pa);
>  extern void omap_writel(u32 v, u32 pa);
> -#else
> +#elif defined(CONFIG_COMPILE_TEST)
>  static inline u8 omap_readb(u32 pa)  { return 0; }
>  static inline u16 omap_readw(u32 pa) { return 0; }
>  static inline u32 omap_readl(u32 pa) { return 0; }
> -- 
> 2.39.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] ARM: omap1: fix building gpio15xx
  2023-01-09 16:16 ` [PATCH 3/3] ARM: omap1: fix building gpio15xx Arnd Bergmann
@ 2023-01-10 21:15   ` Aaro Koskinen
  0 siblings, 0 replies; 7+ messages in thread
From: Aaro Koskinen @ 2023-01-10 21:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Janusz Krzysztofik, Tony Lindgren, linux-omap, Robert Jarzmik,
	linux-arm-kernel, linux-kernel, Daniel Mack, Haojian Zhuang,
	Arnd Bergmann

Hi,

On Mon, Jan 09, 2023 at 05:16:36PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> In some randconfig builds, the asm/irq.h header is not included
> in gpio15xx.c, so add an explicit include to avoid a build fialure:
> 
> In file included from arch/arm/mach-omap1/gpio15xx.c:15:
> arch/arm/mach-omap1/irqs.h:99:34: error: 'NR_IRQS_LEGACY' undeclared here (not in a function)
>    99 | #define IH2_BASE                (NR_IRQS_LEGACY + 32)
>       |                                  ^~~~~~~~~~~~~~
> arch/arm/mach-omap1/irqs.h:105:38: note: in expansion of macro 'IH2_BASE'
>   105 | #define INT_MPUIO               (5 + IH2_BASE)
>       |                                      ^~~~~~~~
> arch/arm/mach-omap1/gpio15xx.c:28:27: note: in expansion of macro 'INT_MPUIO'
>    28 |                 .start  = INT_MPUIO,
>       |                           ^~~~~~~~~
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

A.

> ---
>  arch/arm/mach-omap1/gpio15xx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
> index c675f11de99d..61fa26efd865 100644
> --- a/arch/arm/mach-omap1/gpio15xx.c
> +++ b/arch/arm/mach-omap1/gpio15xx.c
> @@ -11,6 +11,7 @@
>  #include <linux/gpio.h>
>  #include <linux/platform_data/gpio-omap.h>
>  #include <linux/soc/ti/omap1-soc.h>
> +#include <asm/irq.h>
>  
>  #include "irqs.h"
>  
> -- 
> 2.39.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build
  2023-01-09 16:16 ` [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build Arnd Bergmann
@ 2023-01-23 15:30   ` Robert Jarzmik
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2023-01-23 15:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-omap,
	Robert Jarzmik, linux-arm-kernel, linux-kernel, Daniel Mack,
	Haojian Zhuang, Arnd Bergmann


Arnd Bergmann <arnd@kernel.org> writes:

> From: Arnd Bergmann <arnd@arndb.de>
>
> After commit b5aaaa666a85 ("ARM: pxa: add Kconfig dependencies 
> for
> ATAGS based boards"), the default PXA build no longer includes 
> support
> for the board files that are considered unused.
>
> As a side-effect of this, the PXA310 and PXA320 support is not 
> built
> into the kernel any more, even though it should work in 
> principle as
> long as the symbols are enabled. As Robert points out, there are 
> dts
> files for zylonite and cm-x300, though those have not made it 
> into the
> mainline kernel.
>
> Link: 
> https://lore.kernel.org/linux-arm-kernel/m2sfglh02h.fsf@free.fr/
> Reported-by: Robert Jarzmik <robert.jarzmik@free.fr>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-23 15:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 16:16 [PATCH 0/3] ARM: SoC fixes Arnd Bergmann
2023-01-09 16:16 ` [PATCH 1/3] ARM: pxa: enable PXA310/PXA320 for DT-only build Arnd Bergmann
2023-01-23 15:30   ` Robert Jarzmik
2023-01-09 16:16 ` [PATCH 2/3] ARM: omap1: fix !ARCH_OMAP1_ANY link failures Arnd Bergmann
2023-01-10 21:14   ` Aaro Koskinen
2023-01-09 16:16 ` [PATCH 3/3] ARM: omap1: fix building gpio15xx Arnd Bergmann
2023-01-10 21:15   ` Aaro Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).