Message ID | 20161117230830.31047-7-gregory.clement@free-electrons.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello, On Fri, 18 Nov 2016 00:08:23 +0100, Gregory CLEMENT wrote: > - crypto_sram0: sa-sram0 { > + /* The following unit addresses (for sa-sram) are composed of > + * the target value (bit [40-47]), attributes value (bits > + * [32-39], and the address value in the window memory: [0-31]. > + */ The "address value in the window memory" part doesn't make a lot of sense. Maybe: "The following unit addresses are composed of the window target ID (bits 40-47), the window target attributes (bits 32-39) and the offset inside the window." Also, the comment formatting is not compliant with the coding style, should be: /* * ... * ... */ But do we really want this comment above each node? Couldn't we instead add this explanation in the mvebu-mbus.txt DT binding? Best regards, Thomas
Hi Thomas, On ven., nov. 18 2016, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Hello, > > On Fri, 18 Nov 2016 00:08:23 +0100, Gregory CLEMENT wrote: > >> - crypto_sram0: sa-sram0 { >> + /* The following unit addresses (for sa-sram) are composed of >> + * the target value (bit [40-47]), attributes value (bits >> + * [32-39], and the address value in the window memory: [0-31]. >> + */ > > The "address value in the window memory" part doesn't make a lot of > sense. Maybe: > > "The following unit addresses are composed of the window target ID > (bits 40-47), the window target attributes (bits 32-39) and the offset > inside the window." I'm fine with it > > Also, the comment formatting is not compliant with the coding style, > should be: > > /* > * ... > * ... > */ > Hum yes I need to teach emacs how to properly format the comments. > But do we really want this comment above each node? Couldn't we instead > add this explanation in the mvebu-mbus.txt DT binding? We could but I fear that nobody will read it. Indeed if you know that in order to understand the unit address, you will have to have a look an the binding of the mvebu-mbus, then it means that you already are an expert and actually you barely need to read it! In order to have less change we could at least put it near the MBUS_ID macro and if the mvebu-mbus.txt DT binding too. Gregory > > Best regards, > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com
Hello, On Fri, 18 Nov 2016 13:06:17 +0100, Gregory CLEMENT wrote: > > But do we really want this comment above each node? Couldn't we instead > > add this explanation in the mvebu-mbus.txt DT binding? > > We could but I fear that nobody will read it. > > Indeed if you know that in order to understand the unit address, you will > have to have a look an the binding of the mvebu-mbus, then it means that > you already are an expert and actually you barely need to read it! Well, you anyway need to read the DT binding if you want to add more nodes that use this magic MBUS_ID() thing, so I believe it makes sense to have this comment in the binding documentation. > In order to have less change we could at least put it near the MBUS_ID > macro and if the mvebu-mbus.txt DT binding too. Fine with that. Thanks! Thomas
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi index 9791a61f076b..80e1a4915d1d 100644 --- a/arch/arm/boot/dts/armada-375.dtsi +++ b/arch/arm/boot/dts/armada-375.dtsi @@ -644,7 +644,12 @@ }; - crypto_sram0: sa-sram0 { + /* The following unit addresses (for sa-sram) are composed of + * the target value (bit [40-47]), attributes value (bits + * [32-39], and the address value in the window memory: [0-31]. + */ + + crypto_sram0: sa-sram@90900000000 { compatible = "mmio-sram"; reg = <MBUS_ID(0x09, 0x09) 0 0x800>; clocks = <&gateclk 30>; @@ -653,7 +658,7 @@ ranges = <0 MBUS_ID(0x09, 0x09) 0 0x800>; }; - crypto_sram1: sa-sram1 { + crypto_sram1: sa-sram@90500000000 { compatible = "mmio-sram"; reg = <MBUS_ID(0x09, 0x05) 0 0x800>; clocks = <&gateclk 31>;
sa-sram which is a mmio-sram has a reg property so the unit name should contain an address. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> --- arch/arm/boot/dts/armada-375.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)