All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-05  9:17 ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

I revisited some patches from a few years back, to see what
is needed forsome of the remaining platforms to become part of
CONFIG_ARCH_MULTIPLATFORM.

A few things happened since I last looked at this, which helps to make
this easier:

 - The ixp4xx platform saw a large scale cleanup

 - The ep93xx platform lost support for MaverickCrunch FPUs and
   gained support for the common clock subsystem

 - The OMAP1 platform has a proposed patch for the common
   clock subsystem.

 - The generic IRQ entry code is now used everywhere, including
   on IOP32x.

 - The s3c24xx platform is scheduled for removal next year

It appears that we can now convert almost all the remaining platforms
(ep93xx, dove, s3c24xx, iop32x and ixp4xx), leaving only:

 - OMAP1 has a separate series, since the conversion is non- trivial,
   and depends on the clk conversion from Janusz Krzysztofik. I'll
   post that separately.

 - PXA needs an even longer series, which I've also sent in the past,
   but I'll keep that for later.

 - The three StrongARM based platforms remain quite different from
   the rest, and I expect that to stay this way, until they are
   eventually removed from the tree.

For simplicity I'd want to merge the series directly through the
soc tree, provided there are no regressions or other concerns
with the patches.

       Arnd

Arnd Bergmann (12):
  ARM: versatile: move integrator/realview/vexpress to versatile
  ARM: ep93xx: renumber interrupts
  ARM: ep93xx: enable SPARSE_IRQ
  ARM: ep93xx: make mach/ep93xx-regs.h local
  ARM: ep93xx: multiplatform support
  ARM: dove: multiplatform support
  ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
  ARM: s3c24xx: convert to sparse-irq
  ARM: s3c: enable s3c24xx multiplatform support
  ARM: iop32x: enable multiplatform support
  ARM: rework endianess selection
  ARM: ixp4xx: enable multiplatform support

 MAINTAINERS                                   |   3 -
 arch/arm/Kconfig                              |  87 +----
 arch/arm/Makefile                             |   7 +-
 .../compressed/misc-ep93xx.h}                 |  70 ++--
 arch/arm/boot/compressed/misc.c               |   4 +
 arch/arm/configs/dove_defconfig               |   2 +
 arch/arm/configs/ep93xx_defconfig             |   2 +
 arch/arm/mach-asm9260/Kconfig                 |   1 +
 arch/arm/mach-aspeed/Kconfig                  |   2 +-
 arch/arm/mach-at91/Kconfig                    |   3 +-
 arch/arm/mach-clps711x/Kconfig                |   1 +
 arch/arm/mach-davinci/Kconfig                 |   1 +
 arch/arm/mach-dove/Kconfig                    |  16 +-
 arch/arm/mach-dove/Makefile                   |   2 +
 arch/arm/mach-dove/include/mach/uncompress.h  |  34 --
 arch/arm/mach-ep93xx/Kconfig                  |  13 +
 arch/arm/mach-ep93xx/adssphere.c              |   1 +
 arch/arm/mach-ep93xx/core.c                   |   5 +-
 arch/arm/mach-ep93xx/edb93xx.c                |   8 +
 .../{include/mach => }/ep93xx-regs.h          |   4 -
 arch/arm/mach-ep93xx/gesbc9312.c              |   1 +
 arch/arm/mach-ep93xx/gpio-ep93xx.h            |   2 +-
 arch/arm/mach-ep93xx/include/mach/irqs.h      |  79 -----
 arch/arm/mach-ep93xx/irqs.h                   |  76 +++++
 arch/arm/mach-ep93xx/micro9.c                 |   4 +
 arch/arm/mach-ep93xx/simone.c                 |   1 +
 arch/arm/mach-ep93xx/snappercl15.c            |   1 +
 arch/arm/mach-ep93xx/soc.h                    |   3 +-
 arch/arm/mach-ep93xx/ts72xx.c                 |   3 +-
 arch/arm/mach-ep93xx/vision_ep9307.c          |   1 +
 arch/arm/mach-exynos/Kconfig                  |   1 -
 arch/arm/mach-gemini/Kconfig                  |   1 +
 arch/arm/mach-highbank/Kconfig                |   1 -
 arch/arm/mach-hisi/Kconfig                    |   2 +-
 arch/arm/mach-imx/Kconfig                     |   4 +-
 arch/arm/mach-integrator/Kconfig              | 125 -------
 arch/arm/mach-integrator/Makefile             |  10 -
 arch/arm/mach-iop32x/Kconfig                  |  18 +-
 arch/arm/mach-iop32x/em7210.c                 |   1 +
 arch/arm/mach-iop32x/glantank.c               |   1 +
 arch/arm/mach-iop32x/include/mach/irqs.h      |  14 -
 .../arm/mach-iop32x/include/mach/uncompress.h |  25 --
 arch/arm/mach-iop32x/iq31244.c                |   1 +
 arch/arm/mach-iop32x/iq80321.c                |   1 +
 arch/arm/mach-iop32x/irqs.h                   |   2 +
 arch/arm/mach-iop32x/n2100.c                  |   1 +
 arch/arm/mach-ixp4xx/Kconfig                  |  22 +-
 arch/arm/mach-ixp4xx/Makefile.boot            |   4 -
 .../arm/mach-ixp4xx/include/mach/uncompress.h |  54 ---
 arch/arm/mach-keystone/Kconfig                |   1 -
 arch/arm/mach-lpc32xx/Kconfig                 |   1 +
 arch/arm/mach-mmp/Kconfig                     |   2 +-
 arch/arm/mach-moxart/Kconfig                  |   1 +
 arch/arm/mach-mv78xx0/Kconfig                 |   1 +
 arch/arm/mach-mvebu/Kconfig                   |   3 +-
 arch/arm/mach-mxs/Kconfig                     |   1 +
 arch/arm/mach-nomadik/Kconfig                 |   1 +
 arch/arm/mach-npcm/Kconfig                    |   2 +-
 arch/arm/mach-nspire/Kconfig                  |   1 +
 arch/arm/mach-orion5x/Kconfig                 |   1 +
 arch/arm/mach-oxnas/Kconfig                   |   2 +-
 arch/arm/mach-qcom/Kconfig                    |   1 -
 arch/arm/mach-realview/Kconfig                | 103 ------
 arch/arm/mach-realview/Makefile               |   8 -
 arch/arm/mach-s3c/Kconfig.s3c24xx             |  25 +-
 arch/arm/mach-s3c/bast-ide.c                  |   2 +-
 arch/arm/mach-s3c/bast-irq.c                  |   2 +-
 arch/arm/mach-s3c/cpu.c                       |   2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c         |   2 +-
 arch/arm/mach-s3c/dev-uart-s3c64xx.c          |   2 +-
 arch/arm/mach-s3c/devs.c                      |   2 +-
 arch/arm/mach-s3c/gpio-samsung.c              |   2 +-
 arch/arm/mach-s3c/include/mach/io-s3c24xx.h   |  50 ---
 arch/arm/mach-s3c/include/mach/io.h           |   8 -
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            |   2 +-
 arch/arm/mach-s3c/irq-s3c24xx.c               |   2 +-
 .../{include/mach => }/irqs-s3c24xx.h         |  18 +-
 .../{include/mach => }/irqs-s3c64xx.h         |   0
 arch/arm/mach-s3c/{include/mach => }/irqs.h   |   0
 arch/arm/mach-s3c/mach-amlm5900.c             |   2 +
 arch/arm/mach-s3c/mach-anubis.c               |   6 +-
 arch/arm/mach-s3c/mach-anw6410.c              |   2 +-
 arch/arm/mach-s3c/mach-at2440evb.c            |   1 +
 arch/arm/mach-s3c/mach-bast.c                 |   6 +-
 arch/arm/mach-s3c/mach-crag6410-module.c      |   2 +-
 arch/arm/mach-s3c/mach-crag6410.c             |   2 +-
 arch/arm/mach-s3c/mach-gta02.c                |   1 +
 arch/arm/mach-s3c/mach-h1940.c                |   1 +
 arch/arm/mach-s3c/mach-hmt.c                  |   2 +-
 arch/arm/mach-s3c/mach-jive.c                 |   2 +-
 arch/arm/mach-s3c/mach-mini2440.c             |   3 +-
 arch/arm/mach-s3c/mach-mini6410.c             |   2 +-
 arch/arm/mach-s3c/mach-n30.c                  |   2 +
 arch/arm/mach-s3c/mach-ncp.c                  |   2 +-
 arch/arm/mach-s3c/mach-nexcoder.c             |   1 +
 arch/arm/mach-s3c/mach-osiris.c               |   6 +-
 arch/arm/mach-s3c/mach-otom.c                 |   1 +
 arch/arm/mach-s3c/mach-qt2410.c               |   1 +
 arch/arm/mach-s3c/mach-real6410.c             |   2 +-
 arch/arm/mach-s3c/mach-rx1950.c               |   1 +
 arch/arm/mach-s3c/mach-rx3715.c               |   7 +-
 arch/arm/mach-s3c/mach-smartq5.c              |   2 +-
 arch/arm/mach-s3c/mach-smartq7.c              |   2 +-
 arch/arm/mach-s3c/mach-smdk2410.c             |   1 +
 arch/arm/mach-s3c/mach-smdk2413.c             |   3 +
 arch/arm/mach-s3c/mach-smdk2416.c             |  11 +-
 arch/arm/mach-s3c/mach-smdk2440.c             |  11 +-
 arch/arm/mach-s3c/mach-smdk2443.c             |  12 +-
 arch/arm/mach-s3c/mach-smdk6400.c             |   2 +-
 arch/arm/mach-s3c/mach-smdk6410.c             |   2 +-
 arch/arm/mach-s3c/mach-tct_hammer.c           |   1 +
 arch/arm/mach-s3c/mach-vr1000.c               |   6 +-
 arch/arm/mach-s3c/mach-vstms.c                |   1 +
 .../mach-s3c/{include/mach => }/map-base.h    |   6 +
 arch/arm/mach-s3c/map-s3c24xx.h               |   2 +-
 arch/arm/mach-s3c/map-s3c64xx.h               |   2 +-
 arch/arm/mach-s3c/pl080.c                     |   2 +-
 arch/arm/mach-s3c/pm-core-s3c24xx.h           |   2 +-
 arch/arm/mach-s3c/pm-s3c2412.c                |   2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                |   2 +-
 arch/arm/mach-s3c/pm.c                        |   2 +-
 arch/arm/mach-s3c/s3c2443.c                   |   2 +-
 arch/arm/mach-s3c/s3c24xx.h                   |   2 +-
 arch/arm/mach-s3c/s3c64xx.c                   |   2 +-
 arch/arm/mach-s3c/simtec-usb.c                |   2 +-
 arch/arm/mach-socfpga/Kconfig                 |   1 -
 arch/arm/mach-spear/Kconfig                   |   2 +-
 arch/arm/mach-sunxi/Kconfig                   |   3 +-
 arch/arm/mach-versatile/Kconfig               | 309 ++++++++++++++++++
 arch/arm/mach-versatile/Makefile              |  32 +-
 .../Makefile.boot                             |   0
 .../{mach-vexpress => mach-versatile}/dcscb.c |   4 +-
 .../dcscb_setup.S                             |   2 -
 .../headsmp.S                                 |   2 -
 .../hotplug.c                                 |   2 +-
 .../cm.h => mach-versatile/integrator-cm.h}   |   0
 .../integrator-hardware.h}                    |   0
 .../core.c => mach-versatile/integrator.c}    |   8 +-
 .../common.h => mach-versatile/integrator.h}  |   0
 .../integrator_ap.c                           |   8 +-
 .../integrator_cp.c                           |   8 +-
 .../platsmp-realview.c}                       |   2 +-
 .../platsmp-vexpress.c}                       |   7 +-
 .../platsmp.c                                 |   4 +-
 .../include/plat => mach-versatile}/platsmp.h |   2 -
 .../realview.c}                               |   0
 .../{mach-vexpress => mach-versatile}/spc.c   |   0
 .../{mach-vexpress => mach-versatile}/spc.h   |   0
 .../tc2_pm.c                                  |   2 -
 .../v2m-mps2.c                                |   0
 .../{mach-vexpress => mach-versatile}/v2m.c   |   2 +-
 .../{versatile_dt.c => versatile.c}           |   0
 .../core.h => mach-versatile/vexpress.h}      |   0
 arch/arm/mach-vexpress/Kconfig                |  81 -----
 arch/arm/mach-vexpress/Makefile               |  19 --
 arch/arm/mach-vt8500/Kconfig                  |   1 +
 arch/arm/mach-zynq/Kconfig                    |   1 -
 arch/arm/mm/Kconfig                           |  28 +-
 arch/arm/plat-versatile/Makefile              |   5 -
 159 files changed, 708 insertions(+), 937 deletions(-)
 rename arch/arm/{mach-ep93xx/include/mach/uncompress.h => boot/compressed/misc-ep93xx.h} (51%)
 delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h
 rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
 delete mode 100644 arch/arm/mach-ep93xx/include/mach/irqs.h
 create mode 100644 arch/arm/mach-ep93xx/irqs.h
 delete mode 100644 arch/arm/mach-integrator/Kconfig
 delete mode 100644 arch/arm/mach-integrator/Makefile
 delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-realview/Kconfig
 delete mode 100644 arch/arm/mach-realview/Makefile
 delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
 delete mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%)
 rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
 rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
 rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
 rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
 rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
 rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
 rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
 rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
 rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
 rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
 rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
 rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
 rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
 rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
 delete mode 100644 arch/arm/mach-vexpress/Kconfig
 delete mode 100644 arch/arm/mach-vexpress/Makefile
 delete mode 100644 arch/arm/plat-versatile/Makefile

-- 
2.29.2
Cc: Russell King <linux@armlinux.org.uk>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: Hubert Feurstein <hubert.feurstein@contec.at>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: patches@opensource.cirrus.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-05  9:17 ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

I revisited some patches from a few years back, to see what
is needed forsome of the remaining platforms to become part of
CONFIG_ARCH_MULTIPLATFORM.

A few things happened since I last looked at this, which helps to make
this easier:

 - The ixp4xx platform saw a large scale cleanup

 - The ep93xx platform lost support for MaverickCrunch FPUs and
   gained support for the common clock subsystem

 - The OMAP1 platform has a proposed patch for the common
   clock subsystem.

 - The generic IRQ entry code is now used everywhere, including
   on IOP32x.

 - The s3c24xx platform is scheduled for removal next year

It appears that we can now convert almost all the remaining platforms
(ep93xx, dove, s3c24xx, iop32x and ixp4xx), leaving only:

 - OMAP1 has a separate series, since the conversion is non- trivial,
   and depends on the clk conversion from Janusz Krzysztofik. I'll
   post that separately.

 - PXA needs an even longer series, which I've also sent in the past,
   but I'll keep that for later.

 - The three StrongARM based platforms remain quite different from
   the rest, and I expect that to stay this way, until they are
   eventually removed from the tree.

For simplicity I'd want to merge the series directly through the
soc tree, provided there are no regressions or other concerns
with the patches.

       Arnd

Arnd Bergmann (12):
  ARM: versatile: move integrator/realview/vexpress to versatile
  ARM: ep93xx: renumber interrupts
  ARM: ep93xx: enable SPARSE_IRQ
  ARM: ep93xx: make mach/ep93xx-regs.h local
  ARM: ep93xx: multiplatform support
  ARM: dove: multiplatform support
  ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
  ARM: s3c24xx: convert to sparse-irq
  ARM: s3c: enable s3c24xx multiplatform support
  ARM: iop32x: enable multiplatform support
  ARM: rework endianess selection
  ARM: ixp4xx: enable multiplatform support

 MAINTAINERS                                   |   3 -
 arch/arm/Kconfig                              |  87 +----
 arch/arm/Makefile                             |   7 +-
 .../compressed/misc-ep93xx.h}                 |  70 ++--
 arch/arm/boot/compressed/misc.c               |   4 +
 arch/arm/configs/dove_defconfig               |   2 +
 arch/arm/configs/ep93xx_defconfig             |   2 +
 arch/arm/mach-asm9260/Kconfig                 |   1 +
 arch/arm/mach-aspeed/Kconfig                  |   2 +-
 arch/arm/mach-at91/Kconfig                    |   3 +-
 arch/arm/mach-clps711x/Kconfig                |   1 +
 arch/arm/mach-davinci/Kconfig                 |   1 +
 arch/arm/mach-dove/Kconfig                    |  16 +-
 arch/arm/mach-dove/Makefile                   |   2 +
 arch/arm/mach-dove/include/mach/uncompress.h  |  34 --
 arch/arm/mach-ep93xx/Kconfig                  |  13 +
 arch/arm/mach-ep93xx/adssphere.c              |   1 +
 arch/arm/mach-ep93xx/core.c                   |   5 +-
 arch/arm/mach-ep93xx/edb93xx.c                |   8 +
 .../{include/mach => }/ep93xx-regs.h          |   4 -
 arch/arm/mach-ep93xx/gesbc9312.c              |   1 +
 arch/arm/mach-ep93xx/gpio-ep93xx.h            |   2 +-
 arch/arm/mach-ep93xx/include/mach/irqs.h      |  79 -----
 arch/arm/mach-ep93xx/irqs.h                   |  76 +++++
 arch/arm/mach-ep93xx/micro9.c                 |   4 +
 arch/arm/mach-ep93xx/simone.c                 |   1 +
 arch/arm/mach-ep93xx/snappercl15.c            |   1 +
 arch/arm/mach-ep93xx/soc.h                    |   3 +-
 arch/arm/mach-ep93xx/ts72xx.c                 |   3 +-
 arch/arm/mach-ep93xx/vision_ep9307.c          |   1 +
 arch/arm/mach-exynos/Kconfig                  |   1 -
 arch/arm/mach-gemini/Kconfig                  |   1 +
 arch/arm/mach-highbank/Kconfig                |   1 -
 arch/arm/mach-hisi/Kconfig                    |   2 +-
 arch/arm/mach-imx/Kconfig                     |   4 +-
 arch/arm/mach-integrator/Kconfig              | 125 -------
 arch/arm/mach-integrator/Makefile             |  10 -
 arch/arm/mach-iop32x/Kconfig                  |  18 +-
 arch/arm/mach-iop32x/em7210.c                 |   1 +
 arch/arm/mach-iop32x/glantank.c               |   1 +
 arch/arm/mach-iop32x/include/mach/irqs.h      |  14 -
 .../arm/mach-iop32x/include/mach/uncompress.h |  25 --
 arch/arm/mach-iop32x/iq31244.c                |   1 +
 arch/arm/mach-iop32x/iq80321.c                |   1 +
 arch/arm/mach-iop32x/irqs.h                   |   2 +
 arch/arm/mach-iop32x/n2100.c                  |   1 +
 arch/arm/mach-ixp4xx/Kconfig                  |  22 +-
 arch/arm/mach-ixp4xx/Makefile.boot            |   4 -
 .../arm/mach-ixp4xx/include/mach/uncompress.h |  54 ---
 arch/arm/mach-keystone/Kconfig                |   1 -
 arch/arm/mach-lpc32xx/Kconfig                 |   1 +
 arch/arm/mach-mmp/Kconfig                     |   2 +-
 arch/arm/mach-moxart/Kconfig                  |   1 +
 arch/arm/mach-mv78xx0/Kconfig                 |   1 +
 arch/arm/mach-mvebu/Kconfig                   |   3 +-
 arch/arm/mach-mxs/Kconfig                     |   1 +
 arch/arm/mach-nomadik/Kconfig                 |   1 +
 arch/arm/mach-npcm/Kconfig                    |   2 +-
 arch/arm/mach-nspire/Kconfig                  |   1 +
 arch/arm/mach-orion5x/Kconfig                 |   1 +
 arch/arm/mach-oxnas/Kconfig                   |   2 +-
 arch/arm/mach-qcom/Kconfig                    |   1 -
 arch/arm/mach-realview/Kconfig                | 103 ------
 arch/arm/mach-realview/Makefile               |   8 -
 arch/arm/mach-s3c/Kconfig.s3c24xx             |  25 +-
 arch/arm/mach-s3c/bast-ide.c                  |   2 +-
 arch/arm/mach-s3c/bast-irq.c                  |   2 +-
 arch/arm/mach-s3c/cpu.c                       |   2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c         |   2 +-
 arch/arm/mach-s3c/dev-uart-s3c64xx.c          |   2 +-
 arch/arm/mach-s3c/devs.c                      |   2 +-
 arch/arm/mach-s3c/gpio-samsung.c              |   2 +-
 arch/arm/mach-s3c/include/mach/io-s3c24xx.h   |  50 ---
 arch/arm/mach-s3c/include/mach/io.h           |   8 -
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            |   2 +-
 arch/arm/mach-s3c/irq-s3c24xx.c               |   2 +-
 .../{include/mach => }/irqs-s3c24xx.h         |  18 +-
 .../{include/mach => }/irqs-s3c64xx.h         |   0
 arch/arm/mach-s3c/{include/mach => }/irqs.h   |   0
 arch/arm/mach-s3c/mach-amlm5900.c             |   2 +
 arch/arm/mach-s3c/mach-anubis.c               |   6 +-
 arch/arm/mach-s3c/mach-anw6410.c              |   2 +-
 arch/arm/mach-s3c/mach-at2440evb.c            |   1 +
 arch/arm/mach-s3c/mach-bast.c                 |   6 +-
 arch/arm/mach-s3c/mach-crag6410-module.c      |   2 +-
 arch/arm/mach-s3c/mach-crag6410.c             |   2 +-
 arch/arm/mach-s3c/mach-gta02.c                |   1 +
 arch/arm/mach-s3c/mach-h1940.c                |   1 +
 arch/arm/mach-s3c/mach-hmt.c                  |   2 +-
 arch/arm/mach-s3c/mach-jive.c                 |   2 +-
 arch/arm/mach-s3c/mach-mini2440.c             |   3 +-
 arch/arm/mach-s3c/mach-mini6410.c             |   2 +-
 arch/arm/mach-s3c/mach-n30.c                  |   2 +
 arch/arm/mach-s3c/mach-ncp.c                  |   2 +-
 arch/arm/mach-s3c/mach-nexcoder.c             |   1 +
 arch/arm/mach-s3c/mach-osiris.c               |   6 +-
 arch/arm/mach-s3c/mach-otom.c                 |   1 +
 arch/arm/mach-s3c/mach-qt2410.c               |   1 +
 arch/arm/mach-s3c/mach-real6410.c             |   2 +-
 arch/arm/mach-s3c/mach-rx1950.c               |   1 +
 arch/arm/mach-s3c/mach-rx3715.c               |   7 +-
 arch/arm/mach-s3c/mach-smartq5.c              |   2 +-
 arch/arm/mach-s3c/mach-smartq7.c              |   2 +-
 arch/arm/mach-s3c/mach-smdk2410.c             |   1 +
 arch/arm/mach-s3c/mach-smdk2413.c             |   3 +
 arch/arm/mach-s3c/mach-smdk2416.c             |  11 +-
 arch/arm/mach-s3c/mach-smdk2440.c             |  11 +-
 arch/arm/mach-s3c/mach-smdk2443.c             |  12 +-
 arch/arm/mach-s3c/mach-smdk6400.c             |   2 +-
 arch/arm/mach-s3c/mach-smdk6410.c             |   2 +-
 arch/arm/mach-s3c/mach-tct_hammer.c           |   1 +
 arch/arm/mach-s3c/mach-vr1000.c               |   6 +-
 arch/arm/mach-s3c/mach-vstms.c                |   1 +
 .../mach-s3c/{include/mach => }/map-base.h    |   6 +
 arch/arm/mach-s3c/map-s3c24xx.h               |   2 +-
 arch/arm/mach-s3c/map-s3c64xx.h               |   2 +-
 arch/arm/mach-s3c/pl080.c                     |   2 +-
 arch/arm/mach-s3c/pm-core-s3c24xx.h           |   2 +-
 arch/arm/mach-s3c/pm-s3c2412.c                |   2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                |   2 +-
 arch/arm/mach-s3c/pm.c                        |   2 +-
 arch/arm/mach-s3c/s3c2443.c                   |   2 +-
 arch/arm/mach-s3c/s3c24xx.h                   |   2 +-
 arch/arm/mach-s3c/s3c64xx.c                   |   2 +-
 arch/arm/mach-s3c/simtec-usb.c                |   2 +-
 arch/arm/mach-socfpga/Kconfig                 |   1 -
 arch/arm/mach-spear/Kconfig                   |   2 +-
 arch/arm/mach-sunxi/Kconfig                   |   3 +-
 arch/arm/mach-versatile/Kconfig               | 309 ++++++++++++++++++
 arch/arm/mach-versatile/Makefile              |  32 +-
 .../Makefile.boot                             |   0
 .../{mach-vexpress => mach-versatile}/dcscb.c |   4 +-
 .../dcscb_setup.S                             |   2 -
 .../headsmp.S                                 |   2 -
 .../hotplug.c                                 |   2 +-
 .../cm.h => mach-versatile/integrator-cm.h}   |   0
 .../integrator-hardware.h}                    |   0
 .../core.c => mach-versatile/integrator.c}    |   8 +-
 .../common.h => mach-versatile/integrator.h}  |   0
 .../integrator_ap.c                           |   8 +-
 .../integrator_cp.c                           |   8 +-
 .../platsmp-realview.c}                       |   2 +-
 .../platsmp-vexpress.c}                       |   7 +-
 .../platsmp.c                                 |   4 +-
 .../include/plat => mach-versatile}/platsmp.h |   2 -
 .../realview.c}                               |   0
 .../{mach-vexpress => mach-versatile}/spc.c   |   0
 .../{mach-vexpress => mach-versatile}/spc.h   |   0
 .../tc2_pm.c                                  |   2 -
 .../v2m-mps2.c                                |   0
 .../{mach-vexpress => mach-versatile}/v2m.c   |   2 +-
 .../{versatile_dt.c => versatile.c}           |   0
 .../core.h => mach-versatile/vexpress.h}      |   0
 arch/arm/mach-vexpress/Kconfig                |  81 -----
 arch/arm/mach-vexpress/Makefile               |  19 --
 arch/arm/mach-vt8500/Kconfig                  |   1 +
 arch/arm/mach-zynq/Kconfig                    |   1 -
 arch/arm/mm/Kconfig                           |  28 +-
 arch/arm/plat-versatile/Makefile              |   5 -
 159 files changed, 708 insertions(+), 937 deletions(-)
 rename arch/arm/{mach-ep93xx/include/mach/uncompress.h => boot/compressed/misc-ep93xx.h} (51%)
 delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h
 rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
 delete mode 100644 arch/arm/mach-ep93xx/include/mach/irqs.h
 create mode 100644 arch/arm/mach-ep93xx/irqs.h
 delete mode 100644 arch/arm/mach-integrator/Kconfig
 delete mode 100644 arch/arm/mach-integrator/Makefile
 delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-realview/Kconfig
 delete mode 100644 arch/arm/mach-realview/Makefile
 delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
 delete mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%)
 rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
 rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
 rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
 rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
 rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
 rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
 rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
 rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
 rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
 rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
 rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
 rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
 rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
 rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
 delete mode 100644 arch/arm/mach-vexpress/Kconfig
 delete mode 100644 arch/arm/mach-vexpress/Makefile
 delete mode 100644 arch/arm/plat-versatile/Makefile

-- 
2.29.2
Cc: Russell King <linux@armlinux.org.uk>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: Hubert Feurstein <hubert.feurstein@contec.at>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: patches@opensource.cirrus.com

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

* [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

These are all fairly small platforms by now, and they are
closely related. Just move them all into a single directory.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 MAINTAINERS                                   |   3 -
 arch/arm/Kconfig                              |   6 -
 arch/arm/Makefile                             |   7 +-
 arch/arm/mach-integrator/Kconfig              | 125 -------
 arch/arm/mach-integrator/Makefile             |  10 -
 arch/arm/mach-realview/Kconfig                | 103 ------
 arch/arm/mach-realview/Makefile               |   8 -
 arch/arm/mach-versatile/Kconfig               | 308 ++++++++++++++++++
 arch/arm/mach-versatile/Makefile              |  32 +-
 .../Makefile.boot                             |   0
 .../{mach-vexpress => mach-versatile}/dcscb.c |   4 +-
 .../dcscb_setup.S                             |   2 -
 .../headsmp.S                                 |   2 -
 .../hotplug.c                                 |   2 +-
 .../cm.h => mach-versatile/integrator-cm.h}   |   0
 .../integrator-hardware.h}                    |   0
 .../core.c => mach-versatile/integrator.c}    |   8 +-
 .../common.h => mach-versatile/integrator.h}  |   0
 .../integrator_ap.c                           |   8 +-
 .../integrator_cp.c                           |   8 +-
 .../platsmp-realview.c}                       |   2 +-
 .../platsmp-vexpress.c}                       |   7 +-
 .../platsmp.c                                 |   4 +-
 .../include/plat => mach-versatile}/platsmp.h |   2 -
 .../realview.c}                               |   0
 .../{mach-vexpress => mach-versatile}/spc.c   |   0
 .../{mach-vexpress => mach-versatile}/spc.h   |   0
 .../tc2_pm.c                                  |   2 -
 .../v2m-mps2.c                                |   0
 .../{mach-vexpress => mach-versatile}/v2m.c   |   2 +-
 .../{versatile_dt.c => versatile.c}           |   0
 .../core.h => mach-versatile/vexpress.h}      |   0
 arch/arm/mach-vexpress/Kconfig                |  81 -----
 arch/arm/mach-vexpress/Makefile               |  19 --
 arch/arm/plat-versatile/Makefile              |   5 -
 35 files changed, 357 insertions(+), 403 deletions(-)
 delete mode 100644 arch/arm/mach-integrator/Kconfig
 delete mode 100644 arch/arm/mach-integrator/Makefile
 delete mode 100644 arch/arm/mach-realview/Kconfig
 delete mode 100644 arch/arm/mach-realview/Makefile
 rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
 rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
 rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
 rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
 rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
 rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
 rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
 rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
 rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
 rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
 rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
 rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
 rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
 rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
 delete mode 100644 arch/arm/mach-vexpress/Kconfig
 delete mode 100644 arch/arm/mach-vexpress/Makefile
 delete mode 100644 arch/arm/plat-versatile/Makefile

diff --git a/MAINTAINERS b/MAINTAINERS
index fd768d43e048..6a0363b0f106 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1525,10 +1525,7 @@ F:	Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
 F:	arch/arm/boot/dts/arm-realview-*
 F:	arch/arm/boot/dts/integrator*
 F:	arch/arm/boot/dts/versatile*
-F:	arch/arm/mach-integrator/
-F:	arch/arm/mach-realview/
 F:	arch/arm/mach-versatile/
-F:	arch/arm/plat-versatile/
 F:	drivers/bus/arm-integrator-lm.c
 F:	drivers/clk/versatile/
 F:	drivers/i2c/busses/i2c-versatile.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e8091e2d8a8..31f024e6e925 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -622,8 +622,6 @@ source "arch/arm/mach-hisi/Kconfig"
 
 source "arch/arm/mach-imx/Kconfig"
 
-source "arch/arm/mach-integrator/Kconfig"
-
 source "arch/arm/mach-iop32x/Kconfig"
 
 source "arch/arm/mach-ixp4xx/Kconfig"
@@ -675,8 +673,6 @@ source "arch/arm/mach-rda/Kconfig"
 
 source "arch/arm/mach-realtek/Kconfig"
 
-source "arch/arm/mach-realview/Kconfig"
-
 source "arch/arm/mach-rockchip/Kconfig"
 
 source "arch/arm/mach-s3c/Kconfig"
@@ -705,8 +701,6 @@ source "arch/arm/mach-ux500/Kconfig"
 
 source "arch/arm/mach-versatile/Kconfig"
 
-source "arch/arm/mach-vexpress/Kconfig"
-
 source "arch/arm/mach-vt8500/Kconfig"
 
 source "arch/arm/mach-zynq/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a2391b8de5a5..8740e3a63afb 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -179,7 +179,6 @@ machine-$(CONFIG_ARCH_FOOTBRIDGE)	+= footbridge
 machine-$(CONFIG_ARCH_GEMINI)		+= gemini
 machine-$(CONFIG_ARCH_HIGHBANK)		+= highbank
 machine-$(CONFIG_ARCH_HISI)		+= hisi
-machine-$(CONFIG_ARCH_INTEGRATOR)	+= integrator
 machine-$(CONFIG_ARCH_IOP32X)		+= iop32x
 machine-$(CONFIG_ARCH_IXP4XX)		+= ixp4xx
 machine-$(CONFIG_ARCH_KEYSTONE)		+= keystone
@@ -187,7 +186,6 @@ machine-$(CONFIG_ARCH_LPC18XX)		+= lpc18xx
 machine-$(CONFIG_ARCH_LPC32XX)		+= lpc32xx
 machine-$(CONFIG_ARCH_MESON)		+= meson
 machine-$(CONFIG_ARCH_MMP)		+= mmp
-machine-$(CONFIG_ARCH_MPS2)		+= vexpress
 machine-$(CONFIG_ARCH_MOXART)		+= moxart
 machine-$(CONFIG_ARCH_MV78XX0)		+= mv78xx0
 machine-$(CONFIG_ARCH_MVEBU)		+= mvebu
@@ -207,7 +205,6 @@ machine-$(CONFIG_ARCH_PXA)		+= pxa
 machine-$(CONFIG_ARCH_QCOM)		+= qcom
 machine-$(CONFIG_ARCH_RDA)		+= rda
 machine-$(CONFIG_ARCH_REALTEK)		+= realtek
-machine-$(CONFIG_ARCH_REALVIEW)		+= realview
 machine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
 machine-$(CONFIG_ARCH_RPC)		+= rpc
 machine-$(CONFIG_PLAT_SAMSUNG)		+= s3c
@@ -220,10 +217,9 @@ machine-$(CONFIG_ARCH_STM32)		+= stm32
 machine-$(CONFIG_ARCH_SUNXI)		+= sunxi
 machine-$(CONFIG_ARCH_TEGRA)		+= tegra
 machine-$(CONFIG_ARCH_U8500)		+= ux500
-machine-$(CONFIG_ARCH_VERSATILE)	+= versatile
-machine-$(CONFIG_ARCH_VEXPRESS)		+= vexpress
 machine-$(CONFIG_ARCH_VT8500)		+= vt8500
 machine-$(CONFIG_ARCH_ZYNQ)		+= zynq
+machine-$(CONFIG_PLAT_VERSATILE)	+= versatile
 machine-$(CONFIG_PLAT_SPEAR)		+= spear
 
 # Platform directory name.  This list is sorted alphanumerically
@@ -231,7 +227,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
-plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
 # The byte offset of the kernel image in RAM from the start of RAM.
 TEXT_OFFSET := $(textofs-y)
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
deleted file mode 100644
index d61ea616cf8e..000000000000
--- a/arch/arm/mach-integrator/Kconfig
+++ /dev/null
@@ -1,125 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_INTEGRATOR
-	bool "ARM Ltd. Integrator family"
-	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
-	select ARM_AMBA
-	select CMA
-	select DMA_CMA
-	select HAVE_TCM
-	select CLK_ICST
-	select MFD_SYSCON
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VERSATILE
-	select POWER_SUPPLY
-	select SOC_INTEGRATOR_CM
-	select VERSATILE_FPGA_IRQ
-	help
-	  Support for ARM's Integrator platform.
-
-if ARCH_INTEGRATOR
-
-config ARCH_INTEGRATOR_AP
-	bool "Support Integrator/AP and Integrator/PP2 platforms"
-	select INTEGRATOR_AP_TIMER
-	select SERIAL_AMBA_PL010 if TTY
-	select SERIAL_AMBA_PL010_CONSOLE if TTY
-	select SOC_BUS
-	help
-	  Include support for the ARM(R) Integrator/AP and
-	  Integrator/PP2 platforms.
-
-config INTEGRATOR_IMPD1
-	bool "Include support for Integrator/IM-PD1"
-	depends on ARCH_INTEGRATOR_AP
-	select ARM_VIC
-	select GPIO_PL061
-	select GPIOLIB
-	select REGULATOR
-	select REGULATOR_FIXED_VOLTAGE
-	help
-	  The IM-PD1 is an add-on logic module for the Integrator which
-	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
-	  The IM-PD1 can be found on the Integrator/PP2 platform.
-
-config INTEGRATOR_CM720T
-	bool "Integrator/CM720T core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V4T
-	select CPU_ARM720T
-
-config INTEGRATOR_CM920T
-	bool "Integrator/CM920T core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V4T
-	select CPU_ARM920T
-
-config INTEGRATOR_CM922T_XA10
-	bool "Integrator/CM922T-XA10 core module"
-	depends on ARCH_MULTI_V4T
-	depends on ARCH_INTEGRATOR_AP
-	select CPU_ARM922T
-
-config INTEGRATOR_CM926EJS
-	bool "Integrator/CM926EJ-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM926T
-
-config INTEGRATOR_CM10200E_REV0
-	bool "Integrator/CM10200E rev.0 core module"
-	depends on ARCH_INTEGRATOR_AP && n
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1020
-
-config INTEGRATOR_CM10200E
-	bool "Integrator/CM10200E core module"
-	depends on ARCH_INTEGRATOR_AP && n
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1020E
-
-config INTEGRATOR_CM10220E
-	bool "Integrator/CM10220E core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1022
-
-config INTEGRATOR_CM1026EJS
-	bool "Integrator/CM1026EJ-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1026
-
-config INTEGRATOR_CM1136JFS
-	bool "Integrator/CM1136JF-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-
-config ARCH_INTEGRATOR_CP
-	bool "Support Integrator/CP platform"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
-	select ARM_TIMER_SP804
-	select SERIAL_AMBA_PL011 if TTY
-	select SERIAL_AMBA_PL011_CONSOLE if TTY
-	select SOC_BUS
-	help
-	  Include support for the ARM(R) Integrator CP platform.
-
-config INTEGRATOR_CT926
-	bool "Integrator/CT926 (ARM926EJ-S) core tile"
-	depends on ARCH_INTEGRATOR_CP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM926T
-
-config INTEGRATOR_CTB36
-	bool "Integrator/CTB36 (ARM1136JF-S) core tile"
-	depends on ARCH_INTEGRATOR_CP
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-
-config ARCH_CINTEGRATOR
-	depends on ARCH_INTEGRATOR_CP
-	def_bool y
-
-endif
diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile
deleted file mode 100644
index 7857a55c90b0..000000000000
--- a/arch/arm/mach-integrator/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y					:= core.o
-obj-$(CONFIG_ARCH_INTEGRATOR_AP)	+= integrator_ap.o
-obj-$(CONFIG_ARCH_INTEGRATOR_CP)	+= integrator_cp.o
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
deleted file mode 100644
index a4c36024b5e8..000000000000
--- a/arch/arm/mach-realview/Kconfig
+++ /dev/null
@@ -1,103 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_REALVIEW
-	bool "ARM Ltd. RealView family"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
-	select ARM_AMBA
-	select ARM_GIC
-	select ARM_TIMER_SP804
-	select CLK_SP810
-	select GPIO_PL061 if GPIOLIB
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select HAVE_PATA_PLATFORM
-	select HAVE_TCM
-	select CLK_ICST
-	select MACH_REALVIEW_EB if ARCH_MULTI_V5
-	select MFD_SYSCON
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VERSATILE
-	select POWER_SUPPLY
-	select SOC_REALVIEW
-	help
-	  This enables support for ARM Ltd RealView boards.
-
-if ARCH_REALVIEW
-
-config MACH_REALVIEW_EB
-	bool "Support RealView(R) Emulation Baseboard"
-	select ARM_GIC
-	select CPU_ARM926T if ARCH_MULTI_V5
-	help
-	  Include support for the ARM(R) RealView(R) Emulation Baseboard
-	  platform. On an ARMv5 kernel, this will include support for
-	  the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
-	  one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
-	  core tile options should be enabled.
-
-config REALVIEW_EB_ARM1136
-	bool "Support ARM1136J(F)-S Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	select CPU_V6
-	help
-	  Enable support for the ARM1136 tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM1176
-	bool "Support ARM1176JZ(F)-S Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	help
-	  Enable support for the ARM1176 tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_A9MP
-	bool "Support Multicore Cortex-A9 Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
-	help
-	  Enable support for the Cortex-A9MPCore tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM11MP
-	bool "Support ARM11MPCore Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	select HAVE_SMP
-	help
-	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
-	  Emulation Baseboard platform.
-
-config MACH_REALVIEW_PB11MP
-	bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
-	depends on ARCH_MULTI_V6
-	select HAVE_SMP
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard for
-	  the ARM11MPCore.  This platform has an on-board ARM11MPCore and has
-	  support for PCI-E and Compact Flash.
-
-# ARMv6 CPU without K extensions, but does have the new exclusive ops
-config MACH_REALVIEW_PB1176
-	bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-	select HAVE_TCM
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard for
-	  ARM1176JZF-S.
-
-config MACH_REALVIEW_PBA8
-	bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
-	depends on ARCH_MULTI_V7
-	help
-	  Include support for the ARM(R) RealView Platform Baseboard for
-	  Cortex(tm)-A8.  This platform has an on-board Cortex-A8 and has
-	  support for PCI-E and Compact Flash.
-
-config MACH_REALVIEW_PBX
-	bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
-	depends on ARCH_MULTI_V7
-	select ZONE_DMA
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard
-	  Explore.
-
-endif
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile
deleted file mode 100644
index e259091591b8..000000000000
--- a/arch/arm/mach-realview/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-versatile/include
-
-obj-y					+= realview-dt.o
-obj-$(CONFIG_SMP)			+= platsmp-dt.o
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index f78a1d358031..94b492c12e8d 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -16,3 +16,311 @@ config ARCH_VERSATILE
 	help
 	  This enables support for ARM Ltd Versatile board.
 
+menuconfig ARCH_INTEGRATOR
+	bool "ARM Ltd. Integrator family"
+	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
+	select ARM_AMBA
+	select CMA
+	select DMA_CMA
+	select HAVE_TCM
+	select CLK_ICST
+	select MFD_SYSCON
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VERSATILE
+	select POWER_SUPPLY
+	select SOC_INTEGRATOR_CM
+	select VERSATILE_FPGA_IRQ
+	help
+	  Support for ARM's Integrator platform.
+
+if ARCH_INTEGRATOR
+
+config ARCH_INTEGRATOR_AP
+	bool "Support Integrator/AP and Integrator/PP2 platforms"
+	select INTEGRATOR_AP_TIMER
+	select SERIAL_AMBA_PL010 if TTY
+	select SERIAL_AMBA_PL010_CONSOLE if TTY
+	select SOC_BUS
+	help
+	  Include support for the ARM(R) Integrator/AP and
+	  Integrator/PP2 platforms.
+
+config INTEGRATOR_IMPD1
+	bool "Include support for Integrator/IM-PD1"
+	depends on ARCH_INTEGRATOR_AP
+	select ARM_VIC
+	select GPIO_PL061
+	select GPIOLIB
+	select REGULATOR
+	select REGULATOR_FIXED_VOLTAGE
+	help
+	  The IM-PD1 is an add-on logic module for the Integrator which
+	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
+	  The IM-PD1 can be found on the Integrator/PP2 platform.
+
+config INTEGRATOR_CM720T
+	bool "Integrator/CM720T core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V4T
+	select CPU_ARM720T
+
+config INTEGRATOR_CM920T
+	bool "Integrator/CM920T core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V4T
+	select CPU_ARM920T
+
+config INTEGRATOR_CM922T_XA10
+	bool "Integrator/CM922T-XA10 core module"
+	depends on ARCH_MULTI_V4T
+	depends on ARCH_INTEGRATOR_AP
+	select CPU_ARM922T
+
+config INTEGRATOR_CM926EJS
+	bool "Integrator/CM926EJ-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM926T
+
+config INTEGRATOR_CM10200E_REV0
+	bool "Integrator/CM10200E rev.0 core module"
+	depends on ARCH_INTEGRATOR_AP && n
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1020
+
+config INTEGRATOR_CM10200E
+	bool "Integrator/CM10200E core module"
+	depends on ARCH_INTEGRATOR_AP && n
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1020E
+
+config INTEGRATOR_CM10220E
+	bool "Integrator/CM10220E core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1022
+
+config INTEGRATOR_CM1026EJS
+	bool "Integrator/CM1026EJ-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1026
+
+config INTEGRATOR_CM1136JFS
+	bool "Integrator/CM1136JF-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+
+config ARCH_INTEGRATOR_CP
+	bool "Support Integrator/CP platform"
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
+	select ARM_TIMER_SP804
+	select SERIAL_AMBA_PL011 if TTY
+	select SERIAL_AMBA_PL011_CONSOLE if TTY
+	select SOC_BUS
+	help
+	  Include support for the ARM(R) Integrator CP platform.
+
+config INTEGRATOR_CT926
+	bool "Integrator/CT926 (ARM926EJ-S) core tile"
+	depends on ARCH_INTEGRATOR_CP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM926T
+
+config INTEGRATOR_CTB36
+	bool "Integrator/CTB36 (ARM1136JF-S) core tile"
+	depends on ARCH_INTEGRATOR_CP
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+
+config ARCH_CINTEGRATOR
+	depends on ARCH_INTEGRATOR_CP
+	def_bool y
+
+endif
+
+menuconfig ARCH_REALVIEW
+	bool "ARM Ltd. RealView family"
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	select ARM_AMBA
+	select ARM_GIC
+	select ARM_TIMER_SP804
+	select CLK_SP810
+	select GPIO_PL061 if GPIOLIB
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if SMP
+	select HAVE_PATA_PLATFORM
+	select HAVE_TCM
+	select CLK_ICST
+	select MACH_REALVIEW_EB if ARCH_MULTI_V5
+	select MFD_SYSCON
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VERSATILE
+	select POWER_SUPPLY
+	select SOC_REALVIEW
+	help
+	  This enables support for ARM Ltd RealView boards.
+
+if ARCH_REALVIEW
+
+config MACH_REALVIEW_EB
+	bool "Support RealView(R) Emulation Baseboard"
+	select ARM_GIC
+	select CPU_ARM926T if ARCH_MULTI_V5
+	help
+	  Include support for the ARM(R) RealView(R) Emulation Baseboard
+	  platform. On an ARMv5 kernel, this will include support for
+	  the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
+	  one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
+	  core tile options should be enabled.
+
+config REALVIEW_EB_ARM1136
+	bool "Support ARM1136J(F)-S Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	select CPU_V6
+	help
+	  Enable support for the ARM1136 tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM1176
+	bool "Support ARM1176JZ(F)-S Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	help
+	  Enable support for the ARM1176 tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_A9MP
+	bool "Support Multicore Cortex-A9 Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
+	help
+	  Enable support for the Cortex-A9MPCore tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM11MP
+	bool "Support ARM11MPCore Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	select HAVE_SMP
+	help
+	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
+	  Emulation Baseboard platform.
+
+config MACH_REALVIEW_PB11MP
+	bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
+	depends on ARCH_MULTI_V6
+	select HAVE_SMP
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard for
+	  the ARM11MPCore.  This platform has an on-board ARM11MPCore and has
+	  support for PCI-E and Compact Flash.
+
+# ARMv6 CPU without K extensions, but does have the new exclusive ops
+config MACH_REALVIEW_PB1176
+	bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+	select HAVE_TCM
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard for
+	  ARM1176JZF-S.
+
+config MACH_REALVIEW_PBA8
+	bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
+	depends on ARCH_MULTI_V7
+	help
+	  Include support for the ARM(R) RealView Platform Baseboard for
+	  Cortex(tm)-A8.  This platform has an on-board Cortex-A8 and has
+	  support for PCI-E and Compact Flash.
+
+config MACH_REALVIEW_PBX
+	bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
+	depends on ARCH_MULTI_V7
+	select ZONE_DMA
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard
+	  Explore.
+
+endif
+
+menuconfig ARCH_VEXPRESS
+	bool "ARM Ltd. Versatile Express family"
+	depends on ARCH_MULTI_V7
+	select ARCH_SUPPORTS_BIG_ENDIAN
+	select ARM_AMBA
+	select ARM_GIC
+	select ARM_GLOBAL_TIMER
+	select ARM_TIMER_SP804
+	select GPIOLIB
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if SMP
+	select HAVE_PATA_PLATFORM
+	select CLK_ICST
+	select NO_IOPORT_MAP
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VEXPRESS
+	select POWER_SUPPLY
+	select REGULATOR if MMC_ARMMMCI
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select VEXPRESS_CONFIG
+	help
+	  This option enables support for systems using Cortex processor based
+	  ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
+	  for example:
+
+	  - CoreTile Express A5x2 (V2P-CA5s)
+	  - CoreTile Express A9x4 (V2P-CA9)
+	  - CoreTile Express A15x2 (V2P-CA15)
+	  - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
+	    (Soft Macrocell Models)
+	  - Versatile Express RTSMs (Models)
+
+	  You must boot using a Flattened Device Tree in order to use these
+	  platforms. The traditional (ATAGs) boot method is not usable on
+	  these boards with this option.
+
+if ARCH_VEXPRESS
+
+config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
+	bool "Enable A5 and A9 only errata work-arounds"
+	default y
+	select ARM_ERRATA_643719 if SMP
+	select ARM_ERRATA_720789
+	select PL310_ERRATA_753970 if CACHE_L2X0
+	help
+	  Provides common dependencies for Versatile Express platforms
+	  based on Cortex-A5 and Cortex-A9 processors. In order to
+	  build a working kernel, you must also enable relevant core
+	  tile support or Flattened Device Tree based support options.
+
+config ARCH_VEXPRESS_DCSCB
+	bool "Dual Cluster System Control Block (DCSCB) support"
+	depends on MCPM
+	select ARM_CCI400_PORT_CTRL
+	help
+	  Support for the Dual Cluster System Configuration Block (DCSCB).
+	  This is needed to provide CPU and cluster power management
+	  on RTSM implementing big.LITTLE.
+
+config ARCH_VEXPRESS_SPC
+	bool "Versatile Express Serial Power Controller (SPC)"
+	select PM_OPP
+	help
+	  The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
+	  block called Serial Power Controller (SPC) that provides the interface
+	  between the dual cluster test-chip and the M3 microcontroller that
+	  carries out power management.
+
+config ARCH_VEXPRESS_TC2_PM
+	bool "Versatile Express TC2 power management"
+	depends on MCPM
+	select ARM_CCI400_PORT_CTRL
+	select ARCH_VEXPRESS_SPC
+	select ARM_CPU_SUSPEND
+	help
+	  Support for CPU and cluster power management on Versatile Express
+	  with a TC2 (A15x2 A7x3) big.LITTLE core tile.
+
+endif
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile
index 2b907718d467..27d712bcf1af 100644
--- a/arch/arm/mach-versatile/Makefile
+++ b/arch/arm/mach-versatile/Makefile
@@ -3,4 +3,34 @@
 # Makefile for the linux kernel.
 #
 
-obj-y					:= versatile_dt.o
+# versatile
+obj-$(CONFIG_ARCH_VERSATILE)		+= versatile.o
+
+# integrator
+obj-$(CONFIG_ARCH_INTEGRATOR)		+= integrator.o
+obj-$(CONFIG_ARCH_INTEGRATOR_AP)	+= integrator_ap.o
+obj-$(CONFIG_ARCH_INTEGRATOR_CP)	+= integrator_cp.o
+
+# realview
+obj-$(CONFIG_ARCH_REALVIEW)		+= realview.o
+
+# vexpress
+obj-$(CONFIG_ARCH_VEXPRESS)		:= v2m.o
+obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
+CFLAGS_dcscb.o				+= -march=armv7-a
+CFLAGS_REMOVE_dcscb.o			= -pg
+obj-$(CONFIG_ARCH_VEXPRESS_SPC)		+= spc.o
+CFLAGS_REMOVE_spc.o			= -pg
+obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o
+CFLAGS_tc2_pm.o				+= -march=armv7-a
+CFLAGS_REMOVE_tc2_pm.o			= -pg
+
+# mps2
+obj-$(CONFIG_ARCH_MPS2)			+= v2m-mps2.o
+
+ifdef CONFIG_SMP
+obj-y					+= headsmp.o platsmp.o
+obj-$(CONFIG_ARCH_REALVIEW)		+= platsmp-realview.o
+obj-$(CONFIG_ARCH_VEXPRESS)		+= platsmp-vexpress.o
+obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
+endif
diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
similarity index 100%
rename from arch/arm/mach-vexpress/Makefile.boot
rename to arch/arm/mach-versatile/Makefile.boot
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-versatile/dcscb.c
similarity index 97%
rename from arch/arm/mach-vexpress/dcscb.c
rename to arch/arm/mach-versatile/dcscb.c
index a0554d7d04f7..866270e7f271 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-versatile/dcscb.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * arch/arm/mach-vexpress/dcscb.c - Dual Cluster System Configuration Block
+ * dcscb.c - Dual Cluster System Configuration Block
  *
  * Created by:	Nicolas Pitre, May 2012
  * Copyright:	(C) 2012-2013  Linaro Limited
@@ -20,7 +20,7 @@
 #include <asm/cputype.h>
 #include <asm/cp15.h>
 
-#include "core.h"
+#include "vexpress.h"
 
 #define RST_HOLD0	0x0
 #define RST_HOLD1	0x4
diff --git a/arch/arm/mach-vexpress/dcscb_setup.S b/arch/arm/mach-versatile/dcscb_setup.S
similarity index 95%
rename from arch/arm/mach-vexpress/dcscb_setup.S
rename to arch/arm/mach-versatile/dcscb_setup.S
index 0614b2ebd354..92d1fd9d7f6a 100644
--- a/arch/arm/mach-vexpress/dcscb_setup.S
+++ b/arch/arm/mach-versatile/dcscb_setup.S
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * arch/arm/include/asm/dcscb_setup.S
- *
  * Created by:  Dave Martin, 2012-06-22
  * Copyright:   (C) 2012-2013  Linaro Limited
  */
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/mach-versatile/headsmp.S
similarity index 94%
rename from arch/arm/plat-versatile/headsmp.S
rename to arch/arm/mach-versatile/headsmp.S
index 09d9fc30c8ca..99c32db412ae 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/mach-versatile/headsmp.S
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- *  linux/arch/arm/plat-versatile/headsmp.S
- *
  *  Copyright (c) 2003 ARM Limited
  *  All Rights Reserved
  */
diff --git a/arch/arm/plat-versatile/hotplug.c b/arch/arm/mach-versatile/hotplug.c
similarity index 98%
rename from arch/arm/plat-versatile/hotplug.c
rename to arch/arm/mach-versatile/hotplug.c
index 2e9dca38bec0..5a152175578b 100644
--- a/arch/arm/plat-versatile/hotplug.c
+++ b/arch/arm/mach-versatile/hotplug.c
@@ -15,7 +15,7 @@
 #include <asm/smp_plat.h>
 #include <asm/cp15.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 static inline void versatile_immitation_enter_lowpower(unsigned int actrl_mask)
 {
diff --git a/arch/arm/mach-integrator/cm.h b/arch/arm/mach-versatile/integrator-cm.h
similarity index 100%
rename from arch/arm/mach-integrator/cm.h
rename to arch/arm/mach-versatile/integrator-cm.h
diff --git a/arch/arm/mach-integrator/hardware.h b/arch/arm/mach-versatile/integrator-hardware.h
similarity index 100%
rename from arch/arm/mach-integrator/hardware.h
rename to arch/arm/mach-versatile/integrator-hardware.h
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-versatile/integrator.c
similarity index 95%
rename from arch/arm/mach-integrator/core.c
rename to arch/arm/mach-versatile/integrator.c
index 0fe5e1dc9d89..fdf9c4db08a7 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-versatile/integrator.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-integrator/core.c
- *
  *  Copyright (C) 2000-2003 Deep Blue Solutions Ltd
  */
 #include <linux/types.h>
@@ -26,9 +24,9 @@
 #include <asm/mach-types.h>
 #include <asm/mach/time.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 static DEFINE_RAW_SPINLOCK(cm_lock);
 static void __iomem *cm_base;
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-versatile/integrator.h
similarity index 100%
rename from arch/arm/mach-integrator/common.h
rename to arch/arm/mach-versatile/integrator.h
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c
similarity index 97%
rename from arch/arm/mach-integrator/integrator_ap.c
rename to arch/arm/mach-versatile/integrator_ap.c
index 58b02cbbea72..44a69cc69376 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-versatile/integrator_ap.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- *  linux/arch/arm/mach-integrator/integrator_ap.c
- *
  *  Copyright (C) 2000-2003 Deep Blue Solutions Ltd
  */
 #include <linux/kernel.h>
@@ -20,9 +18,9 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 /* Regmap to the AP system controller */
 static struct regmap *ap_syscon_map;
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-versatile/integrator_cp.c
similarity index 96%
rename from arch/arm/mach-integrator/integrator_cp.c
rename to arch/arm/mach-versatile/integrator_cp.c
index b7eb4038798b..2ed4ded56b3f 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-versatile/integrator_cp.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-integrator/integrator_cp.c
- *
  *  Copyright (C) 2003 Deep Blue Solutions Ltd
  */
 #include <linux/kernel.h>
@@ -18,9 +16,9 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 /* Base address to the core module header */
 static struct regmap *cm_map;
diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-versatile/platsmp-realview.c
similarity index 98%
rename from arch/arm/mach-realview/platsmp-dt.c
rename to arch/arm/mach-versatile/platsmp-realview.c
index 5ae783767a5d..5d363385c801 100644
--- a/arch/arm/mach-realview/platsmp-dt.c
+++ b/arch/arm/mach-versatile/platsmp-realview.c
@@ -13,7 +13,7 @@
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 #define REALVIEW_SYS_FLAGSSET_OFFSET	0x30
 
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-versatile/platsmp-vexpress.c
similarity index 96%
rename from arch/arm/mach-vexpress/platsmp.c
rename to arch/arm/mach-versatile/platsmp-vexpress.c
index 99c93124aa68..1ee3c45e71c9 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp-vexpress.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-vexpress/platsmp.c
- *
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  */
@@ -16,9 +14,8 @@
 #include <asm/smp_scu.h>
 #include <asm/mach/map.h>
 
-#include <plat/platsmp.h>
-
-#include "core.h"
+#include "platsmp.h"
+#include "vexpress.h"
 
 bool __init vexpress_smp_init_ops(void)
 {
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/mach-versatile/platsmp.c
similarity index 97%
rename from arch/arm/plat-versatile/platsmp.c
rename to arch/arm/mach-versatile/platsmp.c
index 3567296cec2a..fa7378321e23 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/plat-versatile/platsmp.c
- *
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  *
@@ -20,7 +18,7 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 /*
  * versatile_cpu_release controls the release of CPUs from the holding
diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/mach-versatile/platsmp.h
similarity index 87%
rename from arch/arm/plat-versatile/include/plat/platsmp.h
rename to arch/arm/mach-versatile/platsmp.h
index 500605f48b80..171a0ab72220 100644
--- a/arch/arm/plat-versatile/include/plat/platsmp.h
+++ b/arch/arm/mach-versatile/platsmp.h
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- *  linux/arch/arm/plat-versatile/include/plat/platsmp.h
- *
  *  Copyright (C) 2011 ARM Ltd.
  *  All Rights Reserved
  */
diff --git a/arch/arm/mach-realview/realview-dt.c b/arch/arm/mach-versatile/realview.c
similarity index 100%
rename from arch/arm/mach-realview/realview-dt.c
rename to arch/arm/mach-versatile/realview.c
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-versatile/spc.c
similarity index 100%
rename from arch/arm/mach-vexpress/spc.c
rename to arch/arm/mach-versatile/spc.c
diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-versatile/spc.h
similarity index 100%
rename from arch/arm/mach-vexpress/spc.h
rename to arch/arm/mach-versatile/spc.h
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-versatile/tc2_pm.c
similarity index 99%
rename from arch/arm/mach-vexpress/tc2_pm.c
rename to arch/arm/mach-versatile/tc2_pm.c
index e96c42ae3602..0fe78da0c109 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-versatile/tc2_pm.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * arch/arm/mach-vexpress/tc2_pm.c - TC2 power management support
- *
  * Created by:	Nicolas Pitre, October 2012
  * Copyright:	(C) 2012-2013  Linaro Limited
  *
diff --git a/arch/arm/mach-vexpress/v2m-mps2.c b/arch/arm/mach-versatile/v2m-mps2.c
similarity index 100%
rename from arch/arm/mach-vexpress/v2m-mps2.c
rename to arch/arm/mach-versatile/v2m-mps2.c
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-versatile/v2m.c
similarity index 97%
rename from arch/arm/mach-vexpress/v2m.c
rename to arch/arm/mach-versatile/v2m.c
index ffe7c7a85ae9..79afdf2a90b6 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-versatile/v2m.c
@@ -3,7 +3,7 @@
 #include <linux/of_address.h>
 #include <asm/mach/arch.h>
 
-#include "core.h"
+#include "vexpress.h"
 
 #define SYS_FLAGSSET		0x030
 #define SYS_FLAGSCLR		0x034
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile.c
similarity index 100%
rename from arch/arm/mach-versatile/versatile_dt.c
rename to arch/arm/mach-versatile/versatile.c
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-versatile/vexpress.h
similarity index 100%
rename from arch/arm/mach-vexpress/core.h
rename to arch/arm/mach-versatile/vexpress.h
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
deleted file mode 100644
index 2e6aff5a0f17..000000000000
--- a/arch/arm/mach-vexpress/Kconfig
+++ /dev/null
@@ -1,81 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-menuconfig ARCH_VEXPRESS
-	bool "ARM Ltd. Versatile Express family"
-	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
-	select ARM_AMBA
-	select ARM_GIC
-	select ARM_GLOBAL_TIMER
-	select ARM_TIMER_SP804
-	select GPIOLIB
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select HAVE_PATA_PLATFORM
-	select CLK_ICST
-	select NO_IOPORT_MAP
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VEXPRESS
-	select POWER_SUPPLY
-	select REGULATOR if MMC_ARMMMCI
-	select REGULATOR_FIXED_VOLTAGE if REGULATOR
-	select VEXPRESS_CONFIG
-	help
-	  This option enables support for systems using Cortex processor based
-	  ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
-	  for example:
-
-	  - CoreTile Express A5x2 (V2P-CA5s)
-	  - CoreTile Express A9x4 (V2P-CA9)
-	  - CoreTile Express A15x2 (V2P-CA15)
-	  - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
-	    (Soft Macrocell Models)
-	  - Versatile Express RTSMs (Models)
-
-	  You must boot using a Flattened Device Tree in order to use these
-	  platforms. The traditional (ATAGs) boot method is not usable on
-	  these boards with this option.
-
-if ARCH_VEXPRESS
-
-config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
-	bool "Enable A5 and A9 only errata work-arounds"
-	default y
-	select ARM_ERRATA_643719 if SMP
-	select ARM_ERRATA_720789
-	select PL310_ERRATA_753970 if CACHE_L2X0
-	help
-	  Provides common dependencies for Versatile Express platforms
-	  based on Cortex-A5 and Cortex-A9 processors. In order to
-	  build a working kernel, you must also enable relevant core
-	  tile support or Flattened Device Tree based support options.
-
-config ARCH_VEXPRESS_DCSCB
-	bool "Dual Cluster System Control Block (DCSCB) support"
-	depends on MCPM
-	select ARM_CCI400_PORT_CTRL
-	help
-	  Support for the Dual Cluster System Configuration Block (DCSCB).
-	  This is needed to provide CPU and cluster power management
-	  on RTSM implementing big.LITTLE.
-
-config ARCH_VEXPRESS_SPC
-	bool "Versatile Express Serial Power Controller (SPC)"
-	select PM_OPP
-	help
-	  The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
-	  block called Serial Power Controller (SPC) that provides the interface
-	  between the dual cluster test-chip and the M3 microcontroller that
-	  carries out power management.
-
-config ARCH_VEXPRESS_TC2_PM
-	bool "Versatile Express TC2 power management"
-	depends on MCPM
-	select ARM_CCI400_PORT_CTRL
-	select ARCH_VEXPRESS_SPC
-	select ARM_CPU_SUSPEND
-	help
-	  Support for CPU and cluster power management on Versatile Express
-	  with a TC2 (A15x2 A7x3) big.LITTLE core tile.
-
-endif
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
deleted file mode 100644
index 3651a1ed0f2b..000000000000
--- a/arch/arm/mach-vexpress/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := \
-	-I$(srctree)/arch/arm/plat-versatile/include
-
-obj-$(CONFIG_ARCH_VEXPRESS)		:= v2m.o
-obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
-CFLAGS_dcscb.o				+= -march=armv7-a
-CFLAGS_REMOVE_dcscb.o			= -pg
-obj-$(CONFIG_ARCH_VEXPRESS_SPC)		+= spc.o
-CFLAGS_REMOVE_spc.o			= -pg
-obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o
-CFLAGS_tc2_pm.o				+= -march=armv7-a
-CFLAGS_REMOVE_tc2_pm.o			= -pg
-obj-$(CONFIG_SMP)			+= platsmp.o
-
-obj-$(CONFIG_ARCH_MPS2)			+= v2m-mps2.o
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
deleted file mode 100644
index 5de44a57c4de..000000000000
--- a/arch/arm/plat-versatile/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
-
-obj-$(CONFIG_SMP) += headsmp.o platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

These are all fairly small platforms by now, and they are
closely related. Just move them all into a single directory.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 MAINTAINERS                                   |   3 -
 arch/arm/Kconfig                              |   6 -
 arch/arm/Makefile                             |   7 +-
 arch/arm/mach-integrator/Kconfig              | 125 -------
 arch/arm/mach-integrator/Makefile             |  10 -
 arch/arm/mach-realview/Kconfig                | 103 ------
 arch/arm/mach-realview/Makefile               |   8 -
 arch/arm/mach-versatile/Kconfig               | 308 ++++++++++++++++++
 arch/arm/mach-versatile/Makefile              |  32 +-
 .../Makefile.boot                             |   0
 .../{mach-vexpress => mach-versatile}/dcscb.c |   4 +-
 .../dcscb_setup.S                             |   2 -
 .../headsmp.S                                 |   2 -
 .../hotplug.c                                 |   2 +-
 .../cm.h => mach-versatile/integrator-cm.h}   |   0
 .../integrator-hardware.h}                    |   0
 .../core.c => mach-versatile/integrator.c}    |   8 +-
 .../common.h => mach-versatile/integrator.h}  |   0
 .../integrator_ap.c                           |   8 +-
 .../integrator_cp.c                           |   8 +-
 .../platsmp-realview.c}                       |   2 +-
 .../platsmp-vexpress.c}                       |   7 +-
 .../platsmp.c                                 |   4 +-
 .../include/plat => mach-versatile}/platsmp.h |   2 -
 .../realview.c}                               |   0
 .../{mach-vexpress => mach-versatile}/spc.c   |   0
 .../{mach-vexpress => mach-versatile}/spc.h   |   0
 .../tc2_pm.c                                  |   2 -
 .../v2m-mps2.c                                |   0
 .../{mach-vexpress => mach-versatile}/v2m.c   |   2 +-
 .../{versatile_dt.c => versatile.c}           |   0
 .../core.h => mach-versatile/vexpress.h}      |   0
 arch/arm/mach-vexpress/Kconfig                |  81 -----
 arch/arm/mach-vexpress/Makefile               |  19 --
 arch/arm/plat-versatile/Makefile              |   5 -
 35 files changed, 357 insertions(+), 403 deletions(-)
 delete mode 100644 arch/arm/mach-integrator/Kconfig
 delete mode 100644 arch/arm/mach-integrator/Makefile
 delete mode 100644 arch/arm/mach-realview/Kconfig
 delete mode 100644 arch/arm/mach-realview/Makefile
 rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
 rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
 rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
 rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
 rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
 rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
 rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
 rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
 rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
 rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
 rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
 rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
 rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
 rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
 rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
 rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
 rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
 delete mode 100644 arch/arm/mach-vexpress/Kconfig
 delete mode 100644 arch/arm/mach-vexpress/Makefile
 delete mode 100644 arch/arm/plat-versatile/Makefile

diff --git a/MAINTAINERS b/MAINTAINERS
index fd768d43e048..6a0363b0f106 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1525,10 +1525,7 @@ F:	Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
 F:	arch/arm/boot/dts/arm-realview-*
 F:	arch/arm/boot/dts/integrator*
 F:	arch/arm/boot/dts/versatile*
-F:	arch/arm/mach-integrator/
-F:	arch/arm/mach-realview/
 F:	arch/arm/mach-versatile/
-F:	arch/arm/plat-versatile/
 F:	drivers/bus/arm-integrator-lm.c
 F:	drivers/clk/versatile/
 F:	drivers/i2c/busses/i2c-versatile.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e8091e2d8a8..31f024e6e925 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -622,8 +622,6 @@ source "arch/arm/mach-hisi/Kconfig"
 
 source "arch/arm/mach-imx/Kconfig"
 
-source "arch/arm/mach-integrator/Kconfig"
-
 source "arch/arm/mach-iop32x/Kconfig"
 
 source "arch/arm/mach-ixp4xx/Kconfig"
@@ -675,8 +673,6 @@ source "arch/arm/mach-rda/Kconfig"
 
 source "arch/arm/mach-realtek/Kconfig"
 
-source "arch/arm/mach-realview/Kconfig"
-
 source "arch/arm/mach-rockchip/Kconfig"
 
 source "arch/arm/mach-s3c/Kconfig"
@@ -705,8 +701,6 @@ source "arch/arm/mach-ux500/Kconfig"
 
 source "arch/arm/mach-versatile/Kconfig"
 
-source "arch/arm/mach-vexpress/Kconfig"
-
 source "arch/arm/mach-vt8500/Kconfig"
 
 source "arch/arm/mach-zynq/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a2391b8de5a5..8740e3a63afb 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -179,7 +179,6 @@ machine-$(CONFIG_ARCH_FOOTBRIDGE)	+= footbridge
 machine-$(CONFIG_ARCH_GEMINI)		+= gemini
 machine-$(CONFIG_ARCH_HIGHBANK)		+= highbank
 machine-$(CONFIG_ARCH_HISI)		+= hisi
-machine-$(CONFIG_ARCH_INTEGRATOR)	+= integrator
 machine-$(CONFIG_ARCH_IOP32X)		+= iop32x
 machine-$(CONFIG_ARCH_IXP4XX)		+= ixp4xx
 machine-$(CONFIG_ARCH_KEYSTONE)		+= keystone
@@ -187,7 +186,6 @@ machine-$(CONFIG_ARCH_LPC18XX)		+= lpc18xx
 machine-$(CONFIG_ARCH_LPC32XX)		+= lpc32xx
 machine-$(CONFIG_ARCH_MESON)		+= meson
 machine-$(CONFIG_ARCH_MMP)		+= mmp
-machine-$(CONFIG_ARCH_MPS2)		+= vexpress
 machine-$(CONFIG_ARCH_MOXART)		+= moxart
 machine-$(CONFIG_ARCH_MV78XX0)		+= mv78xx0
 machine-$(CONFIG_ARCH_MVEBU)		+= mvebu
@@ -207,7 +205,6 @@ machine-$(CONFIG_ARCH_PXA)		+= pxa
 machine-$(CONFIG_ARCH_QCOM)		+= qcom
 machine-$(CONFIG_ARCH_RDA)		+= rda
 machine-$(CONFIG_ARCH_REALTEK)		+= realtek
-machine-$(CONFIG_ARCH_REALVIEW)		+= realview
 machine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
 machine-$(CONFIG_ARCH_RPC)		+= rpc
 machine-$(CONFIG_PLAT_SAMSUNG)		+= s3c
@@ -220,10 +217,9 @@ machine-$(CONFIG_ARCH_STM32)		+= stm32
 machine-$(CONFIG_ARCH_SUNXI)		+= sunxi
 machine-$(CONFIG_ARCH_TEGRA)		+= tegra
 machine-$(CONFIG_ARCH_U8500)		+= ux500
-machine-$(CONFIG_ARCH_VERSATILE)	+= versatile
-machine-$(CONFIG_ARCH_VEXPRESS)		+= vexpress
 machine-$(CONFIG_ARCH_VT8500)		+= vt8500
 machine-$(CONFIG_ARCH_ZYNQ)		+= zynq
+machine-$(CONFIG_PLAT_VERSATILE)	+= versatile
 machine-$(CONFIG_PLAT_SPEAR)		+= spear
 
 # Platform directory name.  This list is sorted alphanumerically
@@ -231,7 +227,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
-plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
 # The byte offset of the kernel image in RAM from the start of RAM.
 TEXT_OFFSET := $(textofs-y)
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
deleted file mode 100644
index d61ea616cf8e..000000000000
--- a/arch/arm/mach-integrator/Kconfig
+++ /dev/null
@@ -1,125 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_INTEGRATOR
-	bool "ARM Ltd. Integrator family"
-	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
-	select ARM_AMBA
-	select CMA
-	select DMA_CMA
-	select HAVE_TCM
-	select CLK_ICST
-	select MFD_SYSCON
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VERSATILE
-	select POWER_SUPPLY
-	select SOC_INTEGRATOR_CM
-	select VERSATILE_FPGA_IRQ
-	help
-	  Support for ARM's Integrator platform.
-
-if ARCH_INTEGRATOR
-
-config ARCH_INTEGRATOR_AP
-	bool "Support Integrator/AP and Integrator/PP2 platforms"
-	select INTEGRATOR_AP_TIMER
-	select SERIAL_AMBA_PL010 if TTY
-	select SERIAL_AMBA_PL010_CONSOLE if TTY
-	select SOC_BUS
-	help
-	  Include support for the ARM(R) Integrator/AP and
-	  Integrator/PP2 platforms.
-
-config INTEGRATOR_IMPD1
-	bool "Include support for Integrator/IM-PD1"
-	depends on ARCH_INTEGRATOR_AP
-	select ARM_VIC
-	select GPIO_PL061
-	select GPIOLIB
-	select REGULATOR
-	select REGULATOR_FIXED_VOLTAGE
-	help
-	  The IM-PD1 is an add-on logic module for the Integrator which
-	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
-	  The IM-PD1 can be found on the Integrator/PP2 platform.
-
-config INTEGRATOR_CM720T
-	bool "Integrator/CM720T core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V4T
-	select CPU_ARM720T
-
-config INTEGRATOR_CM920T
-	bool "Integrator/CM920T core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V4T
-	select CPU_ARM920T
-
-config INTEGRATOR_CM922T_XA10
-	bool "Integrator/CM922T-XA10 core module"
-	depends on ARCH_MULTI_V4T
-	depends on ARCH_INTEGRATOR_AP
-	select CPU_ARM922T
-
-config INTEGRATOR_CM926EJS
-	bool "Integrator/CM926EJ-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM926T
-
-config INTEGRATOR_CM10200E_REV0
-	bool "Integrator/CM10200E rev.0 core module"
-	depends on ARCH_INTEGRATOR_AP && n
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1020
-
-config INTEGRATOR_CM10200E
-	bool "Integrator/CM10200E core module"
-	depends on ARCH_INTEGRATOR_AP && n
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1020E
-
-config INTEGRATOR_CM10220E
-	bool "Integrator/CM10220E core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1022
-
-config INTEGRATOR_CM1026EJS
-	bool "Integrator/CM1026EJ-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM1026
-
-config INTEGRATOR_CM1136JFS
-	bool "Integrator/CM1136JF-S core module"
-	depends on ARCH_INTEGRATOR_AP
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-
-config ARCH_INTEGRATOR_CP
-	bool "Support Integrator/CP platform"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
-	select ARM_TIMER_SP804
-	select SERIAL_AMBA_PL011 if TTY
-	select SERIAL_AMBA_PL011_CONSOLE if TTY
-	select SOC_BUS
-	help
-	  Include support for the ARM(R) Integrator CP platform.
-
-config INTEGRATOR_CT926
-	bool "Integrator/CT926 (ARM926EJ-S) core tile"
-	depends on ARCH_INTEGRATOR_CP
-	depends on ARCH_MULTI_V5
-	select CPU_ARM926T
-
-config INTEGRATOR_CTB36
-	bool "Integrator/CTB36 (ARM1136JF-S) core tile"
-	depends on ARCH_INTEGRATOR_CP
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-
-config ARCH_CINTEGRATOR
-	depends on ARCH_INTEGRATOR_CP
-	def_bool y
-
-endif
diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile
deleted file mode 100644
index 7857a55c90b0..000000000000
--- a/arch/arm/mach-integrator/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y					:= core.o
-obj-$(CONFIG_ARCH_INTEGRATOR_AP)	+= integrator_ap.o
-obj-$(CONFIG_ARCH_INTEGRATOR_CP)	+= integrator_cp.o
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
deleted file mode 100644
index a4c36024b5e8..000000000000
--- a/arch/arm/mach-realview/Kconfig
+++ /dev/null
@@ -1,103 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_REALVIEW
-	bool "ARM Ltd. RealView family"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
-	select ARM_AMBA
-	select ARM_GIC
-	select ARM_TIMER_SP804
-	select CLK_SP810
-	select GPIO_PL061 if GPIOLIB
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select HAVE_PATA_PLATFORM
-	select HAVE_TCM
-	select CLK_ICST
-	select MACH_REALVIEW_EB if ARCH_MULTI_V5
-	select MFD_SYSCON
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VERSATILE
-	select POWER_SUPPLY
-	select SOC_REALVIEW
-	help
-	  This enables support for ARM Ltd RealView boards.
-
-if ARCH_REALVIEW
-
-config MACH_REALVIEW_EB
-	bool "Support RealView(R) Emulation Baseboard"
-	select ARM_GIC
-	select CPU_ARM926T if ARCH_MULTI_V5
-	help
-	  Include support for the ARM(R) RealView(R) Emulation Baseboard
-	  platform. On an ARMv5 kernel, this will include support for
-	  the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
-	  one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
-	  core tile options should be enabled.
-
-config REALVIEW_EB_ARM1136
-	bool "Support ARM1136J(F)-S Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	select CPU_V6
-	help
-	  Enable support for the ARM1136 tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM1176
-	bool "Support ARM1176JZ(F)-S Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	help
-	  Enable support for the ARM1176 tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_A9MP
-	bool "Support Multicore Cortex-A9 Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
-	help
-	  Enable support for the Cortex-A9MPCore tile fitted to the
-	  Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM11MP
-	bool "Support ARM11MPCore Tile"
-	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
-	select HAVE_SMP
-	help
-	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
-	  Emulation Baseboard platform.
-
-config MACH_REALVIEW_PB11MP
-	bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
-	depends on ARCH_MULTI_V6
-	select HAVE_SMP
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard for
-	  the ARM11MPCore.  This platform has an on-board ARM11MPCore and has
-	  support for PCI-E and Compact Flash.
-
-# ARMv6 CPU without K extensions, but does have the new exclusive ops
-config MACH_REALVIEW_PB1176
-	bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
-	depends on ARCH_MULTI_V6
-	select CPU_V6
-	select HAVE_TCM
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard for
-	  ARM1176JZF-S.
-
-config MACH_REALVIEW_PBA8
-	bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
-	depends on ARCH_MULTI_V7
-	help
-	  Include support for the ARM(R) RealView Platform Baseboard for
-	  Cortex(tm)-A8.  This platform has an on-board Cortex-A8 and has
-	  support for PCI-E and Compact Flash.
-
-config MACH_REALVIEW_PBX
-	bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
-	depends on ARCH_MULTI_V7
-	select ZONE_DMA
-	help
-	  Include support for the ARM(R) RealView(R) Platform Baseboard
-	  Explore.
-
-endif
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile
deleted file mode 100644
index e259091591b8..000000000000
--- a/arch/arm/mach-realview/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-versatile/include
-
-obj-y					+= realview-dt.o
-obj-$(CONFIG_SMP)			+= platsmp-dt.o
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index f78a1d358031..94b492c12e8d 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -16,3 +16,311 @@ config ARCH_VERSATILE
 	help
 	  This enables support for ARM Ltd Versatile board.
 
+menuconfig ARCH_INTEGRATOR
+	bool "ARM Ltd. Integrator family"
+	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
+	select ARM_AMBA
+	select CMA
+	select DMA_CMA
+	select HAVE_TCM
+	select CLK_ICST
+	select MFD_SYSCON
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VERSATILE
+	select POWER_SUPPLY
+	select SOC_INTEGRATOR_CM
+	select VERSATILE_FPGA_IRQ
+	help
+	  Support for ARM's Integrator platform.
+
+if ARCH_INTEGRATOR
+
+config ARCH_INTEGRATOR_AP
+	bool "Support Integrator/AP and Integrator/PP2 platforms"
+	select INTEGRATOR_AP_TIMER
+	select SERIAL_AMBA_PL010 if TTY
+	select SERIAL_AMBA_PL010_CONSOLE if TTY
+	select SOC_BUS
+	help
+	  Include support for the ARM(R) Integrator/AP and
+	  Integrator/PP2 platforms.
+
+config INTEGRATOR_IMPD1
+	bool "Include support for Integrator/IM-PD1"
+	depends on ARCH_INTEGRATOR_AP
+	select ARM_VIC
+	select GPIO_PL061
+	select GPIOLIB
+	select REGULATOR
+	select REGULATOR_FIXED_VOLTAGE
+	help
+	  The IM-PD1 is an add-on logic module for the Integrator which
+	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
+	  The IM-PD1 can be found on the Integrator/PP2 platform.
+
+config INTEGRATOR_CM720T
+	bool "Integrator/CM720T core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V4T
+	select CPU_ARM720T
+
+config INTEGRATOR_CM920T
+	bool "Integrator/CM920T core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V4T
+	select CPU_ARM920T
+
+config INTEGRATOR_CM922T_XA10
+	bool "Integrator/CM922T-XA10 core module"
+	depends on ARCH_MULTI_V4T
+	depends on ARCH_INTEGRATOR_AP
+	select CPU_ARM922T
+
+config INTEGRATOR_CM926EJS
+	bool "Integrator/CM926EJ-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM926T
+
+config INTEGRATOR_CM10200E_REV0
+	bool "Integrator/CM10200E rev.0 core module"
+	depends on ARCH_INTEGRATOR_AP && n
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1020
+
+config INTEGRATOR_CM10200E
+	bool "Integrator/CM10200E core module"
+	depends on ARCH_INTEGRATOR_AP && n
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1020E
+
+config INTEGRATOR_CM10220E
+	bool "Integrator/CM10220E core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1022
+
+config INTEGRATOR_CM1026EJS
+	bool "Integrator/CM1026EJ-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM1026
+
+config INTEGRATOR_CM1136JFS
+	bool "Integrator/CM1136JF-S core module"
+	depends on ARCH_INTEGRATOR_AP
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+
+config ARCH_INTEGRATOR_CP
+	bool "Support Integrator/CP platform"
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
+	select ARM_TIMER_SP804
+	select SERIAL_AMBA_PL011 if TTY
+	select SERIAL_AMBA_PL011_CONSOLE if TTY
+	select SOC_BUS
+	help
+	  Include support for the ARM(R) Integrator CP platform.
+
+config INTEGRATOR_CT926
+	bool "Integrator/CT926 (ARM926EJ-S) core tile"
+	depends on ARCH_INTEGRATOR_CP
+	depends on ARCH_MULTI_V5
+	select CPU_ARM926T
+
+config INTEGRATOR_CTB36
+	bool "Integrator/CTB36 (ARM1136JF-S) core tile"
+	depends on ARCH_INTEGRATOR_CP
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+
+config ARCH_CINTEGRATOR
+	depends on ARCH_INTEGRATOR_CP
+	def_bool y
+
+endif
+
+menuconfig ARCH_REALVIEW
+	bool "ARM Ltd. RealView family"
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	select ARM_AMBA
+	select ARM_GIC
+	select ARM_TIMER_SP804
+	select CLK_SP810
+	select GPIO_PL061 if GPIOLIB
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if SMP
+	select HAVE_PATA_PLATFORM
+	select HAVE_TCM
+	select CLK_ICST
+	select MACH_REALVIEW_EB if ARCH_MULTI_V5
+	select MFD_SYSCON
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VERSATILE
+	select POWER_SUPPLY
+	select SOC_REALVIEW
+	help
+	  This enables support for ARM Ltd RealView boards.
+
+if ARCH_REALVIEW
+
+config MACH_REALVIEW_EB
+	bool "Support RealView(R) Emulation Baseboard"
+	select ARM_GIC
+	select CPU_ARM926T if ARCH_MULTI_V5
+	help
+	  Include support for the ARM(R) RealView(R) Emulation Baseboard
+	  platform. On an ARMv5 kernel, this will include support for
+	  the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
+	  one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
+	  core tile options should be enabled.
+
+config REALVIEW_EB_ARM1136
+	bool "Support ARM1136J(F)-S Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	select CPU_V6
+	help
+	  Enable support for the ARM1136 tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM1176
+	bool "Support ARM1176JZ(F)-S Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	help
+	  Enable support for the ARM1176 tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_A9MP
+	bool "Support Multicore Cortex-A9 Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
+	help
+	  Enable support for the Cortex-A9MPCore tile fitted to the
+	  Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM11MP
+	bool "Support ARM11MPCore Tile"
+	depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+	select HAVE_SMP
+	help
+	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
+	  Emulation Baseboard platform.
+
+config MACH_REALVIEW_PB11MP
+	bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
+	depends on ARCH_MULTI_V6
+	select HAVE_SMP
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard for
+	  the ARM11MPCore.  This platform has an on-board ARM11MPCore and has
+	  support for PCI-E and Compact Flash.
+
+# ARMv6 CPU without K extensions, but does have the new exclusive ops
+config MACH_REALVIEW_PB1176
+	bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
+	depends on ARCH_MULTI_V6
+	select CPU_V6
+	select HAVE_TCM
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard for
+	  ARM1176JZF-S.
+
+config MACH_REALVIEW_PBA8
+	bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
+	depends on ARCH_MULTI_V7
+	help
+	  Include support for the ARM(R) RealView Platform Baseboard for
+	  Cortex(tm)-A8.  This platform has an on-board Cortex-A8 and has
+	  support for PCI-E and Compact Flash.
+
+config MACH_REALVIEW_PBX
+	bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
+	depends on ARCH_MULTI_V7
+	select ZONE_DMA
+	help
+	  Include support for the ARM(R) RealView(R) Platform Baseboard
+	  Explore.
+
+endif
+
+menuconfig ARCH_VEXPRESS
+	bool "ARM Ltd. Versatile Express family"
+	depends on ARCH_MULTI_V7
+	select ARCH_SUPPORTS_BIG_ENDIAN
+	select ARM_AMBA
+	select ARM_GIC
+	select ARM_GLOBAL_TIMER
+	select ARM_TIMER_SP804
+	select GPIOLIB
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if SMP
+	select HAVE_PATA_PLATFORM
+	select CLK_ICST
+	select NO_IOPORT_MAP
+	select PLAT_VERSATILE
+	select POWER_RESET
+	select POWER_RESET_VEXPRESS
+	select POWER_SUPPLY
+	select REGULATOR if MMC_ARMMMCI
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select VEXPRESS_CONFIG
+	help
+	  This option enables support for systems using Cortex processor based
+	  ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
+	  for example:
+
+	  - CoreTile Express A5x2 (V2P-CA5s)
+	  - CoreTile Express A9x4 (V2P-CA9)
+	  - CoreTile Express A15x2 (V2P-CA15)
+	  - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
+	    (Soft Macrocell Models)
+	  - Versatile Express RTSMs (Models)
+
+	  You must boot using a Flattened Device Tree in order to use these
+	  platforms. The traditional (ATAGs) boot method is not usable on
+	  these boards with this option.
+
+if ARCH_VEXPRESS
+
+config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
+	bool "Enable A5 and A9 only errata work-arounds"
+	default y
+	select ARM_ERRATA_643719 if SMP
+	select ARM_ERRATA_720789
+	select PL310_ERRATA_753970 if CACHE_L2X0
+	help
+	  Provides common dependencies for Versatile Express platforms
+	  based on Cortex-A5 and Cortex-A9 processors. In order to
+	  build a working kernel, you must also enable relevant core
+	  tile support or Flattened Device Tree based support options.
+
+config ARCH_VEXPRESS_DCSCB
+	bool "Dual Cluster System Control Block (DCSCB) support"
+	depends on MCPM
+	select ARM_CCI400_PORT_CTRL
+	help
+	  Support for the Dual Cluster System Configuration Block (DCSCB).
+	  This is needed to provide CPU and cluster power management
+	  on RTSM implementing big.LITTLE.
+
+config ARCH_VEXPRESS_SPC
+	bool "Versatile Express Serial Power Controller (SPC)"
+	select PM_OPP
+	help
+	  The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
+	  block called Serial Power Controller (SPC) that provides the interface
+	  between the dual cluster test-chip and the M3 microcontroller that
+	  carries out power management.
+
+config ARCH_VEXPRESS_TC2_PM
+	bool "Versatile Express TC2 power management"
+	depends on MCPM
+	select ARM_CCI400_PORT_CTRL
+	select ARCH_VEXPRESS_SPC
+	select ARM_CPU_SUSPEND
+	help
+	  Support for CPU and cluster power management on Versatile Express
+	  with a TC2 (A15x2 A7x3) big.LITTLE core tile.
+
+endif
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile
index 2b907718d467..27d712bcf1af 100644
--- a/arch/arm/mach-versatile/Makefile
+++ b/arch/arm/mach-versatile/Makefile
@@ -3,4 +3,34 @@
 # Makefile for the linux kernel.
 #
 
-obj-y					:= versatile_dt.o
+# versatile
+obj-$(CONFIG_ARCH_VERSATILE)		+= versatile.o
+
+# integrator
+obj-$(CONFIG_ARCH_INTEGRATOR)		+= integrator.o
+obj-$(CONFIG_ARCH_INTEGRATOR_AP)	+= integrator_ap.o
+obj-$(CONFIG_ARCH_INTEGRATOR_CP)	+= integrator_cp.o
+
+# realview
+obj-$(CONFIG_ARCH_REALVIEW)		+= realview.o
+
+# vexpress
+obj-$(CONFIG_ARCH_VEXPRESS)		:= v2m.o
+obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
+CFLAGS_dcscb.o				+= -march=armv7-a
+CFLAGS_REMOVE_dcscb.o			= -pg
+obj-$(CONFIG_ARCH_VEXPRESS_SPC)		+= spc.o
+CFLAGS_REMOVE_spc.o			= -pg
+obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o
+CFLAGS_tc2_pm.o				+= -march=armv7-a
+CFLAGS_REMOVE_tc2_pm.o			= -pg
+
+# mps2
+obj-$(CONFIG_ARCH_MPS2)			+= v2m-mps2.o
+
+ifdef CONFIG_SMP
+obj-y					+= headsmp.o platsmp.o
+obj-$(CONFIG_ARCH_REALVIEW)		+= platsmp-realview.o
+obj-$(CONFIG_ARCH_VEXPRESS)		+= platsmp-vexpress.o
+obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
+endif
diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
similarity index 100%
rename from arch/arm/mach-vexpress/Makefile.boot
rename to arch/arm/mach-versatile/Makefile.boot
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-versatile/dcscb.c
similarity index 97%
rename from arch/arm/mach-vexpress/dcscb.c
rename to arch/arm/mach-versatile/dcscb.c
index a0554d7d04f7..866270e7f271 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-versatile/dcscb.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * arch/arm/mach-vexpress/dcscb.c - Dual Cluster System Configuration Block
+ * dcscb.c - Dual Cluster System Configuration Block
  *
  * Created by:	Nicolas Pitre, May 2012
  * Copyright:	(C) 2012-2013  Linaro Limited
@@ -20,7 +20,7 @@
 #include <asm/cputype.h>
 #include <asm/cp15.h>
 
-#include "core.h"
+#include "vexpress.h"
 
 #define RST_HOLD0	0x0
 #define RST_HOLD1	0x4
diff --git a/arch/arm/mach-vexpress/dcscb_setup.S b/arch/arm/mach-versatile/dcscb_setup.S
similarity index 95%
rename from arch/arm/mach-vexpress/dcscb_setup.S
rename to arch/arm/mach-versatile/dcscb_setup.S
index 0614b2ebd354..92d1fd9d7f6a 100644
--- a/arch/arm/mach-vexpress/dcscb_setup.S
+++ b/arch/arm/mach-versatile/dcscb_setup.S
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * arch/arm/include/asm/dcscb_setup.S
- *
  * Created by:  Dave Martin, 2012-06-22
  * Copyright:   (C) 2012-2013  Linaro Limited
  */
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/mach-versatile/headsmp.S
similarity index 94%
rename from arch/arm/plat-versatile/headsmp.S
rename to arch/arm/mach-versatile/headsmp.S
index 09d9fc30c8ca..99c32db412ae 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/mach-versatile/headsmp.S
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- *  linux/arch/arm/plat-versatile/headsmp.S
- *
  *  Copyright (c) 2003 ARM Limited
  *  All Rights Reserved
  */
diff --git a/arch/arm/plat-versatile/hotplug.c b/arch/arm/mach-versatile/hotplug.c
similarity index 98%
rename from arch/arm/plat-versatile/hotplug.c
rename to arch/arm/mach-versatile/hotplug.c
index 2e9dca38bec0..5a152175578b 100644
--- a/arch/arm/plat-versatile/hotplug.c
+++ b/arch/arm/mach-versatile/hotplug.c
@@ -15,7 +15,7 @@
 #include <asm/smp_plat.h>
 #include <asm/cp15.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 static inline void versatile_immitation_enter_lowpower(unsigned int actrl_mask)
 {
diff --git a/arch/arm/mach-integrator/cm.h b/arch/arm/mach-versatile/integrator-cm.h
similarity index 100%
rename from arch/arm/mach-integrator/cm.h
rename to arch/arm/mach-versatile/integrator-cm.h
diff --git a/arch/arm/mach-integrator/hardware.h b/arch/arm/mach-versatile/integrator-hardware.h
similarity index 100%
rename from arch/arm/mach-integrator/hardware.h
rename to arch/arm/mach-versatile/integrator-hardware.h
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-versatile/integrator.c
similarity index 95%
rename from arch/arm/mach-integrator/core.c
rename to arch/arm/mach-versatile/integrator.c
index 0fe5e1dc9d89..fdf9c4db08a7 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-versatile/integrator.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-integrator/core.c
- *
  *  Copyright (C) 2000-2003 Deep Blue Solutions Ltd
  */
 #include <linux/types.h>
@@ -26,9 +24,9 @@
 #include <asm/mach-types.h>
 #include <asm/mach/time.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 static DEFINE_RAW_SPINLOCK(cm_lock);
 static void __iomem *cm_base;
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-versatile/integrator.h
similarity index 100%
rename from arch/arm/mach-integrator/common.h
rename to arch/arm/mach-versatile/integrator.h
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c
similarity index 97%
rename from arch/arm/mach-integrator/integrator_ap.c
rename to arch/arm/mach-versatile/integrator_ap.c
index 58b02cbbea72..44a69cc69376 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-versatile/integrator_ap.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- *  linux/arch/arm/mach-integrator/integrator_ap.c
- *
  *  Copyright (C) 2000-2003 Deep Blue Solutions Ltd
  */
 #include <linux/kernel.h>
@@ -20,9 +18,9 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 /* Regmap to the AP system controller */
 static struct regmap *ap_syscon_map;
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-versatile/integrator_cp.c
similarity index 96%
rename from arch/arm/mach-integrator/integrator_cp.c
rename to arch/arm/mach-versatile/integrator_cp.c
index b7eb4038798b..2ed4ded56b3f 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-versatile/integrator_cp.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-integrator/integrator_cp.c
- *
  *  Copyright (C) 2003 Deep Blue Solutions Ltd
  */
 #include <linux/kernel.h>
@@ -18,9 +16,9 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"
 
 /* Base address to the core module header */
 static struct regmap *cm_map;
diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-versatile/platsmp-realview.c
similarity index 98%
rename from arch/arm/mach-realview/platsmp-dt.c
rename to arch/arm/mach-versatile/platsmp-realview.c
index 5ae783767a5d..5d363385c801 100644
--- a/arch/arm/mach-realview/platsmp-dt.c
+++ b/arch/arm/mach-versatile/platsmp-realview.c
@@ -13,7 +13,7 @@
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 #define REALVIEW_SYS_FLAGSSET_OFFSET	0x30
 
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-versatile/platsmp-vexpress.c
similarity index 96%
rename from arch/arm/mach-vexpress/platsmp.c
rename to arch/arm/mach-versatile/platsmp-vexpress.c
index 99c93124aa68..1ee3c45e71c9 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp-vexpress.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/mach-vexpress/platsmp.c
- *
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  */
@@ -16,9 +14,8 @@
 #include <asm/smp_scu.h>
 #include <asm/mach/map.h>
 
-#include <plat/platsmp.h>
-
-#include "core.h"
+#include "platsmp.h"
+#include "vexpress.h"
 
 bool __init vexpress_smp_init_ops(void)
 {
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/mach-versatile/platsmp.c
similarity index 97%
rename from arch/arm/plat-versatile/platsmp.c
rename to arch/arm/mach-versatile/platsmp.c
index 3567296cec2a..fa7378321e23 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- *  linux/arch/arm/plat-versatile/platsmp.c
- *
  *  Copyright (C) 2002 ARM Ltd.
  *  All Rights Reserved
  *
@@ -20,7 +18,7 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
-#include <plat/platsmp.h>
+#include "platsmp.h"
 
 /*
  * versatile_cpu_release controls the release of CPUs from the holding
diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/mach-versatile/platsmp.h
similarity index 87%
rename from arch/arm/plat-versatile/include/plat/platsmp.h
rename to arch/arm/mach-versatile/platsmp.h
index 500605f48b80..171a0ab72220 100644
--- a/arch/arm/plat-versatile/include/plat/platsmp.h
+++ b/arch/arm/mach-versatile/platsmp.h
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- *  linux/arch/arm/plat-versatile/include/plat/platsmp.h
- *
  *  Copyright (C) 2011 ARM Ltd.
  *  All Rights Reserved
  */
diff --git a/arch/arm/mach-realview/realview-dt.c b/arch/arm/mach-versatile/realview.c
similarity index 100%
rename from arch/arm/mach-realview/realview-dt.c
rename to arch/arm/mach-versatile/realview.c
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-versatile/spc.c
similarity index 100%
rename from arch/arm/mach-vexpress/spc.c
rename to arch/arm/mach-versatile/spc.c
diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-versatile/spc.h
similarity index 100%
rename from arch/arm/mach-vexpress/spc.h
rename to arch/arm/mach-versatile/spc.h
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-versatile/tc2_pm.c
similarity index 99%
rename from arch/arm/mach-vexpress/tc2_pm.c
rename to arch/arm/mach-versatile/tc2_pm.c
index e96c42ae3602..0fe78da0c109 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-versatile/tc2_pm.c
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * arch/arm/mach-vexpress/tc2_pm.c - TC2 power management support
- *
  * Created by:	Nicolas Pitre, October 2012
  * Copyright:	(C) 2012-2013  Linaro Limited
  *
diff --git a/arch/arm/mach-vexpress/v2m-mps2.c b/arch/arm/mach-versatile/v2m-mps2.c
similarity index 100%
rename from arch/arm/mach-vexpress/v2m-mps2.c
rename to arch/arm/mach-versatile/v2m-mps2.c
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-versatile/v2m.c
similarity index 97%
rename from arch/arm/mach-vexpress/v2m.c
rename to arch/arm/mach-versatile/v2m.c
index ffe7c7a85ae9..79afdf2a90b6 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-versatile/v2m.c
@@ -3,7 +3,7 @@
 #include <linux/of_address.h>
 #include <asm/mach/arch.h>
 
-#include "core.h"
+#include "vexpress.h"
 
 #define SYS_FLAGSSET		0x030
 #define SYS_FLAGSCLR		0x034
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile.c
similarity index 100%
rename from arch/arm/mach-versatile/versatile_dt.c
rename to arch/arm/mach-versatile/versatile.c
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-versatile/vexpress.h
similarity index 100%
rename from arch/arm/mach-vexpress/core.h
rename to arch/arm/mach-versatile/vexpress.h
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
deleted file mode 100644
index 2e6aff5a0f17..000000000000
--- a/arch/arm/mach-vexpress/Kconfig
+++ /dev/null
@@ -1,81 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-menuconfig ARCH_VEXPRESS
-	bool "ARM Ltd. Versatile Express family"
-	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
-	select ARM_AMBA
-	select ARM_GIC
-	select ARM_GLOBAL_TIMER
-	select ARM_TIMER_SP804
-	select GPIOLIB
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select HAVE_PATA_PLATFORM
-	select CLK_ICST
-	select NO_IOPORT_MAP
-	select PLAT_VERSATILE
-	select POWER_RESET
-	select POWER_RESET_VEXPRESS
-	select POWER_SUPPLY
-	select REGULATOR if MMC_ARMMMCI
-	select REGULATOR_FIXED_VOLTAGE if REGULATOR
-	select VEXPRESS_CONFIG
-	help
-	  This option enables support for systems using Cortex processor based
-	  ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
-	  for example:
-
-	  - CoreTile Express A5x2 (V2P-CA5s)
-	  - CoreTile Express A9x4 (V2P-CA9)
-	  - CoreTile Express A15x2 (V2P-CA15)
-	  - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
-	    (Soft Macrocell Models)
-	  - Versatile Express RTSMs (Models)
-
-	  You must boot using a Flattened Device Tree in order to use these
-	  platforms. The traditional (ATAGs) boot method is not usable on
-	  these boards with this option.
-
-if ARCH_VEXPRESS
-
-config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
-	bool "Enable A5 and A9 only errata work-arounds"
-	default y
-	select ARM_ERRATA_643719 if SMP
-	select ARM_ERRATA_720789
-	select PL310_ERRATA_753970 if CACHE_L2X0
-	help
-	  Provides common dependencies for Versatile Express platforms
-	  based on Cortex-A5 and Cortex-A9 processors. In order to
-	  build a working kernel, you must also enable relevant core
-	  tile support or Flattened Device Tree based support options.
-
-config ARCH_VEXPRESS_DCSCB
-	bool "Dual Cluster System Control Block (DCSCB) support"
-	depends on MCPM
-	select ARM_CCI400_PORT_CTRL
-	help
-	  Support for the Dual Cluster System Configuration Block (DCSCB).
-	  This is needed to provide CPU and cluster power management
-	  on RTSM implementing big.LITTLE.
-
-config ARCH_VEXPRESS_SPC
-	bool "Versatile Express Serial Power Controller (SPC)"
-	select PM_OPP
-	help
-	  The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
-	  block called Serial Power Controller (SPC) that provides the interface
-	  between the dual cluster test-chip and the M3 microcontroller that
-	  carries out power management.
-
-config ARCH_VEXPRESS_TC2_PM
-	bool "Versatile Express TC2 power management"
-	depends on MCPM
-	select ARM_CCI400_PORT_CTRL
-	select ARCH_VEXPRESS_SPC
-	select ARM_CPU_SUSPEND
-	help
-	  Support for CPU and cluster power management on Versatile Express
-	  with a TC2 (A15x2 A7x3) big.LITTLE core tile.
-
-endif
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
deleted file mode 100644
index 3651a1ed0f2b..000000000000
--- a/arch/arm/mach-vexpress/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := \
-	-I$(srctree)/arch/arm/plat-versatile/include
-
-obj-$(CONFIG_ARCH_VEXPRESS)		:= v2m.o
-obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
-CFLAGS_dcscb.o				+= -march=armv7-a
-CFLAGS_REMOVE_dcscb.o			= -pg
-obj-$(CONFIG_ARCH_VEXPRESS_SPC)		+= spc.o
-CFLAGS_REMOVE_spc.o			= -pg
-obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o
-CFLAGS_tc2_pm.o				+= -march=armv7-a
-CFLAGS_REMOVE_tc2_pm.o			= -pg
-obj-$(CONFIG_SMP)			+= platsmp.o
-
-obj-$(CONFIG_ARCH_MPS2)			+= v2m-mps2.o
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
deleted file mode 100644
index 5de44a57c4de..000000000000
--- a/arch/arm/plat-versatile/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
-
-obj-$(CONFIG_SMP) += headsmp.o platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
-- 
2.29.2


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

* [PATCH 02/12] ARM: ep93xx: renumber interrupts
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

With the move to irq domains, no irqchip must start at number 0,
so shift all the hardwired IRQ numbers by one.

Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/core.c              |   4 +-
 arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
 2 files changed, 65 insertions(+), 61 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index a3b4e843456a..e4569a5acc3f 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
  *************************************************************************/
 void __init ep93xx_init_irq(void)
 {
-	vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
-	vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0);
+	vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
+	vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1, EP93XX_VIC2_VALID_IRQ_MASK, 0);
 }
 
 
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h
index 244daf83ce6d..60c69c4ed7e1 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/include/mach/irqs.h
@@ -6,69 +6,73 @@
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
-#define IRQ_EP93XX_COMMRX		2
-#define IRQ_EP93XX_COMMTX		3
-#define IRQ_EP93XX_TIMER1		4
-#define IRQ_EP93XX_TIMER2		5
-#define IRQ_EP93XX_AACINTR		6
-#define IRQ_EP93XX_DMAM2P0		7
-#define IRQ_EP93XX_DMAM2P1		8
-#define IRQ_EP93XX_DMAM2P2		9
-#define IRQ_EP93XX_DMAM2P3		10
-#define IRQ_EP93XX_DMAM2P4		11
-#define IRQ_EP93XX_DMAM2P5		12
-#define IRQ_EP93XX_DMAM2P6		13
-#define IRQ_EP93XX_DMAM2P7		14
-#define IRQ_EP93XX_DMAM2P8		15
-#define IRQ_EP93XX_DMAM2P9		16
-#define IRQ_EP93XX_DMAM2M0		17
-#define IRQ_EP93XX_DMAM2M1		18
-#define IRQ_EP93XX_GPIO0MUX		19
-#define IRQ_EP93XX_GPIO1MUX		20
-#define IRQ_EP93XX_GPIO2MUX		21
-#define IRQ_EP93XX_GPIO3MUX		22
-#define IRQ_EP93XX_UART1RX		23
-#define IRQ_EP93XX_UART1TX		24
-#define IRQ_EP93XX_UART2RX		25
-#define IRQ_EP93XX_UART2TX		26
-#define IRQ_EP93XX_UART3RX		27
-#define IRQ_EP93XX_UART3TX		28
-#define IRQ_EP93XX_KEY			29
-#define IRQ_EP93XX_TOUCH		30
+#define IRQ_EP93XX_VIC0			1
+
+#define IRQ_EP93XX_COMMRX		(IRQ_EP93XX_VIC0 + 2)
+#define IRQ_EP93XX_COMMTX		(IRQ_EP93XX_VIC0 + 3)
+#define IRQ_EP93XX_TIMER1		(IRQ_EP93XX_VIC0 + 4)
+#define IRQ_EP93XX_TIMER2		(IRQ_EP93XX_VIC0 + 5)
+#define IRQ_EP93XX_AACINTR		(IRQ_EP93XX_VIC0 + 6)
+#define IRQ_EP93XX_DMAM2P0		(IRQ_EP93XX_VIC0 + 7)
+#define IRQ_EP93XX_DMAM2P1		(IRQ_EP93XX_VIC0 + 8)
+#define IRQ_EP93XX_DMAM2P2		(IRQ_EP93XX_VIC0 + 9)
+#define IRQ_EP93XX_DMAM2P3		(IRQ_EP93XX_VIC0 + 10)
+#define IRQ_EP93XX_DMAM2P4		(IRQ_EP93XX_VIC0 + 11)
+#define IRQ_EP93XX_DMAM2P5		(IRQ_EP93XX_VIC0 + 12)
+#define IRQ_EP93XX_DMAM2P6		(IRQ_EP93XX_VIC0 + 13)
+#define IRQ_EP93XX_DMAM2P7		(IRQ_EP93XX_VIC0 + 14)
+#define IRQ_EP93XX_DMAM2P8		(IRQ_EP93XX_VIC0 + 15)
+#define IRQ_EP93XX_DMAM2P9		(IRQ_EP93XX_VIC0 + 16)
+#define IRQ_EP93XX_DMAM2M0		(IRQ_EP93XX_VIC0 + 17)
+#define IRQ_EP93XX_DMAM2M1		(IRQ_EP93XX_VIC0 + 18)
+#define IRQ_EP93XX_GPIO0MUX		(IRQ_EP93XX_VIC0 + 19)
+#define IRQ_EP93XX_GPIO1MUX		(IRQ_EP93XX_VIC0 + 20)
+#define IRQ_EP93XX_GPIO2MUX		(IRQ_EP93XX_VIC0 + 21)
+#define IRQ_EP93XX_GPIO3MUX		(IRQ_EP93XX_VIC0 + 22)
+#define IRQ_EP93XX_UART1RX		(IRQ_EP93XX_VIC0 + 23)
+#define IRQ_EP93XX_UART1TX		(IRQ_EP93XX_VIC0 + 24)
+#define IRQ_EP93XX_UART2RX		(IRQ_EP93XX_VIC0 + 25)
+#define IRQ_EP93XX_UART2TX		(IRQ_EP93XX_VIC0 + 26)
+#define IRQ_EP93XX_UART3RX		(IRQ_EP93XX_VIC0 + 27)
+#define IRQ_EP93XX_UART3TX		(IRQ_EP93XX_VIC0 + 28)
+#define IRQ_EP93XX_KEY			(IRQ_EP93XX_VIC0 + 29)
+#define IRQ_EP93XX_TOUCH		(IRQ_EP93XX_VIC0 + 30)
 #define EP93XX_VIC1_VALID_IRQ_MASK	0x7ffffffc
 
-#define IRQ_EP93XX_EXT0			32
-#define IRQ_EP93XX_EXT1			33
-#define IRQ_EP93XX_EXT2			34
-#define IRQ_EP93XX_64HZ			35
-#define IRQ_EP93XX_WATCHDOG		36
-#define IRQ_EP93XX_RTC			37
-#define IRQ_EP93XX_IRDA			38
-#define IRQ_EP93XX_ETHERNET		39
-#define IRQ_EP93XX_EXT3			40
-#define IRQ_EP93XX_PROG			41
-#define IRQ_EP93XX_1HZ			42
-#define IRQ_EP93XX_VSYNC		43
-#define IRQ_EP93XX_VIDEO_FIFO		44
-#define IRQ_EP93XX_SSP1RX		45
-#define IRQ_EP93XX_SSP1TX		46
-#define IRQ_EP93XX_GPIO4MUX		47
-#define IRQ_EP93XX_GPIO5MUX		48
-#define IRQ_EP93XX_GPIO6MUX		49
-#define IRQ_EP93XX_GPIO7MUX		50
-#define IRQ_EP93XX_TIMER3		51
-#define IRQ_EP93XX_UART1		52
-#define IRQ_EP93XX_SSP			53
-#define IRQ_EP93XX_UART2		54
-#define IRQ_EP93XX_UART3		55
-#define IRQ_EP93XX_USB			56
-#define IRQ_EP93XX_ETHERNET_PME		57
-#define IRQ_EP93XX_DSP			58
-#define IRQ_EP93XX_GPIO_AB		59
-#define IRQ_EP93XX_SAI			60
+#define IRQ_EP93XX_VIC1			(IRQ_EP93XX_VIC0 + 32)
+
+#define IRQ_EP93XX_EXT0			(IRQ_EP93XX_VIC1 + 0)
+#define IRQ_EP93XX_EXT1			(IRQ_EP93XX_VIC1 + 1)
+#define IRQ_EP93XX_EXT2			(IRQ_EP93XX_VIC1 + 2)
+#define IRQ_EP93XX_64HZ			(IRQ_EP93XX_VIC1 + 3)
+#define IRQ_EP93XX_WATCHDOG		(IRQ_EP93XX_VIC1 + 4)
+#define IRQ_EP93XX_RTC			(IRQ_EP93XX_VIC1 + 5)
+#define IRQ_EP93XX_IRDA			(IRQ_EP93XX_VIC1 + 6)
+#define IRQ_EP93XX_ETHERNET		(IRQ_EP93XX_VIC1 + 7)
+#define IRQ_EP93XX_EXT3			(IRQ_EP93XX_VIC1 + 8)
+#define IRQ_EP93XX_PROG			(IRQ_EP93XX_VIC1 + 9)
+#define IRQ_EP93XX_1HZ			(IRQ_EP93XX_VIC1 + 10)
+#define IRQ_EP93XX_VSYNC		(IRQ_EP93XX_VIC1 + 11)
+#define IRQ_EP93XX_VIDEO_FIFO		(IRQ_EP93XX_VIC1 + 12)
+#define IRQ_EP93XX_SSP1RX		(IRQ_EP93XX_VIC1 + 13)
+#define IRQ_EP93XX_SSP1TX		(IRQ_EP93XX_VIC1 + 14)
+#define IRQ_EP93XX_GPIO4MUX		(IRQ_EP93XX_VIC1 + 15)
+#define IRQ_EP93XX_GPIO5MUX		(IRQ_EP93XX_VIC1 + 16)
+#define IRQ_EP93XX_GPIO6MUX		(IRQ_EP93XX_VIC1 + 17)
+#define IRQ_EP93XX_GPIO7MUX		(IRQ_EP93XX_VIC1 + 18)
+#define IRQ_EP93XX_TIMER3		(IRQ_EP93XX_VIC1 + 19)
+#define IRQ_EP93XX_UART1		(IRQ_EP93XX_VIC1 + 20)
+#define IRQ_EP93XX_SSP			(IRQ_EP93XX_VIC1 + 21)
+#define IRQ_EP93XX_UART2		(IRQ_EP93XX_VIC1 + 22)
+#define IRQ_EP93XX_UART3		(IRQ_EP93XX_VIC1 + 23)
+#define IRQ_EP93XX_USB			(IRQ_EP93XX_VIC1 + 24)
+#define IRQ_EP93XX_ETHERNET_PME		(IRQ_EP93XX_VIC1 + 25)
+#define IRQ_EP93XX_DSP			(IRQ_EP93XX_VIC1 + 26)
+#define IRQ_EP93XX_GPIO_AB		(IRQ_EP93XX_VIC1 + 27)
+#define IRQ_EP93XX_SAI			(IRQ_EP93XX_VIC1 + 28)
 #define EP93XX_VIC2_VALID_IRQ_MASK	0x1fffffff
 
-#define NR_EP93XX_IRQS			(64 + 24)
+#define NR_EP93XX_IRQS			(IRQ_EP93XX_VIC1 + 32 + 24)
 
 #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
 #define EP93XX_BOARD_IRQS		32
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/12] ARM: ep93xx: renumber interrupts
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

With the move to irq domains, no irqchip must start at number 0,
so shift all the hardwired IRQ numbers by one.

Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/core.c              |   4 +-
 arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
 2 files changed, 65 insertions(+), 61 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index a3b4e843456a..e4569a5acc3f 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
  *************************************************************************/
 void __init ep93xx_init_irq(void)
 {
-	vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
-	vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0);
+	vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
+	vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1, EP93XX_VIC2_VALID_IRQ_MASK, 0);
 }
 
 
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h
index 244daf83ce6d..60c69c4ed7e1 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/include/mach/irqs.h
@@ -6,69 +6,73 @@
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
-#define IRQ_EP93XX_COMMRX		2
-#define IRQ_EP93XX_COMMTX		3
-#define IRQ_EP93XX_TIMER1		4
-#define IRQ_EP93XX_TIMER2		5
-#define IRQ_EP93XX_AACINTR		6
-#define IRQ_EP93XX_DMAM2P0		7
-#define IRQ_EP93XX_DMAM2P1		8
-#define IRQ_EP93XX_DMAM2P2		9
-#define IRQ_EP93XX_DMAM2P3		10
-#define IRQ_EP93XX_DMAM2P4		11
-#define IRQ_EP93XX_DMAM2P5		12
-#define IRQ_EP93XX_DMAM2P6		13
-#define IRQ_EP93XX_DMAM2P7		14
-#define IRQ_EP93XX_DMAM2P8		15
-#define IRQ_EP93XX_DMAM2P9		16
-#define IRQ_EP93XX_DMAM2M0		17
-#define IRQ_EP93XX_DMAM2M1		18
-#define IRQ_EP93XX_GPIO0MUX		19
-#define IRQ_EP93XX_GPIO1MUX		20
-#define IRQ_EP93XX_GPIO2MUX		21
-#define IRQ_EP93XX_GPIO3MUX		22
-#define IRQ_EP93XX_UART1RX		23
-#define IRQ_EP93XX_UART1TX		24
-#define IRQ_EP93XX_UART2RX		25
-#define IRQ_EP93XX_UART2TX		26
-#define IRQ_EP93XX_UART3RX		27
-#define IRQ_EP93XX_UART3TX		28
-#define IRQ_EP93XX_KEY			29
-#define IRQ_EP93XX_TOUCH		30
+#define IRQ_EP93XX_VIC0			1
+
+#define IRQ_EP93XX_COMMRX		(IRQ_EP93XX_VIC0 + 2)
+#define IRQ_EP93XX_COMMTX		(IRQ_EP93XX_VIC0 + 3)
+#define IRQ_EP93XX_TIMER1		(IRQ_EP93XX_VIC0 + 4)
+#define IRQ_EP93XX_TIMER2		(IRQ_EP93XX_VIC0 + 5)
+#define IRQ_EP93XX_AACINTR		(IRQ_EP93XX_VIC0 + 6)
+#define IRQ_EP93XX_DMAM2P0		(IRQ_EP93XX_VIC0 + 7)
+#define IRQ_EP93XX_DMAM2P1		(IRQ_EP93XX_VIC0 + 8)
+#define IRQ_EP93XX_DMAM2P2		(IRQ_EP93XX_VIC0 + 9)
+#define IRQ_EP93XX_DMAM2P3		(IRQ_EP93XX_VIC0 + 10)
+#define IRQ_EP93XX_DMAM2P4		(IRQ_EP93XX_VIC0 + 11)
+#define IRQ_EP93XX_DMAM2P5		(IRQ_EP93XX_VIC0 + 12)
+#define IRQ_EP93XX_DMAM2P6		(IRQ_EP93XX_VIC0 + 13)
+#define IRQ_EP93XX_DMAM2P7		(IRQ_EP93XX_VIC0 + 14)
+#define IRQ_EP93XX_DMAM2P8		(IRQ_EP93XX_VIC0 + 15)
+#define IRQ_EP93XX_DMAM2P9		(IRQ_EP93XX_VIC0 + 16)
+#define IRQ_EP93XX_DMAM2M0		(IRQ_EP93XX_VIC0 + 17)
+#define IRQ_EP93XX_DMAM2M1		(IRQ_EP93XX_VIC0 + 18)
+#define IRQ_EP93XX_GPIO0MUX		(IRQ_EP93XX_VIC0 + 19)
+#define IRQ_EP93XX_GPIO1MUX		(IRQ_EP93XX_VIC0 + 20)
+#define IRQ_EP93XX_GPIO2MUX		(IRQ_EP93XX_VIC0 + 21)
+#define IRQ_EP93XX_GPIO3MUX		(IRQ_EP93XX_VIC0 + 22)
+#define IRQ_EP93XX_UART1RX		(IRQ_EP93XX_VIC0 + 23)
+#define IRQ_EP93XX_UART1TX		(IRQ_EP93XX_VIC0 + 24)
+#define IRQ_EP93XX_UART2RX		(IRQ_EP93XX_VIC0 + 25)
+#define IRQ_EP93XX_UART2TX		(IRQ_EP93XX_VIC0 + 26)
+#define IRQ_EP93XX_UART3RX		(IRQ_EP93XX_VIC0 + 27)
+#define IRQ_EP93XX_UART3TX		(IRQ_EP93XX_VIC0 + 28)
+#define IRQ_EP93XX_KEY			(IRQ_EP93XX_VIC0 + 29)
+#define IRQ_EP93XX_TOUCH		(IRQ_EP93XX_VIC0 + 30)
 #define EP93XX_VIC1_VALID_IRQ_MASK	0x7ffffffc
 
-#define IRQ_EP93XX_EXT0			32
-#define IRQ_EP93XX_EXT1			33
-#define IRQ_EP93XX_EXT2			34
-#define IRQ_EP93XX_64HZ			35
-#define IRQ_EP93XX_WATCHDOG		36
-#define IRQ_EP93XX_RTC			37
-#define IRQ_EP93XX_IRDA			38
-#define IRQ_EP93XX_ETHERNET		39
-#define IRQ_EP93XX_EXT3			40
-#define IRQ_EP93XX_PROG			41
-#define IRQ_EP93XX_1HZ			42
-#define IRQ_EP93XX_VSYNC		43
-#define IRQ_EP93XX_VIDEO_FIFO		44
-#define IRQ_EP93XX_SSP1RX		45
-#define IRQ_EP93XX_SSP1TX		46
-#define IRQ_EP93XX_GPIO4MUX		47
-#define IRQ_EP93XX_GPIO5MUX		48
-#define IRQ_EP93XX_GPIO6MUX		49
-#define IRQ_EP93XX_GPIO7MUX		50
-#define IRQ_EP93XX_TIMER3		51
-#define IRQ_EP93XX_UART1		52
-#define IRQ_EP93XX_SSP			53
-#define IRQ_EP93XX_UART2		54
-#define IRQ_EP93XX_UART3		55
-#define IRQ_EP93XX_USB			56
-#define IRQ_EP93XX_ETHERNET_PME		57
-#define IRQ_EP93XX_DSP			58
-#define IRQ_EP93XX_GPIO_AB		59
-#define IRQ_EP93XX_SAI			60
+#define IRQ_EP93XX_VIC1			(IRQ_EP93XX_VIC0 + 32)
+
+#define IRQ_EP93XX_EXT0			(IRQ_EP93XX_VIC1 + 0)
+#define IRQ_EP93XX_EXT1			(IRQ_EP93XX_VIC1 + 1)
+#define IRQ_EP93XX_EXT2			(IRQ_EP93XX_VIC1 + 2)
+#define IRQ_EP93XX_64HZ			(IRQ_EP93XX_VIC1 + 3)
+#define IRQ_EP93XX_WATCHDOG		(IRQ_EP93XX_VIC1 + 4)
+#define IRQ_EP93XX_RTC			(IRQ_EP93XX_VIC1 + 5)
+#define IRQ_EP93XX_IRDA			(IRQ_EP93XX_VIC1 + 6)
+#define IRQ_EP93XX_ETHERNET		(IRQ_EP93XX_VIC1 + 7)
+#define IRQ_EP93XX_EXT3			(IRQ_EP93XX_VIC1 + 8)
+#define IRQ_EP93XX_PROG			(IRQ_EP93XX_VIC1 + 9)
+#define IRQ_EP93XX_1HZ			(IRQ_EP93XX_VIC1 + 10)
+#define IRQ_EP93XX_VSYNC		(IRQ_EP93XX_VIC1 + 11)
+#define IRQ_EP93XX_VIDEO_FIFO		(IRQ_EP93XX_VIC1 + 12)
+#define IRQ_EP93XX_SSP1RX		(IRQ_EP93XX_VIC1 + 13)
+#define IRQ_EP93XX_SSP1TX		(IRQ_EP93XX_VIC1 + 14)
+#define IRQ_EP93XX_GPIO4MUX		(IRQ_EP93XX_VIC1 + 15)
+#define IRQ_EP93XX_GPIO5MUX		(IRQ_EP93XX_VIC1 + 16)
+#define IRQ_EP93XX_GPIO6MUX		(IRQ_EP93XX_VIC1 + 17)
+#define IRQ_EP93XX_GPIO7MUX		(IRQ_EP93XX_VIC1 + 18)
+#define IRQ_EP93XX_TIMER3		(IRQ_EP93XX_VIC1 + 19)
+#define IRQ_EP93XX_UART1		(IRQ_EP93XX_VIC1 + 20)
+#define IRQ_EP93XX_SSP			(IRQ_EP93XX_VIC1 + 21)
+#define IRQ_EP93XX_UART2		(IRQ_EP93XX_VIC1 + 22)
+#define IRQ_EP93XX_UART3		(IRQ_EP93XX_VIC1 + 23)
+#define IRQ_EP93XX_USB			(IRQ_EP93XX_VIC1 + 24)
+#define IRQ_EP93XX_ETHERNET_PME		(IRQ_EP93XX_VIC1 + 25)
+#define IRQ_EP93XX_DSP			(IRQ_EP93XX_VIC1 + 26)
+#define IRQ_EP93XX_GPIO_AB		(IRQ_EP93XX_VIC1 + 27)
+#define IRQ_EP93XX_SAI			(IRQ_EP93XX_VIC1 + 28)
 #define EP93XX_VIC2_VALID_IRQ_MASK	0x1fffffff
 
-#define NR_EP93XX_IRQS			(64 + 24)
+#define NR_EP93XX_IRQS			(IRQ_EP93XX_VIC1 + 32 + 24)
 
 #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
 #define EP93XX_BOARD_IRQS		32
-- 
2.29.2


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

* [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
globally. Do the minimal conversion by setting .nr_irqs in each
machine descriptor.

Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
.nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
everywhere else.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Hubert Feurstein <hubert.feurstein@contec.at>
Cc: Lukasz Majewski <lukma@denx.de>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                               | 2 ++
 arch/arm/mach-ep93xx/adssphere.c               | 1 +
 arch/arm/mach-ep93xx/core.c                    | 1 +
 arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
 arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
 arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
 arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
 arch/arm/mach-ep93xx/simone.c                  | 1 +
 arch/arm/mach-ep93xx/snappercl15.c             | 1 +
 arch/arm/mach-ep93xx/soc.h                     | 1 +
 arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
 arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
 12 files changed, 23 insertions(+), 8 deletions(-)
 rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 31f024e6e925..5177e54cc14c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -358,6 +358,8 @@ config ARCH_EP93XX
 	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.
 
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 8d5e349a7a6d..0c48d3c5b8e7 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
 MACHINE_START(ADSSPHERE, "ADS Sphere board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index e4569a5acc3f..2d58e273c96d 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -47,6 +47,7 @@
 #include <asm/mach/map.h>
 
 #include "soc.h"
+#include "irqs.h"
 
 /*************************************************************************
  * Static I/O mappings that are needed for all EP93xx platforms
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index af0e22471ebd..4b90899a66e9 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
 MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -255,6 +256,7 @@ MACHINE_END
 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
 	/* Maintainer: George Kashperko <george@chas.com.ua> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -267,6 +269,7 @@ MACHINE_END
 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -279,6 +282,7 @@ MACHINE_END
 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
 	/* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -291,6 +295,7 @@ MACHINE_END
 MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -303,6 +308,7 @@ MACHINE_END
 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
 	/* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -315,6 +321,7 @@ MACHINE_END
 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -327,6 +334,7 @@ MACHINE_END
 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index d7f9890321eb..0b7043e3e178 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
 MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/irqs.h
similarity index 96%
rename from arch/arm/mach-ep93xx/include/mach/irqs.h
rename to arch/arm/mach-ep93xx/irqs.h
index 60c69c4ed7e1..353201b90c66 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/irqs.h
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/irqs.h
- */
-
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
@@ -77,7 +73,4 @@
 #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
 #define EP93XX_BOARD_IRQS		32
 
-#define NR_IRQS				(NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
-
-
 #endif
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index e6ead8ded6ee..c121c459aa17 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
 MACHINE_START(MICRO9, "Contec Micro9-High")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -88,6 +89,7 @@ MACHINE_END
 MACHINE_START(MICRO9M, "Contec Micro9-Mid")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -100,6 +102,7 @@ MACHINE_END
 MACHINE_START(MICRO9L, "Contec Micro9-Lite")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -112,6 +115,7 @@ MACHINE_END
 MACHINE_START(MICRO9S, "Contec Micro9-Slim")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 5291053023b2..569e72413561 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
 	/* Maintainer: Ryan Mallon */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index e200d69471e9..1dfb725671b1 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
 MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
 	/* Maintainer: Ryan Mallon */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index 94ef7f275f94..f0986e288d19 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -10,6 +10,7 @@
 #define _EP93XX_SOC_H
 
 #include <mach/ep93xx-regs.h>
+#include "irqs.h"
 
 /*
  * EP93xx Physical Memory Map:
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 12eff8c8074d..e70bac011407 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -22,7 +22,6 @@
 
 #include "gpio-ep93xx.h"
 #include "hardware.h"
-#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ts72xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -413,6 +413,7 @@ static void __init bk3_init_machine(void)
 MACHINE_START(BK3, "Liebherr controller BK3.1")
 	/* Maintainer: Lukasz Majewski <lukma@denx.de> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ts72xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index e46281e60bf7..30d9cf3791eb 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -302,6 +302,7 @@ static void __init vision_init_machine(void)
 MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
 	.map_io		= vision_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
globally. Do the minimal conversion by setting .nr_irqs in each
machine descriptor.

Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
.nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
everywhere else.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Hubert Feurstein <hubert.feurstein@contec.at>
Cc: Lukasz Majewski <lukma@denx.de>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                               | 2 ++
 arch/arm/mach-ep93xx/adssphere.c               | 1 +
 arch/arm/mach-ep93xx/core.c                    | 1 +
 arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
 arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
 arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
 arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
 arch/arm/mach-ep93xx/simone.c                  | 1 +
 arch/arm/mach-ep93xx/snappercl15.c             | 1 +
 arch/arm/mach-ep93xx/soc.h                     | 1 +
 arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
 arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
 12 files changed, 23 insertions(+), 8 deletions(-)
 rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 31f024e6e925..5177e54cc14c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -358,6 +358,8 @@ config ARCH_EP93XX
 	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.
 
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 8d5e349a7a6d..0c48d3c5b8e7 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
 MACHINE_START(ADSSPHERE, "ADS Sphere board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index e4569a5acc3f..2d58e273c96d 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -47,6 +47,7 @@
 #include <asm/mach/map.h>
 
 #include "soc.h"
+#include "irqs.h"
 
 /*************************************************************************
  * Static I/O mappings that are needed for all EP93xx platforms
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index af0e22471ebd..4b90899a66e9 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
 MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -255,6 +256,7 @@ MACHINE_END
 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
 	/* Maintainer: George Kashperko <george@chas.com.ua> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -267,6 +269,7 @@ MACHINE_END
 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -279,6 +282,7 @@ MACHINE_END
 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
 	/* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -291,6 +295,7 @@ MACHINE_END
 MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -303,6 +308,7 @@ MACHINE_END
 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
 	/* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -315,6 +321,7 @@ MACHINE_END
 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -327,6 +334,7 @@ MACHINE_END
 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index d7f9890321eb..0b7043e3e178 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
 MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/irqs.h
similarity index 96%
rename from arch/arm/mach-ep93xx/include/mach/irqs.h
rename to arch/arm/mach-ep93xx/irqs.h
index 60c69c4ed7e1..353201b90c66 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/irqs.h
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/irqs.h
- */
-
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
@@ -77,7 +73,4 @@
 #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
 #define EP93XX_BOARD_IRQS		32
 
-#define NR_IRQS				(NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
-
-
 #endif
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index e6ead8ded6ee..c121c459aa17 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
 MACHINE_START(MICRO9, "Contec Micro9-High")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -88,6 +89,7 @@ MACHINE_END
 MACHINE_START(MICRO9M, "Contec Micro9-Mid")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -100,6 +102,7 @@ MACHINE_END
 MACHINE_START(MICRO9L, "Contec Micro9-Lite")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -112,6 +115,7 @@ MACHINE_END
 MACHINE_START(MICRO9S, "Contec Micro9-Slim")
 	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 5291053023b2..569e72413561 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
 	/* Maintainer: Ryan Mallon */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index e200d69471e9..1dfb725671b1 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
 MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
 	/* Maintainer: Ryan Mallon */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ep93xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index 94ef7f275f94..f0986e288d19 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -10,6 +10,7 @@
 #define _EP93XX_SOC_H
 
 #include <mach/ep93xx-regs.h>
+#include "irqs.h"
 
 /*
  * EP93xx Physical Memory Map:
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 12eff8c8074d..e70bac011407 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -22,7 +22,6 @@
 
 #include "gpio-ep93xx.h"
 #include "hardware.h"
-#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ts72xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
@@ -413,6 +413,7 @@ static void __init bk3_init_machine(void)
 MACHINE_START(BK3, "Liebherr controller BK3.1")
 	/* Maintainer: Lukasz Majewski <lukma@denx.de> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS,
 	.map_io		= ts72xx_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index e46281e60bf7..30d9cf3791eb 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -302,6 +302,7 @@ static void __init vision_init_machine(void)
 MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
 	/* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
 	.map_io		= vision_map_io,
 	.init_irq	= ep93xx_init_irq,
 	.init_time	= ep93xx_timer_init,
-- 
2.29.2


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

* [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
it there.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
 arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
 arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
 arch/arm/mach-ep93xx/soc.h                            | 2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)
 rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/ep93xx-regs.h
similarity index 94%
rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
rename to arch/arm/mach-ep93xx/ep93xx-regs.h
index 6839ea032e58..8fa3646de0a4 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
- */
-
 #ifndef __ASM_ARCH_EP93XX_REGS_H
 #define __ASM_ARCH_EP93XX_REGS_H
 
diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h b/arch/arm/mach-ep93xx/gpio-ep93xx.h
index 242af4a401ea..7b46eb7e5507 100644
--- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
+++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
@@ -4,7 +4,7 @@
 #ifndef __GPIO_EP93XX_H
 #define __GPIO_EP93XX_H
 
-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"
 
 #define EP93XX_GPIO_PHYS_BASE		EP93XX_APB_PHYS(0x00040000)
 #define EP93XX_GPIO_BASE		EP93XX_APB_IOMEM(0x00040000)
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index b3ec1db988db..e20bcab702b2 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -5,7 +5,6 @@
  * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  */
 
-#include <mach/ep93xx-regs.h>
 #include <asm/mach-types.h>
 
 static unsigned char __raw_readb(unsigned int ptr)
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index f0986e288d19..3245ebbd5069 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -9,7 +9,7 @@
 #ifndef _EP93XX_SOC_H
 #define _EP93XX_SOC_H
 
-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"
 #include "irqs.h"
 
 /*
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
it there.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
 arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
 arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
 arch/arm/mach-ep93xx/soc.h                            | 2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)
 rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/ep93xx-regs.h
similarity index 94%
rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
rename to arch/arm/mach-ep93xx/ep93xx-regs.h
index 6839ea032e58..8fa3646de0a4 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
- */
-
 #ifndef __ASM_ARCH_EP93XX_REGS_H
 #define __ASM_ARCH_EP93XX_REGS_H
 
diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h b/arch/arm/mach-ep93xx/gpio-ep93xx.h
index 242af4a401ea..7b46eb7e5507 100644
--- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
+++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
@@ -4,7 +4,7 @@
 #ifndef __GPIO_EP93XX_H
 #define __GPIO_EP93XX_H
 
-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"
 
 #define EP93XX_GPIO_PHYS_BASE		EP93XX_APB_PHYS(0x00040000)
 #define EP93XX_GPIO_BASE		EP93XX_APB_IOMEM(0x00040000)
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index b3ec1db988db..e20bcab702b2 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -5,7 +5,6 @@
  * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  */
 
-#include <mach/ep93xx-regs.h>
 #include <asm/mach-types.h>
 
 static unsigned char __raw_readb(unsigned int ptr)
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index f0986e288d19..3245ebbd5069 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -9,7 +9,7 @@
 #ifndef _EP93XX_SOC_H
 #define _EP93XX_SOC_H
 
-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"
 #include "irqs.h"
 
 /*
-- 
2.29.2


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

* [PATCH 05/12] ARM: ep93xx: multiplatform support
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

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"
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 05/12] ARM: ep93xx: multiplatform support
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

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"
-- 
2.29.2


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

* [PATCH 06/12] ARM: dove: multiplatform support
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches, Jason Cooper

From: Arnd Bergmann <arnd@arndb.de>

The dove platform is now ready to be enabled for multiplatform
support, this patch does the switch over by modifying the Kconfig file,
the defconfig and removing the last mach/*.h header that becomes obsolete
with this.

This work was originally done in 2015 as all the ARMv7 machiens
gove moved over to multiplatform builds, but at the time it conflicted
with some patches that Russell was trying to upstream, so we
left it at that.

I hope that there is no longer a need to keep dove separate from the
rest, so we can either add it to the other ARMv7 platforms, or just
replace it with the DT based platform code for the same hardware
in mach-mvebu and remove mach-dove entirely.

Acked-by: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                             | 14 --------
 arch/arm/configs/dove_defconfig              |  2 ++
 arch/arm/mach-dove/Kconfig                   | 16 ++++++---
 arch/arm/mach-dove/Makefile                  |  2 ++
 arch/arm/mach-dove/include/mach/uncompress.h | 34 --------------------
 5 files changed, 16 insertions(+), 52 deletions(-)
 delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2bd611beefe1..faf696173af7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -383,20 +383,6 @@ config ARCH_IXP4XX
 	help
 	  Support for Intel's IXP4XX (XScale) family of processors.
 
-config ARCH_DOVE
-	bool "Marvell Dove"
-	select CPU_PJ4
-	select GPIOLIB
-	select HAVE_PCI
-	select MVEBU_MBUS
-	select PINCTRL
-	select PINCTRL_DOVE
-	select PLAT_ORION_LEGACY
-	select SPARSE_IRQ
-	select PM_GENERIC_DOMAINS if PM
-	help
-	  Support for the Marvell Dove SoC 88AP510
-
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
 	select ARCH_MTD_XIP
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index 33074fdab2ea..f8fb4758f80d 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -8,6 +8,8 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V6 is not set
+CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_DOVE=y
 CONFIG_MACH_DOVE_DB=y
 CONFIG_MACH_CM_A510=y
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 7747fe64420a..c30c69c664ea 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -1,7 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0
-if ARCH_DOVE
+menuconfig ARCH_DOVE
+	bool "Marvell Dove" if ARCH_MULTI_V7
+	select CPU_PJ4
+	select GPIOLIB
+	select MVEBU_MBUS
+	select PINCTRL
+	select PINCTRL_DOVE
+	select PLAT_ORION_LEGACY
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  Support for the Marvell Dove SoC 88AP510
 
-menu "Marvell Dove Implementations"
+if ARCH_DOVE
 
 config DOVE_LEGACY
 	bool
@@ -21,6 +31,4 @@ config MACH_CM_A510
 	  Say 'Y' here if you want your kernel to support the
 	  CompuLab CM-A510 Board.
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
index cdf163cab738..e83f6492834d 100644
--- a/arch/arm/mach-dove/Makefile
+++ b/arch/arm/mach-dove/Makefile
@@ -1,4 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
+
 obj-y				+= common.o
 obj-$(CONFIG_DOVE_LEGACY)	+= irq.o mpp.o
 obj-$(CONFIG_PCI)		+= pcie.o
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
deleted file mode 100644
index ddf873f35e2b..000000000000
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define UART0_PHYS_BASE (0xf1000000 + 0x12000)
-
-#define UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
-#define UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
-
-#define LSR_THRE	0x20
-
-static inline void putc(const char c)
-{
-	int i;
-
-	for (i = 0; i < 0x1000; i++) {
-		/* Transmit fifo not full? */
-		if (*UART_LSR & LSR_THRE)
-			break;
-	}
-
-	*UART_THR = c;
-}
-
-static inline void flush(void)
-{
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/12] ARM: dove: multiplatform support
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches, Jason Cooper

From: Arnd Bergmann <arnd@arndb.de>

The dove platform is now ready to be enabled for multiplatform
support, this patch does the switch over by modifying the Kconfig file,
the defconfig and removing the last mach/*.h header that becomes obsolete
with this.

This work was originally done in 2015 as all the ARMv7 machiens
gove moved over to multiplatform builds, but at the time it conflicted
with some patches that Russell was trying to upstream, so we
left it at that.

I hope that there is no longer a need to keep dove separate from the
rest, so we can either add it to the other ARMv7 platforms, or just
replace it with the DT based platform code for the same hardware
in mach-mvebu and remove mach-dove entirely.

Acked-by: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                             | 14 --------
 arch/arm/configs/dove_defconfig              |  2 ++
 arch/arm/mach-dove/Kconfig                   | 16 ++++++---
 arch/arm/mach-dove/Makefile                  |  2 ++
 arch/arm/mach-dove/include/mach/uncompress.h | 34 --------------------
 5 files changed, 16 insertions(+), 52 deletions(-)
 delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2bd611beefe1..faf696173af7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -383,20 +383,6 @@ config ARCH_IXP4XX
 	help
 	  Support for Intel's IXP4XX (XScale) family of processors.
 
-config ARCH_DOVE
-	bool "Marvell Dove"
-	select CPU_PJ4
-	select GPIOLIB
-	select HAVE_PCI
-	select MVEBU_MBUS
-	select PINCTRL
-	select PINCTRL_DOVE
-	select PLAT_ORION_LEGACY
-	select SPARSE_IRQ
-	select PM_GENERIC_DOMAINS if PM
-	help
-	  Support for the Marvell Dove SoC 88AP510
-
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
 	select ARCH_MTD_XIP
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index 33074fdab2ea..f8fb4758f80d 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -8,6 +8,8 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V6 is not set
+CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_DOVE=y
 CONFIG_MACH_DOVE_DB=y
 CONFIG_MACH_CM_A510=y
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 7747fe64420a..c30c69c664ea 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -1,7 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0
-if ARCH_DOVE
+menuconfig ARCH_DOVE
+	bool "Marvell Dove" if ARCH_MULTI_V7
+	select CPU_PJ4
+	select GPIOLIB
+	select MVEBU_MBUS
+	select PINCTRL
+	select PINCTRL_DOVE
+	select PLAT_ORION_LEGACY
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  Support for the Marvell Dove SoC 88AP510
 
-menu "Marvell Dove Implementations"
+if ARCH_DOVE
 
 config DOVE_LEGACY
 	bool
@@ -21,6 +31,4 @@ config MACH_CM_A510
 	  Say 'Y' here if you want your kernel to support the
 	  CompuLab CM-A510 Board.
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
index cdf163cab738..e83f6492834d 100644
--- a/arch/arm/mach-dove/Makefile
+++ b/arch/arm/mach-dove/Makefile
@@ -1,4 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
+
 obj-y				+= common.o
 obj-$(CONFIG_DOVE_LEGACY)	+= irq.o mpp.o
 obj-$(CONFIG_PCI)		+= pcie.o
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
deleted file mode 100644
index ddf873f35e2b..000000000000
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define UART0_PHYS_BASE (0xf1000000 + 0x12000)
-
-#define UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
-#define UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
-
-#define LSR_THRE	0x20
-
-static inline void putc(const char c)
-{
-	int i;
-
-	for (i = 0; i < 0x1000; i++) {
-		/* Transmit fifo not full? */
-		if (*UART_LSR & LSR_THRE)
-			break;
-	}
-
-	*UART_THR = c;
-}
-
-static inline void flush(void)
-{
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-- 
2.29.2


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

* [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

BAST is the one machine that theoretically supports unmodified ISA
drivers for hardware on its PC/104 connector, using a custom version of
the inb()/outb() and inw()/outw() macros.

This is incompatible with the generic version used in asm/io.h, and
can't easily be used in a multiplatform kernel.

Removing the special case for 16-bit I/O port access on BAST gets us
closer to multiplatform, at the expense of any PC/104 users with 16-bit
cards having to either use an older kernel or modify their ISA drivers
to manually ioremap() the area and use readw()/write() in place of
inw()/outw(). Either way is probably ok, given that all of s3c24xx is
already on the way out next year, and many traditional ISA drivers are
already gone.

Machines other than BAST already have no support for ISA drivers, though a
couple of them do map one of the external chip-selects into the ISA port
range, using the same address for 8-bit and 16-bit I/O. It is unlikely
that anything actually uses this mapping, but it's also easy to keep
this working by mapping it to the normal platform-independent PCI I/O
base that is otherwise unused on s3c24xx.

The mach/map-base.h file is no longer referenced in global headers and
can be moved into the platform directory.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              |  1 -
 arch/arm/mach-s3c/Kconfig.s3c24xx             |  1 -
 arch/arm/mach-s3c/cpu.c                       |  2 +-
 arch/arm/mach-s3c/include/mach/io-s3c24xx.h   | 50 -------------------
 arch/arm/mach-s3c/include/mach/io.h           |  8 ---
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            |  2 +-
 arch/arm/mach-s3c/mach-anubis.c               |  5 --
 arch/arm/mach-s3c/mach-bast.c                 |  5 --
 arch/arm/mach-s3c/mach-osiris.c               |  5 --
 arch/arm/mach-s3c/mach-rx3715.c               |  6 ---
 arch/arm/mach-s3c/mach-smdk2416.c             | 10 ----
 arch/arm/mach-s3c/mach-smdk2440.c             | 10 ----
 arch/arm/mach-s3c/mach-smdk2443.c             | 10 ----
 arch/arm/mach-s3c/mach-vr1000.c               |  5 --
 .../mach-s3c/{include/mach => }/map-base.h    |  6 +++
 arch/arm/mach-s3c/map-s3c24xx.h               |  2 +-
 arch/arm/mach-s3c/map-s3c64xx.h               |  2 +-
 17 files changed, 10 insertions(+), 120 deletions(-)
 delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
 delete mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index faf696173af7..2242d2ae8854 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -444,7 +444,6 @@ config ARCH_S3C24XX
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
 	select GPIOLIB
-	select NEED_MACH_IO_H
 	select S3C2410_WATCHDOG
 	select SAMSUNG_ATAGS
 	select USE_OF
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index 000e3e234f71..d47df6427e89 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -181,7 +181,6 @@ config MACH_AML_M5900
 
 config ARCH_BAST
 	bool "Simtec Electronics BAST (EB2410ITX)"
-	select ISA
 	select MACH_BAST_IDE
 	select S3C2410_COMMON_DCLK
 	select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
diff --git a/arch/arm/mach-s3c/cpu.c b/arch/arm/mach-s3c/cpu.c
index 6e9772555f0d..05a6b4be1768 100644
--- a/arch/arm/mach-s3c/cpu.c
+++ b/arch/arm/mach-s3c/cpu.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "cpu.h"
 
 unsigned long samsung_cpu_id;
diff --git a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h b/arch/arm/mach-s3c/include/mach/io-s3c24xx.h
deleted file mode 100644
index 738b775d3336..000000000000
--- a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-s3c2410/include/mach/io.h
- *  from arch/arm/mach-rpc/include/mach/io.h
- *
- * Copyright (C) 1997 Russell King
- *	     (C) 2003 Simtec Electronics
-*/
-
-#ifndef __ASM_ARM_ARCH_IO_S3C24XX_H
-#define __ASM_ARM_ARCH_IO_S3C24XX_H
-
-#include <mach/map-base.h>
-
-/*
- * ISA style IO, for each machine to sort out mappings for,
- * if it implements it. We reserve two 16M regions for ISA,
- * so the PC/104 can use separate addresses for 8-bit and
- * 16-bit port I/O.
- */
-#define PCIO_BASE		S3C_ADDR(0x02000000)
-#define IO_SPACE_LIMIT		0x00ffffff
-#define S3C24XX_VA_ISA_WORD	(PCIO_BASE)
-#define S3C24XX_VA_ISA_BYTE	(PCIO_BASE + 0x01000000)
-
-#ifdef CONFIG_ISA
-
-#define inb(p)		readb(S3C24XX_VA_ISA_BYTE + (p))
-#define inw(p)		readw(S3C24XX_VA_ISA_WORD + (p))
-#define inl(p)		readl(S3C24XX_VA_ISA_WORD + (p))
-
-#define outb(v,p)	writeb((v), S3C24XX_VA_ISA_BYTE + (p))
-#define outw(v,p)	writew((v), S3C24XX_VA_ISA_WORD + (p))
-#define outl(v,p)	writel((v), S3C24XX_VA_ISA_WORD + (p))
-
-#define insb(p,d,l)	readsb(S3C24XX_VA_ISA_BYTE + (p),d,l)
-#define insw(p,d,l)	readsw(S3C24XX_VA_ISA_WORD + (p),d,l)
-#define insl(p,d,l)	readsl(S3C24XX_VA_ISA_WORD + (p),d,l)
-
-#define outsb(p,d,l)	writesb(S3C24XX_VA_ISA_BYTE + (p),d,l)
-#define outsw(p,d,l)	writesw(S3C24XX_VA_ISA_WORD + (p),d,l)
-#define outsl(p,d,l)	writesl(S3C24XX_VA_ISA_WORD + (p),d,l)
-
-#else
-
-#define __io(x) (PCIO_BASE + (x))
-
-#endif
-
-#endif
diff --git a/arch/arm/mach-s3c/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
deleted file mode 100644
index 30a0135708dc..000000000000
--- a/arch/arm/mach-s3c/include/mach/io.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2020 Krzysztof Kozlowski <krzk@kernel.org>
- */
-
-#ifdef CONFIG_ARCH_S3C24XX
-#include "io-s3c24xx.h"
-#endif
diff --git a/arch/arm/mach-s3c/irq-pm-s3c24xx.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
index 4d5e28312d91..55f41135ad70 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
@@ -15,7 +15,7 @@
 
 #include "cpu.h"
 #include "pm.h"
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 #include "regs-irq.h"
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 04147cc0adcc..60df40052209 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -57,11 +57,6 @@ static struct map_desc anubis_iodesc[] __initdata = {
 	.pfn		= __phys_to_pfn(0x0),
 	.length		= SZ_4M,
 	.type		= MT_DEVICE,
-  }, {
-	.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	.pfn		= __phys_to_pfn(0x0),
-	.length 	= SZ_4M,
-	.type		= MT_DEVICE,
   },
 
   /* we could possibly compress the next set down into a set of smaller tables
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 27e8d5950228..5ac24e406157 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -75,11 +75,6 @@ static struct map_desc bast_iodesc[] __initdata = {
 	  .pfn		= PA_CS2(BAST_PA_ISAIO),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= PA_CS3(BAST_PA_ISAIO),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
   /* bast CPLD control registers, and external interrupt controls */
   {
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 3aefb9d22340..8387773f4fd4 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -58,11 +58,6 @@ static struct map_desc osiris_iodesc[] __initdata = {
 	  .pfn		= __phys_to_pfn(S3C2410_CS5),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= __phys_to_pfn(S3C2410_CS5),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
 
   /* CPLD control registers */
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index 9fd2d9dc3689..586cb0fdfce0 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -48,13 +48,7 @@
 
 static struct map_desc rx3715_iodesc[] __initdata = {
 	/* dump ISA space somewhere unused */
-
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS3),
-		.length		= SZ_1M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS3),
 		.length		= SZ_1M,
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 4d883a792cc6..38b4a7cd4178 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -53,16 +53,6 @@ static struct map_desc smdk2416_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index 7f6fe0db04f3..392554b1eba2 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -43,16 +43,6 @@ static struct map_desc smdk2440_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index fc54c91ade56..4c541a03e49e 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -40,16 +40,6 @@ static struct map_desc smdk2443_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 5c3d07cf2e79..3aa8c707f8a2 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -67,11 +67,6 @@ static struct map_desc vr1000_iodesc[] __initdata = {
 	  .pfn		= PA_CS2(BAST_PA_ISAIO),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= PA_CS3(BAST_PA_ISAIO),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
 
   /*  CPLD control registers, and external interrupt controls */
diff --git a/arch/arm/mach-s3c/include/mach/map-base.h b/arch/arm/mach-s3c/map-base.h
similarity index 87%
rename from arch/arm/mach-s3c/include/mach/map-base.h
rename to arch/arm/mach-s3c/map-base.h
index 34b39ded0e2e..463a995b399b 100644
--- a/arch/arm/mach-s3c/include/mach/map-base.h
+++ b/arch/arm/mach-s3c/map-base.h
@@ -33,6 +33,12 @@
 #define S3C_VA_WATCHDOG	S3C_ADDR(0x00400000)	/* watchdog */
 #define S3C_VA_UART	S3C_ADDR(0x01000000)	/* UART */
 
+/* ISA device mapping for BAST to use with inb()/outb() on 8-bit I/O.
+ * 16-bit I/O on BAST now requires driver modifications to manually
+ * ioremap CS3.
+ */
+#define S3C24XX_VA_ISA_BYTE	PCI_IOBASE
+
 /* This is used for the CPU specific mappings that may be needed, so that
  * they do not need to directly used S3C_ADDR() and thus make it easier to
  * modify the space for mapping.
diff --git a/arch/arm/mach-s3c/map-s3c24xx.h b/arch/arm/mach-s3c/map-s3c24xx.h
index b5dba78a9dd7..f8d075b11d6f 100644
--- a/arch/arm/mach-s3c/map-s3c24xx.h
+++ b/arch/arm/mach-s3c/map-s3c24xx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 /*
diff --git a/arch/arm/mach-s3c/map-s3c64xx.h b/arch/arm/mach-s3c/map-s3c64xx.h
index d7740d2a77c4..9de1c58bcb06 100644
--- a/arch/arm/mach-s3c/map-s3c64xx.h
+++ b/arch/arm/mach-s3c/map-s3c64xx.h
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H __FILE__
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 /*
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

BAST is the one machine that theoretically supports unmodified ISA
drivers for hardware on its PC/104 connector, using a custom version of
the inb()/outb() and inw()/outw() macros.

This is incompatible with the generic version used in asm/io.h, and
can't easily be used in a multiplatform kernel.

Removing the special case for 16-bit I/O port access on BAST gets us
closer to multiplatform, at the expense of any PC/104 users with 16-bit
cards having to either use an older kernel or modify their ISA drivers
to manually ioremap() the area and use readw()/write() in place of
inw()/outw(). Either way is probably ok, given that all of s3c24xx is
already on the way out next year, and many traditional ISA drivers are
already gone.

Machines other than BAST already have no support for ISA drivers, though a
couple of them do map one of the external chip-selects into the ISA port
range, using the same address for 8-bit and 16-bit I/O. It is unlikely
that anything actually uses this mapping, but it's also easy to keep
this working by mapping it to the normal platform-independent PCI I/O
base that is otherwise unused on s3c24xx.

The mach/map-base.h file is no longer referenced in global headers and
can be moved into the platform directory.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              |  1 -
 arch/arm/mach-s3c/Kconfig.s3c24xx             |  1 -
 arch/arm/mach-s3c/cpu.c                       |  2 +-
 arch/arm/mach-s3c/include/mach/io-s3c24xx.h   | 50 -------------------
 arch/arm/mach-s3c/include/mach/io.h           |  8 ---
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            |  2 +-
 arch/arm/mach-s3c/mach-anubis.c               |  5 --
 arch/arm/mach-s3c/mach-bast.c                 |  5 --
 arch/arm/mach-s3c/mach-osiris.c               |  5 --
 arch/arm/mach-s3c/mach-rx3715.c               |  6 ---
 arch/arm/mach-s3c/mach-smdk2416.c             | 10 ----
 arch/arm/mach-s3c/mach-smdk2440.c             | 10 ----
 arch/arm/mach-s3c/mach-smdk2443.c             | 10 ----
 arch/arm/mach-s3c/mach-vr1000.c               |  5 --
 .../mach-s3c/{include/mach => }/map-base.h    |  6 +++
 arch/arm/mach-s3c/map-s3c24xx.h               |  2 +-
 arch/arm/mach-s3c/map-s3c64xx.h               |  2 +-
 17 files changed, 10 insertions(+), 120 deletions(-)
 delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
 delete mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index faf696173af7..2242d2ae8854 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -444,7 +444,6 @@ config ARCH_S3C24XX
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
 	select GPIOLIB
-	select NEED_MACH_IO_H
 	select S3C2410_WATCHDOG
 	select SAMSUNG_ATAGS
 	select USE_OF
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index 000e3e234f71..d47df6427e89 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -181,7 +181,6 @@ config MACH_AML_M5900
 
 config ARCH_BAST
 	bool "Simtec Electronics BAST (EB2410ITX)"
-	select ISA
 	select MACH_BAST_IDE
 	select S3C2410_COMMON_DCLK
 	select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
diff --git a/arch/arm/mach-s3c/cpu.c b/arch/arm/mach-s3c/cpu.c
index 6e9772555f0d..05a6b4be1768 100644
--- a/arch/arm/mach-s3c/cpu.c
+++ b/arch/arm/mach-s3c/cpu.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "cpu.h"
 
 unsigned long samsung_cpu_id;
diff --git a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h b/arch/arm/mach-s3c/include/mach/io-s3c24xx.h
deleted file mode 100644
index 738b775d3336..000000000000
--- a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-s3c2410/include/mach/io.h
- *  from arch/arm/mach-rpc/include/mach/io.h
- *
- * Copyright (C) 1997 Russell King
- *	     (C) 2003 Simtec Electronics
-*/
-
-#ifndef __ASM_ARM_ARCH_IO_S3C24XX_H
-#define __ASM_ARM_ARCH_IO_S3C24XX_H
-
-#include <mach/map-base.h>
-
-/*
- * ISA style IO, for each machine to sort out mappings for,
- * if it implements it. We reserve two 16M regions for ISA,
- * so the PC/104 can use separate addresses for 8-bit and
- * 16-bit port I/O.
- */
-#define PCIO_BASE		S3C_ADDR(0x02000000)
-#define IO_SPACE_LIMIT		0x00ffffff
-#define S3C24XX_VA_ISA_WORD	(PCIO_BASE)
-#define S3C24XX_VA_ISA_BYTE	(PCIO_BASE + 0x01000000)
-
-#ifdef CONFIG_ISA
-
-#define inb(p)		readb(S3C24XX_VA_ISA_BYTE + (p))
-#define inw(p)		readw(S3C24XX_VA_ISA_WORD + (p))
-#define inl(p)		readl(S3C24XX_VA_ISA_WORD + (p))
-
-#define outb(v,p)	writeb((v), S3C24XX_VA_ISA_BYTE + (p))
-#define outw(v,p)	writew((v), S3C24XX_VA_ISA_WORD + (p))
-#define outl(v,p)	writel((v), S3C24XX_VA_ISA_WORD + (p))
-
-#define insb(p,d,l)	readsb(S3C24XX_VA_ISA_BYTE + (p),d,l)
-#define insw(p,d,l)	readsw(S3C24XX_VA_ISA_WORD + (p),d,l)
-#define insl(p,d,l)	readsl(S3C24XX_VA_ISA_WORD + (p),d,l)
-
-#define outsb(p,d,l)	writesb(S3C24XX_VA_ISA_BYTE + (p),d,l)
-#define outsw(p,d,l)	writesw(S3C24XX_VA_ISA_WORD + (p),d,l)
-#define outsl(p,d,l)	writesl(S3C24XX_VA_ISA_WORD + (p),d,l)
-
-#else
-
-#define __io(x) (PCIO_BASE + (x))
-
-#endif
-
-#endif
diff --git a/arch/arm/mach-s3c/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
deleted file mode 100644
index 30a0135708dc..000000000000
--- a/arch/arm/mach-s3c/include/mach/io.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2020 Krzysztof Kozlowski <krzk@kernel.org>
- */
-
-#ifdef CONFIG_ARCH_S3C24XX
-#include "io-s3c24xx.h"
-#endif
diff --git a/arch/arm/mach-s3c/irq-pm-s3c24xx.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
index 4d5e28312d91..55f41135ad70 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
@@ -15,7 +15,7 @@
 
 #include "cpu.h"
 #include "pm.h"
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 #include "regs-irq.h"
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 04147cc0adcc..60df40052209 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -57,11 +57,6 @@ static struct map_desc anubis_iodesc[] __initdata = {
 	.pfn		= __phys_to_pfn(0x0),
 	.length		= SZ_4M,
 	.type		= MT_DEVICE,
-  }, {
-	.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	.pfn		= __phys_to_pfn(0x0),
-	.length 	= SZ_4M,
-	.type		= MT_DEVICE,
   },
 
   /* we could possibly compress the next set down into a set of smaller tables
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 27e8d5950228..5ac24e406157 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -75,11 +75,6 @@ static struct map_desc bast_iodesc[] __initdata = {
 	  .pfn		= PA_CS2(BAST_PA_ISAIO),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= PA_CS3(BAST_PA_ISAIO),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
   /* bast CPLD control registers, and external interrupt controls */
   {
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 3aefb9d22340..8387773f4fd4 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -58,11 +58,6 @@ static struct map_desc osiris_iodesc[] __initdata = {
 	  .pfn		= __phys_to_pfn(S3C2410_CS5),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= __phys_to_pfn(S3C2410_CS5),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
 
   /* CPLD control registers */
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index 9fd2d9dc3689..586cb0fdfce0 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -48,13 +48,7 @@
 
 static struct map_desc rx3715_iodesc[] __initdata = {
 	/* dump ISA space somewhere unused */
-
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS3),
-		.length		= SZ_1M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS3),
 		.length		= SZ_1M,
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 4d883a792cc6..38b4a7cd4178 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -53,16 +53,6 @@ static struct map_desc smdk2416_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index 7f6fe0db04f3..392554b1eba2 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -43,16 +43,6 @@ static struct map_desc smdk2440_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index fc54c91ade56..4c541a03e49e 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -40,16 +40,6 @@ static struct map_desc smdk2443_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
 	{
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD,
-		.pfn		= __phys_to_pfn(S3C2410_CS2),
-		.length		= 0x10000,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (u32)S3C24XX_VA_ISA_WORD + 0x10000,
-		.pfn		= __phys_to_pfn(S3C2410_CS2 + (1<<24)),
-		.length		= SZ_4M,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (u32)S3C24XX_VA_ISA_BYTE,
 		.pfn		= __phys_to_pfn(S3C2410_CS2),
 		.length		= 0x10000,
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 5c3d07cf2e79..3aa8c707f8a2 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -67,11 +67,6 @@ static struct map_desc vr1000_iodesc[] __initdata = {
 	  .pfn		= PA_CS2(BAST_PA_ISAIO),
 	  .length	= SZ_16M,
 	  .type		= MT_DEVICE,
-  }, {
-	  .virtual	= (u32)S3C24XX_VA_ISA_WORD,
-	  .pfn		= PA_CS3(BAST_PA_ISAIO),
-	  .length	= SZ_16M,
-	  .type		= MT_DEVICE,
   },
 
   /*  CPLD control registers, and external interrupt controls */
diff --git a/arch/arm/mach-s3c/include/mach/map-base.h b/arch/arm/mach-s3c/map-base.h
similarity index 87%
rename from arch/arm/mach-s3c/include/mach/map-base.h
rename to arch/arm/mach-s3c/map-base.h
index 34b39ded0e2e..463a995b399b 100644
--- a/arch/arm/mach-s3c/include/mach/map-base.h
+++ b/arch/arm/mach-s3c/map-base.h
@@ -33,6 +33,12 @@
 #define S3C_VA_WATCHDOG	S3C_ADDR(0x00400000)	/* watchdog */
 #define S3C_VA_UART	S3C_ADDR(0x01000000)	/* UART */
 
+/* ISA device mapping for BAST to use with inb()/outb() on 8-bit I/O.
+ * 16-bit I/O on BAST now requires driver modifications to manually
+ * ioremap CS3.
+ */
+#define S3C24XX_VA_ISA_BYTE	PCI_IOBASE
+
 /* This is used for the CPU specific mappings that may be needed, so that
  * they do not need to directly used S3C_ADDR() and thus make it easier to
  * modify the space for mapping.
diff --git a/arch/arm/mach-s3c/map-s3c24xx.h b/arch/arm/mach-s3c/map-s3c24xx.h
index b5dba78a9dd7..f8d075b11d6f 100644
--- a/arch/arm/mach-s3c/map-s3c24xx.h
+++ b/arch/arm/mach-s3c/map-s3c24xx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 /*
diff --git a/arch/arm/mach-s3c/map-s3c64xx.h b/arch/arm/mach-s3c/map-s3c64xx.h
index d7740d2a77c4..9de1c58bcb06 100644
--- a/arch/arm/mach-s3c/map-s3c64xx.h
+++ b/arch/arm/mach-s3c/map-s3c64xx.h
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H __FILE__
 
-#include <mach/map-base.h>
+#include "map-base.h"
 #include "map-s3c.h"
 
 /*
-- 
2.29.2


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

* [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

As a final bit of preparation for converting to ARCH_MULTIPLATFORM,
change the interrupt handling for s3c24xx to use sparse IRQs.

Since the number of possible interrupts is already fixed and relatively
small per chip, just make it use all legacy interrupts preallocated
using the .nr_irqs field in the machine descriptor, rather than actually
allocating domains on the fly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                               |  2 ++
 arch/arm/mach-s3c/bast-ide.c                   |  2 +-
 arch/arm/mach-s3c/bast-irq.c                   |  2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c          |  2 +-
 arch/arm/mach-s3c/dev-uart-s3c64xx.c           |  2 +-
 arch/arm/mach-s3c/devs.c                       |  2 +-
 arch/arm/mach-s3c/gpio-samsung.c               |  2 +-
 arch/arm/mach-s3c/irq-s3c24xx.c                |  2 +-
 .../mach-s3c/{include/mach => }/irqs-s3c24xx.h | 18 ++++++++++++------
 .../mach-s3c/{include/mach => }/irqs-s3c64xx.h |  0
 arch/arm/mach-s3c/{include/mach => }/irqs.h    |  0
 arch/arm/mach-s3c/mach-amlm5900.c              |  2 ++
 arch/arm/mach-s3c/mach-anubis.c                |  1 +
 arch/arm/mach-s3c/mach-anw6410.c               |  2 +-
 arch/arm/mach-s3c/mach-at2440evb.c             |  1 +
 arch/arm/mach-s3c/mach-bast.c                  |  1 +
 arch/arm/mach-s3c/mach-crag6410-module.c       |  2 +-
 arch/arm/mach-s3c/mach-crag6410.c              |  2 +-
 arch/arm/mach-s3c/mach-gta02.c                 |  1 +
 arch/arm/mach-s3c/mach-h1940.c                 |  1 +
 arch/arm/mach-s3c/mach-hmt.c                   |  2 +-
 arch/arm/mach-s3c/mach-jive.c                  |  2 +-
 arch/arm/mach-s3c/mach-mini2440.c              |  3 ++-
 arch/arm/mach-s3c/mach-mini6410.c              |  2 +-
 arch/arm/mach-s3c/mach-n30.c                   |  2 ++
 arch/arm/mach-s3c/mach-ncp.c                   |  2 +-
 arch/arm/mach-s3c/mach-nexcoder.c              |  1 +
 arch/arm/mach-s3c/mach-osiris.c                |  1 +
 arch/arm/mach-s3c/mach-otom.c                  |  1 +
 arch/arm/mach-s3c/mach-qt2410.c                |  1 +
 arch/arm/mach-s3c/mach-real6410.c              |  2 +-
 arch/arm/mach-s3c/mach-rx1950.c                |  1 +
 arch/arm/mach-s3c/mach-rx3715.c                |  1 +
 arch/arm/mach-s3c/mach-smartq5.c               |  2 +-
 arch/arm/mach-s3c/mach-smartq7.c               |  2 +-
 arch/arm/mach-s3c/mach-smdk2410.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2413.c              |  3 +++
 arch/arm/mach-s3c/mach-smdk2416.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2440.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2443.c              |  2 +-
 arch/arm/mach-s3c/mach-smdk6400.c              |  2 +-
 arch/arm/mach-s3c/mach-smdk6410.c              |  2 +-
 arch/arm/mach-s3c/mach-tct_hammer.c            |  1 +
 arch/arm/mach-s3c/mach-vr1000.c                |  1 +
 arch/arm/mach-s3c/mach-vstms.c                 |  1 +
 arch/arm/mach-s3c/pl080.c                      |  2 +-
 arch/arm/mach-s3c/pm-core-s3c24xx.h            |  2 +-
 arch/arm/mach-s3c/pm-s3c2412.c                 |  2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                 |  2 +-
 arch/arm/mach-s3c/pm.c                         |  2 +-
 arch/arm/mach-s3c/s3c2443.c                    |  2 +-
 arch/arm/mach-s3c/s3c24xx.h                    |  2 +-
 arch/arm/mach-s3c/s3c64xx.c                    |  2 +-
 arch/arm/mach-s3c/simtec-usb.c                 |  2 +-
 54 files changed, 69 insertions(+), 36 deletions(-)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2242d2ae8854..c06e008c90ab 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -444,8 +444,10 @@ config ARCH_S3C24XX
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
 	select GPIOLIB
+	select IRQ_DOMAIN
 	select S3C2410_WATCHDOG
 	select SAMSUNG_ATAGS
+	select SPARSE_IRQ
 	select USE_OF
 	select WATCHDOG
 	help
diff --git a/arch/arm/mach-s3c/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
index da64db1811d8..67f0adc1fec0 100644
--- a/arch/arm/mach-s3c/bast-ide.c
+++ b/arch/arm/mach-s3c/bast-ide.c
@@ -20,7 +20,7 @@
 #include <asm/mach/irq.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index d299f124e6dc..cfc2ddc65513 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -16,7 +16,7 @@
 #include <asm/mach/irq.h>
 
 #include "regs-irq.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c/dev-audio-s3c64xx.c b/arch/arm/mach-s3c/dev-audio-s3c64xx.c
index fc2f077afd24..909e82c148ba 100644
--- a/arch/arm/mach-s3c/dev-audio-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-audio-s3c64xx.c
@@ -10,7 +10,7 @@
 #include <linux/gpio.h>
 #include <linux/export.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/dev-uart-s3c64xx.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
index 8288e8d6c092..f9c947b8971b 100644
--- a/arch/arm/mach-s3c/dev-uart-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
@@ -16,7 +16,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "devs.h"
 
diff --git a/arch/arm/mach-s3c/devs.c b/arch/arm/mach-s3c/devs.c
index 1e266fc24f9b..9ac07c023adf 100644
--- a/arch/arm/mach-s3c/devs.c
+++ b/arch/arm/mach-s3c/devs.c
@@ -38,7 +38,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "gpio-samsung.h"
 #include "gpio-cfg.h"
diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
index fda2c01f5a08..b7fc7c41309c 100644
--- a/arch/arm/mach-s3c/gpio-samsung.c
+++ b/arch/arm/mach-s3c/gpio-samsung.c
@@ -26,7 +26,7 @@
 
 #include <asm/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
index 3776d5206f9b..088cc04b7431 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-s3c24xx.c
@@ -26,7 +26,7 @@
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-irq.h"
 #include "regs-gpio.h"
 
diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h b/arch/arm/mach-s3c/irqs-s3c24xx.h
similarity index 95%
rename from arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
rename to arch/arm/mach-s3c/irqs-s3c24xx.h
index aaf3bae08b52..fecbf7e440c6 100644
--- a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
+++ b/arch/arm/mach-s3c/irqs-s3c24xx.h
@@ -108,6 +108,8 @@
 #define IRQ_TC			S3C2410_IRQSUB(9)
 #define IRQ_ADC			S3C2410_IRQSUB(10)
 
+#define NR_IRQS_S3C2410		(S3C2410_IRQSUB(10) + 1)
+
 /* extra irqs for s3c2412 */
 
 #define IRQ_S3C2412_CFSDI	S3C2410_IRQ(21)
@@ -115,6 +117,7 @@
 #define IRQ_S3C2412_SDI		S3C2410_IRQSUB(13)
 #define IRQ_S3C2412_CF		S3C2410_IRQSUB(14)
 
+#define NR_IRQS_S3C2412		(S3C2410_IRQSUB(14) + 1)
 
 #define IRQ_S3C2416_EINT8t15	S3C2410_IRQ(5)
 #define IRQ_S3C2416_DMA		S3C2410_IRQ(17)
@@ -146,13 +149,20 @@
 #define IRQ_S3C2416_I2S0	S3C2416_IRQ(6)
 #define IRQ_S3C2416_I2S1	S3C2416_IRQ(7)
 
-/* extra irqs for s3c2440 */
+#define NR_IRQS_S3C2416		(S3C2416_IRQ(7) + 1)
+
+/* extra irqs for s3c2440/s3c2442 */
 
 #define IRQ_S3C2440_CAM_C	S3C2410_IRQSUB(11)	/* S3C2443 too */
 #define IRQ_S3C2440_CAM_P	S3C2410_IRQSUB(12)	/* S3C2443 too */
+
+#define NR_IRQS_S3C2442		(S3C2410_IRQSUB(12) + 1)
+
 #define IRQ_S3C2440_WDT		S3C2410_IRQSUB(13)
 #define IRQ_S3C2440_AC97	S3C2410_IRQSUB(14)
 
+#define NR_IRQS_S3C2440		(S3C2410_IRQSUB(14) + 1)
+
 /* irqs for s3c2443 */
 
 #define IRQ_S3C2443_DMA		S3C2410_IRQ(17)		/* IRQ_DMA1 */
@@ -186,11 +196,7 @@
 #define IRQ_S3C2443_WDT		S3C2410_IRQSUB(27)
 #define IRQ_S3C2443_AC97	S3C2410_IRQSUB(28)
 
-#if defined(CONFIG_CPU_S3C2416)
-#define NR_IRQS (IRQ_S3C2416_I2S1 + 1)
-#else
-#define NR_IRQS (IRQ_S3C2443_AC97 + 1)
-#endif
+#define NR_IRQS_S3C2443		(S3C2410_IRQSUB(28) + 1)
 
 /* compatibility define. */
 #define IRQ_UART3		IRQ_S3C2443_UART3
diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h b/arch/arm/mach-s3c/irqs-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
rename to arch/arm/mach-s3c/irqs-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/irqs.h b/arch/arm/mach-s3c/irqs.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/irqs.h
rename to arch/arm/mach-s3c/irqs.h
diff --git a/arch/arm/mach-s3c/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
index 94c4512ace17..f85e5885e9b4 100644
--- a/arch/arm/mach-s3c/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -239,7 +239,9 @@ static void __init amlm5900_init(void)
 
 MACHINE_START(AML_M5900, "AML_M5900")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= amlm5900_map_io,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= amlm5900_init,
 	.init_time	= amlm5900_init_time,
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 60df40052209..4536f3e66e27 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -414,6 +414,7 @@ static void __init anubis_init(void)
 MACHINE_START(ANUBIS, "Simtec-Anubis")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= anubis_map_io,
 	.init_machine	= anubis_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
index 825714e9ac66..b67eae43e04f 100644
--- a/arch/arm/mach-s3c/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -40,7 +40,7 @@
 
 #include "devs.h"
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
 
diff --git a/arch/arm/mach-s3c/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
index c6a5a51d84aa..743403d873e0 100644
--- a/arch/arm/mach-s3c/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -225,6 +225,7 @@ static void __init at2440evb_init(void)
 
 MACHINE_START(AT2440EVB, "AT2440EVB")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= at2440evb_map_io,
 	.init_machine	= at2440evb_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 5ac24e406157..a33ceab81e09 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -575,6 +575,7 @@ static void __init bast_init(void)
 MACHINE_START(BAST, "Simtec-BAST")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= bast_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= bast_init,
diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
index 5d1d4b67a4b7..4edde13b89b5 100644
--- a/arch/arm/mach-s3c/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c/mach-crag6410-module.c
@@ -28,7 +28,7 @@
 #include <linux/platform_data/spi-s3c64xx.h>
 
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "crag6410.h"
 
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index e3e0fe897bcc..9a45474d1bf7 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -47,7 +47,7 @@
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "fb.h"
 #include "sdhci.h"
diff --git a/arch/arm/mach-s3c/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
index 418939ce0fc3..abfdce765525 100644
--- a/arch/arm/mach-s3c/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -572,6 +572,7 @@ static void __init gta02_init_time(void)
 MACHINE_START(NEO1973_GTA02, "GTA02")
 	/* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2442,
 	.map_io		= gta02_map_io,
 	.init_irq	= s3c2442_init_irq,
 	.init_machine	= gta02_machine_init,
diff --git a/arch/arm/mach-s3c/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
index 8a43ed1c4c4d..032b18837855 100644
--- a/arch/arm/mach-s3c/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -793,6 +793,7 @@ static void __init h1940_init(void)
 MACHINE_START(H1940, "IPAQ-H1940")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= h1940_map_io,
 	.reserve	= h1940_reserve,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
index b287e9987311..49ba16c447aa 100644
--- a/arch/arm/mach-s3c/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -26,7 +26,7 @@
 
 #include <video/samsung_fimd.h>
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
diff --git a/arch/arm/mach-s3c/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
index 0d7d408c3729..e32773175944 100644
--- a/arch/arm/mach-s3c/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -677,7 +677,7 @@ static void __init jive_machine_init(void)
 MACHINE_START(JIVE, "JIVE")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
-
+	.nr_irqs	= NR_IRQS_S3C2412,
 	.init_irq	= s3c2412_init_irq,
 	.map_io		= jive_map_io,
 	.init_machine	= jive_machine_init,
diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
index 551ec660ab59..131015cc0c34 100644
--- a/arch/arm/mach-s3c/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -35,7 +35,7 @@
 
 #include "regs-gpio.h"
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
@@ -789,6 +789,7 @@ static void __init mini2440_init(void)
 MACHINE_START(MINI2440, "MINI2440")
 	/* Maintainer: Michel Pollet <buserror@gmail.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= mini2440_map_io,
 	.init_machine	= mini2440_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
index c14c2e27127b..058ae9e8b89f 100644
--- a/arch/arm/mach-s3c/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -35,7 +35,7 @@
 #include <linux/platform_data/mmc-sdhci-s3c.h>
 #include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
diff --git a/arch/arm/mach-s3c/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
index e40c1fcf418c..75f5dc6351a1 100644
--- a/arch/arm/mach-s3c/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -656,6 +656,7 @@ MACHINE_START(N30, "Acer-N30")
 				Ben Dooks <ben-linux@fluff.org>
 	*/
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_time	= n30_init_time,
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
@@ -666,6 +667,7 @@ MACHINE_START(N35, "Acer-N35")
 	/* Maintainer: Christer Weinigel <christer@weinigel.se>
 	*/
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_time	= n30_init_time,
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
index 1a45bed56622..1e65f8bce5c4 100644
--- a/arch/arm/mach-s3c/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -24,7 +24,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
index 2a454c919658..d17a3fcb7425 100644
--- a/arch/arm/mach-s3c/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -154,6 +154,7 @@ static void __init nexcoder_init(void)
 MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
 	/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= nexcoder_map_io,
 	.init_machine	= nexcoder_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 8387773f4fd4..d900d1354de1 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -397,6 +397,7 @@ static void __init osiris_init(void)
 MACHINE_START(OSIRIS, "Simtec-OSIRIS")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= osiris_map_io,
 	.init_irq	= s3c2440_init_irq,
 	.init_machine	= osiris_init,
diff --git a/arch/arm/mach-s3c/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
index 460ee97766cd..3a2db2f58833 100644
--- a/arch/arm/mach-s3c/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -116,6 +116,7 @@ static void __init otom11_init(void)
 MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
 	/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= otom11_map_io,
 	.init_machine	= otom11_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
index f88b961798fd..36fe0684a438 100644
--- a/arch/arm/mach-s3c/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -367,6 +367,7 @@ static void __init qt2410_machine_init(void)
 
 MACHINE_START(QT2410, "QT2410")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= qt2410_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= qt2410_machine_init,
diff --git a/arch/arm/mach-s3c/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
index 9d218a53d631..8c10ebc38a9c 100644
--- a/arch/arm/mach-s3c/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -27,7 +27,7 @@
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <linux/soc/samsung/s3c-adc.h>
 #include "cpu.h"
diff --git a/arch/arm/mach-s3c/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
index 313e080e179e..7a3e7c0a6484 100644
--- a/arch/arm/mach-s3c/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -868,6 +868,7 @@ static void __init rx1950_reserve(void)
 MACHINE_START(RX1950, "HP iPAQ RX1950")
     /* Maintainers: Vasily Khoruzhick */
 	.atag_offset = 0x100,
+	.nr_irqs	= NR_IRQS_S3C2442,
 	.map_io = rx1950_map_io,
 	.reserve	= rx1950_reserve,
 	.init_irq	= s3c2442_init_irq,
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index 586cb0fdfce0..52b3c38acbb2 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -204,6 +204,7 @@ static void __init rx3715_init_machine(void)
 MACHINE_START(RX3715, "IPAQ-RX3715")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= rx3715_map_io,
 	.reserve	= rx3715_reserve,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
index 8c940227e810..ce3fce0bba20 100644
--- a/arch/arm/mach-s3c/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -14,7 +14,7 @@
 #include <asm/mach/arch.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
index ab243969d6d0..78ca0e704797 100644
--- a/arch/arm/mach-s3c/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -14,7 +14,7 @@
 #include <asm/mach/arch.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
index ca83d5a7d101..76b0a8846616 100644
--- a/arch/arm/mach-s3c/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -104,6 +104,7 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
 				    * to SMDK2410 */
 	/* Maintainer: Jonas Dietsche */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= smdk2410_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= smdk2410_init,
diff --git a/arch/arm/mach-s3c/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
index c43095b321d7..f1f0ec174579 100644
--- a/arch/arm/mach-s3c/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -129,6 +129,7 @@ static void __init smdk2413_machine_init(void)
 MACHINE_START(S3C2413, "S3C2413")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
@@ -140,6 +141,7 @@ MACHINE_END
 MACHINE_START(SMDK2412, "SMDK2412")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
@@ -151,6 +153,7 @@ MACHINE_END
 MACHINE_START(SMDK2413, "SMDK2413")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 38b4a7cd4178..329fe26be268 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -239,6 +239,7 @@ static void __init smdk2416_machine_init(void)
 MACHINE_START(SMDK2416, "SMDK2416")
 	/* Maintainer: Yauhen Kharuzhy <jekhor@gmail.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2416,
 
 	.init_irq	= s3c2416_init_irq,
 	.map_io		= smdk2416_map_io,
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index 392554b1eba2..6aea769ebde1 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -171,6 +171,7 @@ static void __init smdk2440_machine_init(void)
 MACHINE_START(S3C2440, "SMDK2440")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 
 	.init_irq	= s3c2440_init_irq,
 	.map_io		= smdk2440_map_io,
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index 4c541a03e49e..075140f8f760 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -118,7 +118,7 @@ static void __init smdk2443_machine_init(void)
 MACHINE_START(SMDK2443, "SMDK2443")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
-
+	.nr_irqs	= NR_IRQS_S3C2443,
 	.init_irq	= s3c2443_init_irq,
 	.map_io		= smdk2443_map_io,
 	.init_machine	= smdk2443_machine_init,
diff --git a/arch/arm/mach-s3c/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
index 827221398d6c..a3c1b2a82455 100644
--- a/arch/arm/mach-s3c/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -22,7 +22,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
index ae18c1375c9c..e57b2bb61484 100644
--- a/arch/arm/mach-s3c/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -45,7 +45,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
index 2a61df316e8c..93ab1abd8bd3 100644
--- a/arch/arm/mach-s3c/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -149,6 +149,7 @@ static void __init tct_hammer_init(void)
 
 MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= tct_hammer_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= tct_hammer_init,
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 3aa8c707f8a2..c85033e6ef8f 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -356,6 +356,7 @@ static void __init vr1000_init(void)
 MACHINE_START(VR1000, "Thorcom-VR1000")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= vr1000_map_io,
 	.init_machine	= vr1000_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
index ec024af7b0ce..6f878418be3e 100644
--- a/arch/arm/mach-s3c/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -156,6 +156,7 @@ static void __init vstms_init(void)
 
 MACHINE_START(VSTMS, "VSTMS")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= vstms_fixup,
 	.init_irq	= s3c2412_init_irq,
diff --git a/arch/arm/mach-s3c/pl080.c b/arch/arm/mach-s3c/pl080.c
index 4730f080c736..0a14f77b24c1 100644
--- a/arch/arm/mach-s3c/pl080.c
+++ b/arch/arm/mach-s3c/pl080.c
@@ -11,7 +11,7 @@
 #include <linux/of.h>
 
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "regs-sys-s3c64xx.h"
diff --git a/arch/arm/mach-s3c/pm-core-s3c24xx.h b/arch/arm/mach-s3c/pm-core-s3c24xx.h
index bcb7978a4e85..a71ed5711019 100644
--- a/arch/arm/mach-s3c/pm-core-s3c24xx.h
+++ b/arch/arm/mach-s3c/pm-core-s3c24xx.h
@@ -12,7 +12,7 @@
 
 #include "regs-clock.h"
 #include "regs-irq-s3c24xx.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
index 6a9604477c9e..ed3b4cfc7c0f 100644
--- a/arch/arm/mach-s3c/pm-s3c2412.c
+++ b/arch/arm/mach-s3c/pm-s3c2412.c
@@ -19,7 +19,7 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 
 #include "cpu.h"
diff --git a/arch/arm/mach-s3c/pm-s3c64xx.c b/arch/arm/mach-s3c/pm-s3c64xx.c
index 4f1778123dee..1770276a00f2 100644
--- a/arch/arm/mach-s3c/pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/pm-s3c64xx.c
@@ -15,7 +15,7 @@
 #include <linux/pm_domain.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "cpu.h"
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/pm.c b/arch/arm/mach-s3c/pm.c
index c563bb9d92be..06f019690d81 100644
--- a/arch/arm/mach-s3c/pm.c
+++ b/arch/arm/mach-s3c/pm.c
@@ -21,7 +21,7 @@
 #include "map.h"
 #include "regs-clock.h"
 #include "regs-irq.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <asm/irq.h>
 
diff --git a/arch/arm/mach-s3c/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
index 08f910144246..05c3c298b9f8 100644
--- a/arch/arm/mach-s3c/s3c2443.c
+++ b/arch/arm/mach-s3c/s3c2443.c
@@ -25,7 +25,7 @@
 
 #include "map.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
diff --git a/arch/arm/mach-s3c/s3c24xx.h b/arch/arm/mach-s3c/s3c24xx.h
index 5848bef5bb49..34dd4ac507e9 100644
--- a/arch/arm/mach-s3c/s3c24xx.h
+++ b/arch/arm/mach-s3c/s3c24xx.h
@@ -10,7 +10,7 @@
 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
 
 #include <linux/reboot.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 
 struct s3c2410_uartcfg;
 
diff --git a/arch/arm/mach-s3c/s3c64xx.c b/arch/arm/mach-s3c/s3c64xx.c
index 4dfb648142f2..c89982dbb418 100644
--- a/arch/arm/mach-s3c/s3c64xx.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -36,7 +36,7 @@
 #include <asm/system_misc.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
 
diff --git a/arch/arm/mach-s3c/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
index 18fe0642743a..76cedb5c7373 100644
--- a/arch/arm/mach-s3c/simtec-usb.c
+++ b/arch/arm/mach-s3c/simtec-usb.c
@@ -24,7 +24,7 @@
 #include <asm/mach/irq.h>
 
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

As a final bit of preparation for converting to ARCH_MULTIPLATFORM,
change the interrupt handling for s3c24xx to use sparse IRQs.

Since the number of possible interrupts is already fixed and relatively
small per chip, just make it use all legacy interrupts preallocated
using the .nr_irqs field in the machine descriptor, rather than actually
allocating domains on the fly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                               |  2 ++
 arch/arm/mach-s3c/bast-ide.c                   |  2 +-
 arch/arm/mach-s3c/bast-irq.c                   |  2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c          |  2 +-
 arch/arm/mach-s3c/dev-uart-s3c64xx.c           |  2 +-
 arch/arm/mach-s3c/devs.c                       |  2 +-
 arch/arm/mach-s3c/gpio-samsung.c               |  2 +-
 arch/arm/mach-s3c/irq-s3c24xx.c                |  2 +-
 .../mach-s3c/{include/mach => }/irqs-s3c24xx.h | 18 ++++++++++++------
 .../mach-s3c/{include/mach => }/irqs-s3c64xx.h |  0
 arch/arm/mach-s3c/{include/mach => }/irqs.h    |  0
 arch/arm/mach-s3c/mach-amlm5900.c              |  2 ++
 arch/arm/mach-s3c/mach-anubis.c                |  1 +
 arch/arm/mach-s3c/mach-anw6410.c               |  2 +-
 arch/arm/mach-s3c/mach-at2440evb.c             |  1 +
 arch/arm/mach-s3c/mach-bast.c                  |  1 +
 arch/arm/mach-s3c/mach-crag6410-module.c       |  2 +-
 arch/arm/mach-s3c/mach-crag6410.c              |  2 +-
 arch/arm/mach-s3c/mach-gta02.c                 |  1 +
 arch/arm/mach-s3c/mach-h1940.c                 |  1 +
 arch/arm/mach-s3c/mach-hmt.c                   |  2 +-
 arch/arm/mach-s3c/mach-jive.c                  |  2 +-
 arch/arm/mach-s3c/mach-mini2440.c              |  3 ++-
 arch/arm/mach-s3c/mach-mini6410.c              |  2 +-
 arch/arm/mach-s3c/mach-n30.c                   |  2 ++
 arch/arm/mach-s3c/mach-ncp.c                   |  2 +-
 arch/arm/mach-s3c/mach-nexcoder.c              |  1 +
 arch/arm/mach-s3c/mach-osiris.c                |  1 +
 arch/arm/mach-s3c/mach-otom.c                  |  1 +
 arch/arm/mach-s3c/mach-qt2410.c                |  1 +
 arch/arm/mach-s3c/mach-real6410.c              |  2 +-
 arch/arm/mach-s3c/mach-rx1950.c                |  1 +
 arch/arm/mach-s3c/mach-rx3715.c                |  1 +
 arch/arm/mach-s3c/mach-smartq5.c               |  2 +-
 arch/arm/mach-s3c/mach-smartq7.c               |  2 +-
 arch/arm/mach-s3c/mach-smdk2410.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2413.c              |  3 +++
 arch/arm/mach-s3c/mach-smdk2416.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2440.c              |  1 +
 arch/arm/mach-s3c/mach-smdk2443.c              |  2 +-
 arch/arm/mach-s3c/mach-smdk6400.c              |  2 +-
 arch/arm/mach-s3c/mach-smdk6410.c              |  2 +-
 arch/arm/mach-s3c/mach-tct_hammer.c            |  1 +
 arch/arm/mach-s3c/mach-vr1000.c                |  1 +
 arch/arm/mach-s3c/mach-vstms.c                 |  1 +
 arch/arm/mach-s3c/pl080.c                      |  2 +-
 arch/arm/mach-s3c/pm-core-s3c24xx.h            |  2 +-
 arch/arm/mach-s3c/pm-s3c2412.c                 |  2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                 |  2 +-
 arch/arm/mach-s3c/pm.c                         |  2 +-
 arch/arm/mach-s3c/s3c2443.c                    |  2 +-
 arch/arm/mach-s3c/s3c24xx.h                    |  2 +-
 arch/arm/mach-s3c/s3c64xx.c                    |  2 +-
 arch/arm/mach-s3c/simtec-usb.c                 |  2 +-
 54 files changed, 69 insertions(+), 36 deletions(-)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2242d2ae8854..c06e008c90ab 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -444,8 +444,10 @@ config ARCH_S3C24XX
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
 	select GPIOLIB
+	select IRQ_DOMAIN
 	select S3C2410_WATCHDOG
 	select SAMSUNG_ATAGS
+	select SPARSE_IRQ
 	select USE_OF
 	select WATCHDOG
 	help
diff --git a/arch/arm/mach-s3c/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
index da64db1811d8..67f0adc1fec0 100644
--- a/arch/arm/mach-s3c/bast-ide.c
+++ b/arch/arm/mach-s3c/bast-ide.c
@@ -20,7 +20,7 @@
 #include <asm/mach/irq.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index d299f124e6dc..cfc2ddc65513 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -16,7 +16,7 @@
 #include <asm/mach/irq.h>
 
 #include "regs-irq.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c/dev-audio-s3c64xx.c b/arch/arm/mach-s3c/dev-audio-s3c64xx.c
index fc2f077afd24..909e82c148ba 100644
--- a/arch/arm/mach-s3c/dev-audio-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-audio-s3c64xx.c
@@ -10,7 +10,7 @@
 #include <linux/gpio.h>
 #include <linux/export.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/dev-uart-s3c64xx.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
index 8288e8d6c092..f9c947b8971b 100644
--- a/arch/arm/mach-s3c/dev-uart-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
@@ -16,7 +16,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "devs.h"
 
diff --git a/arch/arm/mach-s3c/devs.c b/arch/arm/mach-s3c/devs.c
index 1e266fc24f9b..9ac07c023adf 100644
--- a/arch/arm/mach-s3c/devs.c
+++ b/arch/arm/mach-s3c/devs.c
@@ -38,7 +38,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "gpio-samsung.h"
 #include "gpio-cfg.h"
diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
index fda2c01f5a08..b7fc7c41309c 100644
--- a/arch/arm/mach-s3c/gpio-samsung.c
+++ b/arch/arm/mach-s3c/gpio-samsung.c
@@ -26,7 +26,7 @@
 
 #include <asm/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
index 3776d5206f9b..088cc04b7431 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-s3c24xx.c
@@ -26,7 +26,7 @@
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-irq.h"
 #include "regs-gpio.h"
 
diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h b/arch/arm/mach-s3c/irqs-s3c24xx.h
similarity index 95%
rename from arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
rename to arch/arm/mach-s3c/irqs-s3c24xx.h
index aaf3bae08b52..fecbf7e440c6 100644
--- a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
+++ b/arch/arm/mach-s3c/irqs-s3c24xx.h
@@ -108,6 +108,8 @@
 #define IRQ_TC			S3C2410_IRQSUB(9)
 #define IRQ_ADC			S3C2410_IRQSUB(10)
 
+#define NR_IRQS_S3C2410		(S3C2410_IRQSUB(10) + 1)
+
 /* extra irqs for s3c2412 */
 
 #define IRQ_S3C2412_CFSDI	S3C2410_IRQ(21)
@@ -115,6 +117,7 @@
 #define IRQ_S3C2412_SDI		S3C2410_IRQSUB(13)
 #define IRQ_S3C2412_CF		S3C2410_IRQSUB(14)
 
+#define NR_IRQS_S3C2412		(S3C2410_IRQSUB(14) + 1)
 
 #define IRQ_S3C2416_EINT8t15	S3C2410_IRQ(5)
 #define IRQ_S3C2416_DMA		S3C2410_IRQ(17)
@@ -146,13 +149,20 @@
 #define IRQ_S3C2416_I2S0	S3C2416_IRQ(6)
 #define IRQ_S3C2416_I2S1	S3C2416_IRQ(7)
 
-/* extra irqs for s3c2440 */
+#define NR_IRQS_S3C2416		(S3C2416_IRQ(7) + 1)
+
+/* extra irqs for s3c2440/s3c2442 */
 
 #define IRQ_S3C2440_CAM_C	S3C2410_IRQSUB(11)	/* S3C2443 too */
 #define IRQ_S3C2440_CAM_P	S3C2410_IRQSUB(12)	/* S3C2443 too */
+
+#define NR_IRQS_S3C2442		(S3C2410_IRQSUB(12) + 1)
+
 #define IRQ_S3C2440_WDT		S3C2410_IRQSUB(13)
 #define IRQ_S3C2440_AC97	S3C2410_IRQSUB(14)
 
+#define NR_IRQS_S3C2440		(S3C2410_IRQSUB(14) + 1)
+
 /* irqs for s3c2443 */
 
 #define IRQ_S3C2443_DMA		S3C2410_IRQ(17)		/* IRQ_DMA1 */
@@ -186,11 +196,7 @@
 #define IRQ_S3C2443_WDT		S3C2410_IRQSUB(27)
 #define IRQ_S3C2443_AC97	S3C2410_IRQSUB(28)
 
-#if defined(CONFIG_CPU_S3C2416)
-#define NR_IRQS (IRQ_S3C2416_I2S1 + 1)
-#else
-#define NR_IRQS (IRQ_S3C2443_AC97 + 1)
-#endif
+#define NR_IRQS_S3C2443		(S3C2410_IRQSUB(28) + 1)
 
 /* compatibility define. */
 #define IRQ_UART3		IRQ_S3C2443_UART3
diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h b/arch/arm/mach-s3c/irqs-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
rename to arch/arm/mach-s3c/irqs-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/irqs.h b/arch/arm/mach-s3c/irqs.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/irqs.h
rename to arch/arm/mach-s3c/irqs.h
diff --git a/arch/arm/mach-s3c/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
index 94c4512ace17..f85e5885e9b4 100644
--- a/arch/arm/mach-s3c/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -239,7 +239,9 @@ static void __init amlm5900_init(void)
 
 MACHINE_START(AML_M5900, "AML_M5900")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= amlm5900_map_io,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= amlm5900_init,
 	.init_time	= amlm5900_init_time,
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 60df40052209..4536f3e66e27 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -414,6 +414,7 @@ static void __init anubis_init(void)
 MACHINE_START(ANUBIS, "Simtec-Anubis")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= anubis_map_io,
 	.init_machine	= anubis_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
index 825714e9ac66..b67eae43e04f 100644
--- a/arch/arm/mach-s3c/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -40,7 +40,7 @@
 
 #include "devs.h"
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
 
diff --git a/arch/arm/mach-s3c/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
index c6a5a51d84aa..743403d873e0 100644
--- a/arch/arm/mach-s3c/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -225,6 +225,7 @@ static void __init at2440evb_init(void)
 
 MACHINE_START(AT2440EVB, "AT2440EVB")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= at2440evb_map_io,
 	.init_machine	= at2440evb_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 5ac24e406157..a33ceab81e09 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -575,6 +575,7 @@ static void __init bast_init(void)
 MACHINE_START(BAST, "Simtec-BAST")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= bast_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= bast_init,
diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
index 5d1d4b67a4b7..4edde13b89b5 100644
--- a/arch/arm/mach-s3c/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c/mach-crag6410-module.c
@@ -28,7 +28,7 @@
 #include <linux/platform_data/spi-s3c64xx.h>
 
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "crag6410.h"
 
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index e3e0fe897bcc..9a45474d1bf7 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -47,7 +47,7 @@
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "fb.h"
 #include "sdhci.h"
diff --git a/arch/arm/mach-s3c/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
index 418939ce0fc3..abfdce765525 100644
--- a/arch/arm/mach-s3c/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -572,6 +572,7 @@ static void __init gta02_init_time(void)
 MACHINE_START(NEO1973_GTA02, "GTA02")
 	/* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2442,
 	.map_io		= gta02_map_io,
 	.init_irq	= s3c2442_init_irq,
 	.init_machine	= gta02_machine_init,
diff --git a/arch/arm/mach-s3c/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
index 8a43ed1c4c4d..032b18837855 100644
--- a/arch/arm/mach-s3c/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -793,6 +793,7 @@ static void __init h1940_init(void)
 MACHINE_START(H1940, "IPAQ-H1940")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= h1940_map_io,
 	.reserve	= h1940_reserve,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
index b287e9987311..49ba16c447aa 100644
--- a/arch/arm/mach-s3c/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -26,7 +26,7 @@
 
 #include <video/samsung_fimd.h>
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
diff --git a/arch/arm/mach-s3c/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
index 0d7d408c3729..e32773175944 100644
--- a/arch/arm/mach-s3c/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -677,7 +677,7 @@ static void __init jive_machine_init(void)
 MACHINE_START(JIVE, "JIVE")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
-
+	.nr_irqs	= NR_IRQS_S3C2412,
 	.init_irq	= s3c2412_init_irq,
 	.map_io		= jive_map_io,
 	.init_machine	= jive_machine_init,
diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
index 551ec660ab59..131015cc0c34 100644
--- a/arch/arm/mach-s3c/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -35,7 +35,7 @@
 
 #include "regs-gpio.h"
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
@@ -789,6 +789,7 @@ static void __init mini2440_init(void)
 MACHINE_START(MINI2440, "MINI2440")
 	/* Maintainer: Michel Pollet <buserror@gmail.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= mini2440_map_io,
 	.init_machine	= mini2440_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
index c14c2e27127b..058ae9e8b89f 100644
--- a/arch/arm/mach-s3c/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -35,7 +35,7 @@
 #include <linux/platform_data/mmc-sdhci-s3c.h>
 #include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
diff --git a/arch/arm/mach-s3c/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
index e40c1fcf418c..75f5dc6351a1 100644
--- a/arch/arm/mach-s3c/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -656,6 +656,7 @@ MACHINE_START(N30, "Acer-N30")
 				Ben Dooks <ben-linux@fluff.org>
 	*/
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_time	= n30_init_time,
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
@@ -666,6 +667,7 @@ MACHINE_START(N35, "Acer-N35")
 	/* Maintainer: Christer Weinigel <christer@weinigel.se>
 	*/
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.init_time	= n30_init_time,
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
index 1a45bed56622..1e65f8bce5c4 100644
--- a/arch/arm/mach-s3c/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -24,7 +24,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
index 2a454c919658..d17a3fcb7425 100644
--- a/arch/arm/mach-s3c/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -154,6 +154,7 @@ static void __init nexcoder_init(void)
 MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
 	/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= nexcoder_map_io,
 	.init_machine	= nexcoder_init,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 8387773f4fd4..d900d1354de1 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -397,6 +397,7 @@ static void __init osiris_init(void)
 MACHINE_START(OSIRIS, "Simtec-OSIRIS")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= osiris_map_io,
 	.init_irq	= s3c2440_init_irq,
 	.init_machine	= osiris_init,
diff --git a/arch/arm/mach-s3c/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
index 460ee97766cd..3a2db2f58833 100644
--- a/arch/arm/mach-s3c/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -116,6 +116,7 @@ static void __init otom11_init(void)
 MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
 	/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= otom11_map_io,
 	.init_machine	= otom11_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
index f88b961798fd..36fe0684a438 100644
--- a/arch/arm/mach-s3c/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -367,6 +367,7 @@ static void __init qt2410_machine_init(void)
 
 MACHINE_START(QT2410, "QT2410")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= qt2410_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= qt2410_machine_init,
diff --git a/arch/arm/mach-s3c/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
index 9d218a53d631..8c10ebc38a9c 100644
--- a/arch/arm/mach-s3c/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -27,7 +27,7 @@
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <linux/soc/samsung/s3c-adc.h>
 #include "cpu.h"
diff --git a/arch/arm/mach-s3c/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
index 313e080e179e..7a3e7c0a6484 100644
--- a/arch/arm/mach-s3c/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -868,6 +868,7 @@ static void __init rx1950_reserve(void)
 MACHINE_START(RX1950, "HP iPAQ RX1950")
     /* Maintainers: Vasily Khoruzhick */
 	.atag_offset = 0x100,
+	.nr_irqs	= NR_IRQS_S3C2442,
 	.map_io = rx1950_map_io,
 	.reserve	= rx1950_reserve,
 	.init_irq	= s3c2442_init_irq,
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index 586cb0fdfce0..52b3c38acbb2 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -204,6 +204,7 @@ static void __init rx3715_init_machine(void)
 MACHINE_START(RX3715, "IPAQ-RX3715")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 	.map_io		= rx3715_map_io,
 	.reserve	= rx3715_reserve,
 	.init_irq	= s3c2440_init_irq,
diff --git a/arch/arm/mach-s3c/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
index 8c940227e810..ce3fce0bba20 100644
--- a/arch/arm/mach-s3c/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -14,7 +14,7 @@
 #include <asm/mach/arch.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
index ab243969d6d0..78ca0e704797 100644
--- a/arch/arm/mach-s3c/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -14,7 +14,7 @@
 #include <asm/mach/arch.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
index ca83d5a7d101..76b0a8846616 100644
--- a/arch/arm/mach-s3c/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -104,6 +104,7 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
 				    * to SMDK2410 */
 	/* Maintainer: Jonas Dietsche */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= smdk2410_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= smdk2410_init,
diff --git a/arch/arm/mach-s3c/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
index c43095b321d7..f1f0ec174579 100644
--- a/arch/arm/mach-s3c/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -129,6 +129,7 @@ static void __init smdk2413_machine_init(void)
 MACHINE_START(S3C2413, "S3C2413")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
@@ -140,6 +141,7 @@ MACHINE_END
 MACHINE_START(SMDK2412, "SMDK2412")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
@@ -151,6 +153,7 @@ MACHINE_END
 MACHINE_START(SMDK2413, "SMDK2413")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= smdk2413_fixup,
 	.init_irq	= s3c2412_init_irq,
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 38b4a7cd4178..329fe26be268 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -239,6 +239,7 @@ static void __init smdk2416_machine_init(void)
 MACHINE_START(SMDK2416, "SMDK2416")
 	/* Maintainer: Yauhen Kharuzhy <jekhor@gmail.com> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2416,
 
 	.init_irq	= s3c2416_init_irq,
 	.map_io		= smdk2416_map_io,
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index 392554b1eba2..6aea769ebde1 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -171,6 +171,7 @@ static void __init smdk2440_machine_init(void)
 MACHINE_START(S3C2440, "SMDK2440")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2440,
 
 	.init_irq	= s3c2440_init_irq,
 	.map_io		= smdk2440_map_io,
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index 4c541a03e49e..075140f8f760 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -118,7 +118,7 @@ static void __init smdk2443_machine_init(void)
 MACHINE_START(SMDK2443, "SMDK2443")
 	/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
 	.atag_offset	= 0x100,
-
+	.nr_irqs	= NR_IRQS_S3C2443,
 	.init_irq	= s3c2443_init_irq,
 	.map_io		= smdk2443_map_io,
 	.init_machine	= smdk2443_machine_init,
diff --git a/arch/arm/mach-s3c/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
index 827221398d6c..a3c1b2a82455 100644
--- a/arch/arm/mach-s3c/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -22,7 +22,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
index ae18c1375c9c..e57b2bb61484 100644
--- a/arch/arm/mach-s3c/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -45,7 +45,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
index 2a61df316e8c..93ab1abd8bd3 100644
--- a/arch/arm/mach-s3c/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -149,6 +149,7 @@ static void __init tct_hammer_init(void)
 
 MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= tct_hammer_map_io,
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= tct_hammer_init,
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 3aa8c707f8a2..c85033e6ef8f 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -356,6 +356,7 @@ static void __init vr1000_init(void)
 MACHINE_START(VR1000, "Thorcom-VR1000")
 	/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2410,
 	.map_io		= vr1000_map_io,
 	.init_machine	= vr1000_init,
 	.init_irq	= s3c2410_init_irq,
diff --git a/arch/arm/mach-s3c/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
index ec024af7b0ce..6f878418be3e 100644
--- a/arch/arm/mach-s3c/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -156,6 +156,7 @@ static void __init vstms_init(void)
 
 MACHINE_START(VSTMS, "VSTMS")
 	.atag_offset	= 0x100,
+	.nr_irqs	= NR_IRQS_S3C2412,
 
 	.fixup		= vstms_fixup,
 	.init_irq	= s3c2412_init_irq,
diff --git a/arch/arm/mach-s3c/pl080.c b/arch/arm/mach-s3c/pl080.c
index 4730f080c736..0a14f77b24c1 100644
--- a/arch/arm/mach-s3c/pl080.c
+++ b/arch/arm/mach-s3c/pl080.c
@@ -11,7 +11,7 @@
 #include <linux/of.h>
 
 #include "cpu.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "map.h"
 
 #include "regs-sys-s3c64xx.h"
diff --git a/arch/arm/mach-s3c/pm-core-s3c24xx.h b/arch/arm/mach-s3c/pm-core-s3c24xx.h
index bcb7978a4e85..a71ed5711019 100644
--- a/arch/arm/mach-s3c/pm-core-s3c24xx.h
+++ b/arch/arm/mach-s3c/pm-core-s3c24xx.h
@@ -12,7 +12,7 @@
 
 #include "regs-clock.h"
 #include "regs-irq-s3c24xx.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
index 6a9604477c9e..ed3b4cfc7c0f 100644
--- a/arch/arm/mach-s3c/pm-s3c2412.c
+++ b/arch/arm/mach-s3c/pm-s3c2412.c
@@ -19,7 +19,7 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 
 #include "cpu.h"
diff --git a/arch/arm/mach-s3c/pm-s3c64xx.c b/arch/arm/mach-s3c/pm-s3c64xx.c
index 4f1778123dee..1770276a00f2 100644
--- a/arch/arm/mach-s3c/pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/pm-s3c64xx.c
@@ -15,7 +15,7 @@
 #include <linux/pm_domain.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include "cpu.h"
 #include "devs.h"
diff --git a/arch/arm/mach-s3c/pm.c b/arch/arm/mach-s3c/pm.c
index c563bb9d92be..06f019690d81 100644
--- a/arch/arm/mach-s3c/pm.c
+++ b/arch/arm/mach-s3c/pm.c
@@ -21,7 +21,7 @@
 #include "map.h"
 #include "regs-clock.h"
 #include "regs-irq.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 
 #include <asm/irq.h>
 
diff --git a/arch/arm/mach-s3c/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
index 08f910144246..05c3c298b9f8 100644
--- a/arch/arm/mach-s3c/s3c2443.c
+++ b/arch/arm/mach-s3c/s3c2443.c
@@ -25,7 +25,7 @@
 
 #include "map.h"
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
diff --git a/arch/arm/mach-s3c/s3c24xx.h b/arch/arm/mach-s3c/s3c24xx.h
index 5848bef5bb49..34dd4ac507e9 100644
--- a/arch/arm/mach-s3c/s3c24xx.h
+++ b/arch/arm/mach-s3c/s3c24xx.h
@@ -10,7 +10,7 @@
 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
 
 #include <linux/reboot.h>
-#include <mach/irqs.h>
+#include "irqs.h"
 
 struct s3c2410_uartcfg;
 
diff --git a/arch/arm/mach-s3c/s3c64xx.c b/arch/arm/mach-s3c/s3c64xx.c
index 4dfb648142f2..c89982dbb418 100644
--- a/arch/arm/mach-s3c/s3c64xx.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -36,7 +36,7 @@
 #include <asm/system_misc.h>
 
 #include "map.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include "regs-gpio.h"
 #include "gpio-samsung.h"
 
diff --git a/arch/arm/mach-s3c/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
index 18fe0642743a..76cedb5c7373 100644
--- a/arch/arm/mach-s3c/simtec-usb.c
+++ b/arch/arm/mach-s3c/simtec-usb.c
@@ -24,7 +24,7 @@
 #include <asm/mach/irq.h>
 
 #include "gpio-samsung.h"
-#include <mach/irqs.h>
+#include "irqs.h"
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-- 
2.29.2


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

* [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

With the custom ISA I/O and the missing sparse-irq support
out of the way, s3c24xx can now be built into the same
kernel as all other ARM9 based platforms.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                  | 18 ------------------
 arch/arm/mach-s3c/Kconfig.s3c24xx | 23 ++++++++++++++++++++++-
 2 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c06e008c90ab..68b0a857f9e5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -438,24 +438,6 @@ config ARCH_SA1100
 	help
 	  Support for StrongARM 11x0 based boards.
 
-config ARCH_S3C24XX
-	bool "Samsung S3C24XX SoCs"
-	select ATAGS
-	select CLKSRC_SAMSUNG_PWM
-	select GPIO_SAMSUNG
-	select GPIOLIB
-	select IRQ_DOMAIN
-	select S3C2410_WATCHDOG
-	select SAMSUNG_ATAGS
-	select SPARSE_IRQ
-	select USE_OF
-	select WATCHDOG
-	help
-	  Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
-	  and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
-	  (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or the
-	  Samsung SMDK2410 development board (and derivatives).
-
 config ARCH_OMAP1
 	bool "TI OMAP1"
 	select ARCH_OMAP
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index d47df6427e89..e388e265ba83 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -5,6 +5,22 @@
 #
 # Copyright 2007 Simtec Electronics
 
+menuconfig ARCH_S3C24XX
+	bool "Samsung S3C24XX SoCs"
+	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
+	select ATAGS
+	select CLKSRC_SAMSUNG_PWM
+	select GPIO_SAMSUNG
+	select GPIOLIB
+	select S3C2410_WATCHDOG
+	select SAMSUNG_ATAGS
+	select WATCHDOG
+	help
+	  Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
+	  and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
+	  (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or the
+	  Samsung SMDK2410 development board (and derivatives).
+
 if ARCH_S3C24XX
 
 config PLAT_S3C24XX
@@ -12,7 +28,6 @@ config PLAT_S3C24XX
 	select GPIOLIB
 	select NO_IOPORT_MAP
 	select S3C_DEV_NAND
-	select IRQ_DOMAIN
 	select COMMON_CLK
 	help
 	  Base platform code for any Samsung S3C24XX device
@@ -25,6 +40,7 @@ comment "S3C24XX SoCs"
 
 config CPU_S3C2410
 	bool "Samsung S3C2410"
+	depends on ARCH_MULTI_V4T
 	default y
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
@@ -36,6 +52,7 @@ config CPU_S3C2410
 
 config CPU_S3C2412
 	bool "Samsung S3C2412"
+	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
 	select S3C2412_COMMON_CLK
 	select S3C2412_PM if PM_SLEEP
@@ -44,6 +61,7 @@ config CPU_S3C2412
 
 config CPU_S3C2416
 	bool "Samsung S3C2416/S3C2450"
+	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
 	select S3C2416_PM if PM_SLEEP
 	select S3C2443_COMMON_CLK
@@ -52,6 +70,7 @@ config CPU_S3C2416
 
 config CPU_S3C2440
 	bool "Samsung S3C2440"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
 	select S3C2410_PM if PM_SLEEP
@@ -60,6 +79,7 @@ config CPU_S3C2440
 
 config CPU_S3C2442
 	bool "Samsung S3C2442"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
 	select S3C2410_PM if PM_SLEEP
@@ -72,6 +92,7 @@ config CPU_S3C244X
 
 config CPU_S3C2443
 	bool "Samsung S3C2443"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2443_COMMON_CLK
 	help
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

With the custom ISA I/O and the missing sparse-irq support
out of the way, s3c24xx can now be built into the same
kernel as all other ARM9 based platforms.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                  | 18 ------------------
 arch/arm/mach-s3c/Kconfig.s3c24xx | 23 ++++++++++++++++++++++-
 2 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c06e008c90ab..68b0a857f9e5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -438,24 +438,6 @@ config ARCH_SA1100
 	help
 	  Support for StrongARM 11x0 based boards.
 
-config ARCH_S3C24XX
-	bool "Samsung S3C24XX SoCs"
-	select ATAGS
-	select CLKSRC_SAMSUNG_PWM
-	select GPIO_SAMSUNG
-	select GPIOLIB
-	select IRQ_DOMAIN
-	select S3C2410_WATCHDOG
-	select SAMSUNG_ATAGS
-	select SPARSE_IRQ
-	select USE_OF
-	select WATCHDOG
-	help
-	  Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
-	  and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
-	  (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or the
-	  Samsung SMDK2410 development board (and derivatives).
-
 config ARCH_OMAP1
 	bool "TI OMAP1"
 	select ARCH_OMAP
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index d47df6427e89..e388e265ba83 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -5,6 +5,22 @@
 #
 # Copyright 2007 Simtec Electronics
 
+menuconfig ARCH_S3C24XX
+	bool "Samsung S3C24XX SoCs"
+	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
+	select ATAGS
+	select CLKSRC_SAMSUNG_PWM
+	select GPIO_SAMSUNG
+	select GPIOLIB
+	select S3C2410_WATCHDOG
+	select SAMSUNG_ATAGS
+	select WATCHDOG
+	help
+	  Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
+	  and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
+	  (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or the
+	  Samsung SMDK2410 development board (and derivatives).
+
 if ARCH_S3C24XX
 
 config PLAT_S3C24XX
@@ -12,7 +28,6 @@ config PLAT_S3C24XX
 	select GPIOLIB
 	select NO_IOPORT_MAP
 	select S3C_DEV_NAND
-	select IRQ_DOMAIN
 	select COMMON_CLK
 	help
 	  Base platform code for any Samsung S3C24XX device
@@ -25,6 +40,7 @@ comment "S3C24XX SoCs"
 
 config CPU_S3C2410
 	bool "Samsung S3C2410"
+	depends on ARCH_MULTI_V4T
 	default y
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
@@ -36,6 +52,7 @@ config CPU_S3C2410
 
 config CPU_S3C2412
 	bool "Samsung S3C2412"
+	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
 	select S3C2412_COMMON_CLK
 	select S3C2412_PM if PM_SLEEP
@@ -44,6 +61,7 @@ config CPU_S3C2412
 
 config CPU_S3C2416
 	bool "Samsung S3C2416/S3C2450"
+	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
 	select S3C2416_PM if PM_SLEEP
 	select S3C2443_COMMON_CLK
@@ -52,6 +70,7 @@ config CPU_S3C2416
 
 config CPU_S3C2440
 	bool "Samsung S3C2440"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
 	select S3C2410_PM if PM_SLEEP
@@ -60,6 +79,7 @@ config CPU_S3C2440
 
 config CPU_S3C2442
 	bool "Samsung S3C2442"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2410_COMMON_CLK
 	select S3C2410_PM if PM_SLEEP
@@ -72,6 +92,7 @@ config CPU_S3C244X
 
 config CPU_S3C2443
 	bool "Samsung S3C2443"
+	depends on ARCH_MULTI_V4T
 	select CPU_ARM920T
 	select S3C2443_COMMON_CLK
 	help
-- 
2.29.2


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

* [PATCH 10/12] ARM: iop32x: enable multiplatform support
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

After iop32x was converted to the generic multi-irq entry
code, nothing really stops us from building it into a
generic kernel.

The two last headers can simply be removed, the mach/irqs.h
gets replaced with the sparse-irq intiialization from the
board specific .nr_irqs value, and the decompressor debug
output can use the debug_ll hack that all other platforms
use.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              | 14 -----------
 arch/arm/mach-iop32x/Kconfig                  | 17 ++++++++-----
 arch/arm/mach-iop32x/em7210.c                 |  1 +
 arch/arm/mach-iop32x/glantank.c               |  1 +
 arch/arm/mach-iop32x/include/mach/irqs.h      | 14 -----------
 .../arm/mach-iop32x/include/mach/uncompress.h | 25 -------------------
 arch/arm/mach-iop32x/iq31244.c                |  1 +
 arch/arm/mach-iop32x/iq80321.c                |  1 +
 arch/arm/mach-iop32x/irqs.h                   |  2 ++
 arch/arm/mach-iop32x/n2100.c                  |  1 +
 10 files changed, 18 insertions(+), 59 deletions(-)
 delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 68b0a857f9e5..94909cadb78a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -356,17 +356,6 @@ config ARCH_FOOTBRIDGE
 	  Support for systems based on the DC21285 companion chip
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 
-config ARCH_IOP32X
-	bool "IOP32x-based"
-	select CPU_XSCALE
-	select GPIO_IOP
-	select GPIOLIB
-	select FORCE_PCI
-	select PLAT_IOP
-	help
-	  Support for Intel's 80219 and IOP32X (XScale) family of
-	  processors.
-
 config ARCH_IXP4XX
 	bool "IXP4xx-based"
 	select ARCH_SUPPORTS_BIG_ENDIAN
@@ -688,9 +677,6 @@ config ARCH_MPS2
 config ARCH_ACORN
 	bool
 
-config PLAT_IOP
-	bool
-
 config PLAT_ORION
 	bool
 	select CLKSRC_MMIO
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index f1f342cb0509..07dd137b8867 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -1,9 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0
-if ARCH_IOP32X
-
-menu "IOP32x Implementation Options"
+menuconfig ARCH_IOP32X
+	bool "IOP32x-based platforms"
+	depends on ARCH_MULTI_V5
+	select CPU_XSCALE
+	select GPIO_IOP
+	select GPIOLIB
+	select FORCE_PCI
+	help
+	  Support for Intel's 80219 and IOP32X (XScale) family of
+	  processors.
 
-comment "IOP32x Platform Types"
+if ARCH_IOP32X
 
 config MACH_EP80219
 	bool
@@ -42,6 +49,4 @@ config MACH_EM7210
 	  board. Say also Y here if you have a SS4000e Baxter Creek NAS
 	  appliance."
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index d43ced3cd4e7..ac130aba5a6e 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -223,6 +223,7 @@ static void __init em7210_init_machine(void)
 
 MACHINE_START(EM7210, "Lanner EM7210")
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= em7210_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= em7210_timer_init,
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 2fe0f77d1f1d..cd6e7da2ea10 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -205,6 +205,7 @@ static void __init glantank_init_machine(void)
 MACHINE_START(GLANTANK, "GLAN Tank")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= glantank_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= glantank_timer_init,
diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h
deleted file mode 100644
index e09ae5f48aec..000000000000
--- a/arch/arm/mach-iop32x/include/mach/irqs.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-iop32x/include/mach/irqs.h
- *
- * Author:	Rory Bolt <rorybolt@pacbell.net>
- * Copyright:	(C) 2002 Rory Bolt
- */
-
-#ifndef __IRQS_H
-#define __IRQS_H
-
-#define NR_IRQS			33
-
-#endif
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
deleted file mode 100644
index c8548875d942..000000000000
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-iop32x/include/mach/uncompress.h
- */
-
-#include <asm/types.h>
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define uart_base ((volatile u8 *)0xfe800000)
-
-#define TX_DONE		(UART_LSR_TEMT | UART_LSR_THRE)
-
-static inline void putc(char c)
-{
-	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
-		barrier();
-	uart_base[UART_TX] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-#define arch_decomp_setup() do { } while (0)
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 49caaa703881..8b4c29d17265 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -324,6 +324,7 @@ MACHINE_END
 MACHINE_START(EP80219, "Intel EP80219")
 	/* Maintainer: Intel Corp. */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= iq31244_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= iq31244_timer_init,
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index b455d7073296..d9780c4660cb 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -183,6 +183,7 @@ static void __init iq80321_init_machine(void)
 MACHINE_START(IQ80321, "Intel IQ80321")
 	/* Maintainer: Intel Corp. */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= iq80321_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= iq80321_timer_init,
diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h
index e1dfc8b4e7d7..e9fc88e09189 100644
--- a/arch/arm/mach-iop32x/irqs.h
+++ b/arch/arm/mach-iop32x/irqs.h
@@ -43,4 +43,6 @@
 #define IRQ_IOP32X_XINT3	IOP_IRQ(30)
 #define IRQ_IOP32X_HPI		IOP_IRQ(31)
 
+#define IOP32X_NR_IRQS		(IRQ_IOP32X_HPI + 1)
+
 #endif
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index bf99e718f8b8..bb1e2e11bf35 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -358,6 +358,7 @@ static void __init n2100_init_machine(void)
 MACHINE_START(N2100, "Thecus N2100")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= n2100_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= n2100_timer_init,
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/12] ARM: iop32x: enable multiplatform support
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

After iop32x was converted to the generic multi-irq entry
code, nothing really stops us from building it into a
generic kernel.

The two last headers can simply be removed, the mach/irqs.h
gets replaced with the sparse-irq intiialization from the
board specific .nr_irqs value, and the decompressor debug
output can use the debug_ll hack that all other platforms
use.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              | 14 -----------
 arch/arm/mach-iop32x/Kconfig                  | 17 ++++++++-----
 arch/arm/mach-iop32x/em7210.c                 |  1 +
 arch/arm/mach-iop32x/glantank.c               |  1 +
 arch/arm/mach-iop32x/include/mach/irqs.h      | 14 -----------
 .../arm/mach-iop32x/include/mach/uncompress.h | 25 -------------------
 arch/arm/mach-iop32x/iq31244.c                |  1 +
 arch/arm/mach-iop32x/iq80321.c                |  1 +
 arch/arm/mach-iop32x/irqs.h                   |  2 ++
 arch/arm/mach-iop32x/n2100.c                  |  1 +
 10 files changed, 18 insertions(+), 59 deletions(-)
 delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 68b0a857f9e5..94909cadb78a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -356,17 +356,6 @@ config ARCH_FOOTBRIDGE
 	  Support for systems based on the DC21285 companion chip
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 
-config ARCH_IOP32X
-	bool "IOP32x-based"
-	select CPU_XSCALE
-	select GPIO_IOP
-	select GPIOLIB
-	select FORCE_PCI
-	select PLAT_IOP
-	help
-	  Support for Intel's 80219 and IOP32X (XScale) family of
-	  processors.
-
 config ARCH_IXP4XX
 	bool "IXP4xx-based"
 	select ARCH_SUPPORTS_BIG_ENDIAN
@@ -688,9 +677,6 @@ config ARCH_MPS2
 config ARCH_ACORN
 	bool
 
-config PLAT_IOP
-	bool
-
 config PLAT_ORION
 	bool
 	select CLKSRC_MMIO
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index f1f342cb0509..07dd137b8867 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -1,9 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0
-if ARCH_IOP32X
-
-menu "IOP32x Implementation Options"
+menuconfig ARCH_IOP32X
+	bool "IOP32x-based platforms"
+	depends on ARCH_MULTI_V5
+	select CPU_XSCALE
+	select GPIO_IOP
+	select GPIOLIB
+	select FORCE_PCI
+	help
+	  Support for Intel's 80219 and IOP32X (XScale) family of
+	  processors.
 
-comment "IOP32x Platform Types"
+if ARCH_IOP32X
 
 config MACH_EP80219
 	bool
@@ -42,6 +49,4 @@ config MACH_EM7210
 	  board. Say also Y here if you have a SS4000e Baxter Creek NAS
 	  appliance."
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index d43ced3cd4e7..ac130aba5a6e 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -223,6 +223,7 @@ static void __init em7210_init_machine(void)
 
 MACHINE_START(EM7210, "Lanner EM7210")
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= em7210_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= em7210_timer_init,
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 2fe0f77d1f1d..cd6e7da2ea10 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -205,6 +205,7 @@ static void __init glantank_init_machine(void)
 MACHINE_START(GLANTANK, "GLAN Tank")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= glantank_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= glantank_timer_init,
diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h
deleted file mode 100644
index e09ae5f48aec..000000000000
--- a/arch/arm/mach-iop32x/include/mach/irqs.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-iop32x/include/mach/irqs.h
- *
- * Author:	Rory Bolt <rorybolt@pacbell.net>
- * Copyright:	(C) 2002 Rory Bolt
- */
-
-#ifndef __IRQS_H
-#define __IRQS_H
-
-#define NR_IRQS			33
-
-#endif
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
deleted file mode 100644
index c8548875d942..000000000000
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-iop32x/include/mach/uncompress.h
- */
-
-#include <asm/types.h>
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define uart_base ((volatile u8 *)0xfe800000)
-
-#define TX_DONE		(UART_LSR_TEMT | UART_LSR_THRE)
-
-static inline void putc(char c)
-{
-	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
-		barrier();
-	uart_base[UART_TX] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-#define arch_decomp_setup() do { } while (0)
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 49caaa703881..8b4c29d17265 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -324,6 +324,7 @@ MACHINE_END
 MACHINE_START(EP80219, "Intel EP80219")
 	/* Maintainer: Intel Corp. */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= iq31244_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= iq31244_timer_init,
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index b455d7073296..d9780c4660cb 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -183,6 +183,7 @@ static void __init iq80321_init_machine(void)
 MACHINE_START(IQ80321, "Intel IQ80321")
 	/* Maintainer: Intel Corp. */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= iq80321_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= iq80321_timer_init,
diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h
index e1dfc8b4e7d7..e9fc88e09189 100644
--- a/arch/arm/mach-iop32x/irqs.h
+++ b/arch/arm/mach-iop32x/irqs.h
@@ -43,4 +43,6 @@
 #define IRQ_IOP32X_XINT3	IOP_IRQ(30)
 #define IRQ_IOP32X_HPI		IOP_IRQ(31)
 
+#define IOP32X_NR_IRQS		(IRQ_IOP32X_HPI + 1)
+
 #endif
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index bf99e718f8b8..bb1e2e11bf35 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -358,6 +358,7 @@ static void __init n2100_init_machine(void)
 MACHINE_START(N2100, "Thecus N2100")
 	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
 	.atag_offset	= 0x100,
+	.nr_irqs	= IOP32X_NR_IRQS,
 	.map_io		= n2100_map_io,
 	.init_irq	= iop32x_init_irq,
 	.init_time	= n2100_timer_init,
-- 
2.29.2


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

* [PATCH 11/12] ARM: rework endianess selection
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Choosing big-endian vs little-endian kernels in Kconfig has not worked
correctly since the introduction of CONFIG_ARCH_MULTIPLATFORM a long
time ago.

The problems is that CONFIG_BIG_ENDIAN depends on
ARCH_SUPPORTS_BIG_ENDIAN, which can set by any one platform
in the config, but would actually have to be supported by all
of them.

This was mostly ok for ARMv6/ARMv7 builds, since these are BE8 and
tend to just work aside from problems in nonportable device drivers.
For ARMv4/v5 machines, CONFIG_BIG_ENDIAN and CONFIG_ARCH_MULTIPLATFORM
were never set together, so this was disabled on all those machines
except for IXP4xx.

As IXP4xx can now become part of ARCH_MULTIPLATFORM, it seems better to
formalize this logic: all ARMv4/v5 platforms get an explicit dependency
on being either big-endian (ixp4xx) or little-endian (the rest). We may
want to fix ixp4xx in the future to support both, but it does not work
in LE mode at the moment.

For the ARMv6/v7 platforms, there are two ways this could be handled

 a) allow both modes only for platforms selecting
    'ARCH_SUPPORTS_BIG_ENDIAN' today, but only LE mode for the
    others, given that these were added intentionally at some
    point.

 b) allow both modes everwhere, given that it was already possible
    to build that way by e.g. selecting ARCH_VIRT, and that the
    list is not an accurate reflection of which platforms may or
    may not work.

Out of these, I picked b) because it seemed slighly more logical
to me.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                  |  8 ++++++--
 arch/arm/mach-asm9260/Kconfig     |  1 +
 arch/arm/mach-aspeed/Kconfig      |  2 +-
 arch/arm/mach-at91/Kconfig        |  3 ++-
 arch/arm/mach-clps711x/Kconfig    |  1 +
 arch/arm/mach-davinci/Kconfig     |  1 +
 arch/arm/mach-ep93xx/Kconfig      |  1 +
 arch/arm/mach-exynos/Kconfig      |  1 -
 arch/arm/mach-gemini/Kconfig      |  1 +
 arch/arm/mach-highbank/Kconfig    |  1 -
 arch/arm/mach-hisi/Kconfig        |  2 +-
 arch/arm/mach-imx/Kconfig         |  4 ++--
 arch/arm/mach-iop32x/Kconfig      |  1 +
 arch/arm/mach-keystone/Kconfig    |  1 -
 arch/arm/mach-lpc32xx/Kconfig     |  1 +
 arch/arm/mach-mmp/Kconfig         |  2 +-
 arch/arm/mach-moxart/Kconfig      |  1 +
 arch/arm/mach-mv78xx0/Kconfig     |  1 +
 arch/arm/mach-mvebu/Kconfig       |  3 +--
 arch/arm/mach-mxs/Kconfig         |  1 +
 arch/arm/mach-nomadik/Kconfig     |  1 +
 arch/arm/mach-npcm/Kconfig        |  2 +-
 arch/arm/mach-nspire/Kconfig      |  1 +
 arch/arm/mach-orion5x/Kconfig     |  1 +
 arch/arm/mach-oxnas/Kconfig       |  2 +-
 arch/arm/mach-qcom/Kconfig        |  1 -
 arch/arm/mach-s3c/Kconfig.s3c24xx |  1 +
 arch/arm/mach-socfpga/Kconfig     |  1 -
 arch/arm/mach-spear/Kconfig       |  2 +-
 arch/arm/mach-sunxi/Kconfig       |  3 +--
 arch/arm/mach-versatile/Kconfig   |  5 +++--
 arch/arm/mach-vt8500/Kconfig      |  1 +
 arch/arm/mach-zynq/Kconfig        |  1 -
 arch/arm/mm/Kconfig               | 28 ++++++++++++++++++----------
 34 files changed, 54 insertions(+), 33 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 94909cadb78a..4d98de155e20 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -349,6 +349,7 @@ config ARCH_MULTIPLATFORM
 
 config ARCH_FOOTBRIDGE
 	bool "FootBridge"
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_SA110
 	select FOOTBRIDGE
 	select NEED_MACH_MEMORY_H
@@ -358,7 +359,7 @@ config ARCH_FOOTBRIDGE
 
 config ARCH_IXP4XX
 	bool "IXP4xx-based"
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on CPU_BIG_ENDIAN
 	select ARM_PATCH_PHYS_VIRT
 	select CPU_XSCALE
 	select GPIO_IXP4XX
@@ -374,6 +375,7 @@ config ARCH_IXP4XX
 
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_MTD_XIP
 	select ARM_CPU_SUSPEND if PM
 	select AUTO_ZRELADDR
@@ -393,6 +395,7 @@ config ARCH_PXA
 config ARCH_RPC
 	bool "RiscPC"
 	depends on !CC_IS_CLANG && GCC_VERSION < 90100 && GCC_VERSION >= 60000
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_ACORN
 	select ARCH_MAY_HAVE_PC_FDC
 	select ARCH_SPARSEMEM_ENABLE
@@ -411,6 +414,7 @@ config ARCH_RPC
 
 config ARCH_SA1100
 	bool "SA1100-based"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_MTD_XIP
 	select ARCH_SPARSEMEM_ENABLE
 	select CLKSRC_MMIO
@@ -429,6 +433,7 @@ config ARCH_SA1100
 
 config ARCH_OMAP1
 	bool "TI OMAP1"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_OMAP
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
@@ -505,7 +510,6 @@ config ARCH_VIRT
 	select ARM_GIC_V3_ITS if PCI
 	select ARM_PSCI
 	select HAVE_ARM_ARCH_TIMER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 
 config ARCH_AIROHA
 	bool "Airoha SoC Support"
diff --git a/arch/arm/mach-asm9260/Kconfig b/arch/arm/mach-asm9260/Kconfig
index a2e1d0aaf252..74e0f61c74c8 100644
--- a/arch/arm/mach-asm9260/Kconfig
+++ b/arch/arm/mach-asm9260/Kconfig
@@ -2,6 +2,7 @@
 config MACH_ASM9260
 	bool "Alphascale ASM9260"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_ARM926T
 	select ASM9260_TIMER
 	help
diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig
index ea96d11b8502..cd8a15be0724 100644
--- a/arch/arm/mach-aspeed/Kconfig
+++ b/arch/arm/mach-aspeed/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_ASPEED
 	bool "Aspeed BMC architectures"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select SRAM
 	select WATCHDOG
 	select ASPEED_WATCHDOG
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 279810381256..b427c8abc4c6 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_AT91
 	bool "AT91/Microchip SoCs"
-	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
+	depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
+		ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
 	select ARM_CPU_SUSPEND if PM && ARCH_MULTI_V7
 	select COMMON_CLK_AT91
 	select GPIOLIB
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 314de9477b84..fd32e576ecd0 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_CLPS711X
 	bool "Cirrus Logic EP721x/EP731x-based"
 	depends on ARCH_MULTI_V4T
+	depends on CPU_LITTLE_ENDIAN
 	select CLPS711X_TIMER
 	select CPU_ARM720T
 	select GPIOLIB
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 1d3aef84287d..008cbc2ab867 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -3,6 +3,7 @@
 menuconfig ARCH_DAVINCI
 	bool "TI DaVinci"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select DAVINCI_TIMER
 	select ZONE_DMA
 	select PM_GENERIC_DOMAINS if PM
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index aa502ab57404..21f4cc2ba651 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_EP93XX
 	bool "EP93xx-based"
 	depends on ARCH_MULTI_V4T
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_SPARSEMEM_ENABLE
 	select ARM_AMBA
 	select ARM_VIC
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index f7d993628cb7..51a336f349f4 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -8,7 +8,6 @@
 menuconfig ARCH_EXYNOS
 	bool "Samsung Exynos"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select EXYNOS_IRQ_COMBINER
diff --git a/arch/arm/mach-gemini/Kconfig b/arch/arm/mach-gemini/Kconfig
index 969674ea5f17..f436a2009eca 100644
--- a/arch/arm/mach-gemini/Kconfig
+++ b/arch/arm/mach-gemini/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_GEMINI
 	bool "Cortina Systems Gemini"
 	depends on ARCH_MULTI_V4
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_AMBA
 	select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 9de38ce8124f..c2d6ef6b3927 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -2,7 +2,6 @@
 config ARCH_HIGHBANK
 	bool "Calxeda ECX-1000/2000 (Highbank/Midway)"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_ERRATA_764369 if SMP
 	select ARM_ERRATA_775420
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 2e980f834a6a..75cccbd3f05f 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select ARM_AMBA
 	select ARM_GIC if ARCH_MULTI_V7
 	select ARM_TIMER_SP804
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c5a59158722b..696c59fe4588 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MXC
 	bool "Freescale i.MX family"
-	depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on (ARCH_MULTI_V4_V5 && CPU_LITTLE_ENDIAN) || \
+		ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
 	select CLKSRC_IMX_GPT
 	select GENERIC_IRQ_CHIP
 	select GPIOLIB
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index 07dd137b8867..01f60a8e6404 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_IOP32X
 	bool "IOP32x-based platforms"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_XSCALE
 	select GPIO_IOP
 	select GPIOLIB
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index cfd39f729f8e..de69cc2dd483 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -8,7 +8,6 @@ config ARCH_KEYSTONE
 	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_ERRATA_798181 if SMP
 	select COMMON_CLK_KEYSTONE
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ZONE_DMA if ARM_LPAE
 	select PINCTRL
 	select PM_GENERIC_DOMAINS if PM
diff --git a/arch/arm/mach-lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig
index ec87c65f4536..35730d3696d0 100644
--- a/arch/arm/mach-lpc32xx/Kconfig
+++ b/arch/arm/mach-lpc32xx/Kconfig
@@ -3,6 +3,7 @@
 config ARCH_LPC32XX
 	bool "NXP LPC32XX"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select CLKSRC_LPC32XX
 	select CPU_ARM926T
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
index 0dd999212944..9642e6663a52 100644
--- a/arch/arm/mach-mmp/Kconfig
+++ b/arch/arm/mach-mmp/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MMP
 	bool "Marvell PXA168/910/MMP2/MMP3"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V7
 	select GPIO_PXA
 	select GPIOLIB
 	select PINCTRL
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig
index 31ada63ba51b..909c6573ba8b 100644
--- a/arch/arm/mach-moxart/Kconfig
+++ b/arch/arm/mach-moxart/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_MOXART
 	bool "MOXA ART SoC"
 	depends on ARCH_MULTI_V4
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FA526
 	select ARM_DMA_MEM_BUFFERABLE
 	select FARADAY_FTINTC010
diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig
index ea52c7fabb79..f0276f0d1102 100644
--- a/arch/arm/mach-mv78xx0/Kconfig
+++ b/arch/arm/mach-mv78xx0/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_MV78XX0
 	bool "Marvell MV78xx0"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FEROCEON
 	select GPIOLIB
 	select MVEBU_MBUS
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 34dbeaab94b0..9f60a6fe0eaf 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -1,8 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MVEBU
 	bool "Marvell Engineering Business Unit (MVEBU) SoCs"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select CLKSRC_MMIO
 	select PINCTRL
 	select PLAT_ORION
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index be1c1388055a..26dd8b9b7321 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -16,6 +16,7 @@ config SOC_IMX28
 config ARCH_MXS
 	bool "Freescale MXS (i.MX23, i.MX28) support"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select GPIOLIB
 	select MXS_TIMER
 	select PINCTRL
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index e98429be2b18..d1f819468e94 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_NOMADIK
 	bool "ST-Ericsson Nomadik"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select ARM_VIC
 	select CLKSRC_NOMADIK_MTU
diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
index a71cf1d189ae..63b42a19d1b8 100644
--- a/arch/arm/mach-npcm/Kconfig
+++ b/arch/arm/mach-npcm/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_NPCM
 	bool "Nuvoton NPCM Architecture"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN) || ARCH_MULTI_V7
 	select PINCTRL
 
 if ARCH_NPCM
diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig
index 6ef1b167619b..eb9916233dea 100644
--- a/arch/arm/mach-nspire/Kconfig
+++ b/arch/arm/mach-nspire/Kconfig
@@ -2,6 +2,7 @@
 config ARCH_NSPIRE
 	bool "TI-NSPIRE based"
 	depends on ARCH_MULTI_V4_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_ARM926T
 	select GENERIC_IRQ_CHIP
 	select ARM_AMBA
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index c77f3b4e287b..bf833b51931d 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_ORION5X
 	bool "Marvell Orion"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FEROCEON
 	select GPIOLIB
 	select MVEBU_MBUS
diff --git a/arch/arm/mach-oxnas/Kconfig b/arch/arm/mach-oxnas/Kconfig
index bee5f64c2e5f..a9ded7079268 100644
--- a/arch/arm/mach-oxnas/Kconfig
+++ b/arch/arm/mach-oxnas/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_OXNAS
 	bool "Oxford Semiconductor OXNAS Family SoCs"
+	depends on (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN) || ARCH_MULTI_V6
 	select ARCH_HAS_RESET_CONTROLLER
 	select COMMON_CLK_OXNAS
 	select GPIOLIB
@@ -11,7 +12,6 @@ menuconfig ARCH_OXNAS
 	select RESET_OXNAS
 	select VERSATILE_FPGA_IRQ
 	select PINCTRL
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
 	help
 	  Support for OxNas SoC family developed by Oxford Semiconductor.
 
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 466acc4a5e0c..109e126f7271 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -2,7 +2,6 @@
 menuconfig ARCH_QCOM
 	bool "Qualcomm Support"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_GIC
 	select ARM_AMBA
 	select PINCTRL
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index e388e265ba83..d7dc031abc7a 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -8,6 +8,7 @@
 menuconfig ARCH_S3C24XX
 	bool "Samsung S3C24XX SoCs"
 	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ATAGS
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 594edf9bbea4..eb72c240c248 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -3,7 +3,6 @@ menuconfig ARCH_INTEL_SOCFPGA
 	bool "Altera SOCFPGA family"
 	depends on ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select CACHE_L2X0
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index 20e284563a80..1add7ee49b63 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -5,7 +5,7 @@
 
 menuconfig PLAT_SPEAR
 	bool "ST SPEAr Family"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select ARM_AMBA
 	select CLKSRC_MMIO
 	select GPIOLIB
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index e5c2fce281cd..93cf70c0749b 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_SUNXI
 	bool "Allwinner SoCs"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
@@ -40,7 +40,6 @@ config MACH_SUN7I
 	default ARCH_SUNXI
 	select ARM_GIC
 	select ARM_PSCI
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select HAVE_ARM_ARCH_TIMER
 	select SUN5I_HSTIMER
 
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index 94b492c12e8d..2ef226194c3a 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -2,6 +2,7 @@
 config ARCH_VERSATILE
 	bool "ARM Ltd. Versatile family"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select ARM_TIMER_SP804
 	select ARM_VIC
@@ -19,6 +20,7 @@ config ARCH_VERSATILE
 menuconfig ARCH_INTEGRATOR
 	bool "ARM Ltd. Integrator family"
 	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
+	depends on CPU_LITTLE_ENDIAN || ARCH_MULTI_V6
 	select ARM_AMBA
 	select CMA
 	select DMA_CMA
@@ -143,7 +145,7 @@ endif
 
 menuconfig ARCH_REALVIEW
 	bool "ARM Ltd. RealView family"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_TIMER_SP804
@@ -247,7 +249,6 @@ endif
 menuconfig ARCH_VEXPRESS
 	bool "ARM Ltd. Versatile Express family"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_GLOBAL_TIMER
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index d01cdd9ad9c7..1aad54ea3c3d 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -10,6 +10,7 @@ config ARCH_VT8500
 config ARCH_WM8505
 	bool "VIA/Wondermedia 85xx and WM8650"
  	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
  	select ARCH_VT8500
  	select CPU_ARM926T
 
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index a56748d671c4..05be5aa9b402 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -3,7 +3,6 @@ config ARCH_ZYNQ
 	bool "Xilinx Zynq ARM Cortex A9 Platform"
 	depends on ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_GLOBAL_TIMER
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index d30ee26ccc87..a3a4589ec73b 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -738,15 +738,29 @@ config SWP_EMULATE
 
 	  If unsure, say Y.
 
+choice
+	prompt "CPU Endianess"
+	default CPU_LITTLE_ENDIAN
+
+config CPU_LITTLE_ENDIAN
+	bool "Built little-endian kernel"
+	help
+	  Say Y if you plan on running a kernel in little-endian mode.
+	  This is the default and is used in practically all modern user
+	  space builds.
+
 config CPU_BIG_ENDIAN
 	bool "Build big-endian kernel"
-	depends on ARCH_SUPPORTS_BIG_ENDIAN
 	depends on !LD_IS_LLD
 	help
 	  Say Y if you plan on running a kernel in big-endian mode.
-	  Note that your board must be properly built and your board
-	  port must properly enable any big-endian related features
-	  of your chipset/board/processor.
+	  This works on many machines using ARMv6 or newer processors
+	  but requires big-endian user space.
+
+	  The only ARMv5 platform with big-endian support is
+	  Intel IXP4xx.
+
+endchoice
 
 config CPU_ENDIAN_BE8
 	bool
@@ -1122,12 +1136,6 @@ config ARM_DMA_MEM_BUFFERABLE
 config ARM_HEAVY_MB
 	bool
 
-config ARCH_SUPPORTS_BIG_ENDIAN
-	bool
-	help
-	  This option specifies the architecture can support big endian
-	  operation.
-
 config DEBUG_ALIGN_RODATA
 	bool "Make rodata strictly non-executable"
 	depends on STRICT_KERNEL_RWX
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 11/12] ARM: rework endianess selection
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

Choosing big-endian vs little-endian kernels in Kconfig has not worked
correctly since the introduction of CONFIG_ARCH_MULTIPLATFORM a long
time ago.

The problems is that CONFIG_BIG_ENDIAN depends on
ARCH_SUPPORTS_BIG_ENDIAN, which can set by any one platform
in the config, but would actually have to be supported by all
of them.

This was mostly ok for ARMv6/ARMv7 builds, since these are BE8 and
tend to just work aside from problems in nonportable device drivers.
For ARMv4/v5 machines, CONFIG_BIG_ENDIAN and CONFIG_ARCH_MULTIPLATFORM
were never set together, so this was disabled on all those machines
except for IXP4xx.

As IXP4xx can now become part of ARCH_MULTIPLATFORM, it seems better to
formalize this logic: all ARMv4/v5 platforms get an explicit dependency
on being either big-endian (ixp4xx) or little-endian (the rest). We may
want to fix ixp4xx in the future to support both, but it does not work
in LE mode at the moment.

For the ARMv6/v7 platforms, there are two ways this could be handled

 a) allow both modes only for platforms selecting
    'ARCH_SUPPORTS_BIG_ENDIAN' today, but only LE mode for the
    others, given that these were added intentionally at some
    point.

 b) allow both modes everwhere, given that it was already possible
    to build that way by e.g. selecting ARCH_VIRT, and that the
    list is not an accurate reflection of which platforms may or
    may not work.

Out of these, I picked b) because it seemed slighly more logical
to me.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                  |  8 ++++++--
 arch/arm/mach-asm9260/Kconfig     |  1 +
 arch/arm/mach-aspeed/Kconfig      |  2 +-
 arch/arm/mach-at91/Kconfig        |  3 ++-
 arch/arm/mach-clps711x/Kconfig    |  1 +
 arch/arm/mach-davinci/Kconfig     |  1 +
 arch/arm/mach-ep93xx/Kconfig      |  1 +
 arch/arm/mach-exynos/Kconfig      |  1 -
 arch/arm/mach-gemini/Kconfig      |  1 +
 arch/arm/mach-highbank/Kconfig    |  1 -
 arch/arm/mach-hisi/Kconfig        |  2 +-
 arch/arm/mach-imx/Kconfig         |  4 ++--
 arch/arm/mach-iop32x/Kconfig      |  1 +
 arch/arm/mach-keystone/Kconfig    |  1 -
 arch/arm/mach-lpc32xx/Kconfig     |  1 +
 arch/arm/mach-mmp/Kconfig         |  2 +-
 arch/arm/mach-moxart/Kconfig      |  1 +
 arch/arm/mach-mv78xx0/Kconfig     |  1 +
 arch/arm/mach-mvebu/Kconfig       |  3 +--
 arch/arm/mach-mxs/Kconfig         |  1 +
 arch/arm/mach-nomadik/Kconfig     |  1 +
 arch/arm/mach-npcm/Kconfig        |  2 +-
 arch/arm/mach-nspire/Kconfig      |  1 +
 arch/arm/mach-orion5x/Kconfig     |  1 +
 arch/arm/mach-oxnas/Kconfig       |  2 +-
 arch/arm/mach-qcom/Kconfig        |  1 -
 arch/arm/mach-s3c/Kconfig.s3c24xx |  1 +
 arch/arm/mach-socfpga/Kconfig     |  1 -
 arch/arm/mach-spear/Kconfig       |  2 +-
 arch/arm/mach-sunxi/Kconfig       |  3 +--
 arch/arm/mach-versatile/Kconfig   |  5 +++--
 arch/arm/mach-vt8500/Kconfig      |  1 +
 arch/arm/mach-zynq/Kconfig        |  1 -
 arch/arm/mm/Kconfig               | 28 ++++++++++++++++++----------
 34 files changed, 54 insertions(+), 33 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 94909cadb78a..4d98de155e20 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -349,6 +349,7 @@ config ARCH_MULTIPLATFORM
 
 config ARCH_FOOTBRIDGE
 	bool "FootBridge"
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_SA110
 	select FOOTBRIDGE
 	select NEED_MACH_MEMORY_H
@@ -358,7 +359,7 @@ config ARCH_FOOTBRIDGE
 
 config ARCH_IXP4XX
 	bool "IXP4xx-based"
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on CPU_BIG_ENDIAN
 	select ARM_PATCH_PHYS_VIRT
 	select CPU_XSCALE
 	select GPIO_IXP4XX
@@ -374,6 +375,7 @@ config ARCH_IXP4XX
 
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_MTD_XIP
 	select ARM_CPU_SUSPEND if PM
 	select AUTO_ZRELADDR
@@ -393,6 +395,7 @@ config ARCH_PXA
 config ARCH_RPC
 	bool "RiscPC"
 	depends on !CC_IS_CLANG && GCC_VERSION < 90100 && GCC_VERSION >= 60000
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_ACORN
 	select ARCH_MAY_HAVE_PC_FDC
 	select ARCH_SPARSEMEM_ENABLE
@@ -411,6 +414,7 @@ config ARCH_RPC
 
 config ARCH_SA1100
 	bool "SA1100-based"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_MTD_XIP
 	select ARCH_SPARSEMEM_ENABLE
 	select CLKSRC_MMIO
@@ -429,6 +433,7 @@ config ARCH_SA1100
 
 config ARCH_OMAP1
 	bool "TI OMAP1"
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_OMAP
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
@@ -505,7 +510,6 @@ config ARCH_VIRT
 	select ARM_GIC_V3_ITS if PCI
 	select ARM_PSCI
 	select HAVE_ARM_ARCH_TIMER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 
 config ARCH_AIROHA
 	bool "Airoha SoC Support"
diff --git a/arch/arm/mach-asm9260/Kconfig b/arch/arm/mach-asm9260/Kconfig
index a2e1d0aaf252..74e0f61c74c8 100644
--- a/arch/arm/mach-asm9260/Kconfig
+++ b/arch/arm/mach-asm9260/Kconfig
@@ -2,6 +2,7 @@
 config MACH_ASM9260
 	bool "Alphascale ASM9260"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_ARM926T
 	select ASM9260_TIMER
 	help
diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig
index ea96d11b8502..cd8a15be0724 100644
--- a/arch/arm/mach-aspeed/Kconfig
+++ b/arch/arm/mach-aspeed/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_ASPEED
 	bool "Aspeed BMC architectures"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select SRAM
 	select WATCHDOG
 	select ASPEED_WATCHDOG
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 279810381256..b427c8abc4c6 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_AT91
 	bool "AT91/Microchip SoCs"
-	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
+	depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
+		ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
 	select ARM_CPU_SUSPEND if PM && ARCH_MULTI_V7
 	select COMMON_CLK_AT91
 	select GPIOLIB
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 314de9477b84..fd32e576ecd0 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_CLPS711X
 	bool "Cirrus Logic EP721x/EP731x-based"
 	depends on ARCH_MULTI_V4T
+	depends on CPU_LITTLE_ENDIAN
 	select CLPS711X_TIMER
 	select CPU_ARM720T
 	select GPIOLIB
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 1d3aef84287d..008cbc2ab867 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -3,6 +3,7 @@
 menuconfig ARCH_DAVINCI
 	bool "TI DaVinci"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select DAVINCI_TIMER
 	select ZONE_DMA
 	select PM_GENERIC_DOMAINS if PM
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index aa502ab57404..21f4cc2ba651 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_EP93XX
 	bool "EP93xx-based"
 	depends on ARCH_MULTI_V4T
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_SPARSEMEM_ENABLE
 	select ARM_AMBA
 	select ARM_VIC
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index f7d993628cb7..51a336f349f4 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -8,7 +8,6 @@
 menuconfig ARCH_EXYNOS
 	bool "Samsung Exynos"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select EXYNOS_IRQ_COMBINER
diff --git a/arch/arm/mach-gemini/Kconfig b/arch/arm/mach-gemini/Kconfig
index 969674ea5f17..f436a2009eca 100644
--- a/arch/arm/mach-gemini/Kconfig
+++ b/arch/arm/mach-gemini/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_GEMINI
 	bool "Cortina Systems Gemini"
 	depends on ARCH_MULTI_V4
+	depends on CPU_LITTLE_ENDIAN
 	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_AMBA
 	select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 9de38ce8124f..c2d6ef6b3927 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -2,7 +2,6 @@
 config ARCH_HIGHBANK
 	bool "Calxeda ECX-1000/2000 (Highbank/Midway)"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_ERRATA_764369 if SMP
 	select ARM_ERRATA_775420
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 2e980f834a6a..75cccbd3f05f 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select ARM_AMBA
 	select ARM_GIC if ARCH_MULTI_V7
 	select ARM_TIMER_SP804
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c5a59158722b..696c59fe4588 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MXC
 	bool "Freescale i.MX family"
-	depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on (ARCH_MULTI_V4_V5 && CPU_LITTLE_ENDIAN) || \
+		ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
 	select CLKSRC_IMX_GPT
 	select GENERIC_IRQ_CHIP
 	select GPIOLIB
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index 07dd137b8867..01f60a8e6404 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_IOP32X
 	bool "IOP32x-based platforms"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_XSCALE
 	select GPIO_IOP
 	select GPIOLIB
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index cfd39f729f8e..de69cc2dd483 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -8,7 +8,6 @@ config ARCH_KEYSTONE
 	select ARCH_HAS_RESET_CONTROLLER
 	select ARM_ERRATA_798181 if SMP
 	select COMMON_CLK_KEYSTONE
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ZONE_DMA if ARM_LPAE
 	select PINCTRL
 	select PM_GENERIC_DOMAINS if PM
diff --git a/arch/arm/mach-lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig
index ec87c65f4536..35730d3696d0 100644
--- a/arch/arm/mach-lpc32xx/Kconfig
+++ b/arch/arm/mach-lpc32xx/Kconfig
@@ -3,6 +3,7 @@
 config ARCH_LPC32XX
 	bool "NXP LPC32XX"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select CLKSRC_LPC32XX
 	select CPU_ARM926T
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
index 0dd999212944..9642e6663a52 100644
--- a/arch/arm/mach-mmp/Kconfig
+++ b/arch/arm/mach-mmp/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MMP
 	bool "Marvell PXA168/910/MMP2/MMP3"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V7
 	select GPIO_PXA
 	select GPIOLIB
 	select PINCTRL
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig
index 31ada63ba51b..909c6573ba8b 100644
--- a/arch/arm/mach-moxart/Kconfig
+++ b/arch/arm/mach-moxart/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_MOXART
 	bool "MOXA ART SoC"
 	depends on ARCH_MULTI_V4
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FA526
 	select ARM_DMA_MEM_BUFFERABLE
 	select FARADAY_FTINTC010
diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig
index ea52c7fabb79..f0276f0d1102 100644
--- a/arch/arm/mach-mv78xx0/Kconfig
+++ b/arch/arm/mach-mv78xx0/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_MV78XX0
 	bool "Marvell MV78xx0"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FEROCEON
 	select GPIOLIB
 	select MVEBU_MBUS
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 34dbeaab94b0..9f60a6fe0eaf 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -1,8 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_MVEBU
 	bool "Marvell Engineering Business Unit (MVEBU) SoCs"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
-	select ARCH_SUPPORTS_BIG_ENDIAN
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select CLKSRC_MMIO
 	select PINCTRL
 	select PLAT_ORION
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index be1c1388055a..26dd8b9b7321 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -16,6 +16,7 @@ config SOC_IMX28
 config ARCH_MXS
 	bool "Freescale MXS (i.MX23, i.MX28) support"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select GPIOLIB
 	select MXS_TIMER
 	select PINCTRL
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index e98429be2b18..d1f819468e94 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_NOMADIK
 	bool "ST-Ericsson Nomadik"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select ARM_VIC
 	select CLKSRC_NOMADIK_MTU
diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
index a71cf1d189ae..63b42a19d1b8 100644
--- a/arch/arm/mach-npcm/Kconfig
+++ b/arch/arm/mach-npcm/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_NPCM
 	bool "Nuvoton NPCM Architecture"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN) || ARCH_MULTI_V7
 	select PINCTRL
 
 if ARCH_NPCM
diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig
index 6ef1b167619b..eb9916233dea 100644
--- a/arch/arm/mach-nspire/Kconfig
+++ b/arch/arm/mach-nspire/Kconfig
@@ -2,6 +2,7 @@
 config ARCH_NSPIRE
 	bool "TI-NSPIRE based"
 	depends on ARCH_MULTI_V4_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_ARM926T
 	select GENERIC_IRQ_CHIP
 	select ARM_AMBA
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index c77f3b4e287b..bf833b51931d 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -2,6 +2,7 @@
 menuconfig ARCH_ORION5X
 	bool "Marvell Orion"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select CPU_FEROCEON
 	select GPIOLIB
 	select MVEBU_MBUS
diff --git a/arch/arm/mach-oxnas/Kconfig b/arch/arm/mach-oxnas/Kconfig
index bee5f64c2e5f..a9ded7079268 100644
--- a/arch/arm/mach-oxnas/Kconfig
+++ b/arch/arm/mach-oxnas/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_OXNAS
 	bool "Oxford Semiconductor OXNAS Family SoCs"
+	depends on (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN) || ARCH_MULTI_V6
 	select ARCH_HAS_RESET_CONTROLLER
 	select COMMON_CLK_OXNAS
 	select GPIOLIB
@@ -11,7 +12,6 @@ menuconfig ARCH_OXNAS
 	select RESET_OXNAS
 	select VERSATILE_FPGA_IRQ
 	select PINCTRL
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
 	help
 	  Support for OxNas SoC family developed by Oxford Semiconductor.
 
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 466acc4a5e0c..109e126f7271 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -2,7 +2,6 @@
 menuconfig ARCH_QCOM
 	bool "Qualcomm Support"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_GIC
 	select ARM_AMBA
 	select PINCTRL
diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx
index e388e265ba83..d7dc031abc7a 100644
--- a/arch/arm/mach-s3c/Kconfig.s3c24xx
+++ b/arch/arm/mach-s3c/Kconfig.s3c24xx
@@ -8,6 +8,7 @@
 menuconfig ARCH_S3C24XX
 	bool "Samsung S3C24XX SoCs"
 	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ATAGS
 	select CLKSRC_SAMSUNG_PWM
 	select GPIO_SAMSUNG
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 594edf9bbea4..eb72c240c248 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -3,7 +3,6 @@ menuconfig ARCH_INTEL_SOCFPGA
 	bool "Altera SOCFPGA family"
 	depends on ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select CACHE_L2X0
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index 20e284563a80..1add7ee49b63 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -5,7 +5,7 @@
 
 menuconfig PLAT_SPEAR
 	bool "ST SPEAr Family"
-	depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
+	depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN)
 	select ARM_AMBA
 	select CLKSRC_MMIO
 	select GPIOLIB
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index e5c2fce281cd..93cf70c0749b 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_SUNXI
 	bool "Allwinner SoCs"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
@@ -40,7 +40,6 @@ config MACH_SUN7I
 	default ARCH_SUNXI
 	select ARM_GIC
 	select ARM_PSCI
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select HAVE_ARM_ARCH_TIMER
 	select SUN5I_HSTIMER
 
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index 94b492c12e8d..2ef226194c3a 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -2,6 +2,7 @@
 config ARCH_VERSATILE
 	bool "ARM Ltd. Versatile family"
 	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
 	select ARM_AMBA
 	select ARM_TIMER_SP804
 	select ARM_VIC
@@ -19,6 +20,7 @@ config ARCH_VERSATILE
 menuconfig ARCH_INTEGRATOR
 	bool "ARM Ltd. Integrator family"
 	depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
+	depends on CPU_LITTLE_ENDIAN || ARCH_MULTI_V6
 	select ARM_AMBA
 	select CMA
 	select DMA_CMA
@@ -143,7 +145,7 @@ endif
 
 menuconfig ARCH_REALVIEW
 	bool "ARM Ltd. RealView family"
-	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_TIMER_SP804
@@ -247,7 +249,6 @@ endif
 menuconfig ARCH_VEXPRESS
 	bool "ARM Ltd. Versatile Express family"
 	depends on ARCH_MULTI_V7
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_GLOBAL_TIMER
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index d01cdd9ad9c7..1aad54ea3c3d 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -10,6 +10,7 @@ config ARCH_VT8500
 config ARCH_WM8505
 	bool "VIA/Wondermedia 85xx and WM8650"
  	depends on ARCH_MULTI_V5
+	depends on CPU_LITTLE_ENDIAN
  	select ARCH_VT8500
  	select CPU_ARM926T
 
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index a56748d671c4..05be5aa9b402 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -3,7 +3,6 @@ config ARCH_ZYNQ
 	bool "Xilinx Zynq ARM Cortex A9 Platform"
 	depends on ARCH_MULTI_V7
 	select ARCH_HAS_RESET_CONTROLLER
-	select ARCH_SUPPORTS_BIG_ENDIAN
 	select ARM_AMBA
 	select ARM_GIC
 	select ARM_GLOBAL_TIMER
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index d30ee26ccc87..a3a4589ec73b 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -738,15 +738,29 @@ config SWP_EMULATE
 
 	  If unsure, say Y.
 
+choice
+	prompt "CPU Endianess"
+	default CPU_LITTLE_ENDIAN
+
+config CPU_LITTLE_ENDIAN
+	bool "Built little-endian kernel"
+	help
+	  Say Y if you plan on running a kernel in little-endian mode.
+	  This is the default and is used in practically all modern user
+	  space builds.
+
 config CPU_BIG_ENDIAN
 	bool "Build big-endian kernel"
-	depends on ARCH_SUPPORTS_BIG_ENDIAN
 	depends on !LD_IS_LLD
 	help
 	  Say Y if you plan on running a kernel in big-endian mode.
-	  Note that your board must be properly built and your board
-	  port must properly enable any big-endian related features
-	  of your chipset/board/processor.
+	  This works on many machines using ARMv6 or newer processors
+	  but requires big-endian user space.
+
+	  The only ARMv5 platform with big-endian support is
+	  Intel IXP4xx.
+
+endchoice
 
 config CPU_ENDIAN_BE8
 	bool
@@ -1122,12 +1136,6 @@ config ARM_DMA_MEM_BUFFERABLE
 config ARM_HEAVY_MB
 	bool
 
-config ARCH_SUPPORTS_BIG_ENDIAN
-	bool
-	help
-	  This option specifies the architecture can support big endian
-	  operation.
-
 config DEBUG_ALIGN_RODATA
 	bool "Make rodata strictly non-executable"
 	depends on STRICT_KERNEL_RWX
-- 
2.29.2


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

* [PATCH 12/12] ARM: ixp4xx: enable multiplatform support
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-05  9:17   ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

After all the work that Linus Walleij did on this platform, it can be
part of a generic kernel build as well.

Note that there are known bugs in little-endian mode on ixp4xx, and
no other ARMv5 platform at this point supports big-endian mode, or is
likely to in the future, so there is limited practical value in this,
but it helps with build testing and ixp4xx little-endian support may
get fixed in the future.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              | 16 ------
 arch/arm/mach-ixp4xx/Kconfig                  | 22 +++++---
 arch/arm/mach-ixp4xx/Makefile.boot            |  4 --
 .../arm/mach-ixp4xx/include/mach/uncompress.h | 54 -------------------
 4 files changed, 15 insertions(+), 81 deletions(-)
 delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4d98de155e20..db9b9ed5d7c7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -357,22 +357,6 @@ config ARCH_FOOTBRIDGE
 	  Support for systems based on the DC21285 companion chip
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 
-config ARCH_IXP4XX
-	bool "IXP4xx-based"
-	depends on CPU_BIG_ENDIAN
-	select ARM_PATCH_PHYS_VIRT
-	select CPU_XSCALE
-	select GPIO_IXP4XX
-	select GPIOLIB
-	select HAVE_PCI
-	select IXP4XX_IRQ
-	select IXP4XX_TIMER
-	select SPARSE_IRQ
-	select USB_EHCI_BIG_ENDIAN_DESC
-	select USB_EHCI_BIG_ENDIAN_MMIO
-	help
-	  Support for Intel's IXP4XX (XScale) family of processors.
-
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
 	depends on CPU_LITTLE_ENDIAN
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index f41ba3f42fc8..dc6ea3c2e3ed 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -1,9 +1,20 @@
 # SPDX-License-Identifier: GPL-2.0-only
-if ARCH_IXP4XX
-
-menu "Intel IXP4xx Implementation Options"
+menuconfig ARCH_IXP4XX
+	bool "IXP4xx-based platforms"
+	depends on ARCH_MULTI_V5
+	depends on CPU_BIG_ENDIAN
+	select CPU_XSCALE
+	select GPIO_IXP4XX
+	select GPIOLIB
+	select FORCE_PCI
+	select IXP4XX_IRQ
+	select IXP4XX_TIMER
+	select USB_EHCI_BIG_ENDIAN_DESC
+	select USB_EHCI_BIG_ENDIAN_MMIO
+	help
+	  Support for Intel's IXP4XX (XScale) family of processors.
 
-comment "IXP4xx Platforms"
+if ARCH_IXP4XX
 
 config MACH_IXP4XX_OF
 	bool
@@ -12,11 +23,8 @@ config MACH_IXP4XX_OF
 	select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
 	select I2C
 	select I2C_IOP3XX
-	select PCI
 	select USE_OF
 	help
 	  Say 'Y' here to support Device Tree-based IXP4xx platforms.
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-ixp4xx/Makefile.boot b/arch/arm/mach-ixp4xx/Makefile.boot
deleted file mode 100644
index 9b015bd1ef27..000000000000
--- a/arch/arm/mach-ixp4xx/Makefile.boot
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y	+= 0x00008000
-params_phys-y	:= 0x00000100
-
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
deleted file mode 100644
index 09e7663e6a55..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-ixp4xx/include/mach/uncompress.h 
- *
- * Copyright (C) 2002 Intel Corporation.
- * Copyright (C) 2003-2004 MontaVista Software, Inc.
- */
-
-#ifndef _ARCH_UNCOMPRESS_H_
-#define _ARCH_UNCOMPRESS_H_
-
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define IXP4XX_UART1_BASE_PHYS 0xc8000000
-#define IXP4XX_UART2_BASE_PHYS 0xc8001000
-
-#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
-
-volatile u32* uart_base;
-
-static inline void putc(int c)
-{
-	/* Check THRE and TEMT bits before we transmit the character.
-	 */
-	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
-		barrier();
-
-	*uart_base = c;
-}
-
-static void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
-{
-	/*
-	 * Some boards are using UART2 as console
-	 */
-	if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
-	    machine_is_gateway7001() || machine_is_wg302v2() ||
-	    machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
-		uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
-	else
-		uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
-}
-
-/*
- * arch_id is a variable in decompress_kernel()
- */
-#define arch_decomp_setup()	__arch_decomp_setup(arch_id)
-
-#endif
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 12/12] ARM: ixp4xx: enable multiplatform support
@ 2022-04-05  9:17   ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05  9:17 UTC (permalink / raw)
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

From: Arnd Bergmann <arnd@arndb.de>

After all the work that Linus Walleij did on this platform, it can be
part of a generic kernel build as well.

Note that there are known bugs in little-endian mode on ixp4xx, and
no other ARMv5 platform at this point supports big-endian mode, or is
likely to in the future, so there is limited practical value in this,
but it helps with build testing and ixp4xx little-endian support may
get fixed in the future.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig                              | 16 ------
 arch/arm/mach-ixp4xx/Kconfig                  | 22 +++++---
 arch/arm/mach-ixp4xx/Makefile.boot            |  4 --
 .../arm/mach-ixp4xx/include/mach/uncompress.h | 54 -------------------
 4 files changed, 15 insertions(+), 81 deletions(-)
 delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4d98de155e20..db9b9ed5d7c7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -357,22 +357,6 @@ config ARCH_FOOTBRIDGE
 	  Support for systems based on the DC21285 companion chip
 	  ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
 
-config ARCH_IXP4XX
-	bool "IXP4xx-based"
-	depends on CPU_BIG_ENDIAN
-	select ARM_PATCH_PHYS_VIRT
-	select CPU_XSCALE
-	select GPIO_IXP4XX
-	select GPIOLIB
-	select HAVE_PCI
-	select IXP4XX_IRQ
-	select IXP4XX_TIMER
-	select SPARSE_IRQ
-	select USB_EHCI_BIG_ENDIAN_DESC
-	select USB_EHCI_BIG_ENDIAN_MMIO
-	help
-	  Support for Intel's IXP4XX (XScale) family of processors.
-
 config ARCH_PXA
 	bool "PXA2xx/PXA3xx-based"
 	depends on CPU_LITTLE_ENDIAN
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index f41ba3f42fc8..dc6ea3c2e3ed 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -1,9 +1,20 @@
 # SPDX-License-Identifier: GPL-2.0-only
-if ARCH_IXP4XX
-
-menu "Intel IXP4xx Implementation Options"
+menuconfig ARCH_IXP4XX
+	bool "IXP4xx-based platforms"
+	depends on ARCH_MULTI_V5
+	depends on CPU_BIG_ENDIAN
+	select CPU_XSCALE
+	select GPIO_IXP4XX
+	select GPIOLIB
+	select FORCE_PCI
+	select IXP4XX_IRQ
+	select IXP4XX_TIMER
+	select USB_EHCI_BIG_ENDIAN_DESC
+	select USB_EHCI_BIG_ENDIAN_MMIO
+	help
+	  Support for Intel's IXP4XX (XScale) family of processors.
 
-comment "IXP4xx Platforms"
+if ARCH_IXP4XX
 
 config MACH_IXP4XX_OF
 	bool
@@ -12,11 +23,8 @@ config MACH_IXP4XX_OF
 	select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
 	select I2C
 	select I2C_IOP3XX
-	select PCI
 	select USE_OF
 	help
 	  Say 'Y' here to support Device Tree-based IXP4xx platforms.
 
-endmenu
-
 endif
diff --git a/arch/arm/mach-ixp4xx/Makefile.boot b/arch/arm/mach-ixp4xx/Makefile.boot
deleted file mode 100644
index 9b015bd1ef27..000000000000
--- a/arch/arm/mach-ixp4xx/Makefile.boot
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y	+= 0x00008000
-params_phys-y	:= 0x00000100
-
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
deleted file mode 100644
index 09e7663e6a55..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-ixp4xx/include/mach/uncompress.h 
- *
- * Copyright (C) 2002 Intel Corporation.
- * Copyright (C) 2003-2004 MontaVista Software, Inc.
- */
-
-#ifndef _ARCH_UNCOMPRESS_H_
-#define _ARCH_UNCOMPRESS_H_
-
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define IXP4XX_UART1_BASE_PHYS 0xc8000000
-#define IXP4XX_UART2_BASE_PHYS 0xc8001000
-
-#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
-
-volatile u32* uart_base;
-
-static inline void putc(int c)
-{
-	/* Check THRE and TEMT bits before we transmit the character.
-	 */
-	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
-		barrier();
-
-	*uart_base = c;
-}
-
-static void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
-{
-	/*
-	 * Some boards are using UART2 as console
-	 */
-	if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
-	    machine_is_gateway7001() || machine_is_wg302v2() ||
-	    machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
-		uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
-	else
-		uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
-}
-
-/*
- * arch_id is a variable in decompress_kernel()
- */
-#define arch_decomp_setup()	__arch_decomp_setup(arch_id)
-
-#endif
-- 
2.29.2


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

* Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05  9:42     ` Lukasz Majewski
  -1 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches


[-- Attachment #1.1: Type: text/plain, Size: 7398 bytes --]

On Tue,  5 Apr 2022 11:17:40 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
> 
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ep93xx/core.c              |   4 +-
>  arch/arm/mach-ep93xx/include/mach/irqs.h | 122
> ++++++++++++----------- 2 files changed, 65 insertions(+), 61
> deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index a3b4e843456a..e4569a5acc3f 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
>   *************************************************************************/
>  void __init ep93xx_init_irq(void)
>  {
> -	vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
> -	vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK,
> 0);
> +	vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0,
> EP93XX_VIC1_VALID_IRQ_MASK, 0);
> +	vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1,
> EP93XX_VIC2_VALID_IRQ_MASK, 0); }
>  
>  
> diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h
> b/arch/arm/mach-ep93xx/include/mach/irqs.h index
> 244daf83ce6d..60c69c4ed7e1 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/irqs.h +++
> b/arch/arm/mach-ep93xx/include/mach/irqs.h @@ -6,69 +6,73 @@
>  #ifndef __ASM_ARCH_IRQS_H
>  #define __ASM_ARCH_IRQS_H
>  
> -#define IRQ_EP93XX_COMMRX		2
> -#define IRQ_EP93XX_COMMTX		3
> -#define IRQ_EP93XX_TIMER1		4
> -#define IRQ_EP93XX_TIMER2		5
> -#define IRQ_EP93XX_AACINTR		6
> -#define IRQ_EP93XX_DMAM2P0		7
> -#define IRQ_EP93XX_DMAM2P1		8
> -#define IRQ_EP93XX_DMAM2P2		9
> -#define IRQ_EP93XX_DMAM2P3		10
> -#define IRQ_EP93XX_DMAM2P4		11
> -#define IRQ_EP93XX_DMAM2P5		12
> -#define IRQ_EP93XX_DMAM2P6		13
> -#define IRQ_EP93XX_DMAM2P7		14
> -#define IRQ_EP93XX_DMAM2P8		15
> -#define IRQ_EP93XX_DMAM2P9		16
> -#define IRQ_EP93XX_DMAM2M0		17
> -#define IRQ_EP93XX_DMAM2M1		18
> -#define IRQ_EP93XX_GPIO0MUX		19
> -#define IRQ_EP93XX_GPIO1MUX		20
> -#define IRQ_EP93XX_GPIO2MUX		21
> -#define IRQ_EP93XX_GPIO3MUX		22
> -#define IRQ_EP93XX_UART1RX		23
> -#define IRQ_EP93XX_UART1TX		24
> -#define IRQ_EP93XX_UART2RX		25
> -#define IRQ_EP93XX_UART2TX		26
> -#define IRQ_EP93XX_UART3RX		27
> -#define IRQ_EP93XX_UART3TX		28
> -#define IRQ_EP93XX_KEY			29
> -#define IRQ_EP93XX_TOUCH		30
> +#define IRQ_EP93XX_VIC0			1
> +
> +#define IRQ_EP93XX_COMMRX		(IRQ_EP93XX_VIC0 + 2)
> +#define IRQ_EP93XX_COMMTX		(IRQ_EP93XX_VIC0 + 3)
> +#define IRQ_EP93XX_TIMER1		(IRQ_EP93XX_VIC0 + 4)
> +#define IRQ_EP93XX_TIMER2		(IRQ_EP93XX_VIC0 + 5)
> +#define IRQ_EP93XX_AACINTR		(IRQ_EP93XX_VIC0 + 6)
> +#define IRQ_EP93XX_DMAM2P0		(IRQ_EP93XX_VIC0 + 7)
> +#define IRQ_EP93XX_DMAM2P1		(IRQ_EP93XX_VIC0 + 8)
> +#define IRQ_EP93XX_DMAM2P2		(IRQ_EP93XX_VIC0 + 9)
> +#define IRQ_EP93XX_DMAM2P3		(IRQ_EP93XX_VIC0 + 10)
> +#define IRQ_EP93XX_DMAM2P4		(IRQ_EP93XX_VIC0 + 11)
> +#define IRQ_EP93XX_DMAM2P5		(IRQ_EP93XX_VIC0 + 12)
> +#define IRQ_EP93XX_DMAM2P6		(IRQ_EP93XX_VIC0 + 13)
> +#define IRQ_EP93XX_DMAM2P7		(IRQ_EP93XX_VIC0 + 14)
> +#define IRQ_EP93XX_DMAM2P8		(IRQ_EP93XX_VIC0 + 15)
> +#define IRQ_EP93XX_DMAM2P9		(IRQ_EP93XX_VIC0 + 16)
> +#define IRQ_EP93XX_DMAM2M0		(IRQ_EP93XX_VIC0 + 17)
> +#define IRQ_EP93XX_DMAM2M1		(IRQ_EP93XX_VIC0 + 18)
> +#define IRQ_EP93XX_GPIO0MUX		(IRQ_EP93XX_VIC0 + 19)
> +#define IRQ_EP93XX_GPIO1MUX		(IRQ_EP93XX_VIC0 + 20)
> +#define IRQ_EP93XX_GPIO2MUX		(IRQ_EP93XX_VIC0 + 21)
> +#define IRQ_EP93XX_GPIO3MUX		(IRQ_EP93XX_VIC0 + 22)
> +#define IRQ_EP93XX_UART1RX		(IRQ_EP93XX_VIC0 + 23)
> +#define IRQ_EP93XX_UART1TX		(IRQ_EP93XX_VIC0 + 24)
> +#define IRQ_EP93XX_UART2RX		(IRQ_EP93XX_VIC0 + 25)
> +#define IRQ_EP93XX_UART2TX		(IRQ_EP93XX_VIC0 + 26)
> +#define IRQ_EP93XX_UART3RX		(IRQ_EP93XX_VIC0 + 27)
> +#define IRQ_EP93XX_UART3TX		(IRQ_EP93XX_VIC0 + 28)
> +#define IRQ_EP93XX_KEY			(IRQ_EP93XX_VIC0 + 29)
> +#define IRQ_EP93XX_TOUCH		(IRQ_EP93XX_VIC0 + 30)
>  #define EP93XX_VIC1_VALID_IRQ_MASK	0x7ffffffc
>  
> -#define IRQ_EP93XX_EXT0			32
> -#define IRQ_EP93XX_EXT1			33
> -#define IRQ_EP93XX_EXT2			34
> -#define IRQ_EP93XX_64HZ			35
> -#define IRQ_EP93XX_WATCHDOG		36
> -#define IRQ_EP93XX_RTC			37
> -#define IRQ_EP93XX_IRDA			38
> -#define IRQ_EP93XX_ETHERNET		39
> -#define IRQ_EP93XX_EXT3			40
> -#define IRQ_EP93XX_PROG			41
> -#define IRQ_EP93XX_1HZ			42
> -#define IRQ_EP93XX_VSYNC		43
> -#define IRQ_EP93XX_VIDEO_FIFO		44
> -#define IRQ_EP93XX_SSP1RX		45
> -#define IRQ_EP93XX_SSP1TX		46
> -#define IRQ_EP93XX_GPIO4MUX		47
> -#define IRQ_EP93XX_GPIO5MUX		48
> -#define IRQ_EP93XX_GPIO6MUX		49
> -#define IRQ_EP93XX_GPIO7MUX		50
> -#define IRQ_EP93XX_TIMER3		51
> -#define IRQ_EP93XX_UART1		52
> -#define IRQ_EP93XX_SSP			53
> -#define IRQ_EP93XX_UART2		54
> -#define IRQ_EP93XX_UART3		55
> -#define IRQ_EP93XX_USB			56
> -#define IRQ_EP93XX_ETHERNET_PME		57
> -#define IRQ_EP93XX_DSP			58
> -#define IRQ_EP93XX_GPIO_AB		59
> -#define IRQ_EP93XX_SAI			60
> +#define IRQ_EP93XX_VIC1			(IRQ_EP93XX_VIC0 + 32)
> +
> +#define IRQ_EP93XX_EXT0			(IRQ_EP93XX_VIC1 + 0)
> +#define IRQ_EP93XX_EXT1			(IRQ_EP93XX_VIC1 + 1)
> +#define IRQ_EP93XX_EXT2			(IRQ_EP93XX_VIC1 + 2)
> +#define IRQ_EP93XX_64HZ			(IRQ_EP93XX_VIC1 + 3)
> +#define IRQ_EP93XX_WATCHDOG		(IRQ_EP93XX_VIC1 + 4)
> +#define IRQ_EP93XX_RTC			(IRQ_EP93XX_VIC1 + 5)
> +#define IRQ_EP93XX_IRDA			(IRQ_EP93XX_VIC1 + 6)
> +#define IRQ_EP93XX_ETHERNET		(IRQ_EP93XX_VIC1 + 7)
> +#define IRQ_EP93XX_EXT3			(IRQ_EP93XX_VIC1 + 8)
> +#define IRQ_EP93XX_PROG			(IRQ_EP93XX_VIC1 + 9)
> +#define IRQ_EP93XX_1HZ			(IRQ_EP93XX_VIC1 + 10)
> +#define IRQ_EP93XX_VSYNC		(IRQ_EP93XX_VIC1 + 11)
> +#define IRQ_EP93XX_VIDEO_FIFO		(IRQ_EP93XX_VIC1 + 12)
> +#define IRQ_EP93XX_SSP1RX		(IRQ_EP93XX_VIC1 + 13)
> +#define IRQ_EP93XX_SSP1TX		(IRQ_EP93XX_VIC1 + 14)
> +#define IRQ_EP93XX_GPIO4MUX		(IRQ_EP93XX_VIC1 + 15)
> +#define IRQ_EP93XX_GPIO5MUX		(IRQ_EP93XX_VIC1 + 16)
> +#define IRQ_EP93XX_GPIO6MUX		(IRQ_EP93XX_VIC1 + 17)
> +#define IRQ_EP93XX_GPIO7MUX		(IRQ_EP93XX_VIC1 + 18)
> +#define IRQ_EP93XX_TIMER3		(IRQ_EP93XX_VIC1 + 19)
> +#define IRQ_EP93XX_UART1		(IRQ_EP93XX_VIC1 + 20)
> +#define IRQ_EP93XX_SSP			(IRQ_EP93XX_VIC1 + 21)
> +#define IRQ_EP93XX_UART2		(IRQ_EP93XX_VIC1 + 22)
> +#define IRQ_EP93XX_UART3		(IRQ_EP93XX_VIC1 + 23)
> +#define IRQ_EP93XX_USB			(IRQ_EP93XX_VIC1 + 24)
> +#define IRQ_EP93XX_ETHERNET_PME		(IRQ_EP93XX_VIC1 + 25)
> +#define IRQ_EP93XX_DSP			(IRQ_EP93XX_VIC1 + 26)
> +#define IRQ_EP93XX_GPIO_AB		(IRQ_EP93XX_VIC1 + 27)
> +#define IRQ_EP93XX_SAI			(IRQ_EP93XX_VIC1 + 28)
>  #define EP93XX_VIC2_VALID_IRQ_MASK	0x1fffffff
>  
> -#define NR_EP93XX_IRQS			(64 + 24)
> +#define NR_EP93XX_IRQS			(IRQ_EP93XX_VIC1 + 32
> + 24) 
>  #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
>  #define EP93XX_BOARD_IRQS		32

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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts
@ 2022-04-05  9:42     ` Lukasz Majewski
  0 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

[-- Attachment #1: Type: text/plain, Size: 7398 bytes --]

On Tue,  5 Apr 2022 11:17:40 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
> 
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ep93xx/core.c              |   4 +-
>  arch/arm/mach-ep93xx/include/mach/irqs.h | 122
> ++++++++++++----------- 2 files changed, 65 insertions(+), 61
> deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index a3b4e843456a..e4569a5acc3f 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
>   *************************************************************************/
>  void __init ep93xx_init_irq(void)
>  {
> -	vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
> -	vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK,
> 0);
> +	vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0,
> EP93XX_VIC1_VALID_IRQ_MASK, 0);
> +	vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1,
> EP93XX_VIC2_VALID_IRQ_MASK, 0); }
>  
>  
> diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h
> b/arch/arm/mach-ep93xx/include/mach/irqs.h index
> 244daf83ce6d..60c69c4ed7e1 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/irqs.h +++
> b/arch/arm/mach-ep93xx/include/mach/irqs.h @@ -6,69 +6,73 @@
>  #ifndef __ASM_ARCH_IRQS_H
>  #define __ASM_ARCH_IRQS_H
>  
> -#define IRQ_EP93XX_COMMRX		2
> -#define IRQ_EP93XX_COMMTX		3
> -#define IRQ_EP93XX_TIMER1		4
> -#define IRQ_EP93XX_TIMER2		5
> -#define IRQ_EP93XX_AACINTR		6
> -#define IRQ_EP93XX_DMAM2P0		7
> -#define IRQ_EP93XX_DMAM2P1		8
> -#define IRQ_EP93XX_DMAM2P2		9
> -#define IRQ_EP93XX_DMAM2P3		10
> -#define IRQ_EP93XX_DMAM2P4		11
> -#define IRQ_EP93XX_DMAM2P5		12
> -#define IRQ_EP93XX_DMAM2P6		13
> -#define IRQ_EP93XX_DMAM2P7		14
> -#define IRQ_EP93XX_DMAM2P8		15
> -#define IRQ_EP93XX_DMAM2P9		16
> -#define IRQ_EP93XX_DMAM2M0		17
> -#define IRQ_EP93XX_DMAM2M1		18
> -#define IRQ_EP93XX_GPIO0MUX		19
> -#define IRQ_EP93XX_GPIO1MUX		20
> -#define IRQ_EP93XX_GPIO2MUX		21
> -#define IRQ_EP93XX_GPIO3MUX		22
> -#define IRQ_EP93XX_UART1RX		23
> -#define IRQ_EP93XX_UART1TX		24
> -#define IRQ_EP93XX_UART2RX		25
> -#define IRQ_EP93XX_UART2TX		26
> -#define IRQ_EP93XX_UART3RX		27
> -#define IRQ_EP93XX_UART3TX		28
> -#define IRQ_EP93XX_KEY			29
> -#define IRQ_EP93XX_TOUCH		30
> +#define IRQ_EP93XX_VIC0			1
> +
> +#define IRQ_EP93XX_COMMRX		(IRQ_EP93XX_VIC0 + 2)
> +#define IRQ_EP93XX_COMMTX		(IRQ_EP93XX_VIC0 + 3)
> +#define IRQ_EP93XX_TIMER1		(IRQ_EP93XX_VIC0 + 4)
> +#define IRQ_EP93XX_TIMER2		(IRQ_EP93XX_VIC0 + 5)
> +#define IRQ_EP93XX_AACINTR		(IRQ_EP93XX_VIC0 + 6)
> +#define IRQ_EP93XX_DMAM2P0		(IRQ_EP93XX_VIC0 + 7)
> +#define IRQ_EP93XX_DMAM2P1		(IRQ_EP93XX_VIC0 + 8)
> +#define IRQ_EP93XX_DMAM2P2		(IRQ_EP93XX_VIC0 + 9)
> +#define IRQ_EP93XX_DMAM2P3		(IRQ_EP93XX_VIC0 + 10)
> +#define IRQ_EP93XX_DMAM2P4		(IRQ_EP93XX_VIC0 + 11)
> +#define IRQ_EP93XX_DMAM2P5		(IRQ_EP93XX_VIC0 + 12)
> +#define IRQ_EP93XX_DMAM2P6		(IRQ_EP93XX_VIC0 + 13)
> +#define IRQ_EP93XX_DMAM2P7		(IRQ_EP93XX_VIC0 + 14)
> +#define IRQ_EP93XX_DMAM2P8		(IRQ_EP93XX_VIC0 + 15)
> +#define IRQ_EP93XX_DMAM2P9		(IRQ_EP93XX_VIC0 + 16)
> +#define IRQ_EP93XX_DMAM2M0		(IRQ_EP93XX_VIC0 + 17)
> +#define IRQ_EP93XX_DMAM2M1		(IRQ_EP93XX_VIC0 + 18)
> +#define IRQ_EP93XX_GPIO0MUX		(IRQ_EP93XX_VIC0 + 19)
> +#define IRQ_EP93XX_GPIO1MUX		(IRQ_EP93XX_VIC0 + 20)
> +#define IRQ_EP93XX_GPIO2MUX		(IRQ_EP93XX_VIC0 + 21)
> +#define IRQ_EP93XX_GPIO3MUX		(IRQ_EP93XX_VIC0 + 22)
> +#define IRQ_EP93XX_UART1RX		(IRQ_EP93XX_VIC0 + 23)
> +#define IRQ_EP93XX_UART1TX		(IRQ_EP93XX_VIC0 + 24)
> +#define IRQ_EP93XX_UART2RX		(IRQ_EP93XX_VIC0 + 25)
> +#define IRQ_EP93XX_UART2TX		(IRQ_EP93XX_VIC0 + 26)
> +#define IRQ_EP93XX_UART3RX		(IRQ_EP93XX_VIC0 + 27)
> +#define IRQ_EP93XX_UART3TX		(IRQ_EP93XX_VIC0 + 28)
> +#define IRQ_EP93XX_KEY			(IRQ_EP93XX_VIC0 + 29)
> +#define IRQ_EP93XX_TOUCH		(IRQ_EP93XX_VIC0 + 30)
>  #define EP93XX_VIC1_VALID_IRQ_MASK	0x7ffffffc
>  
> -#define IRQ_EP93XX_EXT0			32
> -#define IRQ_EP93XX_EXT1			33
> -#define IRQ_EP93XX_EXT2			34
> -#define IRQ_EP93XX_64HZ			35
> -#define IRQ_EP93XX_WATCHDOG		36
> -#define IRQ_EP93XX_RTC			37
> -#define IRQ_EP93XX_IRDA			38
> -#define IRQ_EP93XX_ETHERNET		39
> -#define IRQ_EP93XX_EXT3			40
> -#define IRQ_EP93XX_PROG			41
> -#define IRQ_EP93XX_1HZ			42
> -#define IRQ_EP93XX_VSYNC		43
> -#define IRQ_EP93XX_VIDEO_FIFO		44
> -#define IRQ_EP93XX_SSP1RX		45
> -#define IRQ_EP93XX_SSP1TX		46
> -#define IRQ_EP93XX_GPIO4MUX		47
> -#define IRQ_EP93XX_GPIO5MUX		48
> -#define IRQ_EP93XX_GPIO6MUX		49
> -#define IRQ_EP93XX_GPIO7MUX		50
> -#define IRQ_EP93XX_TIMER3		51
> -#define IRQ_EP93XX_UART1		52
> -#define IRQ_EP93XX_SSP			53
> -#define IRQ_EP93XX_UART2		54
> -#define IRQ_EP93XX_UART3		55
> -#define IRQ_EP93XX_USB			56
> -#define IRQ_EP93XX_ETHERNET_PME		57
> -#define IRQ_EP93XX_DSP			58
> -#define IRQ_EP93XX_GPIO_AB		59
> -#define IRQ_EP93XX_SAI			60
> +#define IRQ_EP93XX_VIC1			(IRQ_EP93XX_VIC0 + 32)
> +
> +#define IRQ_EP93XX_EXT0			(IRQ_EP93XX_VIC1 + 0)
> +#define IRQ_EP93XX_EXT1			(IRQ_EP93XX_VIC1 + 1)
> +#define IRQ_EP93XX_EXT2			(IRQ_EP93XX_VIC1 + 2)
> +#define IRQ_EP93XX_64HZ			(IRQ_EP93XX_VIC1 + 3)
> +#define IRQ_EP93XX_WATCHDOG		(IRQ_EP93XX_VIC1 + 4)
> +#define IRQ_EP93XX_RTC			(IRQ_EP93XX_VIC1 + 5)
> +#define IRQ_EP93XX_IRDA			(IRQ_EP93XX_VIC1 + 6)
> +#define IRQ_EP93XX_ETHERNET		(IRQ_EP93XX_VIC1 + 7)
> +#define IRQ_EP93XX_EXT3			(IRQ_EP93XX_VIC1 + 8)
> +#define IRQ_EP93XX_PROG			(IRQ_EP93XX_VIC1 + 9)
> +#define IRQ_EP93XX_1HZ			(IRQ_EP93XX_VIC1 + 10)
> +#define IRQ_EP93XX_VSYNC		(IRQ_EP93XX_VIC1 + 11)
> +#define IRQ_EP93XX_VIDEO_FIFO		(IRQ_EP93XX_VIC1 + 12)
> +#define IRQ_EP93XX_SSP1RX		(IRQ_EP93XX_VIC1 + 13)
> +#define IRQ_EP93XX_SSP1TX		(IRQ_EP93XX_VIC1 + 14)
> +#define IRQ_EP93XX_GPIO4MUX		(IRQ_EP93XX_VIC1 + 15)
> +#define IRQ_EP93XX_GPIO5MUX		(IRQ_EP93XX_VIC1 + 16)
> +#define IRQ_EP93XX_GPIO6MUX		(IRQ_EP93XX_VIC1 + 17)
> +#define IRQ_EP93XX_GPIO7MUX		(IRQ_EP93XX_VIC1 + 18)
> +#define IRQ_EP93XX_TIMER3		(IRQ_EP93XX_VIC1 + 19)
> +#define IRQ_EP93XX_UART1		(IRQ_EP93XX_VIC1 + 20)
> +#define IRQ_EP93XX_SSP			(IRQ_EP93XX_VIC1 + 21)
> +#define IRQ_EP93XX_UART2		(IRQ_EP93XX_VIC1 + 22)
> +#define IRQ_EP93XX_UART3		(IRQ_EP93XX_VIC1 + 23)
> +#define IRQ_EP93XX_USB			(IRQ_EP93XX_VIC1 + 24)
> +#define IRQ_EP93XX_ETHERNET_PME		(IRQ_EP93XX_VIC1 + 25)
> +#define IRQ_EP93XX_DSP			(IRQ_EP93XX_VIC1 + 26)
> +#define IRQ_EP93XX_GPIO_AB		(IRQ_EP93XX_VIC1 + 27)
> +#define IRQ_EP93XX_SAI			(IRQ_EP93XX_VIC1 + 28)
>  #define EP93XX_VIC2_VALID_IRQ_MASK	0x1fffffff
>  
> -#define NR_EP93XX_IRQS			(64 + 24)
> +#define NR_EP93XX_IRQS			(IRQ_EP93XX_VIC1 + 32
> + 24) 
>  #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
>  #define EP93XX_BOARD_IRQS		32

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 --]

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

* Re: [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05  9:42     ` Lukasz Majewski
  -1 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches


[-- Attachment #1.1: Type: text/plain, Size: 11975 bytes --]

On Tue,  5 Apr 2022 11:17:41 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> globally. Do the minimal conversion by setting .nr_irqs in each
> machine descriptor.
> 
> Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> .nr_irqs the original value there, while using the plain
> NR_EP93XX_IRQS everywhere else.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Hubert Feurstein <hubert.feurstein@contec.at>
> Cc: Lukasz Majewski <lukma@denx.de>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig                               | 2 ++
>  arch/arm/mach-ep93xx/adssphere.c               | 1 +
>  arch/arm/mach-ep93xx/core.c                    | 1 +
>  arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
>  arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
>  arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
>  arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
>  arch/arm/mach-ep93xx/simone.c                  | 1 +
>  arch/arm/mach-ep93xx/snappercl15.c             | 1 +
>  arch/arm/mach-ep93xx/soc.h                     | 1 +
>  arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
>  arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
>  12 files changed, 23 insertions(+), 8 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 31f024e6e925..5177e54cc14c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -358,6 +358,8 @@ config ARCH_EP93XX
>  	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.
>  
> diff --git a/arch/arm/mach-ep93xx/adssphere.c
> b/arch/arm/mach-ep93xx/adssphere.c index 8d5e349a7a6d..0c48d3c5b8e7
> 100644 --- a/arch/arm/mach-ep93xx/adssphere.c
> +++ b/arch/arm/mach-ep93xx/adssphere.c
> @@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
>  MACHINE_START(ADSSPHERE, "ADS Sphere board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index e4569a5acc3f..2d58e273c96d 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -47,6 +47,7 @@
>  #include <asm/mach/map.h>
>  
>  #include "soc.h"
> +#include "irqs.h"
>  
>  /*************************************************************************
>   * Static I/O mappings that are needed for all EP93xx platforms
> diff --git a/arch/arm/mach-ep93xx/edb93xx.c
> b/arch/arm/mach-ep93xx/edb93xx.c index af0e22471ebd..4b90899a66e9
> 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
>  MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
>  	/* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -255,6 +256,7 @@ MACHINE_END
>  MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
>  	/* Maintainer: George Kashperko <george@chas.com.ua> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -267,6 +269,7 @@ MACHINE_END
>  MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -279,6 +282,7 @@ MACHINE_END
>  MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
>  	/* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -291,6 +295,7 @@ MACHINE_END
>  MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
>  	/* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -303,6 +308,7 @@ MACHINE_END
>  MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
>  	/* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -315,6 +321,7 @@ MACHINE_END
>  MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -327,6 +334,7 @@ MACHINE_END
>  MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/gesbc9312.c
> b/arch/arm/mach-ep93xx/gesbc9312.c index d7f9890321eb..0b7043e3e178
> 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c
> +++ b/arch/arm/mach-ep93xx/gesbc9312.c
> @@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
>  MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h
> b/arch/arm/mach-ep93xx/irqs.h similarity index 96%
> rename from arch/arm/mach-ep93xx/include/mach/irqs.h
> rename to arch/arm/mach-ep93xx/irqs.h
> index 60c69c4ed7e1..353201b90c66 100644
> --- a/arch/arm/mach-ep93xx/include/mach/irqs.h
> +++ b/arch/arm/mach-ep93xx/irqs.h
> @@ -1,8 +1,4 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * arch/arm/mach-ep93xx/include/mach/irqs.h
> - */
> -
>  #ifndef __ASM_ARCH_IRQS_H
>  #define __ASM_ARCH_IRQS_H
>  
> @@ -77,7 +73,4 @@
>  #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
>  #define EP93XX_BOARD_IRQS		32
>  
> -#define NR_IRQS				(NR_EP93XX_IRQS +
> EP93XX_BOARD_IRQS) -
> -
>  #endif
> diff --git a/arch/arm/mach-ep93xx/micro9.c
> b/arch/arm/mach-ep93xx/micro9.c index e6ead8ded6ee..c121c459aa17
> 100644 --- a/arch/arm/mach-ep93xx/micro9.c
> +++ b/arch/arm/mach-ep93xx/micro9.c
> @@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
>  MACHINE_START(MICRO9, "Contec Micro9-High")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -88,6 +89,7 @@ MACHINE_END
>  MACHINE_START(MICRO9M, "Contec Micro9-Mid")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -100,6 +102,7 @@ MACHINE_END
>  MACHINE_START(MICRO9L, "Contec Micro9-Lite")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -112,6 +115,7 @@ MACHINE_END
>  MACHINE_START(MICRO9S, "Contec Micro9-Slim")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/simone.c
> b/arch/arm/mach-ep93xx/simone.c index 5291053023b2..569e72413561
> 100644 --- a/arch/arm/mach-ep93xx/simone.c
> +++ b/arch/arm/mach-ep93xx/simone.c
> @@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
>  MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
>  	/* Maintainer: Ryan Mallon */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/snappercl15.c
> b/arch/arm/mach-ep93xx/snappercl15.c index e200d69471e9..1dfb725671b1
> 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c
> +++ b/arch/arm/mach-ep93xx/snappercl15.c
> @@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
>  MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
>  	/* Maintainer: Ryan Mallon */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
> index 94ef7f275f94..f0986e288d19 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -10,6 +10,7 @@
>  #define _EP93XX_SOC_H
>  
>  #include <mach/ep93xx-regs.h>
> +#include "irqs.h"
>  
>  /*
>   * EP93xx Physical Memory Map:
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c
> b/arch/arm/mach-ep93xx/ts72xx.c index 12eff8c8074d..e70bac011407
> 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -22,7 +22,6 @@
>  
>  #include "gpio-ep93xx.h"
>  #include "hardware.h"
> -#include <mach/irqs.h>
>  
>  #include <asm/mach-types.h>
>  #include <asm/mach/map.h>
> @@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
>  MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ts72xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -413,6 +413,7 @@ static void __init bk3_init_machine(void)
>  MACHINE_START(BK3, "Liebherr controller BK3.1")
>  	/* Maintainer: Lukasz Majewski <lukma@denx.de> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ts72xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c
> b/arch/arm/mach-ep93xx/vision_ep9307.c index
> e46281e60bf7..30d9cf3791eb 100644 ---
> a/arch/arm/mach-ep93xx/vision_ep9307.c +++
> b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -302,6 +302,7 @@ static
> void __init vision_init_machine(void) MACHINE_START(VISION_EP9307,
> "Vision Engraving Systems EP9307") /* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
>  	.map_io		= vision_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,

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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
@ 2022-04-05  9:42     ` Lukasz Majewski
  0 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

[-- Attachment #1: Type: text/plain, Size: 11975 bytes --]

On Tue,  5 Apr 2022 11:17:41 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> globally. Do the minimal conversion by setting .nr_irqs in each
> machine descriptor.
> 
> Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> .nr_irqs the original value there, while using the plain
> NR_EP93XX_IRQS everywhere else.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Hubert Feurstein <hubert.feurstein@contec.at>
> Cc: Lukasz Majewski <lukma@denx.de>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig                               | 2 ++
>  arch/arm/mach-ep93xx/adssphere.c               | 1 +
>  arch/arm/mach-ep93xx/core.c                    | 1 +
>  arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
>  arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
>  arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
>  arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
>  arch/arm/mach-ep93xx/simone.c                  | 1 +
>  arch/arm/mach-ep93xx/snappercl15.c             | 1 +
>  arch/arm/mach-ep93xx/soc.h                     | 1 +
>  arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
>  arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
>  12 files changed, 23 insertions(+), 8 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 31f024e6e925..5177e54cc14c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -358,6 +358,8 @@ config ARCH_EP93XX
>  	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.
>  
> diff --git a/arch/arm/mach-ep93xx/adssphere.c
> b/arch/arm/mach-ep93xx/adssphere.c index 8d5e349a7a6d..0c48d3c5b8e7
> 100644 --- a/arch/arm/mach-ep93xx/adssphere.c
> +++ b/arch/arm/mach-ep93xx/adssphere.c
> @@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
>  MACHINE_START(ADSSPHERE, "ADS Sphere board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index e4569a5acc3f..2d58e273c96d 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -47,6 +47,7 @@
>  #include <asm/mach/map.h>
>  
>  #include "soc.h"
> +#include "irqs.h"
>  
>  /*************************************************************************
>   * Static I/O mappings that are needed for all EP93xx platforms
> diff --git a/arch/arm/mach-ep93xx/edb93xx.c
> b/arch/arm/mach-ep93xx/edb93xx.c index af0e22471ebd..4b90899a66e9
> 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
>  MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
>  	/* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -255,6 +256,7 @@ MACHINE_END
>  MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
>  	/* Maintainer: George Kashperko <george@chas.com.ua> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -267,6 +269,7 @@ MACHINE_END
>  MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -279,6 +282,7 @@ MACHINE_END
>  MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
>  	/* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -291,6 +295,7 @@ MACHINE_END
>  MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
>  	/* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -303,6 +308,7 @@ MACHINE_END
>  MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
>  	/* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -315,6 +321,7 @@ MACHINE_END
>  MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -327,6 +334,7 @@ MACHINE_END
>  MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/gesbc9312.c
> b/arch/arm/mach-ep93xx/gesbc9312.c index d7f9890321eb..0b7043e3e178
> 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c
> +++ b/arch/arm/mach-ep93xx/gesbc9312.c
> @@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
>  MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h
> b/arch/arm/mach-ep93xx/irqs.h similarity index 96%
> rename from arch/arm/mach-ep93xx/include/mach/irqs.h
> rename to arch/arm/mach-ep93xx/irqs.h
> index 60c69c4ed7e1..353201b90c66 100644
> --- a/arch/arm/mach-ep93xx/include/mach/irqs.h
> +++ b/arch/arm/mach-ep93xx/irqs.h
> @@ -1,8 +1,4 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * arch/arm/mach-ep93xx/include/mach/irqs.h
> - */
> -
>  #ifndef __ASM_ARCH_IRQS_H
>  #define __ASM_ARCH_IRQS_H
>  
> @@ -77,7 +73,4 @@
>  #define EP93XX_BOARD_IRQ(x)		(NR_EP93XX_IRQS + (x))
>  #define EP93XX_BOARD_IRQS		32
>  
> -#define NR_IRQS				(NR_EP93XX_IRQS +
> EP93XX_BOARD_IRQS) -
> -
>  #endif
> diff --git a/arch/arm/mach-ep93xx/micro9.c
> b/arch/arm/mach-ep93xx/micro9.c index e6ead8ded6ee..c121c459aa17
> 100644 --- a/arch/arm/mach-ep93xx/micro9.c
> +++ b/arch/arm/mach-ep93xx/micro9.c
> @@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
>  MACHINE_START(MICRO9, "Contec Micro9-High")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -88,6 +89,7 @@ MACHINE_END
>  MACHINE_START(MICRO9M, "Contec Micro9-Mid")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -100,6 +102,7 @@ MACHINE_END
>  MACHINE_START(MICRO9L, "Contec Micro9-Lite")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -112,6 +115,7 @@ MACHINE_END
>  MACHINE_START(MICRO9S, "Contec Micro9-Slim")
>  	/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at>
> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/simone.c
> b/arch/arm/mach-ep93xx/simone.c index 5291053023b2..569e72413561
> 100644 --- a/arch/arm/mach-ep93xx/simone.c
> +++ b/arch/arm/mach-ep93xx/simone.c
> @@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
>  MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
>  	/* Maintainer: Ryan Mallon */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/snappercl15.c
> b/arch/arm/mach-ep93xx/snappercl15.c index e200d69471e9..1dfb725671b1
> 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c
> +++ b/arch/arm/mach-ep93xx/snappercl15.c
> @@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
>  MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
>  	/* Maintainer: Ryan Mallon */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ep93xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
> index 94ef7f275f94..f0986e288d19 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -10,6 +10,7 @@
>  #define _EP93XX_SOC_H
>  
>  #include <mach/ep93xx-regs.h>
> +#include "irqs.h"
>  
>  /*
>   * EP93xx Physical Memory Map:
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c
> b/arch/arm/mach-ep93xx/ts72xx.c index 12eff8c8074d..e70bac011407
> 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -22,7 +22,6 @@
>  
>  #include "gpio-ep93xx.h"
>  #include "hardware.h"
> -#include <mach/irqs.h>
>  
>  #include <asm/mach-types.h>
>  #include <asm/mach/map.h>
> @@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
>  MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
>  	/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ts72xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> @@ -413,6 +413,7 @@ static void __init bk3_init_machine(void)
>  MACHINE_START(BK3, "Liebherr controller BK3.1")
>  	/* Maintainer: Lukasz Majewski <lukma@denx.de> */
>  	.atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS,
>  	.map_io		= ts72xx_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,
> diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c
> b/arch/arm/mach-ep93xx/vision_ep9307.c index
> e46281e60bf7..30d9cf3791eb 100644 ---
> a/arch/arm/mach-ep93xx/vision_ep9307.c +++
> b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -302,6 +302,7 @@ static
> void __init vision_init_machine(void) MACHINE_START(VISION_EP9307,
> "Vision Engraving Systems EP9307") /* Maintainer: H Hartley Sweeten
> <hsweeten@visionengravers.com> */ .atag_offset	= 0x100,
> +	.nr_irqs	= NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
>  	.map_io		= vision_map_io,
>  	.init_irq	= ep93xx_init_irq,
>  	.init_time	= ep93xx_timer_init,

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 --]

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

* Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05  9:43     ` Lukasz Majewski
  -1 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches


[-- Attachment #1.1: Type: text/plain, Size: 3020 bytes --]

On Tue,  5 Apr 2022 11:17:42 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
>  arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
>  arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
>  arch/arm/mach-ep93xx/soc.h                            | 2 +-
>  4 files changed, 2 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> b/arch/arm/mach-ep93xx/ep93xx-regs.h similarity index 94%
> rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> rename to arch/arm/mach-ep93xx/ep93xx-regs.h
> index 6839ea032e58..8fa3646de0a4 100644
> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> +++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
> @@ -1,8 +1,4 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> - */
> -
>  #ifndef __ASM_ARCH_EP93XX_REGS_H
>  #define __ASM_ARCH_EP93XX_REGS_H
>  
> diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> b/arch/arm/mach-ep93xx/gpio-ep93xx.h index 242af4a401ea..7b46eb7e5507
> 100644 --- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> +++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
> @@ -4,7 +4,7 @@
>  #ifndef __GPIO_EP93XX_H
>  #define __GPIO_EP93XX_H
>  
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
>  
>  #define EP93XX_GPIO_PHYS_BASE
> EP93XX_APB_PHYS(0x00040000) #define EP93XX_GPIO_BASE
> EP93XX_APB_IOMEM(0x00040000) diff --git
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h index
> b3ec1db988db..e20bcab702b2 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h @@ -5,7 +5,6 @@
>   * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
>   */
>  
> -#include <mach/ep93xx-regs.h>
>  #include <asm/mach-types.h>
>  
>  static unsigned char __raw_readb(unsigned int ptr)
> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
> index f0986e288d19..3245ebbd5069 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -9,7 +9,7 @@
>  #ifndef _EP93XX_SOC_H
>  #define _EP93XX_SOC_H
>  
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
>  #include "irqs.h"
>  
>  /*

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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
@ 2022-04-05  9:43     ` Lukasz Majewski
  0 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

[-- Attachment #1: Type: text/plain, Size: 3020 bytes --]

On Tue,  5 Apr 2022 11:17:42 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
>  arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
>  arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
>  arch/arm/mach-ep93xx/soc.h                            | 2 +-
>  4 files changed, 2 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> b/arch/arm/mach-ep93xx/ep93xx-regs.h similarity index 94%
> rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> rename to arch/arm/mach-ep93xx/ep93xx-regs.h
> index 6839ea032e58..8fa3646de0a4 100644
> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> +++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
> @@ -1,8 +1,4 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> - */
> -
>  #ifndef __ASM_ARCH_EP93XX_REGS_H
>  #define __ASM_ARCH_EP93XX_REGS_H
>  
> diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> b/arch/arm/mach-ep93xx/gpio-ep93xx.h index 242af4a401ea..7b46eb7e5507
> 100644 --- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> +++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
> @@ -4,7 +4,7 @@
>  #ifndef __GPIO_EP93XX_H
>  #define __GPIO_EP93XX_H
>  
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
>  
>  #define EP93XX_GPIO_PHYS_BASE
> EP93XX_APB_PHYS(0x00040000) #define EP93XX_GPIO_BASE
> EP93XX_APB_IOMEM(0x00040000) diff --git
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h index
> b3ec1db988db..e20bcab702b2 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h @@ -5,7 +5,6 @@
>   * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
>   */
>  
> -#include <mach/ep93xx-regs.h>
>  #include <asm/mach-types.h>
>  
>  static unsigned char __raw_readb(unsigned int ptr)
> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
> index f0986e288d19..3245ebbd5069 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -9,7 +9,7 @@
>  #ifndef _EP93XX_SOC_H
>  #define _EP93XX_SOC_H
>  
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
>  #include "irqs.h"
>  
>  /*

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 --]

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

* Re: [PATCH 05/12] ARM: ep93xx: multiplatform support
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05  9:44     ` Lukasz Majewski
  -1 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches


[-- Attachment #1.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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/12] ARM: ep93xx: multiplatform support
@ 2022-04-05  9:44     ` Lukasz Majewski
  0 siblings, 0 replies; 68+ messages in thread
From: Lukasz Majewski @ 2022-04-05  9:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Krzysztof Kozlowski, Alim Akhtar,
	Linus Walleij, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

[-- 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 --]

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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05 14:15     ` Sudeep Holla
  -1 siblings, 0 replies; 68+ messages in thread
From: Sudeep Holla @ 2022-04-05 14:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Russell King, Sudeep Holla, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
> 

I had forgotten about this. When do you plan to merge this ? I guess for
v5.19. The reason I ask is that one of the branch triggered loads of
kernel-doc warning[1] and I was bit confused with the file path. I did post
the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
let me know what do you prefer as it conflicts with this patch.

-- 
Regards,
Sudeep

[1] https://lore.kernel.org/linux-doc/202204031026.4ogKxt89-lkp@intel.com/
[2] https://lore.kernel.org/all/20220404130207.1162445-1-sudeep.holla@arm.com/


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
@ 2022-04-05 14:15     ` Sudeep Holla
  0 siblings, 0 replies; 68+ messages in thread
From: Sudeep Holla @ 2022-04-05 14:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Russell King, Sudeep Holla, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, patches

On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
> 

I had forgotten about this. When do you plan to merge this ? I guess for
v5.19. The reason I ask is that one of the branch triggered loads of
kernel-doc warning[1] and I was bit confused with the file path. I did post
the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
let me know what do you prefer as it conflicts with this patch.

-- 
Regards,
Sudeep

[1] https://lore.kernel.org/linux-doc/202204031026.4ogKxt89-lkp@intel.com/
[2] https://lore.kernel.org/all/20220404130207.1162445-1-sudeep.holla@arm.com/


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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-05 16:30     ` Linus Walleij
  -1 siblings, 0 replies; 68+ messages in thread
From: Linus Walleij @ 2022-04-05 16:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

I can't test much right now, but I sure trust you with this!

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
@ 2022-04-05 16:30     ` Linus Walleij
  0 siblings, 0 replies; 68+ messages in thread
From: Linus Walleij @ 2022-04-05 16:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

I can't test much right now, but I sure trust you with this!

Yours,
Linus Walleij

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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
  2022-04-05 14:15     ` Sudeep Holla
@ 2022-04-05 18:33       ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05 18:33 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven,
	Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Tue, Apr 5, 2022 at 4:15 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > These are all fairly small platforms by now, and they are
> > closely related. Just move them all into a single directory.
> >
>
> I had forgotten about this. When do you plan to merge this ? I guess for
> v5.19. The reason I ask is that one of the branch triggered loads of
> kernel-doc warning[1] and I was bit confused with the file path. I did post
> the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
> let me know what do you prefer as it conflicts with this patch.

I originally wanted to merge this back in 2019, hoping we can do it
all for 5.19 now. The problem with the warnings is that moving a file
makes lkp think it's a regression when it otherwise ignores existing
warnings that seem harmless.

I can probably apply the warning fixes on top here, and I think it would
also work to have them in a separate branch, since git usually figures
out the merges across renames.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile
@ 2022-04-05 18:33       ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-05 18:33 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Linus Walleij, Imre Kaloz, Krzysztof Halasa,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Simtec Linux Team, Liviu Dudau, Lorenzo Pieralisi,
	Ard Biesheuvel, Stephen Boyd, Geert Uytterhoeven,
	Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Tue, Apr 5, 2022 at 4:15 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > These are all fairly small platforms by now, and they are
> > closely related. Just move them all into a single directory.
> >
>
> I had forgotten about this. When do you plan to merge this ? I guess for
> v5.19. The reason I ask is that one of the branch triggered loads of
> kernel-doc warning[1] and I was bit confused with the file path. I did post
> the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
> let me know what do you prefer as it conflicts with this patch.

I originally wanted to merge this back in 2019, hoping we can do it
all for 5.19 now. The problem with the warnings is that moving a file
makes lkp think it's a regression when it otherwise ignores existing
warnings that seem harmless.

I can probably apply the warning fixes on top here, and I think it would
also work to have them in a separate branch, since git usually figures
out the merges across renames.

       Arnd

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-07  7:07   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
> 
> A few things happened since I last looked at this, which helps to make
> this easier:
> 
>  - The ixp4xx platform saw a large scale cleanup
> 
>  - The ep93xx platform lost support for MaverickCrunch FPUs and
>    gained support for the common clock subsystem
> 
>  - The OMAP1 platform has a proposed patch for the common
>    clock subsystem.
> 
>  - The generic IRQ entry code is now used everywhere, including
>    on IOP32x.
> 
>  - The s3c24xx platform is scheduled for removal next year

Discussion [1] actually did not end with conclusion, but through all the
time there were no other votes for the platform to stay.

I will resend my above [1] patch to mention the coming removal.

[1]
https://lore.kernel.org/linux-samsung-soc/CAK8P3a2Pg8CkXgN8YNhp2U5Kgwf08kQGpLeTsyWKgNpGChC4uQ@mail.gmail.com/


Best regards,
Krzysztof

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07  7:07   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
> 
> A few things happened since I last looked at this, which helps to make
> this easier:
> 
>  - The ixp4xx platform saw a large scale cleanup
> 
>  - The ep93xx platform lost support for MaverickCrunch FPUs and
>    gained support for the common clock subsystem
> 
>  - The OMAP1 platform has a proposed patch for the common
>    clock subsystem.
> 
>  - The generic IRQ entry code is now used everywhere, including
>    on IOP32x.
> 
>  - The s3c24xx platform is scheduled for removal next year

Discussion [1] actually did not end with conclusion, but through all the
time there were no other votes for the platform to stay.

I will resend my above [1] patch to mention the coming removal.

[1]
https://lore.kernel.org/linux-samsung-soc/CAK8P3a2Pg8CkXgN8YNhp2U5Kgwf08kQGpLeTsyWKgNpGChC4uQ@mail.gmail.com/


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  7:27     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> BAST is the one machine that theoretically supports unmodified ISA
> drivers for hardware on its PC/104 connector, using a custom version of
> the inb()/outb() and inw()/outw() macros.
> 
> This is incompatible with the generic version used in asm/io.h, and
> can't easily be used in a multiplatform kernel.
> 
> Removing the special case for 16-bit I/O port access on BAST gets us
> closer to multiplatform, at the expense of any PC/104 users with 16-bit
> cards having to either use an older kernel or modify their ISA drivers
> to manually ioremap() the area and use readw()/write() in place of
> inw()/outw(). Either way is probably ok, given that all of s3c24xx is
> already on the way out next year, and many traditional ISA drivers are
> already gone.
> 
> Machines other than BAST already have no support for ISA drivers, though a
> couple of them do map one of the external chip-selects into the ISA port
> range, using the same address for 8-bit and 16-bit I/O. It is unlikely
> that anything actually uses this mapping, but it's also easy to keep
> this working by mapping it to the normal platform-independent PCI I/O
> base that is otherwise unused on s3c24xx.
> 
> The mach/map-base.h file is no longer referenced in global headers and
> can be moved into the platform directory.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
@ 2022-04-07  7:27     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> BAST is the one machine that theoretically supports unmodified ISA
> drivers for hardware on its PC/104 connector, using a custom version of
> the inb()/outb() and inw()/outw() macros.
> 
> This is incompatible with the generic version used in asm/io.h, and
> can't easily be used in a multiplatform kernel.
> 
> Removing the special case for 16-bit I/O port access on BAST gets us
> closer to multiplatform, at the expense of any PC/104 users with 16-bit
> cards having to either use an older kernel or modify their ISA drivers
> to manually ioremap() the area and use readw()/write() in place of
> inw()/outw(). Either way is probably ok, given that all of s3c24xx is
> already on the way out next year, and many traditional ISA drivers are
> already gone.
> 
> Machines other than BAST already have no support for ISA drivers, though a
> couple of them do map one of the external chip-selects into the ISA port
> range, using the same address for 8-bit and 16-bit I/O. It is unlikely
> that anything actually uses this mapping, but it's also easy to keep
> this working by mapping it to the normal platform-independent PCI I/O
> base that is otherwise unused on s3c24xx.
> 
> The mach/map-base.h file is no longer referenced in global headers and
> can be moved into the platform directory.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  7:29     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> As a final bit of preparation for converting to ARCH_MULTIPLATFORM,
> change the interrupt handling for s3c24xx to use sparse IRQs.
> 
> Since the number of possible interrupts is already fixed and relatively
> small per chip, just make it use all legacy interrupts preallocated
> using the .nr_irqs field in the machine descriptor, rather than actually
> allocating domains on the fly.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq
@ 2022-04-07  7:29     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> As a final bit of preparation for converting to ARCH_MULTIPLATFORM,
> change the interrupt handling for s3c24xx to use sparse IRQs.
> 
> Since the number of possible interrupts is already fixed and relatively
> small per chip, just make it use all legacy interrupts preallocated
> using the .nr_irqs field in the machine descriptor, rather than actually
> allocating domains on the fly.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  7:30     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the custom ISA I/O and the missing sparse-irq support
> out of the way, s3c24xx can now be built into the same
> kernel as all other ARM9 based platforms.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig                  | 18 ------------------
>  arch/arm/mach-s3c/Kconfig.s3c24xx | 23 ++++++++++++++++++++++-
>  2 files changed, 22 insertions(+), 19 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support
@ 2022-04-07  7:30     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 68+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the custom ISA I/O and the missing sparse-irq support
> out of the way, s3c24xx can now be built into the same
> kernel as all other ARM9 based platforms.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig                  | 18 ------------------
>  arch/arm/mach-s3c/Kconfig.s3c24xx | 23 ++++++++++++++++++++++-
>  2 files changed, 22 insertions(+), 19 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-07  7:07   ` Krzysztof Kozlowski
@ 2022-04-07  7:31     ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-07  7:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Thu, Apr 7, 2022 at 9:07 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 05/04/2022 11:17, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> >  - The ixp4xx platform saw a large scale cleanup
> >
> >  - The ep93xx platform lost support for MaverickCrunch FPUs and
> >    gained support for the common clock subsystem
> >
> >  - The OMAP1 platform has a proposed patch for the common
> >    clock subsystem.
> >
> >  - The generic IRQ entry code is now used everywhere, including
> >    on IOP32x.
> >
> >  - The s3c24xx platform is scheduled for removal next year
>
> Discussion [1] actually did not end with conclusion, but through all the
> time there were no other votes for the platform to stay.

Ok, thanks for the clarification, I misremembered the outcome
of the discussion. I've updated the reference in the mach/io.h
to no longer refer to that, but I still think it's safe to break
readw/writew on BAST ISA devices.

If we finish the multiplatform conversion for all ARMv5, I care
less about dropping s3c24xx entirely as an intermediate step,
but I definitely still like to see any board files and SoCs dropped
that have no users and are just a maintenance burden.

> I will resend my above [1] patch to mention the coming removal.

Ok, thanks!

          Arnd

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07  7:31     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-07  7:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Thu, Apr 7, 2022 at 9:07 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 05/04/2022 11:17, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> >  - The ixp4xx platform saw a large scale cleanup
> >
> >  - The ep93xx platform lost support for MaverickCrunch FPUs and
> >    gained support for the common clock subsystem
> >
> >  - The OMAP1 platform has a proposed patch for the common
> >    clock subsystem.
> >
> >  - The generic IRQ entry code is now used everywhere, including
> >    on IOP32x.
> >
> >  - The s3c24xx platform is scheduled for removal next year
>
> Discussion [1] actually did not end with conclusion, but through all the
> time there were no other votes for the platform to stay.

Ok, thanks for the clarification, I misremembered the outcome
of the discussion. I've updated the reference in the mach/io.h
to no longer refer to that, but I still think it's safe to break
readw/writew on BAST ISA devices.

If we finish the multiplatform conversion for all ARMv5, I care
less about dropping s3c24xx entirely as an intermediate step,
but I definitely still like to see any board files and SoCs dropped
that have no users and are just a maintenance burden.

> I will resend my above [1] patch to mention the coming removal.

Ok, thanks!

          Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  8:29     ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
> 
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/core.c              |   4 +-
>  arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
>  2 files changed, 65 insertions(+), 61 deletions(-)

-- 
Alexander Sverdlin.


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

* Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts
@ 2022-04-07  8:29     ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
> 
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/core.c              |   4 +-
>  arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
>  2 files changed, 65 insertions(+), 61 deletions(-)

-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  8:30     ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> globally. Do the minimal conversion by setting .nr_irqs in each
> machine descriptor.
> 
> Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> .nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
> everywhere else.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Hubert Feurstein <hubert.feurstein@contec.at>
> Cc: Lukasz Majewski <lukma@denx.de>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/Kconfig                               | 2 ++
>  arch/arm/mach-ep93xx/adssphere.c               | 1 +
>  arch/arm/mach-ep93xx/core.c                    | 1 +
>  arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
>  arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
>  arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
>  arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
>  arch/arm/mach-ep93xx/simone.c                  | 1 +
>  arch/arm/mach-ep93xx/snappercl15.c             | 1 +
>  arch/arm/mach-ep93xx/soc.h                     | 1 +
>  arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
>  arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
>  12 files changed, 23 insertions(+), 8 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)

-- 
Alexander Sverdlin.


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

* Re: [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
@ 2022-04-07  8:30     ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> globally. Do the minimal conversion by setting .nr_irqs in each
> machine descriptor.
> 
> Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> .nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
> everywhere else.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Hubert Feurstein <hubert.feurstein@contec.at>
> Cc: Lukasz Majewski <lukma@denx.de>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/Kconfig                               | 2 ++
>  arch/arm/mach-ep93xx/adssphere.c               | 1 +
>  arch/arm/mach-ep93xx/core.c                    | 1 +
>  arch/arm/mach-ep93xx/edb93xx.c                 | 8 ++++++++
>  arch/arm/mach-ep93xx/gesbc9312.c               | 1 +
>  arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
>  arch/arm/mach-ep93xx/micro9.c                  | 4 ++++
>  arch/arm/mach-ep93xx/simone.c                  | 1 +
>  arch/arm/mach-ep93xx/snappercl15.c             | 1 +
>  arch/arm/mach-ep93xx/soc.h                     | 1 +
>  arch/arm/mach-ep93xx/ts72xx.c                  | 3 ++-
>  arch/arm/mach-ep93xx/vision_ep9307.c           | 1 +
>  12 files changed, 23 insertions(+), 8 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%)

-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  8:31     ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:31 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
>  arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
>  arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
>  arch/arm/mach-ep93xx/soc.h                            | 2 +-
>  4 files changed, 2 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

-- 
Alexander Sverdlin.


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

* Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local
@ 2022-04-07  8:31     ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:31 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
>  arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
>  arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
>  arch/arm/mach-ep93xx/soc.h                            | 2 +-
>  4 files changed, 2 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/12] ARM: ep93xx: multiplatform support
  2022-04-05  9:17   ` Arnd Bergmann
@ 2022-04-07  8:32     ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> 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>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  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%)

-- 
Alexander Sverdlin.


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

* Re: [PATCH 05/12] ARM: ep93xx: multiplatform support
@ 2022-04-07  8:32     ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  8:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> 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>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  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%)

-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-07  9:23   ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  9:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
> 
> A few things happened since I last looked at this, which helps to make
> this easier:
> 
>  - The ixp4xx platform saw a large scale cleanup
> 
>  - The ep93xx platform lost support for MaverickCrunch FPUs and
>    gained support for the common clock subsystem

would you like to consider a couple of fixups from the common clock
rework of ep93xx?

https://lore.kernel.org/linux-arm-kernel/20220120133739.4170298-2-alexander.sverdlin@gmail.com/
https://lore.kernel.org/lkml/20220130152502.236531-1-alexander.sverdlin@gmail.com/t/

Thanks!
-- 
Alexander Sverdlin.


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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07  9:23   ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07  9:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
> 
> A few things happened since I last looked at this, which helps to make
> this easier:
> 
>  - The ixp4xx platform saw a large scale cleanup
> 
>  - The ep93xx platform lost support for MaverickCrunch FPUs and
>    gained support for the common clock subsystem

would you like to consider a couple of fixups from the common clock
rework of ep93xx?

https://lore.kernel.org/linux-arm-kernel/20220120133739.4170298-2-alexander.sverdlin@gmail.com/
https://lore.kernel.org/lkml/20220130152502.236531-1-alexander.sverdlin@gmail.com/t/

Thanks!
-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-07  9:23   ` Alexander Sverdlin
@ 2022-04-07 10:08     ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-07 10:08 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Thu, Apr 7, 2022 at 11:23 AM Alexander Sverdlin
<alexander.sverdlin@gmail.com> wrote:
>
> Hello Arnd,
>
> On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> >  - The ixp4xx platform saw a large scale cleanup
> >
> >  - The ep93xx platform lost support for MaverickCrunch FPUs and
> >    gained support for the common clock subsystem
>
> would you like to consider a couple of fixups from the common clock
> rework of ep93xx?
>
> https://lore.kernel.org/linux-arm-kernel/20220120133739.4170298-2-alexander.sverdlin@gmail.com/
> https://lore.kernel.org/lkml/20220130152502.236531-1-alexander.sverdlin@gmail.com/t/

Sure, both look like obvious bugfixes. Shall I apply them to the
fixes branch for 5.18, or as part of the multiplatform series?

Either way, if you have any obvious bugfixes for code you maintain,
and you'd like
to get merged through the soc tree, please send them to soc@kernel.org, which
puts them into the patchwork tracker.

       Arnd

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07 10:08     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-07 10:08 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

On Thu, Apr 7, 2022 at 11:23 AM Alexander Sverdlin
<alexander.sverdlin@gmail.com> wrote:
>
> Hello Arnd,
>
> On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> >  - The ixp4xx platform saw a large scale cleanup
> >
> >  - The ep93xx platform lost support for MaverickCrunch FPUs and
> >    gained support for the common clock subsystem
>
> would you like to consider a couple of fixups from the common clock
> rework of ep93xx?
>
> https://lore.kernel.org/linux-arm-kernel/20220120133739.4170298-2-alexander.sverdlin@gmail.com/
> https://lore.kernel.org/lkml/20220130152502.236531-1-alexander.sverdlin@gmail.com/t/

Sure, both look like obvious bugfixes. Shall I apply them to the
fixes branch for 5.18, or as part of the multiplatform series?

Either way, if you have any obvious bugfixes for code you maintain,
and you'd like
to get merged through the soc tree, please send them to soc@kernel.org, which
puts them into the patchwork tracker.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-07 10:08     ` Arnd Bergmann
@ 2022-04-07 10:37       ` Alexander Sverdlin
  -1 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07 10:37 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

Thanks Arnd!

On Thu, 2022-04-07 at 12:08 +0200, Arnd Bergmann wrote:
> Sure, both look like obvious bugfixes. Shall I apply them to the
> fixes branch for 5.18, or as part of the multiplatform series?

I'm fine with either option if they land not in the recycled bin ;)

> Either way, if you have any obvious bugfixes for code you maintain,
> and you'd like
> to get merged through the soc tree, please send them to soc@kernel.org, which
> puts them into the patchwork tracker.

Sounds great, thanks, I'll note this!

-- 
Alexander Sverdlin.


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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07 10:37       ` Alexander Sverdlin
  0 siblings, 0 replies; 68+ messages in thread
From: Alexander Sverdlin @ 2022-04-07 10:37 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Hubert Feurstein,
	Lukasz Majewski, Krzysztof Kozlowski, Alim Akhtar, Linus Walleij,
	Imre Kaloz, Krzysztof Halasa, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Simtec Linux Team, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel, Stephen Boyd,
	Geert Uytterhoeven, Linux Kernel Mailing List, Linux ARM,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, patches

Thanks Arnd!

On Thu, 2022-04-07 at 12:08 +0200, Arnd Bergmann wrote:
> Sure, both look like obvious bugfixes. Shall I apply them to the
> fixes branch for 5.18, or as part of the multiplatform series?

I'm fine with either option if they land not in the recycled bin ;)

> Either way, if you have any obvious bugfixes for code you maintain,
> and you'd like
> to get merged through the soc tree, please send them to soc@kernel.org, which
> puts them into the patchwork tracker.

Sounds great, thanks, I'll note this!

-- 
Alexander Sverdlin.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-05  9:17 ` Arnd Bergmann
@ 2022-04-07 20:42   ` Linus Walleij
  -1 siblings, 0 replies; 68+ messages in thread
From: Linus Walleij @ 2022-04-07 20:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:

These two:

> Arnd Bergmann (12):
>   ARM: rework endianess selection
>   ARM: ixp4xx: enable multiplatform support

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>

I booted on the Gateway GW-2348 which has some ethernet,
PCI and compact flash, LED and a button, so I could test a
whole lot of stuff.

However when switching over to multiplatform I needed to severely
overhaul the ixp4xx_defconfig for it to bring the same drivers in as
before, I will send my patch for that which I think need to go in in
tandem with this rework for a smooth transition.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-07 20:42   ` Linus Walleij
  0 siblings, 0 replies; 68+ messages in thread
From: Linus Walleij @ 2022-04-07 20:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, patches

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:

These two:

> Arnd Bergmann (12):
>   ARM: rework endianess selection
>   ARM: ixp4xx: enable multiplatform support

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>

I booted on the Gateway GW-2348 which has some ethernet,
PCI and compact flash, LED and a button, so I could test a
whole lot of stuff.

However when switching over to multiplatform I needed to severely
overhaul the ixp4xx_defconfig for it to bring the same drivers in as
before, I will send my patch for that which I think need to go in in
tandem with this rework for a smooth transition.

Yours,
Linus Walleij

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
  2022-04-07 20:42   ` Linus Walleij
@ 2022-04-08 15:12     ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-08 15:12 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, Linux Kernel Mailing List,
	Linux ARM, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	patches

On Thu, Apr 7, 2022 at 10:42 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> These two:
>
> > Arnd Bergmann (12):
> >   ARM: rework endianess selection
> >   ARM: ixp4xx: enable multiplatform support
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Tested-by: Linus Walleij <linus.walleij@linaro.org>
>
> I booted on the Gateway GW-2348 which has some ethernet,
> PCI and compact flash, LED and a button, so I could test a
> whole lot of stuff.

Perfect, thanks!

> However when switching over to multiplatform I needed to severely
> overhaul the ixp4xx_defconfig for it to bring the same drivers in as
> before, I will send my patch for that which I think need to go in in
> tandem with this rework for a smooth transition.

Ah right, I was planning to go through the patches again to make
sure I get them all. I did the change for some platforms but at least
missed this one. I folded in this change and will make sure I do the
same for the others as well:

--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -6,6 +6,7 @@ CONFIG_EXPERT=y
 CONFIG_MODULES=y
 CONFIG_MODVERSIONS=y
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_IXP4XX=y
 CONFIG_MACH_NSLU2=y
 CONFIG_MACH_AVILA=y

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

* Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions
@ 2022-04-08 15:12     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2022-04-08 15:12 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Russell King, Hartley Sweeten, Alexander Sverdlin,
	Hubert Feurstein, Lukasz Majewski, Krzysztof Kozlowski,
	Alim Akhtar, Imre Kaloz, Krzysztof Halasa, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Simtec Linux Team,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Ard Biesheuvel,
	Stephen Boyd, Geert Uytterhoeven, Linux Kernel Mailing List,
	Linux ARM, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	patches

On Thu, Apr 7, 2022 at 10:42 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> These two:
>
> > Arnd Bergmann (12):
> >   ARM: rework endianess selection
> >   ARM: ixp4xx: enable multiplatform support
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Tested-by: Linus Walleij <linus.walleij@linaro.org>
>
> I booted on the Gateway GW-2348 which has some ethernet,
> PCI and compact flash, LED and a button, so I could test a
> whole lot of stuff.

Perfect, thanks!

> However when switching over to multiplatform I needed to severely
> overhaul the ixp4xx_defconfig for it to bring the same drivers in as
> before, I will send my patch for that which I think need to go in in
> tandem with this rework for a smooth transition.

Ah right, I was planning to go through the patches again to make
sure I get them all. I did the change for some platforms but at least
missed this one. I folded in this change and will make sure I do the
same for the others as well:

--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -6,6 +6,7 @@ CONFIG_EXPERT=y
 CONFIG_MODULES=y
 CONFIG_MODVERSIONS=y
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_IXP4XX=y
 CONFIG_MACH_NSLU2=y
 CONFIG_MACH_AVILA=y

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-04-08 15:15 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05  9:17 [PATCH 00/12] ARM: ARMv5 multiplatform conversions Arnd Bergmann
2022-04-05  9:17 ` Arnd Bergmann
2022-04-05  9:17 ` [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile Arnd Bergmann
2022-04-05  9:17   ` Arnd Bergmann
2022-04-05 14:15   ` Sudeep Holla
2022-04-05 14:15     ` Sudeep Holla
2022-04-05 18:33     ` Arnd Bergmann
2022-04-05 18:33       ` Arnd Bergmann
2022-04-05 16:30   ` Linus Walleij
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:17   ` Arnd Bergmann
2022-04-05  9:42   ` Lukasz Majewski
2022-04-05  9:42     ` Lukasz Majewski
2022-04-07  8:29   ` Alexander Sverdlin
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:17   ` Arnd Bergmann
2022-04-05  9:42   ` Lukasz Majewski
2022-04-05  9:42     ` Lukasz Majewski
2022-04-07  8:30   ` Alexander Sverdlin
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:17   ` Arnd Bergmann
2022-04-05  9:43   ` Lukasz Majewski
2022-04-05  9:43     ` Lukasz Majewski
2022-04-07  8:31   ` Alexander Sverdlin
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:17   ` Arnd Bergmann
2022-04-05  9:44   ` Lukasz Majewski
2022-04-05  9:44     ` Lukasz Majewski
2022-04-07  8:32   ` Alexander Sverdlin
2022-04-07  8:32     ` Alexander Sverdlin
2022-04-05  9:17 ` [PATCH 06/12] ARM: dove: " Arnd Bergmann
2022-04-05  9:17   ` 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-05  9:17   ` Arnd Bergmann
2022-04-07  7:27   ` Krzysztof Kozlowski
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-05  9:17   ` Arnd Bergmann
2022-04-07  7:29   ` Krzysztof Kozlowski
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-05  9:17   ` Arnd Bergmann
2022-04-07  7:30   ` Krzysztof Kozlowski
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   ` Arnd Bergmann
2022-04-05  9:17 ` [PATCH 11/12] ARM: rework endianess selection Arnd Bergmann
2022-04-05  9:17   ` Arnd Bergmann
2022-04-05  9:17 ` [PATCH 12/12] ARM: ixp4xx: enable multiplatform support Arnd Bergmann
2022-04-05  9:17   ` Arnd Bergmann
2022-04-07  7:07 ` [PATCH 00/12] ARM: ARMv5 multiplatform conversions Krzysztof Kozlowski
2022-04-07  7:07   ` Krzysztof Kozlowski
2022-04-07  7:31   ` Arnd Bergmann
2022-04-07  7:31     ` Arnd Bergmann
2022-04-07  9:23 ` Alexander Sverdlin
2022-04-07  9:23   ` Alexander Sverdlin
2022-04-07 10:08   ` Arnd Bergmann
2022-04-07 10:08     ` Arnd Bergmann
2022-04-07 10:37     ` Alexander Sverdlin
2022-04-07 10:37       ` Alexander Sverdlin
2022-04-07 20:42 ` Linus Walleij
2022-04-07 20:42   ` Linus Walleij
2022-04-08 15:12   ` Arnd Bergmann
2022-04-08 15:12     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.