You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.7 KiB
Diff
67 lines
1.7 KiB
Diff
From 5252a0a75c390e01fc9b402660c1a28f7f4d172f Mon Sep 17 00:00:00 2001
|
|
From: vauban353 <vauban353@gmail.com>
|
|
Date: Sun, 6 Aug 2023 11:13:27 +0100
|
|
Subject: [PATCH] MMC SPI: Hack to support non DMA capable SPI ctrl.
|
|
|
|
---
|
|
drivers/mmc/host/mmc_spi.c | 6 +++++-
|
|
drivers/spi/internals.h | 3 +++
|
|
drivers/spi/spi.c | 3 +++
|
|
3 files changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
|
|
index cc333ad67cac..fb45c7fa431d 100644
|
|
--- a/drivers/mmc/host/mmc_spi.c
|
|
+++ b/drivers/mmc/host/mmc_spi.c
|
|
@@ -29,6 +29,9 @@
|
|
|
|
#include <asm/unaligned.h>
|
|
|
|
+//<CJ>:
|
|
+#undef CONFIG_HAS_DMA
|
|
+//#define DEBUG 1
|
|
|
|
/* NOTES:
|
|
*
|
|
@@ -1375,7 +1378,8 @@ static int mmc_spi_probe(struct spi_device *spi)
|
|
* that's the only reason not to use a few MHz for f_min (until
|
|
* the upper layer reads the target frequency from the CSD).
|
|
*/
|
|
- mmc->f_min = 400000;
|
|
+//<CJ> mmc->f_min = 400000;
|
|
+ mmc->f_min = 5000000;
|
|
mmc->f_max = spi->max_speed_hz;
|
|
|
|
host = mmc_priv(mmc);
|
|
diff --git a/drivers/spi/internals.h b/drivers/spi/internals.h
|
|
index 4a28a8395552..c49350240978 100644
|
|
--- a/drivers/spi/internals.h
|
|
+++ b/drivers/spi/internals.h
|
|
@@ -12,6 +12,9 @@
|
|
#ifndef __LINUX_SPI_INTERNALS_H
|
|
#define __LINUX_SPI_INTERNALS_H
|
|
|
|
+//<CJ>:
|
|
+#undef CONFIG_HAS_DMA
|
|
+
|
|
#include <linux/device.h>
|
|
#include <linux/dma-direction.h>
|
|
#include <linux/scatterlist.h>
|
|
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
|
|
index a221478e528e..e198049cc80c 100644
|
|
--- a/drivers/spi/spi.c
|
|
+++ b/drivers/spi/spi.c
|
|
@@ -42,6 +42,9 @@ EXPORT_TRACEPOINT_SYMBOL(spi_transfer_stop);
|
|
|
|
#include "internals.h"
|
|
|
|
+//<CJ>:
|
|
+#undef CONFIG_HAS_DMA
|
|
+
|
|
static DEFINE_IDR(spi_master_idr);
|
|
|
|
static void spidev_release(struct device *dev)
|
|
--
|
|
2.25.1
|
|
|