Skip to contentSkip to conversation

ARM: deprecated platform removal

PATCH Superseded Arnd Bergmann 36 participants 106 messages Sep 8 – Sep 13 Page 2 of 4

Subsystems (56)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
maintainer Reviewed-by on v1 3/13
#18 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

In reply to Arnd Bergmann

Hi

Am 08.09.26 um 17:27 schrieb Arnd Bergmann:
[...]

Quoted 1 line
  lib/fonts/font_acorn_8x8.c                  |    4 -
Quoted 4,191 lines
  41 files changed, 12 insertions(+), 3688 deletions(-)

delete mode 100644 arch/arm/boot/compressed/font.c delete mode 100644 arch/arm/boot/compressed/ll_char_wr.S delete mode 100644 arch/arm/configs/rpc_defconfig delete mode 100644 arch/arm/include/asm/ecard.h delete mode 100644 arch/arm/include/asm/hardware/ioc.h delete mode 100644 arch/arm/include/asm/hardware/iomd.h delete mode 100644 arch/arm/include/asm/hardware/memc.h delete mode 100644 arch/arm/mach-rpc/Kconfig
delete mode 100644 arch/arm/mach-rpc/Makefile
delete mode 100644 arch/arm/mach-rpc/dma.c
delete mode 100644 arch/arm/mach-rpc/ecard-loader.S delete mode 100644 arch/arm/mach-rpc/ecard.c
delete mode 100644 arch/arm/mach-rpc/ecard.h
delete mode 100644 arch/arm/mach-rpc/fiq.S
delete mode 100644 arch/arm/mach-rpc/floppydma.S delete mode 100644 arch/arm/mach-rpc/include/mach/acornfb.h delete mode 100644 arch/arm/mach-rpc/include/mach/hardware.h delete mode 100644 arch/arm/mach-rpc/include/mach/io.h delete mode 100644 arch/arm/mach-rpc/include/mach/irqs.h delete mode 100644 arch/arm/mach-rpc/include/mach/isa-dma.h delete mode 100644 arch/arm/mach-rpc/include/mach/memory.h delete mode 100644 arch/arm/mach-rpc/include/mach/uncompress.h delete mode 100644 arch/arm/mach-rpc/io-acorn.S delete mode 100644 arch/arm/mach-rpc/irq.c
delete mode 100644 arch/arm/mach-rpc/riscpc.c
delete mode 100644 arch/arm/mach-rpc/time.c

MAINTAINERS +0 -20
index 4380d5660402..6e8fe7640064 100644
@@ -2350,12 +2350,6 @@ F:	Documentation/devicetree/bindings/display/arm,malidp.yaml
  F:	Documentation/gpu/afbc.rst
  F:	drivers/gpu/drm/arm/
 
-ARM MFM AND FLOPPY DRIVERS
-M:	Ian Molton <[email protected]>
-S:	Maintained
-F:	arch/arm/include/asm/floppy.h
-F:	arch/arm/mach-rpc/floppydma.S
-
  ARM PMU PROFILING AND DEBUGGING
  M:	Will Deacon <[email protected]>
  M:	Mark Rutland <[email protected]>
@@ -3494,20 +3488,6 @@ F:	include/linux/soc/renesas/
  N:	rcar
  K:	\brenesas,
 
-ARM/RISCPC ARCHITECTURE
-M:	Russell King <[email protected]>
-L:	[email protected] (moderated for non-subscribers)
-S:	Maintained
-W:	http://www.armlinux.org.uk/
-F:	arch/arm/include/asm/hardware/ioc.h
-F:	arch/arm/include/asm/hardware/iomd.h
-F:	arch/arm/include/asm/hardware/memc.h
-F:	arch/arm/mach-rpc/
-F:	drivers/net/ethernet/8390/etherh.c
-F:	drivers/net/ethernet/i825xx/ether1*
-F:	drivers/net/ethernet/seeq/ether3*
-F:	drivers/scsi/arm/
-
  ARM/Rockchip SoC support
  M:	Heiko Stuebner <[email protected]>
  L:	[email protected] (moderated for non-subscribers)
arch/arm/Kconfig +7 -26
index c3d6b8abc815..5770deca136d 100644
@@ -55,7 +55,7 @@ config ARM
  	select ARCH_WANT_LD_ORPHAN_WARN
  	select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
  	select BUILDTIME_TABLE_SORT if MMU
-	select COMMON_CLK if !ARCH_RPC
+	select COMMON_CLK
  	select CLONE_BACKWARDS
  	select CPU_PM if SUSPEND || CPU_IDLE
  	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -155,13 +155,13 @@ config ARM
  	select PCI_SYSCALL if PCI
  	select PERF_USE_VMALLOC
  	select RTC_LIB
-	select SPARSE_IRQ if !ARCH_RPC
+	select SPARSE_IRQ
  	select SYS_SUPPORTS_APM_EMULATION
  	select THREAD_INFO_IN_TASK
  	select TIMER_OF if OF
  	select HAVE_ARCH_VMAP_STACK if MMU && ARM_HAS_GROUP_RELOCS
  	select TRACE_IRQFLAGS_SUPPORT if !CPU_V7M
-	select USE_OF if !ARCH_RPC
+	select USE_OF
  	# Above selects are sorted alphabetically; please add new ones
  	# according to that.  Thanks.
  	help
@@ -277,25 +277,11 @@ config ARM_PATCH_PHYS_VIRT
  	  this feature (eg, building a kernel for a single machine) and
  	  you need to shrink the kernel to the minimal size.
 
-config NEED_MACH_IO_H
-	bool
-	help
-	  Select this when mach/io.h is required to provide special
-	  definitions for this platform.  The need for mach/io.h should
-	  be avoided when possible.
-
-config NEED_MACH_MEMORY_H
-	bool
-	help
-	  Select this when mach/memory.h is required to provide special
-	  definitions for this platform.  The need for mach/memory.h should
-	  be avoided when possible.
-
  config PHYS_OFFSET
  	hex "Physical address of main memory" if MMU
  	depends on !ARM_PATCH_PHYS_VIRT || !AUTO_ZRELADDR
  	default DRAM_BASE if !MMU
-	default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
+	default 0x10000000 if ARCH_OMAP1
  	default 0xa0000000 if ARCH_PXA
  	default 0xc0000000 if ARCH_EP93XX
  	default 0
@@ -337,7 +323,7 @@ config ARCH_MMAP_RND_BITS_MAX
 
  config ARCH_MULTIPLATFORM
  	bool "Require kernel to be portable to multiple machines" if EXPERT
-	depends on MMU && !ARCH_RPC
+	depends on MMU
  	default y
  	help
  	  In general, all Arm machines can be supported in a single
@@ -429,8 +415,6 @@ source "arch/arm/mach-qcom/Kconfig"
 
  source "arch/arm/mach-realtek/Kconfig"
 
-source "arch/arm/mach-rpc/Kconfig"
-
  source "arch/arm/mach-rockchip/Kconfig"
 
  source "arch/arm/mach-s3c/Kconfig"
@@ -490,9 +474,6 @@ config ARCH_MPS2
  	  This platform is scheduled for removal in early 2027
 
  # Definitions to make life easier
-config ARCH_ACORN
-	bool
-
  config PLAT_ORION
  	bool
  	select CLKSRC_MMIO
@@ -1191,7 +1172,7 @@ config ARCH_SELECT_MEMORY_MODEL
  	def_bool y
 
  config ARCH_FLATMEM_ENABLE
-	def_bool !ARCH_RPC
+	def_bool y
 
  config ARCH_SPARSEMEM_ENABLE
  	def_bool y
@@ -1594,7 +1575,7 @@ config ARCH_DEFAULT_CRASH_DUMP
 
  config AUTO_ZRELADDR
  	bool "Auto calculation of the decompressed kernel image address" if !ARCH_MULTIPLATFORM
-	default !ARCH_RPC
+	default y
  	help
  	  ZRELADDR is the physical address where the decompressed kernel
  	  image will be placed. If AUTO_ZRELADDR is selected, the address
arch/arm/Kconfig.debug +2 -6
index f2a80955b7a0..56c090840c5a 100644
@@ -1446,7 +1446,7 @@ config DEBUG_STM32_UART
  config DEBUG_UART_FLOW_CONTROL
  	bool "Enable flow control (CTS) for the debug UART"
  	depends on DEBUG_LL
-	default y if DEBUG_GEMINI || ARCH_RPC
+	default y if DEBUG_GEMINI
  	help
  	  Some UART ports are connected to terminals that will use modem
  	  control signals to indicate whether they are ready to receive text.
@@ -1516,7 +1516,7 @@ config DEBUG_UART_PL01X
 
  # Compatibility options for 8250
  config DEBUG_UART_8250
-	def_bool ARCH_IXP4XX || ARCH_RPC
+	def_bool ARCH_IXP4XX
 
  config DEBUG_UART_PHYS
  	hex "Physical base address of debug UART"
@@ -1527,7 +1527,6 @@ config DEBUG_UART_PHYS
  	default 0x01f02800 if DEBUG_SUNXI_R_UART
  	default 0x02530c00 if DEBUG_KEYSTONE_UART0
  	default 0x02531000 if DEBUG_KEYSTONE_UART1
-	default 0x03010fe0 if ARCH_RPC
  	default 0x07000000 if DEBUG_SUN9I_UART0
  	default 0x09530000 if DEBUG_STIH418_SBC_ASC0
  	default 0x10009000 if DEBUG_REALVIEW_STD_PORT || \
@@ -1654,7 +1653,6 @@ config DEBUG_UART_VIRT
  	default 0xc881f000 if DEBUG_RV1108_UART2
  	default 0xc8821000 if DEBUG_RV1108_UART1
  	default 0xc8912000 if DEBUG_RV1108_UART0
-	default 0xe0010fe0 if ARCH_RPC
  	default 0xe0824200 if DEBUG_AT91_SAMA7G5_FLEXCOM3
  	default 0xf0010000 if DEBUG_ASM9260_UART
  	default 0xf0100000 if DEBUG_DIGICOLOR_UA0
@@ -1779,7 +1777,6 @@ config DEBUG_UART_8250_PALMCHIP
  config DEBUG_UNCOMPRESS
  	bool "Enable decompressor debugging via DEBUG_LL output"
  	depends on !ARCH_MULTIPLATFORM
-	depends on !ARCH_RPC
  	depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
  		     (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
  		     !DEBUG_BRCMSTB_UART && !DEBUG_SEMIHOSTING
@@ -1789,7 +1786,6 @@ config DEBUG_UNCOMPRESS
 
  config UNCOMPRESS_INCLUDE
  	string
-	default "mach/uncompress.h" if ARCH_RPC
  	default "debug/uncompress.h"
 
  config EARLY_PRINTK
arch/arm/boot/bootp/Makefile +0 -2
index 12c61684b97f..1e47bf10069d 100644
@@ -19,8 +19,6 @@ add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
  PARAMS_PHYS := $(call add_hex, $(PHYS_OFFSET), 0x100)
 
  # guess an initrd location if possible
-initrd_offset-$(CONFIG_ARCH_RPC)	+= 0x08000000
-INITRD_OFFSET := $(initrd_offset-y)
  ifdef INITRD_OFFSET
  INITRD_PHYS := $(call add_hex, $(PHYS_OFFSET), $(INITRD_OFFSET))
  endif
arch/arm/boot/compressed/Makefile +0 -4
index d8d81ba741a2..32def10f5e03 100644
@@ -25,10 +25,6 @@ endif
  #
  # Architecture dependencies
  #
-ifeq ($(CONFIG_ARCH_ACORN),y)
-OBJS		+= ll_char_wr.o font.o
-endif
-
  ifeq ($(CONFIG_CPU_XSCALE),y)
  OBJS		+= head-xscale.o
  endif
arch/arm/boot/compressed/font.c deleted +0 -2
deleted file mode 100644
index 46a677649db4..000000000000
@@ -1,2 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-#include "../../../../lib/fonts/font_acorn_8x8.c"
arch/arm/boot/compressed/head.S +0 -8
index 845abffbc2d6..af579905b630 100644
@@ -668,14 +668,6 @@ LC1:		.word	.L_user_stack_end - LC1	@ sp
  .Linflated_image_size_offset:
  		.long	(input_data_end - 4) - .
 
-#ifdef CONFIG_ARCH_RPC
-		.globl	params
-params:		ldr	r0, =0x10000100		@ params_phys for RPC
-		mov	pc, lr
-		.ltorg
-		.align
-#endif
-
  /*
   * dcache_line_size - get the minimum D-cache line size from the CTR register
   * on ARMv7.
arch/arm/boot/compressed/ll_char_wr.S deleted +0 -131
deleted file mode 100644
index 1ec8cb2898b1..000000000000
@@ -1,131 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  linux/arch/arm/lib/ll_char_wr.S
- *
- *  Copyright (C) 1995, 1996 Russell King.
- *
- *  Speedups & 1bpp code (C) 1996 Philip Blundell & Russell King.
- *
- *  10-04-96	RMK	Various cleanups & reduced register usage.
- *  08-04-98	RMK	Shifts re-ordered
- */
-
-@ Regs: [] = corruptible
-@       {} = used
-@       () = do not use
-
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-	.text
-
-LC0:	.word	LC0
-	.word	bytes_per_char_h
-	.word	video_size_row
-	.word	acorndata_8x8
-	.word	con_charconvtable
-
-/*
- * r0 = ptr
- * r1 = char
- * r2 = white
- */
-ENTRY(ll_write_char)
-	stmfd	sp!, {r4 - r7, lr}
-@
-@ Smashable regs: {r0 - r3}, [r4 - r7], (r8 - fp), [ip], (sp), [lr], (pc)
-@
-	/*
-	 * calculate offset into character table
-	 */
-	mov	r1, r1, lsl #3
-	/*
-	 * calculate offset required for each row.
-	 */
-	adr	ip, LC0
-	ldmia	ip, {r3, r4, r5, r6, lr}
-	sub	ip, ip, r3
-	add	r6, r6, ip
-	add	lr, lr, ip
-	ldr	r4, [r4, ip]
-	ldr	r5, [r5, ip]
-	/*
-	 * Go to resolution-dependent routine...
-	 */
-	cmp	r4, #4
-	blt	Lrow1bpp
-	add	r0, r0, r5, lsl #3		@ Move to bottom of character
-	orr	r1, r1, #7
-	ldrb	r7, [r6, r1]
-	teq	r4, #8
-	beq	Lrow8bpplp
-@
-@ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc)
-@
-Lrow4bpplp:
-	ldr	r7, [lr, r7, lsl #2]
-	mul	r7, r2, r7
-	sub	r1, r1, #1			@ avoid using r7 directly after
-	str	r7, [r0, -r5]!
-	ldrb	r7, [r6, r1]
-	ldr	r7, [lr, r7, lsl #2]
-	mul	r7, r2, r7
-	tst	r1, #7				@ avoid using r7 directly after
-	str	r7, [r0, -r5]!
-	subne	r1, r1, #1
-	ldrbne	r7, [r6, r1]
-	bne	Lrow4bpplp
-	ldmfd	sp!, {r4 - r7, pc}
-
-@
-@ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc)
-@
-Lrow8bpplp:
-	mov	ip, r7, lsr #4
-	ldr	ip, [lr, ip, lsl #2]
-	mul	r4, r2, ip
-	and	ip, r7, #15			@ avoid r4
-	ldr	ip, [lr, ip, lsl #2]		@ avoid r4
-	mul	ip, r2, ip			@ avoid r4
-	sub	r1, r1, #1			@ avoid ip
-	sub	r0, r0, r5			@ avoid ip
-	stmia	r0, {r4, ip}
-	ldrb	r7, [r6, r1]
-	mov	ip, r7, lsr #4
-	ldr	ip, [lr, ip, lsl #2]
-	mul	r4, r2, ip
-	and	ip, r7, #15			@ avoid r4
-	ldr	ip, [lr, ip, lsl #2]		@ avoid r4
-	mul	ip, r2, ip			@ avoid r4
-	tst	r1, #7				@ avoid ip
-	sub	r0, r0, r5			@ avoid ip
-	stmia	r0, {r4, ip}
-	subne	r1, r1, #1
-	ldrbne	r7, [r6, r1]
-	bne	Lrow8bpplp
-	ldmfd	sp!, {r4 - r7, pc}
-
-@
-@ Smashable regs: {r0 - r3}, [r4], {r5, r6}, [r7], (r8 - fp), [ip], (sp), [lr], (pc)
-@
-Lrow1bpp:
-	add	r6, r6, r1
-	ldmia	r6, {r4, r7}
-	strb	r4, [r0], r5
-	mov	r4, r4, lsr #8
-	strb	r4, [r0], r5
-	mov	r4, r4, lsr #8
-	strb	r4, [r0], r5
-	mov	r4, r4, lsr #8
-	strb	r4, [r0], r5
-	strb	r7, [r0], r5
-	mov	r7, r7, lsr #8
-	strb	r7, [r0], r5
-	mov	r7, r7, lsr #8
-	strb	r7, [r0], r5
-	mov	r7, r7, lsr #8
-	strb	r7, [r0], r5
-	ldmfd	sp!, {r4 - r7, pc}
-
-	.bss
-ENTRY(con_charconvtable)
-	.space	1024
arch/arm/configs/rpc_defconfig deleted +0 -127
deleted file mode 100644
index edb52d56f679..000000000000
@@ -1,127 +0,0 @@
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SYSVIPC=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_EXPERT=y
-CONFIG_ARCH_MULTI_V4=y
-# CONFIG_ARCH_MULTI_V7 is not set
-CONFIG_ARCH_RPC=y
-CONFIG_CPU_SA110=y
-CONFIG_FPE_NWFPE=y
-# CONFIG_AEABI is not set
-CONFIG_ATAGS=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET6_XFRM_MODE_BEET is not set
-CONFIG_PARPORT=y
-CONFIG_PARPORT_PC=y
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_BLK_DEV_SR=y
-CONFIG_CHR_DEV_SG=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_ARXESCSI=m
-CONFIG_SCSI_CUMANA_2=m
-CONFIG_SCSI_EESOXSCSI=m
-CONFIG_SCSI_POWERTECSCSI=y
-CONFIG_SCSI_CUMANA_1=m
-CONFIG_SCSI_OAK1=m
-CONFIG_ATA=y
-CONFIG_PATA_ICSIDE=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_NETDEVICES=y
-CONFIG_ARM_ETHER1=y
-CONFIG_ARM_ETHER3=y
-CONFIG_ARM_ETHERH=y
-CONFIG_PPP=m
-CONFIG_PPPOE=m
-CONFIG_INPUT_EVDEV=y
-# CONFIG_MOUSE_PS2 is not set
-CONFIG_MOUSE_RISCPC=y
-# CONFIG_SERIO_SERPORT is not set
-CONFIG_LEGACY_PTY_COUNT=64
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=16
-CONFIG_SERIAL_8250_RUNTIME_UARTS=8
-CONFIG_SERIAL_8250_ACORN=y
-CONFIG_PRINTER=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-# CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_ACORN=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_LOGO=y
-CONFIG_SOUND=m
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_VIDC=m
-# CONFIG_USB_SUPPORT is not set
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_PCF8583=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT4_FS=y
-CONFIG_AUTOFS_FS=m
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_ADFS_FS=y
-CONFIG_NFS_FS=y
-# CONFIG_ACORN_PARTITION_CUMANA is not set
-# CONFIG_ACORN_PARTITION_EESOX is not set
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_FONTS=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_ACORN_8x8=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_USER=y
-CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_8250=y
arch/arm/include/asm/ecard.h deleted +0 -219
deleted file mode 100644
index 7cbe001bf9cc..000000000000
@@ -1,219 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/include/asm/ecard.h
- *
- * definitions for expansion cards
- *
- * This is a new system as from Linux 1.2.3
- *
- * Changelog:
- *  11-12-1996	RMK	Further minor improvements
- *  12-09-1997	RMK	Added interrupt enable/disable for card level
- *
- * Reference: Acorns Risc OS 3 Programmers Reference Manuals.
- */
-
-#ifndef __ASM_ECARD_H
-#define __ASM_ECARD_H
-
-/*
- * Currently understood cards (but not necessarily
- * supported):
- *                        Manufacturer  Product ID
- */
-#define MANU_ACORN		0x0000
-#define PROD_ACORN_SCSI			0x0002
-#define PROD_ACORN_ETHER1		0x0003
-#define PROD_ACORN_MFM			0x000b
-
-#define MANU_ANT2		0x0011
-#define PROD_ANT_ETHER3			0x00a4
-
-#define MANU_ATOMWIDE		0x0017
-#define PROD_ATOMWIDE_3PSERIAL		0x0090
-
-#define MANU_IRLAM_INSTRUMENTS	0x001f
-#define MANU_IRLAM_INSTRUMENTS_ETHERN	0x5678
-
-#define MANU_OAK		0x0021
-#define PROD_OAK_SCSI			0x0058
-
-#define MANU_MORLEY		0x002b
-#define PROD_MORLEY_SCSI_UNCACHED	0x0067
-
-#define MANU_CUMANA		0x003a
-#define PROD_CUMANA_SCSI_2		0x003a
-#define PROD_CUMANA_SCSI_1		0x00a0
-
-#define MANU_ICS		0x003c
-#define PROD_ICS_IDE			0x00ae
-
-#define MANU_ICS2		0x003d
-#define PROD_ICS2_IDE			0x00ae
-
-#define MANU_SERPORT		0x003f
-#define PROD_SERPORT_DSPORT		0x00b9
-
-#define MANU_ARXE		0x0041
-#define PROD_ARXE_SCSI			0x00be
-
-#define MANU_I3			0x0046
-#define PROD_I3_ETHERLAN500		0x00d4
-#define PROD_I3_ETHERLAN600		0x00ec
-#define PROD_I3_ETHERLAN600A		0x011e
-
-#define MANU_ANT		0x0053
-#define PROD_ANT_ETHERM			0x00d8
-#define PROD_ANT_ETHERB			0x00e4
-
-#define MANU_ALSYSTEMS		0x005b
-#define PROD_ALSYS_SCSIATAPI		0x0107
-
-#define MANU_MCS		0x0063
-#define PROD_MCS_CONNECT32		0x0125
-
-#define MANU_EESOX		0x0064
-#define PROD_EESOX_SCSI2		0x008c
-
-#define MANU_YELLOWSTONE	0x0096
-#define PROD_YELLOWSTONE_RAPIDE32	0x0120
-
-#ifdef ECARD_C
-#define CONST
-#else
-#define CONST const
-#endif
-
-#define MAX_ECARDS	9
-
-struct ecard_id {			/* Card ID structure		*/
-	unsigned short	manufacturer;
-	unsigned short	product;
-	void		*data;
-};
-
-struct in_ecid {			/* Packed card ID information	*/
-	unsigned short	product;	/* Product code			*/
-	unsigned short	manufacturer;	/* Manufacturer code		*/
-	unsigned char	id:4;		/* Simple ID			*/
-	unsigned char	cd:1;		/* Chunk dir present		*/
-	unsigned char	is:1;		/* Interrupt status pointers	*/
-	unsigned char	w:2;		/* Width			*/
-	unsigned char	country;	/* Country			*/
-	unsigned char	irqmask;	/* IRQ mask			*/
-	unsigned char	fiqmask;	/* FIQ mask			*/
-	unsigned long	irqoff;		/* IRQ offset			*/
-	unsigned long	fiqoff;		/* FIQ offset			*/
-};
-
-typedef struct expansion_card ecard_t;
-typedef unsigned long *loader_t;
-
-typedef struct expansion_card_ops {	/* Card handler routines	*/
-	void (*irqenable)(ecard_t *ec, int irqnr);
-	void (*irqdisable)(ecard_t *ec, int irqnr);
-	int  (*irqpending)(ecard_t *ec);
-	void (*fiqenable)(ecard_t *ec, int fiqnr);
-	void (*fiqdisable)(ecard_t *ec, int fiqnr);
-	int  (*fiqpending)(ecard_t *ec);
-} expansioncard_ops_t;
-
-#define ECARD_NUM_RESOURCES	(6)
-
-#define ECARD_RES_IOCSLOW	(0)
-#define ECARD_RES_IOCMEDIUM	(1)
-#define ECARD_RES_IOCFAST	(2)
-#define ECARD_RES_IOCSYNC	(3)
-#define ECARD_RES_MEMC		(4)
-#define ECARD_RES_EASI		(5)
-
-#define ecard_resource_start(ec,nr)	((ec)->resource[nr].start)
-#define ecard_resource_end(ec,nr)	((ec)->resource[nr].end)
-#define ecard_resource_len(ec,nr)	((ec)->resource[nr].end - \
-					 (ec)->resource[nr].start + 1)
-#define ecard_resource_flags(ec,nr)	((ec)->resource[nr].flags)
-
-/*
- * This contains all the info needed on an expansion card
- */
-struct expansion_card {
-	struct expansion_card  *next;
-
-	struct device		dev;
-	struct resource		resource[ECARD_NUM_RESOURCES];
-
-	/* Public data */
-	void __iomem		*irqaddr;	/* address of IRQ register	*/
-	void __iomem		*fiqaddr;	/* address of FIQ register	*/
-	unsigned char		irqmask;	/* IRQ mask			*/
-	unsigned char		fiqmask;	/* FIQ mask			*/
-	unsigned char  		claimed;	/* Card claimed?		*/
-	unsigned char		easi;		/* EASI card			*/
-
-	void			*irq_data;	/* Data for use for IRQ by card	*/
-	void			*fiq_data;	/* Data for use for FIQ by card	*/
-	const expansioncard_ops_t *ops;		/* Enable/Disable Ops for card	*/
-
-	CONST unsigned int	slot_no;	/* Slot number			*/
-	CONST unsigned int	dma;		/* DMA number (for request_dma)	*/
-	CONST unsigned int	irq;		/* IRQ number (for request_irq)	*/
-	CONST unsigned int	fiq;		/* FIQ number (for request_irq)	*/
-	CONST struct in_ecid	cid;		/* Card Identification		*/
-
-	/* Private internal data */
-	const char		*card_desc;	/* Card description		*/
-	CONST loader_t		loader;		/* loader program */
-	u64			dma_mask;
-};
-
-void ecard_setirq(struct expansion_card *ec, const struct expansion_card_ops *ops, void *irq_data);
-
-struct in_chunk_dir {
-	unsigned int start_offset;
-	union {
-		unsigned char string[256];
-		unsigned char data[1];
-	} d;
-};
-
-/*
- * Read a chunk from an expansion card
- * cd : where to put read data
- * ec : expansion card info struct
- * id : id number to find
- * num: (n+1)'th id to find.
- */
-extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num);
-
-/*
- * Request and release ecard resources
- */
-extern int ecard_request_resources(struct expansion_card *ec);
-extern void ecard_release_resources(struct expansion_card *ec);
-
-void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
-			   unsigned long offset, unsigned long maxsize);
-#define ecardm_iounmap(__ec, __addr)	devm_iounmap(&(__ec)->dev, __addr)
-
-extern const struct bus_type ecard_bus_type;
-
-#define ECARD_DEV(_d)	container_of((_d), struct expansion_card, dev)
-
-struct ecard_driver {
-	int			(*probe)(struct expansion_card *, const struct ecard_id *id);
-	void			(*remove)(struct expansion_card *);
-	void			(*shutdown)(struct expansion_card *);
-	const struct ecard_id	*id_table;
-	unsigned int		id;
-	struct device_driver	drv;
-};
-
-#define ECARD_DRV(_d)	container_of((_d), struct ecard_driver, drv)
-
-#define ecard_set_drvdata(ec,data)	dev_set_drvdata(&(ec)->dev, (data))
-#define ecard_get_drvdata(ec)		dev_get_drvdata(&(ec)->dev)
-
-int ecard_register_driver(struct ecard_driver *);
-void ecard_remove_driver(struct ecard_driver *);
-
-#endif
arch/arm/include/asm/hardware/ioc.h deleted +0 -69
deleted file mode 100644
index 6edd27fcd048..000000000000
@@ -1,69 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/include/asm/hardware/ioc.h
- *
- *  Copyright (C) Russell King
- *
- *  Use these macros to read/write the IOC.  All it does is perform the actual
- *  read/write.
- */
-#ifndef __ASMARM_HARDWARE_IOC_H
-#define __ASMARM_HARDWARE_IOC_H
-
-#ifndef __ASSEMBLY__
-
-/*
- * We use __raw_base variants here so that we give the compiler the
- * chance to keep IOC_BASE in a register.
- */
-#define ioc_readb(off)		__raw_readb(IOC_BASE + (off))
-#define ioc_writeb(val,off)	__raw_writeb(val, IOC_BASE + (off))
-
-#endif
-
-#define IOC_CONTROL	(0x00)
-#define IOC_KARTTX	(0x04)
-#define IOC_KARTRX	(0x04)
-
-#define IOC_IRQSTATA	(0x10)
-#define IOC_IRQREQA	(0x14)
-#define IOC_IRQCLRA	(0x14)
-#define IOC_IRQMASKA	(0x18)
-
-#define IOC_IRQSTATB	(0x20)
-#define IOC_IRQREQB	(0x24)
-#define IOC_IRQMASKB	(0x28)
-
-#define IOC_FIQSTAT	(0x30)
-#define IOC_FIQREQ	(0x34)
-#define IOC_FIQMASK	(0x38)
-
-#define IOC_T0CNTL	(0x40)
-#define IOC_T0LTCHL	(0x40)
-#define IOC_T0CNTH	(0x44)
-#define IOC_T0LTCHH	(0x44)
-#define IOC_T0GO	(0x48)
-#define IOC_T0LATCH	(0x4c)
-
-#define IOC_T1CNTL	(0x50)
-#define IOC_T1LTCHL	(0x50)
-#define IOC_T1CNTH	(0x54)
-#define IOC_T1LTCHH	(0x54)
-#define IOC_T1GO	(0x58)
-#define IOC_T1LATCH	(0x5c)
-
-#define IOC_T2CNTL	(0x60)
-#define IOC_T2LTCHL	(0x60)
-#define IOC_T2CNTH	(0x64)
-#define IOC_T2LTCHH	(0x64)
-#define IOC_T2GO	(0x68)
-#define IOC_T2LATCH	(0x6c)
-
-#define IOC_T3CNTL	(0x70)
-#define IOC_T3LTCHL	(0x70)
-#define IOC_T3CNTH	(0x74)
-#define IOC_T3LTCHH	(0x74)
-#define IOC_T3GO	(0x78)
-#define IOC_T3LATCH	(0x7c)
-
-#endif
arch/arm/include/asm/hardware/iomd.h deleted +0 -182
deleted file mode 100644
index 53006ba5350f..000000000000
@@ -1,182 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/include/asm/hardware/iomd.h
- *
- *  Copyright (C) 1999 Russell King
- *
- *  This file contains information out the IOMD ASIC used in the
- *  Acorn RiscPC and subsequently integrated into the CLPS7500 chips.
- */
-#ifndef __ASMARM_HARDWARE_IOMD_H
-#define __ASMARM_HARDWARE_IOMD_H
-
-
-#ifndef __ASSEMBLY__
-
-/*
- * We use __raw_base variants here so that we give the compiler the
- * chance to keep IOC_BASE in a register.
- */
-#define iomd_readb(off)		__raw_readb(IOMD_BASE + (off))
-#define iomd_readl(off)		__raw_readl(IOMD_BASE + (off))
-#define iomd_writeb(val,off)	__raw_writeb(val, IOMD_BASE + (off))
-#define iomd_writel(val,off)	__raw_writel(val, IOMD_BASE + (off))
-
-#endif
-
-#define IOMD_CONTROL	(0x000)
-#define IOMD_KARTTX	(0x004)
-#define IOMD_KARTRX	(0x004)
-#define IOMD_KCTRL	(0x008)
-
-#define IOMD_IRQSTATA	(0x010)
-#define IOMD_IRQREQA	(0x014)
-#define IOMD_IRQCLRA	(0x014)
-#define IOMD_IRQMASKA	(0x018)
-
-#define IOMD_IRQSTATB	(0x020)
-#define IOMD_IRQREQB	(0x024)
-#define IOMD_IRQMASKB	(0x028)
-
-#define IOMD_FIQSTAT	(0x030)
-#define IOMD_FIQREQ	(0x034)
-#define IOMD_FIQMASK	(0x038)
-
-#define IOMD_T0CNTL	(0x040)
-#define IOMD_T0LTCHL	(0x040)
-#define IOMD_T0CNTH	(0x044)
-#define IOMD_T0LTCHH	(0x044)
-#define IOMD_T0GO	(0x048)
-#define IOMD_T0LATCH	(0x04c)
-
-#define IOMD_T1CNTL	(0x050)
-#define IOMD_T1LTCHL	(0x050)
-#define IOMD_T1CNTH	(0x054)
-#define IOMD_T1LTCHH	(0x054)
-#define IOMD_T1GO	(0x058)
-#define IOMD_T1LATCH	(0x05c)
-
-#define IOMD_ROMCR0	(0x080)
-#define IOMD_ROMCR1	(0x084)
-#ifdef CONFIG_ARCH_RPC
-#define IOMD_DRAMCR	(0x088)
-#endif
-#define IOMD_REFCR	(0x08C)
-
-#define IOMD_FSIZE	(0x090)
-#define IOMD_ID0	(0x094)
-#define IOMD_ID1	(0x098)
-#define IOMD_VERSION	(0x09C)
-
-#ifdef CONFIG_ARCH_RPC
-#define IOMD_MOUSEX	(0x0A0)
-#define IOMD_MOUSEY	(0x0A4)
-#endif
-
-#ifdef CONFIG_ARCH_RPC
-#define IOMD_DMATCR	(0x0C0)
-#endif
-#define IOMD_IOTCR	(0x0C4)
-#define IOMD_ECTCR	(0x0C8)
-#ifdef CONFIG_ARCH_RPC
-#define IOMD_DMAEXT	(0x0CC)
-#endif
-
-#ifdef CONFIG_ARCH_RPC
-#define DMA_EXT_IO0	1
-#define DMA_EXT_IO1	2
-#define DMA_EXT_IO2	4
-#define DMA_EXT_IO3	8
-
-#define IOMD_IO0CURA	(0x100)
-#define IOMD_IO0ENDA	(0x104)
-#define IOMD_IO0CURB	(0x108)
-#define IOMD_IO0ENDB	(0x10C)
-#define IOMD_IO0CR	(0x110)
-#define IOMD_IO0ST	(0x114)
-
-#define IOMD_IO1CURA	(0x120)
-#define IOMD_IO1ENDA	(0x124)
-#define IOMD_IO1CURB	(0x128)
-#define IOMD_IO1ENDB	(0x12C)
-#define IOMD_IO1CR	(0x130)
-#define IOMD_IO1ST	(0x134)
-
-#define IOMD_IO2CURA	(0x140)
-#define IOMD_IO2ENDA	(0x144)
-#define IOMD_IO2CURB	(0x148)
-#define IOMD_IO2ENDB	(0x14C)
-#define IOMD_IO2CR	(0x150)
-#define IOMD_IO2ST	(0x154)
-
-#define IOMD_IO3CURA	(0x160)
-#define IOMD_IO3ENDA	(0x164)
-#define IOMD_IO3CURB	(0x168)
-#define IOMD_IO3ENDB	(0x16C)
-#define IOMD_IO3CR	(0x170)
-#define IOMD_IO3ST	(0x174)
-#endif
-
-#define IOMD_SD0CURA	(0x180)
-#define IOMD_SD0ENDA	(0x184)
-#define IOMD_SD0CURB	(0x188)
-#define IOMD_SD0ENDB	(0x18C)
-#define IOMD_SD0CR	(0x190)
-#define IOMD_SD0ST	(0x194)
-
-#ifdef CONFIG_ARCH_RPC
-#define IOMD_SD1CURA	(0x1A0)
-#define IOMD_SD1ENDA	(0x1A4)
-#define IOMD_SD1CURB	(0x1A8)
-#define IOMD_SD1ENDB	(0x1AC)
-#define IOMD_SD1CR	(0x1B0)
-#define IOMD_SD1ST	(0x1B4)
-#endif
-
-#define IOMD_CURSCUR	(0x1C0)
-#define IOMD_CURSINIT	(0x1C4)
-
-#define IOMD_VIDCUR	(0x1D0)
-#define IOMD_VIDEND	(0x1D4)
-#define IOMD_VIDSTART	(0x1D8)
-#define IOMD_VIDINIT	(0x1DC)
-#define IOMD_VIDCR	(0x1E0)
-
-#define IOMD_DMASTAT	(0x1F0)
-#define IOMD_DMAREQ	(0x1F4)
-#define IOMD_DMAMASK	(0x1F8)
-
-#define DMA_END_S	(1 << 31)
-#define DMA_END_L	(1 << 30)
-
-#define DMA_CR_C	0x80
-#define DMA_CR_D	0x40
-#define DMA_CR_E	0x20
-
-#define DMA_ST_OFL	4
-#define DMA_ST_INT	2
-#define DMA_ST_AB	1
-
-/*
- * DMA (MEMC) compatibility
- */
-#define HALF_SAM	vram_half_sam
-#define VDMA_ALIGNMENT	(HALF_SAM * 2)
-#define VDMA_XFERSIZE	(HALF_SAM)
-#define VDMA_INIT	IOMD_VIDINIT
-#define VDMA_START	IOMD_VIDSTART
-#define VDMA_END	IOMD_VIDEND
-
-#ifndef __ASSEMBLY__
-extern unsigned int vram_half_sam;
-#define video_set_dma(start,end,offset)				\
-do {								\
-	outl (SCREEN_START + start, VDMA_START);		\
-	outl (SCREEN_START + end - VDMA_XFERSIZE, VDMA_END);	\
-	if (offset >= end - VDMA_XFERSIZE)			\
-		offset |= 0x40000000;				\
-	outl (SCREEN_START + offset, VDMA_INIT);		\
-} while (0)
-#endif
-
-#endif
arch/arm/include/asm/hardware/memc.h deleted +0 -23
deleted file mode 100644
index 1d4ebe0a9678..000000000000
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/include/asm/hardware/memc.h
- *
- *  Copyright (C) Russell King.
- */
-#define VDMA_ALIGNMENT	PAGE_SIZE
-#define VDMA_XFERSIZE	16
-#define VDMA_INIT	0
-#define VDMA_START	1
-#define VDMA_END	2
-
-#ifndef __ASSEMBLY__
-extern void memc_write(unsigned int reg, unsigned long val);
-
-#define video_set_dma(start,end,offset)				\
-do {								\
-	memc_write (VDMA_START, (start >> 2));			\
-	memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2);	\
-	memc_write (VDMA_INIT, (offset >> 2));			\
-} while (0)
-
-#endif
arch/arm/include/asm/io.h +1 -4
index e6bd9e79737c..c3661af2ca2a 100644
@@ -207,16 +207,13 @@ void __iomem *pci_remap_cfgspace(resource_size_t res_cookie, size_t size);
  /*
   * Now, pick up the machine-defined IO definitions
   */
-#ifdef CONFIG_NEED_MACH_IO_H
-#include <mach/io.h>
-#else
  #if IS_ENABLED(CONFIG_PCMCIA) || defined(CONFIG_PCI)
  #define IO_SPACE_LIMIT	((resource_size_t)0xfffff)
  #else
  #define IO_SPACE_LIMIT ((resource_size_t)0)
  #endif
+
  #define __io(a)		__typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT))
-#endif
 
  /*
   *  IO port access primitives
arch/arm/include/asm/memory.h +0 -3
index 7c2fa7dcec6d..e10363ebdd1f 100644
@@ -20,9 +20,6 @@
  #include <linux/types.h>
  #include <linux/sizes.h>
 
-#ifdef CONFIG_NEED_MACH_MEMORY_H
-#include <mach/memory.h>
-#endif
  #include <asm/kasan_def.h>
 
  /*
arch/arm/kernel/head-common.S +0 -13
index 42cae73fcc19..3cbbcdb63f7d 100644
@@ -221,19 +221,6 @@ str_p2:	.asciz	").\n"
  ENDPROC(__error_p)
 
  __error:
-#ifdef CONFIG_ARCH_RPC
-/*
- * Turn the screen red on a error - RiscPC only.
- */
-	mov	r0, #0x02000000
-	mov	r3, #0x11
-	orr	r3, r3, r3, lsl #8
-	orr	r3, r3, r3, lsl #16
-	str	r3, [r0], #4
-	str	r3, [r0], #4
-	str	r3, [r0], #4
-	str	r3, [r0], #4
-#endif
  1:	mov	r0, r0
  	b	1b
  ENDPROC(__error)
arch/arm/kernel/head.S +0 -12
index b12fe41e579b..2ffaea2c4c9b 100644
@@ -347,18 +347,6 @@ __create_page_tables:
  	/* we don't need any serial debugging mappings */
  	ldr	r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags
  #endif
-#ifdef CONFIG_ARCH_RPC
-	/*
-	 * Map in screen at 0x02000000 & SCREEN2_BASE
-	 * Similar reasons here - for debug.  This is
-	 * only for Acorn RiscPC architectures.
-	 */
-	add	r0, r4, #0x02000000 >> (SECTION_SHIFT - PMD_ENTRY_ORDER)
-	orr	r3, r7, #0x02000000
-	str	r3, [r0]
-	add	r0, r4, #0xd8000000 >> (SECTION_SHIFT - PMD_ENTRY_ORDER)
-	str	r3, [r0]
-#endif
  #endif
  #ifdef CONFIG_ARM_LPAE
  	sub	r4, r4, #0x1000		@ point to the PGD table
arch/arm/lib/delay-loop.S +0 -4
index 33b08ca1c242..56f9eea56268 100644
@@ -9,10 +9,6 @@
  #include <asm/assembler.h>
  #include <asm/delay.h>
 
-#ifdef CONFIG_ARCH_RPC
-		.arch	armv4
-#endif
-
  		.text
 
  .LC0:		.word	loops_per_jiffy
arch/arm/mach-rpc/Kconfig deleted +0 -24
deleted file mode 100644
index 60b3823b690c..000000000000
@@ -1,24 +0,0 @@
-config ARCH_RPC
-	bool "RiscPC (DEPRECATED)"
-	depends on ARCH_MULTI_V4 && !(ARCH_MULTI_V4T || ARCH_MULTI_V5)
-	depends on !(ARCH_FOOTBRIDGE || ARCH_SA1100 || ARCH_MOXART || ARCH_GEMINI)
-	depends on !CC_IS_CLANG && GCC_VERSION < 90100 && GCC_VERSION >= 60000
-	depends on CPU_LITTLE_ENDIAN
-	depends on ATAGS
-	depends on MMU
-	select ARCH_ACORN
-	select ARCH_MAY_HAVE_PC_FDC
-	select CPU_SA110
-	select FIQ
-	select HAVE_PATA_PLATFORM
-	select ISA_DMA_API
-	select LEGACY_TIMER_TICK
-	select NEED_MACH_IO_H
-	select NEED_MACH_MEMORY_H
-	select NO_IOPORT_MAP
-	help
-	  On the Acorn Risc-PC, Linux can support the internal IDE disk and
-	  CD-ROM interface, serial and parallel port, and the floppy drive.
-
-	  Support for these machines will go away in 2027,
-	  unless there are any remaining users that speak up.
arch/arm/mach-rpc/Makefile deleted +0 -9
deleted file mode 100644
index 90a645a18444..000000000000
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y	:=dma.o ecard.o ecard-loader.o fiq.o floppydma.o io-acorn.o irq.o \
-	  riscpc.o time.o
arch/arm/mach-rpc/dma.c deleted +0 -393
deleted file mode 100644
index 50e0f97afd75..000000000000
@@ -1,393 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- *  linux/arch/arm/mach-rpc/dma.c
- *
- *  Copyright (C) 1998 Russell King
- *
- *  DMA functions specific to RiscPC architecture
- */
-#include <linux/mman.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/dma-mapping.h>
-#include <linux/io.h>
-
-#include <asm/page.h>
-#include <asm/dma.h>
-#include <asm/fiq.h>
-#include <asm/irq.h>
-#include <mach/hardware.h>
-#include <linux/uaccess.h>
-
-#include <asm/mach/dma.h>
-#include <asm/hardware/iomd.h>
-
-struct iomd_dma {
-	struct dma_struct	dma;
-	void __iomem		*base;		/* Controller base address */
-	int			irq;		/* Controller IRQ */
-	unsigned int		state;
-	dma_addr_t		cur_addr;
-	unsigned int		cur_len;
-	dma_addr_t		dma_addr;
-	unsigned int		dma_len;
-};
-
-#if 0
-typedef enum {
-	dma_size_8	= 1,
-	dma_size_16	= 2,
-	dma_size_32	= 4,
-	dma_size_128	= 16
-} dma_size_t;
-#endif
-
-#define TRANSFER_SIZE	2
-
-#define CURA	(0)
-#define ENDA	(IOMD_IO0ENDA - IOMD_IO0CURA)
-#define CURB	(IOMD_IO0CURB - IOMD_IO0CURA)
-#define ENDB	(IOMD_IO0ENDB - IOMD_IO0CURA)
-#define CR	(IOMD_IO0CR - IOMD_IO0CURA)
-#define ST	(IOMD_IO0ST - IOMD_IO0CURA)
-
-static void iomd_get_next_sg(struct iomd_dma *idma)
-{
-	unsigned long end, offset, flags = 0;
-
-	if (idma->dma.sg) {
-		idma->cur_addr = idma->dma_addr;
-		offset = idma->cur_addr & ~PAGE_MASK;
-
-		end = offset + idma->dma_len;
-
-		if (end > PAGE_SIZE)
-			end = PAGE_SIZE;
-
-		if (offset + TRANSFER_SIZE >= end)
-			flags |= DMA_END_L;
-
-		idma->cur_len = end - TRANSFER_SIZE;
-
-		idma->dma_len -= end - offset;
-		idma->dma_addr += end - offset;
-
-		if (idma->dma_len == 0) {
-			if (idma->dma.sgcount > 1) {
-				idma->dma.sg = sg_next(idma->dma.sg);
-				idma->dma_addr = idma->dma.sg->dma_address;
-				idma->dma_len = idma->dma.sg->length;
-				idma->dma.sgcount--;
-			} else {
-				idma->dma.sg = NULL;
-				flags |= DMA_END_S;
-			}
-		}
-	} else {
-		flags = DMA_END_S | DMA_END_L;
-		idma->cur_addr = 0;
-		idma->cur_len = 0;
-	}
-
-	idma->cur_len |= flags;
-}
-
-static irqreturn_t iomd_dma_handle(int irq, void *dev_id)
-{
-	struct iomd_dma *idma = dev_id;
-	void __iomem *base = idma->base;
-	unsigned int state = idma->state;
-	unsigned int status, cur, end;
-
-	do {
-		status = readb(base + ST);
-		if (!(status & DMA_ST_INT))
-			goto out;
-
-		if ((state ^ status) & DMA_ST_AB)
-			iomd_get_next_sg(idma);
-
-		// This efficiently implements state = OFL != AB ? AB : 0
-		state = ((status >> 2) ^ status) & DMA_ST_AB;
-		if (state) {
-			cur = CURA;
-			end = ENDA;
-		} else {
-			cur = CURB;
-			end = ENDB;
-		}
-		writel(idma->cur_addr, base + cur);
-		writel(idma->cur_len, base + end);
-
-		if (status & DMA_ST_OFL &&
-		    idma->cur_len == (DMA_END_S|DMA_END_L))
-			break;
-	} while (1);
-
-	state = ~DMA_ST_AB;
-	disable_irq_nosync(irq);
-out:
-	idma->state = state;
-	return IRQ_HANDLED;
-}
-
-static int iomd_request_dma(unsigned int chan, dma_t *dma)
-{
-	struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
-
-	return request_irq(idma->irq, iomd_dma_handle,
-			   0, idma->dma.device_id, idma);
-}
-
-static void iomd_free_dma(unsigned int chan, dma_t *dma)
-{
-	struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
-
-	free_irq(idma->irq, idma);
-}
-
-static struct device isa_dma_dev = {
-	.init_name		= "fallback device",
-	.coherent_dma_mask	= ~(dma_addr_t)0,
-	.dma_mask		= &isa_dma_dev.coherent_dma_mask,
-};
-
-static void iomd_enable_dma(unsigned int chan, dma_t *dma)
-{
-	struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
-	void __iomem *base = idma->base;
-	unsigned int ctrl = TRANSFER_SIZE | DMA_CR_E;
-
-	if (idma->dma.invalid) {
-		idma->dma.invalid = 0;
-
-		/*
-		 * Cope with ISA-style drivers which expect cache
-		 * coherence.
-		 */
-		if (!idma->dma.sg) {
-			idma->dma.sg = &idma->dma.buf;
-			idma->dma.sgcount = 1;
-			idma->dma.buf.length = idma->dma.count;
-			idma->dma.buf.dma_address = dma_map_single(&isa_dma_dev,
-				idma->dma.addr, idma->dma.count,
-				idma->dma.dma_mode == DMA_MODE_READ ?
-				DMA_FROM_DEVICE : DMA_TO_DEVICE);
-		}
-
-		idma->dma_addr = idma->dma.sg->dma_address;
-		idma->dma_len = idma->dma.sg->length;
-
-		writeb(DMA_CR_C, base + CR);
-		idma->state = DMA_ST_AB;
-	}
-
-	if (idma->dma.dma_mode == DMA_MODE_READ)
-		ctrl |= DMA_CR_D;
-
-	writeb(ctrl, base + CR);
-	enable_irq(idma->irq);
-}
-
-static void iomd_disable_dma(unsigned int chan, dma_t *dma)
-{
-	struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
-	void __iomem *base = idma->base;
-	unsigned long flags;
-
-	local_irq_save(flags);
-	if (idma->state != ~DMA_ST_AB)
-		disable_irq(idma->irq);
-	writeb(0, base + CR);
-	local_irq_restore(flags);
-}
-
-static int iomd_set_dma_speed(unsigned int chan, dma_t *dma, int cycle)
-{
-	int tcr, speed;
-
-	if (cycle < 188)
-		speed = 3;
-	else if (cycle <= 250)
-		speed = 2;
-	else if (cycle < 438)
-		speed = 1;
-	else
-		speed = 0;
-
-	tcr = iomd_readb(IOMD_DMATCR);
-	speed &= 3;
-
-	switch (chan) {
-	case DMA_0:
-		tcr = (tcr & ~0x03) | speed;
-		break;
-
-	case DMA_1:
-		tcr = (tcr & ~0x0c) | (speed << 2);
-		break;
-
-	case DMA_2:
-		tcr = (tcr & ~0x30) | (speed << 4);
-		break;
-
-	case DMA_3:
-		tcr = (tcr & ~0xc0) | (speed << 6);
-		break;
-
-	default:
-		break;
-	}
-
-	iomd_writeb(tcr, IOMD_DMATCR);
-
-	return speed;
-}
-
-static struct dma_ops iomd_dma_ops = {
-	.type		= "IOMD",
-	.request	= iomd_request_dma,
-	.free		= iomd_free_dma,
-	.enable		= iomd_enable_dma,
-	.disable	= iomd_disable_dma,
-	.setspeed	= iomd_set_dma_speed,
-};
-
-static struct fiq_handler fh = {
-	.name	= "floppydma"
-};
-
-struct floppy_dma {
-	struct dma_struct	dma;
-	unsigned int		fiq;
-};
-
-static void floppy_enable_dma(unsigned int chan, dma_t *dma)
-{
-	struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma);
-	void *fiqhandler_start;
-	unsigned int fiqhandler_length;
-	struct pt_regs regs;
-
-	if (fdma->dma.sg)
-		BUG();
-
-	if (fdma->dma.dma_mode == DMA_MODE_READ) {
-		extern unsigned char floppy_fiqin_start, floppy_fiqin_end;
-		fiqhandler_start = &floppy_fiqin_start;
-		fiqhandler_length = &floppy_fiqin_end - &floppy_fiqin_start;
-	} else {
-		extern unsigned char floppy_fiqout_start, floppy_fiqout_end;
-		fiqhandler_start = &floppy_fiqout_start;
-		fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start;
-	}
-
-	regs.ARM_r9  = fdma->dma.count;
-	regs.ARM_r10 = (unsigned long)fdma->dma.addr;
-	regs.ARM_fp  = (unsigned long)FLOPPYDMA_BASE;
-
-	if (claim_fiq(&fh)) {
-		printk("floppydma: couldn't claim FIQ.\n");
-		return;
-	}
-
-	set_fiq_handler(fiqhandler_start, fiqhandler_length);
-	set_fiq_regs(&regs);
-	enable_fiq(fdma->fiq);
-}
-
-static void floppy_disable_dma(unsigned int chan, dma_t *dma)
-{
-	struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma);
-	disable_fiq(fdma->fiq);
-	release_fiq(&fh);
-}
-
-static int floppy_get_residue(unsigned int chan, dma_t *dma)
-{
-	struct pt_regs regs;
-	get_fiq_regs(&regs);
-	return regs.ARM_r9;
-}
-
-static struct dma_ops floppy_dma_ops = {
-	.type		= "FIQDMA",
-	.enable		= floppy_enable_dma,
-	.disable	= floppy_disable_dma,
-	.residue	= floppy_get_residue,
-};
-
-/*
- * This is virtual DMA - we don't need anything here.
- */
-static void sound_enable_disable_dma(unsigned int chan, dma_t *dma)
-{
-}
-
-static struct dma_ops sound_dma_ops = {
-	.type		= "VIRTUAL",
-	.enable		= sound_enable_disable_dma,
-	.disable	= sound_enable_disable_dma,
-};
-
-static struct iomd_dma iomd_dma[6];
-
-static struct floppy_dma floppy_dma = {
-	.dma		= {
-		.d_ops	= &floppy_dma_ops,
-	},
-	.fiq		= FIQ_FLOPPYDATA,
-};
-
-static dma_t sound_dma = {
-	.d_ops		= &sound_dma_ops,
-};
-
-static int __init rpc_dma_init(void)
-{
-	unsigned int i;
-	int ret;
-
-	iomd_writeb(0, IOMD_IO0CR);
-	iomd_writeb(0, IOMD_IO1CR);
-	iomd_writeb(0, IOMD_IO2CR);
-	iomd_writeb(0, IOMD_IO3CR);
-
-	iomd_writeb(0xa0, IOMD_DMATCR);
-
-	/*
-	 * Setup DMA channels 2,3 to be for podules
-	 * and channels 0,1 for internal devices
-	 */
-	iomd_writeb(DMA_EXT_IO3|DMA_EXT_IO2, IOMD_DMAEXT);
-
-	iomd_dma[DMA_0].base	= IOMD_BASE + IOMD_IO0CURA;
-	iomd_dma[DMA_0].irq	= IRQ_DMA0;
-	iomd_dma[DMA_1].base	= IOMD_BASE + IOMD_IO1CURA;
-	iomd_dma[DMA_1].irq	= IRQ_DMA1;
-	iomd_dma[DMA_2].base	= IOMD_BASE + IOMD_IO2CURA;
-	iomd_dma[DMA_2].irq	= IRQ_DMA2;
-	iomd_dma[DMA_3].base	= IOMD_BASE + IOMD_IO3CURA;
-	iomd_dma[DMA_3].irq	= IRQ_DMA3;
-	iomd_dma[DMA_S0].base	= IOMD_BASE + IOMD_SD0CURA;
-	iomd_dma[DMA_S0].irq	= IRQ_DMAS0;
-	iomd_dma[DMA_S1].base	= IOMD_BASE + IOMD_SD1CURA;
-	iomd_dma[DMA_S1].irq	= IRQ_DMAS1;
-
-	for (i = DMA_0; i <= DMA_S1; i++) {
-		iomd_dma[i].dma.d_ops = &iomd_dma_ops;
-
-		ret = isa_dma_add(i, &iomd_dma[i].dma);
-		if (ret)
-			printk("IOMDDMA%u: unable to register: %d\n", i, ret);
-	}
-
-	ret = isa_dma_add(DMA_VIRTUAL_FLOPPY, &floppy_dma.dma);
-	if (ret)
-		printk("IOMDFLOPPY: unable to register: %d\n", ret);
-	ret = isa_dma_add(DMA_VIRTUAL_SOUND, &sound_dma);
-	if (ret)
-		printk("IOMDSOUND: unable to register: %d\n", ret);
-	return 0;
-}
-core_initcall(rpc_dma_init);
arch/arm/mach-rpc/ecard-loader.S deleted +0 -40
deleted file mode 100644
index eb8ac0412da6..000000000000
@@ -1,40 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  linux/arch/arm/lib/ecard.S
- *
- *  Copyright (C) 1995, 1996 Russell King
- *
- * 27/03/03 Ian Molton Clean up CONFIG_CPU
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-
-#define CPSR2SPSR(rt) \
-		mrs	rt, cpsr; \
-		msr	spsr_cxsf, rt
-
-@ Purpose: call an expansion card loader to read bytes.
-@ Proto  : char read_loader(int offset, char *card_base, char *loader);
-@ Returns: byte read
-
-ENTRY(ecard_loader_read)
-		stmfd	sp!, {r4 - r12, lr}
-		mov	r11, r1
-		mov	r1, r0
-		CPSR2SPSR(r0)
-		mov	lr, pc
-		mov	pc, r2
-		ldmfd	sp!, {r4 - r12, pc}
-
-@ Purpose: call an expansion card loader to reset the card
-@ Proto  : void read_loader(int card_base, char *loader);
-@ Returns: byte read
-
-ENTRY(ecard_loader_reset)
-		stmfd	sp!, {r4 - r12, lr}
-		mov	r11, r0
-		CPSR2SPSR(r0)
-		mov	lr, pc
-		add	pc, r1, #8
-		ldmfd	sp!, {r4 - r12, pc}
-
arch/arm/mach-rpc/ecard.c deleted +0 -1146
deleted file mode 100644
index 972465840548..000000000000
@@ -1,1146 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- *  linux/arch/arm/kernel/ecard.c
- *
- *  Copyright 1995-2001 Russell King
- *
- *  Find all installed expansion cards, and handle interrupts from them.
- *
- *  Created from information from Acorns RiscOS3 PRMs
- *
- *  08-Dec-1996	RMK	Added code for the 9'th expansion card - the ether
- *			podule slot.
- *  06-May-1997	RMK	Added blacklist for cards whose loader doesn't work.
- *  12-Sep-1997	RMK	Created new handling of interrupt enables/disables
- *			- cards can now register their own routine to control
- *			interrupts (recommended).
- *  29-Sep-1997	RMK	Expansion card interrupt hardware not being re-enabled
- *			on reset from Linux. (Caused cards not to respond
- *			under RiscOS without hard reset).
- *  15-Feb-1998	RMK	Added DMA support
- *  12-Sep-1998	RMK	Added EASI support
- *  10-Jan-1999	RMK	Run loaders in a simulated RISC OS environment.
- *  17-Apr-1999	RMK	Support for EASI Type C cycles.
- */
-#define ECARD_C
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/sched/mm.h>
-#include <linux/interrupt.h>
-#include <linux/completion.h>
-#include <linux/reboot.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/device.h>
-#include <linux/init.h>
-#include <linux/mutex.h>
-#include <linux/kthread.h>
-#include <linux/irq.h>
-#include <linux/io.h>
-
-#include <asm/dma.h>
-#include <asm/ecard.h>
-#include <mach/hardware.h>
-#include <asm/irq.h>
-#include <asm/mmu_context.h>
-#include <asm/mach/irq.h>
-#include <asm/tlbflush.h>
-
-#include "ecard.h"
-
-struct ecard_request {
-	void		(*fn)(struct ecard_request *);
-	ecard_t		*ec;
-	unsigned int	address;
-	unsigned int	length;
-	unsigned int	use_loader;
-	void		*buffer;
-	struct completion *complete;
-};
-
-struct expcard_quirklist {
-	unsigned short	 manufacturer;
-	unsigned short	 product;
-	const char	*type;
-	void (*init)(ecard_t *ec);
-};
-
-static ecard_t *cards;
-static ecard_t *slot_to_expcard[MAX_ECARDS];
-static unsigned int ectcr;
-
-static void atomwide_3p_quirk(ecard_t *ec);
-
-/* List of descriptions of cards which don't have an extended
- * identification, or chunk directories containing a description.
- */
-static struct expcard_quirklist quirklist[] __initdata = {
-	{ MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" },
-	{ MANU_ATOMWIDE, PROD_ATOMWIDE_3PSERIAL, NULL, atomwide_3p_quirk },
-};
-
-asmlinkage extern int
-ecard_loader_reset(unsigned long base, loader_t loader);
-asmlinkage extern int
-ecard_loader_read(int off, unsigned long base, loader_t loader);
-
-static inline unsigned short ecard_getu16(unsigned char *v)
-{
-	return v[0] | v[1] << 8;
-}
-
-static inline signed long ecard_gets24(unsigned char *v)
-{
-	return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0);
-}
-
-static inline ecard_t *slot_to_ecard(unsigned int slot)
-{
-	return slot < MAX_ECARDS ? slot_to_expcard[slot] : NULL;
-}
-
-/* ===================== Expansion card daemon ======================== */
-/*
- * Since the loader programs on the expansion cards need to be run
- * in a specific environment, create a separate task with this
- * environment up, and pass requests to this task as and when we
- * need to.
- *
- * This should allow 99% of loaders to be called from Linux.
- *
- * From a security standpoint, we trust the card vendors.  This
- * may be a misplaced trust.
- */
-static void ecard_task_reset(struct ecard_request *req)
-{
-	struct expansion_card *ec = req->ec;
-	struct resource *res;
-
-	res = ec->slot_no == 8
-		? &ec->resource[ECARD_RES_MEMC]
-		: ec->easi
-		  ? &ec->resource[ECARD_RES_EASI]
-		  : &ec->resource[ECARD_RES_IOCSYNC];
-
-	ecard_loader_reset(res->start, ec->loader);
-}
-
-static void ecard_task_readbytes(struct ecard_request *req)
-{
-	struct expansion_card *ec = req->ec;
-	unsigned char *buf = req->buffer;
-	unsigned int len = req->length;
-	unsigned int off = req->address;
-
-	if (ec->slot_no == 8) {
-		void __iomem *base = (void __iomem *)
-				ec->resource[ECARD_RES_MEMC].start;
-
-		/*
-		 * The card maintains an index which increments the address
-		 * into a 4096-byte page on each access.  We need to keep
-		 * track of the counter.
-		 */
-		static unsigned int index;
-		unsigned int page;
-
-		page = (off >> 12) * 4;
-		if (page > 256 * 4)
-			return;
-
-		off &= 4095;
-
-		/*
-		 * If we are reading offset 0, or our current index is
-		 * greater than the offset, reset the hardware index counter.
-		 */
-		if (off == 0 || index > off) {
-			writeb(0, base);
-			index = 0;
-		}
-
-		/*
-		 * Increment the hardware index counter until we get to the
-		 * required offset.  The read bytes are discarded.
-		 */
-		while (index < off) {
-			readb(base + page);
-			index += 1;
-		}
-
-		while (len--) {
-			*buf++ = readb(base + page);
-			index += 1;
-		}
-	} else {
-		unsigned long base = (ec->easi
-			 ? &ec->resource[ECARD_RES_EASI]
-			 : &ec->resource[ECARD_RES_IOCSYNC])->start;
-		void __iomem *pbase = (void __iomem *)base;
-
-		if (!req->use_loader || !ec->loader) {
-			off *= 4;
-			while (len--) {
-				*buf++ = readb(pbase + off);
-				off += 4;
-			}
-		} else {
-			while(len--) {
-				/*
-				 * The following is required by some
-				 * expansion card loader programs.
-				 */
-				*(unsigned long *)0x108 = 0;
-				*buf++ = ecard_loader_read(off++, base,
-							   ec->loader);
-			}
-		}
-	}
-
-}
-
-static DECLARE_WAIT_QUEUE_HEAD(ecard_wait);
-static struct ecard_request *ecard_req;
-static DEFINE_MUTEX(ecard_mutex);
-
-/*
- * Set up the expansion card daemon's page tables.
- */
-static void ecard_init_pgtables(struct mm_struct *mm)
-{
-	struct vm_area_struct vma = TLB_FLUSH_VMA(mm, VM_EXEC);
-
-	/* We want to set up the page tables for the following mapping:
-	 *  Virtual	Physical
-	 *  0x03000000	0x03000000
-	 *  0x03010000	unmapped
-	 *  0x03210000	0x03210000
-	 *  0x03400000	unmapped
-	 *  0x08000000	0x08000000
-	 *  0x10000000	unmapped
-	 *
-	 * FIXME: we don't follow this 100% yet.
-	 */
-	pgd_t *src_pgd, *dst_pgd;
-
-	src_pgd = pgd_offset(mm, (unsigned long)IO_BASE);
-	dst_pgd = pgd_offset(mm, IO_START);
-
-	memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE));
-
-	src_pgd = pgd_offset(mm, (unsigned long)EASI_BASE);
-	dst_pgd = pgd_offset(mm, EASI_START);
-
-	memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
-
-	flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE);
-	flush_tlb_range(&vma, EASI_START, EASI_START + EASI_SIZE);
-}
-
-static int ecard_init_mm(void)
-{
-	struct mm_struct * mm = mm_alloc();
-	struct mm_struct *active_mm = current->active_mm;
-
-	if (!mm)
-		return -ENOMEM;
-
-	current->mm = mm;
-	current->active_mm = mm;
-	activate_mm(active_mm, mm);
-	mmdrop_lazy_tlb(active_mm);
-	ecard_init_pgtables(mm);
-	return 0;
-}
-
-static int
-ecard_task(void * unused)
-{
-	/*
-	 * Allocate a mm.  We're not a lazy-TLB kernel task since we need
-	 * to set page table entries where the user space would be.  Note
-	 * that this also creates the page tables.  Failure is not an
-	 * option here.
-	 */
-	if (ecard_init_mm())
-		panic("kecardd: unable to alloc mm\n");
-
-	while (1) {
-		struct ecard_request *req;
-
-		wait_event_interruptible(ecard_wait, ecard_req != NULL);
-
-		req = xchg(&ecard_req, NULL);
-		if (req != NULL) {
-			req->fn(req);
-			complete(req->complete);
-		}
-	}
-}
-
-/*
- * Wake the expansion card daemon to action our request.
- *
- * FIXME: The test here is not sufficient to detect if the
- * kcardd is running.
- */
-static void ecard_call(struct ecard_request *req)
-{
-	DECLARE_COMPLETION_ONSTACK(completion);
-
-	req->complete = &completion;
-
-	mutex_lock(&ecard_mutex);
-	ecard_req = req;
-	wake_up(&ecard_wait);
-
-	/*
-	 * Now wait for kecardd to run.
-	 */
-	wait_for_completion(&completion);
-	mutex_unlock(&ecard_mutex);
-}
-
-/* ======================= Mid-level card control ===================== */
-
-static void
-ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld)
-{
-	struct ecard_request req;
-
-	req.fn		= ecard_task_readbytes;
-	req.ec		= ec;
-	req.address	= off;
-	req.length	= len;
-	req.use_loader	= useld;
-	req.buffer	= addr;
-
-	ecard_call(&req);
-}
-
-int ecard_readchunk(struct in_chunk_dir *cd, ecard_t *ec, int id, int num)
-{
-	struct ex_chunk_dir excd;
-	int index = 16;
-	int useld = 0;
-
-	if (!ec->cid.cd)
-		return 0;
-
-	while(1) {
-		ecard_readbytes(&excd, ec, index, 8, useld);
-		index += 8;
-		if (c_id(&excd) == 0) {
-			if (!useld && ec->loader) {
-				useld = 1;
-				index = 0;
-				continue;
-			}
-			return 0;
-		}
-		if (c_id(&excd) == 0xf0) { /* link */
-			index = c_start(&excd);
-			continue;
-		}
-		if (c_id(&excd) == 0x80) { /* loader */
-			if (!ec->loader) {
-				ec->loader = kmalloc(c_len(&excd),
-							       GFP_KERNEL);
-				if (ec->loader)
-					ecard_readbytes(ec->loader, ec,
-							(int)c_start(&excd),
-							c_len(&excd), useld);
-				else
-					return 0;
-			}
-			continue;
-		}
-		if (c_id(&excd) == id && num-- == 0)
-			break;
-	}
-
-	if (c_id(&excd) & 0x80) {
-		switch (c_id(&excd) & 0x70) {
-		case 0x70:
-			ecard_readbytes((unsigned char *)excd.d.string, ec,
-					(int)c_start(&excd), c_len(&excd),
-					useld);
-			break;
-		case 0x00:
-			break;
-		}
-	}
-	cd->start_offset = c_start(&excd);
-	memcpy(cd->d.string, excd.d.string, 256);
-	return 1;
-}
-
-/* ======================= Interrupt control ============================ */
-
-static void ecard_def_irq_enable(ecard_t *ec, int irqnr)
-{
-}
-
-static void ecard_def_irq_disable(ecard_t *ec, int irqnr)
-{
-}
-
-static int ecard_def_irq_pending(ecard_t *ec)
-{
-	return !ec->irqmask || readb(ec->irqaddr) & ec->irqmask;
-}
-
-static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr)
-{
-	panic("ecard_def_fiq_enable called - impossible");
-}
-
-static void ecard_def_fiq_disable(ecard_t *ec, int fiqnr)
-{
-	panic("ecard_def_fiq_disable called - impossible");
-}
-
-static int ecard_def_fiq_pending(ecard_t *ec)
-{
-	return !ec->fiqmask || readb(ec->fiqaddr) & ec->fiqmask;
-}
-
-static expansioncard_ops_t ecard_default_ops = {
-	ecard_def_irq_enable,
-	ecard_def_irq_disable,
-	ecard_def_irq_pending,
-	ecard_def_fiq_enable,
-	ecard_def_fiq_disable,
-	ecard_def_fiq_pending
-};
-
-/*
- * Enable and disable interrupts from expansion cards.
- * (interrupts are disabled for these functions).
- *
- * They are not meant to be called directly, but via enable/disable_irq.
- */
-static void ecard_irq_unmask(struct irq_data *d)
-{
-	ecard_t *ec = irq_data_get_irq_chip_data(d);
-
-	if (ec) {
-		if (!ec->ops)
-			ec->ops = &ecard_default_ops;
-
-		if (ec->claimed && ec->ops->irqenable)
-			ec->ops->irqenable(ec, d->irq);
-		else
-			printk(KERN_ERR "ecard: rejecting request to "
-				"enable IRQs for %d\n", d->irq);
-	}
-}
-
-static void ecard_irq_mask(struct irq_data *d)
-{
-	ecard_t *ec = irq_data_get_irq_chip_data(d);
-
-	if (ec) {
-		if (!ec->ops)
-			ec->ops = &ecard_default_ops;
-
-		if (ec->ops && ec->ops->irqdisable)
-			ec->ops->irqdisable(ec, d->irq);
-	}
-}
-
-static struct irq_chip ecard_chip = {
-	.name		= "ECARD",
-	.irq_ack	= ecard_irq_mask,
-	.irq_mask	= ecard_irq_mask,
-	.irq_unmask	= ecard_irq_unmask,
-};
-
-void ecard_enablefiq(unsigned int fiqnr)
-{
-	ecard_t *ec = slot_to_ecard(fiqnr);
-
-	if (ec) {
-		if (!ec->ops)
-			ec->ops = &ecard_default_ops;
-
-		if (ec->claimed && ec->ops->fiqenable)
-			ec->ops->fiqenable(ec, fiqnr);
-		else
-			printk(KERN_ERR "ecard: rejecting request to "
-				"enable FIQs for %d\n", fiqnr);
-	}
-}
-
-void ecard_disablefiq(unsigned int fiqnr)
-{
-	ecard_t *ec = slot_to_ecard(fiqnr);
-
-	if (ec) {
-		if (!ec->ops)
-			ec->ops = &ecard_default_ops;
-
-		if (ec->ops->fiqdisable)
-			ec->ops->fiqdisable(ec, fiqnr);
-	}
-}
-
-static void ecard_dump_irq_state(void)
-{
-	ecard_t *ec;
-
-	printk("Expansion card IRQ state:\n");
-
-	for (ec = cards; ec; ec = ec->next) {
-		const char *claimed;
-
-		if (ec->slot_no == 8)
-			continue;
-
-		claimed = ec->claimed ? "" : "not ";
-
-		if (ec->ops && ec->ops->irqpending &&
-		    ec->ops != &ecard_default_ops)
-			printk("  %d: %sclaimed irq %spending\n",
-			       ec->slot_no, claimed,
-			       ec->ops->irqpending(ec) ? "" : "not ");
-		else
-			printk("  %d: %sclaimed irqaddr %p, mask = %02X, status = %02X\n",
-			       ec->slot_no, claimed,
-			       ec->irqaddr, ec->irqmask, readb(ec->irqaddr));
-	}
-}
-
-static void ecard_check_lockup(struct irq_desc *desc)
-{
-	static unsigned long last;
-	static int lockup;
-
-	/*
-	 * If the timer interrupt has not run since the last million
-	 * unrecognised expansion card interrupts, then there is
-	 * something seriously wrong.  Disable the expansion card
-	 * interrupts so at least we can continue.
-	 *
-	 * Maybe we ought to start a timer to re-enable them some time
-	 * later?
-	 */
-	if (last == jiffies) {
-		lockup += 1;
-		if (lockup > 1000000) {
-			printk(KERN_ERR "\nInterrupt lockup detected - "
-			       "disabling all expansion card interrupts\n");
-
-			desc->irq_data.chip->irq_mask(&desc->irq_data);
-			ecard_dump_irq_state();
-		}
-	} else
-		lockup = 0;
-
-	/*
-	 * If we did not recognise the source of this interrupt,
-	 * warn the user, but don't flood the user with these messages.
-	 */
-	if (!last || time_after(jiffies, last + 5*HZ)) {
-		last = jiffies;
-		printk(KERN_WARNING "Unrecognised interrupt from backplane\n");
-		ecard_dump_irq_state();
-	}
-}
-
-static void ecard_irq_handler(struct irq_desc *desc)
-{
-	ecard_t *ec;
-	int called = 0;
-
-	desc->irq_data.chip->irq_mask(&desc->irq_data);
-	for (ec = cards; ec; ec = ec->next) {
-		int pending;
-
-		if (!ec->claimed || !ec->irq || ec->slot_no == 8)
-			continue;
-
-		if (ec->ops && ec->ops->irqpending)
-			pending = ec->ops->irqpending(ec);
-		else
-			pending = ecard_default_ops.irqpending(ec);
-
-		if (pending) {
-			generic_handle_irq(ec->irq);
-			called ++;
-		}
-	}
-	desc->irq_data.chip->irq_unmask(&desc->irq_data);
-
-	if (called == 0)
-		ecard_check_lockup(desc);
-}
-
-static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
-{
-	void __iomem *address = NULL;
-	int slot = ec->slot_no;
-
-	if (ec->slot_no == 8)
-		return ECARD_MEMC8_BASE;
-
-	ectcr &= ~(1 << slot);
-
-	switch (type) {
-	case ECARD_MEMC:
-		if (slot < 4)
-			address = ECARD_MEMC_BASE + (slot << 14);
-		break;
-
-	case ECARD_IOC:
-		if (slot < 4)
-			address = ECARD_IOC_BASE + (slot << 14);
-		else
-			address = ECARD_IOC4_BASE + ((slot - 4) << 14);
-		if (address)
-			address += speed << 19;
-		break;
-
-	case ECARD_EASI:
-		address = ECARD_EASI_BASE + (slot << 24);
-		if (speed == ECARD_FAST)
-			ectcr |= 1 << slot;
-		break;
-
-	default:
-		break;
-	}
-
-#ifdef IOMD_ECTCR
-	iomd_writeb(ectcr, IOMD_ECTCR);
-#endif
-	return address;
-}
-
-static int ecard_prints(struct seq_file *m, ecard_t *ec)
-{
-	seq_printf(m, "  %d: %s ", ec->slot_no, ec->easi ? "EASI" : "    ");
-
-	if (ec->cid.id == 0) {
-		struct in_chunk_dir incd;
-
-		seq_printf(m, "[%04X:%04X] ",
-			ec->cid.manufacturer, ec->cid.product);
-
-		if (!ec->card_desc && ec->cid.cd &&
-		    ecard_readchunk(&incd, ec, 0xf5, 0)) {
-			ec->card_desc = kmalloc(strlen(incd.d.string)+1, GFP_KERNEL);
-
-			if (ec->card_desc)
-				strcpy((char *)ec->card_desc, incd.d.string);
-		}
-
-		seq_printf(m, "%s\n", ec->card_desc ? ec->card_desc : "*unknown*");
-	} else
-		seq_printf(m, "Simple card %d\n", ec->cid.id);
-
-	return 0;
-}
-
-static int ecard_devices_proc_show(struct seq_file *m, void *v)
-{
-	ecard_t *ec = cards;
-
-	while (ec) {
-		ecard_prints(m, ec);
-		ec = ec->next;
-	}
-	return 0;
-}
-
-static struct proc_dir_entry *proc_bus_ecard_dir = NULL;
-
-static void ecard_proc_init(void)
-{
-	proc_bus_ecard_dir = proc_mkdir("bus/ecard", NULL);
-	proc_create_single("devices", 0, proc_bus_ecard_dir,
-			ecard_devices_proc_show);
-}
-
-#define ec_set_resource(ec,nr,st,sz)				\
-	do {							\
-		(ec)->resource[nr].name = dev_name(&ec->dev);	\
-		(ec)->resource[nr].start = st;			\
-		(ec)->resource[nr].end = (st) + (sz) - 1;	\
-		(ec)->resource[nr].flags = IORESOURCE_MEM;	\
-	} while (0)
-
-static void __init ecard_free_card(struct expansion_card *ec)
-{
-	int i;
-
-	for (i = 0; i < ECARD_NUM_RESOURCES; i++)
-		if (ec->resource[i].flags)
-			release_resource(&ec->resource[i]);
-
-	kfree(ec);
-}
-
-static struct expansion_card *__init ecard_alloc_card(int type, int slot)
-{
-	struct expansion_card *ec;
-	unsigned long base;
-	int i;
-
-	ec = kzalloc_obj(ecard_t);
-	if (!ec) {
-		ec = ERR_PTR(-ENOMEM);
-		goto nomem;
-	}
-
-	ec->slot_no = slot;
-	ec->easi = type == ECARD_EASI;
-	ec->irq = 0;
-	ec->fiq = 0;
-	ec->dma = NO_DMA;
-	ec->ops = &ecard_default_ops;
-
-	dev_set_name(&ec->dev, "ecard%d", slot);
-	ec->dev.parent = NULL;
-	ec->dev.bus = &ecard_bus_type;
-	ec->dev.dma_mask = &ec->dma_mask;
-	ec->dma_mask = (u64)0xffffffff;
-	ec->dev.coherent_dma_mask = ec->dma_mask;
-
-	if (slot < 4) {
-		ec_set_resource(ec, ECARD_RES_MEMC,
-				PODSLOT_MEMC_BASE + (slot << 14),
-				PODSLOT_MEMC_SIZE);
-		base = PODSLOT_IOC0_BASE + (slot << 14);
-	} else
-		base = PODSLOT_IOC4_BASE + ((slot - 4) << 14);
-
-#ifdef CONFIG_ARCH_RPC
-	if (slot < 8) {
-		ec_set_resource(ec, ECARD_RES_EASI,
-				PODSLOT_EASI_BASE + (slot << 24),
-				PODSLOT_EASI_SIZE);
-	}
-
-	if (slot == 8) {
-		ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, NETSLOT_SIZE);
-	} else
-#endif
-
-	for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++)
-		ec_set_resource(ec, i + ECARD_RES_IOCSLOW,
-				base + (i << 19), PODSLOT_IOC_SIZE);
-
-	for (i = 0; i < ECARD_NUM_RESOURCES; i++) {
-		if (ec->resource[i].flags &&
-		    request_resource(&iomem_resource, &ec->resource[i])) {
-			dev_err(&ec->dev, "resource(s) not available\n");
-			ec->resource[i].end -= ec->resource[i].start;
-			ec->resource[i].start = 0;
-			ec->resource[i].flags = 0;
-		}
-	}
-
- nomem:
-	return ec;
-}
-
-static ssize_t irq_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	return sprintf(buf, "%u\n", ec->irq);
-}
-static DEVICE_ATTR_RO(irq);
-
-static ssize_t dma_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	return sprintf(buf, "%u\n", ec->dma);
-}
-static DEVICE_ATTR_RO(dma);
-
-static ssize_t resource_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	char *str = buf;
-	int i;
-
-	for (i = 0; i < ECARD_NUM_RESOURCES; i++)
-		str += sprintf(str, "%08x %08x %08lx\n",
-				ec->resource[i].start,
-				ec->resource[i].end,
-				ec->resource[i].flags);
-
-	return str - buf;
-}
-static DEVICE_ATTR_RO(resource);
-
-static ssize_t vendor_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	return sprintf(buf, "%u\n", ec->cid.manufacturer);
-}
-static DEVICE_ATTR_RO(vendor);
-
-static ssize_t device_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	return sprintf(buf, "%u\n", ec->cid.product);
-}
-static DEVICE_ATTR_RO(device);
-
-static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	return sprintf(buf, "%s\n", ec->easi ? "EASI" : "IOC");
-}
-static DEVICE_ATTR_RO(type);
-
-static struct attribute *ecard_dev_attrs[] = {
-	&dev_attr_device.attr,
-	&dev_attr_dma.attr,
-	&dev_attr_irq.attr,
-	&dev_attr_resource.attr,
-	&dev_attr_type.attr,
-	&dev_attr_vendor.attr,
-	NULL,
-};
-ATTRIBUTE_GROUPS(ecard_dev);
-
-int ecard_request_resources(struct expansion_card *ec)
-{
-	int i, err = 0;
-
-	for (i = 0; i < ECARD_NUM_RESOURCES; i++) {
-		if (ecard_resource_end(ec, i) &&
-		    !request_mem_region(ecard_resource_start(ec, i),
-					ecard_resource_len(ec, i),
-					ec->dev.driver->name)) {
-			err = -EBUSY;
-			break;
-		}
-	}
-
-	if (err) {
-		while (i--)
-			if (ecard_resource_end(ec, i))
-				release_mem_region(ecard_resource_start(ec, i),
-						   ecard_resource_len(ec, i));
-	}
-	return err;
-}
-EXPORT_SYMBOL(ecard_request_resources);
-
-void ecard_release_resources(struct expansion_card *ec)
-{
-	int i;
-
-	for (i = 0; i < ECARD_NUM_RESOURCES; i++)
-		if (ecard_resource_end(ec, i))
-			release_mem_region(ecard_resource_start(ec, i),
-					   ecard_resource_len(ec, i));
-}
-EXPORT_SYMBOL(ecard_release_resources);
-
-void ecard_setirq(struct expansion_card *ec, const struct expansion_card_ops *ops, void *irq_data)
-{
-	ec->irq_data = irq_data;
-	barrier();
-	ec->ops = ops;
-}
-EXPORT_SYMBOL(ecard_setirq);
-
-void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
-			   unsigned long offset, unsigned long maxsize)
-{
-	unsigned long start = ecard_resource_start(ec, res);
-	unsigned long end = ecard_resource_end(ec, res);
-
-	if (offset > (end - start))
-		return NULL;
-
-	start += offset;
-	if (maxsize && end - start > maxsize)
-		end = start + maxsize;
-	
-	return devm_ioremap(&ec->dev, start, end - start);
-}
-EXPORT_SYMBOL(ecardm_iomap);
-
-static void atomwide_3p_quirk(ecard_t *ec)
-{
-	void __iomem *addr = __ecard_address(ec, ECARD_IOC, ECARD_SYNC);
-	unsigned int i;
-
-	/* Disable interrupts on each port */
-	for (i = 0x2000; i <= 0x2800; i += 0x0400)
-		writeb(0, addr + i + 4);	
-}
-
-/*
- * Probe for an expansion card.
- *
- * If bit 1 of the first byte of the card is set, then the
- * card does not exist.
- */
-static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
-{
-	ecard_t **ecp;
-	ecard_t *ec;
-	struct ex_ecid cid;
-	void __iomem *addr;
-	int i, rc;
-
-	ec = ecard_alloc_card(type, slot);
-	if (IS_ERR(ec)) {
-		rc = PTR_ERR(ec);
-		goto nomem;
-	}
-
-	rc = -ENODEV;
-	if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL)
-		goto nodev;
-
-	cid.r_zero = 1;
-	ecard_readbytes(&cid, ec, 0, 16, 0);
-	if (cid.r_zero)
-		goto nodev;
-
-	ec->cid.id	= cid.r_id;
-	ec->cid.cd	= cid.r_cd;
-	ec->cid.is	= cid.r_is;
-	ec->cid.w	= cid.r_w;
-	ec->cid.manufacturer = ecard_getu16(cid.r_manu);
-	ec->cid.product = ecard_getu16(cid.r_prod);
-	ec->cid.country = cid.r_country;
-	ec->cid.irqmask = cid.r_irqmask;
-	ec->cid.irqoff  = ecard_gets24(cid.r_irqoff);
-	ec->cid.fiqmask = cid.r_fiqmask;
-	ec->cid.fiqoff  = ecard_gets24(cid.r_fiqoff);
-	ec->fiqaddr	=
-	ec->irqaddr	= addr;
-
-	if (ec->cid.is) {
-		ec->irqmask = ec->cid.irqmask;
-		ec->irqaddr += ec->cid.irqoff;
-		ec->fiqmask = ec->cid.fiqmask;
-		ec->fiqaddr += ec->cid.fiqoff;
-	} else {
-		ec->irqmask = 1;
-		ec->fiqmask = 4;
-	}
-
-	for (i = 0; i < ARRAY_SIZE(quirklist); i++)
-		if (quirklist[i].manufacturer == ec->cid.manufacturer &&
-		    quirklist[i].product == ec->cid.product) {
-			if (quirklist[i].type)
-				ec->card_desc = quirklist[i].type;
-			if (quirklist[i].init)
-				quirklist[i].init(ec);
-			break;
-		}
-
-	ec->irq = irq;
-
-	/*
-	 * hook the interrupt handlers
-	 */
-	if (slot < 8) {
-		irq_set_chip_and_handler(ec->irq, &ecard_chip,
-					 handle_level_irq);
-		irq_set_chip_data(ec->irq, ec);
-		irq_clear_status_flags(ec->irq, IRQ_NOREQUEST);
-	}
-
-#ifdef CONFIG_ARCH_RPC
-	/* On RiscPC, only first two slots have DMA capability */
-	if (slot < 2)
-		ec->dma = 2 + slot;
-#endif
-
-	for (ecp = &cards; *ecp; ecp = &(*ecp)->next);
-
-	*ecp = ec;
-	slot_to_expcard[slot] = ec;
-
-	rc = device_register(&ec->dev);
-	if (rc)
-		goto nodev;
-
-	return 0;
-
- nodev:
-	ecard_free_card(ec);
- nomem:
-	return rc;
-}
-
-/*
- * Initialise the expansion card system.
- * Locate all hardware - interrupt management and
- * actual cards.
- */
-static int __init ecard_init(void)
-{
-	struct task_struct *task;
-	int slot, irqbase;
-
-	irqbase = irq_alloc_descs(-1, 0, 8, -1);
-	if (irqbase < 0)
-		return irqbase;
-
-	task = kthread_run(ecard_task, NULL, "kecardd");
-	if (IS_ERR(task)) {
-		printk(KERN_ERR "Ecard: unable to create kernel thread: %ld\n",
-		       PTR_ERR(task));
-		irq_free_descs(irqbase, 8);
-		return PTR_ERR(task);
-	}
-
-	printk("Probing expansion cards\n");
-
-	for (slot = 0; slot < 8; slot ++) {
-		if (ecard_probe(slot, irqbase + slot, ECARD_EASI) == -ENODEV)
-			ecard_probe(slot, irqbase + slot, ECARD_IOC);
-	}
-
-	ecard_probe(8, 11, ECARD_IOC);
-
-	irq_set_chained_handler(IRQ_EXPANSIONCARD, ecard_irq_handler);
-
-	ecard_proc_init();
-
-	return 0;
-}
-
-subsys_initcall(ecard_init);
-
-/*
- *	ECARD "bus"
- */
-static const struct ecard_id *
-ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec)
-{
-	int i;
-
-	for (i = 0; ids[i].manufacturer != 65535; i++)
-		if (ec->cid.manufacturer == ids[i].manufacturer &&
-		    ec->cid.product == ids[i].product)
-			return ids + i;
-
-	return NULL;
-}
-
-static int ecard_drv_probe(struct device *dev)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	struct ecard_driver *drv = ECARD_DRV(dev->driver);
-	const struct ecard_id *id;
-	int ret;
-
-	id = ecard_match_device(drv->id_table, ec);
-
-	ec->claimed = 1;
-	ret = drv->probe(ec, id);
-	if (ret)
-		ec->claimed = 0;
-	return ret;
-}
-
-static void ecard_drv_remove(struct device *dev)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	struct ecard_driver *drv = ECARD_DRV(dev->driver);
-
-	drv->remove(ec);
-	ec->claimed = 0;
-
-	/*
-	 * Restore the default operations.  We ensure that the
-	 * ops are set before we change the data.
-	 */
-	ec->ops = &ecard_default_ops;
-	barrier();
-	ec->irq_data = NULL;
-}
-
-/*
- * Before rebooting, we must make sure that the expansion card is in a
- * sensible state, so it can be re-detected.  This means that the first
- * page of the ROM must be visible.  We call the expansion cards reset
- * handler, if any.
- */
-static void ecard_drv_shutdown(struct device *dev)
-{
-	struct expansion_card *ec = ECARD_DEV(dev);
-	struct ecard_driver *drv = ECARD_DRV(dev->driver);
-	struct ecard_request req;
-
-	if (dev->driver) {
-		if (drv->shutdown)
-			drv->shutdown(ec);
-		ec->claimed = 0;
-	}
-
-	/*
-	 * If this card has a loader, call the reset handler.
-	 */
-	if (ec->loader) {
-		req.fn = ecard_task_reset;
-		req.ec = ec;
-		ecard_call(&req);
-	}
-}
-
-int ecard_register_driver(struct ecard_driver *drv)
-{
-	drv->drv.bus = &ecard_bus_type;
-
-	return driver_register(&drv->drv);
-}
-
-void ecard_remove_driver(struct ecard_driver *drv)
-{
-	driver_unregister(&drv->drv);
-}
-
-static int ecard_match(struct device *_dev, const struct device_driver *_drv)
-{
-	struct expansion_card *ec = ECARD_DEV(_dev);
-	struct ecard_driver *drv = ECARD_DRV(_drv);
-	int ret;
-
-	if (drv->id_table) {
-		ret = ecard_match_device(drv->id_table, ec) != NULL;
-	} else {
-		ret = ec->cid.id == drv->id;
-	}
-
-	return ret;
-}
-
-const struct bus_type ecard_bus_type = {
-	.name		= "ecard",
-	.dev_groups	= ecard_dev_groups,
-	.match		= ecard_match,
-	.probe		= ecard_drv_probe,
-	.remove		= ecard_drv_remove,
-	.shutdown	= ecard_drv_shutdown,
-};
-
-static int ecard_bus_init(void)
-{
-	return bus_register(&ecard_bus_type);
-}
-
-postcore_initcall(ecard_bus_init);
-
-EXPORT_SYMBOL(ecard_readchunk);
-EXPORT_SYMBOL(ecard_register_driver);
-EXPORT_SYMBOL(ecard_remove_driver);
-EXPORT_SYMBOL(ecard_bus_type);
arch/arm/mach-rpc/ecard.h deleted +0 -66
deleted file mode 100644
index 873dd3d9f274..000000000000
@@ -1,66 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  ecard.h
- *
- *  Copyright 2007 Russell King
- */
-
-/* Definitions internal to ecard.c - for it's use only!!
- *
- * External expansion card header as read from the card
- */
-struct ex_ecid {
-	unsigned char	r_irq:1;
-	unsigned char	r_zero:1;
-	unsigned char	r_fiq:1;
-	unsigned char	r_id:4;
-	unsigned char	r_a:1;
-
-	unsigned char	r_cd:1;
-	unsigned char	r_is:1;
-	unsigned char	r_w:2;
-	unsigned char	r_r1:4;
-
-	unsigned char	r_r2:8;
-
-	unsigned char	r_prod[2];
-
-	unsigned char	r_manu[2];
-
-	unsigned char	r_country;
-
-	unsigned char	r_fiqmask;
-	unsigned char	r_fiqoff[3];
-
-	unsigned char	r_irqmask;
-	unsigned char	r_irqoff[3];
-};
-
-/*
- * Chunk directory entry as read from the card
- */
-struct ex_chunk_dir {
-	unsigned char r_id;
-	unsigned char r_len[3];
-	unsigned long r_start;
-	union {
-		char string[256];
-		char data[1];
-	} d;
-#define c_id(x)		((x)->r_id)
-#define c_len(x)	((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
-#define c_start(x)	((x)->r_start)
-};
-
-typedef enum ecard_type {		/* Cards address space		*/
-	ECARD_IOC,
-	ECARD_MEMC,
-	ECARD_EASI
-} card_type_t;
-
-typedef enum {				/* Speed for ECARD_IOC space	*/
-	ECARD_SLOW	 = 0,
-	ECARD_MEDIUM	 = 1,
-	ECARD_FAST	 = 2,
-	ECARD_SYNC	 = 3
-} card_speed_t;
arch/arm/mach-rpc/fiq.S deleted +0 -18
deleted file mode 100644
index 087bdf4bc093..000000000000
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <mach/hardware.h>
-
-	.equ	ioc_base_high, IOC_BASE & 0xff000000
-	.equ	ioc_base_low, IOC_BASE & 0x00ff0000
-
-	.text
-	.global	rpc_default_fiq_end
-ENTRY(rpc_default_fiq_start)
-	mov	r12, #ioc_base_high
-	.if	ioc_base_low
-	orr	r12, r12, #ioc_base_low
-	.endif
-	strb	r12, [r12, #0x38]	@ Disable FIQ register
-	subs	pc, lr, #4
-rpc_default_fiq_end:
arch/arm/mach-rpc/floppydma.S deleted +0 -29
deleted file mode 100644
index 6698b83050dc..000000000000
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  linux/arch/arm/lib/floppydma.S
- *
- *  Copyright (C) 1995, 1996 Russell King
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-		.text
-
-		.global	floppy_fiqin_end
-ENTRY(floppy_fiqin_start)
-		subs	r9, r9, #1
-		ldrbgt	r12, [r11, #-4]
-		ldrble	r12, [r11], #0
-		strb	r12, [r10], #1
-		subs	pc, lr, #4
-floppy_fiqin_end:
-
-		.global	floppy_fiqout_end
-ENTRY(floppy_fiqout_start)
-		subs	r9, r9, #1
-		ldrbge	r12, [r10], #1
-		movlt	r12, #0
-		strble	r12, [r11], #0
-		subsle	pc, lr, #4
-		strb	r12, [r11, #-4]
-		subs	pc, lr, #4
-floppy_fiqout_end:
arch/arm/mach-rpc/include/mach/acornfb.h deleted +0 -137
deleted file mode 100644
index 2bf18ab3d699..000000000000
@@ -1,137 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-rpc/include/mach/acornfb.h
- *
- *  Copyright (C) 1999 Russell King
- *
- *  AcornFB architecture specific code
- */
-
-#define acornfb_bandwidth(var) ((var)->pixclock * 8 / (var)->bits_per_pixel)
-
-static inline int
-acornfb_valid_pixrate(struct fb_var_screeninfo *var)
-{
-	u_long limit;
-
-	if (!var->pixclock)
-		return 0;
-
-	/*
-	 * Limits below are taken from RISC OS bandwidthlimit file
-	 */
-	if (current_par.using_vram) {
-		if (current_par.vram_half_sam == 2048)
-			limit = 6578;
-		else
-			limit = 13157;
-	} else {
-		limit = 26315;
-	}
-
-	return acornfb_bandwidth(var) >= limit;
-}
-
-/*
- * Try to find the best PLL parameters for the pixel clock.
- * This algorithm seems to give best predictable results,
- * and produces the same values as detailed in the VIDC20
- * data sheet.
- */
-static inline u_int
-acornfb_vidc20_find_pll(u_int pixclk)
-{
-	u_int r, best_r = 2, best_v = 2;
-	int best_d = 0x7fffffff;
-
-	for (r = 2; r <= 32; r++) {
-		u_int rr, v, p;
-		int d;
-
-		rr = 41667 * r;
-
-		v = (rr + pixclk / 2) / pixclk;
-
-		if (v > 32 || v < 2)
-			continue;
-
-		p = (rr + v / 2) / v;
-
-		d = pixclk - p;
-
-		if (d < 0)
-			d = -d;
-
-		if (d < best_d) {
-			best_d = d;
-			best_v = v - 1;
-			best_r = r - 1;
-		}
-
-		if (d == 0)
-			break;
-	}
-
-	return best_v << 8 | best_r;
-}
-
-static inline void
-acornfb_vidc20_find_rates(struct vidc_timing *vidc,
-			  struct fb_var_screeninfo *var)
-{
-	u_int div;
-
-	/* Select pixel-clock divisor to keep PLL in range */
-	div = var->pixclock / 9090; /*9921*/
-
-	/* Limit divisor */
-	if (div == 0)
-		div = 1;
-	if (div > 8)
-		div = 8;
-
-	/* Encode divisor to VIDC20 setting */
-	switch (div) {
-	case 1:	vidc->control |= VIDC20_CTRL_PIX_CK;  break;
-	case 2:	vidc->control |= VIDC20_CTRL_PIX_CK2; break;
-	case 3:	vidc->control |= VIDC20_CTRL_PIX_CK3; break;
-	case 4:	vidc->control |= VIDC20_CTRL_PIX_CK4; break;
-	case 5:	vidc->control |= VIDC20_CTRL_PIX_CK5; break;
-	case 6:	vidc->control |= VIDC20_CTRL_PIX_CK6; break;
-	case 7:	vidc->control |= VIDC20_CTRL_PIX_CK7; break;
-	case 8: vidc->control |= VIDC20_CTRL_PIX_CK8; break;
-	}
-
-	/*
-	 * With VRAM, the FIFO can be set to the highest possible setting
-	 * because there are no latency considerations for other memory
-	 * accesses. However, in 64 bit bus mode the FIFO preload value
-	 * must not be set to VIDC20_CTRL_FIFO_28 because this will let
-	 * the FIFO overflow. See VIDC20 manual page 33 (6.0 Setting the
-	 * FIFO preload value).
-	 */
-	if (current_par.using_vram) {
-		if (current_par.vram_half_sam == 2048)
-			vidc->control |= VIDC20_CTRL_FIFO_24;
-		else
-			vidc->control |= VIDC20_CTRL_FIFO_28;
-	} else {
-		unsigned long bandwidth = acornfb_bandwidth(var);
-
-		/* Encode bandwidth as VIDC20 setting */
-		if (bandwidth > 33334)		/* < 30.0MB/s */
-			vidc->control |= VIDC20_CTRL_FIFO_16;
-		else if (bandwidth > 26666)	/* < 37.5MB/s */
-			vidc->control |= VIDC20_CTRL_FIFO_20;
-		else if (bandwidth > 22222)	/* < 45.0MB/s */
-			vidc->control |= VIDC20_CTRL_FIFO_24;
-		else				/* > 45.0MB/s */
-			vidc->control |= VIDC20_CTRL_FIFO_28;
-	}
-
-	/* Find the PLL values */
-	vidc->pll_ctl = acornfb_vidc20_find_pll(var->pixclock / div);
-}
-
-#define acornfb_default_control()	(VIDC20_CTRL_PIX_VCLK)
-#define acornfb_default_econtrol()	(VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3))
arch/arm/mach-rpc/include/mach/hardware.h deleted +0 -73
deleted file mode 100644
index 6f197706f979..000000000000
@@ -1,73 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-rpc/include/mach/hardware.h
- *
- *  Copyright (C) 1996-1999 Russell King.
- *
- *  This file contains the hardware definitions of the RiscPC series machines.
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#include <mach/memory.h>
-
-/*
- * What hardware must be present
- */
-#define HAS_IOMD
-#define HAS_VIDC20
-
-/* Hardware addresses of major areas.
- *  *_START is the physical address
- *  *_SIZE  is the size of the region
- *  *_BASE  is the virtual address
- */
-#define RPC_RAM_SIZE		0x10000000
-#define RPC_RAM_START		0x10000000
-
-#define EASI_SIZE		0x08000000	/* EASI I/O */
-#define EASI_START		0x08000000
-#define EASI_BASE		IOMEM(0xe5000000)
-
-#define IO_START		0x03000000	/* I/O */
-#define IO_SIZE			0x01000000
-#define IO_BASE			IOMEM(0xe0000000)
-
-#define SCREEN_START		0x02000000	/* VRAM */
-#define SCREEN_END		0xdfc00000
-#define SCREEN_BASE		0xdf800000
-
-#define UNCACHEABLE_ADDR	(FLUSH_BASE + 0x10000)
-
-/*
- * IO Addresses
- */
-#define ECARD_EASI_BASE		(EASI_BASE)
-#define VIDC_BASE		(IO_BASE + 0x00400000)
-#define EXPMASK_BASE		(IO_BASE + 0x00360000)
-#define ECARD_IOC4_BASE		(IO_BASE + 0x00270000)
-#define ECARD_IOC_BASE		(IO_BASE + 0x00240000)
-#define IOMD_BASE		(IO_BASE + 0x00200000)
-#define IOC_BASE		(IO_BASE + 0x00200000)
-#define ECARD_MEMC8_BASE	(IO_BASE + 0x0002b000)
-#define FLOPPYDMA_BASE		(IO_BASE + 0x0002a000)
-#define PCIO_BASE		(IO_BASE + 0x00010000)
-#define ECARD_MEMC_BASE		(IO_BASE + 0x00000000)
-
-#define vidc_writel(val)	__raw_writel(val, VIDC_BASE)
-
-#define NETSLOT_BASE		0x0302b000
-#define NETSLOT_SIZE		0x00001000
-
-#define PODSLOT_IOC0_BASE	0x03240000
-#define PODSLOT_IOC4_BASE	0x03270000
-#define PODSLOT_IOC_SIZE	(1 << 14)
-#define PODSLOT_MEMC_BASE	0x03000000
-#define PODSLOT_MEMC_SIZE	(1 << 14)
-#define PODSLOT_EASI_BASE	0x08000000
-#define PODSLOT_EASI_SIZE	(1 << 24)
-
-#define	EXPMASK_STATUS		(EXPMASK_BASE + 0x00)
-#define EXPMASK_ENABLE		(EXPMASK_BASE + 0x04)
-
-#endif
arch/arm/mach-rpc/include/mach/io.h deleted +0 -28
deleted file mode 100644
index 8a8f28406691..000000000000
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-rpc/include/mach/io.h
- *
- *  Copyright (C) 1997 Russell King
- *
- * Modifications:
- *  06-Dec-1997	RMK	Created.
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#include <mach/hardware.h>
-
-#define IO_SPACE_LIMIT 0xffff
-
-/*
- * We need PC style IO addressing for:
- *  - floppy (at 0x3f2,0x3f4,0x3f5,0x3f7)
- *  - parport (at 0x278-0x27a, 0x27b-0x27f, 0x778-0x77a)
- *  - 8250 serial (only for compile)
- *
- * These peripherals are found in an area of MMIO which looks very much
- * like an ISA bus, but with registers at the low byte of each word.
- */
-#define __io(a)		(PCIO_BASE + ((a) << 2))
-
-#endif
arch/arm/mach-rpc/include/mach/irqs.h deleted +0 -42
deleted file mode 100644
index 0c3428fd9729..000000000000
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-rpc/include/mach/irqs.h
- *
- *  Copyright (C) 1996 Russell King
- */
-
-#define IRQ_PRINTER		0
-#define IRQ_BATLOW		1
-#define IRQ_FLOPPYINDEX		2
-#define IRQ_VSYNCPULSE		3
-#define IRQ_POWERON		4
-#define IRQ_TIMER0		5
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/include/mach/isa-dma.h deleted +0 -26
deleted file mode 100644
index d9c3af1ef718..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/include/mach/memory.h deleted +0 -32
deleted file mode 100644
index a586eb31b18d..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/include/mach/uncompress.h deleted +0 -181
deleted file mode 100644
index 1fbe7eb956fd..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/io-acorn.S deleted +0 -28
deleted file mode 100644
index aa9bf0d771c0..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/irq.c deleted +0 -226
deleted file mode 100644
index dc29384b6ef8..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/riscpc.c deleted +0 -225
deleted file mode 100644
index f70fb9c4b0cb..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-rpc/time.c deleted +0 -97
deleted file mode 100644
index 9f8edcfe9357..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mm/mmu.c +1 -1
index 350f6dcc24cc..07c2fda4d422 100644

Lines of this file are not shown. View the raw message.

block/partitions/Kconfig +0 -7
index ce17e41451af..94e7df547e7a 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/keyboard.c +1 -1
index c41d850b29c6..9770c83aea74 100644

Lines of this file are not shown. View the raw message.

lib/fonts/font_acorn_8x8.c +0 -4
index 4ff52c79f8c4..ec2b1e463ab9 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)

Part of the diff is not shown here. View the raw message.

#19 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

The Acorn Risc PC is the oldest still support Arm machine in the kernel, originally shipped with an ARMv3 ARM610 support in 1994, it later allowed faster StrongARM CPUs.

The main limitation here is the CPU bus that does not allow 16-bit wide data transfers and hence requires the kernel to be built with the -march=armv3 compiler option that was discontinued in gcc-9.

As gcc-8 is barely supported for compiling the kernel, this one will not see another LTS kernel release, so remove it now.

If this patch has to be reposted, here is the feedback of my AI coding
assistant (based on an LLM and hence may be wrong):
----------------------------------------------------------------------
Overview
--------
This patch removes the Acorn RiscPC platform (ARCH_RPC), the oldest 32-bit ARM machine supported in mainline Linux (originally ARMv3 ARM610, later StrongARM SA-110). Because RiscPC hardware requires -march=armv3 (discontinued in GCC 9) due to bus limitations, deprecating and removing it paves the way to clean out legacy ARMv3 support from the kernel.

Removing RiscPC also represents a major architectural milestone for arch/arm: with SA-1100 (patch 1), Footbridge (patch 2), and RiscPC (patch 3) removed, COMMON_CLK, SPARSE_IRQ, and USE_OF (Device Tree) become unconditionally selected for all 32-bit ARM targets, and legacy headers mach/io.h and mach/memory.h are eliminated.

Overall, this is a very welcome cleanup, but there are a few missed references, orphaned symbols, and stale comments that should be addressed.

Issues & Observations
---------------------
1. Missed arch/arm/Makefile cleanup
Patch 03 deletes the entire directory arch/arm/mach-rpc/, but does not touch arch/arm/Makefile. As a result, two orphaned entries remain:

makefile

machine-$(CONFIG_ARCH_RPC) += rpc
machdirs-$(CONFIG_ARCH_RPC) += arch/arm/mach-rpc
Furthermore, machdirs-$(CONFIG_ARCH_RPC) was the very last user of machdirs- in arch/arm/Makefile (after Footbridge and SA-1100 are removed in patches 1 & 2):

makefile

# legacy platforms provide their own mach/*.h headers globally,
# these three are mutually exclusive
machdirs-$(CONFIG_ARCH_FOOTBRIDGE)	+= arch/arm/mach-footbridge
machdirs-$(CONFIG_ARCH_RPC)		+= arch/arm/mach-rpc
machdirs-$(CONFIG_ARCH_SA1100)		+= arch/arm/mach-sa1100
KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%/include,$(machdirs-y))
Once RiscPC is gone, the entire machdirs- inclusion block can and should be removed from arch/arm/Makefile.

2. Missed ARCH_ACORN reference in lib/fonts/Kconfig
The patch deletes config ARCH_ACORN from arch/arm/Kconfig and removes #ifdef CONFIG_ARCH_ACORN from lib/fonts/font_acorn_8x8.c
, but missed
lib/fonts/Kconfig:74
:

kconfig

config FONT_ACORN_8x8

	bool "Acorn console 8x8 font" if FONTS
	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
	default y if !SPARC && !FONTS && ARM && ARCH_ACORN

Because ARCH_ACORN is removed, this default can never trigger and the reference should be cleaned up.

3. Orphaned ARCH_RPC reference in arch/arm/mm/Kconfig In
arch/arm/mm/Kconfig:281-282
:

kconfig

config CPU_SA110
bool
select CPU_32v3 if ARCH_RPC
select CPU_32v4 if !ARCH_RPC
Since ARCH_RPC is removed, select CPU_32v3 if ARCH_RPC references a non-existent symbol. If CPU_SA110 remains temporarily (before the architectural cleanup in 7.5), this should be simplified to select CPU_32v4.

4. Dead code in arch/arm/kernel/atags_compat.c
With CONFIG_ARCH_ACORN removed from arch/arm/Kconfig, two blocks in arch/arm/kernel/atags_compat.c
are now dead code:

Lines 150–157: #ifdef CONFIG_ARCH_ACORN / if (machine_is_riscpc()) memory bank tagging. Lines 186–194: #ifdef CONFIG_ARCH_ACORN ATAG_ACORN translation.
These blocks should be removed as part of this patch.

5. Stale comments
arch/arm/include/asm/io.h:207-209
:
c

/*
* Now, pick up the machine-defined IO definitions
*/
#if IS_ENABLED(CONFIG_PCMCIA) || defined(CONFIG_PCI)
CONFIG_NEED_MACH_IO_H and #include <mach/io.h> were removed, leaving this comment describing generic PCI/PCMCIA I/O limits. arch/arm/boot/bootp/Makefile:21
: # guess an initrd location if possible is left dangling right before ifdef INITRD_OFFSET after all initrd_offset-$(CONFIG_...) logic has been stripped out.
6. Floppy driver & arch/arm/include/asm/floppy.h status
The patch removes the ARM MFM AND FLOPPY DRIVERS entry from MAINTAINERS:

diff

-ARM MFM AND FLOPPY DRIVERS
-M: Ian Molton <[email protected]>
-S: Maintained
-F: arch/arm/include/asm/floppy.h
-F: arch/arm/mach-rpc/floppydma.S
While
floppydma.S
was deleted,
arch/arm/include/asm/floppy.h
was left in the tree.

On ARM, floppy support requires ARCH_MAY_HAVE_PC_FDC, which was selected only by Footbridge and RiscPC.
With both gone, no ARM board selects ARCH_MAY_HAVE_PC_FDC.
Furthermore, asm/floppy.h references IRQ_FLOPPYDISK and DMA_FLOPPY, which no longer exist on ARM.
Either
arch/arm/include/asm/floppy.h
and config ARCH_MAY_HAVE_PC_FDC in arch/arm/Kconfig should be deleted
in this patch, or noted if intentionally deferred to the 7.5 driver cleanup.
7. Good changes & verification
block/partitions/Kconfig: Dropping default y if ARCH_ACORN while keeping ACORN_PARTITION available under PARTITION_ADVANCED is correct; users can still inspect/mount Acorn media on modern architectures. drivers/tty/vt/keyboard.c: Clean removal of !defined(CONFIG_ARCH_RPC) from the raw keyboard scan handler.
Elimination of NEED_MACH_IO_H and NEED_MACH_MEMORY_H: Very clean removal across arch/arm/Kconfig, arch/arm/include/asm/io.h, arch/arm/include/asm/memory.h, and arch/arm/mm/mmu.c. Minor Typo in Commit Message
text

The Acorn Risc PC is the oldest still support Arm machine in the kernel, originally shipped with an ARMv3 ARM610 support in 1994, it later allowed faster StrongARM CPUs.
"oldest still support Arm machine" -> "oldest still supported Arm machine" "with an ARMv3 ARM610 support" -> "with ARMv3 ARM610 support" or "with an ARMv3 ARM610 CPU"

#20 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 9 lines · Bart Van Assche
Quoted 8 lines · Arnd Bergmann

The Acorn Risc PC is the oldest still support Arm machine in the kernel, originally shipped with an ARMv3 ARM610 support in 1994, it later allowed faster StrongARM CPUs.

The main limitation here is the CPU bus that does not allow 16-bit wide data transfers and hence requires the kernel to be built with the -march=armv3 compiler option that was discontinued in gcc-9.

Quoted 5 lines
Quoted 2 lines

As gcc-8 is barely supported for compiling the kernel, this one will not see another LTS kernel release, so remove it now.

If this patch has to be reposted, here is the feedback of my AI coding assistant (based on an LLM and hence may be wrong):

Most of this was already discussed, but there are two additional changes that I made based on it.

Quoted 11 lines

Issues & Observations
---------------------
1. Missed arch/arm/Makefile cleanup
Patch 03 deletes the entire directory arch/arm/mach-rpc/, but does not touch arch/arm/Makefile. As a result, two orphaned entries remain:

machine-$(CONFIG_ARCH_RPC) += rpc
machdirs-$(CONFIG_ARCH_RPC) += arch/arm/mach-rpc
Furthermore, machdirs-$(CONFIG_ARCH_RPC) was the very last user of machdirs- in arch/arm/Makefile (after Footbridge and SA-1100 are removed in patches 1 & 2):

Fixed already after sashiko-bot found the same thing.

Quoted 9 lines

kconfig

config FONT_ACORN_8x8

	bool "Acorn console 8x8 font" if FONTS
	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
	default y if !SPARC && !FONTS && ARM && ARCH_ACORN

Because ARCH_ACORN is removed, this default can never trigger and the reference should be cleaned up.

I have this in the patch that removes acornfb. It could go into either one, but I felt it fits better there

Quoted 10 lines

kconfig

config CPU_SA110
bool
select CPU_32v3 if ARCH_RPC
select CPU_32v4 if !ARCH_RPC
Since ARCH_RPC is removed, select CPU_32v3 if ARCH_RPC references a non-existent symbol. If CPU_SA110 remains temporarily (before the architectural cleanup in 7.5), this should be simplified to select CPU_32v4.

Also explained already that I preferred removing CPU_32v3 along with CPU_SA110 in a later patch, not together with ARCH_RPC.

Quoted 9 lines

4. Dead code in arch/arm/kernel/atags_compat.c
With CONFIG_ARCH_ACORN removed from arch/arm/Kconfig, two blocks in arch/arm/kernel/atags_compat.c
are now dead code:

Lines 150–157: #ifdef CONFIG_ARCH_ACORN / if (machine_is_riscpc()) memory bank tagging.
Lines 186–194: #ifdef CONFIG_ARCH_ACORN ATAG_ACORN translation. These blocks should be removed as part of this patch.

I have a patch to remove that file.

Quoted 7 lines

/*
* Now, pick up the machine-defined IO definitions
*/
#if IS_ENABLED(CONFIG_PCMCIA) || defined(CONFIG_PCI) CONFIG_NEED_MACH_IO_H and #include <mach/io.h> were removed, leaving this comment describing generic PCI/PCMCIA I/O limits.

Fixed now.

Quoted 4 lines

arch/arm/boot/bootp/Makefile:21
: # guess an initrd location if possible is left dangling right before ifdef INITRD_OFFSET after all initrd_offset-$(CONFIG_...) logic has been stripped out.

Removed that entire block now:

arch/arm/boot/bootp/Makefile +1 -7
@@ -17,12 +17,6 @@ add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
 #   INITRD_PHYS must be in RAM
 
 PARAMS_PHYS := $(call add_hex, $(PHYS_OFFSET), 0x100)
-
-# guess an initrd location if possible
-ifdef INITRD_OFFSET
-INITRD_PHYS := $(call add_hex, $(PHYS_OFFSET), $(INITRD_OFFSET))
-endif
-
 endif
 
 PHONY += initrd
@@ -30,7 +24,7 @@ initrd:
        @test "$(PARAMS_PHYS)" != "" || \
        (echo bootpImage: You must specify PHYS_OFFSET of PARAMS_PHYS ; exit -1)
        @test "$(INITRD_PHYS)" != "" || \
-       (echo bootpImage: You must specify INITRD_OFFSET or INITRD_PHYS ; exit -1)
+       (echo bootpImage: You must specify INITRD_PHYS ; exit -1)
        @test "$(INITRD)" != "" || \
        (echo bootpImage: You must specify INITRD; exit -1)
 
Quoted 2 lines

6. Floppy driver & arch/arm/include/asm/floppy.h status
The patch removes the ARM MFM AND FLOPPY DRIVERS entry from MAINTAINERS:

commented already that this is removed along with CONFIG_ISA in a later patch.

Arnd

#21 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

In reply to Arnd Bergmann

Hi, everyone,

Quoted 6 lines · Arnd Bergmann

The main limitation here is the CPU bus that does not allow 16-bit wide data transfers and hence requires the kernel to be built with the -march=armv3 compiler option that was discontinued in gcc-9.

As gcc-8 is barely supported for compiling the kernel, this one will not see another LTS kernel release, so remove it now.

Because I think it's cool that the kernel still supports actual Acorn hardware, I patched gcc 16.2 to restore ARMv3m support:
https://github.com/EthanNelson-Moore/gcc-arm-retro

This ended up being surprisingly straightforward - only a couple hundred lines changed - and it would be even fewer lines had I not reverted a commit that adds a use of ldrh instead of fixing it.

It is able to compile a kernel successfully (once you update the GCC version check to check for -march=armv3m support instead - I can send my patch). I haven't tested it, but I am fairly confident that it would run, because the assembler will reject code the compiler generates with unsupported instructions - this is how I found the commit I needed to revert.

I am working on a clocksource driver, which uses both timers (to hopefully fix the awful time drift), and removes the dependency on LEGACY_TIMER_TICK.

I also have patches for several cleanups to Risc PC-related code.

I am aware that this has no actual use case, but it was fun. No LLM was used for any part of the work.

Ethan

maintainer
#22 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 3 lines · Ethan Nelson-Moore

Because I think it's cool that the kernel still supports actual Acorn hardware, I patched gcc 16.2 to restore ARMv3m support:
https://github.com/EthanNelson-Moore/gcc-arm-retro

For the record: I also think this is cool.

One question: is ARMv3m there in Clang/LLVM? I only know that we have ARMv4t.

To the bigger question.

The community has a built in tension around this:

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

- One camp who get their paycheck from present day companies and constantly on top of the latest technology. As can be seen Qualcomm just taped out a brand new ARMv7 SoC named Kuno, for example.

As you can see this leads to a bit of tension.

What I'm after here is not one camp is doing the right thing and the other one is not, because that inevitably boils down to the question of what is the meaning of life. Or "what is fun" actually (Torvalds wrote a book named "just for fun") and either case could be argued to be quite fun, or meaningful.

Quoted 5 lines

I am working on a clocksource driver, which uses both timers (to hopefully fix the awful time drift), and removes the dependency on LEGACY_TIMER_TICK.

I also have patches for several cleanups to Risc PC-related code.

As SoC maintainers I think we want to hear about a plan to migrate RiscPC to device tree should it stay supported. And I do not think it is that hard to achieve with the right focus by the right people.

Actually testing it on actual hardware would be a further requirement, so we're not doing dreamscapes here.

I want to heat from Russell on this.

The ARM kernel started as a passionate project by him, on that very machine, and he should decide if we keep it going.

IIUC the Clang/LLVM compiler has essentially solved the compiler issue.

Quoted 2 lines

I am aware that this has no actual use case, but it was fun. No LLM was used for any part of the work.

My position is that using LLMs is good in many ways because when used right by the right people it allows us to keep a wider range of hardware supported.

Yours,
Linus Walleij

#23 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 11 lines · Linus Walleij

The community has a built in tension around this:

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

- One camp who get their paycheck from present day companies and constantly on top of the latest technology. As can be seen Qualcomm just taped out a brand new ARMv7 SoC named Kuno, for example.

As you can see this leads to a bit of tension.

That summary looks incomplete to me. Every time a kernel API is modified that is used by the RiscPC code, the RiscPC code has to be modified too. Removing the RiscPC code makes modifying kernel APIs easier. A recent
example is available here: "[PATCH v5] scsi: core: Drop
Scsi_Host.default_lock"
(https://lore.kernel.org/linux-scsi/[email protected]/).

Bart.

maintainer
#24 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 12 lines · Bart Van Assche
Quoted 10 lines · Linus Walleij

The community has a built in tension around this:

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

- One camp who get their paycheck from present day companies and constantly on top of the latest technology. As can be seen Qualcomm just taped out a brand new ARMv7 SoC named Kuno, for example.

Quoted 8 lines
Quoted 1 line

As you can see this leads to a bit of tension.

That summary looks incomplete to me. Every time a kernel API is modified that is used by the RiscPC code, the RiscPC code has to be modified too. Removing the RiscPC code makes modifying kernel APIs easier. A recent example is available here: "[PATCH v5] scsi: core: Drop Scsi_Host.default_lock"
(https://lore.kernel.org/linux-scsi/[email protected]/).

Yes that is development churn, but this is the same whether the hardware supported is old or brand new and doesn't really answer the question whether it is to be supported or not.

That line of reasoning will always require a supportive hypothesis such as:

- We don't want to support stuff that is old (deprecation and deletionist stance, I don't want to hear yesterdays news)

- We don't want to support stuff that has very few users (utilitarism, basically,
the biggest common good for the biggest number of people take precedence)

This is implicit in many statements people make about this. What entusiasts ask is a completely different question:

- Is this fun (for me/us), makes me feel good to work on etc.

NB: personally I don't take a clear stance here, I mostly want to break apart the argument and clarify what it is all about.

Yours,
Linus Walleij

#25 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 36 lines · Linus Walleij
Quoted 12 lines · Bart Van Assche
Quoted 10 lines · Linus Walleij

The community has a built in tension around this:

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

- One camp who get their paycheck from present day companies and constantly on top of the latest technology. As can be seen Qualcomm just taped out a brand new ARMv7 SoC named Kuno, for example.

Quoted 8 lines
Quoted 1 line

As you can see this leads to a bit of tension.

That summary looks incomplete to me. Every time a kernel API is modified that is used by the RiscPC code, the RiscPC code has to be modified too. Removing the RiscPC code makes modifying kernel APIs easier. A recent example is available here: "[PATCH v5] scsi: core: Drop Scsi_Host.default_lock"
(https://lore.kernel.org/linux-scsi/[email protected]/).

Yes that is development churn, but this is the same whether the hardware supported is old or brand new and doesn't really answer the question whether it is to be supported or not.

That line of reasoning will always require a supportive hypothesis such as:

- We don't want to support stuff that is old (deprecation and deletionist stance, I don't want to hear yesterdays news)

- We don't want to support stuff that has very few users (utilitarism, basically,
the biggest common good for the biggest number of people take precedence)

Quoted 7 lines

This is implicit in many statements people make about this. What entusiasts ask is a completely different question:

- Is this fun (for me/us), makes me feel good to work on etc.

NB: personally I don't take a clear stance here, I mostly want to break apart the argument and clarify what it is all about.

As the discussion is still ongoing, I'll skip this patch for v2 and anything that depends on it. There is obviously no rush here, but I'd like to get the settle on which platforms to remove for 7.4 soon in order to plan the driver removal for 7.5.

This is about 10% of the total size of my board-remove-7.3 branch, but that is mostly because of the oabi/nwfpe support and the scsi drivers.

Arnd

75e7f9f13efc ARM: remove riscpc
973b9263fc92 ARM: remove StrongARM CPU support 7d996576dfdb ARM: remove OABI support c345282c3031 ARM: remove nwfpe floating point emulation 8a752dcb48e6 ARM: remove ISA bus support 1c2ccc5c012a ARM: remove unnecessary CONFIG_USE_OF 6b22ba07131a ARM: remove deprecated params struct fdb4d531b027 Input: mouse: remove RiscPC mouse driver 67c968a3c911 Input: serio: remove RiscPC keyboard driver 76741210657f i2c: remove unused acorn driver dd66946baaa8 fbdev: remove unused acornfb driver 925c897547d9 net: i825xx: remove ether1 support 460e5bd08398 net: 8390: remove arm etherh support f3b06d87c991 net: seeq: remove ether3 support c0a14d208da6 scsi: remove unused arm/riscpc drivers 5f9f353d4555 serial: 8250: remove acorn driver

 Documentation/arch/arm/index.rst               |    3 -
 Documentation/arch/arm/nwfpe/index.rst         |   13 -
 Documentation/arch/arm/nwfpe/netwinder-fpe.rst |  162 --
 Documentation/arch/arm/nwfpe/notes.rst         |   32 -
 Documentation/arch/arm/nwfpe/nwfpe.rst         |   74 -
 Documentation/arch/arm/nwfpe/todo.rst          |   72 -
 Documentation/arch/arm/setup.rst               |  108 -
 Documentation/staging/magic-number.rst         |    2 -
 arch/arm/Kbuild                                |    3 -
 arch/arm/Kconfig                               |  133 +-
 arch/arm/Kconfig.debug                         |    4 +-
 arch/arm/Kconfig.platforms                     |    4 +-
 arch/arm/Makefile                              |    8 -
 arch/arm/boot/compressed/Makefile              |    3 -
 arch/arm/boot/compressed/head.S                |   14 -
 arch/arm/include/asm/cache.h                   |    4 +-
 arch/arm/include/asm/cmpxchg.h                 |   39 -
 arch/arm/include/asm/div64.h                   |   14 -
 arch/arm/include/asm/dma.h                     |  129 -
 arch/arm/include/asm/floppy.h                  |   81 -
 arch/arm/include/asm/glue-cache.h              |    8 -
 arch/arm/include/asm/glue-proc.h               |   18 -
 arch/arm/include/asm/io.h                      |   28 -
 arch/arm/include/asm/mach/dma.h                |   46 -
 arch/arm/include/asm/page.h                    |    8 -
 arch/arm/include/asm/setup.h                   |    3 -
 arch/arm/include/asm/syscall.h                 |   27 +-
 arch/arm/include/asm/unistd.h                  |   28 -
 arch/arm/include/uapi/asm/setup.h              |    3 -
 arch/arm/include/uapi/asm/unistd.h             |    5 -
 arch/arm/kernel/Makefile                       |    5 +-
 arch/arm/kernel/armksyms.c                     |    2 -
 arch/arm/kernel/atags.h                        |    2 -
 arch/arm/kernel/atags_compat.c                 |  214 --
 arch/arm/kernel/atags_parse.c                  |    8 -
 arch/arm/kernel/dma.c                          |  283 --
 arch/arm/kernel/entry-armv.S                   |    8 +-
 arch/arm/kernel/entry-common.S                 |  144 -
 arch/arm/kernel/isa.c                          |   50 -
 arch/arm/kernel/setup.c                        |   13 -
 arch/arm/kernel/sys_oabi-compat.c              |  514 ----
 arch/arm/lib/Makefile                          |    6 +-
 arch/arm/lib/io-readsw-armv3.S                 |  103 -
 arch/arm/lib/io-writesw-armv3.S                |  123 -
 arch/arm/lib/lib1funcs.S                       |    4 -
 arch/arm/lib/ucmpdi2.S                         |    5 -
 arch/arm/mach-davinci/Kconfig                  |    2 +-
 arch/arm/mach-mmp/Kconfig                      |    4 +-
 arch/arm/mach-omap2/Kconfig                    |    3 +-
 arch/arm/mm/Kconfig                            |   46 +-
 arch/arm/mm/Makefile                           |    4 -
 arch/arm/mm/cache-v4wb.S                       |  259 --
 arch/arm/mm/cache.c                            |   28 -
 arch/arm/mm/copypage-v4mc.c                    |  113 -
 arch/arm/mm/proc-sa110.S                       |  229 --
 arch/arm/mm/proc-sa1100.S                      |  277 --
 arch/arm/mm/proc.c                             |   40 -
 arch/arm/net/bpf_jit_32.c                      |    2 +-
 arch/arm/nwfpe/ARM-gcc.h                       |  121 -
 arch/arm/nwfpe/ChangeLog                       |   91 -
 arch/arm/nwfpe/Makefile                        |   19 -
 arch/arm/nwfpe/double_cpdo.c                   |  155 --
 arch/arm/nwfpe/entry.S                         |  190 --
 arch/arm/nwfpe/extended_cpdo.c                 |  142 -
 arch/arm/nwfpe/fpa11.c                         |  116 -
 arch/arm/nwfpe/fpa11.h                         |  109 -
 arch/arm/nwfpe/fpa11.inl                       |   51 -
 arch/arm/nwfpe/fpa11_cpdo.c                    |  125 -
 arch/arm/nwfpe/fpa11_cpdt.c                    |  395 ---
 arch/arm/nwfpe/fpa11_cprt.c                    |  361 ---
 arch/arm/nwfpe/fpmodule.c                      |  178 --
 arch/arm/nwfpe/fpmodule.h                      |   35 -
 arch/arm/nwfpe/fpmodule.inl                    |   74 -
 arch/arm/nwfpe/fpopcode.c                      |   51 -
 arch/arm/nwfpe/fpopcode.h                      |  469 ----
 arch/arm/nwfpe/fpsr.h                          |   96 -
 arch/arm/nwfpe/milieu.h                        |   48 -
 arch/arm/nwfpe/single_cpdo.c                   |  112 -
 arch/arm/nwfpe/softfloat-macros                |  754 ------
 arch/arm/nwfpe/softfloat-specialize            |  367 ---
 arch/arm/nwfpe/softfloat.c                     | 3435 ------------------------
 arch/arm/nwfpe/softfloat.h                     |  281 --
 arch/arm/tools/Makefile                        |    2 -
 arch/arm/tools/syscall.tbl                     |   69 +-
 drivers/hwtracing/coresight/Kconfig            |    2 +-
 drivers/i2c/busses/Kconfig                     |   10 -
 drivers/i2c/busses/Makefile                    |    1 -
 drivers/i2c/busses/i2c-acorn.c                 |   96 -
 drivers/input/mouse/Kconfig                    |   10 -
 drivers/input/mouse/Makefile                   |    1 -
 drivers/input/mouse/rpcmouse.c                 |  113 -
 drivers/input/serio/Kconfig                    |   11 -
 drivers/input/serio/Makefile                   |    1 -
 drivers/input/serio/rpckbd.c                   |  152 --
 drivers/net/ethernet/8390/Kconfig              |    8 -
 drivers/net/ethernet/8390/Makefile             |    1 -
 drivers/net/ethernet/8390/etherh.c             |  858 ------
 drivers/net/ethernet/i825xx/Kconfig            |    7 -
 drivers/net/ethernet/i825xx/Makefile           |    1 -
 drivers/net/ethernet/i825xx/ether1.c           | 1086 --------
 drivers/net/ethernet/i825xx/ether1.h           |  277 --
 drivers/net/ethernet/seeq/Kconfig              |    7 -
 drivers/net/ethernet/seeq/Makefile             |    1 -
 drivers/net/ethernet/seeq/ether3.c             |  898 -------
 drivers/net/ethernet/seeq/ether3.h             |  174 --
 drivers/scsi/Kconfig                           |    2 -
 drivers/scsi/Makefile                          |    2 -
 drivers/scsi/arm/Kconfig                       |   74 -
 drivers/scsi/arm/Makefile                      |   14 -
 drivers/scsi/arm/acornscsi-io.S                |  135 -
 drivers/scsi/arm/acornscsi.c                   | 2920 --------------------
 drivers/scsi/arm/acornscsi.h                   |  350 ---
 drivers/scsi/arm/arm_scsi.h                    |  136 -
 drivers/scsi/arm/arxescsi.c                    |  363 ---
 drivers/scsi/arm/cumana_1.c                    |  341 ---
 drivers/scsi/arm/cumana_2.c                    |  524 ----
 drivers/scsi/arm/eesox.c                       |  646 -----
 drivers/scsi/arm/fas216.c                      | 3039 ---------------------
 drivers/scsi/arm/fas216.h                      |  407 ---
 drivers/scsi/arm/msgqueue.c                    |  168 --
 drivers/scsi/arm/msgqueue.h                    |   79 -
 drivers/scsi/arm/oak.c                         |  213 --
 drivers/scsi/arm/powertec.c                    |  452 ----
 drivers/scsi/arm/queue.c                       |  319 ---
 drivers/scsi/arm/queue.h                       |  104 -
 drivers/tty/serial/8250/8250_acorn.c           |  138 -
 drivers/tty/serial/8250/Kconfig                |    8 -
 drivers/tty/serial/8250/Makefile               |    1 -
 drivers/video/fbdev/Kconfig                    |    9 -
 drivers/video/fbdev/Makefile                   |    1 -
 drivers/video/fbdev/acornfb.c                  | 1102 --------
 drivers/video/fbdev/acornfb.h                  |  166 --
 fs/eventpoll.c                                 |   18 +-
 include/linux/eventpoll.h                      |   23 -
 lib/fonts/Kconfig                              |    1 -
 scripts/package/mkdebian                       |    7 +-
 136 files changed, 80 insertions(+), 26810 deletions(-)
#26 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

In reply to Linus Walleij

Hi Linus,

Quoted 2 lines · Linus Walleij

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

I have SMP working on m68k (dual 68040, real hardware) among other oddities. I think some people would get a kick out of seeing it but also I think some people would also ask why we can't just delete everything that isn't arm64/amd64/riscv. I'm putting off sending patches like that to avoid everything getting deleted. :)

Cheers,

Daniel

maintainer
#27 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Quoted 10 lines · Daniel Palmer
Quoted 2 lines · Linus Walleij

- One camp that are enthusiast like yourself. That kind of people are running the show inside arch/m68k on Amigas and Ataris.

I have SMP working on m68k (dual 68040, real hardware) among other oddities. I think some people would get a kick out of seeing it but also I think some people would also ask why we can't just delete everything that isn't arm64/amd64/riscv. I'm putting off sending patches like that to avoid everything getting deleted. :)

I have actually thought about SMP on m68k from time to time, because there is Swedish hardware with enough memory to run Linux with SMP like that (DIAB SMP m68k Unix computers).

I would say using generic entry would be a prerequisite for doing m68k SMP so we don't introduce *more* entry oddities, but after that I'm game.

With generic entry in front I think it should just be merged, but that is me personally.

As SoC maintainer I see that m68k has a lot of technical debt like drivers under arch/m68k and no proper hardware description (such as device tree) nor is it migrated to the actually standard board file structure (fwnode) which we use when we have no other description style.

There are things like
amiints.c, cia.c, ataints.c, q40ints.c etc that should be in drivers/irqchip. So many time.c that should be in drivers/clocksource/* and many other unmodern things.

Albeit I think actually going and fixing that can't be super-hard in the age of LLMs. So listing things like this likely will just make someone go and do it. :D

Yours,
Linus Walleij

#28 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Hi Linus,

Quoted 3 lines · Linus Walleij

I would say using generic entry would be a prerequisite for doing m68k SMP so we don't introduce *more* entry oddities, but after that I'm game.

I have started this for one part of the m68k tree (68000), but it's one of those things that is hard/frustrating to test on real hardware. For the last few weeks I've had claude create a QEMU that can boot all of the m68k supported machines to Linux, Netbsd and their original OS. It already found this:
https://lore.kernel.org/linux-m68k/[email protected]/

Quoted 3 lines

As SoC maintainer I see that m68k has a lot of technical debt like drivers under arch/m68k and no proper hardware description (such as device tree)

I have m68k machines using devicetree... :)

Quoted 4 lines

There are things like
amiints.c, cia.c, ataints.c, q40ints.c etc that should be in drivers/irqchip. So many time.c that should be in drivers/clocksource/* and many other unmodern things.

Would be easier with devicetree. But is anyone crazy enough to go through the pain of merging the devicetree support and then arguing about devicetree bindings for each of those drivers only to be told m68k should just be removed?

Quoted 3 lines

Albeit I think actually going and fixing that can't be super-hard in the age of LLMs. So listing things like this likely will just make someone go and do it. :D

Once you have an emulator that the LLM can operate it can do the change/build/test/debug cycle all on its own.
With a test harness it can even test the changes work on the real hardware. But I don't think that's enough to convince people the changes are worth reviewing/merging.

Cheers,

Daniel

maintainer
#29 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Hi Daniel,

Quoted 8 lines · Daniel Palmer
Quoted 3 lines · Linus Walleij

I would say using generic entry would be a prerequisite for doing m68k SMP so we don't introduce *more* entry oddities, but after that I'm game.

I have started this for one part of the m68k tree (68000), but it's one of those things that is hard/frustrating to test on real hardware.

Pretty cool!

Quoted 4 lines

For the last few weeks I've had claude create a QEMU that can boot all of the m68k supported machines to Linux, Netbsd and their original OS. It already found this:
https://lore.kernel.org/linux-m68k/[email protected]/

Now we're talking.

Quoted 11 lines
Quoted 3 lines

As SoC maintainer I see that m68k has a lot of technical debt like drivers under arch/m68k and no proper hardware description (such as device tree)

I have m68k machines using devicetree... :)

Quoted 4 lines

There are things like
amiints.c, cia.c, ataints.c, q40ints.c etc that should be in drivers/irqchip. So many time.c that should be in drivers/clocksource/* and many other unmodern things.

Quoted 4 lines

Would be easier with devicetree. But is anyone crazy enough to go through the pain of merging the devicetree support and then arguing about devicetree bindings for each of those drivers only to be told m68k should just be removed?

That's conflating two completely different things that think about themselves as different communities.

Devicetree is in its ambition OS-independent and the fact that the bindings are all in the Linux git is just a convenience because that community works well and is dominant.

No device tree maintainer should *ever* complain abot *any* binding with reference to what Linux supports or where Linux want to go. Only people not actually working with device tree would say such things.

Device tree bindings have been deleted but then by the person who is maintainer of the binding itself, and for the argument that "no operating system" supports the platform anymore.

Reviewing and merging m68k bindings should not be any more problem than any other binding, and it should not have an impact on Linux support of m68k.

Quoted 5 lines

Once you have an emulator that the LLM can operate it can do the change/build/test/debug cycle all on its own.
With a test harness it can even test the changes work on the real hardware. But I don't think that's enough to convince people the changes are worth reviewing/merging.

I will review them. And I do not think the DT maintainers have anything against m68k.

Yours,
Linus Walleij

#30 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

In reply to Ethan Nelson-Moore
Quoted 5 lines · Ethan Nelson-Moore

Because I think it's cool that the kernel still supports actual Acorn hardware, I patched gcc 16.2 to restore ARMv3m support:
https://github.com/EthanNelson-Moore/gcc-arm-retro

Nice.

I've made a RiscPC emulator in the browser using QEMU and WASM. It boots Linux kernels and currently emulates a StrongARM RiscPC:

https://github.com/kmehltretter82/risc_pc_linux_emu

I used LLMs a lot while building it.

Your GCC work looks useful for this. I will look at building the RiscPC Linux kernel with it, and at emulating the original ARMv3 CPU too.

Thanks,
Karl

#31 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Hi, Karl,

Quoted 2 lines · Karl Mehltretter

I've made a RiscPC emulator in the browser using QEMU and WASM. It boots Linux kernels and currently emulates a StrongARM RiscPC:

That's awesome. Are you planning to add support for the NetWinder to the b?

A couple things that I didn't see when I glanced through the code:

* QEMU needs to model the broken ldrh/strh instructions for the Risc PC (but not the NetWinder). I am not sure exactly what their behavior is on real hardware (though I have seen forum posts where people investigated this - I'll let you know when I find them). For now, you could just have them load/store a random value (:p). It would also be helpful if it could print a warning when one of these instructions is executed, to help people detect and remove instances of them in e.g. JITs.

* On ARMv3, CP15 register c0 is write-only, and you don't model this. This caused Linux on ARMv3 to be broken for a very long time before support was eventually removed - it was broken even in 2.4.18-rmk4. A patch to run Linux on the CL-PS7500FE (= ARM710 Risc PC on a chip, used in the Acorn A7000+) works around this by keeping a copy of it:
http://webpal.bigbrd.com/patch-2.4.18-rmk4-wp3.gz. According to a comment in later 2.4 versions, that approach won't work, but I don't understand why. Also, the patch fails to fix other reads to the register outside cpu_get_pgd() (I forget which ones).

A few things I know about early ARM hardware and Linux that might help you:

Before 2.6, ARM support in the mainline kernel was very incomplete and, IIRC, unusable. To build a working kernel, you needed to apply a patch from http://ftp.armlinux.org.uk/pub/linux/arm/kernel/. There are no patches for versions newer than 2.4.27, but the 2.4.27 patch mostly applies correctly to 2.4.37.11 (I didn't try to fully fix it up though). The last patch that was released was 2.6.0-rmk2 - it has some relevant changes like the CL-PS7500 PS/2 mouse driver. There is also an unreleased 2.6.4 patch - I should ask RMK if he still has it.

The NetWinder development team shipped patches to their kernel with additional features for the NetWinder (and other ARM hardware, including Acorn). This is the last one:
http://www.netwinder.org/mirror/users/r/ralphs/kernel/patch-2.4.21-rmk1-nw1.gz
I don't think most of those changes ended up in mainline.

The Risc PC and NetWinder lost their audio drivers when OSS was removed in commit 727dede0ba8afbd8d19116d39f2ae8d19d00033d. RMK was working on an ALSA driver for the NetWinder but never finished it (IIRC it is in 2.6.0-rmk2 but probably doesn't work).

Quoted 1 line

I used LLMs a lot while building it.

I don't use LLMs for environmental reasons, because they are often inaccurate, and because I like using my own brain and don't want it to atrophy, but we are all entitled to our own opinion.

Quoted 2 lines

Your GCC work looks useful for this. I will look at building the RiscPC Linux kernel with it, and at emulating the original ARMv3 CPU too.

Great. Let me know if it works.

P.S. I have a few UI suggestions for the emulator:
* Make the display bigger and able to lock the mouse/keyboard and go into fullscreen.
* Remove the LK201 keyboard - the NetWinder used a normal PC keyboard (if you add it), and the Risc PC used an Acorn PS/2 keyboard (a normal British PC keyboard but with no Windows key):
https://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_RiscPC_Keyboard.html.
Just keep virtual keys for the keys that you can't input in a web browser.
* It should be possible to middle click using a modifier key if the emulator ever runs Risc OS, because middle clicking is heavily used in Risc OS.
* I think some of the explanatory text is unnecessary.
* The skeuomorphism is cute but inaccurately represents a Risc PC, and I think it clutters the UI unnecessarily.

Ethan

#32 lore raw

Re: [PATCH 03/13] ARM: remove riscpc

Hi, Karl,

Quoted 4 lines · Ethan Nelson-Moore

The Risc PC and NetWinder lost their audio drivers when OSS was removed in commit 727dede0ba8afbd8d19116d39f2ae8d19d00033d. RMK was working on an ALSA driver for the NetWinder but never finished it (IIRC it is in 2.6.0-rmk2 but probably doesn't work).

I just remembered someone wrote an ALSA driver that works on the ISA card version of the WaveArtist, which would probably be easy to get to work on the NetWinder:
https://lore.kernel.org/all/[email protected]/

Ethan

#33 lore raw

PATCH 4/13 ARM: remove legacy pxa board files

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The PXA platform supports devicetree based booting, but still has a few traditional board files, which were left as a starting point for a possible conversion to devicetree during the last mass purge of board files in 2022.

None of these boards were actually converted, so drop support for these now, along with the 'scoop' support chip that was used on some PDAs that are no longer usable now.

The only remaining board support is for the "Raumfeld" speaker system based on PXA300 SoC, though basic support for PXA250 and PXA270 is still there and may work with external dts files.

Cc Daniel Mack <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Robert Jarzmik <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
Cc Ethan Nelson-Moore <[email protected]>
---
 arch/arm/boot/compressed/Makefile         |    4 -
 arch/arm/boot/compressed/head-sharpsl.S   |  151 ---
 arch/arm/common/Kconfig                   |    6 -
 arch/arm/common/Makefile                  |    2 -
 arch/arm/common/scoop.c                   |  269 -----
 arch/arm/common/sharpsl_param.c           |   63 --
 arch/arm/configs/am200epdkit_defconfig    |   91 --
 arch/arm/configs/spitz_defconfig          |  237 -----
 arch/arm/include/asm/hardware/scoop.h     |   67 --
 arch/arm/include/asm/mach/sharpsl_param.h |   33 -
 arch/arm/mach-pxa/Kconfig                 |   89 --
 arch/arm/mach-pxa/Makefile                |    8 -
 arch/arm/mach-pxa/am200epd.c              |  395 -------
 arch/arm/mach-pxa/am300epd.c              |  296 ------
 arch/arm/mach-pxa/devices.c               |  705 -------------
 arch/arm/mach-pxa/devices.h               |   68 --
 arch/arm/mach-pxa/generic.h               |    5 -
 arch/arm/mach-pxa/gumstix.c               |  237 -----
 arch/arm/mach-pxa/gumstix.h               |   89 --
 arch/arm/mach-pxa/pxa25x.c                |   59 --
 arch/arm/mach-pxa/pxa27x.c                |   77 --
 arch/arm/mach-pxa/pxa300.c                |    1 -
 arch/arm/mach-pxa/pxa320.c                |    1 -
 arch/arm/mach-pxa/pxa3xx.c                |    6 -
 arch/arm/mach-pxa/sharpsl_pm.c            |  941 -----------------
 arch/arm/mach-pxa/sharpsl_pm.h            |  108 --
 arch/arm/mach-pxa/spitz.c                 | 1174 ---------------------
 arch/arm/mach-pxa/spitz.h                 |  185 ----
 arch/arm/mach-pxa/spitz_pm.c              |  257 -----
 29 files changed, 5624 deletions(-)
 delete mode 100644 arch/arm/boot/compressed/head-sharpsl.S
 delete mode 100644 arch/arm/common/scoop.c
 delete mode 100644 arch/arm/common/sharpsl_param.c
 delete mode 100644 arch/arm/configs/am200epdkit_defconfig
 delete mode 100644 arch/arm/configs/spitz_defconfig
 delete mode 100644 arch/arm/include/asm/hardware/scoop.h
 delete mode 100644 arch/arm/include/asm/mach/sharpsl_param.h
 delete mode 100644 arch/arm/mach-pxa/am200epd.c
 delete mode 100644 arch/arm/mach-pxa/am300epd.c
 delete mode 100644 arch/arm/mach-pxa/devices.h
 delete mode 100644 arch/arm/mach-pxa/gumstix.c
 delete mode 100644 arch/arm/mach-pxa/gumstix.h
 delete mode 100644 arch/arm/mach-pxa/sharpsl_pm.c
 delete mode 100644 arch/arm/mach-pxa/sharpsl_pm.h
 delete mode 100644 arch/arm/mach-pxa/spitz.c
 delete mode 100644 arch/arm/mach-pxa/spitz.h
 delete mode 100644 arch/arm/mach-pxa/spitz_pm.c
arch/arm/boot/compressed/Makefile +0 -4
index 32def10f5e03..232b646bfd26 100644
@@ -29,10 +29,6 @@ ifeq ($(CONFIG_CPU_XSCALE),y)
 OBJS		+= head-xscale.o
 endif
 
-ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID),y)
-OBJS		+= head-sharpsl.o
-endif
-
 ifeq ($(CONFIG_CPU_ENDIAN_BE32),y)
 ifeq ($(CONFIG_CPU_CP15),y)
 OBJS		+= big-endian.o
arch/arm/boot/compressed/head-sharpsl.S deleted +0 -151

151 lines not on this page · raw message

arch/arm/common/Kconfig +0 -6
index d72dccf6f3c2..cf75be68d05c 100644
@@ -1,9 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 config KRAIT_L2_ACCESSORS
 	bool
-
-config SHARP_PARAM
-	bool
-
-config SHARP_SCOOP
-	bool
arch/arm/common/Makefile +0 -2
index e1bcc250874f..1935b23700b0 100644
@@ -6,8 +6,6 @@
 obj-y				+= firmware.o
 
 obj-$(CONFIG_KRAIT_L2_ACCESSORS) += krait-l2-accessors.o
-obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
-obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
 obj-$(CONFIG_CPU_V7)		+= secure_cntvoff.o
 obj-$(CONFIG_MCPM)		+= mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
 CFLAGS_REMOVE_mcpm_entry.o	= -pg
arch/arm/common/scoop.c deleted +0 -269

269 lines not on this page · raw message

arch/arm/common/sharpsl_param.c deleted +0 -63

63 lines not on this page · raw message

arch/arm/configs/am200epdkit_defconfig deleted +0 -91

91 lines not on this page · raw message

arch/arm/configs/spitz_defconfig deleted +0 -237

237 lines not on this page · raw message

arch/arm/include/asm/hardware/scoop.h deleted +0 -67

67 lines not on this page · raw message

arch/arm/include/asm/mach/sharpsl_param.h deleted +0 -33
deleted file mode 100644
index 700a377c20bf..000000000000
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Hardware parameter area specific to Sharp SL series devices
- *
- * Copyright (c) 2005 Richard Purdie
- *
- * Based on Sharp's 2.4 kernel patches
- */
-
-struct sharpsl_param_info {
-  unsigned int comadj_keyword;
-  unsigned int comadj;
-
-  unsigned int uuid_keyword;
-  unsigned char uuid[16];
-
-  unsigned int touch_keyword;
-  unsigned int touch_xp;
-  unsigned int touch_yp;
-  unsigned int touch_xd;
-  unsigned int touch_yd;
-
-  unsigned int adadj_keyword;
-  unsigned int adadj;
-
-  unsigned int phad_keyword;
-  unsigned int phadadj;
-} __attribute__((packed));
-
-
-extern struct sharpsl_param_info sharpsl_param;
-extern void sharpsl_save_param(void);
-
arch/arm/mach-pxa/Kconfig +0 -89

99 lines not on this page · raw message

arch/arm/mach-pxa/Makefile +0 -8
index faccdd356482..3bc3b2e56afe 100644
@@ -22,11 +22,3 @@ obj-$(CONFIG_CPU_PXA320)	+= pxa320.o
 obj-$(CONFIG_MACH_PXA25X_DT)	+= pxa-dt.o
 obj-$(CONFIG_MACH_PXA27X_DT)	+= pxa-dt.o
 obj-$(CONFIG_MACH_PXA3XX_DT)	+= pxa-dt.o
-
-# 3rd Party Dev Platforms
-obj-$(CONFIG_ARCH_GUMSTIX)	+= gumstix.o
-obj-$(CONFIG_GUMSTIX_AM200EPD)	+= am200epd.o
-obj-$(CONFIG_GUMSTIX_AM300EPD)	+= am300epd.o
-
-# End-user Products
-obj-$(CONFIG_PXA_SHARP_Cxx00)	+= spitz.o sharpsl_pm.o spitz_pm.o
arch/arm/mach-pxa/am200epd.c deleted +0 -395

395 lines not on this page · raw message

arch/arm/mach-pxa/am300epd.c deleted +0 -296

296 lines not on this page · raw message

arch/arm/mach-pxa/devices.c +0 -705

715 lines not on this page · raw message

arch/arm/mach-pxa/devices.h deleted +0 -68

68 lines not on this page · raw message

arch/arm/mach-pxa/generic.h +0 -5
index caad4fca8de3..239d1b4119cc 100644
@@ -38,11 +38,6 @@ extern struct syscore pxa_irq_syscore;
 extern struct syscore pxa2xx_mfp_syscore;
 extern struct syscore pxa3xx_mfp_syscore;
 
-void __init pxa_set_ffuart_info(void *info);
-void __init pxa_set_btuart_info(void *info);
-void __init pxa_set_stuart_info(void *info);
-void __init pxa_set_hwuart_info(void *info);
-
 void pxa_restart(enum reboot_mode, const char *);
 
 #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
arch/arm/mach-pxa/gumstix.c deleted +0 -237

237 lines not on this page · raw message

arch/arm/mach-pxa/gumstix.h deleted +0 -89

89 lines not on this page · raw message

arch/arm/mach-pxa/pxa25x.c +0 -59

83 lines not on this page · raw message

arch/arm/mach-pxa/pxa27x.c +0 -77

58 lines not on this page · raw message

arch/arm/mach-pxa/pxa300.c +0 -1
index f77ec118d5b9..0022bf235114 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/pxa320.c +0 -1
index e372e6c118de..2e84afd94467 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/pxa3xx.c +0 -6
index 06c578ea658e..46f4efdfb514 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/sharpsl_pm.c deleted +0 -941

941 lines not on this page · raw message

arch/arm/mach-pxa/sharpsl_pm.h deleted +0 -108

108 lines not on this page · raw message

arch/arm/mach-pxa/spitz.c deleted +0 -1174

1,174 lines not on this page · raw message

arch/arm/mach-pxa/spitz.h deleted +0 -185

185 lines not on this page · raw message

arch/arm/mach-pxa/spitz_pm.c deleted +0 -257

257 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.53.0

Part of the diff is not shown here. View the raw message.

#34 lore raw

Re: [PATCH 04/13] ARM: remove legacy pxa board files

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Medium] Removed Kconfig symbols are still referenced in `depends on` statements of other subsystems…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Removed Kconfig symbols are still referenced in depends on statements of other subsystems, violating Kconfig dependency rules.
- [Low] Orphaned board-specific driver files and dead #ifdef blocks were left in the tree after their Kconfig options were removed.
- [Low] Dangling function declarations for removed platform data setters in subsystem headers.
--

commit ef1288803408f45e1d5ad605b925ffe5c498323f
Author: Arnd Bergmann <[email protected]>

ARM: remove legacy pxa board files

This patch removes support for several legacy PXA board files, including the Sharp SL series and Gumstix expansion boards. It deletes the associated machine initialization code, defconfigs, and board-specific headers.

Quoted 4 lines
arch/arm/mach-pxa/Kconfig +0 -0
index 2fb29b9ef7446..354e3dc177763 100644

[ ... ]

arch/arm/mach-pxa/Kconfig config MACH_PXA3XX_DT · line 80

Quoted 10 lines
arch/arm/mach-pxa/Kconfig +0 -10
-config GUMSTIX_AM200EPD
-	bool "Enable AM200EPD board support"
-
-config GUMSTIX_AM300EPD
-	bool "Enable AM300EPD board support"
-
-endchoice
-
-config PXA_SHARPSL
-	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models (DEPRECATED)"

[Severity: Medium]
Since PXA_SHARPSL and related configs are removed here, does this leave unmet dependencies in other subsystems?

For example, in drivers/pcmcia/Kconfig, PCMCIA_PXA2XX has:

    depends on ARM && ARCH_PXA && PCMCIA && PXA_SHARPSL

Similarly, LCD_CORGI in drivers/video/backlight/Kconfig and SND_PXA2XX_SOC_SPITZ in sound/soc/pxa/Kconfig still depend on these removed symbols, making them unreachable. Should these Kconfig entries and makefile rules, like pxa2xx-obj-$(CONFIG_PXA_SHARPSL) in drivers/pcmcia/Makefile, be removed as well?

[Severity: Low]
With the removal of these board configurations, are there orphaned drivers and dead code blocks left in the tree?

For instance, drivers/pcmcia/pxa2xx_sharpsl.c, drivers/video/backlight/corgi_lcd.c, and sound/soc/pxa/spitz.c appear to be specific to the removed Sharp SL and Spitz boards. The sharpsl-nand device probed in drivers/mtd/nand/raw/sharpsl.c is also no longer registered.

Additionally, there are leftover ifdef blocks, such as
#ifdef CONFIG_GUMSTIX_AM200EPD in drivers/video/fbdev/core/fbmem.c (inside register_framebuffer) and include/linux/fb.h, as well as #ifdef CONFIG_SHARPSL_PM in drivers/hwmon/max1111.c (in max1111_read_channel).

Could these drivers and dead ifdef blocks be cleaned up in a follow-up?

Quoted 2 lines
arch/arm/mach-pxa/Kconfig +0 -2
-	select SHARP_PARAM
-	select SHARP_SCOOP

[ ... ]

Quoted 4 lines
arch/arm/mach-pxa/devices.c +0 -0
index edad956a1483c..c2a2469a003a2 100644

[ ... ]

arch/arm/mach-pxa/devices.c line 150

Quoted 5 lines
arch/arm/mach-pxa/devices.c +0 -5
-void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info)
-{
-	pxa_device_fb.dev.parent = parent;
-	pxa_register_device(&pxa_device_fb, info);
-}

[Severity: Low]
With the implementations of these platform data setters removed, should their corresponding external declarations be cleaned up from the subsystem headers to prevent dangling prototypes?

For example:
- pxa_set_fb_info() in include/linux/platform_data/video-pxafb.h
- pxa_set_ohci_info() in include/linux/platform_data/usb-ohci-pxa27x.h
- pxa_set_mci_info() in include/linux/platform_data/mmc-pxamci.h

Quoted 2 lines
arch/arm/mach-pxa/devices.c +0 -2
-
-static struct resource pxa_resource_ffuart[] = {

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#35 lore raw

Re: [PATCH 04/13] ARM: remove legacy pxa board files

Quoted 20 lines · On Tue, Sep 8, 2026, at 18:01, [email protected] wrote:
Quoted 4 lines
arch/arm/mach-pxa/Kconfig +0 -0
index 2fb29b9ef7446..354e3dc177763 100644

[ ... ]

arch/arm/mach-pxa/Kconfig config MACH_PXA3XX_DT · line 80

Quoted 10 lines
arch/arm/mach-pxa/Kconfig +0 -10
-config GUMSTIX_AM200EPD
-	bool "Enable AM200EPD board support"
-
-config GUMSTIX_AM300EPD
-	bool "Enable AM300EPD board support"
-
-endchoice
-
-config PXA_SHARPSL
-	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models (DEPRECATED)"

[Severity: Medium]
Since PXA_SHARPSL and related configs are removed here, does this leave unmet dependencies in other subsystems?

Quoted 2 lines

For example, in drivers/pcmcia/Kconfig, PCMCIA_PXA2XX has:

    depends on ARM && ARCH_PXA && PCMCIA && PXA_SHARPSL

These are addressed in a later patch.

Quoted 6 lines

For instance, drivers/pcmcia/pxa2xx_sharpsl.c, drivers/video/backlight/corgi_lcd.c, and sound/soc/pxa/spitz.c appear to be specific to the removed Sharp SL and Spitz boards. The sharpsl-nand device probed in drivers/mtd/nand/raw/sharpsl.c is also no longer registered.

Quoted 6 lines

Additionally, there are leftover ifdef blocks, such as
#ifdef CONFIG_GUMSTIX_AM200EPD in drivers/video/fbdev/core/fbmem.c (inside register_framebuffer) and include/linux/fb.h, as well as #ifdef CONFIG_SHARPSL_PM in drivers/hwmon/max1111.c (in max1111_read_channel).

Could these drivers and dead ifdef blocks be cleaned up in a follow-up?

I have patches for all these, yes.

Quoted 9 lines

[Severity: Low]
With the implementations of these platform data setters removed, should their corresponding external declarations be cleaned up from the subsystem headers to prevent dangling prototypes?

For example:
- pxa_set_fb_info() in include/linux/platform_data/video-pxafb.h
- pxa_set_ohci_info() in include/linux/platform_data/usb-ohci-pxa27x.h
- pxa_set_mci_info() in include/linux/platform_data/mmc-pxamci.h

I have separate patches to remove those three files, either as part of removing the drivers, or changing them to DT-only.

Arnd

maintainer Acked-by on v1 4/13
#36 lore raw

Re: [PATCH 04/13] ARM: remove legacy pxa board files

In reply to Arnd Bergmann
Quoted 15 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The PXA platform supports devicetree based booting, but still has a few traditional board files, which were left as a starting point for a possible conversion to devicetree during the last mass purge of board files in 2022.

None of these boards were actually converted, so drop support for these now, along with the 'scoop' support chip that was used on some PDAs that are no longer usable now.

The only remaining board support is for the "Raumfeld" speaker system based on PXA300 SoC, though basic support for PXA250 and PXA270 is still there and may work with external dts files.

Quoted 7 lines
Cc Daniel Mack <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Robert Jarzmik <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
Cc Ethan Nelson-Moore <[email protected]>

I ACK this based on the number of refactorings I did on this to remove the static GPIO assignments, I'm really tired of doing them if no-one benefits.

Yours,
Linus Walleij

maintainer Acked-by on v1 4/13
#37 lore raw

Re: [PATCH 04/13] ARM: remove legacy pxa board files

In reply to Arnd Bergmann
Quoted 15 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The PXA platform supports devicetree based booting, but still has a few traditional board files, which were left as a starting point for a possible conversion to devicetree during the last mass purge of board files in 2022.

None of these boards were actually converted, so drop support for these now, along with the 'scoop' support chip that was used on some PDAs that are no longer usable now.

The only remaining board support is for the "Raumfeld" speaker system based on PXA300 SoC, though basic support for PXA250 and PXA270 is still there and may work with external dts files.

Quoted 7 lines
Cc Daniel Mack <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Robert Jarzmik <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
Cc Ethan Nelson-Moore <[email protected]>
Quoted 5,985 lines
---
 arch/arm/boot/compressed/Makefile         |    4 -
 arch/arm/boot/compressed/head-sharpsl.S   |  151 ---
 arch/arm/common/Kconfig                   |    6 -
 arch/arm/common/Makefile                  |    2 -
 arch/arm/common/scoop.c                   |  269 -----
 arch/arm/common/sharpsl_param.c           |   63 --
 arch/arm/configs/am200epdkit_defconfig    |   91 --
 arch/arm/configs/spitz_defconfig          |  237 -----
 arch/arm/include/asm/hardware/scoop.h     |   67 --
 arch/arm/include/asm/mach/sharpsl_param.h |   33 -
 arch/arm/mach-pxa/Kconfig                 |   89 --
 arch/arm/mach-pxa/Makefile                |    8 -
 arch/arm/mach-pxa/am200epd.c              |  395 -------
 arch/arm/mach-pxa/am300epd.c              |  296 ------
 arch/arm/mach-pxa/devices.c               |  705 -------------
 arch/arm/mach-pxa/devices.h               |   68 --
 arch/arm/mach-pxa/generic.h               |    5 -
 arch/arm/mach-pxa/gumstix.c               |  237 -----
 arch/arm/mach-pxa/gumstix.h               |   89 --
 arch/arm/mach-pxa/pxa25x.c                |   59 --
 arch/arm/mach-pxa/pxa27x.c                |   77 --
 arch/arm/mach-pxa/pxa300.c                |    1 -
 arch/arm/mach-pxa/pxa320.c                |    1 -
 arch/arm/mach-pxa/pxa3xx.c                |    6 -
 arch/arm/mach-pxa/sharpsl_pm.c            |  941 -----------------
 arch/arm/mach-pxa/sharpsl_pm.h            |  108 --
 arch/arm/mach-pxa/spitz.c                 | 1174 ---------------------
 arch/arm/mach-pxa/spitz.h                 |  185 ----
 arch/arm/mach-pxa/spitz_pm.c              |  257 -----
 29 files changed, 5624 deletions(-)
 delete mode 100644 arch/arm/boot/compressed/head-sharpsl.S
 delete mode 100644 arch/arm/common/scoop.c
 delete mode 100644 arch/arm/common/sharpsl_param.c
 delete mode 100644 arch/arm/configs/am200epdkit_defconfig
 delete mode 100644 arch/arm/configs/spitz_defconfig
 delete mode 100644 arch/arm/include/asm/hardware/scoop.h
 delete mode 100644 arch/arm/include/asm/mach/sharpsl_param.h
 delete mode 100644 arch/arm/mach-pxa/am200epd.c
 delete mode 100644 arch/arm/mach-pxa/am300epd.c
 delete mode 100644 arch/arm/mach-pxa/devices.h
 delete mode 100644 arch/arm/mach-pxa/gumstix.c
 delete mode 100644 arch/arm/mach-pxa/gumstix.h
 delete mode 100644 arch/arm/mach-pxa/sharpsl_pm.c
 delete mode 100644 arch/arm/mach-pxa/sharpsl_pm.h
 delete mode 100644 arch/arm/mach-pxa/spitz.c
 delete mode 100644 arch/arm/mach-pxa/spitz.h
 delete mode 100644 arch/arm/mach-pxa/spitz_pm.c
arch/arm/boot/compressed/Makefile +0 -4
index 32def10f5e03..232b646bfd26 100644
@@ -29,10 +29,6 @@ ifeq ($(CONFIG_CPU_XSCALE),y)
 OBJS		+= head-xscale.o
 endif
 
-ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID),y)
-OBJS		+= head-sharpsl.o
-endif
-
 ifeq ($(CONFIG_CPU_ENDIAN_BE32),y)
 ifeq ($(CONFIG_CPU_CP15),y)
 OBJS		+= big-endian.o
arch/arm/boot/compressed/head-sharpsl.S deleted +0 -151
deleted file mode 100644
index 992e784500fa..000000000000
@@ -1,151 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * linux/arch/arm/boot/compressed/head-sharpsl.S
- *
- * Copyright (C) 2004-2005 Richard Purdie <[email protected]>
- *
- * Sharp's bootloader doesn't pass any kind of machine ID
- * so we have to figure out the machine for ourselves...
- *
- * Support for Poodle, Corgi (SL-C700), Shepherd (SL-C750)
- * Husky (SL-C760), Tosa (SL-C6000), Spitz (SL-C3000),
- * Akita (SL-C1000) and Borzoi (SL-C3100).
- *
- */
-
-#include <linux/linkage.h>
-#include <asm/mach-types.h>
-
-#ifndef CONFIG_PXA_SHARPSL
-#error What am I doing here...
-#endif
-
-		.section        ".start", "ax"
-
-__SharpSL_start:
-
-/* Check for TC6393 - if found we have a Tosa */
-	ldr	r7, .TOSAID
-	mov	r1, #0x10000000		@ Base address of TC6393 chip
-	mov 	r6, #0x03
-	ldrh	r3, [r1, #8]		@ Load TC6393XB Revison: This is 0x0003
-	cmp	r6, r3
-	beq	.SHARPEND		@ Success -> tosa
-
-/* Check for pxa270 - if found, branch */
-	mrc p15, 0, r4, c0, c0		@ Get Processor ID
-	and	r4, r4, #0xffffff00
-	ldr	r3, .PXA270ID
-	cmp	r4, r3
-	beq	.PXA270
-
-/* Check for w100 - if not found we have a Poodle */
-	ldr	r1, .W100ADDR		@ Base address of w100 chip + regs offset
-
-	mov r6, #0x31			@ Load Magic Init value
-	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
-	mov r5, #0x3000
-.W100LOOP:
-	subs r5, r5, #1
-	bne .W100LOOP
-	mov r6, #0x30			@ Load 2nd Magic Init value
-	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
-
-	ldr	r6, [r1, #0]		@ Load Chip ID
-	ldr	r3, .W100ID
-	ldr	r7, .POODLEID
-	cmp	r6, r3
-	bne	.SHARPEND			@ We have no w100 - Poodle
-
-/* Check for pxa250 - if found we have a Corgi */
-	ldr	r7, .CORGIID
-	ldr	r3, .PXA255ID
-	cmp	r4, r3
-	blo	.SHARPEND			@ We have a PXA250 - Corgi
-
-/* Check for 64MiB flash - if found we have a Shepherd */
-	bl	get_flash_ids
-	ldr	r7, .SHEPHERDID
-	cmp	r3, #0x76			@ 64MiB flash
-	beq	.SHARPEND			@ We have Shepherd
-
-/* Must be a Husky */
-	ldr	r7, .HUSKYID		@ Must be Husky
-	b .SHARPEND
-
-.PXA270:
-/* Check for 16MiB flash - if found we have Spitz */
-	bl	get_flash_ids
-	ldr	r7, .SPITZID
-	cmp	r3, #0x73			@ 16MiB flash
-	beq	.SHARPEND			@ We have Spitz
-
-/* Check for a second SCOOP chip - if found we have Borzoi */
-	ldr	r1, .SCOOP2ADDR
-	ldr	r7, .BORZOIID
-	mov 	r6, #0x0140
-	strh	r6, [r1]
-	ldrh	r6, [r1]
-	cmp	r6, #0x0140
-	beq	.SHARPEND			@ We have Borzoi
-
-/* Must be Akita */
-	ldr	r7, .AKITAID
-	b	.SHARPEND			@ We have Borzoi
-
-.PXA255ID:
-	.word	0x69052d00		@ PXA255 Processor ID
-.PXA270ID:
-	.word	0x69054100		@ PXA270 Processor ID
-.W100ID:
-	.word	0x57411002		@ w100 Chip ID
-.W100ADDR:
-	.word 	0x08010000		@ w100 Chip ID Reg Address
-.SCOOP2ADDR:
-	.word	0x08800040
-.POODLEID:
-	.word	MACH_TYPE_POODLE
-.CORGIID:
-	.word	MACH_TYPE_CORGI
-.SHEPHERDID:
-	.word	MACH_TYPE_SHEPHERD
-.HUSKYID:
-	.word	MACH_TYPE_HUSKY
-.TOSAID:
-	.word	MACH_TYPE_TOSA
-.SPITZID:
-	.word	MACH_TYPE_SPITZ
-.AKITAID:
-	.word	MACH_TYPE_AKITA
-.BORZOIID:
-	.word	MACH_TYPE_BORZOI
-
-/*
- * Return: r2 - NAND Manufacturer ID
- *         r3 - NAND Chip ID
- * Corrupts: r1
- */
-get_flash_ids:
-	mov	r1, #0x0c000000		@ Base address of NAND chip
-	ldrb	r3, [r1, #24]		@ Load FLASHCTL
-	bic	r3, r3, #0x11		@ SET NCE
-	orr	r3, r3, #0x0a		@ SET CLR + FLWP
-	strb	r3, [r1, #24]		@ Save to FLASHCTL
-	mov 	r2, #0x90		@ Command "readid"
-	strb	r2, [r1, #20]		@ Save to FLASHIO
-	bic	r3, r3, #2		@ CLR CLE
-	orr	r3, r3, #4		@ SET ALE
-	strb	r3, [r1, #24]		@ Save to FLASHCTL
-	mov	r2, #0			@ Address 0x00
-	strb	r2, [r1, #20]		@ Save to FLASHIO
-	bic	r3, r3, #4		@ CLR ALE
-	strb	r3, [r1, #24]		@ Save to FLASHCTL
-.fids1:
-	ldrb	r3, [r1, #24]		@ Load FLASHCTL
-	tst	r3, #32			@ Is chip ready?
-	beq	.fids1
-	ldrb	r2, [r1, #20]		@ NAND Manufacturer ID
-	ldrb	r3, [r1, #20]		@ NAND Chip ID
-	mov	pc, lr
-
-.SHARPEND:
arch/arm/common/Kconfig +0 -6
index d72dccf6f3c2..cf75be68d05c 100644
@@ -1,9 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 config KRAIT_L2_ACCESSORS
 	bool
-
-config SHARP_PARAM
-	bool
-
-config SHARP_SCOOP
-	bool
arch/arm/common/Makefile +0 -2
index e1bcc250874f..1935b23700b0 100644
@@ -6,8 +6,6 @@
 obj-y				+= firmware.o
 
 obj-$(CONFIG_KRAIT_L2_ACCESSORS) += krait-l2-accessors.o
-obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
-obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
 obj-$(CONFIG_CPU_V7)		+= secure_cntvoff.o
 obj-$(CONFIG_MCPM)		+= mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
 CFLAGS_REMOVE_mcpm_entry.o	= -pg
arch/arm/common/scoop.c deleted +0 -269
deleted file mode 100644
index 90474994757c..000000000000
@@ -1,269 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Support code for the SCOOP interface found on various Sharp PDAs
- *
- * Copyright (c) 2004 Richard Purdie
- *
- *	Based on code written by Sharp/Lineo for 2.4 kernels
- */
-
-#include <linux/device.h>
-#include <linux/gpio/driver.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-#include <linux/export.h>
-#include <linux/io.h>
-#include <asm/hardware/scoop.h>
-
-/* PCMCIA to Scoop linkage
-
-   There is no easy way to link multiple scoop devices into one
-   single entity for the pxa2xx_pcmcia device so this structure
-   is used which is setup by the platform code.
-
-   This file is never modular so this symbol is always
-   accessile to the board support files.
-*/
-struct scoop_pcmcia_config *platform_scoop_config;
-EXPORT_SYMBOL(platform_scoop_config);
-
-struct  scoop_dev {
-	void __iomem *base;
-	struct gpio_chip gpio;
-	spinlock_t scoop_lock;
-	unsigned short suspend_clr;
-	unsigned short suspend_set;
-	u32 scoop_gpwr;
-};
-
-void reset_scoop(struct device *dev)
-{
-	struct scoop_dev *sdev = dev_get_drvdata(dev);
-
-	iowrite16(0x0100, sdev->base + SCOOP_MCR);  /* 00 */
-	iowrite16(0x0000, sdev->base + SCOOP_CDR);  /* 04 */
-	iowrite16(0x0000, sdev->base + SCOOP_CCR);  /* 10 */
-	iowrite16(0x0000, sdev->base + SCOOP_IMR);  /* 18 */
-	iowrite16(0x00FF, sdev->base + SCOOP_IRM);  /* 14 */
-	iowrite16(0x0000, sdev->base + SCOOP_ISR);  /* 1C */
-	iowrite16(0x0000, sdev->base + SCOOP_IRM);
-}
-
-static void __scoop_gpio_set(struct scoop_dev *sdev,
-			unsigned offset, int value)
-{
-	unsigned short gpwr;
-
-	gpwr = ioread16(sdev->base + SCOOP_GPWR);
-	if (value)
-		gpwr |= 1 << (offset + 1);
-	else
-		gpwr &= ~(1 << (offset + 1));
-	iowrite16(gpwr, sdev->base + SCOOP_GPWR);
-}
-
-static int scoop_gpio_set(struct gpio_chip *chip, unsigned int offset,
-			  int value)
-{
-	struct scoop_dev *sdev = gpiochip_get_data(chip);
-	unsigned long flags;
-
-	spin_lock_irqsave(&sdev->scoop_lock, flags);
-
-	__scoop_gpio_set(sdev, offset, value);
-
-	spin_unlock_irqrestore(&sdev->scoop_lock, flags);
-
-	return 0;
-}
-
-static int scoop_gpio_get(struct gpio_chip *chip, unsigned offset)
-{
-	struct scoop_dev *sdev = gpiochip_get_data(chip);
-
-	/* XXX: I'm unsure, but it seems so */
-	return !!(ioread16(sdev->base + SCOOP_GPRR) & (1 << (offset + 1)));
-}
-
-static int scoop_gpio_direction_input(struct gpio_chip *chip,
-			unsigned offset)
-{
-	struct scoop_dev *sdev = gpiochip_get_data(chip);
-	unsigned long flags;
-	unsigned short gpcr;
-
-	spin_lock_irqsave(&sdev->scoop_lock, flags);
-
-	gpcr = ioread16(sdev->base + SCOOP_GPCR);
-	gpcr &= ~(1 << (offset + 1));
-	iowrite16(gpcr, sdev->base + SCOOP_GPCR);
-
-	spin_unlock_irqrestore(&sdev->scoop_lock, flags);
-
-	return 0;
-}
-
-static int scoop_gpio_direction_output(struct gpio_chip *chip,
-			unsigned offset, int value)
-{
-	struct scoop_dev *sdev = gpiochip_get_data(chip);
-	unsigned long flags;
-	unsigned short gpcr;
-
-	spin_lock_irqsave(&sdev->scoop_lock, flags);
-
-	__scoop_gpio_set(sdev, offset, value);
-
-	gpcr = ioread16(sdev->base + SCOOP_GPCR);
-	gpcr |= 1 << (offset + 1);
-	iowrite16(gpcr, sdev->base + SCOOP_GPCR);
-
-	spin_unlock_irqrestore(&sdev->scoop_lock, flags);
-
-	return 0;
-}
-
-unsigned short read_scoop_reg(struct device *dev, unsigned short reg)
-{
-	struct scoop_dev *sdev = dev_get_drvdata(dev);
-	return ioread16(sdev->base + reg);
-}
-
-void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data)
-{
-	struct scoop_dev *sdev = dev_get_drvdata(dev);
-	iowrite16(data, sdev->base + reg);
-}
-
-EXPORT_SYMBOL(reset_scoop);
-EXPORT_SYMBOL(read_scoop_reg);
-EXPORT_SYMBOL(write_scoop_reg);
-
-#ifdef CONFIG_PM
-static void check_scoop_reg(struct scoop_dev *sdev)
-{
-	unsigned short mcr;
-
-	mcr = ioread16(sdev->base + SCOOP_MCR);
-	if ((mcr & 0x100) == 0)
-		iowrite16(0x0101, sdev->base + SCOOP_MCR);
-}
-
-static int scoop_suspend(struct platform_device *dev, pm_message_t state)
-{
-	struct scoop_dev *sdev = platform_get_drvdata(dev);
-
-	check_scoop_reg(sdev);
-	sdev->scoop_gpwr = ioread16(sdev->base + SCOOP_GPWR);
-	iowrite16((sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set, sdev->base + SCOOP_GPWR);
-
-	return 0;
-}
-
-static int scoop_resume(struct platform_device *dev)
-{
-	struct scoop_dev *sdev = platform_get_drvdata(dev);
-
-	check_scoop_reg(sdev);
-	iowrite16(sdev->scoop_gpwr, sdev->base + SCOOP_GPWR);
-
-	return 0;
-}
-#else
-#define scoop_suspend	NULL
-#define scoop_resume	NULL
-#endif
-
-static int scoop_probe(struct platform_device *pdev)
-{
-	struct scoop_dev *devptr;
-	struct scoop_config *inf;
-	struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	int ret;
-
-	if (!mem)
-		return -EINVAL;
-
-	devptr = kzalloc_obj(struct scoop_dev);
-	if (!devptr)
-		return -ENOMEM;
-
-	spin_lock_init(&devptr->scoop_lock);
-
-	inf = pdev->dev.platform_data;
-	devptr->base = ioremap(mem->start, resource_size(mem));
-
-	if (!devptr->base) {
-		ret = -ENOMEM;
-		goto err_ioremap;
-	}
-
-	platform_set_drvdata(pdev, devptr);
-
-	printk("Sharp Scoop Device found at 0x%08x -> 0x%8p\n",(unsigned int)mem->start, devptr->base);
-
-	iowrite16(0x0140, devptr->base + SCOOP_MCR);
-	reset_scoop(&pdev->dev);
-	iowrite16(0x0000, devptr->base + SCOOP_CPR);
-	iowrite16(inf->io_dir & 0xffff, devptr->base + SCOOP_GPCR);
-	iowrite16(inf->io_out & 0xffff, devptr->base + SCOOP_GPWR);
-
-	devptr->suspend_clr = inf->suspend_clr;
-	devptr->suspend_set = inf->suspend_set;
-
-	devptr->gpio.base = -1;
-
-	if (inf->gpio_base != 0) {
-		devptr->gpio.label = dev_name(&pdev->dev);
-		devptr->gpio.base = inf->gpio_base;
-		devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */
-		devptr->gpio.set = scoop_gpio_set;
-		devptr->gpio.get = scoop_gpio_get;
-		devptr->gpio.direction_input = scoop_gpio_direction_input;
-		devptr->gpio.direction_output = scoop_gpio_direction_output;
-
-		ret = gpiochip_add_data(&devptr->gpio, devptr);
-		if (ret)
-			goto err_gpio;
-	}
-
-	return 0;
-
-err_gpio:
-	platform_set_drvdata(pdev, NULL);
-err_ioremap:
-	iounmap(devptr->base);
-	kfree(devptr);
-
-	return ret;
-}
-
-static void scoop_remove(struct platform_device *pdev)
-{
-	struct scoop_dev *sdev = platform_get_drvdata(pdev);
-
-	if (sdev->gpio.base != -1)
-		gpiochip_remove(&sdev->gpio);
-
-	platform_set_drvdata(pdev, NULL);
-	iounmap(sdev->base);
-	kfree(sdev);
-}
-
-static struct platform_driver scoop_driver = {
-	.probe		= scoop_probe,
-	.remove		= scoop_remove,
-	.suspend	= scoop_suspend,
-	.resume		= scoop_resume,
-	.driver		= {
-		.name	= "sharp-scoop",
-	},
-};
-
-static int __init scoop_init(void)
-{
-	return platform_driver_register(&scoop_driver);
-}
-
-subsys_initcall(scoop_init);
arch/arm/common/sharpsl_param.c deleted +0 -63
deleted file mode 100644
index 1ca26c063f80..000000000000
@@ -1,63 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Hardware parameter area specific to Sharp SL series devices
- *
- * Copyright (c) 2005 Richard Purdie
- *
- * Based on Sharp's 2.4 kernel patches
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <asm/mach/sharpsl_param.h>
-#include <asm/page.h>
-
-/*
- * Certain hardware parameters determined at the time of device manufacture,
- * typically including LCD parameters are loaded by the bootloader at the
- * address PARAM_BASE. As the kernel will overwrite them, we need to store
- * them early in the boot process, then pass them to the appropriate drivers.
- * Not all devices use all parameters but the format is common to all.
- */
-#ifdef CONFIG_ARCH_SA1100
-#define PARAM_BASE	0xe8ffc000
-#define param_start(x)	(void *)(x)
-#else
-#define PARAM_BASE	0xa0000a00
-#define param_start(x)	__va(x)
-#endif
-#define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 )  | ( b << 8 ) | a )
-
-#define COMADJ_MAGIC	MAGIC_CHG('C','M','A','D')
-#define UUID_MAGIC	MAGIC_CHG('U','U','I','D')
-#define TOUCH_MAGIC	MAGIC_CHG('T','U','C','H')
-#define AD_MAGIC	MAGIC_CHG('B','V','A','D')
-#define PHAD_MAGIC	MAGIC_CHG('P','H','A','D')
-
-struct sharpsl_param_info sharpsl_param;
-EXPORT_SYMBOL(sharpsl_param);
-
-void sharpsl_save_param(void)
-{
-	struct sharpsl_param_info *params = param_start(PARAM_BASE);
-
-	memcpy(&sharpsl_param, params, sizeof(*params));
-
-	if (sharpsl_param.comadj_keyword != COMADJ_MAGIC)
-		sharpsl_param.comadj=-1;
-
-	if (sharpsl_param.phad_keyword != PHAD_MAGIC)
-		sharpsl_param.phadadj=-1;
-
-	if (sharpsl_param.uuid_keyword != UUID_MAGIC)
-		sharpsl_param.uuid[0]=-1;
-
-	if (sharpsl_param.touch_keyword != TOUCH_MAGIC)
-		sharpsl_param.touch_xp=-1;
-
-	if (sharpsl_param.adadj_keyword != AD_MAGIC)
-		sharpsl_param.adadj=-1;
-}
-
-
arch/arm/configs/am200epdkit_defconfig deleted +0 -91
deleted file mode 100644
index 61beac88e863..000000000000
@@ -1,91 +0,0 @@
-CONFIG_LOCALVERSION="gum"
-CONFIG_SYSVIPC=y
-CONFIG_PREEMPT=y
-CONFIG_EXPERT=y
-# CONFIG_EPOLL is not set
-# CONFIG_SHMEM is not set
-# CONFIG_ARCH_MULTI_V7 is not set
-CONFIG_ARCH_PXA=y
-CONFIG_ARCH_GUMSTIX=y
-CONFIG_ATAGS=y
-CONFIG_CMDLINE="console=ttyS0,115200n8 root=1f01 rootfstype=jffs2"
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_SWAP is not set
-# CONFIG_VM_EVENT_COUNTERS is not set
-CONFIG_NET=y
-CONFIG_PACKET=m
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_DIAG is not set
-# CONFIG_IPV6 is not set
-CONFIG_BT=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_PCCARD=y
-CONFIG_MTD=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_GEOMETRY=y
-# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
-# CONFIG_MTD_CFI_I2 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PXA2XX=y
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_SD=m
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_ATA=m
-CONFIG_PATA_PCMCIA=m
-CONFIG_NETDEVICES=y
-CONFIG_SMC91X=m
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_PXA=y
-CONFIG_SERIAL_PXA_CONSOLE=y
-# CONFIG_HW_RANDOM is not set
-# CONFIG_HWMON is not set
-CONFIG_WATCHDOG=y
-CONFIG_SA1100_WATCHDOG=m
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_PXA=y
-CONFIG_FB_PXA_PARAMETERS=y
-CONFIG_FB_MBX=m
-CONFIG_FB_VIRTUAL=m
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_SOUND=m
-CONFIG_SND=m
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-# CONFIG_SND_VERBOSE_PROCFS is not set
-CONFIG_SND_PXA2XX_AC97=m
-CONFIG_USB_GADGET=y
-CONFIG_USB_ETH=m
-CONFIG_MMC=y
-CONFIG_MMC_PXA=y
-# CONFIG_DNOTIFY is not set
-CONFIG_VFAT_FS=y
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_RUBIN=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DETECT_SOFTLOCKUP is not set
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_DEBUG_BUGVERBOSE is not set
-# CONFIG_DEBUG_PREEMPT is not set
-CONFIG_DEBUG_USER=y
arch/arm/configs/spitz_defconfig deleted +0 -237
deleted file mode 100644
index c7cf089001bf..000000000000
@@ -1,237 +0,0 @@
-CONFIG_SYSVIPC=y
-CONFIG_PREEMPT=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_EXPERT=y
-CONFIG_PROFILING=y
-# CONFIG_ARCH_MULTI_V7 is not set
-CONFIG_ARCH_PXA=y
-CONFIG_PXA_SHARPSL=y
-CONFIG_MACH_AKITA=y
-CONFIG_MACH_BORZOI=y
-CONFIG_ATAGS=y
-CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2   debug"
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_BINFMT_MISC=m
-CONFIG_PM=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_SYN_COOKIES=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_RAW=m
-CONFIG_BT=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_HIDP=m
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_PCCARD=y
-CONFIG_PCMCIA_PXA2XX=y
-CONFIG_MTD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_ROM=y
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_RAW_NAND=y
-CONFIG_MTD_NAND_SHARPSL=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_CHR_DEV_SG=m
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_ATA=y
-CONFIG_PATA_PCMCIA=y
-CONFIG_NETDEVICES=y
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_ASYNC=m
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-# CONFIG_USB_NET_CDC_SUBSET is not set
-CONFIG_NET_PCMCIA=y
-CONFIG_INPUT_FF_MEMLESS=m
-# CONFIG_INPUT_MOUSEDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_KEYBOARD_ATKBD is not set
-# CONFIG_INPUT_MOUSE is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-# CONFIG_SERIO is not set
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_8250=m
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_PXA=y
-CONFIG_SERIAL_PXA_CONSOLE=y
-CONFIG_SPI=y
-CONFIG_SPI_PXA2XX=y
-CONFIG_FB=y
-CONFIG_FB_PXA=y
-CONFIG_LCD_CLASS_DEVICE=y
-CONFIG_LCD_CORGI=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-CONFIG_HID_A4TECH=m
-CONFIG_HID_APPLE=m
-CONFIG_HID_BELKIN=m
-CONFIG_HID_CHERRY=m
-CONFIG_HID_CHICONY=m
-CONFIG_HID_CYPRESS=m
-CONFIG_HID_EZKEY=m
-CONFIG_HID_GYRATION=m
-CONFIG_HID_LOGITECH=m
-CONFIG_HID_MICROSOFT=m
-CONFIG_HID_MONTEREY=m
-CONFIG_HID_PANTHERLORD=m
-CONFIG_HID_PETALYNX=m
-CONFIG_HID_SAMSUNG=m
-CONFIG_HID_SONY=m
-CONFIG_HID_SUNPLUS=m
-CONFIG_USB_KBD=m
-CONFIG_USB_MOUSE=m
-CONFIG_USB=m
-CONFIG_USB_MON=m
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_GADGET=m
-CONFIG_USB_GADGET_DUMMY_HCD=y
-CONFIG_USB_ZERO=m
-CONFIG_USB_ETH=m
-CONFIG_USB_GADGETFS=m
-CONFIG_USB_MASS_STORAGE=m
-CONFIG_USB_G_SERIAL=m
-CONFIG_MMC=y
-CONFIG_MMC_PXA=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT4_FS=y
-# CONFIG_EXT4_FS_XATTR is not set
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_TMPFS=y
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_RUBIN=y
-CONFIG_CRAMFS=m
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V4=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_NFS_V4=m
-CONFIG_NLS_DEFAULT="cp437"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_UTF8=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_BENCHMARK=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_PREEMPT is not set
-# CONFIG_FTRACE is not set
arch/arm/include/asm/hardware/scoop.h deleted +0 -67
deleted file mode 100644
index 505453315287..000000000000
@@ -1,67 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  Definitions for the SCOOP interface found on various Sharp PDAs
- *
- *  Copyright (c) 2004 Richard Purdie
- */
-
-#define SCOOP_MCR  0x00
-#define SCOOP_CDR  0x04
-#define SCOOP_CSR  0x08
-#define SCOOP_CPR  0x0C
-#define SCOOP_CCR  0x10
-#define SCOOP_IRR  0x14
-#define SCOOP_IRM  0x14
-#define SCOOP_IMR  0x18
-#define SCOOP_ISR  0x1C
-#define SCOOP_GPCR 0x20
-#define SCOOP_GPWR 0x24
-#define SCOOP_GPRR 0x28
-
-#define SCOOP_CPR_OUT	(1 << 7)
-#define SCOOP_CPR_SD_3V	(1 << 2)
-#define SCOOP_CPR_CF_XV	(1 << 1)
-#define SCOOP_CPR_CF_3V	(1 << 0)
-
-#define SCOOP_GPCR_PA22	(1 << 12)
-#define SCOOP_GPCR_PA21	(1 << 11)
-#define SCOOP_GPCR_PA20	(1 << 10)
-#define SCOOP_GPCR_PA19	(1 << 9)
-#define SCOOP_GPCR_PA18	(1 << 8)
-#define SCOOP_GPCR_PA17	(1 << 7)
-#define SCOOP_GPCR_PA16	(1 << 6)
-#define SCOOP_GPCR_PA15	(1 << 5)
-#define SCOOP_GPCR_PA14	(1 << 4)
-#define SCOOP_GPCR_PA13	(1 << 3)
-#define SCOOP_GPCR_PA12	(1 << 2)
-#define SCOOP_GPCR_PA11	(1 << 1)
-
-struct scoop_config {
-	unsigned short io_out;
-	unsigned short io_dir;
-	unsigned short suspend_clr;
-	unsigned short suspend_set;
-	int gpio_base;
-};
-
-/* Structure for linking scoop devices to PCMCIA sockets */
-struct scoop_pcmcia_dev {
-	struct device *dev;     /* Pointer to this socket's scoop device */
-	int	irq;                /* irq for socket */
-	int cd_irq;
-	const char *cd_irq_str;
-	unsigned char keep_vs;
-	unsigned char keep_rd;
-};
-
-struct scoop_pcmcia_config {
-	struct scoop_pcmcia_dev *devs;
-	int num_devs;
-	void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr);
-};
-
-extern struct scoop_pcmcia_config *platform_scoop_config;
-
-void reset_scoop(struct device *dev);
-unsigned short read_scoop_reg(struct device *dev, unsigned short reg);
-void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data);
arch/arm/include/asm/mach/sharpsl_param.h deleted +0 -33
deleted file mode 100644
index 700a377c20bf..000000000000
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Hardware parameter area specific to Sharp SL series devices
- *
- * Copyright (c) 2005 Richard Purdie
- *
- * Based on Sharp's 2.4 kernel patches
- */
-
-struct sharpsl_param_info {
-  unsigned int comadj_keyword;
-  unsigned int comadj;
-
-  unsigned int uuid_keyword;
-  unsigned char uuid[16];
-
-  unsigned int touch_keyword;
-  unsigned int touch_xp;
-  unsigned int touch_yp;
-  unsigned int touch_xd;
-  unsigned int touch_yd;
-
-  unsigned int adadj_keyword;
-  unsigned int adadj;
-
-  unsigned int phad_keyword;
-  unsigned int phadadj;
-} __attribute__((packed));
-
-
-extern struct sharpsl_param_info sharpsl_param;
-extern void sharpsl_save_param(void);
-
arch/arm/mach-pxa/Kconfig +0 -89
index 2fb29b9ef744..354e3dc17776 100644
@@ -50,77 +50,6 @@ config MACH_PXA3XX_DT
 	  the device tree. Needn't select any other machine while
 	  MACH_PXA3XX_DT is enabled.
 
-if ATAGS
-
-comment "Legacy board files"
-
-config ARCH_GUMSTIX
-	bool "Gumstix XScale 255 boards (DEPRECATED)"
-	select PXA25x
-	help
-	  Say Y here if you intend to run this kernel on
-	  Basix, Connex, ws-200ax, ws-400ax systems
-
-	  Support for this machine will go away in early 2027,
-	  unless it gets converted to device tree.
-
-choice
-	prompt "Gumstix Carrier/Expansion Board"
-	depends on ARCH_GUMSTIX
-
-config GUMSTIX_AM200EPD
-	bool "Enable AM200EPD board support"
-
-config GUMSTIX_AM300EPD
-	bool "Enable AM300EPD board support"
-
-endchoice
-
-config PXA_SHARPSL
-	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models (DEPRECATED)"
-	select SHARP_PARAM
-	select SHARP_SCOOP
-	help
-	  Say Y here if you intend to run this kernel on a
-	  Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi),
-	  SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita),
-	  SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
-	  handheld computer.
-
-	  Support for these machines will go away in early 2027,
-	  unless they get converted to device tree.
-
-config PXA_SHARPSL_DETECT_MACH_ID
-	bool "Detect machine ID at run-time in the decompressor"
-	depends on PXA_SHARPSL
-	help
-	  Say Y here if you want the zImage decompressor to detect
-	  the Zaurus machine ID at run-time. For latest kexec-based
-	  boot loader, this is not necessary.
-
-config MACH_AKITA
-	bool "Enable Sharp SL-1000 (Akita) Support"
-	depends on PXA_SHARPSL
-	select I2C
-	select I2C_PXA
-	select MACH_SPITZ
-	select PXA27x
-	select PXA_SHARP_Cxx00
-
-config MACH_SPITZ
-	bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
-	depends on PXA_SHARPSL
-	select PXA27x
-	select PXA_SHARP_Cxx00
-
-config MACH_BORZOI
-	bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support"
-	depends on PXA_SHARPSL
-	select PXA27x
-	select PXA_SHARP_Cxx00
-
-endif # ATAGS
-
 config PXA25x
 	bool
 	select CPU_XSCALE
@@ -157,22 +86,4 @@ config CPU_PXA320
 	help
 	  PXA320 (codename Monahans-P)
 
-config PXA_SHARP_Cxx00
-	bool
-	select SHARPSL_PM
-	help
-	  Enable common support for Sharp Cxx00 models
-
-config SHARPSL_PM
-	bool
-	select APM_EMULATION
-	select SHARPSL_PM_MAX1111
-
-config SHARPSL_PM_MAX1111
-	bool
-	select HWMON
-	select SENSORS_MAX1111
-	select SPI
-	select SPI_MASTER
-
 endif
arch/arm/mach-pxa/Makefile +0 -8
index faccdd356482..3bc3b2e56afe 100644
@@ -22,11 +22,3 @@ obj-$(CONFIG_CPU_PXA320)	+= pxa320.o
 obj-$(CONFIG_MACH_PXA25X_DT)	+= pxa-dt.o
 obj-$(CONFIG_MACH_PXA27X_DT)	+= pxa-dt.o
 obj-$(CONFIG_MACH_PXA3XX_DT)	+= pxa-dt.o
-
-# 3rd Party Dev Platforms
-obj-$(CONFIG_ARCH_GUMSTIX)	+= gumstix.o
-obj-$(CONFIG_GUMSTIX_AM200EPD)	+= am200epd.o
-obj-$(CONFIG_GUMSTIX_AM300EPD)	+= am300epd.o
-
-# End-user Products
-obj-$(CONFIG_PXA_SHARP_Cxx00)	+= spitz.o sharpsl_pm.o spitz_pm.o
arch/arm/mach-pxa/am200epd.c deleted +0 -395
deleted file mode 100644
index 4814f3cfe775..000000000000
@@ -1,395 +0,0 @@
-/*
- * am200epd.c -- Platform device for AM200 EPD kit
- *
- * Copyright (C) 2008, Jaya Kumar
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- *
- * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
- *
- * This work was made possible by help and equipment support from E-Ink
- * Corporation. http://support.eink.com/community
- *
- * This driver is written to be used with the Metronome display controller.
- * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
- * Vizplex EPD on a Gumstix board using the Lyre interface board.
- *
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/irq.h>
-#include <linux/gpio/legacy.h>
-
-#include "pxa25x.h"
-#include "gumstix.h"
-#include <linux/platform_data/video-pxafb.h>
-
-#include "generic.h"
-
-#include <video/metronomefb.h>
-
-static unsigned int panel_type = 6;
-static struct platform_device *am200_device;
-static struct metronome_board am200_board;
-
-static struct pxafb_mode_info am200_fb_mode_9inch7 = {
-	.pixclock	= 40000,
-	.xres		= 1200,
-	.yres		= 842,
-	.bpp		= 16,
-	.hsync_len	= 2,
-	.left_margin	= 2,
-	.right_margin	= 2,
-	.vsync_len	= 1,
-	.upper_margin	= 2,
-	.lower_margin	= 25,
-	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-};
-
-static struct pxafb_mode_info am200_fb_mode_8inch = {
-	.pixclock	= 40000,
-	.xres		= 1088,
-	.yres		= 791,
-	.bpp		= 16,
-	.hsync_len	= 28,
-	.left_margin	= 8,
-	.right_margin	= 30,
-	.vsync_len	= 8,
-	.upper_margin	= 10,
-	.lower_margin	= 8,
-	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-};
-
-static struct pxafb_mode_info am200_fb_mode_6inch = {
-	.pixclock	= 40189,
-	.xres		= 832,
-	.yres		= 622,
-	.bpp		= 16,
-	.hsync_len	= 28,
-	.left_margin	= 34,
-	.right_margin	= 34,
-	.vsync_len	= 25,
-	.upper_margin	= 0,
-	.lower_margin	= 2,
-	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-};
-
-static struct pxafb_mach_info am200_fb_info = {
-	.modes		= &am200_fb_mode_6inch,
-	.num_modes	= 1,
-	.lcd_conn	= LCD_TYPE_COLOR_TFT | LCD_PCLK_EDGE_FALL |
-			  LCD_AC_BIAS_FREQ(24),
-};
-
-/* register offsets for gpio control */
-#define LED_GPIO_PIN 51
-#define STDBY_GPIO_PIN 48
-#define RST_GPIO_PIN 49
-#define RDY_GPIO_PIN 32
-#define ERR_GPIO_PIN 17
-#define PCBPWR_GPIO_PIN 16
-static int gpios[] = { LED_GPIO_PIN , STDBY_GPIO_PIN , RST_GPIO_PIN,
-			RDY_GPIO_PIN, ERR_GPIO_PIN, PCBPWR_GPIO_PIN };
-static char *gpio_names[] = { "LED" , "STDBY" , "RST", "RDY", "ERR", "PCBPWR" };
-
-static int am200_init_gpio_regs(struct metronomefb_par *par)
-{
-	int i;
-	int err;
-
-	for (i = 0; i < ARRAY_SIZE(gpios); i++) {
-		err = gpio_request(gpios[i], gpio_names[i]);
-		if (err) {
-			dev_err(&am200_device->dev, "failed requesting "
-				"gpio %s, err=%d\n", gpio_names[i], err);
-			goto err_req_gpio;
-		}
-	}
-
-	gpio_direction_output(LED_GPIO_PIN, 0);
-	gpio_direction_output(STDBY_GPIO_PIN, 0);
-	gpio_direction_output(RST_GPIO_PIN, 0);
-
-	gpio_direction_input(RDY_GPIO_PIN);
-	gpio_direction_input(ERR_GPIO_PIN);
-
-	gpio_direction_output(PCBPWR_GPIO_PIN, 0);
-
-	return 0;
-
-err_req_gpio:
-	while (--i >= 0)
-		gpio_free(gpios[i]);
-
-	return err;
-}
-
-static void am200_cleanup(struct metronomefb_par *par)
-{
-	int i;
-
-	free_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), par);
-
-	for (i = 0; i < ARRAY_SIZE(gpios); i++)
-		gpio_free(gpios[i]);
-}
-
-static int am200_share_video_mem(struct fb_info *info)
-{
-	/* rough check if this is our desired fb and not something else */
-	if ((info->var.xres != am200_fb_info.modes->xres)
-		|| (info->var.yres != am200_fb_info.modes->yres))
-		return 0;
-
-	/* we've now been notified that we have our new fb */
-	am200_board.metromem = info->screen_base;
-	am200_board.host_fbinfo = info;
-
-	/* try to refcount host drv since we are the consumer after this */
-	if (!try_module_get(info->fbops->owner))
-		return -ENODEV;
-
-	return 0;
-}
-
-static int am200_unshare_video_mem(struct fb_info *info)
-{
-	dev_dbg(&am200_device->dev, "ENTER %s\n", __func__);
-
-	if (info != am200_board.host_fbinfo)
-		return 0;
-
-	module_put(am200_board.host_fbinfo->fbops->owner);
-	return 0;
-}
-
-static int am200_fb_notifier_callback(struct notifier_block *self,
-				 unsigned long event, void *data)
-{
-	struct fb_event *evdata = data;
-	struct fb_info *info = evdata->info;
-
-	dev_dbg(&am200_device->dev, "ENTER %s\n", __func__);
-
-	if (event == FB_EVENT_FB_REGISTERED)
-		return am200_share_video_mem(info);
-	else if (event == FB_EVENT_FB_UNREGISTERED)
-		return am200_unshare_video_mem(info);
-
-	return 0;
-}
-
-static struct notifier_block am200_fb_notif = {
-	.notifier_call = am200_fb_notifier_callback,
-};
-
-/* this gets called as part of our init. these steps must be done now so
- * that we can use pxa_set_fb_info */
-static void __init am200_presetup_fb(void)
-{
-	int fw;
-	int fh;
-	int padding_size;
-	int totalsize;
-
-	switch (panel_type) {
-	case 6:
-		am200_fb_info.modes = &am200_fb_mode_6inch;
-		break;
-	case 8:
-		am200_fb_info.modes = &am200_fb_mode_8inch;
-		break;
-	case 97:
-		am200_fb_info.modes = &am200_fb_mode_9inch7;
-		break;
-	default:
-		dev_err(&am200_device->dev, "invalid panel_type selection,"
-						" setting to 6\n");
-		am200_fb_info.modes = &am200_fb_mode_6inch;
-		break;
-	}
-
-	/* the frame buffer is divided as follows:
-	command | CRC | padding
-	16kb waveform data | CRC | padding
-	image data | CRC
-	*/
-
-	fw = am200_fb_info.modes->xres;
-	fh = am200_fb_info.modes->yres;
-
-	/* waveform must be 16k + 2 for checksum */
-	am200_board.wfm_size = roundup(16*1024 + 2, fw);
-
-	padding_size = PAGE_SIZE + (4 * fw);
-
-	/* total is 1 cmd , 1 wfm, padding and image */
-	totalsize = fw + am200_board.wfm_size + padding_size + (fw*fh);
-
-	/* save this off because we're manipulating fw after this and
-	 * we'll need it when we're ready to setup the framebuffer */
-	am200_board.fw = fw;
-	am200_board.fh = fh;
-
-	/* the reason we do this adjustment is because we want to acquire
-	 * more framebuffer memory without imposing custom awareness on the
-	 * underlying pxafb driver */
-	am200_fb_info.modes->yres = DIV_ROUND_UP(totalsize, fw);
-
-	/* we divide since we told the LCD controller we're 16bpp */
-	am200_fb_info.modes->xres /= 2;
-
-	pxa_set_fb_info(NULL, &am200_fb_info);
-
-}
-
-/* this gets called by metronomefb as part of its init, in our case, we
- * have already completed initial framebuffer init in presetup_fb so we
- * can just setup the fb access pointers */
-static int am200_setup_fb(struct metronomefb_par *par)
-{
-	int fw;
-	int fh;
-
-	fw = am200_board.fw;
-	fh = am200_board.fh;
-
-	/* metromem was set up by the notifier in share_video_mem so now
-	 * we can use its value to calculate the other entries */
-	par->metromem_cmd = (struct metromem_cmd *) am200_board.metromem;
-	par->metromem_wfm = am200_board.metromem + fw;
-	par->metromem_img = par->metromem_wfm + am200_board.wfm_size;
-	par->metromem_img_csum = (u16 *) (par->metromem_img + (fw * fh));
-	par->metromem_dma = am200_board.host_fbinfo->fix.smem_start;
-
-	return 0;
-}
-
-static int am200_get_panel_type(void)
-{
-	return panel_type;
-}
-
-static irqreturn_t am200_handle_irq(int irq, void *dev_id)
-{
-	struct metronomefb_par *par = dev_id;
-
-	wake_up_interruptible(&par->waitq);
-	return IRQ_HANDLED;
-}
-
-static int am200_setup_irq(struct fb_info *info)
-{
-	int ret;
-
-	ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am200_handle_irq,
-				IRQF_TRIGGER_FALLING, "AM200", info->par);
-	if (ret)
-		dev_err(&am200_device->dev, "request_irq failed: %d\n", ret);
-
-	return ret;
-}
-
-static void am200_set_rst(struct metronomefb_par *par, int state)
-{
-	gpio_set_value(RST_GPIO_PIN, state);
-}
-
-static void am200_set_stdby(struct metronomefb_par *par, int state)
-{
-	gpio_set_value(STDBY_GPIO_PIN, state);
-}
-
-static int am200_wait_event(struct metronomefb_par *par)
-{
-	return wait_event_timeout(par->waitq, gpio_get_value(RDY_GPIO_PIN), HZ);
-}
-
-static int am200_wait_event_intr(struct metronomefb_par *par)
-{
-	return wait_event_interruptible_timeout(par->waitq,
-					gpio_get_value(RDY_GPIO_PIN), HZ);
-}
-
-static struct metronome_board am200_board = {
-	.owner			= THIS_MODULE,
-	.setup_irq		= am200_setup_irq,
-	.setup_io		= am200_init_gpio_regs,
-	.setup_fb		= am200_setup_fb,
-	.set_rst		= am200_set_rst,
-	.set_stdby		= am200_set_stdby,
-	.met_wait_event		= am200_wait_event,
-	.met_wait_event_intr	= am200_wait_event_intr,
-	.get_panel_type		= am200_get_panel_type,
-	.cleanup		= am200_cleanup,
-};
-
-static unsigned long am200_pin_config[] __initdata = {
-	GPIO51_GPIO,
-	GPIO49_GPIO,
-	GPIO48_GPIO,
-	GPIO32_GPIO,
-	GPIO17_GPIO,
-	GPIO16_GPIO,
-};
-
-int __init am200_init(void)
-{
-	int ret;
-
-	/*
-	 * Before anything else, we request notification for any fb
-	 * creation events.
-	 *
-	 * FIXME: This is terrible and needs to be nuked. The notifier is used
-	 * to get at the fb base address from the boot splash fb driver, which
-	 * is then passed to metronomefb. Instaed of metronomfb or this board
-	 * support file here figuring this out on their own.
-	 *
-	 * See also the #ifdef in fbmem.c.
-	 */
-	fb_register_client(&am200_fb_notif);
-
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(am200_pin_config));
-
-	/* request our platform independent driver */
-	request_module("metronomefb");
-
-	am200_device = platform_device_alloc("metronomefb", -1);
-	if (!am200_device)
-		return -ENOMEM;
-
-	/* the am200_board that will be seen by metronomefb is a copy */
-	platform_device_add_data(am200_device, &am200_board,
-					sizeof(am200_board));
-
-	/* this _add binds metronomefb to am200. metronomefb refcounts am200 */
-	ret = platform_device_add(am200_device);
-
-	if (ret) {
-		platform_device_put(am200_device);
-		fb_unregister_client(&am200_fb_notif);
-		return ret;
-	}
-
-	am200_presetup_fb();
-
-	return 0;
-}
-
-module_param(panel_type, uint, 0);
-MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97");
-
-MODULE_DESCRIPTION("board driver for am200 metronome epd kit");
-MODULE_AUTHOR("Jaya Kumar");
-MODULE_LICENSE("GPL");
arch/arm/mach-pxa/am300epd.c deleted +0 -296
deleted file mode 100644
index 435fb72da7de..000000000000
@@ -1,296 +0,0 @@
-/*
- * am300epd.c -- Platform device for AM300 EPD kit
- *
- * Copyright (C) 2008, Jaya Kumar
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- *
- * This work was made possible by help and equipment support from E-Ink
- * Corporation. http://support.eink.com/community
- *
- * This driver is written to be used with the Broadsheet display controller.
- * on the AM300 EPD prototype kit/development kit with an E-Ink 800x600
- * Vizplex EPD on a Gumstix board using the Broadsheet interface board.
- *
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/irq.h>
-#include <linux/gpio/legacy.h>
-
-#include "gumstix.h"
-#include "mfp-pxa25x.h"
-#include "irqs.h"
-#include <linux/platform_data/video-pxafb.h>
-
-#include "generic.h"
-
-#include <video/broadsheetfb.h>
-
-static unsigned int panel_type = 6;
-static struct platform_device *am300_device;
-static struct broadsheet_board am300_board;
-
-static unsigned long am300_pin_config[] __initdata = {
-	GPIO16_GPIO,
-	GPIO17_GPIO,
-	GPIO32_GPIO,
-	GPIO48_GPIO,
-	GPIO49_GPIO,
-	GPIO51_GPIO,
-	GPIO74_GPIO,
-	GPIO75_GPIO,
-	GPIO76_GPIO,
-	GPIO77_GPIO,
-
-	/* this is the 16-bit hdb bus 58-73 */
-	GPIO58_GPIO,
-	GPIO59_GPIO,
-	GPIO60_GPIO,
-	GPIO61_GPIO,
-
-	GPIO62_GPIO,
-	GPIO63_GPIO,
-	GPIO64_GPIO,
-	GPIO65_GPIO,
-
-	GPIO66_GPIO,
-	GPIO67_GPIO,
-	GPIO68_GPIO,
-	GPIO69_GPIO,
-
-	GPIO70_GPIO,
-	GPIO71_GPIO,
-	GPIO72_GPIO,
-	GPIO73_GPIO,
-};
-
-/* register offsets for gpio control */
-#define PWR_GPIO_PIN	16
-#define CFG_GPIO_PIN	17
-#define RDY_GPIO_PIN	32
-#define DC_GPIO_PIN	48
-#define RST_GPIO_PIN	49
-#define LED_GPIO_PIN	51
-#define RD_GPIO_PIN	74
-#define WR_GPIO_PIN	75
-#define CS_GPIO_PIN	76
-#define IRQ_GPIO_PIN	77
-
-/* hdb bus */
-#define DB0_GPIO_PIN	58
-#define DB15_GPIO_PIN	73
-
-static int gpios[] = { PWR_GPIO_PIN, CFG_GPIO_PIN, RDY_GPIO_PIN, DC_GPIO_PIN,
-			RST_GPIO_PIN, RD_GPIO_PIN, WR_GPIO_PIN, CS_GPIO_PIN,
-			IRQ_GPIO_PIN, LED_GPIO_PIN };
-static char *gpio_names[] = { "PWR", "CFG", "RDY", "DC", "RST", "RD", "WR",
-				"CS", "IRQ", "LED" };
-
-static int am300_wait_event(struct broadsheetfb_par *par)
-{
-	/* todo: improve err recovery */
-	wait_event(par->waitq, gpio_get_value(RDY_GPIO_PIN));
-	return 0;
-}
-
-static int am300_init_gpio_regs(struct broadsheetfb_par *par)
-{
-	int i;
-	int err;
-	char dbname[8];
-
-	for (i = 0; i < ARRAY_SIZE(gpios); i++) {
-		err = gpio_request(gpios[i], gpio_names[i]);
-		if (err) {
-			dev_err(&am300_device->dev, "failed requesting "
-				"gpio %s, err=%d\n", gpio_names[i], err);
-			goto err_req_gpio;
-		}
-	}
-
-	/* we also need to take care of the hdb bus */
-	for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++) {
-		sprintf(dbname, "DB%d", i);
-		err = gpio_request(i, dbname);
-		if (err) {
-			dev_err(&am300_device->dev, "failed requesting "
-				"gpio %d, err=%d\n", i, err);
-			goto err_req_gpio2;
-		}
-	}
-
-	/* setup the outputs and init values */
-	gpio_direction_output(PWR_GPIO_PIN, 0);
-	gpio_direction_output(CFG_GPIO_PIN, 1);
-	gpio_direction_output(DC_GPIO_PIN, 0);
-	gpio_direction_output(RD_GPIO_PIN, 1);
-	gpio_direction_output(WR_GPIO_PIN, 1);
-	gpio_direction_output(CS_GPIO_PIN, 1);
-	gpio_direction_output(RST_GPIO_PIN, 0);
-
-	/* setup the inputs */
-	gpio_direction_input(RDY_GPIO_PIN);
-	gpio_direction_input(IRQ_GPIO_PIN);
-
-	/* start the hdb bus as an input */
-	for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++)
-		gpio_direction_output(i, 0);
-
-	/* go into command mode */
-	gpio_set_value(CFG_GPIO_PIN, 1);
-	gpio_set_value(RST_GPIO_PIN, 0);
-	msleep(10);
-	gpio_set_value(RST_GPIO_PIN, 1);
-	msleep(10);
-	am300_wait_event(par);
-
-	return 0;
-
-err_req_gpio2:
-	while (--i >= DB0_GPIO_PIN)
-		gpio_free(i);
-	i = ARRAY_SIZE(gpios);
-err_req_gpio:
-	while (--i >= 0)
-		gpio_free(gpios[i]);
-
-	return err;
-}
-
-static int am300_init_board(struct broadsheetfb_par *par)
-{
-	return am300_init_gpio_regs(par);
-}
-
-static void am300_cleanup(struct broadsheetfb_par *par)
-{
-	int i;
-
-	free_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), par);
-
-	for (i = 0; i < ARRAY_SIZE(gpios); i++)
-		gpio_free(gpios[i]);
-
-	for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++)
-		gpio_free(i);
-
-}
-
-static u16 am300_get_hdb(struct broadsheetfb_par *par)
-{
-	u16 res = 0;
-	int i;
-
-	for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
-		res |= (gpio_get_value(DB0_GPIO_PIN + i)) ? (1 << i) : 0;
-
-	return res;
-}
-
-static void am300_set_hdb(struct broadsheetfb_par *par, u16 data)
-{
-	int i;
-
-	for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
-		gpio_set_value(DB0_GPIO_PIN + i, (data >> i) & 0x01);
-}
-
-
-static void am300_set_ctl(struct broadsheetfb_par *par, unsigned char bit,
-				u8 state)
-{
-	switch (bit) {
-	case BS_CS:
-		gpio_set_value(CS_GPIO_PIN, state);
-		break;
-	case BS_DC:
-		gpio_set_value(DC_GPIO_PIN, state);
-		break;
-	case BS_WR:
-		gpio_set_value(WR_GPIO_PIN, state);
-		break;
-	}
-}
-
-static int am300_get_panel_type(void)
-{
-	return panel_type;
-}
-
-static irqreturn_t am300_handle_irq(int irq, void *dev_id)
-{
-	struct broadsheetfb_par *par = dev_id;
-
-	wake_up(&par->waitq);
-	return IRQ_HANDLED;
-}
-
-static int am300_setup_irq(struct fb_info *info)
-{
-	int ret;
-	struct broadsheetfb_par *par = info->par;
-
-	ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am300_handle_irq,
-				IRQF_TRIGGER_RISING, "AM300", par);
-	if (ret)
-		dev_err(&am300_device->dev, "request_irq failed: %d\n", ret);
-
-	return ret;
-}
-
-static struct broadsheet_board am300_board = {
-	.owner			= THIS_MODULE,
-	.init			= am300_init_board,
-	.cleanup		= am300_cleanup,
-	.set_hdb		= am300_set_hdb,
-	.get_hdb		= am300_get_hdb,
-	.set_ctl		= am300_set_ctl,
-	.wait_for_rdy		= am300_wait_event,
-	.get_panel_type		= am300_get_panel_type,
-	.setup_irq		= am300_setup_irq,
-};
-
-int __init am300_init(void)
-{
-	int ret;
-
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(am300_pin_config));
-
-	/* request our platform independent driver */
-	request_module("broadsheetfb");
-
-	am300_device = platform_device_alloc("broadsheetfb", -1);
-	if (!am300_device)
-		return -ENOMEM;
-
-	/* the am300_board that will be seen by broadsheetfb is a copy */
-	platform_device_add_data(am300_device, &am300_board,
-					sizeof(am300_board));
-
-	ret = platform_device_add(am300_device);
-
-	if (ret) {
-		platform_device_put(am300_device);
-		return ret;
-	}
-
-	return 0;
-}
-
-module_param(panel_type, uint, 0);
-MODULE_PARM_DESC(panel_type, "Select the panel type: 37, 6, 97");
-
-MODULE_DESCRIPTION("board driver for am300 epd kit");
-MODULE_AUTHOR("Jaya Kumar");
-MODULE_LICENSE("GPL");
arch/arm/mach-pxa/devices.c +0 -705
index edad956a1483..c2a2469a003a 100644
@@ -1,715 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/clkdev.h>
-#include <linux/clk-provider.h>
-#include <linux/dma-mapping.h>
-#include <linux/dmaengine.h>
-#include <linux/gpio-pxa.h>
-#include <linux/platform_data/i2c-pxa.h>
-#include <linux/soc/pxa/cpu.h>
 
-#include <linux/platform_data/video-pxafb.h>
-#include <linux/platform_data/mmc-pxamci.h>
 #include "irqs.h"
-#include <linux/platform_data/usb-ohci-pxa27x.h>
-#include <linux/platform_data/mmp_dma.h>
-
-#include "mfp-pxa2xx.h"
 #include "regs-ost.h"
 #include "reset.h"
-#include "devices.h"
-#include "generic.h"
-
-void __init pxa_register_device(struct platform_device *dev, void *data)
-{
-	int ret;
-
-	dev->dev.platform_data = data;
-
-	ret = platform_device_register(dev);
-	if (ret)
-		dev_err(&dev->dev, "unable to register device: %d\n", ret);
-}
-
-static struct resource pxa_resource_pmu = {
-	.start	= IRQ_PMU,
-	.end	= IRQ_PMU,
-	.flags	= IORESOURCE_IRQ,
-};
-
-struct platform_device pxa_device_pmu = {
-	.name		= "xscale-pmu",
-	.id		= -1,
-	.resource	= &pxa_resource_pmu,
-	.num_resources	= 1,
-};
-
-static const struct resource pxamci_resources[] = {
-	[0] = {
-		.start	= 0x41100000,
-		.end	= 0x41100fff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_MMC,
-		.end	= IRQ_MMC,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-void __init pxa_set_mci_info(const struct pxamci_platform_data *info,
-			     const struct property_entry *props)
-{
-	const struct platform_device_info mci_info = {
-		.name		= "pxa2xx-mci",
-		.id		= 0,
-		.res		= pxamci_resources,
-		.num_res	= ARRAY_SIZE(pxamci_resources),
-		.data		= info,
-		.size_data	= sizeof(*info),
-		.dma_mask	= 0xffffffffUL,
-		.properties	= props,
-	};
-	struct platform_device *mci_dev;
-	int err;
-
-	mci_dev = platform_device_register_full(&mci_info);
-	err = PTR_ERR_OR_ZERO(mci_dev);
-	if (err)
-		pr_err("Unable to create mci device: %d\n", err);
-}
-
-static struct resource pxa2xx_udc_resources[] = {
-	[0] = {
-		.start	= 0x40600000,
-		.end	= 0x4060ffff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_USB,
-		.end	= IRQ_USB,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static u64 udc_dma_mask = ~(u32)0;
-
-struct platform_device pxa25x_device_udc = {
-	.name		= "pxa25x-udc",
-	.id		= -1,
-	.resource	= pxa2xx_udc_resources,
-	.num_resources	= ARRAY_SIZE(pxa2xx_udc_resources),
-	.dev		=  {
-		.dma_mask	= &udc_dma_mask,
-	}
-};
-
-struct platform_device pxa27x_device_udc = {
-	.name		= "pxa27x-udc",
-	.id		= -1,
-	.resource	= pxa2xx_udc_resources,
-	.num_resources	= ARRAY_SIZE(pxa2xx_udc_resources),
-	.dev		=  {
-		.dma_mask	= &udc_dma_mask,
-	}
-};
-
-static struct resource pxafb_resources[] = {
-	[0] = {
-		.start	= 0x44000000,
-		.end	= 0x4400ffff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_LCD,
-		.end	= IRQ_LCD,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static u64 fb_dma_mask = ~(u64)0;
-
-struct platform_device pxa_device_fb = {
-	.name		= "pxa2xx-fb",
-	.id		= -1,
-	.dev		= {
-		.dma_mask	= &fb_dma_mask,
-		.coherent_dma_mask = 0xffffffff,
-	},
-	.num_resources	= ARRAY_SIZE(pxafb_resources),
-	.resource	= pxafb_resources,
-};
-
-void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info)
-{
-	pxa_device_fb.dev.parent = parent;
-	pxa_register_device(&pxa_device_fb, info);
-}
-
-static struct resource pxa_resource_ffuart[] = {
-	{
-		.start	= 0x40100000,
-		.end	= 0x40100023,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_FFUART,
-		.end	= IRQ_FFUART,
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-struct platform_device pxa_device_ffuart = {
-	.name		= "pxa2xx-uart",
-	.id		= 0,
-	.resource	= pxa_resource_ffuart,
-	.num_resources	= ARRAY_SIZE(pxa_resource_ffuart),
-};
-
-void __init pxa_set_ffuart_info(void *info)
-{
-	pxa_register_device(&pxa_device_ffuart, info);
-}
-
-static struct resource pxa_resource_btuart[] = {
-	{
-		.start	= 0x40200000,
-		.end	= 0x40200023,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_BTUART,
-		.end	= IRQ_BTUART,
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-struct platform_device pxa_device_btuart = {
-	.name		= "pxa2xx-uart",
-	.id		= 1,
-	.resource	= pxa_resource_btuart,
-	.num_resources	= ARRAY_SIZE(pxa_resource_btuart),
-};
-
-void __init pxa_set_btuart_info(void *info)
-{
-	pxa_register_device(&pxa_device_btuart, info);
-}
-
-static struct resource pxa_resource_stuart[] = {
-	{
-		.start	= 0x40700000,
-		.end	= 0x40700023,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_STUART,
-		.end	= IRQ_STUART,
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-struct platform_device pxa_device_stuart = {
-	.name		= "pxa2xx-uart",
-	.id		= 2,
-	.resource	= pxa_resource_stuart,
-	.num_resources	= ARRAY_SIZE(pxa_resource_stuart),
-};
-
-void __init pxa_set_stuart_info(void *info)
-{
-	pxa_register_device(&pxa_device_stuart, info);
-}
-
-static struct resource pxa_resource_hwuart[] = {
-	{
-		.start	= 0x41600000,
-		.end	= 0x4160002F,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_HWUART,
-		.end	= IRQ_HWUART,
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-struct platform_device pxa_device_hwuart = {
-	.name		= "pxa2xx-uart",
-	.id		= 3,
-	.resource	= pxa_resource_hwuart,
-	.num_resources	= ARRAY_SIZE(pxa_resource_hwuart),
-};
-
-void __init pxa_set_hwuart_info(void *info)
-{
-	if (cpu_is_pxa255())
-		pxa_register_device(&pxa_device_hwuart, info);
-	else
-		pr_info("UART: Ignoring attempt to register HWUART on non-PXA255 hardware");
-}
-
-static struct resource pxai2c_resources[] = {
-	{
-		.start	= 0x40301680,
-		.end	= 0x403016a3,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_I2C,
-		.end	= IRQ_I2C,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa_device_i2c = {
-	.name		= "pxa2xx-i2c",
-	.id		= 0,
-	.resource	= pxai2c_resources,
-	.num_resources	= ARRAY_SIZE(pxai2c_resources),
-};
-
-void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
-{
-	pxa_register_device(&pxa_device_i2c, info);
-}
-
-#ifdef CONFIG_PXA27x
-static struct resource pxa27x_resources_i2c_power[] = {
-	{
-		.start	= 0x40f00180,
-		.end	= 0x40f001a3,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_PWRI2C,
-		.end	= IRQ_PWRI2C,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa27x_device_i2c_power = {
-	.name		= "pxa2xx-i2c",
-	.id		= 1,
-	.resource	= pxa27x_resources_i2c_power,
-	.num_resources	= ARRAY_SIZE(pxa27x_resources_i2c_power),
-};
-#endif
-
-static struct resource pxai2s_resources[] = {
-	{
-		.start	= 0x40400000,
-		.end	= 0x40400083,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_I2S,
-		.end	= IRQ_I2S,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa_device_i2s = {
-	.name		= "pxa2xx-i2s",
-	.id		= -1,
-	.resource	= pxai2s_resources,
-	.num_resources	= ARRAY_SIZE(pxai2s_resources),
-};
-
-struct platform_device pxa_device_asoc_ssp1 = {
-	.name		= "pxa-ssp-dai",
-	.id		= 0,
-};
-
-struct platform_device pxa_device_asoc_ssp2= {
-	.name		= "pxa-ssp-dai",
-	.id		= 1,
-};
-
-struct platform_device pxa_device_asoc_ssp3 = {
-	.name		= "pxa-ssp-dai",
-	.id		= 2,
-};
-
-struct platform_device pxa_device_asoc_ssp4 = {
-	.name		= "pxa-ssp-dai",
-	.id		= 3,
-};
-
-struct platform_device pxa_device_asoc_platform = {
-	.name		= "pxa-pcm-audio",
-	.id		= -1,
-};
-
-static struct resource pxa_rtc_resources[] = {
-	[0] = {
-		.start  = 0x40900000,
-		.end	= 0x40900000 + 0x3b,
-		.flags  = IORESOURCE_MEM,
-	},
-	[1] = {
-		.start  = IRQ_RTC1Hz,
-		.end    = IRQ_RTC1Hz,
-		.name	= "rtc 1Hz",
-		.flags  = IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start  = IRQ_RTCAlrm,
-		.end    = IRQ_RTCAlrm,
-		.name	= "rtc alarm",
-		.flags  = IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa_device_rtc = {
-	.name		= "pxa-rtc",
-	.id		= -1,
-	.num_resources  = ARRAY_SIZE(pxa_rtc_resources),
-	.resource       = pxa_rtc_resources,
-};
-
-struct platform_device sa1100_device_rtc = {
-	.name		= "sa1100-rtc",
-	.id		= -1,
-	.num_resources  = ARRAY_SIZE(pxa_rtc_resources),
-	.resource       = pxa_rtc_resources,
-};
-
-#ifdef CONFIG_PXA25x
-
-static struct resource pxa25x_resource_pwm0[] = {
-	[0] = {
-		.start	= 0x40b00000,
-		.end	= 0x40b0000f,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-struct platform_device pxa25x_device_pwm0 = {
-	.name		= "pxa25x-pwm",
-	.id		= 0,
-	.resource	= pxa25x_resource_pwm0,
-	.num_resources	= ARRAY_SIZE(pxa25x_resource_pwm0),
-};
-
-static struct resource pxa25x_resource_pwm1[] = {
-	[0] = {
-		.start	= 0x40c00000,
-		.end	= 0x40c0000f,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-struct platform_device pxa25x_device_pwm1 = {
-	.name		= "pxa25x-pwm",
-	.id		= 1,
-	.resource	= pxa25x_resource_pwm1,
-	.num_resources	= ARRAY_SIZE(pxa25x_resource_pwm1),
-};
-
-static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa25x_resource_ssp[] = {
-	[0] = {
-		.start	= 0x41000000,
-		.end	= 0x4100001f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SSP,
-		.end	= IRQ_SSP,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa25x_device_ssp = {
-	.name		= "pxa25x-ssp",
-	.id		= 0,
-	.dev		= {
-		.dma_mask = &pxa25x_ssp_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa25x_resource_ssp,
-	.num_resources	= ARRAY_SIZE(pxa25x_resource_ssp),
-};
-
-static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa25x_resource_nssp[] = {
-	[0] = {
-		.start	= 0x41400000,
-		.end	= 0x4140002f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_NSSP,
-		.end	= IRQ_NSSP,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa25x_device_nssp = {
-	.name		= "pxa25x-nssp",
-	.id		= 1,
-	.dev		= {
-		.dma_mask = &pxa25x_nssp_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa25x_resource_nssp,
-	.num_resources	= ARRAY_SIZE(pxa25x_resource_nssp),
-};
-
-static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa25x_resource_assp[] = {
-	[0] = {
-		.start	= 0x41500000,
-		.end	= 0x4150002f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_ASSP,
-		.end	= IRQ_ASSP,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa25x_device_assp = {
-	/* ASSP is basically equivalent to NSSP */
-	.name		= "pxa25x-nssp",
-	.id		= 2,
-	.dev		= {
-		.dma_mask = &pxa25x_assp_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa25x_resource_assp,
-	.num_resources	= ARRAY_SIZE(pxa25x_resource_assp),
-};
-#endif /* CONFIG_PXA25x */
-
-#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
-static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa27x_resource_ohci[] = {
-	[0] = {
-		.start  = 0x4C000000,
-		.end    = 0x4C00ff6f,
-		.flags  = IORESOURCE_MEM,
-	},
-	[1] = {
-		.start  = IRQ_USBH1,
-		.end    = IRQ_USBH1,
-		.flags  = IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa27x_device_ohci = {
-	.name		= "pxa27x-ohci",
-	.id		= -1,
-	.dev		= {
-		.dma_mask = &pxa27x_ohci_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.num_resources  = ARRAY_SIZE(pxa27x_resource_ohci),
-	.resource       = pxa27x_resource_ohci,
-};
-
-void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
-{
-	pxa_register_device(&pxa27x_device_ohci, info);
-}
-#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
-
-#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
-static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa27x_resource_ssp1[] = {
-	[0] = {
-		.start	= 0x41000000,
-		.end	= 0x4100003f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SSP,
-		.end	= IRQ_SSP,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa27x_device_ssp1 = {
-	.name		= "pxa27x-ssp",
-	.id		= 0,
-	.dev		= {
-		.dma_mask = &pxa27x_ssp1_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa27x_resource_ssp1,
-	.num_resources	= ARRAY_SIZE(pxa27x_resource_ssp1),
-};
-
-static u64 pxa27x_ssp2_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa27x_resource_ssp2[] = {
-	[0] = {
-		.start	= 0x41700000,
-		.end	= 0x4170003f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SSP2,
-		.end	= IRQ_SSP2,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa27x_device_ssp2 = {
-	.name		= "pxa27x-ssp",
-	.id		= 1,
-	.dev		= {
-		.dma_mask = &pxa27x_ssp2_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa27x_resource_ssp2,
-	.num_resources	= ARRAY_SIZE(pxa27x_resource_ssp2),
-};
-
-static u64 pxa27x_ssp3_dma_mask = DMA_BIT_MASK(32);
-
-static struct resource pxa27x_resource_ssp3[] = {
-	[0] = {
-		.start	= 0x41900000,
-		.end	= 0x4190003f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SSP3,
-		.end	= IRQ_SSP3,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device pxa27x_device_ssp3 = {
-	.name		= "pxa27x-ssp",
-	.id		= 2,
-	.dev		= {
-		.dma_mask = &pxa27x_ssp3_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(32),
-	},
-	.resource	= pxa27x_resource_ssp3,
-	.num_resources	= ARRAY_SIZE(pxa27x_resource_ssp3),
-};
-
-static struct resource pxa27x_resource_pwm0[] = {
-	[0] = {
-		.start	= 0x40b00000,
-		.end	= 0x40b0001f,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-struct platform_device pxa27x_device_pwm0 = {
-	.name		= "pxa27x-pwm",
-	.id		= 0,
-	.resource	= pxa27x_resource_pwm0,
-	.num_resources	= ARRAY_SIZE(pxa27x_resource_pwm0),
-};
-
-static struct resource pxa27x_resource_pwm1[] = {
-	[0] = {
-		.start	= 0x40c00000,
-		.end	= 0x40c0001f,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-struct platform_device pxa27x_device_pwm1 = {
-	.name		= "pxa27x-pwm",
-	.id		= 1,
-	.resource	= pxa27x_resource_pwm1,
-	.num_resources	= ARRAY_SIZE(pxa27x_resource_pwm1),
-};
-#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
-
-#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
-const struct software_node pxa2xx_gpiochip_node = {
-	.name	= "gpio-pxa",
-};
-
-struct resource pxa_resource_gpio[] = {
-	{
-		.start	= 0x40e00000,
-		.end	= 0x40e0ffff,
-		.flags	= IORESOURCE_MEM,
-	}, {
-		.start	= IRQ_GPIO0,
-		.end	= IRQ_GPIO0,
-		.name	= "gpio0",
-		.flags	= IORESOURCE_IRQ,
-	}, {
-		.start	= IRQ_GPIO1,
-		.end	= IRQ_GPIO1,
-		.name	= "gpio1",
-		.flags	= IORESOURCE_IRQ,
-	}, {
-		.start	= IRQ_GPIO_2_x,
-		.end	= IRQ_GPIO_2_x,
-		.name	= "gpio_mux",
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static struct pxa_gpio_platform_data pxa2xx_gpio_info = {
-	.irq_base	= PXA_GPIO_TO_IRQ(0),
-	.gpio_set_wake	= gpio_set_wake,
-};
-
-struct platform_device pxa25x_device_gpio = {
-	.name		= "pxa25x-gpio",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(pxa_resource_gpio),
-	.resource	= pxa_resource_gpio,
-	.dev		= {
-		.platform_data	= &pxa2xx_gpio_info,
-	},
-};
-
-struct platform_device pxa27x_device_gpio = {
-	.name		= "pxa27x-gpio",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(pxa_resource_gpio),
-	.resource	= pxa_resource_gpio,
-	.dev		= {
-		.platform_data	= &pxa2xx_gpio_info,
-	},
-};
-#endif /* CONFIG_PXA25x || CONFIG_PXA27x */
-
-static struct resource pxa_dma_resource[] = {
-	[0] = {
-		.start	= 0x40000000,
-		.end	= 0x4000ffff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_DMA,
-		.end	= IRQ_DMA,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static u64 pxadma_dmamask = 0xffffffffUL;
-
-static struct platform_device pxa2xx_pxa_dma = {
-	.name		= "pxa-dma",
-	.id		= 0,
-	.dev		= {
-		.dma_mask = &pxadma_dmamask,
-		.coherent_dma_mask = 0xffffffff,
-	},
-	.num_resources	= ARRAY_SIZE(pxa_dma_resource),
-	.resource	= pxa_dma_resource,
-};
-
-void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata)
-{
-	pxa_register_device(&pxa2xx_pxa_dma, dma_pdata);
-}
 
 void __init pxa_register_wdt(unsigned int reset_status)
 {
arch/arm/mach-pxa/devices.h deleted +0 -68
deleted file mode 100644
index 72c556ff67db..000000000000
@@ -1,68 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#define PDMA_FILTER_PARAM(_prio, _requestor) (&(struct pxad_param) { \
-	.prio = PXAD_PRIO_##_prio, .drcmr = _requestor })
-struct mmp_dma_platdata;
-
-extern struct platform_device pxa_device_pmu;
-extern struct platform_device pxa3xx_device_mci2;
-extern struct platform_device pxa3xx_device_mci3;
-extern struct platform_device pxa25x_device_udc;
-extern struct platform_device pxa27x_device_udc;
-extern struct platform_device pxa_device_fb;
-extern struct platform_device pxa_device_ffuart;
-extern struct platform_device pxa_device_btuart;
-extern struct platform_device pxa_device_stuart;
-extern struct platform_device pxa_device_hwuart;
-extern struct platform_device pxa_device_i2c;
-extern struct platform_device pxa_device_i2s;
-extern struct platform_device sa1100_device_rtc;
-extern struct platform_device pxa_device_rtc;
-extern struct platform_device pxa_device_ac97;
-
-extern struct platform_device pxa27x_device_i2c_power;
-extern struct platform_device pxa27x_device_ohci;
-extern struct platform_device pxa27x_device_keypad;
-
-extern struct platform_device pxa25x_device_ssp;
-extern struct platform_device pxa25x_device_nssp;
-extern struct platform_device pxa25x_device_assp;
-extern struct platform_device pxa27x_device_ssp1;
-extern struct platform_device pxa27x_device_ssp2;
-extern struct platform_device pxa27x_device_ssp3;
-extern struct platform_device pxa3xx_device_ssp1;
-extern struct platform_device pxa3xx_device_ssp2;
-extern struct platform_device pxa3xx_device_ssp3;
-extern struct platform_device pxa3xx_device_ssp4;
-
-extern struct platform_device pxa25x_device_pwm0;
-extern struct platform_device pxa25x_device_pwm1;
-extern struct platform_device pxa27x_device_pwm0;
-extern struct platform_device pxa27x_device_pwm1;
-
-extern struct platform_device pxa3xx_device_nand;
-extern struct platform_device pxa3xx_device_i2c_power;
-
-extern struct platform_device pxa3xx_device_gcu;
-
-extern struct platform_device pxa_device_asoc_platform;
-extern struct platform_device pxa_device_asoc_ssp1;
-extern struct platform_device pxa_device_asoc_ssp2;
-extern struct platform_device pxa_device_asoc_ssp3;
-extern struct platform_device pxa_device_asoc_ssp4;
-
-extern struct platform_device pxa25x_device_gpio;
-extern struct platform_device pxa27x_device_gpio;
-
-extern const struct software_node pxa2xx_gpiochip_node;
-
-void __init pxa_register_device(struct platform_device *dev, void *data);
-void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata);
-
-struct i2c_pxa_platform_data;
-extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
-#ifdef CONFIG_PXA27x
-extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info);
-#endif
-#ifdef CONFIG_PXA3xx
-extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info);
-#endif
arch/arm/mach-pxa/generic.h +0 -5
index caad4fca8de3..239d1b4119cc 100644
@@ -38,11 +38,6 @@ extern struct syscore pxa_irq_syscore;
 extern struct syscore pxa2xx_mfp_syscore;
 extern struct syscore pxa3xx_mfp_syscore;
 
-void __init pxa_set_ffuart_info(void *info);
-void __init pxa_set_btuart_info(void *info);
-void __init pxa_set_stuart_info(void *info);
-void __init pxa_set_hwuart_info(void *info);
-
 void pxa_restart(enum reboot_mode, const char *);
 
 #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
arch/arm/mach-pxa/gumstix.c deleted +0 -237
deleted file mode 100644
index 7ab0cb015d1b..000000000000
@@ -1,237 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- *  linux/arch/arm/mach-pxa/gumstix.c
- *
- *  Support for the Gumstix motherboards.
- *
- *  Original Author:	Craig Hughes
- *  Created:	Feb 14, 2008
- *  Copyright:	Craig Hughes
- *
- *  Implemented based on lubbock.c by Nicolas Pitre and code from Craig
- *  Hughes
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/interrupt.h>
-#include <linux/delay.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/gpio/machine.h>
-#include <linux/gpio/property.h>
-#include <linux/gpio/legacy.h>
-#include <linux/err.h>
-#include <linux/clk.h>
-
-#include <asm/setup.h>
-#include <asm/page.h>
-#include <asm/mach-types.h>
-#include <asm/irq.h>
-#include <linux/sizes.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/mach/irq.h>
-#include <asm/mach/flash.h>
-
-#include "pxa25x.h"
-#include <linux/platform_data/mmc-pxamci.h>
-#include "gumstix.h"
-#include "devices.h"
-
-#include "generic.h"
-
-static struct resource flash_resource = {
-	.start	= 0x00000000,
-	.end	= SZ_64M - 1,
-	.flags	= IORESOURCE_MEM,
-};
-
-static struct mtd_partition gumstix_partitions[] = {
-	{
-		.name =		"Bootloader",
-		.size =		0x00040000,
-		.offset =	0,
-		.mask_flags =	MTD_WRITEABLE  /* force read-only */
-	} , {
-		.name =		"rootfs",
-		.size =		MTDPART_SIZ_FULL,
-		.offset =	MTDPART_OFS_APPEND
-	}
-};
-
-static struct flash_platform_data gumstix_flash_data = {
-	.map_name	= "cfi_probe",
-	.parts		= gumstix_partitions,
-	.nr_parts	= ARRAY_SIZE(gumstix_partitions),
-	.width		= 2,
-};
-
-static struct platform_device gumstix_flash_device = {
-	.name		= "pxa2xx-flash",
-	.id		= 0,
-	.dev = {
-		.platform_data = &gumstix_flash_data,
-	},
-	.resource = &flash_resource,
-	.num_resources = 1,
-};
-
-static struct platform_device *devices[] __initdata = {
-	&gumstix_flash_device,
-};
-
-#ifdef CONFIG_MMC_PXA
-static struct pxamci_platform_data gumstix_mci_platform_data = {
-	.ocr_mask		= MMC_VDD_32_33|MMC_VDD_33_34,
-};
-
-static void __init gumstix_mmc_init(void)
-{
-	pxa_set_mci_info(&gumstix_mci_platform_data, NULL);
-}
-#else
-static void __init gumstix_mmc_init(void)
-{
-	pr_debug("Gumstix mmc disabled\n");
-}
-#endif
-
-#if IS_ENABLED(CONFIG_USB_PXA25X)
-static const struct property_entry gumstix_vbus_props[] __initconst = {
-	PROPERTY_ENTRY_GPIO("vbus-gpios", &pxa2xx_gpiochip_node,
-			    GPIO_GUMSTIX_USB_GPIOn, GPIO_ACTIVE_HIGH),
-	PROPERTY_ENTRY_GPIO("pullup-gpios", &pxa2xx_gpiochip_node,
-			    GPIO_GUMSTIX_USB_GPIOx, GPIO_ACTIVE_HIGH),
-	{ }
-};
-
-static const struct platform_device_info gumstix_gpio_vbus_info __initconst = {
-	.name		= "gpio-vbus",
-	.id		= PLATFORM_DEVID_NONE,
-	.properties	= gumstix_vbus_props,
-};
-
-static void __init gumstix_udc_init(void)
-{
-	platform_device_register_full(&gumstix_gpio_vbus_info);
-}
-#else
-static void gumstix_udc_init(void)
-{
-	pr_debug("Gumstix udc is disabled\n");
-}
-#endif
-
-#ifdef CONFIG_BT
-/* Normally, the bootloader would have enabled this 32kHz clock but many
-** boards still have u-boot 1.1.4 so we check if it has been turned on and
-** if not, we turn it on with a warning message. */
-static void gumstix_setup_bt_clock(void)
-{
-	int timeout = 500;
-
-	if (!(readl(OSCC) & OSCC_OOK))
-		pr_warn("32kHz clock was not on. Bootloader may need to be updated\n");
-	else
-		return;
-
-	writel(readl(OSCC) | OSCC_OON, OSCC);
-	do {
-		if (readl(OSCC) & OSCC_OOK)
-			break;
-		udelay(1);
-	} while (--timeout);
-	if (!timeout)
-		pr_err("Failed to start 32kHz clock\n");
-}
-
-static void __init gumstix_bluetooth_init(void)
-{
-	int err;
-
-	gumstix_setup_bt_clock();
-
-	err = gpio_request(GPIO_GUMSTIX_BTRESET, "BTRST");
-	if (err) {
-		pr_err("gumstix: failed request gpio for bluetooth reset\n");
-		return;
-	}
-
-	err = gpio_direction_output(GPIO_GUMSTIX_BTRESET, 1);
-	if (err) {
-		pr_err("gumstix: can't reset bluetooth\n");
-		return;
-	}
-	gpio_set_value(GPIO_GUMSTIX_BTRESET, 0);
-	udelay(100);
-	gpio_set_value(GPIO_GUMSTIX_BTRESET, 1);
-}
-#else
-static void gumstix_bluetooth_init(void)
-{
-	pr_debug("Gumstix Bluetooth is disabled\n");
-}
-#endif
-
-static unsigned long gumstix_pin_config[] __initdata = {
-	GPIO12_32KHz,
-	/* BTUART */
-	GPIO42_HWUART_RXD,
-	GPIO43_HWUART_TXD,
-	GPIO44_HWUART_CTS,
-	GPIO45_HWUART_RTS,
-	/* MMC */
-	GPIO6_MMC_CLK,
-	GPIO53_MMC_CLK,
-	GPIO8_MMC_CS0,
-};
-
-int __attribute__((weak)) am200_init(void)
-{
-	return 0;
-}
-
-int __attribute__((weak)) am300_init(void)
-{
-	return 0;
-}
-
-static void __init carrier_board_init(void)
-{
-	/*
-	 * put carrier/expansion board init here if
-	 * they cannot be detected programatically
-	 */
-	am200_init();
-	am300_init();
-}
-
-static void __init gumstix_init(void)
-{
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config));
-
-	pxa_set_ffuart_info(NULL);
-	pxa_set_btuart_info(NULL);
-	pxa_set_stuart_info(NULL);
-	pxa_set_hwuart_info(NULL);
-
-	gumstix_bluetooth_init();
-	gumstix_udc_init();
-	gumstix_mmc_init();
-	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
-	carrier_board_init();
-}
-
-MACHINE_START(GUMSTIX, "Gumstix")
-	.atag_offset	= 0x100, /* match u-boot bi_boot_params */
-	.map_io		= pxa25x_map_io,
-	.nr_irqs	= PXA_NR_IRQS,
-	.init_irq	= pxa25x_init_irq,
-	.init_time	= pxa_timer_init,
-	.init_machine	= gumstix_init,
-	.restart	= pxa_restart,
-MACHINE_END
arch/arm/mach-pxa/gumstix.h deleted +0 -89
deleted file mode 100644
index 9005b3c0aabd..000000000000
@@ -1,89 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-pxa/include/mach/gumstix.h
- */
-
-#include "irqs.h" /* PXA_GPIO_TO_IRQ */
-
-/* BTRESET - Reset line to Bluetooth module, active low signal. */
-#define GPIO_GUMSTIX_BTRESET          7
-#define GPIO_GUMSTIX_BTRESET_MD		(GPIO_GUMSTIX_BTRESET | GPIO_OUT)
-
-
-/*
-GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
-interrupt signal for determining cable presence. On the gumstix F,
-this moves to GPIO17 and GPIO37. */
-
-/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
-has detected a cable insertion; driven low otherwise. */
-
-#define GPIO_GUMSTIX_USB_GPIOn		35
-#define GPIO_GUMSTIX_USB_GPIOx		41
-
-/* usb state change */
-#define GUMSTIX_USB_INTR_IRQ		PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
-
-#define GPIO_GUMSTIX_USB_GPIOn_MD	(GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
-#define GPIO_GUMSTIX_USB_GPIOx_CON_MD	(GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
-#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD	(GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
-
-/*
- * SD/MMC definitions
- */
-#define GUMSTIX_GPIO_nSD_WP		22 /* SD Write Protect */
-#define GUMSTIX_GPIO_nSD_DETECT		11 /* MMC/SD Card Detect */
-#define GUMSTIX_IRQ_GPIO_nSD_DETECT	PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
-
-/*
- * SMC Ethernet definitions
- * ETH_RST provides a hardware reset line to the ethernet chip
- * ETH is the IRQ line in from the ethernet chip to the PXA
- */
-#define GPIO_GUMSTIX_ETH0_RST		80
-#define GPIO_GUMSTIX_ETH0_RST_MD	(GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
-#define GPIO_GUMSTIX_ETH1_RST		52
-#define GPIO_GUMSTIX_ETH1_RST_MD	(GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
-
-#define GPIO_GUMSTIX_ETH0		36
-#define GPIO_GUMSTIX_ETH0_MD		(GPIO_GUMSTIX_ETH0 | GPIO_IN)
-#define GUMSTIX_ETH0_IRQ		PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
-#define GPIO_GUMSTIX_ETH1		27
-#define GPIO_GUMSTIX_ETH1_MD		(GPIO_GUMSTIX_ETH1 | GPIO_IN)
-#define GUMSTIX_ETH1_IRQ		PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
-
-
-/* CF reset line */
-#define GPIO8_RESET			8
-
-/* CF slot 0 */
-#define GPIO4_nBVD1			4
-#define GPIO4_nSTSCHG			GPIO4_nBVD1
-#define GPIO11_nCD			11
-#define GPIO26_PRDY_nBSY		26
-#define GUMSTIX_S0_nSTSCHG_IRQ		PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG)
-#define GUMSTIX_S0_nCD_IRQ		PXA_GPIO_TO_IRQ(GPIO11_nCD)
-#define GUMSTIX_S0_PRDY_nBSY_IRQ	PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY)
-
-/* CF slot 1 */
-#define GPIO18_nBVD1			18
-#define GPIO18_nSTSCHG			GPIO18_nBVD1
-#define GPIO36_nCD			36
-#define GPIO27_PRDY_nBSY		27
-#define GUMSTIX_S1_nSTSCHG_IRQ		PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG)
-#define GUMSTIX_S1_nCD_IRQ		PXA_GPIO_TO_IRQ(GPIO36_nCD)
-#define GUMSTIX_S1_PRDY_nBSY_IRQ	PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY)
-
-/* CF GPIO line modes */
-#define GPIO4_nSTSCHG_MD		(GPIO4_nSTSCHG | GPIO_IN)
-#define GPIO8_RESET_MD			(GPIO8_RESET | GPIO_OUT)
-#define GPIO11_nCD_MD			(GPIO11_nCD | GPIO_IN)
-#define GPIO18_nSTSCHG_MD		(GPIO18_nSTSCHG | GPIO_IN)
-#define GPIO26_PRDY_nBSY_MD		(GPIO26_PRDY_nBSY | GPIO_IN)
-#define GPIO27_PRDY_nBSY_MD		(GPIO27_PRDY_nBSY | GPIO_IN)
-#define GPIO36_nCD_MD			(GPIO36_nCD | GPIO_IN)
-
-/* for expansion boards that can't be programatically detected */
-extern int am200_init(void);
-extern int am300_init(void);
-
arch/arm/mach-pxa/pxa25x.c +0 -59
index a273f0af095e..de6a306cf0e2 100644
@@ -25,7 +25,6 @@
 #include <linux/syscore_ops.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
-#include <linux/platform_data/mmp_dma.h>
 #include <linux/soc/pxa/cpu.h>
 #include <linux/soc/pxa/smemc.h>
 
@@ -39,7 +38,6 @@
 #include "smemc.h"
 
 #include "generic.h"
-#include "devices.h"
 
 /*
  * Various clock factors driven by the CCCR register.
@@ -178,53 +176,6 @@ void __init pxa25x_map_io(void)
 	pxa25x_get_clk_frequency_khz(1);
 }
 
-static struct platform_device *pxa25x_devices[] __initdata = {
-	&pxa25x_device_gpio,
-	&pxa25x_device_udc,
-	&pxa_device_pmu,
-	&pxa_device_i2s,
-	&sa1100_device_rtc,
-	&pxa25x_device_ssp,
-	&pxa25x_device_nssp,
-	&pxa25x_device_assp,
-	&pxa25x_device_pwm0,
-	&pxa25x_device_pwm1,
-	&pxa_device_asoc_platform,
-};
-
-static const struct dma_slave_map pxa25x_slave_map[] = {
-	/* PXA25x, PXA27x and PXA3xx common entries */
-	{ "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) },
-	{ "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) },
-	{ "pxa2xx-ac97", "pcm_pcm_aux_mono_out",
-	  PDMA_FILTER_PARAM(LOWEST, 10) },
-	{ "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) },
-	{ "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) },
-	{ "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 13) },
-	{ "pxa-ssp-dai.1", "tx", PDMA_FILTER_PARAM(LOWEST, 14) },
-	{ "pxa-ssp-dai.2", "rx", PDMA_FILTER_PARAM(LOWEST, 15) },
-	{ "pxa-ssp-dai.2", "tx", PDMA_FILTER_PARAM(LOWEST, 16) },
-	{ "pxa2xx-ir", "rx", PDMA_FILTER_PARAM(LOWEST, 17) },
-	{ "pxa2xx-ir", "tx", PDMA_FILTER_PARAM(LOWEST, 18) },
-	{ "pxa2xx-mci.0", "rx", PDMA_FILTER_PARAM(LOWEST, 21) },
-	{ "pxa2xx-mci.0", "tx", PDMA_FILTER_PARAM(LOWEST, 22) },
-
-	/* PXA25x specific map */
-	{ "pxa25x-ssp.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) },
-	{ "pxa25x-ssp.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) },
-	{ "pxa25x-nssp.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) },
-	{ "pxa25x-nssp.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) },
-	{ "pxa25x-nssp.2", "rx", PDMA_FILTER_PARAM(LOWEST, 23) },
-	{ "pxa25x-nssp.2", "tx", PDMA_FILTER_PARAM(LOWEST, 24) },
-};
-
-static struct mmp_dma_platdata pxa25x_dma_pdata = {
-	.dma_channels	= 16,
-	.nb_requestors	= 40,
-	.slave_map	= pxa25x_slave_map,
-	.slave_map_cnt	= ARRAY_SIZE(pxa25x_slave_map),
-};
-
 static int __init pxa25x_init(void)
 {
 	int ret = 0;
@@ -237,16 +188,6 @@ static int __init pxa25x_init(void)
 
 		register_syscore(&pxa_irq_syscore);
 		register_syscore(&pxa2xx_mfp_syscore);
-
-		if (!of_have_populated_dt()) {
-			software_node_register(&pxa2xx_gpiochip_node);
-			pxa25x_device_gpio.dev.fwnode = software_node_fwnode(
-								&pxa2xx_gpiochip_node);
-
-			pxa2xx_set_dmac_info(&pxa25x_dma_pdata);
-			ret = platform_add_devices(pxa25x_devices,
-						   ARRAY_SIZE(pxa25x_devices));
-		}
 	}
 
 	return ret;
arch/arm/mach-pxa/pxa27x.c +0 -77
index 814e0a12f38a..617af225628b 100644
@@ -21,8 +21,6 @@
 #include <linux/syscore_ops.h>
 #include <linux/io.h>
 #include <linux/irq.h>
-#include <linux/platform_data/i2c-pxa.h>
-#include <linux/platform_data/mmp_dma.h>
 #include <linux/soc/pxa/cpu.h>
 #include <linux/soc/pxa/smemc.h>
 
@@ -33,14 +31,12 @@
 #include "pxa27x.h"
 #include "reset.h"
 #include <linux/platform_data/pxa2xx_udc.h>
-#include <linux/platform_data/usb-ohci-pxa27x.h>
 #include <linux/platform_data/asoc-pxa.h>
 #include "pm.h"
 #include "addr-map.h"
 #include "smemc.h"
 
 #include "generic.h"
-#include "devices.h"
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 
@@ -272,90 +268,17 @@ void __init pxa27x_map_io(void)
 	pxa27x_get_clk_frequency_khz(1);
 }
 
-/*
- * device registration specific to PXA27x.
- */
-void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
-{
-	local_irq_disable();
-	PCFR |= PCFR_PI2CEN;
-	local_irq_enable();
-	pxa_register_device(&pxa27x_device_i2c_power, info);
-}
-
-static struct platform_device *devices[] __initdata = {
-	&pxa27x_device_gpio,
-	&pxa27x_device_udc,
-	&pxa_device_pmu,
-	&pxa_device_i2s,
-	&pxa_device_asoc_ssp1,
-	&pxa_device_asoc_ssp2,
-	&pxa_device_asoc_ssp3,
-	&pxa_device_asoc_platform,
-	&pxa_device_rtc,
-	&pxa27x_device_ssp1,
-	&pxa27x_device_ssp2,
-	&pxa27x_device_ssp3,
-	&pxa27x_device_pwm0,
-	&pxa27x_device_pwm1,
-};
-
-static const struct dma_slave_map pxa27x_slave_map[] = {
-	/* PXA25x, PXA27x and PXA3xx common entries */
-	{ "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) },
-	{ "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) },
-	{ "pxa2xx-ac97", "pcm_pcm_aux_mono_out",
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/pxa300.c +0 -1
index f77ec118d5b9..0022bf235114 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/pxa320.c +0 -1
index e372e6c118de..2e84afd94467 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/pxa3xx.c +0 -6
index 06c578ea658e..46f4efdfb514 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/sharpsl_pm.c deleted +0 -941
deleted file mode 100644
index a611eea70e5a..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/sharpsl_pm.h deleted +0 -108
deleted file mode 100644
index 623167f30ec2..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/spitz.c deleted +0 -1174
deleted file mode 100644
index 5eaf38243b9e..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/spitz.h deleted +0 -185
deleted file mode 100644
index 04828d8918aa..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mach-pxa/spitz_pm.c deleted +0 -257
deleted file mode 100644
index 806847c36549..000000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#38 lore raw

PATCH 5/13 ARM: orion/dove/mv78xx0: remove all board files

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The 'orion' platform is the predecessor to what linux now calls the 'mvebu' line of Marvell SoCs, and originally covered orion5x, mv78xx0, kirkwood, dove and a few others that do not have any upstream support at the moment.

Only a few board files remain here, these are the ones left in 2022 board file purge because they had some level of support in Debian or OpenWRT, mostly for commercial NAS or router boxes. This distro support is now gone, and nobody has converted the board files to devicetree, though the orion5x and dove platforms also come with devicetree support for some other machines.

Cc Andrew Lunn <[email protected]>
Cc Sebastian Hesselbarth <[email protected]>
Cc Gregory Clement <[email protected]>
Cc Alexander Clouter <[email protected]>
Cc Jeremy J. Peper <[email protected]>
Cc Damien Le Moal <[email protected]>
Cc Niklas Cassel <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc "Krzysztof Wilczyński" <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
Cc Rob Herring <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Vinod Koul <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Mark Brown <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
Cc Thomas Weissschuh <[email protected]>
---
 MAINTAINERS                                   |   2 -
 arch/arm/Kconfig                              |   2 -
 arch/arm/Kconfig.debug                        |   2 +-
 arch/arm/Makefile                             |   2 -
 arch/arm/configs/dove_defconfig               | 134 ---
 arch/arm/configs/mv78xx0_defconfig            | 120 ---
 arch/arm/mach-dove/Kconfig                    |  32 -
 arch/arm/mach-dove/Makefile                   |   7 -
 arch/arm/mach-dove/bridge-regs.h              |  50 --
 arch/arm/mach-dove/cm-a510.c                  |  94 --
 arch/arm/mach-dove/common.c                   | 449 ----------
 arch/arm/mach-dove/common.h                   |  46 -
 arch/arm/mach-dove/dove.h                     | 185 ----
 arch/arm/mach-dove/irq.c                      |  81 --
 arch/arm/mach-dove/irqs.h                     |  89 --
 arch/arm/mach-dove/mpp.c                      | 159 ----
 arch/arm/mach-dove/mpp.h                      | 197 -----
 arch/arm/mach-dove/pcie.c                     | 226 -----
 arch/arm/mach-dove/pm.h                       |  58 --
 arch/arm/mach-mv78xx0/Kconfig                 |  27 -
 arch/arm/mach-mv78xx0/Makefile                |   5 -
 arch/arm/mach-mv78xx0/bridge-regs.h           |  31 -
 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c     | 183 ----
 arch/arm/mach-mv78xx0/common.c                | 444 ----------
 arch/arm/mach-mv78xx0/common.h                |  54 --
 arch/arm/mach-mv78xx0/irq.c                   |  69 --
 arch/arm/mach-mv78xx0/irqs.h                  |  87 --
 arch/arm/mach-mv78xx0/mpp.c                   |  34 -
 arch/arm/mach-mv78xx0/mpp.h                   | 337 -------
 arch/arm/mach-mv78xx0/mv78xx0.h               | 134 ---
 arch/arm/mach-mv78xx0/pcie.c                  | 280 ------
 arch/arm/mach-orion5x/Kconfig                 |  95 --
 arch/arm/mach-orion5x/Makefile                |   9 -
 arch/arm/mach-orion5x/board-dt.c              |   3 +-
 arch/arm/mach-orion5x/common.c                | 238 +----
 arch/arm/mach-orion5x/common.h                |  15 -
 arch/arm/mach-orion5x/dns323-setup.c          | 757 ----------------
 arch/arm/mach-orion5x/kurobox_pro-setup.c     | 407 ---------
 arch/arm/mach-orion5x/mv2120-setup.c          | 256 ------
 arch/arm/mach-orion5x/net2big-setup.c         | 444 ----------
 arch/arm/mach-orion5x/pci.c                   |   1 -
 .../arm/mach-orion5x/terastation_pro2-setup.c | 366 --------
 arch/arm/mach-orion5x/ts209-setup.c           | 331 -------
 arch/arm/mach-orion5x/ts409-setup.c           | 329 -------
 arch/arm/mach-orion5x/ts78xx-fpga.h           |  42 -
 arch/arm/mach-orion5x/ts78xx-setup.c          | 574 ------------
 arch/arm/mach-orion5x/tsx09-common.c          | 129 ---
 arch/arm/mach-orion5x/tsx09-common.h          |  21 -
 arch/arm/mm/Kconfig                           |   2 +-
 arch/arm/plat-orion/Makefile                  |   2 +-
 arch/arm/plat-orion/common.c                  | 826 ------------------
 arch/arm/plat-orion/include/plat/addr-map.h   |  54 --
 arch/arm/plat-orion/include/plat/common.h     | 104 ---
 arch/arm/plat-orion/include/plat/time.h       |  20 -
 arch/arm/plat-orion/pcie.c                    |   1 -
 arch/arm/plat-orion/time.c                    | 238 -----
 drivers/ata/Kconfig                           |   3 +-
 drivers/mmc/host/Kconfig                      |   2 +-
 drivers/pci/controller/Kconfig                |   2 +-
 drivers/phy/marvell/Kconfig                   |   2 +-
 drivers/rtc/Kconfig                           |   2 +-
 drivers/soc/Makefile                          |   1 -
 drivers/thermal/Kconfig                       |   2 +-
 drivers/watchdog/Kconfig                      |   2 +-
 sound/soc/kirkwood/Kconfig                    |   2 +-
 65 files changed, 14 insertions(+), 8888 deletions(-)
 delete mode 100644 arch/arm/configs/dove_defconfig
 delete mode 100644 arch/arm/configs/mv78xx0_defconfig
 delete mode 100644 arch/arm/mach-dove/Kconfig
 delete mode 100644 arch/arm/mach-dove/Makefile
 delete mode 100644 arch/arm/mach-dove/bridge-regs.h
 delete mode 100644 arch/arm/mach-dove/cm-a510.c
 delete mode 100644 arch/arm/mach-dove/common.c
 delete mode 100644 arch/arm/mach-dove/common.h
 delete mode 100644 arch/arm/mach-dove/dove.h
 delete mode 100644 arch/arm/mach-dove/irq.c
 delete mode 100644 arch/arm/mach-dove/irqs.h
 delete mode 100644 arch/arm/mach-dove/mpp.c
 delete mode 100644 arch/arm/mach-dove/mpp.h
 delete mode 100644 arch/arm/mach-dove/pcie.c
 delete mode 100644 arch/arm/mach-dove/pm.h
 delete mode 100644 arch/arm/mach-mv78xx0/Kconfig
 delete mode 100644 arch/arm/mach-mv78xx0/Makefile
 delete mode 100644 arch/arm/mach-mv78xx0/bridge-regs.h
 delete mode 100644 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
 delete mode 100644 arch/arm/mach-mv78xx0/common.c
 delete mode 100644 arch/arm/mach-mv78xx0/common.h
 delete mode 100644 arch/arm/mach-mv78xx0/irq.c
 delete mode 100644 arch/arm/mach-mv78xx0/irqs.h
 delete mode 100644 arch/arm/mach-mv78xx0/mpp.c
 delete mode 100644 arch/arm/mach-mv78xx0/mpp.h
 delete mode 100644 arch/arm/mach-mv78xx0/mv78xx0.h
 delete mode 100644 arch/arm/mach-mv78xx0/pcie.c
 delete mode 100644 arch/arm/mach-orion5x/dns323-setup.c
 delete mode 100644 arch/arm/mach-orion5x/kurobox_pro-setup.c
 delete mode 100644 arch/arm/mach-orion5x/mv2120-setup.c
 delete mode 100644 arch/arm/mach-orion5x/net2big-setup.c
 delete mode 100644 arch/arm/mach-orion5x/terastation_pro2-setup.c
 delete mode 100644 arch/arm/mach-orion5x/ts209-setup.c
 delete mode 100644 arch/arm/mach-orion5x/ts409-setup.c
 delete mode 100644 arch/arm/mach-orion5x/ts78xx-fpga.h
 delete mode 100644 arch/arm/mach-orion5x/ts78xx-setup.c
 delete mode 100644 arch/arm/mach-orion5x/tsx09-common.c
 delete mode 100644 arch/arm/mach-orion5x/tsx09-common.h
 delete mode 100644 arch/arm/plat-orion/common.c
 delete mode 100644 arch/arm/plat-orion/include/plat/addr-map.h
 delete mode 100644 arch/arm/plat-orion/include/plat/common.h
 delete mode 100644 arch/arm/plat-orion/include/plat/time.h
 delete mode 100644 arch/arm/plat-orion/time.c
MAINTAINERS +0 -2
index 6e8fe7640064..028db7ad15ad 100644
@@ -3080,8 +3080,6 @@ F:	Documentation/devicetree/bindings/arm/marvell/marvell,orion5x.yaml
 F:	Documentation/devicetree/bindings/soc/dove/
 F:	arch/arm/boot/dts/marvell/dove*
 F:	arch/arm/boot/dts/marvell/orion5x*
-F:	arch/arm/mach-dove/
-F:	arch/arm/mach-mv78xx0/
 F:	arch/arm/mach-orion5x/
 F:	arch/arm/plat-orion/
 F:	drivers/bus/mvebu-mbus.c
arch/arm/Kconfig +0 -2
index 5770deca136d..da29afce309f 100644
@@ -393,8 +393,6 @@ source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-mstar/Kconfig"
 
-source "arch/arm/mach-mv78xx0/Kconfig"
-
 source "arch/arm/mach-mvebu/Kconfig"
 
 source "arch/arm/mach-mxs/Kconfig"
arch/arm/Kconfig.debug +1 -1
index 56c090840c5a..e2fc89055463 100644
@@ -583,7 +583,7 @@ choice
 
 	config DEBUG_MVEBU_UART0_ALTERNATE
 		bool "Kernel low-level debugging messages via MVEBU UART0 (new bootloaders)"
-		depends on ARCH_MVEBU || ARCH_DOVE || ARCH_MV78XX0 || ARCH_ORION5X
+		depends on ARCH_MVEBU || ARCH_ORION5X
 		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
arch/arm/Makefile +0 -2
index f5bc9ad7f6f5..5421a3ec3825 100644
@@ -179,7 +179,6 @@ machine-$(CONFIG_ARCH_BERLIN)		+= berlin
 machine-$(CONFIG_ARCH_CLPS711X)		+= clps711x
 machine-$(CONFIG_ARCH_DAVINCI)		+= davinci
 machine-$(CONFIG_ARCH_DIGICOLOR)	+= digicolor
-machine-$(CONFIG_ARCH_DOVE)		+= dove
 machine-$(CONFIG_ARCH_EXYNOS)		+= exynos
 machine-$(CONFIG_ARCH_GEMINI)		+= gemini
 machine-$(CONFIG_ARCH_HIGHBANK)		+= highbank
@@ -190,7 +189,6 @@ machine-$(CONFIG_ARCH_LPC18XX)		+= lpc18xx
 machine-$(CONFIG_ARCH_LPC32XX)		+= lpc32xx
 machine-$(CONFIG_ARCH_MESON)		+= meson
 machine-$(CONFIG_ARCH_MMP)		+= mmp
-machine-$(CONFIG_ARCH_MV78XX0)		+= mv78xx0
 machine-$(CONFIG_ARCH_MVEBU)		+= mvebu
 machine-$(CONFIG_ARCH_MXC)		+= imx
 machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
arch/arm/configs/dove_defconfig deleted +0 -134

134 lines not on this page · raw message

arch/arm/configs/mv78xx0_defconfig deleted +0 -120

120 lines not on this page · raw message

arch/arm/mach-dove/Kconfig deleted +0 -32
deleted file mode 100644
index f547120e223e..000000000000
@@ -1,32 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-menuconfig ARCH_DOVE
-	bool "Marvell Dove (DEPRECATED)" if ARCH_MULTI_V7
-	depends on ATAGS
-	select CPU_PJ4
-	select GPIOLIB
-	select MVEBU_MBUS
-	select PINCTRL
-	select PINCTRL_DOVE
-	select PLAT_ORION_LEGACY
-	select PM_GENERIC_DOMAINS if PM
-	select PCI_QUIRKS if PCI
-	help
-	  Support for the Marvell Dove SoC 88AP510 using board files.
-
-	  Support for this machine will be removed in early 2027, unless
-	  there is a strong reason to keep it. Users should migrate to
-	  the devicetree-enabled version (CONFIG_MACH_DOVE) instead.
-
-if ARCH_DOVE
-
-config DOVE_LEGACY
-	bool
-
-config MACH_CM_A510
-	bool "CompuLab CM-A510 Board"
-	select DOVE_LEGACY
-	help
-	  Say 'Y' here if you want your kernel to support the
-	  CompuLab CM-A510 Board.
-
-endif
arch/arm/mach-dove/Makefile deleted +0 -7
deleted file mode 100644
index 0d31390be069..000000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
-
-obj-y				+= common.o
-obj-$(CONFIG_DOVE_LEGACY)	+= irq.o mpp.o
-obj-$(CONFIG_PCI)		+= pcie.o
-obj-$(CONFIG_MACH_CM_A510)	+= cm-a510.o
arch/arm/mach-dove/bridge-regs.h deleted +0 -50

50 lines not on this page · raw message

arch/arm/mach-dove/cm-a510.c deleted +0 -94

94 lines not on this page · raw message

arch/arm/mach-dove/common.c deleted +0 -449

449 lines not on this page · raw message

arch/arm/mach-dove/common.h deleted +0 -46

46 lines not on this page · raw message

arch/arm/mach-dove/dove.h deleted +0 -185

185 lines not on this page · raw message

arch/arm/mach-dove/irq.c deleted +0 -81

81 lines not on this page · raw message

arch/arm/mach-dove/irqs.h deleted +0 -89

89 lines not on this page · raw message

arch/arm/mach-dove/mpp.c deleted +0 -159

159 lines not on this page · raw message

arch/arm/mach-dove/mpp.h deleted +0 -197

197 lines not on this page · raw message

arch/arm/mach-dove/pcie.c deleted +0 -226

226 lines not on this page · raw message

arch/arm/mach-dove/pm.h deleted +0 -58

58 lines not on this page · raw message

arch/arm/mach-mv78xx0/Kconfig deleted +0 -27
deleted file mode 100644
index 98b35f5d05ba..000000000000
@@ -1,27 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_MV78XX0
-	bool "Marvell MV78xx0 (DEPRECATED)"
-	depends on ARCH_MULTI_V5
-	depends on CPU_LITTLE_ENDIAN
-	depends on ATAGS
-	select CPU_FEROCEON
-	select GPIOLIB
-	select GPIOLIB_LEGACY
-	select MVEBU_MBUS
-	select FORCE_PCI
-	select PLAT_ORION_LEGACY
-	help
-	  Support for the following Marvell MV78xx0 series SoCs:
-	  MV781x0, MV782x0.
-
-	  This platform is scheduled for removal in early 2027.
-
-if ARCH_MV78XX0
-
-config MACH_TERASTATION_WXL
-	bool "Buffalo WLX (Terastation Duo) NAS"
-	help
-	  Say 'Y' here if you want your kernel to support the
-	  Buffalo WXL Nas.
-
-endif
arch/arm/mach-mv78xx0/Makefile deleted +0 -5
deleted file mode 100644
index ddee6ae501bb..000000000000
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
-
-obj-y				+= common.o mpp.o irq.o pcie.o
-obj-$(CONFIG_MACH_TERASTATION_WXL) += buffalo-wxl-setup.o
arch/arm/mach-mv78xx0/bridge-regs.h deleted +0 -31
deleted file mode 100644
index d57ac967c4b3..000000000000
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#ifndef __ASM_ARCH_BRIDGE_REGS_H
-#define __ASM_ARCH_BRIDGE_REGS_H
-
-#include "mv78xx0.h"
-
-#define CPU_CONTROL		(BRIDGE_VIRT_BASE + 0x0104)
-#define L2_WRITETHROUGH		0x00020000
-
-#define RSTOUTn_MASK		(BRIDGE_VIRT_BASE + 0x0108)
-#define RSTOUTn_MASK_PHYS	(BRIDGE_PHYS_BASE + 0x0108)
-#define SOFT_RESET_OUT_EN	0x00000004
-
-#define SYSTEM_SOFT_RESET	(BRIDGE_VIRT_BASE + 0x010c)
-#define SOFT_RESET		0x00000001
-
-#define BRIDGE_INT_TIMER1_CLR	(~0x0004)
-
-#define IRQ_VIRT_BASE		(BRIDGE_VIRT_BASE + 0x0200)
-#define IRQ_CAUSE_ERR_OFF	0x0000
-#define IRQ_CAUSE_LOW_OFF	0x0004
-#define IRQ_CAUSE_HIGH_OFF	0x0008
-#define IRQ_MASK_ERR_OFF	0x000c
-#define IRQ_MASK_LOW_OFF	0x0010
-#define IRQ_MASK_HIGH_OFF	0x0014
-
-#define TIMER_VIRT_BASE		(BRIDGE_VIRT_BASE + 0x0300)
-#define TIMER_PHYS_BASE		(BRIDGE_PHYS_BASE + 0x0300)
-
-#endif
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c deleted +0 -183

183 lines not on this page · raw message

arch/arm/mach-mv78xx0/common.c deleted +0 -444

444 lines not on this page · raw message

arch/arm/mach-mv78xx0/common.h deleted +0 -54

54 lines not on this page · raw message

arch/arm/mach-mv78xx0/irq.c deleted +0 -69

69 lines not on this page · raw message

arch/arm/mach-mv78xx0/irqs.h deleted +0 -87

87 lines not on this page · raw message

arch/arm/mach-mv78xx0/mpp.c deleted +0 -34
deleted file mode 100644
index 32bf590d79fe..000000000000
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * arch/arm/mach-mv78x00/mpp.c
- *
- * MPP functions for Marvell MV78x00 SoCs
- */
-#include <linux/gpio/consumer.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <plat/mpp.h>
-#include "mv78xx0.h"
-#include "common.h"
-#include "mpp.h"
-
-static unsigned int __init mv78xx0_variant(void)
-{
-	u32 dev, rev;
-
-	mv78xx0_pcie_id(&dev, &rev);
-
-	if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0)
-		return MPP_78100_A0_MASK;
-
-	printk(KERN_ERR "MPP setup: unknown mv78x00 variant "
-			"(dev %#x rev %#x)\n", dev, rev);
-	return 0;
-}
-
-void __init mv78xx0_mpp_conf(unsigned int *mpp_list)
-{
-	orion_mpp_conf(mpp_list, mv78xx0_variant(),
-		       MPP_MAX, DEV_BUS_VIRT_BASE);
-}
arch/arm/mach-mv78xx0/mpp.h deleted +0 -337

101 lines not on this page · raw message

arch/arm/mach-mv78xx0/mv78xx0.h deleted +0 -134

134 lines not on this page · raw message

arch/arm/mach-mv78xx0/pcie.c deleted +0 -280

280 lines not on this page · raw message

arch/arm/mach-orion5x/Kconfig +0 -95

95 lines not on this page · raw message

arch/arm/mach-orion5x/Makefile +0 -9
index 6f54d7fef27a..7e9634e04318 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-orion5x/board-dt.c +1 -2
index be47492c6640..2614213e2cbc 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-orion5x/common.c +2 -236

238 lines not on this page · raw message

arch/arm/mach-orion5x/common.h +0 -15
index 8df70e23aa82..4dc6c59bde99 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-orion5x/dns323-setup.c deleted +0 -757

757 lines not on this page · raw message

arch/arm/mach-orion5x/kurobox_pro-setup.c deleted +0 -407

407 lines not on this page · raw message

arch/arm/mach-orion5x/mv2120-setup.c deleted +0 -256

256 lines not on this page · raw message

arch/arm/mach-orion5x/net2big-setup.c deleted +0 -444

444 lines not on this page · raw message

arch/arm/mach-orion5x/pci.c +0 -1
index 06f5320036b1..3d1e6ad0e14b 100644

Lines of this file are not shown. View the raw message.

arch/arm/mach-orion5x/terastation_pro2-setup.c deleted +0 -366

366 lines not on this page · raw message

arch/arm/mach-orion5x/ts209-setup.c deleted +0 -331

331 lines not on this page · raw message

arch/arm/mach-orion5x/ts409-setup.c deleted +0 -329

329 lines not on this page · raw message

arch/arm/mach-orion5x/ts78xx-fpga.h deleted +0 -42

42 lines not on this page · raw message

arch/arm/mach-orion5x/ts78xx-setup.c deleted +0 -574

574 lines not on this page · raw message

arch/arm/mach-orion5x/tsx09-common.c deleted +0 -129

129 lines not on this page · raw message

arch/arm/mach-orion5x/tsx09-common.h deleted +0 -21
deleted file mode 100644
index 72bedc6b82fb..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/mm/Kconfig +1 -1
index 6574659dfb61..c40cdb2274ea 100644

Lines of this file are not shown. View the raw message.

arch/arm/plat-orion/Makefile +1 -1
index e8c7580df8ca..dfde39cdd992 100644

Lines of this file are not shown. View the raw message.

arch/arm/plat-orion/common.c deleted +0 -826

826 lines not on this page · raw message

arch/arm/plat-orion/include/plat/addr-map.h deleted +0 -54

54 lines not on this page · raw message

arch/arm/plat-orion/include/plat/common.h deleted +0 -104

104 lines not on this page · raw message

arch/arm/plat-orion/include/plat/time.h deleted +0 -20
deleted file mode 100644
index 07527e417c62..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/plat-orion/pcie.c +0 -1
index 8b8c06d2e9c4..e817f20409c4 100644

Lines of this file are not shown. View the raw message.

arch/arm/plat-orion/time.c deleted +0 -238

238 lines not on this page · raw message

drivers/ata/Kconfig +1 -2
index 28ca856ecc75..434cce3efd96 100644

Lines of this file are not shown. View the raw message.

drivers/mmc/host/Kconfig +1 -1
index 4f060d3e5636..d06903635335 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/Kconfig +1 -1
index d246bbe37948..7e550c474b7a 100644

Lines of this file are not shown. View the raw message.

drivers/phy/marvell/Kconfig +1 -1
index bccd72dccb77..c29d2d28ae55 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/Kconfig +1 -1
index 55ffee3d75ce..5cb6cdfe6015 100644

Lines of this file are not shown. View the raw message.

drivers/soc/Makefile +0 -1
index c9e689080ceb..6411b96d584c 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/Kconfig +1 -1
index 810eeccedfba..8cef9b658191 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/Kconfig +1 -1
index 0ab0dcc6d27d..d83bfb189705 100644

Lines of this file are not shown. View the raw message.

sound/soc/kirkwood/Kconfig +1 -1
index 924072e402c8..d59c5bb0b391 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.53.0

Part of the diff is not shown here. View the raw message.

maintainer Acked-by on v1 5/13
#39 lore raw

Re: [PATCH 05/13] ARM: orion/dove/mv78xx0: remove all board files

Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The 'orion' platform is the predecessor to what linux now calls the 'mvebu' line of Marvell SoCs, and originally covered orion5x, mv78xx0, kirkwood, dove and a few others that do not have any upstream support at the moment.

#40 lore raw

Re: [PATCH 05/13] ARM: orion/dove/mv78xx0: remove all board files

In reply to Arnd Bergmann
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Orphaned MAINTAINERS entry for the TS-78xx platform. - [Low] Legacy IRQ, MPP, and GPIO…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Orphaned MAINTAINERS entry for the TS-78xx platform.
- [Low] Legacy IRQ, MPP, and GPIO implementations are now unreachable dead code and unnecessarily compiled. --

commit 67c50c71bc1677d3a7c7538373463163afb7b062
Author: Arnd Bergmann <[email protected]>
Subject: ARM: orion/dove/mv78xx0: remove all board files

This commit removes the legacy board files for the Orion, Dove, and MV78xx0 platforms. These files were retained in 2022 due to support in Debian/OpenWRT, which is now gone.

MAINTAINERS F: Documentation/devicetree/bindings/arm/marvell/marvell,orion5x.yaml · line 3085

Quoted 13 lines
MAINTAINERS +0 -2
index fdd75b73bf293..2bb036e8ddcd9 100644
@@ -3080,8 +3080,6 @@ F:	Documentation/devicetree/bindings/arm/marvell/marvell,orion5x.yaml
 F:	Documentation/devicetree/bindings/soc/dove/
 F:	arch/arm/boot/dts/marvell/dove*
 F:	arch/arm/boot/dts/marvell/orion5x*
-F:	arch/arm/mach-dove/
-F:	arch/arm/mach-mv78xx0/
 F:	arch/arm/mach-orion5x/
 F:	arch/arm/plat-orion/
 F:	drivers/bus/mvebu-mbus.c

[Severity: Low]
Since all the board files like arch/arm/mach-orion5x/ts78xx-setup.c are removed in this patch, should the MAINTAINERS entry for the TS-78xx platform further down in this file also be removed?

The pattern F: arch/arm/mach-orion5x/ts78xx-* now points to deleted files, which leaves an orphaned entry for Alexander Clouter.

[ ... ]

arch/arm/mach-orion5x/Makefile line 6

Quoted 10 lines
arch/arm/mach-orion5x/Makefile +0 -2
index 6f54d7fef27a7..7e9634e043185 100644
@@ -2,15 +2,6 @@
 ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
 
 obj-y				+= common.o pci.o irq.o mpp.o
-obj-$(CONFIG_MACH_KUROBOX_PRO)	+= kurobox_pro-setup.o
-obj-$(CONFIG_MACH_TERASTATION_PRO2)	+= terastation_pro2-setup.o

[Severity: Low]
Are irq.o and mpp.o now completely unreachable code?

Since all the board files that called into these APIs have been removed, it appears these objects are now unnecessarily compiled into the kernel image. Should they be removed from obj-y here?

[ ... ]

arch/arm/plat-orion/Makefile line 9

Quoted 11 lines
arch/arm/plat-orion/Makefile +1 -1
index e8c7580df8caf..dfde39cdd992b 100644
@@ -5,5 +5,5 @@
 ccflags-y := -I$(src)/include
 
 orion-gpio-$(CONFIG_GPIOLIB)      += gpio.o
-obj-$(CONFIG_PLAT_ORION_LEGACY)   += irq.o pcie.o time.o common.o mpp.o
+obj-$(CONFIG_PLAT_ORION_LEGACY)   += irq.o pcie.o mpp.o
 obj-$(CONFIG_PLAT_ORION_LEGACY)   += $(orion-gpio-y)

[Severity: Low]
Similarly, does this leave irq.o, mpp.o, and the orion-gpio-y objects as dead code as well?

Since their corresponding entry points in the board files were deleted, could these also be removed from the build?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
#41 lore raw

Re: [PATCH 05/13] ARM: orion/dove/mv78xx0: remove all board files

Quoted 7 lines · On Tue, Sep 8, 2026, at 18:11, [email protected] wrote:

[Severity: Low]
Since all the board files like arch/arm/mach-orion5x/ts78xx-setup.c are removed in this patch, should the MAINTAINERS entry for the TS-78xx platform further down in this file also be removed?

The pattern F: arch/arm/mach-orion5x/ts78xx-* now points to deleted files, which leaves an orphaned entry for Alexander Clouter.

I fixed this instance now. I tried to automate this with a script but could not figure out how to deal with wildcard matches and only did the ones that have an exact file match.

If anyone has suggestions for doing this better, please let me know, or run your script on
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/log/?h=board-remove-7.3
and send me the results.

Quoted 16 lines

[ ... ]

arch/arm/mach-orion5x/Makefile line 6

Quoted 10 lines
arch/arm/mach-orion5x/Makefile +0 -2
index 6f54d7fef27a7..7e9634e043185 100644
@@ -2,15 +2,6 @@
 ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
 
 obj-y				+= common.o pci.o irq.o mpp.o
-obj-$(CONFIG_MACH_KUROBOX_PRO)	+= kurobox_pro-setup.o
-obj-$(CONFIG_MACH_TERASTATION_PRO2)	+= terastation_pro2-setup.o

[Severity: Low]
Are irq.o and mpp.o now completely unreachable code?

Quoted 3 lines

Since all the board files that called into these APIs have been removed, it appears these objects are now unnecessarily compiled into the kernel image. Should they be removed from obj-y here?

Added this to the patch, removing the two files and recursively seven more that become orphaned afterwards:

 arch/arm/mach-orion5x/Makefile                |   2 +-
 arch/arm/mach-orion5x/irq.c                   |  51 ---
 arch/arm/mach-orion5x/irqs.h                  |   9 -
 arch/arm/mach-orion5x/mpp.c                   |  41 --
 arch/arm/mach-orion5x/mpp.h                   | 130 ------
 arch/arm/plat-orion/Makefile                  |   4 +-
 arch/arm/plat-orion/gpio.c                    | 616 --------------------------
 arch/arm/plat-orion/include/plat/irq.h        |  15 -
 arch/arm/plat-orion/include/plat/mpp.h        |  34 --
 arch/arm/plat-orion/include/plat/orion-gpio.h |  38 --
 arch/arm/plat-orion/irq.c                     |  39 --
 arch/arm/plat-orion/mpp.c                     |  82 ----
 13 files changed, 2 insertions(+), 1066 deletions(-)

This leaves only pcie.{c,h} in arch/arm/plat-orion/, which should be folded into arch/arm/mach-orion5x/pci.c, along with parts of arch/arm/kernel/bios32.c that nothing else uses any more. I don't have a patch for that yet.

Arnd

#42 lore raw

PATCH 1/1 ARM: orion5x: fold plat-orion/pcie.c and hw_pci into pci.c

orion5x is the only user of arch/arm/plat-orion/pcie.c and of asm/mach/pci.h.

Fold it all into the one file referencing it, removing both the infrastructure to deal with arch/arm/plat-* directories and pci_sys_data from everywhere else.

Aside from making all the newly local functions 'static', this leaves the code unchanged. Obviously a number of additional cleanups are possible as follow-ups, which would allow turning it into two regular pci_host_bridge drivers. I stopped here in order to reduce the risk for regressions, while still cleaning up the common code as much as possible.

---
Based on the earlier suggestions I have now added this patch to the cleanup series.

 Documentation/arch/arm/marvell.rst      |   2 -
 MAINTAINERS                             |   1 -
 arch/arm/Kconfig                        |   4 +-
 arch/arm/Makefile                       |   2 -
 arch/arm/include/asm/mach/pci.h         |  72 ----------
 arch/arm/include/asm/pci.h              |   1 -
 arch/arm/kernel/bios32.c                | 197 --------------------------
 arch/arm/mach-mvebu/Makefile            |   2 -
 arch/arm/mach-orion5x/Makefile          |   2 -
 arch/arm/mach-orion5x/board-d2net.c     |   1 -
 arch/arm/mach-orion5x/board-mss2.c      |   1 -
 arch/arm/mach-orion5x/board-rd88f5182.c |   1 -
 arch/arm/mach-orion5x/common.h          |  19 +++
 arch/arm/mach-orion5x/pci.c             | 428 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 arch/arm/mm/ioremap.c                   |   1 -
 arch/arm/mm/mmu.c                       |   1 -
 arch/arm/plat-orion/Makefile            |   7 -
 arch/arm/plat-orion/include/plat/pcie.h |  34 -----
 arch/arm/plat-orion/pcie.c              | 287 -------------------------------------
 drivers/pci/controller/pci-mvebu.c      |   5 -
 20 files changed, 446 insertions(+), 622 deletions(-)
Documentation/arch/arm/marvell.rst +0 -2
index eb450095161e..28f212848668 100644
@@ -32,8 +32,6 @@ Orion family
 	Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible
   Linux kernel mach directory:
 	arch/arm/mach-orion5x
-  Linux kernel plat directory:
-	arch/arm/plat-orion
 
 Kirkwood family
 ---------------
MAINTAINERS +0 -1
index 5dde144e37c8..1ed42d8f6d56 100644
@@ -3081,7 +3081,6 @@ F:	Documentation/devicetree/bindings/soc/dove/
 F:	arch/arm/boot/dts/marvell/dove*
 F:	arch/arm/boot/dts/marvell/orion5x*
 F:	arch/arm/mach-orion5x/
-F:	arch/arm/plat-orion/
 F:	drivers/bus/mvebu-mbus.c
 F:	drivers/soc/dove/
 
arch/arm/Kconfig +1 -3
index da29afce309f..f551f51b1ad1 100644
@@ -339,9 +339,7 @@ config ARCH_MULTIPLATFORM
 source "arch/arm/Kconfig.platforms"
 
 #
-# This is sorted alphabetically by mach-* pathname.  However, plat-*
-# Kconfigs may be included either alphabetically (according to the
-# plat- suffix) or along side the corresponding mach-* source.
+# This is sorted alphabetically by mach-* pathname.
 #
 source "arch/arm/mach-actions/Kconfig"
 
arch/arm/Makefile +0 -2
index 1b990994f46d..c1437c16b115 100644
@@ -229,8 +229,6 @@ core-y				+= $(patsubst %,arch/arm/mach-%/,$(machine-y))
 # For cleaning
 core-				+= $(patsubst %,arch/arm/mach-%/,$(machine-))
 
-core-$(CONFIG_PLAT_ORION)	+= arch/arm/plat-orion/
-
 libs-y				:= arch/arm/lib/ $(libs-y)
 
 # Default target when executing plain make
arch/arm/include/asm/mach/pci.h deleted +0 -72

72 lines not on this page · raw message

arch/arm/include/asm/pci.h +0 -1
index 50ddc7ce1db8..650becf39e58 100644
@@ -3,7 +3,6 @@
 #define ASMARM_PCI_H
 
 #ifdef __KERNEL__
-#include <asm/mach/pci.h> /* for pci_sys_data */
 
 extern unsigned long pcibios_min_io;
 #define PCIBIOS_MIN_IO pcibios_min_io
arch/arm/kernel/bios32.c +0 -197

215 lines not on this page · raw message

arch/arm/mach-mvebu/Makefile +0 -2
index 569768a69ffc..7db707fdf8ef 100644
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
-
 obj-$(CONFIG_MACH_MVEBU_ANY)	 += system-controller.o mvebu-soc-id.o
 
 ifeq ($(CONFIG_MACH_MVEBU_V7),y)
arch/arm/mach-orion5x/Makefile +0 -2
index a80932210031..d13048c99d18 100644
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-ccflags-y := -I$(srctree)/arch/arm/plat-orion/include
-
 obj-y				+= common.o pci.o
 
 obj-$(CONFIG_ARCH_ORION5X_DT)		+= board-dt.o
arch/arm/mach-orion5x/board-d2net.c +0 -1
index 0fe6fd1fd0d9..94f6d802f1f8 100644
@@ -17,7 +17,6 @@
 #include <linux/gpio/machine.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/pci.h>
 #include "common.h"
 #include "orion5x.h"
 
arch/arm/mach-orion5x/board-mss2.c +0 -1
index 322ae29d05aa..06189aaf886d 100644
@@ -12,7 +12,6 @@
 #include <linux/irq.h>
 #include <linux/of.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/pci.h>
 #include "orion5x.h"
 #include "bridge-regs.h"
 #include "common.h"
arch/arm/mach-orion5x/board-rd88f5182.c +0 -1
index 9e2fe74ec68a..f403a994e27e 100644
@@ -15,7 +15,6 @@
 #include <linux/irq.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/pci.h>
 #include "common.h"
 #include "orion5x.h"
 
arch/arm/mach-orion5x/common.h +19 -0
index 4dc6c59bde99..9e6edac784b2 100644
@@ -41,6 +41,25 @@ struct pci_bus;
 struct pci_host_bridge;
 struct pci_sys_data;
 struct pci_dev;
+struct pci_ops;
+struct device;
+
+struct hw_pci {
+	struct pci_ops	*ops;
+	int		nr_controllers;
+	void		**private_data;
+	int		(*setup)(int nr, struct pci_sys_data *);
+	int		(*scan)(int nr, struct pci_host_bridge *);
+	void		(*preinit)(void);
+	void		(*postinit)(void);
+	u8		(*swizzle)(struct pci_dev *dev, u8 *pin);
+	int		(*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
+};
+
+/*
+ * Call this with your hw_pci struct to initialise the PCI system.
+ */
+void pci_common_init(struct hw_pci *);
 
 void orion5x_pcie_id(u32 *dev, u32 *rev);
 void orion5x_pci_disable(void);
arch/arm/mach-orion5x/pci.c +426 -2

446 lines not on this page · raw message

arch/arm/mm/ioremap.c +0 -1
index 27e64f782cb3..9e317481e0af 100644
@@ -41,7 +41,6 @@
 #include <asm/system_info.h>
 
 #include <asm/mach/map.h>
-#include <asm/mach/pci.h>
 #include "mm.h"
 
 
arch/arm/mm/mmu.c +0 -1
index 07c2fda4d422..4357df878e6d 100644
@@ -33,7 +33,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <asm/mach/pci.h>
 #include <asm/fixmap.h>
 
 #include "fault.h"
arch/arm/plat-orion/Makefile deleted +0 -7
deleted file mode 100644
index a88b9d0bfd2a..000000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-ccflags-y := -I$(src)/include
-
-obj-$(CONFIG_PLAT_ORION_LEGACY)   += pcie.o
arch/arm/plat-orion/include/plat/pcie.h deleted +0 -34
deleted file mode 100644
index fe5b9e862747..000000000000
@@ -1,34 +0,0 @@
-/*
- * arch/arm/plat-orion/include/plat/pcie.h
- *
- * Marvell Orion SoC PCIe handling.
- *
- * 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.
- */
-
-#ifndef __PLAT_PCIE_H
-#define __PLAT_PCIE_H
-
-struct pci_bus;
-
-u32 orion_pcie_dev_id(void __iomem *base);
-u32 orion_pcie_rev(void __iomem *base);
-int orion_pcie_link_up(void __iomem *base);
-int orion_pcie_x4_mode(void __iomem *base);
-int orion_pcie_get_local_bus_nr(void __iomem *base);
-void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
-void orion_pcie_reset(void __iomem *base);
-void orion_pcie_setup(void __iomem *base);
-int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus,
-		       u32 devfn, int where, int size, u32 *val);
-int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
-			   u32 devfn, int where, int size, u32 *val);
-int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
-			  u32 devfn, int where, int size, u32 *val);
-int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus,
-		       u32 devfn, int where, int size, u32 val);
-
-
-#endif
arch/arm/plat-orion/pcie.c deleted +0 -287

287 lines not on this page · raw message

drivers/pci/controller/pci-mvebu.c +0 -5
index 69a9d77039e8..fd40bc0f6296 100644
@@ -952,11 +952,6 @@ static int mvebu_pci_bridge_emul_init(struct mvebu_pcie_port *port)
 	return pci_bridge_emul_init(bridge, bridge_flags);
 }
 
-static inline struct mvebu_pcie *sys_to_pcie(struct pci_sys_data *sys)
-{
-	return sys->private_data;
-}
-
 static struct mvebu_pcie_port *mvebu_pcie_find_port(struct mvebu_pcie *pcie,
 						    struct pci_bus *bus,
 						    int devfn)