Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237369

Re: [PATCH v2] of/fdt: Allow memory node and root to have different size/address cells

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] of/fdt: Allow memory node and root to have different size/address cells
Date 2015-10-01 14:30 +0200
Message-ID <qeL9M-3Vj-5@gated-at.bofh.it> (permalink)
References <qeL06-3Kc-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday 01 October 2015 17:48:21 Vineet Gupta wrote:
> Currently memory node parsing uses root "#size-cells", "#address-cells"
> This doesn't work correctly when memory address/size is different or
> greater than root's.
> 
> e.g. ARC 32-bit systems implementing physical adressing extension and
> say 4GB of memory. All peripherals mappings stay within the 4GB (so root
> address/size cells remain 1 each), only the memory node address/size
> cells needs to specify greater than 32-bits as below
> 
>         memory {
>                 device_type = "memory";
>                 reg = <0x0 0x80000000 0x1 0x00000000>;  /* 4 GB */
>                 #address-cells = <2>;
>                 #size-cells = <2>;
>         };
> 
> This patch lets me boot a ARC system with PAE40 + 4GB of memory specified
> as above and fails to boot otherwise as memory parsing doesn't populate
> right base, size.
> 

This looks wrong: the #address-cells property in a device node is used
to parse the reg property of its child nodes, not the node itself.

The only way to list memory like this is to put #size-cells=<2>
into the root node. All lower bus nodes can then use the
normal #address-cells/#size-cells again and use a ranges property
to convert the register ranges so you don't need to update all
nodes.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] of/fdt: Allow memory node and root to have different size/address cells Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-10-01 14:20 +0200
  Re: [PATCH v2] of/fdt: Allow memory node and root to have different size/address cells Arnd Bergmann <arnd@arndb.de> - 2015-10-01 14:30 +0200
    Re: [PATCH v2] of/fdt: Allow memory node and root to have different  size/address cells Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-10-03 10:10 +0200

csiph-web