Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Replace the LOWER_FREQ quirk with the SLOW_SDR50...
details: https://anonhg.NetBSD.org/src/rev/46c0a6d66542
branches: trunk
changeset: 339781:46c0a6d66542
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Aug 09 13:27:48 2015 +0000
description:
Replace the LOWER_FREQ quirk with the SLOW_SDR50 quirk for the
Ricoh 5U823 controller. This stabilizes SD cards at standard speed
and high speed and also UHS-I SDR50.
diffstat:
sys/dev/pci/sdhc_pci.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (67 lines):
diff -r e05627414cb6 -r 46c0a6d66542 sys/dev/pci/sdhc_pci.c
--- a/sys/dev/pci/sdhc_pci.c Sun Aug 09 13:24:39 2015 +0000
+++ b/sys/dev/pci/sdhc_pci.c Sun Aug 09 13:27:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc_pci.c,v 1.11 2014/03/29 19:28:25 christos Exp $ */
+/* $NetBSD: sdhc_pci.c,v 1.12 2015/08/09 13:27:48 mlelstv Exp $ */
/* $OpenBSD: sdhc_pci.c,v 1.7 2007/10/30 18:13:45 chl Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.11 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.12 2015/08/09 13:27:48 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -85,6 +85,7 @@
#define SDHC_PCI_QUIRK_TI_HACK (1U << 1)
#define SDHC_PCI_QUIRK_NO_PWR0 (1U << 2)
#define SDHC_PCI_QUIRK_RICOH_LOWER_FREQ_HACK (1U << 3)
+#define SDHC_PCI_QUIRK_RICOH_SLOW_SDR50_HACK (1U << 4)
} sdhc_pci_quirk_table[] = {
{
PCI_VENDOR_TI,
@@ -112,16 +113,14 @@
0,
SDHC_PCI_QUIRK_NO_PWR0
},
-
{
PCI_VENDOR_RICOH,
PCI_PRODUCT_RICOH_Rx5U823,
0xffff,
0xffff,
0,
- SDHC_PCI_QUIRK_RICOH_LOWER_FREQ_HACK
+ SDHC_PCI_QUIRK_RICOH_SLOW_SDR50_HACK
},
-
{
PCI_VENDOR_RICOH,
PCI_PRODUCT_RICOH_Rx5C822,
@@ -241,6 +240,8 @@
SET(sc->sc.sc_flags, SDHC_FLAG_NO_PWR0);
if (ISSET(flags, SDHC_PCI_QUIRK_RICOH_LOWER_FREQ_HACK))
sdhc_pci_quirk_ricoh_lower_freq_hack(pa);
+ if (ISSET(flags, SDHC_PCI_QUIRK_RICOH_SLOW_SDR50_HACK))
+ SET(sc->sc.sc_flags, SDHC_FLAG_SLOW_SDR50);
/*
* Map and attach all hosts supported by the host controller.
@@ -395,7 +396,6 @@
static void
sdhc_pci_quirk_ricoh_lower_freq_hack(struct pci_attach_args *pa)
{
-
/* Enable SD2.0 mode. */
sdhc_pci_conf_write(pa, SDHC_PCI_MODE_KEY, 0xfc);
sdhc_pci_conf_write(pa, SDHC_PCI_MODE, SDHC_PCI_MODE_SD20);
@@ -408,4 +408,5 @@
sdhc_pci_conf_write(pa, SDHC_PCI_BASE_FREQ_KEY, 0x01);
sdhc_pci_conf_write(pa, SDHC_PCI_BASE_FREQ, 50);
sdhc_pci_conf_write(pa, SDHC_PCI_BASE_FREQ_KEY, 0x00);
+printf("quirked\n");
}
Home |
Main Index |
Thread Index |
Old Index