]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: rsnd: remove non DT support for DMA
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 25 Oct 2016 00:36:13 +0000 (00:36 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 25 Oct 2016 14:02:43 +0000 (15:02 +0100)
Current Renesas Sound driver is based on DeviceTree, and no one is
using this driver from non DT. Non-DT support is no longer needed.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/dma.c
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/src.c
sound/soc/sh/rcar/ssi.c

index b3bdd362a5112905176484ec1ba3f9f4604fb582..e0761cac0ab7ee5e5c156e27cb8a164bcd087733 100644 (file)
@@ -191,7 +191,7 @@ static int rsnd_dmaen_remove(struct rsnd_mod *mod,
 }
 
 static int rsnd_dmaen_attach(struct rsnd_dai_stream *io,
-                          struct rsnd_dma *dma, int id,
+                          struct rsnd_dma *dma,
                           struct rsnd_mod *mod_from, struct rsnd_mod *mod_to)
 {
        struct rsnd_mod *mod = rsnd_mod_get(dma);
@@ -208,17 +208,8 @@ static int rsnd_dmaen_attach(struct rsnd_dai_stream *io,
                return -EIO;
        }
 
-       if (dev->of_node) {
-               dmaen->chan = rsnd_dmaen_request_channel(io, mod_from, mod_to);
-       } else {
-               dma_cap_mask_t mask;
-
-               dma_cap_zero(mask);
-               dma_cap_set(DMA_SLAVE, mask);
+       dmaen->chan = rsnd_dmaen_request_channel(io, mod_from, mod_to);
 
-               dmaen->chan = dma_request_channel(mask, shdma_chan_filter,
-                                                 (void *)(uintptr_t)id);
-       }
        if (IS_ERR_OR_NULL(dmaen->chan)) {
                dmaen->chan = NULL;
                dev_err(dev, "can't get dma channel\n");
@@ -394,7 +385,7 @@ static int rsnd_dmapp_start(struct rsnd_mod *mod,
 }
 
 static int rsnd_dmapp_attach(struct rsnd_dai_stream *io,
-                            struct rsnd_dma *dma, int id,
+                            struct rsnd_dma *dma,
                             struct rsnd_mod *mod_from, struct rsnd_mod *mod_to)
 {
        struct rsnd_dmapp *dmapp = rsnd_dma_to_dmapp(dma);
@@ -627,7 +618,7 @@ static void rsnd_dma_of_path(struct rsnd_mod *this,
 }
 
 int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod,
-                   struct rsnd_mod **dma_mod, int id)
+                   struct rsnd_mod **dma_mod)
 {
        struct rsnd_mod *mod_from = NULL;
        struct rsnd_mod *mod_to = NULL;
@@ -636,7 +627,7 @@ int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod,
        struct device *dev = rsnd_priv_to_dev(priv);
        struct rsnd_mod_ops *ops;
        enum rsnd_mod_type type;
-       int (*attach)(struct rsnd_dai_stream *io, struct rsnd_dma *dma, int id,
+       int (*attach)(struct rsnd_dai_stream *io, struct rsnd_dma *dma,
                      struct rsnd_mod *mod_from, struct rsnd_mod *mod_to);
        int is_play = rsnd_io_is_play(io);
        int ret, dma_id;
@@ -695,7 +686,7 @@ int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod,
                        rsnd_mod_name(mod_from), rsnd_mod_id(mod_from),
                        rsnd_mod_name(mod_to),   rsnd_mod_id(mod_to));
 
-               ret = attach(io, dma, id, mod_from, mod_to);
+               ret = attach(io, dma, mod_from, mod_to);
                if (ret < 0)
                        return ret;
        }
index b3b4d89347be76935ac4517af3a6a6e3204c48cd..2460d1fbf77576ade4d08b0cf0c95cd282517779 100644 (file)
@@ -199,7 +199,7 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
  *     R-Car DMA
  */
 int rsnd_dma_attach(struct rsnd_dai_stream *io,
-                   struct rsnd_mod *mod, struct rsnd_mod **dma_mod, int id);
+                   struct rsnd_mod *mod, struct rsnd_mod **dma_mod);
 void rsnd_dma_detach(struct rsnd_mod *mod, struct rsnd_mod **dma_mod);
 int rsnd_dma_probe(struct rsnd_priv *priv);
 struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node,
index 969a5169de255a2fe66202ffc89808c89bfe98ec..e13d6d439b324134bffd85127469262192a320ef 100644 (file)
@@ -475,7 +475,7 @@ static int rsnd_src_probe_(struct rsnd_mod *mod,
                        return ret;
        }
 
-       ret = rsnd_dma_attach(io, mod, &src->dma, 0);
+       ret = rsnd_dma_attach(io, mod, &src->dma);
 
        return ret;
 }
index 94a19f975fa29ea9e1127f3158ecd70981887d2f..59cd9824d8a4e9e36e7b1ec7a35afa5c1f0c604b 100644 (file)
@@ -669,7 +669,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
                              struct rsnd_priv *priv)
 {
        struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-       int dma_id = 0; /* not needed */
        int ret;
 
        /*
@@ -684,7 +683,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
                return ret;
 
        /* SSI probe might be called many times in MUX multi path */
-       ret = rsnd_dma_attach(io, mod, &ssi->dma, dma_id);
+       ret = rsnd_dma_attach(io, mod, &ssi->dma);
 
        return ret;
 }