Lines Matching refs:dcr
787 static size_t sizeof_dcr(struct acpi_nfit_control_region *dcr) in sizeof_dcr() argument
789 if (dcr->header.length < offsetof(struct acpi_nfit_control_region, in sizeof_dcr()
792 if (dcr->windows) in sizeof_dcr()
793 return sizeof(*dcr); in sizeof_dcr()
799 struct acpi_nfit_control_region *dcr) in add_dcr() argument
804 if (!sizeof_dcr(dcr)) in add_dcr()
808 if (memcmp(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)) == 0) { in add_dcr()
813 nfit_dcr = devm_kzalloc(dev, sizeof(*nfit_dcr) + sizeof(*dcr), in add_dcr()
818 memcpy(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)); in add_dcr()
821 dcr->region_index, dcr->windows); in add_dcr()
1004 u16 dcr = nfit_mem->dcr->region_index; in nfit_mem_find_spa_bdw() local
1020 if (nfit_memdev->memdev->region_index != dcr) in nfit_mem_find_spa_bdw()
1036 u16 dcr = __to_nfit_memdev(nfit_mem)->region_index; in nfit_mem_init_bdw() local
1043 if (nfit_bdw->bdw->region_index != dcr) in nfit_mem_init_bdw()
1060 nfit_memdev->memdev->region_index != dcr) in nfit_mem_init_bdw()
1101 u16 dcr; in __nfit_mem_init() local
1108 dcr = nfit_memdev->memdev->region_index; in __nfit_mem_init()
1130 if (nfit_dcr->dcr->region_index != dcr) in __nfit_mem_init()
1139 if (!nfit_mem->dcr) in __nfit_mem_init()
1140 nfit_mem->dcr = nfit_dcr->dcr; in __nfit_mem_init()
1141 else if (nfit_mem->dcr->windows == 0 in __nfit_mem_init()
1142 && nfit_dcr->dcr->windows) in __nfit_mem_init()
1143 nfit_mem->dcr = nfit_dcr->dcr; in __nfit_mem_init()
1170 if (dcr && !nfit_mem->dcr) { in __nfit_mem_init()
1172 spa->range_index, dcr); in __nfit_mem_init()
1450 return nfit_mem->dcr; in to_nfit_dcr()
1474 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in vendor_show() local
1476 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->vendor_id)); in vendor_show()
1483 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in rev_id_show() local
1485 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->revision_id)); in rev_id_show()
1492 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in device_show() local
1494 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->device_id)); in device_show()
1501 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_vendor_show() local
1503 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->subsystem_vendor_id)); in subsystem_vendor_show()
1510 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_rev_id_show() local
1513 be16_to_cpu(dcr->subsystem_revision_id)); in subsystem_rev_id_show()
1520 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in subsystem_device_show() local
1522 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->subsystem_device_id)); in subsystem_device_show()
1541 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in format_show() local
1543 return sprintf(buf, "0x%04x\n", le16_to_cpu(dcr->code)); in format_show()
1556 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in format1_show() local
1572 if (nfit_dcr->dcr->region_index != memdev->region_index) in format1_show()
1574 if (nfit_dcr->dcr->code == dcr->code) in format1_show()
1577 le16_to_cpu(nfit_dcr->dcr->code)); in format1_show()
1600 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); in serial_show() local
1602 return sprintf(buf, "0x%08x\n", be32_to_cpu(dcr->serial_number)); in serial_show()
1858 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_add_dimm() local
1865 if (dcr->valid_fields & ACPI_NFIT_CONTROL_MFG_INFO_VALID) in acpi_nfit_add_dimm()
1867 be16_to_cpu(dcr->vendor_id), in acpi_nfit_add_dimm()
1868 dcr->manufacturing_location, in acpi_nfit_add_dimm()
1869 be16_to_cpu(dcr->manufacturing_date), in acpi_nfit_add_dimm()
1870 be32_to_cpu(dcr->serial_number)); in acpi_nfit_add_dimm()
1873 be16_to_cpu(dcr->vendor_id), in acpi_nfit_add_dimm()
1874 be32_to_cpu(dcr->serial_number)); in acpi_nfit_add_dimm()
2372 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_init_interleave_set() local
2374 if (!memdev || !nfit_mem->dcr) { in acpi_nfit_init_interleave_set()
2380 map->serial_number = dcr->serial_number; in acpi_nfit_init_interleave_set()
2383 map2->serial_number = dcr->serial_number; in acpi_nfit_init_interleave_set()
2384 map2->vendor_id = dcr->vendor_id; in acpi_nfit_init_interleave_set()
2385 map2->manufacturing_date = dcr->manufacturing_date; in acpi_nfit_init_interleave_set()
2386 map2->manufacturing_location = dcr->manufacturing_location; in acpi_nfit_init_interleave_set()
2410 struct acpi_nfit_control_region *dcr = nfit_mem->dcr; in acpi_nfit_init_interleave_set() local
2412 if (map2->serial_number == dcr->serial_number && in acpi_nfit_init_interleave_set()
2413 map2->vendor_id == dcr->vendor_id && in acpi_nfit_init_interleave_set()
2414 map2->manufacturing_date == dcr->manufacturing_date && in acpi_nfit_init_interleave_set()
2416 == dcr->manufacturing_location) { in acpi_nfit_init_interleave_set()
2611 if (!nfit_mem || !nfit_mem->dcr || !nfit_mem->bdw) { in acpi_nfit_blk_region_enable()
2614 (nfit_mem && nfit_mem->dcr) ? "" : " dcr", in acpi_nfit_blk_region_enable()
2648 nfit_blk->cmd_offset = nfit_mem->dcr->command_offset; in acpi_nfit_blk_region_enable()
2649 nfit_blk->stat_offset = nfit_mem->dcr->status_offset; in acpi_nfit_blk_region_enable()
2658 mmio->size = nfit_mem->dcr->window_size; in acpi_nfit_blk_region_enable()