summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdhci/sdhci.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2014-09-03 20:07:26 +0000
committermarius <marius@FreeBSD.org>2014-09-03 20:07:26 +0000
commite31bbc3dc14128c27000fcb2986472ee8b546239 (patch)
tree3ecb6b485397783d21f24f13d60b39d10a3e099c /sys/dev/sdhci/sdhci.c
parent478f4fda1a3e3a32a4c9a2d964207c60abc12677 (diff)
downloadFreeBSD-src-e31bbc3dc14128c27000fcb2986472ee8b546239.zip
FreeBSD-src-e31bbc3dc14128c27000fcb2986472ee8b546239.tar.gz
MFC: r270885, r270948
- Nuke unused sdhci_softc. - Static'ize sdhci_debug local to sdhci.c. - Const'ify PCI device description strings. - Nuke redundant resource ID members from sdhci_pci_softc. - Nuke unused hw.sdhci_pci.debug tunable. - Add support for using MSI instead of INTx, controllable via the tunable hw.sdhci.enable_msi (defaulting to on) and tested with a RICOH R5CE823 SD controller. - Use NULL instead of 0 for pointers.
Diffstat (limited to 'sys/dev/sdhci/sdhci.c')
-rw-r--r--sys/dev/sdhci/sdhci.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c
index b8e03be..1434d22 100644
--- a/sys/dev/sdhci/sdhci.c
+++ b/sys/dev/sdhci/sdhci.c
@@ -52,23 +52,11 @@ __FBSDID("$FreeBSD$");
#include "sdhci.h"
#include "sdhci_if.h"
-struct sdhci_softc;
+SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver");
-struct sdhci_softc {
- device_t dev; /* Controller device */
- struct resource *irq_res; /* IRQ resource */
- int irq_rid;
- void *intrhand; /* Interrupt handle */
-
- int num_slots; /* Number of slots on this controller */
- struct sdhci_slot slots[6];
-};
-
-static SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver");
-
-int sdhci_debug = 0;
+static int sdhci_debug;
TUNABLE_INT("hw.sdhci.debug", &sdhci_debug);
-SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RW, &sdhci_debug, 0, "Debug level");
+SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level");
#define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off))
#define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off))
OpenPOWER on IntegriCloud