Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
#include "bcm2835_vcbus.h" | #include "bcm2835_vcbus.h" | ||||
#define BCM2835_DEFAULT_SDHCI_FREQ 50 | #define BCM2835_DEFAULT_SDHCI_FREQ 50 | ||||
#define BCM_SDHCI_BUFFER_SIZE 512 | #define BCM_SDHCI_BUFFER_SIZE 512 | ||||
#define NUM_DMA_SEGS 2 | #define NUM_DMA_SEGS 2 | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
#define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ | static int bcm2835_sdhci_debug = 0; | ||||
printf(fmt,##args); } while (0) | |||||
TUNABLE_INT("hw.bcm2835.sdhci.debug", &bcm2835_sdhci_debug); | |||||
SYSCTL_INT(_hw_sdhci, OID_AUTO, bcm2835_sdhci_debug, CTLFLAG_RWTUN, | |||||
&bcm2835_sdhci_debug, 0, "bcm2835 SDHCI debug level"); | |||||
#define dprintf(fmt, args...) \ | |||||
do { \ | |||||
if (bcm2835_sdhci_debug) \ | |||||
printf("%s: " fmt, __func__, ##args); \ | |||||
} while (0) | |||||
#else | #else | ||||
#define dprintf(fmt, args...) | #define dprintf(fmt, args...) | ||||
#endif | #endif | ||||
static int bcm2835_sdhci_hs = 1; | static int bcm2835_sdhci_hs = 1; | ||||
static int bcm2835_sdhci_pio_mode = 0; | static int bcm2835_sdhci_pio_mode = 0; | ||||
static struct ofw_compat_data compat_data[] = { | static struct ofw_compat_data compat_data[] = { | ||||
▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines |