Lines Matching defs:dev

30  * $FreeBSD: stable/11/sys/dev/jedec_dimm/jedec_dimm.c 355366 2019-12-03 22:53:50Z rpokala $
48 #include <dev/jedec_dimm/jedec_dimm.h>
49 #include <dev/smbus/smbconf.h>
50 #include <dev/smbus/smbus.h>
55 device_t dev;
145 static int jedec_dimm_attach(device_t dev);
150 static int jedec_dimm_detach(device_t dev);
157 static int jedec_dimm_probe(device_t dev);
176 * @param[in,out] dev
180 jedec_dimm_attach(device_t dev)
202 sc = device_get_softc(dev);
203 ctx = device_get_sysctl_ctx(dev);
204 oid = device_get_sysctl_tree(dev);
208 sc->dev = dev;
209 sc->smbus = device_get_parent(dev);
210 sc->spd_addr = smbus_get_addr(dev);
220 device_printf(dev, "failed to read dram_type: %d\n", rc);
242 device_printf(dev, "unsupported dram_type 0x%02x\n", type);
286 device_printf(dev, "failed to read TSOD-present byte: %d\n",
294 device_printf(dev,
301 device_printf(dev, "failed to read TSOD Device ID\n");
309 device_printf(dev,
313 device_printf(dev,
342 CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0,
347 if (resource_string_value(device_get_name(dev), device_get_unit(dev),
361 new_desc_len = strlen(device_get_desc(dev));
373 device_get_desc(dev),
379 device_set_desc_copy(dev, new_desc);
443 device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type);
451 device_printf(sc->dev, "failed to read bus_width: %d\n", rc);
458 device_printf(sc->dev, "failed to read dimm_ranks: %d\n", rc);
465 device_printf(sc->dev, "failed to read sdram_capacity: %d\n",
473 device_printf(sc->dev, "failed to read sdram_width: %d\n", rc);
482 device_printf(sc->dev,
494 device_printf(sc->dev, "invalid bus width info\n");
507 device_printf(sc->dev, "invalid DIMM Rank info\n");
512 device_printf(sc->dev, "invalid DIMM Rank info\n");
529 device_printf(sc->dev, "invalid SDRAM capacity info\n");
534 device_printf(sc->dev, "invalid SDRAM capacity info\n");
545 device_printf(sc->dev, "invalid SDRAM width info\n");
578 * @param[in,out] dev
582 jedec_dimm_detach(device_t dev)
586 sc = device_get_softc(dev);
617 device_printf(sc->dev,
635 device_printf(sc->dev, "unable to change page: %d\n",
645 device_printf(sc->dev,
662 device_printf(sc->dev, "unable to restore page: %d\n",
722 device_printf(sc->dev,
731 device_printf(sc->dev, "invalid offset 0x%04x\n", offset);
740 device_printf(sc->dev, "invalid offset 0x%04x\n", offset);
745 device_printf(sc->dev,
761 device_printf(sc->dev,
769 device_printf(sc->dev,
780 device_printf(sc->dev,
816 device_printf(sc->dev,
832 * @param[in] dev
836 jedec_dimm_probe(device_t dev)
844 smbus = device_get_parent(dev);
845 addr = smbus_get_addr(dev);
850 device_printf(dev,
861 device_printf(dev, "failed to read dram_type\n");
870 device_set_desc(dev, "DDR3 DIMM");
874 device_set_desc(dev, "DDR4 DIMM");
927 device_t dev = arg1;
930 sc = device_get_softc(dev);