Where in dts file one should define IORESOURCES_(IO|MEM)?
I have read the Documentation/powerpc/booting-without-of.txt and I am still not clear on how manifest constants in platform_get_resource() get translated to items in dts file.
Example:
in drivers/ide/legacy/ide_platform.c there is code that looks like this.
res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);
res_alt = platform_get_resource(pdev, IORESOURCE_IO, 1);
if (!res_base || !res_alt) {
res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
res_alt = platform_get_resource(pdev, IORESOURCE_MEM, 1);If I want to specify IORESOURCE_MEM (0) and IORESOURCE_MEM ( 1) addresses in my board specific what statements do I need to include in my dts file?
I have tried including them in memory {} section of dts and that doesn't work.
Would appreciate help/pointer.
/Subodh Nijsure
(Standard Disclaimers Apply)
_______________________________________________
devicetree-discuss mailing list [email protected]
https://ozlabs.org/mailman/listinfo/devicetree-discuss
A message that is not in the archive (sent off-list or not yet received): 003e01c9bc60$ab11c2c0$9e70150a-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
Quoted 10 lines · Subodh Nijsure
in
drivers/ide/legacy/ide_platform.cthere is code that looks like this.res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); res_alt = platform_get_resource(pdev, IORESOURCE_IO, 1); if (!res_base || !res_alt) { res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); res_alt = platform_get_resource(pdev, IORESOURCE_MEM, 1);If I want to specify
IORESOURCE_MEM(0) andIORESOURCE_MEM( 1) addresses in my board specific what statements do I need to include in my dts file?
They would be the first and second "reg" resources of the relevant device node.
For IDE, you probably want drivers/ata/pata_of_platform.c rather than the above driver.
Quoted 1 line
I have tried including them in memory {} section of dts and that doesn't work.
No, that's for *memory*, not device registers.
-Scott