/* This routine reads and masks, as appropriate, all the relevant status registers that deal with ibm,sdram-4xx-ddr2 ECC errors. While we read all of them, for correctable errors, we only expect to deal with ECCES. For uncorrectable errors, we expect to deal with all of them.  */
static void ppc4xx_ecc_get_status(const struct mem_ctl_info *mci, struct ppc4xx_ecc_status *status)
/* This routine reads and masks, as appropriate, all the relevant status registers that deal with ibm,sdram-4xx-ddr2 ECC errors. While we read all of them, for correctable errors, we only expect to deal with ECCES. For uncorrectable errors, we expect to deal with all of them.  */
static void ppc4xx_ecc_get_status(const struct mem_ctl_info *mci, struct ppc4xx_ecc_status *status)
{
	const struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
	const dcr_host_t *dcr_host = &pdata->dcr_host;
	status->ecces = mfsdram(dcr_host, SDRAM_ECCES) & SDRAM_ECCES_MASK;
	status->wmirq = mfsdram(dcr_host, SDRAM_WMIRQ) & SDRAM_WMIRQ_MASK;
	status->besr  = mfsdram(dcr_host, SDRAM_BESR)  & SDRAM_BESR_MASK;
	status->bearl = mfsdram(dcr_host, SDRAM_BEARL);
	status->bearh = mfsdram(dcr_host, SDRAM_BEARH);
}