[PATCH v4 3/5] ARM: dts: add GXP Support for fans and SPI

Hawkins, Nick nick.hawkins at hpe.com
Thu Jan 12 11:58:23 PST 2023


> If the two ranges are actually translated separately on the
> bus, you could also decide to enumerate the translations with
> a 64-bit local address and make the upper word an enumeration,
> such as

> ranges = <0x1 0x0 0x80000000 0xf000000>,
> <0x2 0x0 0xc0000000 0x30000000>;

I am not finding a good example on how this would affect the node
addresses and reg properties. I believe I will stick with the current
format if that is acceptable.

> Now it almost matches, except for the final byte, as the
> range actually ends at 0xfffffffe not 0xffffffff if you make
> the size one byte less than 1GB.

> Is there a special register in the last byte?

No there is not I will now have ranges as:

ranges = <0x0 0x80000000 0xf000000>, /* 0x80000000 - 0x8f000000 */
                <0x40000000 0xc0000000 0x40000000>; /* 0xc0000000 - 0xffffffff */

> I suppose the physical address in the old mapping was actually
> outside of the 0xc0000000-0xefffffff range, so it wasn't
> even accessible. If the addresses are interpreted to wrap around
> at the end of the mapping, that would have made the CPU visible
> address 0xe0f00000 (0xc0000000 + (0x80f00000 % 0x30000000)).
> If it just wrapped around as a 32-bit number, it would be
> 0x40f00000 ((0xc0000000 + 0x80f00000)% 0x100000000), but I
> don't see you you'd get to 80f00000.

It was not intended to wrap around; it was an error before and was
not accessible.

The updated section of the device tree will be:

ahb at 80000000 {
                        compatible = "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges = <0x0 0x80000000 0xf000000>, /* 0x80000000 - 0x8f000000 */
                                 <0x40000000 0xc0000000 0x40000000>; /* 0xc0000000 - 0xffffffff */
                        dma-ranges;

                      ...

                       vic0: interrupt-controller at 4eff0000 { /* 0xceff0000 */
                                compatible = "arm,pl192-vic";
                                reg = <0x4eff0000 0x1000>;
                                interrupt-controller;
                                #interrupt-cells = <1>;
                        };

                        vic1: interrupt-controller at f00000 { /* 0x80f00000 */
                                compatible = "arm,pl192-vic";
                                reg = <0xf00000 0x1000>;
                                interrupt-controller;
                                #interrupt-cells = <1>;
                        };

                        ...
};

Thanks,

-Nick Hawkins



More information about the linux-arm-kernel mailing list