Date: Wed, 29 Aug 2012 04:41:25 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239804 - head/sys/arm/at91 Message-ID: <201208290441.q7T4fPVX083962@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Aug 29 04:41:25 2012 New Revision: 239804 URL: http://svn.freebsd.org/changeset/base/239804 Log: 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. Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Wed Aug 29 04:11:00 2012 (r239803) +++ head/sys/arm/at91/at91_mci.c Wed Aug 29 04:41:25 2012 (r239804) @@ -211,7 +211,7 @@ at91_bswap_buf(struct at91_mci_softc *sc * 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208290441.q7T4fPVX083962>