From: Christian Zigotzky <chzigotzky@xenosoft.de>
To: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Darren Stevens <darren@stevens-zone.net>,
mad skateman <madskateman@gmail.com>,
"R.T.Dickinson" <rtd2@xtra.co.nz>,
"contact@a-eon.com" <contact@a-eon.com>,
Julian Margetson <runaway@candw.ms>
Subject: [FSL P5020 P5040 PPC] Onboard SD card doesn't work anymore after the 'mmc-v5.4-2' updates
Date: Thu, 16 Jan 2020 12:05:55 +0100 [thread overview]
Message-ID: <a9ab8946-c599-5f83-7527-2387a9e82e8a@xenosoft.de> (raw)
In-Reply-To: <399ac7d5-2518-799a-595e-f6b6878cf4ab@intel.com>
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
Hi All,
We still need the attached patch for our onboard SD card interface
[1,2]. Could you please add this patch to the tree?
Thanks,
Christian
[1] https://www.spinics.net/lists/linux-mmc/msg56211.html
[2]
http://forum.hyperion-entertainment.com/viewtopic.php?f=58&t=4349&start=20#p49012
[-- Attachment #2: coherent_cache-v3.patch --]
[-- Type: text/x-patch, Size: 1860 bytes --]
diff -rupN a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
--- a/arch/powerpc/kernel/setup-common.c 2019-12-03 18:05:52.436070217 +0100
+++ b/arch/powerpc/kernel/setup-common.c 2019-12-03 18:03:20.316629696 +0100
@@ -780,6 +780,22 @@ static int __init check_cache_coherency(
late_initcall(check_cache_coherency);
#endif /* CONFIG_CHECK_CACHE_COHERENCY */
+#ifndef CONFIG_NOT_COHERENT_CACHE
+/*
+ * For historical reasons powerpc kernels are built with hard wired knowledge of
+ * whether or not DMA accesses are cache coherent. Additionally device trees on
+ * powerpc do not typically support the dma-coherent property.
+ *
+ * So when we know that DMA is coherent, override arch_of_dma_is_coherent() to
+ * tell the drivers/of code that all devices are coherent regardless of whether
+ * they have a dma-coherent property.
+ */
+bool arch_of_dma_is_coherent(struct device_node *np)
+{
+ return true;
+}
+#endif
+
#ifdef CONFIG_DEBUG_FS
struct dentry *powerpc_debugfs_root;
EXPORT_SYMBOL(powerpc_debugfs_root);
diff -rupN a/drivers/of/address.c b/drivers/of/address.c
--- a/drivers/of/address.c 2019-12-03 18:05:57.332052212 +0100
+++ b/drivers/of/address.c 2019-12-03 18:03:20.320629681 +0100
@@ -990,6 +990,14 @@ out:
return ret;
}
+/*
+ * arch_of_dma_is_coherent - Arch hook to determine if device is coherent for DMA
+ */
+bool __weak arch_of_dma_is_coherent(struct device_node *np)
+{
+ return false;
+}
+
/**
* of_dma_is_coherent - Check if device is coherent
* @np: device node
@@ -999,8 +1007,12 @@ out:
*/
bool of_dma_is_coherent(struct device_node *np)
{
- struct device_node *node = of_node_get(np);
+ struct device_node *node;
+
+ if (arch_of_dma_is_coherent(np))
+ return true;
+ np = of_node_get(np);
while (node) {
if (of_property_read_bool(node, "dma-coherent")) {
of_node_put(node);
next prev parent reply other threads:[~2020-01-16 11:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 9:39 [PATCH 0/2] mmc: sdhci-acpi: Introduce device specific quirks, fix issues on 2 device models Hans de Goede
2020-01-08 9:39 ` [PATCH 1/2] mmc: sdhci-acpi: Disable 1.8V modes on external microSD on Lenovo Miix 320 Hans de Goede
2020-01-15 12:57 ` Adrian Hunter
2020-01-15 13:31 ` Hans de Goede
2020-01-15 13:48 ` Adrian Hunter
2020-01-15 15:31 ` Hans de Goede
2020-01-16 7:59 ` Adrian Hunter
2020-01-16 11:05 ` Christian Zigotzky [this message]
2020-01-16 15:46 ` [FSL P5020 P5040 PPC] Onboard SD card doesn't work anymore after the 'mmc-v5.4-2' updates Ulf Hansson
2020-01-20 9:17 ` Christian Zigotzky
2020-01-20 11:18 ` Ulf Hansson
2020-01-24 11:42 ` Michael Ellerman
2020-01-25 13:26 ` Christian Zigotzky
2020-01-28 11:55 ` Michael Ellerman
2020-01-28 7:58 ` [PASEMI PA6T PPC] Onboard CF card device with new SanDisk High (>8G) CF cards Christian Zigotzky
2020-01-28 8:08 ` Christoph Hellwig
2020-01-28 14:16 ` Rob Herring
2020-01-28 14:48 ` Christian Zigotzky
2020-01-16 13:26 ` [PATCH 1/2] mmc: sdhci-acpi: Disable 1.8V modes on external microSD on Lenovo Miix 320 Hans de Goede
2020-01-17 9:16 ` Adrian Hunter
2020-03-06 14:07 ` Hans de Goede
2020-03-06 14:10 ` Hans de Goede
2020-01-08 9:39 ` [PATCH 2/2] mmc: sdhci-acpi: Disable write protect detection on Acer Aspire Switch 10 (SW5-012) Hans de Goede
2020-01-15 12:51 ` [PATCH 0/2] mmc: sdhci-acpi: Introduce device specific quirks, fix issues on 2 device models Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9ab8946-c599-5f83-7527-2387a9e82e8a@xenosoft.de \
--to=chzigotzky@xenosoft.de \
--cc=contact@a-eon.com \
--cc=darren@stevens-zone.net \
--cc=linux-mmc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madskateman@gmail.com \
--cc=rtd2@xtra.co.nz \
--cc=runaway@candw.ms \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).