ODROID-COMMON: drivers/spi: Revert force64b flag back

To avoid unnecessary 64 bit calculation, which is for DMA, data
swapping is needed to be an option.

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Ie186a332984246bfb83b128b5771197457f4dd21
This commit is contained in:
Deokgyu Yang
2021-01-21 14:57:50 +09:00
committed by Luke go
parent 312db50237
commit fba033fa1a

View File

@@ -41,6 +41,12 @@
* to have a CS go down over the full transfer
*/
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
static unsigned int force64b;
module_param(force64b, uint, 0000);
MODULE_PARM_DESC(force64b, "force 64bits fb data");
#endif
/* Register Map */
#define SPICC_RXDATA 0x00
@@ -587,7 +593,10 @@ static int meson_spicc_transfer_one(struct spi_master *master,
spicc->xfer_remain = xfer->len;
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if ((xfer->len >= 64) && (xfer->bits_per_word == 8) && ((xfer->len % 8) == 0)) {
if (force64b &&
(xfer->len >= 64) &&
(xfer->bits_per_word == 8) &&
((xfer->len % 8) == 0)) {
int cnt = xfer->len / 8;
int i;
@@ -1102,6 +1111,8 @@ static int meson_spicc_probe(struct platform_device *pdev)
spicc->pinctrl = NULL;
dev_err(&pdev->dev, "spi pinmux : can't get spicc_pins\n");
}
if (force64b)
dev_info(&pdev->dev, "force64b flag is true\n");
#endif
device_reset_optional(&pdev->dev);