FreeBSD/sys/arm/xscale/ixp425/cambria_exp_space.c
/* XXX workaround ata driver by (incorrectly) byte swapping stream cases */
XXX workaround ata driver by (incorrectly) byte swapping stream cases
XXX workaround ata driver by ( incorrectly ) byte swapping stream cases
static void
cambria_bs_rm_2_s(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t o,
	u_int16_t *d, bus_size_t c)
{
	struct expbus_softc *exp = tag->bs_privdata;
	struct ixp425_softc *sc = exp->sc;
	uint16_t v;
	bus_size_t i;
	EXP_LOCK(exp);
	enable_16(sc, exp->csoff);
#if 1
	for (i = 0; i < c; i++) {
		v = bus_space_read_2(sc->sc_iot, h, o);
		d[i] = bswap16(v);
	}
#else
	bus_space_read_multi_stream_2(sc->sc_iot, h, o, d, c);
#endif
	disable_16(sc, exp->csoff);
	EXP_UNLOCK(exp);
}
static void cambria_bs_rm_2_s ( bus_space_tag_t tag , bus_space_handle_t h , bus_size_t o , u_int16_t * d , bus_size_t c ) { struct expbus_softc * exp = tag -> bs_privdata ; struct ixp425_softc * sc = exp -> sc ; uint16_t v ; bus_size_t i ; EXP_LOCK ( exp ) ; enable_16 ( sc , exp -> csoff ) ; #if 1 for ( i = 0 ; i < c ; i ++ ) { v = bus_space_read_2 ( sc -> sc_iot , h , o ) ; d [ i ] = bswap16 ( v ) ; } #else bus_space_read_multi_stream_2 ( sc -> sc_iot , h , o , d , c ) ; #endif disable_16 ( sc , exp -> csoff ) ; EXP_UNLOCK ( exp ) ; }
XXX workaround ata driver by (incorrectly) byte swapping stream cases
XXX workaround ata driver by ( incorrectly ) byte swapping stream cases