Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: footbridge: move isa-dma support into footbridge

The dma-isa.c was shared between footbridge and shark a long time ago,
but as shark was removed, it can be made footbridge specific again.

The fb_dma bits in turn are not used at all and can be removed.

All the ISA related files are now built into the platform regardless
of CONFIG_ISA, as they just refer to on-chip devices rather than actual
ISA cards.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+9 -85
-5
arch/arm/Kconfig
··· 989 989 (MCA) or VESA. ISA is an older system, now being displaced by PCI; 990 990 newer boards don't support it. If you have ISA, say Y, otherwise N. 991 991 992 - # Select ISA DMA controller support 993 - config ISA_DMA 994 - bool 995 - select ISA_DMA_API 996 - 997 992 # Select ISA DMA interface 998 993 config ISA_DMA_API 999 994 bool
-5
arch/arm/include/asm/mach/dma.h
··· 44 44 * isa_dma_add - add an ISA-style DMA channel 45 45 */ 46 46 extern int isa_dma_add(unsigned int, dma_t *dma); 47 - 48 - /* 49 - * Add the ISA DMA controller. Always takes channels 0-7. 50 - */ 51 - extern void isa_init_dma(void);
-1
arch/arm/kernel/Makefile
··· 45 45 obj-$(CONFIG_FIQ) += fiq.o fiqasm.o 46 46 obj-$(CONFIG_MODULES) += armksyms.o module.o 47 47 obj-$(CONFIG_ARM_MODULE_PLTS) += module-plts.o 48 - obj-$(CONFIG_ISA_DMA) += dma-isa.o 49 48 obj-$(CONFIG_PCI) += bios32.o isa.o 50 49 obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o 51 50 obj-$(CONFIG_HIBERNATION) += hibernate.o
+4 -3
arch/arm/kernel/dma-isa.c arch/arm/mach-footbridge/dma-isa.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* 3 - * linux/arch/arm/kernel/dma-isa.c 4 - * 5 3 * Copyright (C) 1999-2000 Russell King 6 4 * 7 5 * ISA DMA primitives ··· 155 157 /* 156 158 * ISA DMA always starts at channel 0 157 159 */ 158 - void __init isa_init_dma(void) 160 + static int __init isa_dma_init(void) 159 161 { 160 162 /* 161 163 * Try to autodetect presence of an ISA DMA controller. ··· 220 222 221 223 request_dma(DMA_ISA_CASCADE, "cascade"); 222 224 } 225 + 226 + return 0; 223 227 } 228 + core_initcall(isa_dma_init);
+1 -1
arch/arm/mach-footbridge/Kconfig
··· 48 48 def_bool y 49 49 select ARCH_HAS_PHYS_TO_DMA 50 50 select ARCH_MIGHT_HAVE_PC_SERIO 51 - select ISA_DMA 51 + select ISA_DMA_API 52 52 53 53 config ARCH_EBSA285 54 54 bool
+1 -2
arch/arm/mach-footbridge/Makefile
··· 5 5 6 6 # Object file lists. 7 7 8 - obj-y := common.o dma.o isa-irq.o 8 + obj-y := common.o isa-irq.o isa.o isa-rtc.o dma-isa.o 9 9 10 10 pci-y += dc21285.o 11 11 pci-$(CONFIG_ARCH_CATS) += cats-pci.o ··· 18 18 19 19 obj-$(CONFIG_PCI) +=$(pci-y) 20 20 21 - obj-$(CONFIG_ISA) += isa.o isa-rtc.o
-57
arch/arm/mach-footbridge/dma.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * linux/arch/arm/kernel/dma-ebsa285.c 4 - * 5 - * Copyright (C) 1998 Phil Blundell 6 - * 7 - * DMA functions specific to EBSA-285/CATS architectures 8 - * 9 - * Changelog: 10 - * 09-Nov-1998 RMK Split out ISA DMA functions to dma-isa.c 11 - * 17-Mar-1999 RMK Allow any EBSA285-like architecture to have 12 - * ISA DMA controllers. 13 - */ 14 - #include <linux/init.h> 15 - #include <linux/io.h> 16 - #include <linux/spinlock.h> 17 - #include <linux/scatterlist.h> 18 - 19 - #include <asm/dma.h> 20 - 21 - #include <asm/mach/dma.h> 22 - #include <asm/hardware/dec21285.h> 23 - 24 - #if 0 25 - static int fb_dma_request(unsigned int chan, dma_t *dma) 26 - { 27 - return -EINVAL; 28 - } 29 - 30 - static void fb_dma_enable(unsigned int chan, dma_t *dma) 31 - { 32 - } 33 - 34 - static void fb_dma_disable(unsigned int chan, dma_t *dma) 35 - { 36 - } 37 - 38 - static struct dma_ops fb_dma_ops = { 39 - .type = "fb", 40 - .request = fb_dma_request, 41 - .enable = fb_dma_enable, 42 - .disable = fb_dma_disable, 43 - }; 44 - #endif 45 - 46 - static int __init fb_dma_init(void) 47 - { 48 - #if 0 49 - dma[_DC21285_DMA(0)].d_ops = &fb_dma_ops; 50 - dma[_DC21285_DMA(1)].d_ops = &fb_dma_ops; 51 - #endif 52 - #ifdef CONFIG_ISA_DMA 53 - isa_init_dma(); 54 - #endif 55 - return 0; 56 - } 57 - core_initcall(fb_dma_init);
+3 -11
arch/arm/mach-footbridge/include/mach/isa-dma.h
··· 10 10 #ifndef __ASM_ARCH_DMA_H 11 11 #define __ASM_ARCH_DMA_H 12 12 13 - /* 14 - * The 21285 has two internal DMA channels; we call these 8 and 9. 15 - * On CATS hardware we have an additional eight ISA dma channels 16 - * numbered 0..7. 17 - */ 18 - #define _ISA_DMA(x) (0+(x)) 19 - #define _DC21285_DMA(x) (8+(x)) 13 + #define MAX_DMA_CHANNELS 8 20 14 21 - #define MAX_DMA_CHANNELS 10 22 - 23 - #define DMA_FLOPPY _ISA_DMA(2) 24 - #define DMA_ISA_CASCADE _ISA_DMA(4) 15 + #define DMA_FLOPPY (2) 16 + #define DMA_ISA_CASCADE (4) 25 17 26 18 #endif /* _ASM_ARCH_DMA_H */