diff options
author | imp <imp@FreeBSD.org> | 2012-08-29 04:41:25 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2012-08-29 04:41:25 +0000 |
commit | c579535d2ff2a8de0ef5128b0fe8c1b801413a4d (patch) | |
tree | 757bb6d5e18067c684b5929a49369494aa9a470a /sys/arm/at91/at91_mci.c | |
parent | 6866af3b1892f6e2c46907cefb825d741acecb89 (diff) | |
download | FreeBSD-src-c579535d2ff2a8de0ef5128b0fe8c1b801413a4d.zip FreeBSD-src-c579535d2ff2a8de0ef5128b0fe8c1b801413a4d.tar.gz |
When copying data, use memcpy instead of bcopy. It matches the
arguments better.
Also, set the need to use the workaround flag before we actually need
to use it, rather than after.
Diffstat (limited to 'sys/arm/at91/at91_mci.c')
-rw-r--r-- | sys/arm/at91/at91_mci.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arm/at91/at91_mci.c b/sys/arm/at91/at91_mci.c index 75ca2b8..c5bd83a 100644 --- a/sys/arm/at91/at91_mci.c +++ b/sys/arm/at91/at91_mci.c @@ -211,7 +211,7 @@ at91_bswap_buf(struct at91_mci_softc *sc, void * dptr, void * sptr, uint32_t mem * ansley.com) */ if (!(sc->sc_cap & CAP_NEEDS_BYTESWAP)) { - bcopy(dptr, sptr, memsize); + memcpy(dptr, sptr, memsize); return; } @@ -364,6 +364,12 @@ at91_mci_attach(device_t dev) sc->sc_cap = 0; if (at91_is_rm92()) sc->sc_cap |= CAP_NEEDS_BYTESWAP; + /* + * MCI1 Rev 2 controllers need some workarounds, flag if so. + */ + if (at91_mci_is_mci1rev2xx()) + sc->sc_cap |= CAP_MCI1_REV2XX; + err = at91_mci_activate(dev); if (err) goto out; @@ -409,12 +415,6 @@ at91_mci_attach(device_t dev) } /* - * MCI1 Rev 2 controllers need some workarounds, flag if so. - */ - if (at91_mci_is_mci1rev2xx()) - sc->sc_cap |= CAP_MCI1_REV2XX; - - /* * Allow 4-wire to be initially set via #define. * Allow a device hint to override that. * Allow a sysctl to override that. |