bcm2835_sdhci.c (280294) | bcm2835_sdhci.c (280558) |
---|---|
1/*- 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c 280294 2015-03-20 16:54:21Z andrew $"); | 28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c 280558 2015-03-25 10:59:42Z andrew $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 26 unchanged lines hidden (view full) --- 63 64#ifdef DEBUG 65#define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ 66 printf(fmt,##args); } while (0) 67#else 68#define dprintf(fmt, args...) 69#endif 70 | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 26 unchanged lines hidden (view full) --- 63 64#ifdef DEBUG 65#define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ 66 printf(fmt,##args); } while (0) 67#else 68#define dprintf(fmt, args...) 69#endif 70 |
71/* DMA doesn't yet work with the bcm3826 */ 72#ifdef SOC_BCM2836 73#define PIO_MODE 1 74#else 75#define PIO_MODE 0 76#error 77#endif 78 |
|
71static int bcm2835_sdhci_hs = 1; | 79static int bcm2835_sdhci_hs = 1; |
72static int bcm2835_sdhci_pio_mode = 0; | 80static int bcm2835_sdhci_pio_mode = PIO_MODE; |
73 74TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); 75TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); 76 77struct bcm_sdhci_softc { 78 device_t sc_dev; 79 struct mtx sc_mtx; 80 struct resource * sc_mem_res; --- 616 unchanged lines hidden --- | 81 82TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); 83TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); 84 85struct bcm_sdhci_softc { 86 device_t sc_dev; 87 struct mtx sc_mtx; 88 struct resource * sc_mem_res; --- 616 unchanged lines hidden --- |