Lines Matching refs:dev
31 __FBSDID("$FreeBSD: releng/11.0/sys/dev/bhnd/cores/chipc/chipc_slicer.c 302189 2016-06-25 04:33:00Z landonf $");
50 #include <dev/bhnd/bhnd_debug.h>
54 #include <dev/cfi/cfi_var.h>
57 static int chipc_slicer_walk(device_t dev, struct resource *res,
78 chipc_slicer_cfi(device_t dev, struct flash_slice *slices, int *nslices)
84 if (device_get_devclass(dev) != devclass_find("cfi"))
88 if ((parent = device_get_parent(dev)) == NULL) {
89 BHND_ERROR_DEV(dev, "no found ChipCommon device");
94 BHND_ERROR_DEV(dev, "no found ChipCommon device");
98 sc = device_get_softc(dev);
99 return (chipc_slicer_walk(dev, sc->sc_res, slices, nslices));
103 chipc_slicer_spi(device_t dev, struct flash_slice *slices, int *nslices)
108 BHND_DEBUG_DEV(dev, "initting SPI slicer: %s", device_get_name(dev));
111 spibus = device_get_parent(dev);
113 BHND_ERROR_DEV(dev, "no found ChipCommon SPI BUS device");
119 BHND_ERROR_DEV(dev, "no found ChipCommon SPI device");
125 BHND_ERROR_DEV(dev, "no found ChipCommon device");
130 return (chipc_slicer_walk(dev, sc->sc_flash_res, slices, nslices));
137 chipc_slicer_walk(device_t dev, struct resource *res,
151 BHND_TRACE_DEV(dev, "slicer: scanning memory [%x bytes] for headers...",
161 BHND_TRACE_DEV(dev, "stop on 2nd TRX: %x", ofs);