mmc: tmio: tmio_mmc_data has .alignment_shift
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 13 Jan 2015 04:58:46 +0000 (04:58 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jan 2015 09:23:01 +0000 (10:23 +0100)
Current .alignment_shift is implemented under tmio_mmc_dma.
It goes to tmio_mmc_data by this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mobile_sdhi.c
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_dma.c
include/linux/mfd/tmio.h

index 0db2a0a0376ba9868a470d9c40a9c6245f875388..782d8cf942a7da4fbb5b1dd03dd69146bd3d0ca1 100644 (file)
@@ -241,10 +241,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
                        dma_priv->slave_id_rx = p->dma_slave_rx;
                }
        }
-
-       dma_priv->alignment_shift = 1; /* 2-byte alignment */
        dma_priv->filter = shdma_chan_filter;
 
+       mmc_data->alignment_shift = 1; /* 2-byte alignment */
+
        /*
         * All SDHI blocks support 2-byte and larger block sizes in 4-bit
         * bus width mode.
index a5d30bfa7e64a5de70d9a4d4708feb9338e8cd0b..9482abceeb9c37bdc1cac5a22f236049a0250012 100644 (file)
@@ -45,7 +45,6 @@ struct tmio_mmc_dma {
        void *chan_priv_rx;
        int slave_id_tx;
        int slave_id_rx;
-       int alignment_shift;
        dma_addr_t dma_rx_offset;
        bool (*filter)(struct dma_chan *chan, void *arg);
 };
index ee0131eb078d4978902b7aaed05c19098881e270..d2b02de2f378618ba1ac7596fc4439e57776a1a3 100644 (file)
@@ -52,7 +52,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
        dma_cookie_t cookie;
        int ret, i;
        bool aligned = true, multiple = true;
-       unsigned int align = (1 << host->dma->alignment_shift) - 1;
+       unsigned int align = (1 << host->pdata->alignment_shift) - 1;
 
        for_each_sg(sg, sg_tmp, host->sg_len, i) {
                if (sg_tmp->offset & align)
@@ -128,7 +128,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
        dma_cookie_t cookie;
        int ret, i;
        bool aligned = true, multiple = true;
-       unsigned int align = (1 << host->dma->alignment_shift) - 1;
+       unsigned int align = (1 << host->pdata->alignment_shift) - 1;
 
        for_each_sg(sg, sg_tmp, host->sg_len, i) {
                if (sg_tmp->offset & align)
index 7a5c27948315d6b09ae5bae98046709e96349c9e..28a12d10e509d30b6e2700d0c14a10ff27d8861a 100644 (file)
@@ -122,6 +122,7 @@ struct tmio_mmc_data {
        unsigned long                   flags;
        u32                             ocr_mask;       /* available voltages */
        unsigned int                    cd_gpio;
+       int                             alignment_shift;
        void (*set_pwr)(struct platform_device *host, int state);
        void (*set_clk_div)(struct platform_device *host, int state);
 };