Re: [PATCH v9 4/5] edac: Add APM X-Gene SoC EDAC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thursday 14 May 2015 11:05:46 Loc Ho wrote:
> This patch adds support for the APM X-Gene SoC EDAC driver.
> 
> Signed-off-by: Loc Ho <lho@xxxxxxx>

Looks much better than before.

>  
> +config EDAC_XGENE
> +	tristate "APM X-Gene SoC"
> +	depends on EDAC_MM_EDAC && ARM64
> +	help
> +	  Support for error detection and correction on the
> +	  APM X-Gene family of SOCs.
> +
>  endif # EDAC

Maybe 'ARM64 || COMPILE_TEST', so we get build coverage on x86 with allmodconfig?

> +	rc = of_property_read_u32_array(np, "reg", addr_res, 4);
> +	if (rc < 0) {
> +		dev_err(edac->dev, "no MCU resource address\n");
> +		goto err_group;
> +	}
> +	tmp_ctx.mcu_csr = devm_ioremap(edac->dev,
> +				       MAKEU64(addr_res[0], addr_res[1]),
> +				       MAKEU64(addr_res[2], addr_res[3]));
> +	if (IS_ERR(tmp_ctx.mcu_csr)) {
> +		dev_err(edac->dev, "unable to map MCU resource\n");
> +		rc = PTR_ERR(tmp_ctx.mcu_csr);
> +		goto err_group;
> +	}

This is incorrect, you have to use of_get_address() or of_address_to_resource()
to compute the CPU-relative address: The address that is used within the
node may not be the same, depending on the parent's ranges properties.
See also my comment about the missing ranges in the DT example.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux