^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * linux/arch/arm/kernel/dma-ebsa285.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 1998 Phil Blundell
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * DMA functions specific to EBSA-285/CATS architectures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Changelog:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * 09-Nov-1998 RMK Split out ISA DMA functions to dma-isa.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * 17-Mar-1999 RMK Allow any EBSA285-like architecture to have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * ISA DMA controllers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/spinlock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/scatterlist.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <asm/dma.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <asm/mach/dma.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #include <asm/hardware/dec21285.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #if 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) static int fb_dma_request(unsigned int chan, dma_t *dma)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) static void fb_dma_enable(unsigned int chan, dma_t *dma)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) static void fb_dma_disable(unsigned int chan, dma_t *dma)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) static struct dma_ops fb_dma_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) .type = "fb",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) .request = fb_dma_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) .enable = fb_dma_enable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) .disable = fb_dma_disable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) static int __init fb_dma_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #if 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) dma[_DC21285_DMA(0)].d_ops = &fb_dma_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) dma[_DC21285_DMA(1)].d_ops = &fb_dma_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #ifdef CONFIG_ISA_DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) if (footbridge_cfn_mode())
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) isa_init_dma();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) core_initcall(fb_dma_init);