Deleted Added
full compact
at91_mci.c (236658) at91_mci.c (236989)
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 * Copyright (c) 2010 Greg Ansley. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 * Copyright (c) 2010 Greg Ansley. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/arm/at91/at91_mci.c 236658 2012-06-06 06:19:52Z imp $");
29__FBSDID("$FreeBSD: head/sys/arm/at91/at91_mci.c 236989 2012-06-13 04:52:19Z imp $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/bio.h>
34#include <sys/bus.h>
35#include <sys/conf.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>

--- 112 unchanged lines hidden (view full) ---

150 val = MCI_MR_PDCMODE;
151 val |= 0x34a; /* PWSDIV = 3; CLKDIV = 74 */
152 if (at91_mci_is_mci1rev2xx())
153 val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF;
154 WR4(sc, MCI_MR, val);
155#ifndef AT91_MCI_SLOT_B
156 WR4(sc, MCI_SDCR, 0); /* SLOT A, 1 bit bus */
157#else
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/bio.h>
34#include <sys/bus.h>
35#include <sys/conf.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>

--- 112 unchanged lines hidden (view full) ---

150 val = MCI_MR_PDCMODE;
151 val |= 0x34a; /* PWSDIV = 3; CLKDIV = 74 */
152 if (at91_mci_is_mci1rev2xx())
153 val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF;
154 WR4(sc, MCI_MR, val);
155#ifndef AT91_MCI_SLOT_B
156 WR4(sc, MCI_SDCR, 0); /* SLOT A, 1 bit bus */
157#else
158 /* XXX Really should add second "unit" but nobody using using
159 * a two slot card that we know of. XXX */
158 /* XXX Really should add second "unit" but nobody using using
159 * a two slot card that we know of. -- except they are... XXX */
160 WR4(sc, MCI_SDCR, 1); /* SLOT B, 1 bit bus */
161#endif
162}
163
164static void
165at91_mci_fini(device_t dev)
166{
167 struct at91_mci_softc *sc = device_get_softc(dev);

--- 651 unchanged lines hidden ---
160 WR4(sc, MCI_SDCR, 1); /* SLOT B, 1 bit bus */
161#endif
162}
163
164static void
165at91_mci_fini(device_t dev)
166{
167 struct at91_mci_softc *sc = device_get_softc(dev);

--- 651 unchanged lines hidden ---