2013-06-06 05:41:49

by Matt Porter

[permalink] [raw]
Subject: [PATCH 0/2] ARM dts: bcm281xx: use preprocessor for device trees

This series follows the same approach as taken on Tegra and
OMAP DT files to use the C preprocessor in order to improve
readability. Since bcm281xx does not yet have gpio and pinctrl
support, this series just enables the C preprocessor and removes
the magic constants from existing irq properties. Any new
additions can come in using human readable definitions.

The resulting dtb was diff-tested to validate it versus the non
preprocessed dts version.

Matt Porter (2):
ARM: dts: bcm281xx: use #include for device tree files
ARM: dts: bcm281xx: use existing defines for irqs

arch/arm/boot/dts/bcm11351-brt.dts | 2 +-
arch/arm/boot/dts/bcm11351.dtsi | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)

--
1.7.9.5


2013-06-06 05:41:53

by Matt Porter

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: bcm281xx: use existing defines for irqs

Use the standard interrupt-controller and ARM GIC constants to
improve the readability of bcm281xx DT irq properties.

Signed-off-by: Matt Porter <[email protected]>
---
arch/arm/boot/dts/bcm11351.dtsi | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi
index c08810e..824bebe 100644
--- a/arch/arm/boot/dts/bcm11351.dtsi
+++ b/arch/arm/boot/dts/bcm11351.dtsi
@@ -11,6 +11,9 @@
* GNU General Public License for more details.
*/

+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
#include "skeleton.dtsi"

/ {
@@ -41,7 +44,7 @@
status = "disabled";
reg = <0x3e000000 0x1000>;
clock-frequency = <13000000>;
- interrupts = <0x0 67 0x4>;
+ interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
};
@@ -56,7 +59,7 @@
timer@35006000 {
compatible = "bcm,kona-timer";
reg = <0x35006000 0x1000>;
- interrupts = <0x0 7 0x4>;
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <32768>;
};

--
1.7.9.5

2013-06-06 05:42:18

by Matt Porter

[permalink] [raw]
Subject: [PATCH 1/2] ARM: dts: bcm281xx: use #include for device tree files

Replace /include/ by #include for bcm281xx device tree
files, enabling use of the C preprocessor.

Signed-off-by: Matt Porter <[email protected]>
---
arch/arm/boot/dts/bcm11351-brt.dts | 2 +-
arch/arm/boot/dts/bcm11351.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts
index 248067c..3392f64 100644
--- a/arch/arm/boot/dts/bcm11351-brt.dts
+++ b/arch/arm/boot/dts/bcm11351-brt.dts
@@ -13,7 +13,7 @@

/dts-v1/;

-/include/ "bcm11351.dtsi"
+#include "bcm11351.dtsi"

/ {
model = "BCM11351 BRT board";
diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi
index 41b2c6c..c08810e 100644
--- a/arch/arm/boot/dts/bcm11351.dtsi
+++ b/arch/arm/boot/dts/bcm11351.dtsi
@@ -11,7 +11,7 @@
* GNU General Public License for more details.
*/

-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"

/ {
model = "BCM11351 SoC";
--
1.7.9.5

2013-06-11 07:03:41

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM dts: bcm281xx: use preprocessor for device trees

On Thu, Jun 06, 2013 at 01:41:33AM -0400, Matt Porter wrote:
> This series follows the same approach as taken on Tegra and
> OMAP DT files to use the C preprocessor in order to improve
> readability. Since bcm281xx does not yet have gpio and pinctrl
> support, this series just enables the C preprocessor and removes
> the magic constants from existing irq properties. Any new
> additions can come in using human readable definitions.
>
> The resulting dtb was diff-tested to validate it versus the non
> preprocessed dts version.
>
> Matt Porter (2):
> ARM: dts: bcm281xx: use #include for device tree files
> ARM: dts: bcm281xx: use existing defines for irqs

Acked-by: Olof Johansson <[email protected]>

Not sure what else you'll have for 3.11 devicetree-wise, Christian -- your
choice if you want to send a pull request or ack these and we'll apply them
directly.


-Olof

2013-06-11 16:56:59

by Christian Daudt

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM dts: bcm281xx: use preprocessor for device trees

On 13-06-11 12:03 AM, Olof Johansson wrote:
> On Thu, Jun 06, 2013 at 01:41:33AM -0400, Matt Porter wrote:
>> This series follows the same approach as taken on Tegra and
>> OMAP DT files to use the C preprocessor in order to improve
>> readability. Since bcm281xx does not yet have gpio and pinctrl
>> support, this series just enables the C preprocessor and removes
>> the magic constants from existing irq properties. Any new
>> additions can come in using human readable definitions.
>>
>> The resulting dtb was diff-tested to validate it versus the non
>> preprocessed dts version.
>>
>> Matt Porter (2):
>> ARM: dts: bcm281xx: use #include for device tree files
>> ARM: dts: bcm281xx: use existing defines for irqs
> Acked-by: Olof Johansson <[email protected]>
Acked-by: Christian Daudt <[email protected]>
>
> Not sure what else you'll have for 3.11 devicetree-wise, Christian -- your
> choice if you want to send a pull request or ack these and we'll apply them
> directly.
>
I can add them to my tree. I already have a pending dt commit to push.

thanks,
csd



2013-06-11 23:40:27

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM dts: bcm281xx: use preprocessor for device trees

On Tue, Jun 11, 2013 at 09:56:45AM -0700, Christian Daudt wrote:
> On 13-06-11 12:03 AM, Olof Johansson wrote:
> >On Thu, Jun 06, 2013 at 01:41:33AM -0400, Matt Porter wrote:
> >>This series follows the same approach as taken on Tegra and
> >>OMAP DT files to use the C preprocessor in order to improve
> >>readability. Since bcm281xx does not yet have gpio and pinctrl
> >>support, this series just enables the C preprocessor and removes
> >>the magic constants from existing irq properties. Any new
> >>additions can come in using human readable definitions.
> >>
> >>The resulting dtb was diff-tested to validate it versus the non
> >>preprocessed dts version.
> >>
> >>Matt Porter (2):
> >> ARM: dts: bcm281xx: use #include for device tree files
> >> ARM: dts: bcm281xx: use existing defines for irqs
> >Acked-by: Olof Johansson <[email protected]>
> Acked-by: Christian Daudt <[email protected]>
> >
> >Not sure what else you'll have for 3.11 devicetree-wise, Christian -- your
> >choice if you want to send a pull request or ack these and we'll apply them
> >directly.
> >
> I can add them to my tree. I already have a pending dt commit to push.

Ok, great.


-Olof