All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] OMAP: Add initial support for DT on OMAP3 & OMAP4
@ 2011-09-23 20:23 ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson

Hi Tony, Grant,

Here is the first set of patches to add device-tree support for OMAP3+
platforms. 
That series mainly adds a minimal OMAP2+ generic board file for basic
DT support on OMAP2420, OMAP2430, OMAP3, OMAP4 and beyond. The goal is
to remove even the minimal static devices init in order to have
a fully generic OMAP board file. For the moment both UART and I2C need
to be initialized statically.

That series is a respin of several RFCs I sent previously and take into
account the comments mainly done by Arnd and Grant.

Patches are based on for_3.2/2_omap_device_dt
and are available here:
git://gitorious.org/omap-pm/linux.git for_3.2/3_omap_devicetree

Please note that the Device Tree source files will be stored as well
in the following repository:
git://gitorious.org/omap/devicetree.git master

Comments are welcome.

Regards,
Benoit


Benoit Cousson (11):
  OMAP2+: Add SoC specific map_io functions
  arm/dts: Add initial device tree support for OMAP4 SoC
  arm/dts: Add support for OMAP4 PandaBoard
  arm/dts: Add support for OMAP4 SDP board
  arm/dts: Add initial device tree support for OMAP3 SoC
  arm/dts: Add support for OMAP3 Beagle board
  OMAP2+: board-generic: Add DT support to generic board
  OMAP2+: board-generic: Add i2c static init
  OMAP2+: l3-noc: Add support for device-tree
  arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  arm/dts: OMAP3+: Add mpu, dsp and iva nodes

 Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++
 Documentation/devicetree/bindings/arm/omap/iva.txt |   19 +++
 .../devicetree/bindings/arm/omap/l3-noc.txt        |   19 +++
 Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++
 arch/arm/boot/dts/omap3-beagle.dts                 |   29 ++++
 arch/arm/boot/dts/omap3.dtsi                       |   63 ++++++++
 arch/arm/boot/dts/omap4-panda.dts                  |   29 ++++
 arch/arm/boot/dts/omap4-sdp.dts                    |   29 ++++
 arch/arm/boot/dts/omap4.dtsi                       |  103 +++++++++++++
 arch/arm/mach-omap2/Kconfig                        |    8 +-
 arch/arm/mach-omap2/board-generic.c                |  158 ++++++++++++++-----
 arch/arm/mach-omap2/common.c                       |   18 +++
 arch/arm/mach-omap2/devices.c                      |    5 +
 arch/arm/mach-omap2/omap_l3_noc.c                  |   23 +++-
 arch/arm/mach-omap2/pm.c                           |    3 +-
 arch/arm/plat-omap/include/plat/common.h           |    4 +
 16 files changed, 501 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/l3-noc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt
 create mode 100644 arch/arm/boot/dts/omap3-beagle.dts
 create mode 100644 arch/arm/boot/dts/omap3.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-panda.dts
 create mode 100644 arch/arm/boot/dts/omap4-sdp.dts
 create mode 100644 arch/arm/boot/dts/omap4.dtsi


^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 00/11] OMAP: Add initial support for DT on OMAP3 & OMAP4
@ 2011-09-23 20:23 ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony, Grant,

Here is the first set of patches to add device-tree support for OMAP3+
platforms. 
That series mainly adds a minimal OMAP2+ generic board file for basic
DT support on OMAP2420, OMAP2430, OMAP3, OMAP4 and beyond. The goal is
to remove even the minimal static devices init in order to have
a fully generic OMAP board file. For the moment both UART and I2C need
to be initialized statically.

That series is a respin of several RFCs I sent previously and take into
account the comments mainly done by Arnd and Grant.

Patches are based on for_3.2/2_omap_device_dt
and are available here:
git://gitorious.org/omap-pm/linux.git for_3.2/3_omap_devicetree

Please note that the Device Tree source files will be stored as well
in the following repository:
git://gitorious.org/omap/devicetree.git master

Comments are welcome.

Regards,
Benoit


Benoit Cousson (11):
  OMAP2+: Add SoC specific map_io functions
  arm/dts: Add initial device tree support for OMAP4 SoC
  arm/dts: Add support for OMAP4 PandaBoard
  arm/dts: Add support for OMAP4 SDP board
  arm/dts: Add initial device tree support for OMAP3 SoC
  arm/dts: Add support for OMAP3 Beagle board
  OMAP2+: board-generic: Add DT support to generic board
  OMAP2+: board-generic: Add i2c static init
  OMAP2+: l3-noc: Add support for device-tree
  arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  arm/dts: OMAP3+: Add mpu, dsp and iva nodes

 Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++
 Documentation/devicetree/bindings/arm/omap/iva.txt |   19 +++
 .../devicetree/bindings/arm/omap/l3-noc.txt        |   19 +++
 Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++
 arch/arm/boot/dts/omap3-beagle.dts                 |   29 ++++
 arch/arm/boot/dts/omap3.dtsi                       |   63 ++++++++
 arch/arm/boot/dts/omap4-panda.dts                  |   29 ++++
 arch/arm/boot/dts/omap4-sdp.dts                    |   29 ++++
 arch/arm/boot/dts/omap4.dtsi                       |  103 +++++++++++++
 arch/arm/mach-omap2/Kconfig                        |    8 +-
 arch/arm/mach-omap2/board-generic.c                |  158 ++++++++++++++-----
 arch/arm/mach-omap2/common.c                       |   18 +++
 arch/arm/mach-omap2/devices.c                      |    5 +
 arch/arm/mach-omap2/omap_l3_noc.c                  |   23 +++-
 arch/arm/mach-omap2/pm.c                           |    3 +-
 arch/arm/plat-omap/include/plat/common.h           |    4 +
 16 files changed, 501 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/l3-noc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt
 create mode 100644 arch/arm/boot/dts/omap3-beagle.dts
 create mode 100644 arch/arm/boot/dts/omap3.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-panda.dts
 create mode 100644 arch/arm/boot/dts/omap4-sdp.dts
 create mode 100644 arch/arm/boot/dts/omap4.dtsi

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson

Add SoC specific map_io function to be used by the generic DT
board file. This is an intermediate step before having some
generic DT aware map_io function.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/common.c             |   18 ++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h |    4 ++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 3f20cbb..de61f15 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void)
 {
 	__omap2_set_globals(&omap242x_globals);
 }
+
+void __init omap242x_map_io(void)
+{
+	omap2_set_globals_242x();
+	omap242x_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_SOC_OMAP2430)
@@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void)
 {
 	__omap2_set_globals(&omap243x_globals);
 }
+
+void __init omap243x_map_io(void)
+{
+	omap2_set_globals_243x();
+	omap243x_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP3)
@@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void)
 	omap2_set_globals_control(&omap4_globals);
 	omap2_set_globals_prcm(&omap4_globals);
 }
+
+void __init omap4_map_io(void)
+{
+	omap2_set_globals_443x();
+	omap44xx_map_common_io();
+}
 #endif
 
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 5cac97e..abda2c7 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -83,7 +83,11 @@ void omap2_set_globals_sdrc(struct omap_globals *);
 void omap2_set_globals_control(struct omap_globals *);
 void omap2_set_globals_prcm(struct omap_globals *);
 
+void omap242x_map_io(void);
+void omap243x_map_io(void);
 void omap3_map_io(void);
+void omap4_map_io(void);
+
 
 /**
  * omap_test_timeout - busy-loop, testing a condition
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add SoC specific map_io function to be used by the generic DT
board file. This is an intermediate step before having some
generic DT aware map_io function.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/common.c             |   18 ++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h |    4 ++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 3f20cbb..de61f15 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void)
 {
 	__omap2_set_globals(&omap242x_globals);
 }
+
+void __init omap242x_map_io(void)
+{
+	omap2_set_globals_242x();
+	omap242x_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_SOC_OMAP2430)
@@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void)
 {
 	__omap2_set_globals(&omap243x_globals);
 }
+
+void __init omap243x_map_io(void)
+{
+	omap2_set_globals_243x();
+	omap243x_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP3)
@@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void)
 	omap2_set_globals_control(&omap4_globals);
 	omap2_set_globals_prcm(&omap4_globals);
 }
+
+void __init omap4_map_io(void)
+{
+	omap2_set_globals_443x();
+	omap44xx_map_common_io();
+}
 #endif
 
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 5cac97e..abda2c7 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -83,7 +83,11 @@ void omap2_set_globals_sdrc(struct omap_globals *);
 void omap2_set_globals_control(struct omap_globals *);
 void omap2_set_globals_prcm(struct omap_globals *);
 
+void omap242x_map_io(void);
+void omap243x_map_io(void);
 void omap3_map_io(void);
+void omap4_map_io(void);
+
 
 /**
  * omap_test_timeout - busy-loop, testing a condition
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 02/11] arm/dts: Add initial device tree support for OMAP4 SoC
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, G, Manjunath Kondaiah

Add initial device-tree support for OMAP4 SoC.

This is based on the original panda board patch done by Manju:
http://permalink.gmane.org/gmane.linux.ports.arm.omap/60393

Add the generic GIC interrupt-controller from ARM.

Add an empty "soc" node to contain non memory mapped IPs
(DSP, MPU, IPU...).

Note: Since reg, irq and dma are provided by hwmod for the
moment, these attributes will not be present at all in DTS
to highlight the gap. They will be added as soon as dma bindings
will be there and drivers will be adapted.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi |   79 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4.dtsi

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
new file mode 100644
index 0000000..d4131e3
--- /dev/null
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Carveout for multimedia usecases
+ * It should be the last 48MB of the first 512MB memory part
+ * In theory, it should not even exist. That zone should be reserved
+ * dynamically during the .reserve callback.
+ */
+/memreserve/ 0x9d000000 0x03000000;
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap4430", "ti,omap4";
+	interrupt-parent = <&gic>;
+
+	aliases {
+	};
+
+	/*
+	 * The soc node represents the soc top level view. It is uses for IPs
+	 * that are not memory mapped in the MPU view or for the MPU itself.
+	 */
+	soc {
+		compatible = "ti,omap-infra";
+	};
+
+	/*
+	 * XXX: Use a flat representation of the OMAP4 interconnect.
+	 * The real OMAP interconnect network is quite complex.
+	 *
+	 * MPU -+-- MPU_PRIVATE - GIC, L2
+	 *      |
+	 *      +----------------+----------+
+	 *      |                |          |
+	 *      +            +- EMIF - DDR  |
+	 *      |            |              |
+	 *      |            +     +--------+
+	 *      |            |     |
+	 *      |            +- L4_ABE - AESS, MCBSP, TIMERs...
+	 *      |            |
+	 *      +- L3_MAIN --+- L4_CORE - IPs...
+	 *                   |
+	 *                   +- L4_PER - IPs...
+	 *                   |
+	 *                   +- L4_CFG -+- L4_WKUP - IPs...
+	 *                   |          |
+	 *                   |          +- IPs...
+	 *                   +- IPU ----+
+	 *                   |          |
+	 *                   +- DSP ----+
+	 *                   |          |
+	 *                   +- DSS ----+
+	 *
+	 * Since that will not bring real advantage to represent that in DT for
+	 * the moment, just use a fake OCP bus entry to represent the whole bus
+	 * hierarchy.
+	 */
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		gic: interrupt-controller@48241000 {
+			compatible = "arm,cortex-a9-gic";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+			reg = <0x48241000 0x1000>,
+			      <0x48240100 0x0100>;
+		};
+	};
+};
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 02/11] arm/dts: Add initial device tree support for OMAP4 SoC
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add initial device-tree support for OMAP4 SoC.

This is based on the original panda board patch done by Manju:
http://permalink.gmane.org/gmane.linux.ports.arm.omap/60393

Add the generic GIC interrupt-controller from ARM.

Add an empty "soc" node to contain non memory mapped IPs
(DSP, MPU, IPU...).

Note: Since reg, irq and dma are provided by hwmod for the
moment, these attributes will not be present at all in DTS
to highlight the gap. They will be added as soon as dma bindings
will be there and drivers will be adapted.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi |   79 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4.dtsi

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
new file mode 100644
index 0000000..d4131e3
--- /dev/null
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Carveout for multimedia usecases
+ * It should be the last 48MB of the first 512MB memory part
+ * In theory, it should not even exist. That zone should be reserved
+ * dynamically during the .reserve callback.
+ */
+/memreserve/ 0x9d000000 0x03000000;
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap4430", "ti,omap4";
+	interrupt-parent = <&gic>;
+
+	aliases {
+	};
+
+	/*
+	 * The soc node represents the soc top level view. It is uses for IPs
+	 * that are not memory mapped in the MPU view or for the MPU itself.
+	 */
+	soc {
+		compatible = "ti,omap-infra";
+	};
+
+	/*
+	 * XXX: Use a flat representation of the OMAP4 interconnect.
+	 * The real OMAP interconnect network is quite complex.
+	 *
+	 * MPU -+-- MPU_PRIVATE - GIC, L2
+	 *      |
+	 *      +----------------+----------+
+	 *      |                |          |
+	 *      +            +- EMIF - DDR  |
+	 *      |            |              |
+	 *      |            +     +--------+
+	 *      |            |     |
+	 *      |            +- L4_ABE - AESS, MCBSP, TIMERs...
+	 *      |            |
+	 *      +- L3_MAIN --+- L4_CORE - IPs...
+	 *                   |
+	 *                   +- L4_PER - IPs...
+	 *                   |
+	 *                   +- L4_CFG -+- L4_WKUP - IPs...
+	 *                   |          |
+	 *                   |          +- IPs...
+	 *                   +- IPU ----+
+	 *                   |          |
+	 *                   +- DSP ----+
+	 *                   |          |
+	 *                   +- DSS ----+
+	 *
+	 * Since that will not bring real advantage to represent that in DT for
+	 * the moment, just use a fake OCP bus entry to represent the whole bus
+	 * hierarchy.
+	 */
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		gic: interrupt-controller at 48241000 {
+			compatible = "arm,cortex-a9-gic";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+			reg = <0x48241000 0x1000>,
+			      <0x48240100 0x0100>;
+		};
+	};
+};
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, G, Manjunath Kondaiah

Based on the original omap4-panda.dts file from Manju.
http://www.spinics.net/lists/linux-omap/msg55836.html

Add memory information and a default bootargs to allow
a boot from RAMDISK.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-panda.dts

diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
new file mode 100644
index 0000000..c702657
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap4.dtsi"
+
+/ {
+	model = "TI OMAP4 PandaBoard";
+	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+};
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Based on the original omap4-panda.dts file from Manju.
http://www.spinics.net/lists/linux-omap/msg55836.html

Add memory information and a default bootargs to allow
a boot from RAMDISK.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-panda.dts

diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
new file mode 100644
index 0000000..c702657
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap4.dtsi"
+
+/ {
+	model = "TI OMAP4 PandaBoard";
+	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+};
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 04/11] arm/dts: Add support for OMAP4 SDP board
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, G, Manjunath Kondaiah

Add the SDP/Blaze (Software Development Board) support with
device tree.
That file is based on the omap4-panda.dts.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4-sdp.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-sdp.dts

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
new file mode 100644
index 0000000..066e28c
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap4.dtsi"
+
+/ {
+	model = "TI OMAP4 SDP board";
+	compatible = "ti,omap4-sdp", "ti,omap4430", "ti,omap4";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+};
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 04/11] arm/dts: Add support for OMAP4 SDP board
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add the SDP/Blaze (Software Development Board) support with
device tree.
That file is based on the omap4-panda.dts.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap4-sdp.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-sdp.dts

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
new file mode 100644
index 0000000..066e28c
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap4.dtsi"
+
+/ {
+	model = "TI OMAP4 SDP board";
+	compatible = "ti,omap4-sdp", "ti,omap4430", "ti,omap4";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+};
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 05/11] arm/dts: Add initial device tree support for OMAP3 SoC
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, G, Manjunath Kondaiah

Add initial OMAP3 soc file with empty ocp bus.

Based on initial patch from Manju:
http://www.spinics.net/lists/linux-omap/msg55830.html

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi |   44 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3.dtsi

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
new file mode 100644
index 0000000..d558785
--- /dev/null
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -0,0 +1,44 @@
+/*
+ * Device Tree Source for OMAP3 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap3430", "ti,omap3";
+
+	/*
+	 * The soc node represents the soc top level view. It is uses for IPs
+	 * that are not memory mapped in the MPU view or for the MPU itself.
+	 */
+	soc {
+		compatible = "ti,omap-infra";
+	};
+
+	/*
+	 * XXX: Use a flat representation of the OMAP3 interconnect.
+	 * The real OMAP interconnect network is quite complex.
+	 * Since that will not bring real advantage to represent that in DT for
+	 * the moment, just use a fake OCP bus entry to represent the whole bus
+	 * hierarchy.
+	 */
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller@1 {
+			compatible = "ti,omap3-intc";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+	};
+};
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 05/11] arm/dts: Add initial device tree support for OMAP3 SoC
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add initial OMAP3 soc file with empty ocp bus.

Based on initial patch from Manju:
http://www.spinics.net/lists/linux-omap/msg55830.html

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi |   44 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3.dtsi

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
new file mode 100644
index 0000000..d558785
--- /dev/null
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -0,0 +1,44 @@
+/*
+ * Device Tree Source for OMAP3 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap3430", "ti,omap3";
+
+	/*
+	 * The soc node represents the soc top level view. It is uses for IPs
+	 * that are not memory mapped in the MPU view or for the MPU itself.
+	 */
+	soc {
+		compatible = "ti,omap-infra";
+	};
+
+	/*
+	 * XXX: Use a flat representation of the OMAP3 interconnect.
+	 * The real OMAP interconnect network is quite complex.
+	 * Since that will not bring real advantage to represent that in DT for
+	 * the moment, just use a fake OCP bus entry to represent the whole bus
+	 * hierarchy.
+	 */
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller at 1 {
+			compatible = "ti,omap3-intc";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+	};
+};
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 06/11] arm/dts: Add support for OMAP3 Beagle board
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, G, Manjunath Kondaiah

Add OMAP3 beagleboard DTS file to use the omap3.dtsi
SoC file.

Add a default bootargs line to allow a boot from RAMDISK

Add memory node information.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap3-beagle.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-beagle.dts

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
new file mode 100644
index 0000000..9486be6
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap3.dtsi"
+
+/ {
+	model = "TI OMAP3 BeagleBoard";
+	compatible = "ti,omap3-beagle", "ti,omap3";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>; /* 512 MB */
+	};
+};
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 06/11] arm/dts: Add support for OMAP3 Beagle board
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add OMAP3 beagleboard DTS file to use the omap3.dtsi
SoC file.

Add a default bootargs line to allow a boot from RAMDISK

Add memory node information.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
 arch/arm/boot/dts/omap3-beagle.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-beagle.dts

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
new file mode 100644
index 0000000..9486be6
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+/include/ "omap3.dtsi"
+
+/ {
+	model = "TI OMAP3 BeagleBoard";
+	compatible = "ti,omap3-beagle", "ti,omap3";
+
+	/*
+	 * Since the initial device tree board file does not create any
+	 * devices (MMC, network...), the only way to boot is to provide a
+	 * ramdisk.
+	 */
+	chosen {
+		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>; /* 512 MB */
+	};
+};
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson

Re-cycle the original board-generic file to support Device Tree
for every OMAP2+ variants.
Note: Since it is a completely new content in the existing file
I removed the original copyright.

The current approach is an intermediate step before having only
one machine descriptor that will use some generic DT aware
functions.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/Kconfig         |    8 ++-
 arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
 2 files changed, 89 insertions(+), 48 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 7edf802..5934a27 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -106,9 +106,13 @@ comment "OMAP Board Type"
 	depends on ARCH_OMAP2PLUS
 
 config MACH_OMAP_GENERIC
-	bool "Generic OMAP board"
-	depends on ARCH_OMAP2
+	bool "Generic OMAP2+ board"
+	depends on ARCH_OMAP2PLUS
+	select USE_OF
 	default y
+	help
+	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
+	  More information at Documentation/devicetree
 
 config MACH_OMAP2_TUSB6010
 	bool
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index e8d45d3..dcbd64c 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -1,76 +1,113 @@
 /*
- * linux/arch/arm/mach-omap2/board-generic.c
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  *
- * Copyright (C) 2005 Nokia Corporation
- * Author: Paul Mundt <paul.mundt@nokia.com>
- *
- * Modified from mach-omap/omap1/board-generic.c
- *
- * Code for generic OMAP2 board. Should work on many OMAP2 systems where
- * the bootloader passes the board-specific data to the kernel.
- * Do not put any board specific code to this file; create a new machine
- * type if you need custom low-level initializations.
+ * Support for generic OMAP2+ device tree boards.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
 
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/of_platform.h>
+#include <linux/irqdomain.h>
 
 #include <mach/hardware.h>
-#include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/map.h>
 
-#include <mach/gpio.h>
-#include <plat/usb.h>
 #include <plat/board.h>
 #include <plat/common.h>
+#include <mach/omap4-common.h>
 
-static struct omap_board_config_kernel generic_config[] = {
+
+static struct of_device_id omap_dt_match_table[] __initdata = {
+	{ .compatible = "simple-bus", },
+	{ .compatible = "ti,omap-infra", },
+	{ }
 };
 
-static void __init omap_generic_init_early(void)
-{
-	omap2_init_common_infrastructure();
-}
+static struct of_device_id intc_match[] __initdata = {
+	{ .compatible = "ti,omap3-intc", },
+	{ .compatible = "arm,cortex-a9-gic", },
+	{ }
+};
 
 static void __init omap_generic_init(void)
 {
+	struct device_node *node = of_find_matching_node(NULL, intc_match);
+	if (node)
+		irq_domain_add_simple(node, 0);
+
 	omap_serial_init();
 	omap_sdrc_init(NULL, NULL);
-	omap_board_config = generic_config;
-	omap_board_config_size = ARRAY_SIZE(generic_config);
-}
 
-static void __init omap_generic_map_io(void)
-{
-	if (cpu_is_omap242x()) {
-		omap2_set_globals_242x();
-		omap242x_map_common_io();
-	} else if (cpu_is_omap243x()) {
-		omap2_set_globals_243x();
-		omap243x_map_common_io();
-	} else if (cpu_is_omap34xx()) {
-		omap2_set_globals_3xxx();
-		omap34xx_map_common_io();
-	} else if (cpu_is_omap44xx()) {
-		omap2_set_globals_443x();
-		omap44xx_map_common_io();
-	}
+	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 }
 
-/* XXX This machine entry name should be updated */
-MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
-	/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
-	.atag_offset	= 0x100,
+#if defined(CONFIG_SOC_OMAP2420)
+static const char *omap242x_boards_compat[] __initdata = {
+	"ti,omap2420",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
-	.map_io		= omap_generic_map_io,
-	.init_early	= omap_generic_init_early,
+	.map_io		= omap242x_map_io,
+	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_generic_init,
 	.timer		= &omap2_timer,
+	.dt_compat	= omap242x_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_SOC_OMAP2430)
+static const char *omap243x_boards_compat[] __initdata = {
+	"ti,omap2430",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap243x_map_io,
+	.init_early	= omap2430_init_early,
+	.init_irq	= omap2_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap2_timer,
+	.dt_compat	= omap243x_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_ARCH_OMAP3)
+static const char *omap3_boards_compat[] __initdata = {
+	"ti,omap3",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= omap3430_init_early,
+	.init_irq	= omap3_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= omap3_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_ARCH_OMAP4)
+static const char *omap4_boards_compat[] __initdata = {
+	"ti,omap4",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap4_map_io,
+	.init_early	= omap4430_init_early,
+	.init_irq	= gic_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap4_timer,
+	.dt_compat	= omap4_boards_compat,
 MACHINE_END
+#endif
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Re-cycle the original board-generic file to support Device Tree
for every OMAP2+ variants.
Note: Since it is a completely new content in the existing file
I removed the original copyright.

The current approach is an intermediate step before having only
one machine descriptor that will use some generic DT aware
functions.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/Kconfig         |    8 ++-
 arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
 2 files changed, 89 insertions(+), 48 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 7edf802..5934a27 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -106,9 +106,13 @@ comment "OMAP Board Type"
 	depends on ARCH_OMAP2PLUS
 
 config MACH_OMAP_GENERIC
-	bool "Generic OMAP board"
-	depends on ARCH_OMAP2
+	bool "Generic OMAP2+ board"
+	depends on ARCH_OMAP2PLUS
+	select USE_OF
 	default y
+	help
+	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
+	  More information at Documentation/devicetree
 
 config MACH_OMAP2_TUSB6010
 	bool
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index e8d45d3..dcbd64c 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -1,76 +1,113 @@
 /*
- * linux/arch/arm/mach-omap2/board-generic.c
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  *
- * Copyright (C) 2005 Nokia Corporation
- * Author: Paul Mundt <paul.mundt@nokia.com>
- *
- * Modified from mach-omap/omap1/board-generic.c
- *
- * Code for generic OMAP2 board. Should work on many OMAP2 systems where
- * the bootloader passes the board-specific data to the kernel.
- * Do not put any board specific code to this file; create a new machine
- * type if you need custom low-level initializations.
+ * Support for generic OMAP2+ device tree boards.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
 
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/of_platform.h>
+#include <linux/irqdomain.h>
 
 #include <mach/hardware.h>
-#include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/map.h>
 
-#include <mach/gpio.h>
-#include <plat/usb.h>
 #include <plat/board.h>
 #include <plat/common.h>
+#include <mach/omap4-common.h>
 
-static struct omap_board_config_kernel generic_config[] = {
+
+static struct of_device_id omap_dt_match_table[] __initdata = {
+	{ .compatible = "simple-bus", },
+	{ .compatible = "ti,omap-infra", },
+	{ }
 };
 
-static void __init omap_generic_init_early(void)
-{
-	omap2_init_common_infrastructure();
-}
+static struct of_device_id intc_match[] __initdata = {
+	{ .compatible = "ti,omap3-intc", },
+	{ .compatible = "arm,cortex-a9-gic", },
+	{ }
+};
 
 static void __init omap_generic_init(void)
 {
+	struct device_node *node = of_find_matching_node(NULL, intc_match);
+	if (node)
+		irq_domain_add_simple(node, 0);
+
 	omap_serial_init();
 	omap_sdrc_init(NULL, NULL);
-	omap_board_config = generic_config;
-	omap_board_config_size = ARRAY_SIZE(generic_config);
-}
 
-static void __init omap_generic_map_io(void)
-{
-	if (cpu_is_omap242x()) {
-		omap2_set_globals_242x();
-		omap242x_map_common_io();
-	} else if (cpu_is_omap243x()) {
-		omap2_set_globals_243x();
-		omap243x_map_common_io();
-	} else if (cpu_is_omap34xx()) {
-		omap2_set_globals_3xxx();
-		omap34xx_map_common_io();
-	} else if (cpu_is_omap44xx()) {
-		omap2_set_globals_443x();
-		omap44xx_map_common_io();
-	}
+	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 }
 
-/* XXX This machine entry name should be updated */
-MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
-	/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
-	.atag_offset	= 0x100,
+#if defined(CONFIG_SOC_OMAP2420)
+static const char *omap242x_boards_compat[] __initdata = {
+	"ti,omap2420",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
-	.map_io		= omap_generic_map_io,
-	.init_early	= omap_generic_init_early,
+	.map_io		= omap242x_map_io,
+	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_generic_init,
 	.timer		= &omap2_timer,
+	.dt_compat	= omap242x_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_SOC_OMAP2430)
+static const char *omap243x_boards_compat[] __initdata = {
+	"ti,omap2430",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap243x_map_io,
+	.init_early	= omap2430_init_early,
+	.init_irq	= omap2_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap2_timer,
+	.dt_compat	= omap243x_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_ARCH_OMAP3)
+static const char *omap3_boards_compat[] __initdata = {
+	"ti,omap3",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= omap3430_init_early,
+	.init_irq	= omap3_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= omap3_boards_compat,
+MACHINE_END
+#endif
+
+#if defined(CONFIG_ARCH_OMAP4)
+static const char *omap4_boards_compat[] __initdata = {
+	"ti,omap4",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap4_map_io,
+	.init_early	= omap4430_init_early,
+	.init_irq	= gic_init_irq,
+	.init_machine	= omap_generic_init,
+	.timer		= &omap4_timer,
+	.dt_compat	= omap4_boards_compat,
 MACHINE_END
+#endif
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson

Still needed to boot until the i2c & twl driver is adapted to
device-tree. Otherwise the voltage control code will try to
access the twl and crash.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-generic.c |   41 +++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index dcbd64c..1186a76 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -11,6 +11,7 @@
 #include <linux/io.h>
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
+#include <linux/i2c/twl.h>
 
 #include <mach/hardware.h>
 #include <asm/mach/arch.h>
@@ -18,7 +19,31 @@
 #include <plat/board.h>
 #include <plat/common.h>
 #include <mach/omap4-common.h>
+#include "common-board-devices.h"
 
+/*
+ * XXX: Still needed to boot until the i2c & twl driver is adapted to
+ * device-tree
+ */
+static struct twl4030_platform_data sdp4430_twldata = {
+	.irq_base	= TWL6030_IRQ_BASE,
+	.irq_end	= TWL6030_IRQ_END,
+};
+
+static void __init omap4_i2c_init(void)
+{
+	omap4_pmic_init("twl6030", &sdp4430_twldata);
+}
+
+static struct twl4030_platform_data beagle_twldata = {
+	.irq_base	= TWL4030_IRQ_BASE,
+	.irq_end	= TWL4030_IRQ_END,
+};
+
+static void __init omap3_i2c_init(void)
+{
+	omap3_pmic_init("twl4030", &beagle_twldata);
+}
 
 static struct of_device_id omap_dt_match_table[] __initdata = {
 	{ .compatible = "simple-bus", },
@@ -44,6 +69,18 @@ static void __init omap_generic_init(void)
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 }
 
+static void __init omap4_init(void)
+{
+	omap4_i2c_init();
+	omap_generic_init();
+}
+
+static void __init omap3_init(void)
+{
+	omap3_i2c_init();
+	omap_generic_init();
+}
+
 #if defined(CONFIG_SOC_OMAP2420)
 static const char *omap242x_boards_compat[] __initdata = {
 	"ti,omap2420",
@@ -89,7 +126,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.init_machine	= omap_generic_init,
+	.init_machine	= omap3_init,
 	.timer		= &omap3_timer,
 	.dt_compat	= omap3_boards_compat,
 MACHINE_END
@@ -106,7 +143,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
 	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
-	.init_machine	= omap_generic_init,
+	.init_machine	= omap4_init,
 	.timer		= &omap4_timer,
 	.dt_compat	= omap4_boards_compat,
 MACHINE_END
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Still needed to boot until the i2c & twl driver is adapted to
device-tree. Otherwise the voltage control code will try to
access the twl and crash.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-generic.c |   41 +++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index dcbd64c..1186a76 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -11,6 +11,7 @@
 #include <linux/io.h>
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
+#include <linux/i2c/twl.h>
 
 #include <mach/hardware.h>
 #include <asm/mach/arch.h>
@@ -18,7 +19,31 @@
 #include <plat/board.h>
 #include <plat/common.h>
 #include <mach/omap4-common.h>
+#include "common-board-devices.h"
 
+/*
+ * XXX: Still needed to boot until the i2c & twl driver is adapted to
+ * device-tree
+ */
+static struct twl4030_platform_data sdp4430_twldata = {
+	.irq_base	= TWL6030_IRQ_BASE,
+	.irq_end	= TWL6030_IRQ_END,
+};
+
+static void __init omap4_i2c_init(void)
+{
+	omap4_pmic_init("twl6030", &sdp4430_twldata);
+}
+
+static struct twl4030_platform_data beagle_twldata = {
+	.irq_base	= TWL4030_IRQ_BASE,
+	.irq_end	= TWL4030_IRQ_END,
+};
+
+static void __init omap3_i2c_init(void)
+{
+	omap3_pmic_init("twl4030", &beagle_twldata);
+}
 
 static struct of_device_id omap_dt_match_table[] __initdata = {
 	{ .compatible = "simple-bus", },
@@ -44,6 +69,18 @@ static void __init omap_generic_init(void)
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 }
 
+static void __init omap4_init(void)
+{
+	omap4_i2c_init();
+	omap_generic_init();
+}
+
+static void __init omap3_init(void)
+{
+	omap3_i2c_init();
+	omap_generic_init();
+}
+
 #if defined(CONFIG_SOC_OMAP2420)
 static const char *omap242x_boards_compat[] __initdata = {
 	"ti,omap2420",
@@ -89,7 +126,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.init_machine	= omap_generic_init,
+	.init_machine	= omap3_init,
 	.timer		= &omap3_timer,
 	.dt_compat	= omap3_boards_compat,
 MACHINE_END
@@ -106,7 +143,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
 	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
-	.init_machine	= omap_generic_init,
+	.init_machine	= omap4_init,
 	.timer		= &omap4_timer,
 	.dt_compat	= omap4_boards_compat,
 MACHINE_END
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 09/11] OMAP2+: l3-noc: Add support for device-tree
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, Santosh Shilimkar

Add device-tree support for the l3-noc driver.

Use platform_driver_register to defer the probing at device init
time.

Add documentation for the l3-noc bindings.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 .../devicetree/bindings/arm/omap/l3-noc.txt        |   19 ++++++++++++++++
 arch/arm/mach-omap2/omap_l3_noc.c                  |   23 +++++++++++++++----
 2 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/l3-noc.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
new file mode 100644
index 0000000..6888a5e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
@@ -0,0 +1,19 @@
+* TI - L3 Network On Chip (NoC)
+
+This version is an implementation of the generic NoC IP
+provided by Arteris.
+
+Required properties:
+- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
+               Should be "ti,omap4-l3-noc" for OMAP4 family
+- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain.
+
+Examples:
+
+ocp {
+	compatible = "ti,omap4-l3-noc", "simple-bus";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	ranges;
+	ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
+};
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c
index 7b9f190..d618c9d 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -120,7 +120,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
 	return IRQ_HANDLED;
 }
 
-static int __init omap4_l3_probe(struct platform_device *pdev)
+static int __devinit omap4_l3_probe(struct platform_device *pdev)
 {
 	static struct omap4_l3		*l3;
 	struct resource		*res;
@@ -214,7 +214,7 @@ err0:
 	return ret;
 }
 
-static int __exit omap4_l3_remove(struct platform_device *pdev)
+static int __devexit omap4_l3_remove(struct platform_device *pdev)
 {
 	struct omap4_l3         *l3 = platform_get_drvdata(pdev);
 
@@ -228,16 +228,29 @@ static int __exit omap4_l3_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#if defined(CONFIG_OF)
+static const struct of_device_id l3_noc_match[] = {
+	{.compatible = "ti,omap4-l3-noc", },
+	{},
+}
+MODULE_DEVICE_TABLE(of, l3_noc_match);
+#else
+#define l3_noc_match NULL
+#endif
+
 static struct platform_driver omap4_l3_driver = {
-	.remove		= __exit_p(omap4_l3_remove),
+	.probe		= omap4_l3_probe,
+	.remove		= __devexit_p(omap4_l3_remove),
 	.driver		= {
-	.name		= "omap_l3_noc",
+		.name		= "omap_l3_noc",
+		.owner		= THIS_MODULE,
+		.of_match_table = l3_noc_match,
 	},
 };
 
 static int __init omap4_l3_init(void)
 {
-	return platform_driver_probe(&omap4_l3_driver, omap4_l3_probe);
+	return platform_driver_register(&omap4_l3_driver);
 }
 postcore_initcall_sync(omap4_l3_init);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 09/11] OMAP2+: l3-noc: Add support for device-tree
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add device-tree support for the l3-noc driver.

Use platform_driver_register to defer the probing at device init
time.

Add documentation for the l3-noc bindings.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 .../devicetree/bindings/arm/omap/l3-noc.txt        |   19 ++++++++++++++++
 arch/arm/mach-omap2/omap_l3_noc.c                  |   23 +++++++++++++++----
 2 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/l3-noc.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
new file mode 100644
index 0000000..6888a5e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
@@ -0,0 +1,19 @@
+* TI - L3 Network On Chip (NoC)
+
+This version is an implementation of the generic NoC IP
+provided by Arteris.
+
+Required properties:
+- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
+               Should be "ti,omap4-l3-noc" for OMAP4 family
+- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain.
+
+Examples:
+
+ocp {
+	compatible = "ti,omap4-l3-noc", "simple-bus";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	ranges;
+	ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
+};
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c
index 7b9f190..d618c9d 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -120,7 +120,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
 	return IRQ_HANDLED;
 }
 
-static int __init omap4_l3_probe(struct platform_device *pdev)
+static int __devinit omap4_l3_probe(struct platform_device *pdev)
 {
 	static struct omap4_l3		*l3;
 	struct resource		*res;
@@ -214,7 +214,7 @@ err0:
 	return ret;
 }
 
-static int __exit omap4_l3_remove(struct platform_device *pdev)
+static int __devexit omap4_l3_remove(struct platform_device *pdev)
 {
 	struct omap4_l3         *l3 = platform_get_drvdata(pdev);
 
@@ -228,16 +228,29 @@ static int __exit omap4_l3_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#if defined(CONFIG_OF)
+static const struct of_device_id l3_noc_match[] = {
+	{.compatible = "ti,omap4-l3-noc", },
+	{},
+}
+MODULE_DEVICE_TABLE(of, l3_noc_match);
+#else
+#define l3_noc_match NULL
+#endif
+
 static struct platform_driver omap4_l3_driver = {
-	.remove		= __exit_p(omap4_l3_remove),
+	.probe		= omap4_l3_probe,
+	.remove		= __devexit_p(omap4_l3_remove),
 	.driver		= {
-	.name		= "omap_l3_noc",
+		.name		= "omap_l3_noc",
+		.owner		= THIS_MODULE,
+		.of_match_table = l3_noc_match,
 	},
 };
 
 static int __init omap4_l3_init(void)
 {
-	return platform_driver_probe(&omap4_l3_driver, omap4_l3_probe);
+	return platform_driver_register(&omap4_l3_driver);
 }
 postcore_initcall_sync(omap4_l3_init);
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson, Santosh Shilimkar

Used the main OCP node to add bindings with the l3_noc driver.
Remove l3_noc static device creation if DT is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi  |    3 ++-
 arch/arm/mach-omap2/devices.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index d4131e3..b85a39d 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -63,10 +63,11 @@
 	 * hierarchy.
 	 */
 	ocp {
-		compatible = "simple-bus";
+		compatible = "ti,omap4-l3-noc", "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
+		ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
 
 		gic: interrupt-controller@48241000 {
 			compatible = "arm,cortex-a9-gic";
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2d4a199..0f8e0eb 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -16,6 +16,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
 	struct platform_device *pdev;
 	char oh_name[L3_MODULES_MAX_LEN];
 
+	/* If dtb is there, the devices will be created dynamically */
+	if (of_have_populated_dt())
+		return -ENODEV;
+
 	/*
 	 * To avoid code running on other OMAPs in
 	 * multi-omap builds
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Used the main OCP node to add bindings with the l3_noc driver.
Remove l3_noc static device creation if DT is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi  |    3 ++-
 arch/arm/mach-omap2/devices.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index d4131e3..b85a39d 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -63,10 +63,11 @@
 	 * hierarchy.
 	 */
 	ocp {
-		compatible = "simple-bus";
+		compatible = "ti,omap4-l3-noc", "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
+		ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
 
 		gic: interrupt-controller at 48241000 {
 			compatible = "arm,cortex-a9-gic";
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2d4a199..0f8e0eb 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -16,6 +16,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
 	struct platform_device *pdev;
 	char oh_name[L3_MODULES_MAX_LEN];
 
+	/* If dtb is there, the devices will be created dynamically */
+	if (of_have_populated_dt())
+		return -ENODEV;
+
 	/*
 	 * To avoid code running on other OMAPs in
 	 * multi-omap builds
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes
  2011-09-23 20:23 ` Benoit Cousson
@ 2011-09-23 20:23   ` Benoit Cousson
  -1 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: tony, grant.likely
  Cc: paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, Benoit Cousson

Add nodes for devices used by PM code (mpu, dsp, iva).

Add an empty cpus node as well as recommended in the DT spec.

Remove mpu, dsp, iva devices init if dt is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kevin Hilman <khilman@ti.com>
---
 Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++++++++++
 Documentation/devicetree/bindings/arm/omap/iva.txt |   19 ++++++++++++++
 Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++++++++++++++++++
 arch/arm/boot/dts/omap3.dtsi                       |   19 ++++++++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   23 +++++++++++++++++
 arch/arm/mach-omap2/pm.c                           |    3 +-
 6 files changed, 104 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/dsp.txt b/Documentation/devicetree/bindings/arm/omap/dsp.txt
new file mode 100644
index 0000000..325feef
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/dsp.txt
@@ -0,0 +1,14 @@
+* TI - DSP (Digital Signal Processor)
+
+TI DSP included in OMAP SoC
+
+Required properties:
+- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
+- ti,hwmods: "dsp"
+
+Examples:
+
+dsp {
+    compatible = "ti,omap3-c64";
+    ti,hwmods = "dsp";
+};
diff --git a/Documentation/devicetree/bindings/arm/omap/iva.txt b/Documentation/devicetree/bindings/arm/omap/iva.txt
new file mode 100644
index 0000000..b889475
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/iva.txt
@@ -0,0 +1,19 @@
+* TI - IVA (Imaging and Video Accelerator) subsystem
+
+The IVA contain various audio, video or imaging HW accelerator
+depending of the version.
+
+Required properties:
+- compatible : Should be:
+  - "ti,ivahd" for OMAP4
+  - "ti,iva2.2" for OMAP3
+  - "ti,iva2.1" for OMAP2430
+  - "ti,iva1" for OMAP2420
+- ti,hwmods: "iva"
+
+Examples:
+
+iva {
+    compatible = "ti,ivahd", "ti,iva";
+    ti,hwmods = "iva";
+};
diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
new file mode 100644
index 0000000..5ffbacd
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/mpu.txt
@@ -0,0 +1,27 @@
+* TI - MPU (Main Processor Unit) subsystem
+
+The MPU subsystem contain one or several ARM cores
+depending of the version.
+The MPU contain CPUs, GIC, L2 cache and a local PRCM.
+
+Required properties:
+- compatible : Should be "ti,omap3-mpu" for OMAP3
+               Should be "ti,omap4-mpu" for OMAP4
+- ti,hwmods: "mpu"
+
+Examples:
+
+- For an OMAP4 SMP system:
+
+mpu {
+    compatible = "ti,omap4-mpu";
+    ti,hwmods = "mpu";
+};
+
+
+- For an OMAP3 monocore system:
+
+mpu {
+    compatible = "ti,omap3-mpu";
+    ti,hwmods = "mpu";
+};
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index d558785..d202bb5 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -13,12 +13,31 @@
 / {
 	compatible = "ti,omap3430", "ti,omap3";
 
+	cpus {
+		cpu@0 {
+			compatible = "arm,cortex-a8";
+		};
+	};
+
 	/*
 	 * The soc node represents the soc top level view. It is uses for IPs
 	 * that are not memory mapped in the MPU view or for the MPU itself.
 	 */
 	soc {
 		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap3-mpu";
+			ti,hwmods = "mpu";
+		};
+
+		iva {
+			compatible = "ti,iva2.2";
+			ti,hwmods = "iva";
+
+			dsp {
+				compatible = "ti,omap3-c64";
+			};
+		};
 	};
 
 	/*
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index b85a39d..4c61c82 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -23,12 +23,35 @@
 	aliases {
 	};
 
+	cpus {
+		cpu@0 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu@1 {
+			compatible = "arm,cortex-a9";
+		};
+	};
+
 	/*
 	 * The soc node represents the soc top level view. It is uses for IPs
 	 * that are not memory mapped in the MPU view or for the MPU itself.
 	 */
 	soc {
 		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap4-mpu";
+			ti,hwmods = "mpu";
+		};
+
+		dsp {
+			compatible = "ti,omap3-c64";
+			ti,hwmods = "dsp";
+		};
+
+		iva {
+			compatible = "ti,ivahd";
+			ti,hwmods = "iva";
+		};
 	};
 
 	/*
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1fd9576..640c266 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -217,7 +217,8 @@ static void __init omap4_init_voltages(void)
 
 static int __init omap2_common_pm_init(void)
 {
-	omap2_init_processor_devices();
+	if (!of_have_populated_dt())
+		omap2_init_processor_devices();
 	omap_pm_if_init();
 
 	return 0;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes
@ 2011-09-23 20:23   ` Benoit Cousson
  0 siblings, 0 replies; 66+ messages in thread
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add nodes for devices used by PM code (mpu, dsp, iva).

Add an empty cpus node as well as recommended in the DT spec.

Remove mpu, dsp, iva devices init if dt is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kevin Hilman <khilman@ti.com>
---
 Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++++++++++
 Documentation/devicetree/bindings/arm/omap/iva.txt |   19 ++++++++++++++
 Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++++++++++++++++++
 arch/arm/boot/dts/omap3.dtsi                       |   19 ++++++++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   23 +++++++++++++++++
 arch/arm/mach-omap2/pm.c                           |    3 +-
 6 files changed, 104 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/dsp.txt b/Documentation/devicetree/bindings/arm/omap/dsp.txt
new file mode 100644
index 0000000..325feef
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/dsp.txt
@@ -0,0 +1,14 @@
+* TI - DSP (Digital Signal Processor)
+
+TI DSP included in OMAP SoC
+
+Required properties:
+- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
+- ti,hwmods: "dsp"
+
+Examples:
+
+dsp {
+    compatible = "ti,omap3-c64";
+    ti,hwmods = "dsp";
+};
diff --git a/Documentation/devicetree/bindings/arm/omap/iva.txt b/Documentation/devicetree/bindings/arm/omap/iva.txt
new file mode 100644
index 0000000..b889475
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/iva.txt
@@ -0,0 +1,19 @@
+* TI - IVA (Imaging and Video Accelerator) subsystem
+
+The IVA contain various audio, video or imaging HW accelerator
+depending of the version.
+
+Required properties:
+- compatible : Should be:
+  - "ti,ivahd" for OMAP4
+  - "ti,iva2.2" for OMAP3
+  - "ti,iva2.1" for OMAP2430
+  - "ti,iva1" for OMAP2420
+- ti,hwmods: "iva"
+
+Examples:
+
+iva {
+    compatible = "ti,ivahd", "ti,iva";
+    ti,hwmods = "iva";
+};
diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
new file mode 100644
index 0000000..5ffbacd
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/mpu.txt
@@ -0,0 +1,27 @@
+* TI - MPU (Main Processor Unit) subsystem
+
+The MPU subsystem contain one or several ARM cores
+depending of the version.
+The MPU contain CPUs, GIC, L2 cache and a local PRCM.
+
+Required properties:
+- compatible : Should be "ti,omap3-mpu" for OMAP3
+               Should be "ti,omap4-mpu" for OMAP4
+- ti,hwmods: "mpu"
+
+Examples:
+
+- For an OMAP4 SMP system:
+
+mpu {
+    compatible = "ti,omap4-mpu";
+    ti,hwmods = "mpu";
+};
+
+
+- For an OMAP3 monocore system:
+
+mpu {
+    compatible = "ti,omap3-mpu";
+    ti,hwmods = "mpu";
+};
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index d558785..d202bb5 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -13,12 +13,31 @@
 / {
 	compatible = "ti,omap3430", "ti,omap3";
 
+	cpus {
+		cpu at 0 {
+			compatible = "arm,cortex-a8";
+		};
+	};
+
 	/*
 	 * The soc node represents the soc top level view. It is uses for IPs
 	 * that are not memory mapped in the MPU view or for the MPU itself.
 	 */
 	soc {
 		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap3-mpu";
+			ti,hwmods = "mpu";
+		};
+
+		iva {
+			compatible = "ti,iva2.2";
+			ti,hwmods = "iva";
+
+			dsp {
+				compatible = "ti,omap3-c64";
+			};
+		};
 	};
 
 	/*
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index b85a39d..4c61c82 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -23,12 +23,35 @@
 	aliases {
 	};
 
+	cpus {
+		cpu at 0 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu at 1 {
+			compatible = "arm,cortex-a9";
+		};
+	};
+
 	/*
 	 * The soc node represents the soc top level view. It is uses for IPs
 	 * that are not memory mapped in the MPU view or for the MPU itself.
 	 */
 	soc {
 		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap4-mpu";
+			ti,hwmods = "mpu";
+		};
+
+		dsp {
+			compatible = "ti,omap3-c64";
+			ti,hwmods = "dsp";
+		};
+
+		iva {
+			compatible = "ti,ivahd";
+			ti,hwmods = "iva";
+		};
 	};
 
 	/*
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1fd9576..640c266 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -217,7 +217,8 @@ static void __init omap4_init_voltages(void)
 
 static int __init omap2_common_pm_init(void)
 {
-	omap2_init_processor_devices();
+	if (!of_have_populated_dt())
+		omap2_init_processor_devices();
 	omap_pm_if_init();
 
 	return 0;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* Re: [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 22:58     ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 22:58 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss, Santosh Shilimkar

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Used the main OCP node to add bindings with the l3_noc driver.
> Remove l3_noc static device creation if DT is populated.
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -16,6 +16,7 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
>  
>  #include <mach/hardware.h>
>  #include <mach/irqs.h>
> @@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
>  	struct platform_device *pdev;
>  	char oh_name[L3_MODULES_MAX_LEN];
>  
> +	/* If dtb is there, the devices will be created dynamically */
> +	if (of_have_populated_dt())
> +		return -ENODEV;
> +
>  	/*
>  	 * To avoid code running on other OMAPs in
>  	 * multi-omap builds

How about just remove omap3_l3_init and omap4_l3_init completely
instead?

There should not be any need for the platform glue code if the
driver, it's OK for us to require that either DT is passed from
the bootloader or as appended DT as soon as the appended DT patches
are merged.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
@ 2011-09-23 22:58     ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 22:58 UTC (permalink / raw)
  To: linux-arm-kernel

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Used the main OCP node to add bindings with the l3_noc driver.
> Remove l3_noc static device creation if DT is populated.
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -16,6 +16,7 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
>  
>  #include <mach/hardware.h>
>  #include <mach/irqs.h>
> @@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
>  	struct platform_device *pdev;
>  	char oh_name[L3_MODULES_MAX_LEN];
>  
> +	/* If dtb is there, the devices will be created dynamically */
> +	if (of_have_populated_dt())
> +		return -ENODEV;
> +
>  	/*
>  	 * To avoid code running on other OMAPs in
>  	 * multi-omap builds

How about just remove omap3_l3_init and omap4_l3_init completely
instead?

There should not be any need for the platform glue code if the
driver, it's OK for us to require that either DT is passed from
the bootloader or as appended DT as soon as the appended DT patches
are merged.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 23:00     ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:00 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Add SoC specific map_io function to be used by the generic DT
> board file. This is an intermediate step before having some
> generic DT aware map_io function.

Thanks, I'll apply this into cleanup branch and with the related
conversion of board files.

Regards,

Tony
 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/common.c             |   18 ++++++++++++++++++
>  arch/arm/plat-omap/include/plat/common.h |    4 ++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
> index 3f20cbb..de61f15 100644
> --- a/arch/arm/mach-omap2/common.c
> +++ b/arch/arm/mach-omap2/common.c
> @@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void)
>  {
>  	__omap2_set_globals(&omap242x_globals);
>  }
> +
> +void __init omap242x_map_io(void)
> +{
> +	omap2_set_globals_242x();
> +	omap242x_map_common_io();
> +}
>  #endif
>  
>  #if defined(CONFIG_SOC_OMAP2430)
> @@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void)
>  {
>  	__omap2_set_globals(&omap243x_globals);
>  }
> +
> +void __init omap243x_map_io(void)
> +{
> +	omap2_set_globals_243x();
> +	omap243x_map_common_io();
> +}
>  #endif
>  
>  #if defined(CONFIG_ARCH_OMAP3)
> @@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void)
>  	omap2_set_globals_control(&omap4_globals);
>  	omap2_set_globals_prcm(&omap4_globals);
>  }
> +
> +void __init omap4_map_io(void)
> +{
> +	omap2_set_globals_443x();
> +	omap44xx_map_common_io();
> +}
>  #endif
>  
> diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
> index 5cac97e..abda2c7 100644
> --- a/arch/arm/plat-omap/include/plat/common.h
> +++ b/arch/arm/plat-omap/include/plat/common.h
> @@ -83,7 +83,11 @@ void omap2_set_globals_sdrc(struct omap_globals *);
>  void omap2_set_globals_control(struct omap_globals *);
>  void omap2_set_globals_prcm(struct omap_globals *);
>  
> +void omap242x_map_io(void);
> +void omap243x_map_io(void);
>  void omap3_map_io(void);
> +void omap4_map_io(void);
> +
>  
>  /**
>   * omap_test_timeout - busy-loop, testing a condition
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2011-09-23 23:00     ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:00 UTC (permalink / raw)
  To: linux-arm-kernel

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Add SoC specific map_io function to be used by the generic DT
> board file. This is an intermediate step before having some
> generic DT aware map_io function.

Thanks, I'll apply this into cleanup branch and with the related
conversion of board files.

Regards,

Tony
 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/common.c             |   18 ++++++++++++++++++
>  arch/arm/plat-omap/include/plat/common.h |    4 ++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
> index 3f20cbb..de61f15 100644
> --- a/arch/arm/mach-omap2/common.c
> +++ b/arch/arm/mach-omap2/common.c
> @@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void)
>  {
>  	__omap2_set_globals(&omap242x_globals);
>  }
> +
> +void __init omap242x_map_io(void)
> +{
> +	omap2_set_globals_242x();
> +	omap242x_map_common_io();
> +}
>  #endif
>  
>  #if defined(CONFIG_SOC_OMAP2430)
> @@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void)
>  {
>  	__omap2_set_globals(&omap243x_globals);
>  }
> +
> +void __init omap243x_map_io(void)
> +{
> +	omap2_set_globals_243x();
> +	omap243x_map_common_io();
> +}
>  #endif
>  
>  #if defined(CONFIG_ARCH_OMAP3)
> @@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void)
>  	omap2_set_globals_control(&omap4_globals);
>  	omap2_set_globals_prcm(&omap4_globals);
>  }
> +
> +void __init omap4_map_io(void)
> +{
> +	omap2_set_globals_443x();
> +	omap44xx_map_common_io();
> +}
>  #endif
>  
> diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
> index 5cac97e..abda2c7 100644
> --- a/arch/arm/plat-omap/include/plat/common.h
> +++ b/arch/arm/plat-omap/include/plat/common.h
> @@ -83,7 +83,11 @@ void omap2_set_globals_sdrc(struct omap_globals *);
>  void omap2_set_globals_control(struct omap_globals *);
>  void omap2_set_globals_prcm(struct omap_globals *);
>  
> +void omap242x_map_io(void);
> +void omap243x_map_io(void);
>  void omap3_map_io(void);
> +void omap4_map_io(void);
> +
>  
>  /**
>   * omap_test_timeout - busy-loop, testing a condition
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 23:08     ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:08 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Re-cycle the original board-generic file to support Device Tree
> for every OMAP2+ variants.
> Note: Since it is a completely new content in the existing file
> I removed the original copyright.

I'd suggest just keeping it, maybe just update the comments
accordingly?

That's because Copyrights in general just don't "disappear".

And the meaning of the board-generic is still the same as originally,
that is do the booting based on board-specific data passed from
the bootloader like the comments say:

> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
> - * the bootloader passes the board-specific data to the kernel.
> - * Do not put any board specific code to this file; create a new machine
> - * type if you need custom low-level initializations.
> + * Support for generic OMAP2+ device tree boards.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-23 23:08     ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Re-cycle the original board-generic file to support Device Tree
> for every OMAP2+ variants.
> Note: Since it is a completely new content in the existing file
> I removed the original copyright.

I'd suggest just keeping it, maybe just update the comments
accordingly?

That's because Copyrights in general just don't "disappear".

And the meaning of the board-generic is still the same as originally,
that is do the booting based on board-specific data passed from
the bootloader like the comments say:

> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
> - * the bootloader passes the board-specific data to the kernel.
> - * Do not put any board specific code to this file; create a new machine
> - * type if you need custom low-level initializations.
> + * Support for generic OMAP2+ device tree boards.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 23:12     ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:12 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Still needed to boot until the i2c & twl driver is adapted to
> device-tree. Otherwise the voltage control code will try to
> access the twl and crash.

That sounds OK to me for now. For merging these patches, how
about the following:

- Kevin queues up the omap_device related changes

- Grant queues up the .dts changes

- I'll queue the map_io and board changes based on Kevin's
  omap_device changes

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
@ 2011-09-23 23:12     ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-23 23:12 UTC (permalink / raw)
  To: linux-arm-kernel

* Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> Still needed to boot until the i2c & twl driver is adapted to
> device-tree. Otherwise the voltage control code will try to
> access the twl and crash.

That sounds OK to me for now. For merging these patches, how
about the following:

- Kevin queues up the omap_device related changes

- Grant queues up the .dts changes

- I'll queue the map_io and board changes based on Kevin's
  omap_device changes

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 23:21     ` Grant Likely
  -1 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:21 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: tony, paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss, G, Manjunath Kondaiah

On Fri, Sep 23, 2011 at 10:23:11PM +0200, Benoit Cousson wrote:
> Based on the original omap4-panda.dts file from Manju.
> http://www.spinics.net/lists/linux-omap/msg55836.html
> 
> Add memory information and a default bootargs to allow
> a boot from RAMDISK.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: G, Manjunath Kondaiah <manjugk@ti.com>
> ---
>  arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap4-panda.dts
> 
> diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
> new file mode 100644
> index 0000000..c702657
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap4-panda.dts
> @@ -0,0 +1,29 @@
> +/*
> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +/dts-v1/;
> +
> +/include/ "omap4.dtsi"
> +
> +/ {
> +	model = "TI OMAP4 PandaBoard";
> +	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
> +
> +	/*
> +	 * Since the initial device tree board file does not create any
> +	 * devices (MMC, network...), the only way to boot is to provide a
> +	 * ramdisk.
> +	 */
> +	chosen {
> +		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";

Generally, we don't want bootargs in the .dts files; we want them
added to the .dtb by the boot firmware.  However, we are bootstrapping
here, so I'm okay with it in the short term until firmware matures a
bit more.

> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x40000000>; /* 1 GB */
> +	};
> +};
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
@ 2011-09-23 23:21     ` Grant Likely
  0 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 23, 2011 at 10:23:11PM +0200, Benoit Cousson wrote:
> Based on the original omap4-panda.dts file from Manju.
> http://www.spinics.net/lists/linux-omap/msg55836.html
> 
> Add memory information and a default bootargs to allow
> a boot from RAMDISK.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: G, Manjunath Kondaiah <manjugk@ti.com>
> ---
>  arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap4-panda.dts
> 
> diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
> new file mode 100644
> index 0000000..c702657
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap4-panda.dts
> @@ -0,0 +1,29 @@
> +/*
> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +/dts-v1/;
> +
> +/include/ "omap4.dtsi"
> +
> +/ {
> +	model = "TI OMAP4 PandaBoard";
> +	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
> +
> +	/*
> +	 * Since the initial device tree board file does not create any
> +	 * devices (MMC, network...), the only way to boot is to provide a
> +	 * ramdisk.
> +	 */
> +	chosen {
> +		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";

Generally, we don't want bootargs in the .dts files; we want them
added to the .dtb by the boot firmware.  However, we are bootstrapping
here, so I'm okay with it in the short term until firmware matures a
bit more.

> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x40000000>; /* 1 GB */
> +	};
> +};
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-23 23:26     ` Grant Likely
  -1 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:26 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: tony, paul, khilman, rnayak, linux-omap, linux-arm-kernel,
	devicetree-discuss

On Fri, Sep 23, 2011 at 10:23:19PM +0200, Benoit Cousson wrote:
> Add nodes for devices used by PM code (mpu, dsp, iva).
> 
> Add an empty cpus node as well as recommended in the DT spec.
> 
> Remove mpu, dsp, iva devices init if dt is populated.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Kevin Hilman <khilman@ti.com>

Series looks good to me on brief review.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++++++++++
>  Documentation/devicetree/bindings/arm/omap/iva.txt |   19 ++++++++++++++
>  Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++++++++++++++++++
>  arch/arm/boot/dts/omap3.dtsi                       |   19 ++++++++++++++
>  arch/arm/boot/dts/omap4.dtsi                       |   23 +++++++++++++++++
>  arch/arm/mach-omap2/pm.c                           |    3 +-
>  6 files changed, 104 insertions(+), 1 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt
> 
> diff --git a/Documentation/devicetree/bindings/arm/omap/dsp.txt b/Documentation/devicetree/bindings/arm/omap/dsp.txt
> new file mode 100644
> index 0000000..325feef
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/dsp.txt
> @@ -0,0 +1,14 @@
> +* TI - DSP (Digital Signal Processor)
> +
> +TI DSP included in OMAP SoC
> +
> +Required properties:
> +- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
> +- ti,hwmods: "dsp"
> +
> +Examples:
> +
> +dsp {
> +    compatible = "ti,omap3-c64";
> +    ti,hwmods = "dsp";
> +};
> diff --git a/Documentation/devicetree/bindings/arm/omap/iva.txt b/Documentation/devicetree/bindings/arm/omap/iva.txt
> new file mode 100644
> index 0000000..b889475
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/iva.txt
> @@ -0,0 +1,19 @@
> +* TI - IVA (Imaging and Video Accelerator) subsystem
> +
> +The IVA contain various audio, video or imaging HW accelerator
> +depending of the version.
> +
> +Required properties:
> +- compatible : Should be:
> +  - "ti,ivahd" for OMAP4
> +  - "ti,iva2.2" for OMAP3
> +  - "ti,iva2.1" for OMAP2430
> +  - "ti,iva1" for OMAP2420
> +- ti,hwmods: "iva"
> +
> +Examples:
> +
> +iva {
> +    compatible = "ti,ivahd", "ti,iva";
> +    ti,hwmods = "iva";
> +};
> diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
> new file mode 100644
> index 0000000..5ffbacd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/mpu.txt
> @@ -0,0 +1,27 @@
> +* TI - MPU (Main Processor Unit) subsystem
> +
> +The MPU subsystem contain one or several ARM cores
> +depending of the version.
> +The MPU contain CPUs, GIC, L2 cache and a local PRCM.
> +
> +Required properties:
> +- compatible : Should be "ti,omap3-mpu" for OMAP3
> +               Should be "ti,omap4-mpu" for OMAP4
> +- ti,hwmods: "mpu"
> +
> +Examples:
> +
> +- For an OMAP4 SMP system:
> +
> +mpu {
> +    compatible = "ti,omap4-mpu";
> +    ti,hwmods = "mpu";
> +};
> +
> +
> +- For an OMAP3 monocore system:
> +
> +mpu {
> +    compatible = "ti,omap3-mpu";
> +    ti,hwmods = "mpu";
> +};
> diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
> index d558785..d202bb5 100644
> --- a/arch/arm/boot/dts/omap3.dtsi
> +++ b/arch/arm/boot/dts/omap3.dtsi
> @@ -13,12 +13,31 @@
>  / {
>  	compatible = "ti,omap3430", "ti,omap3";
>  
> +	cpus {
> +		cpu@0 {
> +			compatible = "arm,cortex-a8";
> +		};
> +	};
> +
>  	/*
>  	 * The soc node represents the soc top level view. It is uses for IPs
>  	 * that are not memory mapped in the MPU view or for the MPU itself.
>  	 */
>  	soc {
>  		compatible = "ti,omap-infra";
> +		mpu {
> +			compatible = "ti,omap3-mpu";
> +			ti,hwmods = "mpu";
> +		};
> +
> +		iva {
> +			compatible = "ti,iva2.2";
> +			ti,hwmods = "iva";
> +
> +			dsp {
> +				compatible = "ti,omap3-c64";
> +			};
> +		};
>  	};
>  
>  	/*
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index b85a39d..4c61c82 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -23,12 +23,35 @@
>  	aliases {
>  	};
>  
> +	cpus {
> +		cpu@0 {
> +			compatible = "arm,cortex-a9";
> +		};
> +		cpu@1 {
> +			compatible = "arm,cortex-a9";
> +		};
> +	};
> +
>  	/*
>  	 * The soc node represents the soc top level view. It is uses for IPs
>  	 * that are not memory mapped in the MPU view or for the MPU itself.
>  	 */
>  	soc {
>  		compatible = "ti,omap-infra";
> +		mpu {
> +			compatible = "ti,omap4-mpu";
> +			ti,hwmods = "mpu";
> +		};
> +
> +		dsp {
> +			compatible = "ti,omap3-c64";
> +			ti,hwmods = "dsp";
> +		};
> +
> +		iva {
> +			compatible = "ti,ivahd";
> +			ti,hwmods = "iva";
> +		};
>  	};
>  
>  	/*
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 1fd9576..640c266 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -217,7 +217,8 @@ static void __init omap4_init_voltages(void)
>  
>  static int __init omap2_common_pm_init(void)
>  {
> -	omap2_init_processor_devices();
> +	if (!of_have_populated_dt())
> +		omap2_init_processor_devices();
>  	omap_pm_if_init();
>  
>  	return 0;
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes
@ 2011-09-23 23:26     ` Grant Likely
  0 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 23, 2011 at 10:23:19PM +0200, Benoit Cousson wrote:
> Add nodes for devices used by PM code (mpu, dsp, iva).
> 
> Add an empty cpus node as well as recommended in the DT spec.
> 
> Remove mpu, dsp, iva devices init if dt is populated.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Kevin Hilman <khilman@ti.com>

Series looks good to me on brief review.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  Documentation/devicetree/bindings/arm/omap/dsp.txt |   14 ++++++++++
>  Documentation/devicetree/bindings/arm/omap/iva.txt |   19 ++++++++++++++
>  Documentation/devicetree/bindings/arm/omap/mpu.txt |   27 ++++++++++++++++++++
>  arch/arm/boot/dts/omap3.dtsi                       |   19 ++++++++++++++
>  arch/arm/boot/dts/omap4.dtsi                       |   23 +++++++++++++++++
>  arch/arm/mach-omap2/pm.c                           |    3 +-
>  6 files changed, 104 insertions(+), 1 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/omap/mpu.txt
> 
> diff --git a/Documentation/devicetree/bindings/arm/omap/dsp.txt b/Documentation/devicetree/bindings/arm/omap/dsp.txt
> new file mode 100644
> index 0000000..325feef
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/dsp.txt
> @@ -0,0 +1,14 @@
> +* TI - DSP (Digital Signal Processor)
> +
> +TI DSP included in OMAP SoC
> +
> +Required properties:
> +- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
> +- ti,hwmods: "dsp"
> +
> +Examples:
> +
> +dsp {
> +    compatible = "ti,omap3-c64";
> +    ti,hwmods = "dsp";
> +};
> diff --git a/Documentation/devicetree/bindings/arm/omap/iva.txt b/Documentation/devicetree/bindings/arm/omap/iva.txt
> new file mode 100644
> index 0000000..b889475
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/iva.txt
> @@ -0,0 +1,19 @@
> +* TI - IVA (Imaging and Video Accelerator) subsystem
> +
> +The IVA contain various audio, video or imaging HW accelerator
> +depending of the version.
> +
> +Required properties:
> +- compatible : Should be:
> +  - "ti,ivahd" for OMAP4
> +  - "ti,iva2.2" for OMAP3
> +  - "ti,iva2.1" for OMAP2430
> +  - "ti,iva1" for OMAP2420
> +- ti,hwmods: "iva"
> +
> +Examples:
> +
> +iva {
> +    compatible = "ti,ivahd", "ti,iva";
> +    ti,hwmods = "iva";
> +};
> diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
> new file mode 100644
> index 0000000..5ffbacd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/omap/mpu.txt
> @@ -0,0 +1,27 @@
> +* TI - MPU (Main Processor Unit) subsystem
> +
> +The MPU subsystem contain one or several ARM cores
> +depending of the version.
> +The MPU contain CPUs, GIC, L2 cache and a local PRCM.
> +
> +Required properties:
> +- compatible : Should be "ti,omap3-mpu" for OMAP3
> +               Should be "ti,omap4-mpu" for OMAP4
> +- ti,hwmods: "mpu"
> +
> +Examples:
> +
> +- For an OMAP4 SMP system:
> +
> +mpu {
> +    compatible = "ti,omap4-mpu";
> +    ti,hwmods = "mpu";
> +};
> +
> +
> +- For an OMAP3 monocore system:
> +
> +mpu {
> +    compatible = "ti,omap3-mpu";
> +    ti,hwmods = "mpu";
> +};
> diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
> index d558785..d202bb5 100644
> --- a/arch/arm/boot/dts/omap3.dtsi
> +++ b/arch/arm/boot/dts/omap3.dtsi
> @@ -13,12 +13,31 @@
>  / {
>  	compatible = "ti,omap3430", "ti,omap3";
>  
> +	cpus {
> +		cpu at 0 {
> +			compatible = "arm,cortex-a8";
> +		};
> +	};
> +
>  	/*
>  	 * The soc node represents the soc top level view. It is uses for IPs
>  	 * that are not memory mapped in the MPU view or for the MPU itself.
>  	 */
>  	soc {
>  		compatible = "ti,omap-infra";
> +		mpu {
> +			compatible = "ti,omap3-mpu";
> +			ti,hwmods = "mpu";
> +		};
> +
> +		iva {
> +			compatible = "ti,iva2.2";
> +			ti,hwmods = "iva";
> +
> +			dsp {
> +				compatible = "ti,omap3-c64";
> +			};
> +		};
>  	};
>  
>  	/*
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index b85a39d..4c61c82 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -23,12 +23,35 @@
>  	aliases {
>  	};
>  
> +	cpus {
> +		cpu at 0 {
> +			compatible = "arm,cortex-a9";
> +		};
> +		cpu at 1 {
> +			compatible = "arm,cortex-a9";
> +		};
> +	};
> +
>  	/*
>  	 * The soc node represents the soc top level view. It is uses for IPs
>  	 * that are not memory mapped in the MPU view or for the MPU itself.
>  	 */
>  	soc {
>  		compatible = "ti,omap-infra";
> +		mpu {
> +			compatible = "ti,omap4-mpu";
> +			ti,hwmods = "mpu";
> +		};
> +
> +		dsp {
> +			compatible = "ti,omap3-c64";
> +			ti,hwmods = "dsp";
> +		};
> +
> +		iva {
> +			compatible = "ti,ivahd";
> +			ti,hwmods = "iva";
> +		};
>  	};
>  
>  	/*
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 1fd9576..640c266 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -217,7 +217,8 @@ static void __init omap4_init_voltages(void)
>  
>  static int __init omap2_common_pm_init(void)
>  {
> -	omap2_init_processor_devices();
> +	if (!of_have_populated_dt())
> +		omap2_init_processor_devices();
>  	omap_pm_if_init();
>  
>  	return 0;
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
  2011-09-23 23:12     ` Tony Lindgren
@ 2011-09-23 23:47       ` Grant Likely
  -1 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:47 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Benoit Cousson, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

On Fri, Sep 23, 2011 at 04:12:08PM -0700, Tony Lindgren wrote:
> * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > Still needed to boot until the i2c & twl driver is adapted to
> > device-tree. Otherwise the voltage control code will try to
> > access the twl and crash.
> 
> That sounds OK to me for now. For merging these patches, how
> about the following:
> 
> - Kevin queues up the omap_device related changes
> 
> - Grant queues up the .dts changes
> 
> - I'll queue the map_io and board changes based on Kevin's
>   omap_device changes

Go ahead and queue up the .dts changes in your tree.  No need to split them up.

g.


^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
@ 2011-09-23 23:47       ` Grant Likely
  0 siblings, 0 replies; 66+ messages in thread
From: Grant Likely @ 2011-09-23 23:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 23, 2011 at 04:12:08PM -0700, Tony Lindgren wrote:
> * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > Still needed to boot until the i2c & twl driver is adapted to
> > device-tree. Otherwise the voltage control code will try to
> > access the twl and crash.
> 
> That sounds OK to me for now. For merging these patches, how
> about the following:
> 
> - Kevin queues up the omap_device related changes
> 
> - Grant queues up the .dts changes
> 
> - I'll queue the map_io and board changes based on Kevin's
>   omap_device changes

Go ahead and queue up the .dts changes in your tree.  No need to split them up.

g.

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-23 20:23   ` Benoit Cousson
@ 2011-09-26  6:32     ` Rajendra Nayak
  -1 siblings, 0 replies; 66+ messages in thread
From: Rajendra Nayak @ 2011-09-26  6:32 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: tony, grant.likely, paul, khilman, linux-omap, linux-arm-kernel,
	devicetree-discuss

Hi Benoit,

On Saturday 24 September 2011 01:53 AM, Benoit Cousson wrote:
> Re-cycle the original board-generic file to support Device Tree
> for every OMAP2+ variants.
> Note: Since it is a completely new content in the existing file
> I removed the original copyright.
>
> The current approach is an intermediate step before having only
> one machine descriptor that will use some generic DT aware
> functions.

What config does this work with currently? If I use omap2plus_defconfig
should I explicitly disable everything other than say CONFIG_ARCH_OMAP4
if I want it working on OMAP4?

regards,
Rajendra

>
> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
> Cc: Tony Lindgren<tony@atomide.com>
> ---
>   arch/arm/mach-omap2/Kconfig         |    8 ++-
>   arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
>   2 files changed, 89 insertions(+), 48 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 7edf802..5934a27 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -106,9 +106,13 @@ comment "OMAP Board Type"
>   	depends on ARCH_OMAP2PLUS
>
>   config MACH_OMAP_GENERIC
> -	bool "Generic OMAP board"
> -	depends on ARCH_OMAP2
> +	bool "Generic OMAP2+ board"
> +	depends on ARCH_OMAP2PLUS
> +	select USE_OF
>   	default y
> +	help
> +	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
> +	  More information at Documentation/devicetree
>
>   config MACH_OMAP2_TUSB6010
>   	bool
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index e8d45d3..dcbd64c 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -1,76 +1,113 @@
>   /*
> - * linux/arch/arm/mach-omap2/board-generic.c
> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>    *
> - * Copyright (C) 2005 Nokia Corporation
> - * Author: Paul Mundt<paul.mundt@nokia.com>
> - *
> - * Modified from mach-omap/omap1/board-generic.c
> - *
> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
> - * the bootloader passes the board-specific data to the kernel.
> - * Do not put any board specific code to this file; create a new machine
> - * type if you need custom low-level initializations.
> + * Support for generic OMAP2+ device tree boards.
>    *
>    * This program is free software; you can redistribute it and/or modify
>    * it under the terms of the GNU General Public License version 2 as
>    * published by the Free Software Foundation.
>    */
>
> -#include<linux/kernel.h>
> -#include<linux/init.h>
> -#include<linux/device.h>
> +#include<linux/io.h>
> +#include<linux/of_platform.h>
> +#include<linux/irqdomain.h>
>
>   #include<mach/hardware.h>
> -#include<asm/mach-types.h>
>   #include<asm/mach/arch.h>
> -#include<asm/mach/map.h>
>
> -#include<mach/gpio.h>
> -#include<plat/usb.h>
>   #include<plat/board.h>
>   #include<plat/common.h>
> +#include<mach/omap4-common.h>
>
> -static struct omap_board_config_kernel generic_config[] = {
> +
> +static struct of_device_id omap_dt_match_table[] __initdata = {
> +	{ .compatible = "simple-bus", },
> +	{ .compatible = "ti,omap-infra", },
> +	{ }
>   };
>
> -static void __init omap_generic_init_early(void)
> -{
> -	omap2_init_common_infrastructure();
> -}
> +static struct of_device_id intc_match[] __initdata = {
> +	{ .compatible = "ti,omap3-intc", },
> +	{ .compatible = "arm,cortex-a9-gic", },
> +	{ }
> +};
>
>   static void __init omap_generic_init(void)
>   {
> +	struct device_node *node = of_find_matching_node(NULL, intc_match);
> +	if (node)
> +		irq_domain_add_simple(node, 0);
> +
>   	omap_serial_init();
>   	omap_sdrc_init(NULL, NULL);
> -	omap_board_config = generic_config;
> -	omap_board_config_size = ARRAY_SIZE(generic_config);
> -}
>
> -static void __init omap_generic_map_io(void)
> -{
> -	if (cpu_is_omap242x()) {
> -		omap2_set_globals_242x();
> -		omap242x_map_common_io();
> -	} else if (cpu_is_omap243x()) {
> -		omap2_set_globals_243x();
> -		omap243x_map_common_io();
> -	} else if (cpu_is_omap34xx()) {
> -		omap2_set_globals_3xxx();
> -		omap34xx_map_common_io();
> -	} else if (cpu_is_omap44xx()) {
> -		omap2_set_globals_443x();
> -		omap44xx_map_common_io();
> -	}
> +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
>   }
>
> -/* XXX This machine entry name should be updated */
> -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
> -	/* Maintainer: Paul Mundt<paul.mundt@nokia.com>  */
> -	.atag_offset	= 0x100,
> +#if defined(CONFIG_SOC_OMAP2420)
> +static const char *omap242x_boards_compat[] __initdata = {
> +	"ti,omap2420",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
>   	.reserve	= omap_reserve,
> -	.map_io		= omap_generic_map_io,
> -	.init_early	= omap_generic_init_early,
> +	.map_io		= omap242x_map_io,
> +	.init_early	= omap2420_init_early,
>   	.init_irq	= omap2_init_irq,
>   	.init_machine	= omap_generic_init,
>   	.timer		=&omap2_timer,
> +	.dt_compat	= omap242x_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_SOC_OMAP2430)
> +static const char *omap243x_boards_compat[] __initdata = {
> +	"ti,omap2430",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap243x_map_io,
> +	.init_early	= omap2430_init_early,
> +	.init_irq	= omap2_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap2_timer,
> +	.dt_compat	= omap243x_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP3)
> +static const char *omap3_boards_compat[] __initdata = {
> +	"ti,omap3",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap3_map_io,
> +	.init_early	= omap3430_init_early,
> +	.init_irq	= omap3_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap3_timer,
> +	.dt_compat	= omap3_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP4)
> +static const char *omap4_boards_compat[] __initdata = {
> +	"ti,omap4",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap4_map_io,
> +	.init_early	= omap4430_init_early,
> +	.init_irq	= gic_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap4_timer,
> +	.dt_compat	= omap4_boards_compat,
>   MACHINE_END
> +#endif


^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-26  6:32     ` Rajendra Nayak
  0 siblings, 0 replies; 66+ messages in thread
From: Rajendra Nayak @ 2011-09-26  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Benoit,

On Saturday 24 September 2011 01:53 AM, Benoit Cousson wrote:
> Re-cycle the original board-generic file to support Device Tree
> for every OMAP2+ variants.
> Note: Since it is a completely new content in the existing file
> I removed the original copyright.
>
> The current approach is an intermediate step before having only
> one machine descriptor that will use some generic DT aware
> functions.

What config does this work with currently? If I use omap2plus_defconfig
should I explicitly disable everything other than say CONFIG_ARCH_OMAP4
if I want it working on OMAP4?

regards,
Rajendra

>
> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
> Cc: Tony Lindgren<tony@atomide.com>
> ---
>   arch/arm/mach-omap2/Kconfig         |    8 ++-
>   arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
>   2 files changed, 89 insertions(+), 48 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 7edf802..5934a27 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -106,9 +106,13 @@ comment "OMAP Board Type"
>   	depends on ARCH_OMAP2PLUS
>
>   config MACH_OMAP_GENERIC
> -	bool "Generic OMAP board"
> -	depends on ARCH_OMAP2
> +	bool "Generic OMAP2+ board"
> +	depends on ARCH_OMAP2PLUS
> +	select USE_OF
>   	default y
> +	help
> +	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
> +	  More information at Documentation/devicetree
>
>   config MACH_OMAP2_TUSB6010
>   	bool
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index e8d45d3..dcbd64c 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -1,76 +1,113 @@
>   /*
> - * linux/arch/arm/mach-omap2/board-generic.c
> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>    *
> - * Copyright (C) 2005 Nokia Corporation
> - * Author: Paul Mundt<paul.mundt@nokia.com>
> - *
> - * Modified from mach-omap/omap1/board-generic.c
> - *
> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
> - * the bootloader passes the board-specific data to the kernel.
> - * Do not put any board specific code to this file; create a new machine
> - * type if you need custom low-level initializations.
> + * Support for generic OMAP2+ device tree boards.
>    *
>    * This program is free software; you can redistribute it and/or modify
>    * it under the terms of the GNU General Public License version 2 as
>    * published by the Free Software Foundation.
>    */
>
> -#include<linux/kernel.h>
> -#include<linux/init.h>
> -#include<linux/device.h>
> +#include<linux/io.h>
> +#include<linux/of_platform.h>
> +#include<linux/irqdomain.h>
>
>   #include<mach/hardware.h>
> -#include<asm/mach-types.h>
>   #include<asm/mach/arch.h>
> -#include<asm/mach/map.h>
>
> -#include<mach/gpio.h>
> -#include<plat/usb.h>
>   #include<plat/board.h>
>   #include<plat/common.h>
> +#include<mach/omap4-common.h>
>
> -static struct omap_board_config_kernel generic_config[] = {
> +
> +static struct of_device_id omap_dt_match_table[] __initdata = {
> +	{ .compatible = "simple-bus", },
> +	{ .compatible = "ti,omap-infra", },
> +	{ }
>   };
>
> -static void __init omap_generic_init_early(void)
> -{
> -	omap2_init_common_infrastructure();
> -}
> +static struct of_device_id intc_match[] __initdata = {
> +	{ .compatible = "ti,omap3-intc", },
> +	{ .compatible = "arm,cortex-a9-gic", },
> +	{ }
> +};
>
>   static void __init omap_generic_init(void)
>   {
> +	struct device_node *node = of_find_matching_node(NULL, intc_match);
> +	if (node)
> +		irq_domain_add_simple(node, 0);
> +
>   	omap_serial_init();
>   	omap_sdrc_init(NULL, NULL);
> -	omap_board_config = generic_config;
> -	omap_board_config_size = ARRAY_SIZE(generic_config);
> -}
>
> -static void __init omap_generic_map_io(void)
> -{
> -	if (cpu_is_omap242x()) {
> -		omap2_set_globals_242x();
> -		omap242x_map_common_io();
> -	} else if (cpu_is_omap243x()) {
> -		omap2_set_globals_243x();
> -		omap243x_map_common_io();
> -	} else if (cpu_is_omap34xx()) {
> -		omap2_set_globals_3xxx();
> -		omap34xx_map_common_io();
> -	} else if (cpu_is_omap44xx()) {
> -		omap2_set_globals_443x();
> -		omap44xx_map_common_io();
> -	}
> +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
>   }
>
> -/* XXX This machine entry name should be updated */
> -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
> -	/* Maintainer: Paul Mundt<paul.mundt@nokia.com>  */
> -	.atag_offset	= 0x100,
> +#if defined(CONFIG_SOC_OMAP2420)
> +static const char *omap242x_boards_compat[] __initdata = {
> +	"ti,omap2420",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
>   	.reserve	= omap_reserve,
> -	.map_io		= omap_generic_map_io,
> -	.init_early	= omap_generic_init_early,
> +	.map_io		= omap242x_map_io,
> +	.init_early	= omap2420_init_early,
>   	.init_irq	= omap2_init_irq,
>   	.init_machine	= omap_generic_init,
>   	.timer		=&omap2_timer,
> +	.dt_compat	= omap242x_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_SOC_OMAP2430)
> +static const char *omap243x_boards_compat[] __initdata = {
> +	"ti,omap2430",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap243x_map_io,
> +	.init_early	= omap2430_init_early,
> +	.init_irq	= omap2_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap2_timer,
> +	.dt_compat	= omap243x_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP3)
> +static const char *omap3_boards_compat[] __initdata = {
> +	"ti,omap3",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap3_map_io,
> +	.init_early	= omap3430_init_early,
> +	.init_irq	= omap3_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap3_timer,
> +	.dt_compat	= omap3_boards_compat,
> +MACHINE_END
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP4)
> +static const char *omap4_boards_compat[] __initdata = {
> +	"ti,omap4",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap4_map_io,
> +	.init_early	= omap4430_init_early,
> +	.init_irq	= gic_init_irq,
> +	.init_machine	= omap_generic_init,
> +	.timer		=&omap4_timer,
> +	.dt_compat	= omap4_boards_compat,
>   MACHINE_END
> +#endif

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-26  6:32     ` Rajendra Nayak
@ 2011-09-26  9:00         ` Cousson, Benoit
  -1 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26  9:00 UTC (permalink / raw)
  To: Nayak, Rajendra
  Cc: Hilman, Kevin, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 9/26/2011 8:32 AM, Nayak, Rajendra wrote:
> Hi Benoit,
>
> On Saturday 24 September 2011 01:53 AM, Benoit Cousson wrote:
>> Re-cycle the original board-generic file to support Device Tree
>> for every OMAP2+ variants.
>> Note: Since it is a completely new content in the existing file
>> I removed the original copyright.
>>
>> The current approach is an intermediate step before having only
>> one machine descriptor that will use some generic DT aware
>> functions.
>
> What config does this work with currently? If I use omap2plus_defconfig
> should I explicitly disable everything other than say CONFIG_ARCH_OMAP4
> if I want it working on OMAP4?

Nope, in theory, omap2plus_defconfig should work as usual:-)
If uboot does not provide and dtb, then the legacy board file will be 
used. If a dtb is present then only the board-generic can match with the 
DT mechanism.

Regards,
Benoit


>
> regards,
> Rajendra
>
>>
>> Signed-off-by: Benoit Cousson<b-cousson-l0cyMroinI0@public.gmane.org>
>> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>> ---
>>    arch/arm/mach-omap2/Kconfig         |    8 ++-
>>    arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
>>    2 files changed, 89 insertions(+), 48 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
>> index 7edf802..5934a27 100644
>> --- a/arch/arm/mach-omap2/Kconfig
>> +++ b/arch/arm/mach-omap2/Kconfig
>> @@ -106,9 +106,13 @@ comment "OMAP Board Type"
>>    	depends on ARCH_OMAP2PLUS
>>
>>    config MACH_OMAP_GENERIC
>> -	bool "Generic OMAP board"
>> -	depends on ARCH_OMAP2
>> +	bool "Generic OMAP2+ board"
>> +	depends on ARCH_OMAP2PLUS
>> +	select USE_OF
>>    	default y
>> +	help
>> +	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
>> +	  More information at Documentation/devicetree
>>
>>    config MACH_OMAP2_TUSB6010
>>    	bool
>> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
>> index e8d45d3..dcbd64c 100644
>> --- a/arch/arm/mach-omap2/board-generic.c
>> +++ b/arch/arm/mach-omap2/board-generic.c
>> @@ -1,76 +1,113 @@
>>    /*
>> - * linux/arch/arm/mach-omap2/board-generic.c
>> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>>     *
>> - * Copyright (C) 2005 Nokia Corporation
>> - * Author: Paul Mundt<paul.mundt-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
>> - *
>> - * Modified from mach-omap/omap1/board-generic.c
>> - *
>> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
>> - * the bootloader passes the board-specific data to the kernel.
>> - * Do not put any board specific code to this file; create a new machine
>> - * type if you need custom low-level initializations.
>> + * Support for generic OMAP2+ device tree boards.
>>     *
>>     * This program is free software; you can redistribute it and/or modify
>>     * it under the terms of the GNU General Public License version 2 as
>>     * published by the Free Software Foundation.
>>     */
>>
>> -#include<linux/kernel.h>
>> -#include<linux/init.h>
>> -#include<linux/device.h>
>> +#include<linux/io.h>
>> +#include<linux/of_platform.h>
>> +#include<linux/irqdomain.h>
>>
>>    #include<mach/hardware.h>
>> -#include<asm/mach-types.h>
>>    #include<asm/mach/arch.h>
>> -#include<asm/mach/map.h>
>>
>> -#include<mach/gpio.h>
>> -#include<plat/usb.h>
>>    #include<plat/board.h>
>>    #include<plat/common.h>
>> +#include<mach/omap4-common.h>
>>
>> -static struct omap_board_config_kernel generic_config[] = {
>> +
>> +static struct of_device_id omap_dt_match_table[] __initdata = {
>> +	{ .compatible = "simple-bus", },
>> +	{ .compatible = "ti,omap-infra", },
>> +	{ }
>>    };
>>
>> -static void __init omap_generic_init_early(void)
>> -{
>> -	omap2_init_common_infrastructure();
>> -}
>> +static struct of_device_id intc_match[] __initdata = {
>> +	{ .compatible = "ti,omap3-intc", },
>> +	{ .compatible = "arm,cortex-a9-gic", },
>> +	{ }
>> +};
>>
>>    static void __init omap_generic_init(void)
>>    {
>> +	struct device_node *node = of_find_matching_node(NULL, intc_match);
>> +	if (node)
>> +		irq_domain_add_simple(node, 0);
>> +
>>    	omap_serial_init();
>>    	omap_sdrc_init(NULL, NULL);
>> -	omap_board_config = generic_config;
>> -	omap_board_config_size = ARRAY_SIZE(generic_config);
>> -}
>>
>> -static void __init omap_generic_map_io(void)
>> -{
>> -	if (cpu_is_omap242x()) {
>> -		omap2_set_globals_242x();
>> -		omap242x_map_common_io();
>> -	} else if (cpu_is_omap243x()) {
>> -		omap2_set_globals_243x();
>> -		omap243x_map_common_io();
>> -	} else if (cpu_is_omap34xx()) {
>> -		omap2_set_globals_3xxx();
>> -		omap34xx_map_common_io();
>> -	} else if (cpu_is_omap44xx()) {
>> -		omap2_set_globals_443x();
>> -		omap44xx_map_common_io();
>> -	}
>> +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
>>    }
>>
>> -/* XXX This machine entry name should be updated */
>> -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
>> -	/* Maintainer: Paul Mundt<paul.mundt-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>   */
>> -	.atag_offset	= 0x100,
>> +#if defined(CONFIG_SOC_OMAP2420)
>> +static const char *omap242x_boards_compat[] __initdata = {
>> +	"ti,omap2420",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
>>    	.reserve	= omap_reserve,
>> -	.map_io		= omap_generic_map_io,
>> -	.init_early	= omap_generic_init_early,
>> +	.map_io		= omap242x_map_io,
>> +	.init_early	= omap2420_init_early,
>>    	.init_irq	= omap2_init_irq,
>>    	.init_machine	= omap_generic_init,
>>    	.timer		=&omap2_timer,
>> +	.dt_compat	= omap242x_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_SOC_OMAP2430)
>> +static const char *omap243x_boards_compat[] __initdata = {
>> +	"ti,omap2430",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap243x_map_io,
>> +	.init_early	= omap2430_init_early,
>> +	.init_irq	= omap2_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap2_timer,
>> +	.dt_compat	= omap243x_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_ARCH_OMAP3)
>> +static const char *omap3_boards_compat[] __initdata = {
>> +	"ti,omap3",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap3_map_io,
>> +	.init_early	= omap3430_init_early,
>> +	.init_irq	= omap3_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap3_timer,
>> +	.dt_compat	= omap3_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_ARCH_OMAP4)
>> +static const char *omap4_boards_compat[] __initdata = {
>> +	"ti,omap4",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap4_map_io,
>> +	.init_early	= omap4430_init_early,
>> +	.init_irq	= gic_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap4_timer,
>> +	.dt_compat	= omap4_boards_compat,
>>    MACHINE_END
>> +#endif
>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-26  9:00         ` Cousson, Benoit
  0 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26  9:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/26/2011 8:32 AM, Nayak, Rajendra wrote:
> Hi Benoit,
>
> On Saturday 24 September 2011 01:53 AM, Benoit Cousson wrote:
>> Re-cycle the original board-generic file to support Device Tree
>> for every OMAP2+ variants.
>> Note: Since it is a completely new content in the existing file
>> I removed the original copyright.
>>
>> The current approach is an intermediate step before having only
>> one machine descriptor that will use some generic DT aware
>> functions.
>
> What config does this work with currently? If I use omap2plus_defconfig
> should I explicitly disable everything other than say CONFIG_ARCH_OMAP4
> if I want it working on OMAP4?

Nope, in theory, omap2plus_defconfig should work as usual:-)
If uboot does not provide and dtb, then the legacy board file will be 
used. If a dtb is present then only the board-generic can match with the 
DT mechanism.

Regards,
Benoit


>
> regards,
> Rajendra
>
>>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Tony Lindgren<tony@atomide.com>
>> ---
>>    arch/arm/mach-omap2/Kconfig         |    8 ++-
>>    arch/arm/mach-omap2/board-generic.c |  129 ++++++++++++++++++++++------------
>>    2 files changed, 89 insertions(+), 48 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
>> index 7edf802..5934a27 100644
>> --- a/arch/arm/mach-omap2/Kconfig
>> +++ b/arch/arm/mach-omap2/Kconfig
>> @@ -106,9 +106,13 @@ comment "OMAP Board Type"
>>    	depends on ARCH_OMAP2PLUS
>>
>>    config MACH_OMAP_GENERIC
>> -	bool "Generic OMAP board"
>> -	depends on ARCH_OMAP2
>> +	bool "Generic OMAP2+ board"
>> +	depends on ARCH_OMAP2PLUS
>> +	select USE_OF
>>    	default y
>> +	help
>> +	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
>> +	  More information at Documentation/devicetree
>>
>>    config MACH_OMAP2_TUSB6010
>>    	bool
>> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
>> index e8d45d3..dcbd64c 100644
>> --- a/arch/arm/mach-omap2/board-generic.c
>> +++ b/arch/arm/mach-omap2/board-generic.c
>> @@ -1,76 +1,113 @@
>>    /*
>> - * linux/arch/arm/mach-omap2/board-generic.c
>> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>>     *
>> - * Copyright (C) 2005 Nokia Corporation
>> - * Author: Paul Mundt<paul.mundt@nokia.com>
>> - *
>> - * Modified from mach-omap/omap1/board-generic.c
>> - *
>> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
>> - * the bootloader passes the board-specific data to the kernel.
>> - * Do not put any board specific code to this file; create a new machine
>> - * type if you need custom low-level initializations.
>> + * Support for generic OMAP2+ device tree boards.
>>     *
>>     * This program is free software; you can redistribute it and/or modify
>>     * it under the terms of the GNU General Public License version 2 as
>>     * published by the Free Software Foundation.
>>     */
>>
>> -#include<linux/kernel.h>
>> -#include<linux/init.h>
>> -#include<linux/device.h>
>> +#include<linux/io.h>
>> +#include<linux/of_platform.h>
>> +#include<linux/irqdomain.h>
>>
>>    #include<mach/hardware.h>
>> -#include<asm/mach-types.h>
>>    #include<asm/mach/arch.h>
>> -#include<asm/mach/map.h>
>>
>> -#include<mach/gpio.h>
>> -#include<plat/usb.h>
>>    #include<plat/board.h>
>>    #include<plat/common.h>
>> +#include<mach/omap4-common.h>
>>
>> -static struct omap_board_config_kernel generic_config[] = {
>> +
>> +static struct of_device_id omap_dt_match_table[] __initdata = {
>> +	{ .compatible = "simple-bus", },
>> +	{ .compatible = "ti,omap-infra", },
>> +	{ }
>>    };
>>
>> -static void __init omap_generic_init_early(void)
>> -{
>> -	omap2_init_common_infrastructure();
>> -}
>> +static struct of_device_id intc_match[] __initdata = {
>> +	{ .compatible = "ti,omap3-intc", },
>> +	{ .compatible = "arm,cortex-a9-gic", },
>> +	{ }
>> +};
>>
>>    static void __init omap_generic_init(void)
>>    {
>> +	struct device_node *node = of_find_matching_node(NULL, intc_match);
>> +	if (node)
>> +		irq_domain_add_simple(node, 0);
>> +
>>    	omap_serial_init();
>>    	omap_sdrc_init(NULL, NULL);
>> -	omap_board_config = generic_config;
>> -	omap_board_config_size = ARRAY_SIZE(generic_config);
>> -}
>>
>> -static void __init omap_generic_map_io(void)
>> -{
>> -	if (cpu_is_omap242x()) {
>> -		omap2_set_globals_242x();
>> -		omap242x_map_common_io();
>> -	} else if (cpu_is_omap243x()) {
>> -		omap2_set_globals_243x();
>> -		omap243x_map_common_io();
>> -	} else if (cpu_is_omap34xx()) {
>> -		omap2_set_globals_3xxx();
>> -		omap34xx_map_common_io();
>> -	} else if (cpu_is_omap44xx()) {
>> -		omap2_set_globals_443x();
>> -		omap44xx_map_common_io();
>> -	}
>> +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
>>    }
>>
>> -/* XXX This machine entry name should be updated */
>> -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
>> -	/* Maintainer: Paul Mundt<paul.mundt@nokia.com>   */
>> -	.atag_offset	= 0x100,
>> +#if defined(CONFIG_SOC_OMAP2420)
>> +static const char *omap242x_boards_compat[] __initdata = {
>> +	"ti,omap2420",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
>>    	.reserve	= omap_reserve,
>> -	.map_io		= omap_generic_map_io,
>> -	.init_early	= omap_generic_init_early,
>> +	.map_io		= omap242x_map_io,
>> +	.init_early	= omap2420_init_early,
>>    	.init_irq	= omap2_init_irq,
>>    	.init_machine	= omap_generic_init,
>>    	.timer		=&omap2_timer,
>> +	.dt_compat	= omap242x_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_SOC_OMAP2430)
>> +static const char *omap243x_boards_compat[] __initdata = {
>> +	"ti,omap2430",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap243x_map_io,
>> +	.init_early	= omap2430_init_early,
>> +	.init_irq	= omap2_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap2_timer,
>> +	.dt_compat	= omap243x_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_ARCH_OMAP3)
>> +static const char *omap3_boards_compat[] __initdata = {
>> +	"ti,omap3",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap3_map_io,
>> +	.init_early	= omap3430_init_early,
>> +	.init_irq	= omap3_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap3_timer,
>> +	.dt_compat	= omap3_boards_compat,
>> +MACHINE_END
>> +#endif
>> +
>> +#if defined(CONFIG_ARCH_OMAP4)
>> +static const char *omap4_boards_compat[] __initdata = {
>> +	"ti,omap4",
>> +	NULL,
>> +};
>> +
>> +DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
>> +	.reserve	= omap_reserve,
>> +	.map_io		= omap4_map_io,
>> +	.init_early	= omap4430_init_early,
>> +	.init_irq	= gic_init_irq,
>> +	.init_machine	= omap_generic_init,
>> +	.timer		=&omap4_timer,
>> +	.dt_compat	= omap4_boards_compat,
>>    MACHINE_END
>> +#endif
>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  2011-09-23 22:58     ` Tony Lindgren
@ 2011-09-26 12:13       ` Cousson, Benoit
  -1 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:13 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: grant.likely, paul, Hilman, Kevin, Nayak, Rajendra, linux-omap,
	linux-arm-kernel, devicetree-discuss, Shilimkar, Santosh

On 9/24/2011 12:58 AM, Tony Lindgren wrote:
> * Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
>> Used the main OCP node to add bindings with the l3_noc driver.
>> Remove l3_noc static device creation if DT is populated.
>> --- a/arch/arm/mach-omap2/devices.c
>> +++ b/arch/arm/mach-omap2/devices.c
>> @@ -16,6 +16,7 @@
>>   #include<linux/clk.h>
>>   #include<linux/err.h>
>>   #include<linux/slab.h>
>> +#include<linux/of.h>
>>
>>   #include<mach/hardware.h>
>>   #include<mach/irqs.h>
>> @@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
>>   	struct platform_device *pdev;
>>   	char oh_name[L3_MODULES_MAX_LEN];
>>
>> +	/* If dtb is there, the devices will be created dynamically */
>> +	if (of_have_populated_dt())
>> +		return -ENODEV;
>> +
>>   	/*
>>   	 * To avoid code running on other OMAPs in
>>   	 * multi-omap builds
>
> How about just remove omap3_l3_init and omap4_l3_init completely
> instead?
>
> There should not be any need for the platform glue code if the
> driver, it's OK for us to require that either DT is passed from
> the bootloader or as appended DT as soon as the appended DT patches
> are merged.

Yeah, but we should still allow the others board files to work in case 
DT is not passed by the bootloader. Otherwise the DT support need to be 
added to every other boards, and in that case that generic board become 
useless. The effort / duplication will be much important if we start 
hacking every boards with some DT code in them.

Whereas that code is simple and will be removed easily when the DT 
migration will be completed.

Regards,
Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
@ 2011-09-26 12:13       ` Cousson, Benoit
  0 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/24/2011 12:58 AM, Tony Lindgren wrote:
> * Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
>> Used the main OCP node to add bindings with the l3_noc driver.
>> Remove l3_noc static device creation if DT is populated.
>> --- a/arch/arm/mach-omap2/devices.c
>> +++ b/arch/arm/mach-omap2/devices.c
>> @@ -16,6 +16,7 @@
>>   #include<linux/clk.h>
>>   #include<linux/err.h>
>>   #include<linux/slab.h>
>> +#include<linux/of.h>
>>
>>   #include<mach/hardware.h>
>>   #include<mach/irqs.h>
>> @@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
>>   	struct platform_device *pdev;
>>   	char oh_name[L3_MODULES_MAX_LEN];
>>
>> +	/* If dtb is there, the devices will be created dynamically */
>> +	if (of_have_populated_dt())
>> +		return -ENODEV;
>> +
>>   	/*
>>   	 * To avoid code running on other OMAPs in
>>   	 * multi-omap builds
>
> How about just remove omap3_l3_init and omap4_l3_init completely
> instead?
>
> There should not be any need for the platform glue code if the
> driver, it's OK for us to require that either DT is passed from
> the bootloader or as appended DT as soon as the appended DT patches
> are merged.

Yeah, but we should still allow the others board files to work in case 
DT is not passed by the bootloader. Otherwise the DT support need to be 
added to every other boards, and in that case that generic board become 
useless. The effort / duplication will be much important if we start 
hacking every boards with some DT code in them.

Whereas that code is simple and will be removed easily when the DT 
migration will be completed.

Regards,
Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-23 23:08     ` Tony Lindgren
@ 2011-09-26 12:35       ` Cousson, Benoit
  -1 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: grant.likely, paul, Hilman, Kevin, Nayak, Rajendra, linux-omap,
	linux-arm-kernel, devicetree-discuss

On 9/24/2011 1:08 AM, Tony Lindgren wrote:
> * Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
>> Re-cycle the original board-generic file to support Device Tree
>> for every OMAP2+ variants.
>> Note: Since it is a completely new content in the existing file
>> I removed the original copyright.
>
> I'd suggest just keeping it, maybe just update the comments
> accordingly?

Do you mean keeping it and adding the comment? Or removing it and adding 
the comment?

> That's because Copyrights in general just don't "disappear".

OK, maybe, but I thought it is weird to keep an old copyright just 
because we re-use an already existing file since the content is different.

> And the meaning of the board-generic is still the same as originally,
> that is do the booting based on board-specific data passed from
> the bootloader like the comments say:
>
>> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
>> - * the bootloader passes the board-specific data to the kernel.
>> - * Do not put any board specific code to this file; create a new machine
>> - * type if you need custom low-level initializations.
>> + * Support for generic OMAP2+ device tree boards.

Regards,
Benoit


^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-26 12:35       ` Cousson, Benoit
  0 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/24/2011 1:08 AM, Tony Lindgren wrote:
> * Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
>> Re-cycle the original board-generic file to support Device Tree
>> for every OMAP2+ variants.
>> Note: Since it is a completely new content in the existing file
>> I removed the original copyright.
>
> I'd suggest just keeping it, maybe just update the comments
> accordingly?

Do you mean keeping it and adding the comment? Or removing it and adding 
the comment?

> That's because Copyrights in general just don't "disappear".

OK, maybe, but I thought it is weird to keep an old copyright just 
because we re-use an already existing file since the content is different.

> And the meaning of the board-generic is still the same as originally,
> that is do the booting based on board-specific data passed from
> the bootloader like the comments say:
>
>> - * Code for generic OMAP2 board. Should work on many OMAP2 systems where
>> - * the bootloader passes the board-specific data to the kernel.
>> - * Do not put any board specific code to this file; create a new machine
>> - * type if you need custom low-level initializations.
>> + * Support for generic OMAP2+ device tree boards.

Regards,
Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
  2011-09-23 23:21     ` Grant Likely
@ 2011-09-26 12:38       ` Cousson, Benoit
  -1 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:38 UTC (permalink / raw)
  To: Grant Likely
  Cc: tony, paul, Hilman, Kevin, Nayak, Rajendra, linux-omap,
	linux-arm-kernel, devicetree-discuss, G, Manjunath Kondaiah

On 9/24/2011 1:21 AM, Grant Likely wrote:
> On Fri, Sep 23, 2011 at 10:23:11PM +0200, Benoit Cousson wrote:
>> Based on the original omap4-panda.dts file from Manju.
>> http://www.spinics.net/lists/linux-omap/msg55836.html
>>
>> Add memory information and a default bootargs to allow
>> a boot from RAMDISK.
>>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Grant Likely<grant.likely@secretlab.ca>
>> Cc: G, Manjunath Kondaiah<manjugk@ti.com>
>> ---
>>   arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
>>   1 files changed, 29 insertions(+), 0 deletions(-)
>>   create mode 100644 arch/arm/boot/dts/omap4-panda.dts
>>
>> diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
>> new file mode 100644
>> index 0000000..c702657
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap4-panda.dts
>> @@ -0,0 +1,29 @@
>> +/*
>> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +/dts-v1/;
>> +
>> +/include/ "omap4.dtsi"
>> +
>> +/ {
>> +	model = "TI OMAP4 PandaBoard";
>> +	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
>> +
>> +	/*
>> +	 * Since the initial device tree board file does not create any
>> +	 * devices (MMC, network...), the only way to boot is to provide a
>> +	 * ramdisk.
>> +	 */
>> +	chosen {
>> +		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
>
> Generally, we don't want bootargs in the .dts files; we want them
> added to the .dtb by the boot firmware.  However, we are bootstrapping
> here, so I'm okay with it in the short term until firmware matures a
> bit more.

Yeah, I had to to that because an old uboot with appended dtb seems to 
ignore the original bootargs.

Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
@ 2011-09-26 12:38       ` Cousson, Benoit
  0 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2011-09-26 12:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/24/2011 1:21 AM, Grant Likely wrote:
> On Fri, Sep 23, 2011 at 10:23:11PM +0200, Benoit Cousson wrote:
>> Based on the original omap4-panda.dts file from Manju.
>> http://www.spinics.net/lists/linux-omap/msg55836.html
>>
>> Add memory information and a default bootargs to allow
>> a boot from RAMDISK.
>>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Grant Likely<grant.likely@secretlab.ca>
>> Cc: G, Manjunath Kondaiah<manjugk@ti.com>
>> ---
>>   arch/arm/boot/dts/omap4-panda.dts |   29 +++++++++++++++++++++++++++++
>>   1 files changed, 29 insertions(+), 0 deletions(-)
>>   create mode 100644 arch/arm/boot/dts/omap4-panda.dts
>>
>> diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
>> new file mode 100644
>> index 0000000..c702657
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap4-panda.dts
>> @@ -0,0 +1,29 @@
>> +/*
>> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +/dts-v1/;
>> +
>> +/include/ "omap4.dtsi"
>> +
>> +/ {
>> +	model = "TI OMAP4 PandaBoard";
>> +	compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
>> +
>> +	/*
>> +	 * Since the initial device tree board file does not create any
>> +	 * devices (MMC, network...), the only way to boot is to provide a
>> +	 * ramdisk.
>> +	 */
>> +	chosen {
>> +		bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
>
> Generally, we don't want bootargs in the .dts files; we want them
> added to the .dtb by the boot firmware.  However, we are bootstrapping
> here, so I'm okay with it in the short term until firmware matures a
> bit more.

Yeah, I had to to that because an old uboot with appended dtb seems to 
ignore the original bootargs.

Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
  2011-09-23 23:47       ` Grant Likely
@ 2011-09-26 16:45         ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 16:45 UTC (permalink / raw)
  To: Grant Likely
  Cc: Benoit Cousson, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Grant Likely <grant.likely@secretlab.ca> [110923 16:14]:
> On Fri, Sep 23, 2011 at 04:12:08PM -0700, Tony Lindgren wrote:
> > * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > > Still needed to boot until the i2c & twl driver is adapted to
> > > device-tree. Otherwise the voltage control code will try to
> > > access the twl and crash.
> > 
> > That sounds OK to me for now. For merging these patches, how
> > about the following:
> > 
> > - Kevin queues up the omap_device related changes
> > 
> > - Grant queues up the .dts changes
> > 
> > - I'll queue the map_io and board changes based on Kevin's
> >   omap_device changes
> 
> Go ahead and queue up the .dts changes in your tree.  No need to split them up.

OK, will do.

Thanks,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
@ 2011-09-26 16:45         ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 16:45 UTC (permalink / raw)
  To: linux-arm-kernel

* Grant Likely <grant.likely@secretlab.ca> [110923 16:14]:
> On Fri, Sep 23, 2011 at 04:12:08PM -0700, Tony Lindgren wrote:
> > * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > > Still needed to boot until the i2c & twl driver is adapted to
> > > device-tree. Otherwise the voltage control code will try to
> > > access the twl and crash.
> > 
> > That sounds OK to me for now. For merging these patches, how
> > about the following:
> > 
> > - Kevin queues up the omap_device related changes
> > 
> > - Grant queues up the .dts changes
> > 
> > - I'll queue the map_io and board changes based on Kevin's
> >   omap_device changes
> 
> Go ahead and queue up the .dts changes in your tree.  No need to split them up.

OK, will do.

Thanks,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
  2011-09-26 12:35       ` Cousson, Benoit
@ 2011-09-26 21:37         ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 21:37 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: grant.likely, paul, Hilman, Kevin, Nayak, Rajendra, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Cousson, Benoit <b-cousson@ti.com> [110926 05:01]:
> On 9/24/2011 1:08 AM, Tony Lindgren wrote:
> >* Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
> >>Re-cycle the original board-generic file to support Device Tree
> >>for every OMAP2+ variants.
> >>Note: Since it is a completely new content in the existing file
> >>I removed the original copyright.
> >
> >I'd suggest just keeping it, maybe just update the comments
> >accordingly?
> 
> Do you mean keeping it and adding the comment? Or removing it and
> adding the comment?

Maybe just update the comment accordingly for DT?
 
> >That's because Copyrights in general just don't "disappear".
> 
> OK, maybe, but I thought it is weird to keep an old copyright just
> because we re-use an already existing file since the content is
> different.

Yeah.. But it's still a good idea not to mess with the copyrights
as as you would need permissions from the copyright holders.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
@ 2011-09-26 21:37         ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 21:37 UTC (permalink / raw)
  To: linux-arm-kernel

* Cousson, Benoit <b-cousson@ti.com> [110926 05:01]:
> On 9/24/2011 1:08 AM, Tony Lindgren wrote:
> >* Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
> >>Re-cycle the original board-generic file to support Device Tree
> >>for every OMAP2+ variants.
> >>Note: Since it is a completely new content in the existing file
> >>I removed the original copyright.
> >
> >I'd suggest just keeping it, maybe just update the comments
> >accordingly?
> 
> Do you mean keeping it and adding the comment? Or removing it and
> adding the comment?

Maybe just update the comment accordingly for DT?
 
> >That's because Copyrights in general just don't "disappear".
> 
> OK, maybe, but I thought it is weird to keep an old copyright just
> because we re-use an already existing file since the content is
> different.

Yeah.. But it's still a good idea not to mess with the copyrights
as as you would need permissions from the copyright holders.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
  2011-09-26 12:13       ` Cousson, Benoit
@ 2011-09-26 21:44         ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 21:44 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: grant.likely, paul, Hilman, Kevin, Nayak, Rajendra, linux-omap,
	linux-arm-kernel, devicetree-discuss, Shilimkar, Santosh

* Cousson, Benoit <b-cousson@ti.com> [110926 04:39]:
> On 9/24/2011 12:58 AM, Tony Lindgren wrote:
> >* Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
> >
> >How about just remove omap3_l3_init and omap4_l3_init completely
> >instead?
> >
> >There should not be any need for the platform glue code if the
> >driver, it's OK for us to require that either DT is passed from
> >the bootloader or as appended DT as soon as the appended DT patches
> >are merged.
> 
> Yeah, but we should still allow the others board files to work in
> case DT is not passed by the bootloader. Otherwise the DT support
> need to be added to every other boards, and in that case that
> generic board become useless. The effort / duplication will be much
> important if we start hacking every boards with some DT code in
> them.

OK..
 
> Whereas that code is simple and will be removed easily when the DT
> migration will be completed.

..let's keep it around until we have board-generic booting
and mounting root.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
@ 2011-09-26 21:44         ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 21:44 UTC (permalink / raw)
  To: linux-arm-kernel

* Cousson, Benoit <b-cousson@ti.com> [110926 04:39]:
> On 9/24/2011 12:58 AM, Tony Lindgren wrote:
> >* Benoit Cousson<b-cousson@ti.com>  [110923 12:50]:
> >
> >How about just remove omap3_l3_init and omap4_l3_init completely
> >instead?
> >
> >There should not be any need for the platform glue code if the
> >driver, it's OK for us to require that either DT is passed from
> >the bootloader or as appended DT as soon as the appended DT patches
> >are merged.
> 
> Yeah, but we should still allow the others board files to work in
> case DT is not passed by the bootloader. Otherwise the DT support
> need to be added to every other boards, and in that case that
> generic board become useless. The effort / duplication will be much
> important if we start hacking every boards with some DT code in
> them.

OK..
 
> Whereas that code is simple and will be removed easily when the DT
> migration will be completed.

..let's keep it around until we have board-generic booting
and mounting root.

Regards,

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2011-09-23 23:00     ` Tony Lindgren
@ 2011-09-26 23:15       ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:15 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

* Tony Lindgren <tony@atomide.com> [110923 15:27]:
> * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > Add SoC specific map_io function to be used by the generic DT
> > board file. This is an intermediate step before having some
> > generic DT aware map_io function.
> 
> Thanks, I'll apply this into cleanup branch and with the related
> conversion of board files.

Following replies contain the two related patches.

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2011-09-26 23:15       ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [110923 15:27]:
> * Benoit Cousson <b-cousson@ti.com> [110923 12:50]:
> > Add SoC specific map_io function to be used by the generic DT
> > board file. This is an intermediate step before having some
> > generic DT aware map_io function.
> 
> Thanks, I'll apply this into cleanup branch and with the related
> conversion of board files.

Following replies contain the two related patches.

Tony

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH] ARM: OMAP2+: Use SoC specifc map_io
  2011-09-26 23:15       ` Tony Lindgren
@ 2011-09-26 23:16         ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:16 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

There's no longer any need for the board specific
map_io.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 618216c..45dafe2 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -243,17 +243,11 @@ static void __init omap_2430sdp_init(void)
 			 "Secondary LCD backlight");
 }
 
-static void __init omap_2430sdp_map_io(void)
-{
-	omap2_set_globals_243x();
-	omap243x_map_common_io();
-}
-
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
 	/* Maintainer: Syed Khasim - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_2430sdp_map_io,
+	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_2430sdp_init,
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ab19d30..44a3e2c 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,17 +825,11 @@ static void __init omap_4430sdp_init(void)
 	omap_4430sdp_display_init();
 }
 
-static void __init omap_4430sdp_map_io(void)
-{
-	omap2_set_globals_443x();
-	omap44xx_map_common_io();
-}
-
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
 	/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_4430sdp_map_io,
+	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
 	.init_machine	= omap_4430sdp_init,
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index cf546f8..8528436 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -337,17 +337,11 @@ static void __init omap_apollon_init(void)
 	omap_sdrc_init(NULL, NULL);
 }
 
-static void __init omap_apollon_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
 	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_apollon_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_apollon_init,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 948fde0..fcc5107 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -369,17 +369,11 @@ static void __init omap_h4_init(void)
 	h4_init_flash();
 }
 
-static void __init omap_h4_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_h4_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap_h4_init_irq,
 	.init_machine	= omap_h4_init,
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 77a4e19..d1f4a02 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -616,12 +616,6 @@ static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
 	},
 };
 
-static void __init n8x0_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
 	/* I2S codec port pins for McBSP block */
@@ -692,7 +686,7 @@ static void __init n8x0_init_machine(void)
 MACHINE_START(NOKIA_N800, "Nokia N800")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
@@ -702,7 +696,7 @@ MACHINE_END
 MACHINE_START(NOKIA_N810, "Nokia N810")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
@@ -712,7 +706,7 @@ MACHINE_END
 MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1bce765..e269290 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -570,17 +570,11 @@ static void __init omap4_panda_init(void)
 	omap4_panda_display_init();
 }
 
-static void __init omap4_panda_map_io(void)
-{
-	omap2_set_globals_443x();
-	omap44xx_map_common_io();
-}
-
 MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
 	/* Maintainer: David Anders - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap4_panda_map_io,
+	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
 	.init_machine	= omap4_panda_init,
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index a3182e8..a98db61 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -143,16 +143,10 @@ static void __init rm680_init(void)
 	rm680_peripherals_init();
 }
 
-static void __init rm680_map_io(void)
-{
-	omap2_set_globals_3xxx();
-	omap34xx_map_common_io();
-}
-
 MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= rm680_map_io,
+	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
 	.init_irq	= omap3_init_irq,
 	.init_machine	= rm680_init,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 32a79e2..8677a06 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -139,12 +139,6 @@ static void __init rx51_init(void)
 	platform_device_register(&leds_gpio);
 }
 
-static void __init rx51_map_io(void)
-{
-	omap2_set_globals_3xxx();
-	omap34xx_map_common_io();
-}
-
 static void __init rx51_reserve(void)
 {
 	rx51_video_mem_init();
@@ -155,7 +149,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
 	/* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= rx51_reserve,
-	.map_io		= rx51_map_io,
+	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
 	.init_machine	= rx51_init,

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH] ARM: OMAP2+: Use SoC specifc map_io
@ 2011-09-26 23:16         ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:16 UTC (permalink / raw)
  To: linux-arm-kernel

There's no longer any need for the board specific
map_io.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 618216c..45dafe2 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -243,17 +243,11 @@ static void __init omap_2430sdp_init(void)
 			 "Secondary LCD backlight");
 }
 
-static void __init omap_2430sdp_map_io(void)
-{
-	omap2_set_globals_243x();
-	omap243x_map_common_io();
-}
-
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
 	/* Maintainer: Syed Khasim - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_2430sdp_map_io,
+	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_2430sdp_init,
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ab19d30..44a3e2c 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,17 +825,11 @@ static void __init omap_4430sdp_init(void)
 	omap_4430sdp_display_init();
 }
 
-static void __init omap_4430sdp_map_io(void)
-{
-	omap2_set_globals_443x();
-	omap44xx_map_common_io();
-}
-
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
 	/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_4430sdp_map_io,
+	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
 	.init_machine	= omap_4430sdp_init,
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index cf546f8..8528436 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -337,17 +337,11 @@ static void __init omap_apollon_init(void)
 	omap_sdrc_init(NULL, NULL);
 }
 
-static void __init omap_apollon_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
 	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_apollon_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_apollon_init,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 948fde0..fcc5107 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -369,17 +369,11 @@ static void __init omap_h4_init(void)
 	h4_init_flash();
 }
 
-static void __init omap_h4_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap_h4_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap_h4_init_irq,
 	.init_machine	= omap_h4_init,
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 77a4e19..d1f4a02 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -616,12 +616,6 @@ static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
 	},
 };
 
-static void __init n8x0_map_io(void)
-{
-	omap2_set_globals_242x();
-	omap242x_map_common_io();
-}
-
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
 	/* I2S codec port pins for McBSP block */
@@ -692,7 +686,7 @@ static void __init n8x0_init_machine(void)
 MACHINE_START(NOKIA_N800, "Nokia N800")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
@@ -702,7 +696,7 @@ MACHINE_END
 MACHINE_START(NOKIA_N810, "Nokia N810")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
@@ -712,7 +706,7 @@ MACHINE_END
 MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= n8x0_map_io,
+	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
 	.init_machine	= n8x0_init_machine,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1bce765..e269290 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -570,17 +570,11 @@ static void __init omap4_panda_init(void)
 	omap4_panda_display_init();
 }
 
-static void __init omap4_panda_map_io(void)
-{
-	omap2_set_globals_443x();
-	omap44xx_map_common_io();
-}
-
 MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
 	/* Maintainer: David Anders - Texas Instruments Inc */
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= omap4_panda_map_io,
+	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= gic_init_irq,
 	.init_machine	= omap4_panda_init,
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index a3182e8..a98db61 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -143,16 +143,10 @@ static void __init rm680_init(void)
 	rm680_peripherals_init();
 }
 
-static void __init rm680_map_io(void)
-{
-	omap2_set_globals_3xxx();
-	omap34xx_map_common_io();
-}
-
 MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
-	.map_io		= rm680_map_io,
+	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
 	.init_irq	= omap3_init_irq,
 	.init_machine	= rm680_init,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 32a79e2..8677a06 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -139,12 +139,6 @@ static void __init rx51_init(void)
 	platform_device_register(&leds_gpio);
 }
 
-static void __init rx51_map_io(void)
-{
-	omap2_set_globals_3xxx();
-	omap34xx_map_common_io();
-}
-
 static void __init rx51_reserve(void)
 {
 	rx51_video_mem_init();
@@ -155,7 +149,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
 	/* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
 	.boot_params	= 0x80000100,
 	.reserve	= rx51_reserve,
-	.map_io		= rx51_map_io,
+	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
 	.init_machine	= rx51_init,

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH] ARM: OMAP2+: Remove custom init_irq for remaining boards
  2011-09-26 23:16         ` Tony Lindgren
@ 2011-09-26 23:18           ` Tony Lindgren
  -1 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:18 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: grant.likely, paul, khilman, rnayak, linux-omap,
	linux-arm-kernel, devicetree-discuss

With SoC specific timers, board specific init_irq is
no longer needed. Earlier this was still needed to
initialize the gptimer12 on Beagle based boards.

Also convert board-h4.c to use omap2_init_irq accidentally
did not get converted earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 4b1f6c6..059b74d 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -397,11 +397,6 @@ static struct platform_device keys_gpio = {
 	},
 };
 
-static void __init devkit8000_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 #define OMAP_DM9000_BASE	0x2c000000
 
 static struct resource omap_dm9000_resources[] = {
@@ -665,7 +660,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
-	.init_irq	= devkit8000_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= devkit8000_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index fcc5107..8486142 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -290,11 +290,6 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
 	{ OMAP_TAG_LCD,		&h4_lcd_config },
 };
 
-static void __init omap_h4_init_irq(void)
-{
-	omap2_init_irq();
-}
-
 static struct at24_platform_data m24c01 = {
 	.byte_len	= SZ_1K / 8,
 	.page_size	= 16,
@@ -375,7 +370,7 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	.reserve	= omap_reserve,
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
-	.init_irq	= omap_h4_init_irq,
+	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_h4_init,
 	.timer		= &omap2_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index ce3234d..e085371 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -449,11 +449,6 @@ static void __init omap3_beagle_init_early(void)
 	omap2_init_common_infrastructure();
 }
 
-static void __init omap3_beagle_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_beagle_devices[] __initdata = {
 	&leds_gpio,
 	&keys_gpio,
@@ -561,7 +556,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3_beagle_init_early,
-	.init_irq	= omap3_beagle_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= omap3_beagle_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 807c274..fa58a0f 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -428,11 +428,6 @@ static int __init omap3_stalker_i2c_init(void)
 static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
 };
 
-static void __init omap3_stalker_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_stalker_devices[] __initdata = {
 	&keys_gpio,
 };
@@ -492,7 +487,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
 	.boot_params		= 0x80000100,
 	.map_io			= omap3_map_io,
 	.init_early		= omap35xx_init_early,
-	.init_irq		= omap3_stalker_init_irq,
+	.init_irq		= omap3_init_irq,
 	.init_machine		= omap3_stalker_init,
 	.timer			= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index f7f1809..05488fb 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -326,11 +326,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
-static void __init omap3_touchbook_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_touchbook_devices[] __initdata = {
 	&omap3_touchbook_lcd_device,
 	&leds_gpio,
@@ -403,7 +398,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap3_touchbook_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= omap3_touchbook_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* [PATCH] ARM: OMAP2+: Remove custom init_irq for remaining boards
@ 2011-09-26 23:18           ` Tony Lindgren
  0 siblings, 0 replies; 66+ messages in thread
From: Tony Lindgren @ 2011-09-26 23:18 UTC (permalink / raw)
  To: linux-arm-kernel

With SoC specific timers, board specific init_irq is
no longer needed. Earlier this was still needed to
initialize the gptimer12 on Beagle based boards.

Also convert board-h4.c to use omap2_init_irq accidentally
did not get converted earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 4b1f6c6..059b74d 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -397,11 +397,6 @@ static struct platform_device keys_gpio = {
 	},
 };
 
-static void __init devkit8000_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 #define OMAP_DM9000_BASE	0x2c000000
 
 static struct resource omap_dm9000_resources[] = {
@@ -665,7 +660,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
-	.init_irq	= devkit8000_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= devkit8000_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index fcc5107..8486142 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -290,11 +290,6 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
 	{ OMAP_TAG_LCD,		&h4_lcd_config },
 };
 
-static void __init omap_h4_init_irq(void)
-{
-	omap2_init_irq();
-}
-
 static struct at24_platform_data m24c01 = {
 	.byte_len	= SZ_1K / 8,
 	.page_size	= 16,
@@ -375,7 +370,7 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	.reserve	= omap_reserve,
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
-	.init_irq	= omap_h4_init_irq,
+	.init_irq	= omap2_init_irq,
 	.init_machine	= omap_h4_init,
 	.timer		= &omap2_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index ce3234d..e085371 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -449,11 +449,6 @@ static void __init omap3_beagle_init_early(void)
 	omap2_init_common_infrastructure();
 }
 
-static void __init omap3_beagle_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_beagle_devices[] __initdata = {
 	&leds_gpio,
 	&keys_gpio,
@@ -561,7 +556,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3_beagle_init_early,
-	.init_irq	= omap3_beagle_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= omap3_beagle_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 807c274..fa58a0f 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -428,11 +428,6 @@ static int __init omap3_stalker_i2c_init(void)
 static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
 };
 
-static void __init omap3_stalker_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_stalker_devices[] __initdata = {
 	&keys_gpio,
 };
@@ -492,7 +487,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
 	.boot_params		= 0x80000100,
 	.map_io			= omap3_map_io,
 	.init_early		= omap35xx_init_early,
-	.init_irq		= omap3_stalker_init_irq,
+	.init_irq		= omap3_init_irq,
 	.init_machine		= omap3_stalker_init,
 	.timer			= &omap3_secure_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index f7f1809..05488fb 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -326,11 +326,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
-static void __init omap3_touchbook_init_irq(void)
-{
-	omap3_init_irq();
-}
-
 static struct platform_device *omap3_touchbook_devices[] __initdata = {
 	&omap3_touchbook_lcd_device,
 	&leds_gpio,
@@ -403,7 +398,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap3_touchbook_init_irq,
+	.init_irq	= omap3_init_irq,
 	.init_machine	= omap3_touchbook_init,
 	.timer		= &omap3_secure_timer,
 MACHINE_END

^ permalink raw reply related	[flat|nested] 66+ messages in thread

* Re: [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2011-09-23 20:23   ` Benoit Cousson
@ 2012-05-04 15:59     ` Thomas Petazzoni
  -1 siblings, 0 replies; 66+ messages in thread
From: Thomas Petazzoni @ 2012-05-04 15:59 UTC (permalink / raw)
  To: Benoit Cousson
  Cc: tony, grant.likely, khilman, paul, devicetree-discuss, rnayak,
	linux-omap, linux-arm-kernel

Hello Benoit,

Le Fri, 23 Sep 2011 22:23:09 +0200,
Benoit Cousson <b-cousson@ti.com> a écrit :

> Add SoC specific map_io function to be used by the generic DT
> board file. This is an intermediate step before having some
> generic DT aware map_io function.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>

Do you know if some progress has been made on having a generic DT aware
map_io function, or is the per-SoC ->map_io() function still the
recommended way of handling SoC having different requirements of static
mappings at boot time?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2012-05-04 15:59     ` Thomas Petazzoni
  0 siblings, 0 replies; 66+ messages in thread
From: Thomas Petazzoni @ 2012-05-04 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Benoit,

Le Fri, 23 Sep 2011 22:23:09 +0200,
Benoit Cousson <b-cousson@ti.com> a ?crit :

> Add SoC specific map_io function to be used by the generic DT
> board file. This is an intermediate step before having some
> generic DT aware map_io function.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>

Do you know if some progress has been made on having a generic DT aware
map_io function, or is the per-SoC ->map_io() function still the
recommended way of handling SoC having different requirements of static
mappings at boot time?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2012-05-04 15:59     ` Thomas Petazzoni
@ 2012-05-14 15:06       ` Cousson, Benoit
  -1 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2012-05-14 15:06 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: tony, grant.likely, khilman, paul, devicetree-discuss, rnayak,
	linux-omap, linux-arm-kernel

Salut Thomas,

Sorry for the delay.

On 5/4/2012 5:59 PM, Thomas Petazzoni wrote:
> Hello Benoit,
>
> Le Fri, 23 Sep 2011 22:23:09 +0200,
> Benoit Cousson<b-cousson@ti.com>  a écrit :
>
>> Add SoC specific map_io function to be used by the generic DT
>> board file. This is an intermediate step before having some
>> generic DT aware map_io function.
>>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Tony Lindgren<tony@atomide.com>
>
> Do you know if some progress has been made on having a generic DT aware
> map_io function, or is the per-SoC ->map_io() function still the
> recommended way of handling SoC having different requirements of static
> mappings at boot time?

Mmm, Maybe I'm wrong, but I'm not sure people are really pushing to 
store that inside DT. But to be honest, I don't really know :-)

Tony might have some clue.

Regards,
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2012-05-14 15:06       ` Cousson, Benoit
  0 siblings, 0 replies; 66+ messages in thread
From: Cousson, Benoit @ 2012-05-14 15:06 UTC (permalink / raw)
  To: linux-arm-kernel

Salut Thomas,

Sorry for the delay.

On 5/4/2012 5:59 PM, Thomas Petazzoni wrote:
> Hello Benoit,
>
> Le Fri, 23 Sep 2011 22:23:09 +0200,
> Benoit Cousson<b-cousson@ti.com>  a ?crit :
>
>> Add SoC specific map_io function to be used by the generic DT
>> board file. This is an intermediate step before having some
>> generic DT aware map_io function.
>>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Tony Lindgren<tony@atomide.com>
>
> Do you know if some progress has been made on having a generic DT aware
> map_io function, or is the per-SoC ->map_io() function still the
> recommended way of handling SoC having different requirements of static
> mappings at boot time?

Mmm, Maybe I'm wrong, but I'm not sure people are really pushing to 
store that inside DT. But to be honest, I don't really know :-)

Tony might have some clue.

Regards,
Benoit

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
  2012-05-14 15:06       ` Cousson, Benoit
@ 2012-05-14 19:55         ` Nicolas Pitre
  -1 siblings, 0 replies; 66+ messages in thread
From: Nicolas Pitre @ 2012-05-14 19:55 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: Thomas Petazzoni, khilman, devicetree-discuss, linux-omap,
	linux-arm-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1062 bytes --]

On Mon, 14 May 2012, Cousson, Benoit wrote:

> Salut Thomas,
> 
> Sorry for the delay.
> 
> On 5/4/2012 5:59 PM, Thomas Petazzoni wrote:
> > Hello Benoit,
> > 
> > Le Fri, 23 Sep 2011 22:23:09 +0200,
> > Benoit Cousson<b-cousson@ti.com>  a écrit :
> > 
> > > Add SoC specific map_io function to be used by the generic DT
> > > board file. This is an intermediate step before having some
> > > generic DT aware map_io function.
> > > 
> > > Signed-off-by: Benoit Cousson<b-cousson@ti.com>
> > > Cc: Tony Lindgren<tony@atomide.com>
> > 
> > Do you know if some progress has been made on having a generic DT aware
> > map_io function, or is the per-SoC ->map_io() function still the
> > recommended way of handling SoC having different requirements of static
> > mappings at boot time?
> 
> Mmm, Maybe I'm wrong, but I'm not sure people are really pushing to store that
> inside DT. But to be honest, I don't really know :-)

In general, static vs dynamic IO mappings are just some Linux 
implementation details.  This distinction does not belong in DT.


Nicolas

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
@ 2012-05-14 19:55         ` Nicolas Pitre
  0 siblings, 0 replies; 66+ messages in thread
From: Nicolas Pitre @ 2012-05-14 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 14 May 2012, Cousson, Benoit wrote:

> Salut Thomas,
> 
> Sorry for the delay.
> 
> On 5/4/2012 5:59 PM, Thomas Petazzoni wrote:
> > Hello Benoit,
> > 
> > Le Fri, 23 Sep 2011 22:23:09 +0200,
> > Benoit Cousson<b-cousson@ti.com>  a ?crit :
> > 
> > > Add SoC specific map_io function to be used by the generic DT
> > > board file. This is an intermediate step before having some
> > > generic DT aware map_io function.
> > > 
> > > Signed-off-by: Benoit Cousson<b-cousson@ti.com>
> > > Cc: Tony Lindgren<tony@atomide.com>
> > 
> > Do you know if some progress has been made on having a generic DT aware
> > map_io function, or is the per-SoC ->map_io() function still the
> > recommended way of handling SoC having different requirements of static
> > mappings at boot time?
> 
> Mmm, Maybe I'm wrong, but I'm not sure people are really pushing to store that
> inside DT. But to be honest, I don't really know :-)

In general, static vs dynamic IO mappings are just some Linux 
implementation details.  This distinction does not belong in DT.


Nicolas

^ permalink raw reply	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2012-05-14 19:55 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 20:23 [PATCH 00/11] OMAP: Add initial support for DT on OMAP3 & OMAP4 Benoit Cousson
2011-09-23 20:23 ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 01/11] OMAP2+: Add SoC specific map_io functions Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 23:00   ` Tony Lindgren
2011-09-23 23:00     ` Tony Lindgren
2011-09-26 23:15     ` Tony Lindgren
2011-09-26 23:15       ` Tony Lindgren
2011-09-26 23:16       ` [PATCH] ARM: OMAP2+: Use SoC specifc map_io Tony Lindgren
2011-09-26 23:16         ` Tony Lindgren
2011-09-26 23:18         ` [PATCH] ARM: OMAP2+: Remove custom init_irq for remaining boards Tony Lindgren
2011-09-26 23:18           ` Tony Lindgren
2012-05-04 15:59   ` [PATCH 01/11] OMAP2+: Add SoC specific map_io functions Thomas Petazzoni
2012-05-04 15:59     ` Thomas Petazzoni
2012-05-14 15:06     ` Cousson, Benoit
2012-05-14 15:06       ` Cousson, Benoit
2012-05-14 19:55       ` Nicolas Pitre
2012-05-14 19:55         ` Nicolas Pitre
2011-09-23 20:23 ` [PATCH 02/11] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 23:21   ` Grant Likely
2011-09-23 23:21     ` Grant Likely
2011-09-26 12:38     ` Cousson, Benoit
2011-09-26 12:38       ` Cousson, Benoit
2011-09-23 20:23 ` [PATCH 04/11] arm/dts: Add support for OMAP4 SDP board Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 05/11] arm/dts: Add initial device tree support for OMAP3 SoC Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 06/11] arm/dts: Add support for OMAP3 Beagle board Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 23:08   ` Tony Lindgren
2011-09-23 23:08     ` Tony Lindgren
2011-09-26 12:35     ` Cousson, Benoit
2011-09-26 12:35       ` Cousson, Benoit
2011-09-26 21:37       ` Tony Lindgren
2011-09-26 21:37         ` Tony Lindgren
2011-09-26  6:32   ` Rajendra Nayak
2011-09-26  6:32     ` Rajendra Nayak
     [not found]     ` <4E801C62.5020700-l0cyMroinI0@public.gmane.org>
2011-09-26  9:00       ` Cousson, Benoit
2011-09-26  9:00         ` Cousson, Benoit
2011-09-23 20:23 ` [PATCH 08/11] OMAP2+: board-generic: Add i2c static init Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 23:12   ` Tony Lindgren
2011-09-23 23:12     ` Tony Lindgren
2011-09-23 23:47     ` Grant Likely
2011-09-23 23:47       ` Grant Likely
2011-09-26 16:45       ` Tony Lindgren
2011-09-26 16:45         ` Tony Lindgren
2011-09-23 20:23 ` [PATCH 09/11] OMAP2+: l3-noc: Add support for device-tree Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 20:23 ` [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 22:58   ` Tony Lindgren
2011-09-23 22:58     ` Tony Lindgren
2011-09-26 12:13     ` Cousson, Benoit
2011-09-26 12:13       ` Cousson, Benoit
2011-09-26 21:44       ` Tony Lindgren
2011-09-26 21:44         ` Tony Lindgren
2011-09-23 20:23 ` [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes Benoit Cousson
2011-09-23 20:23   ` Benoit Cousson
2011-09-23 23:26   ` Grant Likely
2011-09-23 23:26     ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.