Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
From: Tony Lindgren @ 2011-09-23 22:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-11-git-send-email-b-cousson@ti.com>

* 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

* [GIT PULL] omap cleanup part1 for v3.2 merge window
From: Tony Lindgren @ 2011-09-23 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <87d3et4zj9.fsf@ti.com>

Arnd,

* Kevin Hilman <khilman@ti.com> [110921 09:09]:
> Hi Arnd,
> 
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > On Tuesday 20 September 2011 23:46:11 Arnd Bergmann wrote:
> >
> >> It seems that you replace the #ifdef in the board-flash.c file
> >> with a similar #ifdef in the header that replaces this with an
> >> empty inline function when the object is not built.
> >
> > Found another similar problem over night, presumably in the voltage series:
> >
> 
> Found.  Patch below.
> 
> If this one is OK, I'll push to my for_3.2/voltage-cleanup branch (which
> is already pulled into arm-soc/next/voltage) so just re-pulling will
> pick up the fix.

Arnd, care to pull this in directly from Kevin into voltage branch?
It's available at:

git://gitorious.org/khilman/linux-omap-pm for_3.2/voltage-cleanup

Regards,

Tony


> From 473dc975c3ea468049732155467ff08fe3701f98 Mon Sep 17 00:00:00 2001
> From: Kevin Hilman <khilman@ti.com>
> Date: Wed, 21 Sep 2011 09:24:53 -0700
> Subject: [PATCH] ARM: OMAP: voltage layer present, even when CONFIG_PM=n
> 
> Even when CONFIG_PM=n, we try to scale the boot voltage to a sane,
> known value using OPP table to find matching voltage based on boot
> frequency.  This should be done, even when CONFIG_PM=n to avoid
> mis-configured bootloaders and/or boot voltage assumptions made by
> boot loaders.
> 
> Also fixes various compile problems due to depenencies between voltage
> domain and powerdomain code (also present when CONFIG_PM=n).
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> Compile tested with CONFIG_PM=n
> Applies to arm-soc/next/voltage
> 
>  arch/arm/mach-omap2/Makefile  |    2 --
>  arch/arm/mach-omap2/voltage.h |   14 --------------
>  2 files changed, 0 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 8bd389d..5129785 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -89,7 +89,6 @@ obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cm2xxx_3xxx.o cminst44xx.o \
>  					   vp44xx_data.o
>  
>  # OMAP voltage domains
> -ifeq ($(CONFIG_PM),y)
>  voltagedomain-common			:= voltage.o vc.o vp.o
>  obj-$(CONFIG_ARCH_OMAP2)		+= $(voltagedomain-common) \
>  					   voltagedomains2xxx_data.o
> @@ -97,7 +96,6 @@ obj-$(CONFIG_ARCH_OMAP3)		+= $(voltagedomain-common) \
>  					   voltagedomains3xxx_data.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= $(voltagedomain-common) \
>  					   voltagedomains44xx_data.o
> -endif
>  
>  # OMAP powerdomain framework
>  powerdomain-common			+= powerdomain.o powerdomain-common.o
> diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
> index 4c09809..16a1b09 100644
> --- a/arch/arm/mach-omap2/voltage.h
> +++ b/arch/arm/mach-omap2/voltage.h
> @@ -148,25 +148,11 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
>  		struct omap_volt_data **volt_data);
>  struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
>  		unsigned long volt);
> -#ifdef CONFIG_PM
>  int omap_voltage_register_pmic(struct voltagedomain *voltdm,
>  			       struct omap_voltdm_pmic *pmic);
>  void omap_change_voltscale_method(struct voltagedomain *voltdm,
>  		int voltscale_method);
>  int omap_voltage_late_init(void);
> -#else
> -static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
> -					     struct omap_voltdm_pmic *pmic)
> -{
> -	return -EINVAL;
> -}
> -static inline  void omap_change_voltscale_method(struct voltagedomain *voltdm,
> -		int voltscale_method) {}
> -static inline int omap_voltage_late_init(void)
> -{
> -	return -EINVAL;
> -}
> -#endif
>  
>  extern void omap2xxx_voltagedomains_init(void);
>  extern void omap3xxx_voltagedomains_init(void);
> -- 
> 1.7.6
> 

^ permalink raw reply

* [PATCHv9 00/18] omap PRCM chain handler
From: Valdis.Kletnieks at vt.edu @ 2011-09-23 22:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316781986-30642-1-git-send-email-t-kristo@ti.com>

On Fri, 23 Sep 2011 15:46:08 +0300, Tero Kristo said:
> Following set contains the version 9 of this work. This patch set contains
> a number of patches tagged as 'TEMP', they are only meant for testing
> purposes and to provide proof of concept. Most of the 'TEMP' patches are
> related to UART runtime handling and they will be replaced by work done
> by Govindraj Raja.

What do we do with these TEMP patches if the UART patches don't make the same
merge window, or have other issues?  I'm always leery of "will be replaced"
code, because I've seen too many times when it *didn't* get replaced.

(I really don't care what the 'Plan B' is, as long as we have one...)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110923/48e9cd85/attachment.sig>

^ permalink raw reply

* [GIT PULL] omap cleanup part2 for v3.2 merge window
From: Tony Lindgren @ 2011-09-23 21:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

Please pull omap cleanup branch again from:

git://github.com/tmlind/linux.git cleanup

This contains a fix for earlier cleanup patches and has omap_device
cleanup and PM cleanup merged in.

As some of the later cleanup was based on a -rc6 while the
earlier branch was based on -rc4, the git request pull
against the earlier cleanup produces noise.

So instead, below is a diff to the previous pull request 
against -rc7 that show the incremental changes.

Regards,

Tony


--- /tmp/old	2011-09-23 14:32:54.435085320 -0700
+++ /tmp/new	2011-09-23 14:33:09.163108235 -0700
@@ -4,7 +4,30 @@
 
 are available in the git repository at:
 
-  git://github.com/tmlind/linux.git cleanup-part1
+  git://github.com/tmlind/linux.git cleanup
+
+Grazvydas Ignotas (1):
+      OMAP: omap_device: make latency autoadjust messages debug
+
+Jarkko Nikula (1):
+      omap: mcbsp: Remove omap device API
+
+Johan Hovold (2):
+      OMAP2+: PM: fix typos in misc. comment and error messages
+      OMAP2+: PM: clean up error messages: replace printk with pr_err.
+
+Kevin Hilman (8):
+      OMAP: omap_device: replace debug/warning/error prints with dev_* macros
+      OMAP: omap_device: remove internal functions from omap_device.h
+      OMAP: omap_device: when building return platform_device instead of omap_device
+      OMAP: omap_device: device register functions now take platform_device pointer
+      OMAP: omap_device: _disable_idle_on_suspend() takes platform_device pointer
+      OMAP: omap_device: decouple platform_device from omap_device
+      OMAP3: PM: fix UART handling when using no_console_suspend
+      ARM: 7082/1: platform_device: pdev_archdata: add omap_device pointer
+
+Michael Jones (1):
+      OMAP2: PM debug: remove leftover debug code
 
 Paul Walmsley (12):
       OMAP3: id: remove identification codes that only correspond to marketing names
@@ -20,12 +43,16 @@
       OMAP2+: hwmod: remove OMAP_CHIP*
       OMAP: id: remove OMAP_CHIP declarations, code
 
-Tony Lindgren (4):
+Tony Lindgren (7):
       omap2+: Use Kconfig symbol in Makefile instead of obj-y
       ARM: OMAP: Move omap2_init_common_devices out of init_early
       ARM: OMAP: Introduce SoC specific early_init
       Merge branch 'omap_chip_remove_cleanup_3.2' of git://git.pwsan.com/linux-2.6 into cleanup
+      ARM: OMAP2+: Fix missing inline functions for Makefile cleanup
+      Merge branch 'for_3.2/omap_device' of git://gitorious.org/khilman/linux-omap-pm into cleanup
+      Merge branch 'for_3.2/pm-cleanup' of git://gitorious.org/khilman/linux-omap-pm into cleanup
 
+ arch/arm/include/asm/device.h                    |    5 +
  arch/arm/mach-omap2/Makefile                     |   81 +--
  arch/arm/mach-omap2/board-2430sdp.c              |    9 +-
  arch/arm/mach-omap2/board-3430sdp.c              |    9 +-
@@ -37,6 +64,8 @@
  arch/arm/mach-omap2/board-cm-t35.c               |   13 +-
  arch/arm/mach-omap2/board-cm-t3517.c             |    9 +-
  arch/arm/mach-omap2/board-devkit8000.c           |   12 +-
+ arch/arm/mach-omap2/board-flash.c                |    5 -
+ arch/arm/mach-omap2/board-flash.h                |   19 +
  arch/arm/mach-omap2/board-generic.c              |    2 +-
  arch/arm/mach-omap2/board-h4.c                   |    9 +-
  arch/arm/mach-omap2/board-igep0020.c             |   13 +-
@@ -64,13 +93,24 @@
  arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c |  803 +---------------------
  arch/arm/mach-omap2/clockdomains3xxx_data.c      |  398 +++++++++++
  arch/arm/mach-omap2/clockdomains44xx_data.c      |  409 +++---------
+ arch/arm/mach-omap2/devices.c                    |   44 +-
+ arch/arm/mach-omap2/display.c                    |    6 +-
+ arch/arm/mach-omap2/dma.c                        |   16 +-
+ arch/arm/mach-omap2/gpio.c                       |   10 +-
+ arch/arm/mach-omap2/hsmmc.c                      |    8 +-
+ arch/arm/mach-omap2/hwspinlock.c                 |    8 +-
  arch/arm/mach-omap2/id.c                         |  191 ++----
  arch/arm/mach-omap2/io.c                         |   52 ++-
+ arch/arm/mach-omap2/mcbsp.c                      |    8 +-
  arch/arm/mach-omap2/omap_hwmod.c                 |    3 -
  arch/arm/mach-omap2/omap_hwmod_2420_data.c       |   37 -
  arch/arm/mach-omap2/omap_hwmod_2430_data.c       |   45 --
  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c       |  169 +++---
  arch/arm/mach-omap2/omap_hwmod_44xx_data.c       |   82 ---
+ arch/arm/mach-omap2/opp.c                        |    2 +-
+ arch/arm/mach-omap2/pm.c                         |   30 +-
+ arch/arm/mach-omap2/pm24xx.c                     |   27 -
+ arch/arm/mach-omap2/pm34xx.c                     |    2 +-
  arch/arm/mach-omap2/powerdomain-common.c         |    7 +-
  arch/arm/mach-omap2/powerdomain.c                |   87 ++-
  arch/arm/mach-omap2/powerdomain.h                |    9 +-
@@ -78,12 +118,18 @@
  arch/arm/mach-omap2/powerdomains2xxx_data.c      |   44 +-
  arch/arm/mach-omap2/powerdomains3xxx_data.c      |   81 ++-
  arch/arm/mach-omap2/powerdomains44xx_data.c      |   20 +-
+ arch/arm/mach-omap2/serial.c                     |   14 +-
+ arch/arm/mach-omap2/sr_device.c                  |    6 +-
+ arch/arm/plat-omap/i2c.c                         |    8 +-
  arch/arm/plat-omap/include/plat/clock.h          |    2 -
  arch/arm/plat-omap/include/plat/common.h         |    9 +
  arch/arm/plat-omap/include/plat/cpu.h            |  108 +---
  arch/arm/plat-omap/include/plat/io.h             |    2 +-
+ arch/arm/plat-omap/include/plat/omap_device.h    |   30 +-
  arch/arm/plat-omap/include/plat/omap_hwmod.h     |    2 -
- 57 files changed, 1430 insertions(+), 2036 deletions(-)
+ arch/arm/plat-omap/mcbsp.c                       |   27 -
+ arch/arm/plat-omap/omap_device.c                 |  185 +++---
+ 77 files changed, 1645 insertions(+), 2281 deletions(-)
  create mode 100644 arch/arm/mach-omap2/clockdomains2420_data.c
  create mode 100644 arch/arm/mach-omap2/clockdomains2430_data.c
  create mode 100644 arch/arm/mach-omap2/clockdomains3xxx_data.c

^ permalink raw reply

* [PATCH v2 1/2] ARM: cache-l2x0: remove __init annotation from initialization functions
From: Russell King - ARM Linux @ 2011-09-23 20:55 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAGsJ_4xhQZUKx85+4mZLqFrAF+XmUqZp=VCRYwJyNafTUe814g@mail.gmail.com>

On Mon, Sep 19, 2011 at 01:33:39PM +0800, Barry Song wrote:
> Do you think the following is what you want?

Almost.  A couple of things:

1. Making the variables static means that folk like OMAP can't read the
   values at resume time from their assembly (forcing them to save and
   restore them, rather than using the already saved copy.)

2. It probably makes sense to make a structure out of the saved state
   information so that assembly code doesn't have to individually find
   the address of each variable.  Instead, they can find the address of
   the structure (in physical memory if that's what they need) and use
   offsets.

With (2) its probably worth adding a comment about the structure being
used in platform code and it should only ever be appended to.
(Alternatively, we could use the asm-offsets.h generation stuff to
create preprocessor symbols for the offsets in the struct if we put the
struct in a header file.)

^ permalink raw reply

* [RFC PATCH 11/14] ARM: zynq: convert to CONFIG_MULTI_IRQ_HANDLER
From: John Linn @ 2011-09-23 20:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316796692-15964-12-git-send-email-marc.zyngier@arm.com>

> -----Original Message-----
> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> Sent: Friday, September 23, 2011 10:51 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: John Linn
> Subject: [RFC PATCH 11/14] ARM: zynq: convert to
> CONFIG_MULTI_IRQ_HANDLER
> 
> Convert the zynq platform to be using the gic_handle_irq
> function as its primary interrupt handler.
> 
> Cc: John Linn <john.linn@xilinx.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

It seems like if I see any issues I can always go back to the previous
solution as this is not required for our platform. But it's nice to stay
in sync with everyone else.

Acked-by: John Linn <john.linn@xilinx.com>

Thanks,
John

Please ignore the following legal footer that I'm trying to get taken
off.

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

^ permalink raw reply

* [PATCH v2 2/2] ARM: smp_scu: remove __init annotation from scu_enable()
From: Russell King - ARM Linux @ 2011-09-23 20:49 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110922150359.GB15024@S2100-06.ap.freescale.net>

On Thu, Sep 22, 2011 at 11:04:01PM +0800, Shawn Guo wrote:
> On Sat, Sep 17, 2011 at 04:32:37PM +0800, Shawn Guo wrote:
> > On Tue, Sep 06, 2011 at 01:48:27PM +0800, Shawn Guo wrote:
> > > When Cortex-A9 MPCore resumes from Dormant or Shutdown modes,
> > > SCU needs to be re-enabled.  This patch removes __init annotation
> > > from function scu_enable(), so that platform resume procedure can
> > > call it to re-enable SCU.
> > > 
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > 
> > Hi Russell,
> > 
> > Do you have any comment on this patch?  Can I put it into patch tracker?
> > 
> Ping x 2.
> 
> As imx6q suspend support depends on this patch, I really need to know
> if you will merge it.  Otherwise, I will probably have to copy the code
> into imx6q platform code just like exynos4 is doing.

It's fine.

^ permalink raw reply

* [RFC] Shrink sched_clock some more
From: Russell King - ARM Linux @ 2011-09-23 20:44 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.00.1109221414200.12663@xanadu.home>

On Thu, Sep 22, 2011 at 02:16:59PM -0400, Nicolas Pitre wrote:
> On Thu, 22 Sep 2011, Russell King - ARM Linux wrote:
> 
> > ... by getting rid of the fixed-constant optimization, and moving the
> > update code into arch/arm/kernel/sched_clock.c.
> > 
> > Platforms now only have to supply a function to read the sched_clock
> > register, and some basic information such as the number of significant
> > bits and the tick rate.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Nice.  Too bad for the fixed-constant optimization, but it wasn't used 
> enough to justify the bloat.

It's a shame to see it go - we _could_ work around that without making
anything worse over this code by merely making it an indirect call via
a common sched_clock() in arch/arm/kernel/sched_clock.c - iow:

unsigned long long notrace sched_clock(void)
{
	return real_sched_clock ? real_sched_clock() : 0ULL;
}

We have to have an indirection somewhere to allow the implementations of
the underlying timer to be switched.

However, as you say, there's not enough users of the fixed-constant stuff
to make it worth while keeping.

^ permalink raw reply

* [PATCH 2/7] ARM: SAMSUNG: Add CLK Macro for clkdev support
From: Russell King - ARM Linux @ 2011-09-23 20:26 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316778827-24694-3-git-send-email-padma.v@samsung.com>

On Fri, Sep 23, 2011 at 05:23:42PM +0530, Padmavathi Venna wrote:
> diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h
> index 73c66d4..c864825 100644
> --- a/arch/arm/plat-samsung/include/plat/clock.h
> +++ b/arch/arm/plat-samsung/include/plat/clock.h
> @@ -17,6 +17,13 @@
>  
>  struct clk;
>  
> +#define CLK(dev, con, ck)	\
> +	{			\
> +		.dev_id = dev,	\
> +		.con_id = con,	\
> +		.clk = ck,	\
> +	}
> +

How about a patch series which moves this to include/linux/clkdev.h,
preferably called CLKDEV_INIT() ?

There's versions of this already in:
arch/arm/mach-ux500/clock.h
arch/arm/mach-tegra/tegra2_clocks.c
arch/arm/mach-nomadik/clock.c
arch/arm/mach-davinci/clock.h

so let's have it standardized instead of everyone inventing their own.

(Remember, that's what we're supposed to already being looking out for
since Linus' whinge about how ARM stuff tends to grow out of control...)

^ permalink raw reply

* [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 09/11] OMAP2+: l3-noc: Add support for device-tree
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 06/11] arm/dts: Add support for OMAP3 Beagle board
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 05/11] arm/dts: Add initial device tree support for OMAP3 SoC
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 04/11] arm/dts: Add support for OMAP4 SDP board
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 02/11] arm/dts: Add initial device tree support for OMAP4 SoC
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 01/11] OMAP2+: Add SoC specific map_io functions
From: Benoit Cousson @ 2011-09-23 20:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>

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

* [PATCH 00/11] OMAP: Add initial support for DT on OMAP3 & OMAP4
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

* [RFC PATCH 01/14] ARM: GIC: Add global gic_handle_irq() function
From: Russell King - ARM Linux @ 2011-09-23 20:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316796692-15964-2-git-send-email-marc.zyngier@arm.com>

On Fri, Sep 23, 2011 at 05:51:19PM +0100, Marc Zyngier wrote:
> +		if (irqnr < 16) {
> +			writel_relaxed(irqstat, gic_cpu_base_addr + GIC_CPU_EOI);
> +#ifdef CONFIG_SMP
> +			do_IPI(irqnr, regs);
> +#endif

This doesn't work.  do_IPI is marked as an entry function, and so expects
to be called with the precondition that the pt_regs are stored immediately
above its stack frame, without another function's stack frame in the way.

^ permalink raw reply

* Identifying Primecells
From: Russell King - ARM Linux @ 2011-09-23 19:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAKON4OxHwjrw-dhH2qvXopqUqmKSx2TCPgW4eVHF9dmQO4=Cvw@mail.gmail.com>

On Fri, Sep 23, 2011 at 10:17:32AM -0400, jonsmirl at gmail.com wrote:
> My registers don't seem to match up with the pl011 documentation...
> 
> Table 437. Register overview: UART (register base address 0x1500 1000)
> Name	R/W	Address	Offset		Description
> RBR	R	0x000	Receiver Buffer Register
> THR	W	0x000	Transmitter Holding Register
> DLL	R/W	0x000	Divisor Latch LSB
> DLM	R/W	0x004	Divisor Latch MSB
> IER	R/W	0x004	Interrupt	Enable Register
> IIR	R	0x008	Interrupt	Identification Register
> FCR	W	0x008	FIFO Control Register
> LCR	R/W	0x00C	Line	 Control Register
> MCR	R/W	0x010	Modem Control Register
> LSR	R	0x014	Line Status Register
> MSR	R	0x018	Modem Status Register
> SCR	R/W	0x01C			Scratch Register

This looks like an 8250 like clone.  You might be about to get away
with using a platform device for the 8250 driver specifying an io
shift of 2, base address 0x15001000.

What worries me is the extra registers below, and whether they need to
be programmed to something at runtime (rather than just being able to
rely on the standard 8250 register set.)

> -	-	0x020			Reserved
> ICR	R/W	0x024	IrDA	 Control Register
> FDR	R/W	0x028	Fractional Divider Register
> -	-	0x02C	Reserved
> POP	W	0x030	NHP Pop Register
> MODE	R/W	0x034	NHP Mode Selection Register
> -	-	0x038-0xFD4	Reserved
> INTCE	W	0xFD8	Interrupt	Clear Enable Register
> INTSE	W	0xFDC	Interrupt	Set Enable Register
> INTS	R	0xFE0	Interrupt	Status Register
> INTE	R	0xFE4	Interrupt	Enable Register

^ permalink raw reply

* I-cache/D-cache inconsistency issue with page cache
From: Russell King - ARM Linux @ 2011-09-23 19:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110923115721.GA7013@glandium.org>

On Fri, Sep 23, 2011 at 01:57:21PM +0200, Mike Hommey wrote:
> We've been hitting random crashes at startup with Firefox on tegras
> (under Android), and narrowed it down to a I-cache/D-cache
> inconsistency. A reduced testcase of the issue looks like the following
> (compile as ARM, not Thumb):

If you write code at run time, you need to use the sys_cacheflush
API to ensure that it's properly synchronized with the I-cache.  It's
a well known issue, and it applies to any harvard cache structured
CPU which doesn't automatically ensure coherence (which essentially
means all ARMs.)

^ permalink raw reply

* Identifying Primecells
From: jonsmirl at gmail.com @ 2011-09-23 19:11 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1316787754.4611.925.camel@hornet.cambridge.arm.com>

On Fri, Sep 23, 2011 at 10:22 AM, Pawel Moll <pawel.moll@arm.com> wrote:
>> My registers don't seem to match up with the pl011 documentation...
> <...>
>> INTCE W ? ? ? 0xFD8 ? Interrupt ? ? ? Clear Enable Register
>> INTSE W ? ? ? 0xFDC ? Interrupt ? ? ? Set Enable Register
>> INTS ?R ? ? ? 0xFE0 ? Interrupt ? ? ? Status Register
>> INTE ?R ? ? ? 0xFE4 ? Interrupt ? ? ? Enable Register
>
> ... nor any other PrimeCell, actually :-)
>
> "Compliant" PrimeCells must have the PCellID in the last 4 registers:

I scanned though 0xff0/f for all of the devices. The only one that had
anything that makes sense is the Multiport Memory Controller -
0xb105f00d

So it looks like NXP made almost all of their own peripherals. Which
means I have to clean up the drivers for all of them.


> http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183g/I54776.html
>
> * base + 0xff0 = 0x0d
> * base + 0xff4 = 0xf0
> * base + 0xff8 = 0x05
> * base + 0xffc = 0xb1
>
> Cheers!
>
> Pawe?
>
>
>



-- 
Jon Smirl
jonsmirl at gmail.com

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox