Commit e471df0b authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Ulf Hansson
Browse files

mmc: tmio: tmio_mmc_data has .alignment_shift



Current .alignment_shift is implemented under tmio_mmc_dma.
It goes to tmio_mmc_data by this patch.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 7445bf9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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->slave_id_rx = p->dma_slave_rx;
		}
		}
	}
	}

	dma_priv->alignment_shift = 1; /* 2-byte alignment */
	dma_priv->filter = shdma_chan_filter;
	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
	 * All SDHI blocks support 2-byte and larger block sizes in 4-bit
	 * bus width mode.
	 * bus width mode.
+0 −1
Original line number Original line Diff line number Diff line
@@ -45,7 +45,6 @@ struct tmio_mmc_dma {
	void *chan_priv_rx;
	void *chan_priv_rx;
	int slave_id_tx;
	int slave_id_tx;
	int slave_id_rx;
	int slave_id_rx;
	int alignment_shift;
	dma_addr_t dma_rx_offset;
	dma_addr_t dma_rx_offset;
	bool (*filter)(struct dma_chan *chan, void *arg);
	bool (*filter)(struct dma_chan *chan, void *arg);
};
};
+2 −2
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
	dma_cookie_t cookie;
	dma_cookie_t cookie;
	int ret, i;
	int ret, i;
	bool aligned = true, multiple = true;
	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) {
	for_each_sg(sg, sg_tmp, host->sg_len, i) {
		if (sg_tmp->offset & align)
		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;
	dma_cookie_t cookie;
	int ret, i;
	int ret, i;
	bool aligned = true, multiple = true;
	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) {
	for_each_sg(sg, sg_tmp, host->sg_len, i) {
		if (sg_tmp->offset & align)
		if (sg_tmp->offset & align)
+1 −0
Original line number Original line Diff line number Diff line
@@ -122,6 +122,7 @@ struct tmio_mmc_data {
	unsigned long			flags;
	unsigned long			flags;
	u32				ocr_mask;	/* available voltages */
	u32				ocr_mask;	/* available voltages */
	unsigned int			cd_gpio;
	unsigned int			cd_gpio;
	int				alignment_shift;
	void (*set_pwr)(struct platform_device *host, int state);
	void (*set_pwr)(struct platform_device *host, int state);
	void (*set_clk_div)(struct platform_device *host, int state);
	void (*set_clk_div)(struct platform_device *host, int state);
};
};