3 #define SPIBUS_IVAR(d) (struct spibus_ivar *) device_get_ivars(d)
4 #define SPIBUS_SOFTC(d) (struct spibus_softc *) device_get_softc(d)
17 SPIBUS_IVAR_CS /* chip select that we're on */
20 #define SPIBUS_ACCESSOR(A, B, T) \
22 spibus_get_ ## A(device_t dev, T *t) \
24 return BUS_READ_IVAR(device_get_parent(dev), dev, \
25 SPIBUS_IVAR_ ## B, (uintptr_t *) t); \
28 SPIBUS_ACCESSOR(cs, CS, uint32_t)