Lines Matching refs:dcr
789 static size_t sizeof_dcr(struct acpi_nfit_control_region *dcr) in sizeof_dcr() argument
791 if (dcr->header.length < offsetof(struct acpi_nfit_control_region, in sizeof_dcr()
794 if (dcr->windows) in sizeof_dcr()
795 return sizeof(*dcr); in sizeof_dcr()
801 struct acpi_nfit_control_region *dcr) in add_dcr() argument
806 if (!sizeof_dcr(dcr)) in add_dcr()
810 if (memcmp(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)) == 0) { in add_dcr()
815 nfit_dcr = devm_kzalloc(dev, sizeof(*nfit_dcr) + sizeof(*dcr), in add_dcr()
820 memcpy(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)); in add_dcr()
823 dcr->region_index, dcr->windows); in add_dcr()
1029 u16 dcr; in __nfit_mem_init() local
1036 dcr = nfit_memdev->memdev->region_index; in __nfit_mem_init()
1058 if (nfit_dcr->dcr->region_index != dcr) in __nfit_mem_init()
1067 if (!nfit_mem->dcr) in __nfit_mem_init()
1068 nfit_mem->dcr = nfit_dcr->dcr; in __nfit_mem_init()
1069 else if (nfit_mem->dcr->windows == 0 in __nfit_mem_init()
1070 && nfit_dcr->dcr->windows) in __nfit_mem_init()
1071 nfit_mem->dcr = nfit_dcr->dcr; in __nfit_mem_init()
1098 if (dcr && !nfit_mem->dcr) { in __nfit_mem_init()
1100 spa->range_index, dcr); in __nfit_mem_init()
1377 return nfit_mem->dcr; in to_nfit_dcr()
1401 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in vendor_show() local
1403 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->vendor_id)); in vendor_show()
1410 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in rev_id_show() local
1412 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->revision_id)); in rev_id_show()
1419 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in device_show() local
1421 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->device_id)); in device_show()
1428 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_vendor_show() local
1430 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->subsystem_vendor_id)); in subsystem_vendor_show()
1437 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_rev_id_show() local
1440 be16_to_cpu(dcr->subsystem_revision_id)); in subsystem_rev_id_show()
1447 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_device_show() local
1449 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->subsystem_device_id)); in subsystem_device_show()
1466 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in format_show() local
1468 return sprintf(buf, "0x%04x\n", le16_to_cpu(dcr->code)); in format_show()
1481 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in format1_show() local
1497 if (nfit_dcr->dcr->region_index != memdev->region_index) in format1_show()
1499 if (nfit_dcr->dcr->code == dcr->code) in format1_show()
1502 le16_to_cpu(nfit_dcr->dcr->code)); in format1_show()
1525 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in serial_show() local
1527 return sprintf(buf, "0x%08x\n", be32_to_cpu(dcr->serial_number)); in serial_show()
1783 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_add_dimm() local
1790 if (dcr->valid_fields & ACPI_NFIT_CONTROL_MFG_INFO_VALID) in acpi_nfit_add_dimm()
1792 be16_to_cpu(dcr->vendor_id), in acpi_nfit_add_dimm()
1793 dcr->manufacturing_location, in acpi_nfit_add_dimm()
1794 be16_to_cpu(dcr->manufacturing_date), in acpi_nfit_add_dimm()
1795 be32_to_cpu(dcr->serial_number)); in acpi_nfit_add_dimm()
1798 be16_to_cpu(dcr->vendor_id), in acpi_nfit_add_dimm()
1799 be32_to_cpu(dcr->serial_number)); in acpi_nfit_add_dimm()
2288 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_init_interleave_set() local
2290 if (!memdev || !nfit_mem->dcr) { in acpi_nfit_init_interleave_set()
2296 map->serial_number = dcr->serial_number; in acpi_nfit_init_interleave_set()
2299 map2->serial_number = dcr->serial_number; in acpi_nfit_init_interleave_set()
2300 map2->vendor_id = dcr->vendor_id; in acpi_nfit_init_interleave_set()
2301 map2->manufacturing_date = dcr->manufacturing_date; in acpi_nfit_init_interleave_set()
2302 map2->manufacturing_location = dcr->manufacturing_location; in acpi_nfit_init_interleave_set()
2326 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_init_interleave_set() local
2328 if (map2->serial_number == dcr->serial_number && in acpi_nfit_init_interleave_set()
2329 map2->vendor_id == dcr->vendor_id && in acpi_nfit_init_interleave_set()
2330 map2->manufacturing_date == dcr->manufacturing_date && in acpi_nfit_init_interleave_set()
2332 == dcr->manufacturing_location) { in acpi_nfit_init_interleave_set()