]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: sh: Remove R-Mobile APE6 support
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 3 Dec 2018 14:18:06 +0000 (15:18 +0100)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Dec 2018 07:31:54 +0000 (13:01 +0530)
Renesas R-Mobile APE6 support is currently unused:
  - DMA slaves were never enabled in r8a73a4.dtsi,
  - The driver relies on legacy filter matching and describing all
    slaves and MID/RIDs in a table, unlike modern DMA engine drivers for
    similar hardware like rcar-dmac,
  - The driver doesn't seem to work well.

Remove the driver, it can be resurrected from git history when needed.

As this was the last user of SH_DMAE_BASE on Renesas ARM SoCs, the
sh-dma-engine driver core is now used on SuperH only.

Note that the DT bindings are still present, as r8a73a4.dtsi uses them.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/Kconfig
drivers/dma/sh/Makefile
drivers/dma/sh/shdma-r8a73a4.c [deleted file]
drivers/dma/sh/shdma.h
drivers/dma/sh/shdmac.c

index 1c4675425a1eeb1547298c7d7e3d57a78b6af760..4d6b02b3b1f18e6f3fe417bdb9b1d1571201045d 100644 (file)
@@ -13,7 +13,7 @@ config RENESAS_DMA
 
 config SH_DMAE_BASE
        bool "Renesas SuperH DMA Engine support"
-       depends on SUPERH || ARCH_RENESAS || COMPILE_TEST
+       depends on SUPERH || COMPILE_TEST
        depends on !SUPERH || SH_DMA
        depends on !SH_DMA_API
        default y
@@ -31,15 +31,6 @@ config SH_DMAE
        help
          Enable support for the Renesas SuperH DMA controllers.
 
-if SH_DMAE
-
-config SH_DMAE_R8A73A4
-       def_bool y
-       depends on ARCH_R8A73A4
-       depends on OF
-
-endif
-
 config RCAR_DMAC
        tristate "Renesas R-Car Gen2 DMA Controller"
        depends on ARCH_RENESAS || COMPILE_TEST
index 7d7c9491ade1216df7430b0f8559369dab4ab1a6..42110dd57a56fda87c4cb8a521b0b40f8bd7108c 100644 (file)
@@ -10,7 +10,6 @@ obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o
 #
 
 shdma-y := shdmac.o
-shdma-$(CONFIG_SH_DMAE_R8A73A4) += shdma-r8a73a4.o
 shdma-objs := $(shdma-y)
 obj-$(CONFIG_SH_DMAE) += shdma.o
 
diff --git a/drivers/dma/sh/shdma-r8a73a4.c b/drivers/dma/sh/shdma-r8a73a4.c
deleted file mode 100644 (file)
index ddc9a35..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Renesas SuperH DMA Engine support for r8a73a4 (APE6) SoCs
- *
- * Copyright (C) 2013 Renesas Electronics, Inc.
- */
-#include <linux/sh_dma.h>
-
-#include "shdma-arm.h"
-
-static const unsigned int dma_ts_shift[] = SH_DMAE_TS_SHIFT;
-
-static const struct sh_dmae_slave_config dma_slaves[] = {
-       {
-               .chcr           = CHCR_TX(XMIT_SZ_32BIT),
-               .mid_rid        = 0xd1,         /* MMC0 Tx */
-       }, {
-               .chcr           = CHCR_RX(XMIT_SZ_32BIT),
-               .mid_rid        = 0xd2,         /* MMC0 Rx */
-       }, {
-               .chcr           = CHCR_TX(XMIT_SZ_32BIT),
-               .mid_rid        = 0xe1,         /* MMC1 Tx */
-       }, {
-               .chcr           = CHCR_RX(XMIT_SZ_32BIT),
-               .mid_rid        = 0xe2,         /* MMC1 Rx */
-       },
-};
-
-#define DMAE_CHANNEL(a, b)                             \
-       {                                               \
-               .offset         = (a) - 0x20,           \
-               .dmars          = (a) - 0x20 + 0x40,    \
-               .chclr_bit      = (b),                  \
-               .chclr_offset   = 0x80 - 0x20,          \
-       }
-
-static const struct sh_dmae_channel dma_channels[] = {
-       DMAE_CHANNEL(0x8000, 0),
-       DMAE_CHANNEL(0x8080, 1),
-       DMAE_CHANNEL(0x8100, 2),
-       DMAE_CHANNEL(0x8180, 3),
-       DMAE_CHANNEL(0x8200, 4),
-       DMAE_CHANNEL(0x8280, 5),
-       DMAE_CHANNEL(0x8300, 6),
-       DMAE_CHANNEL(0x8380, 7),
-       DMAE_CHANNEL(0x8400, 8),
-       DMAE_CHANNEL(0x8480, 9),
-       DMAE_CHANNEL(0x8500, 10),
-       DMAE_CHANNEL(0x8580, 11),
-       DMAE_CHANNEL(0x8600, 12),
-       DMAE_CHANNEL(0x8680, 13),
-       DMAE_CHANNEL(0x8700, 14),
-       DMAE_CHANNEL(0x8780, 15),
-       DMAE_CHANNEL(0x8800, 16),
-       DMAE_CHANNEL(0x8880, 17),
-       DMAE_CHANNEL(0x8900, 18),
-       DMAE_CHANNEL(0x8980, 19),
-};
-
-const struct sh_dmae_pdata r8a73a4_dma_pdata = {
-       .slave          = dma_slaves,
-       .slave_num      = ARRAY_SIZE(dma_slaves),
-       .channel        = dma_channels,
-       .channel_num    = ARRAY_SIZE(dma_channels),
-       .ts_low_shift   = TS_LOW_SHIFT,
-       .ts_low_mask    = TS_LOW_BIT << TS_LOW_SHIFT,
-       .ts_high_shift  = TS_HI_SHIFT,
-       .ts_high_mask   = TS_HI_BIT << TS_HI_SHIFT,
-       .ts_shift       = dma_ts_shift,
-       .ts_shift_num   = ARRAY_SIZE(dma_ts_shift),
-       .dmaor_init     = DMAOR_DME,
-       .chclr_present  = 1,
-       .chclr_bitwise  = 1,
-};
index bfb69909bd192759f8353665ba6b3b96fee87a90..9c121a4b33ad829c77ae88c094fc80d942b9d709 100644 (file)
@@ -58,11 +58,4 @@ struct sh_dmae_desc {
 #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\
                                     struct sh_dmae_device, shdma_dev.dma_dev)
 
-#ifdef CONFIG_SH_DMAE_R8A73A4
-extern const struct sh_dmae_pdata r8a73a4_dma_pdata;
-#define r8a73a4_shdma_devid (&r8a73a4_dma_pdata)
-#else
-#define r8a73a4_shdma_devid NULL
-#endif
-
 #endif /* __DMA_SHDMA_H */
index 7971ea275387748665cfe8ce83e1d9336712a6d3..5aafe548ca5f308200de9e555580e44e8bcb234a 100644 (file)
@@ -665,12 +665,6 @@ static const struct shdma_ops sh_dmae_shdma_ops = {
        .get_partial = sh_dmae_get_partial,
 };
 
-static const struct of_device_id sh_dmae_of_match[] = {
-       {.compatible = "renesas,shdma-r8a73a4", .data = r8a73a4_shdma_devid,},
-       {}
-};
-MODULE_DEVICE_TABLE(of, sh_dmae_of_match);
-
 static int sh_dmae_probe(struct platform_device *pdev)
 {
        const enum dma_slave_buswidth widths =
@@ -915,7 +909,6 @@ static struct platform_driver sh_dmae_driver = {
        .driver         = {
                .pm     = &sh_dmae_pm,
                .name   = SH_DMAE_DRV_NAME,
-               .of_match_table = sh_dmae_of_match,
        },
        .remove         = sh_dmae_remove,
 };