Re: RFC: ARM Boot standard for passing device tree blob

2010-03-26 Thread Russell King - ARM Linux
On Fri, Mar 26, 2010 at 07:43:20AM -1000, Mitch Bradley wrote: What is the reason for turning off the data caches? Leaving all caches turned on and coherent with one another has always worked well for me at the interface from firmware to a booted program. With the data caches on, you need

Re: Request review of device tree documentation

2010-06-14 Thread Russell King - ARM Linux
On Sun, Jun 13, 2010 at 11:23:45PM -0600, Grant Likely wrote: Or perhaps the MMU and caches can be turned off for the duration of the callback. I don't have the details of ARM MMUs and caches reloaded into my head yet.  Maybe next week... We've had these kinds of questions in the past.

Re: Request review of device tree documentation

2010-06-14 Thread Russell King - ARM Linux
On Sun, Jun 13, 2010 at 09:45:50PM -1000, Mitch Bradley wrote: None of this is a deal-breaker for the kind of debugging tasks that are the primary use case for the callback. Would you mind explaining what kind of tasks these callbacks will be used for?

Re: Request review of device tree documentation

2010-06-14 Thread Russell King - ARM Linux
On Mon, Jun 14, 2010 at 07:36:10PM +1000, Benjamin Herrenschmidt wrote: However, there's a lot of room for abuse here and I'm worried that if it becomes widespread, we'll start seeing vendors use that as a way to do some kind of HAL and hide various platform methods in there (clock control,

Re: Platform data with function pointers

2010-06-18 Thread Russell King - ARM Linux
On Fri, Jun 18, 2010 at 01:47:28PM +0100, Lorenzo Pieralisi wrote: I think chip-select addressing should be used if that is the way HW handles it. If the device is described through a memory-mapping, ex. snippet follows: ser...@101f2000 { compatible = arm,pl011; reg =

Re: [PATCH] ARM: map ATAGs when not in first 1MB of RAM

2011-01-27 Thread Russell King - ARM Linux
On Thu, Jan 27, 2011 at 09:50:43AM -0600, Rob Herring wrote: + /* + * Otherwise map the 1MB region r2 points to (atags or dtb) + */ +1: mov r0, r2, lsr #20 + mov r0, r0, lsl #20 + sub r3, r0, #(PHYS_OFFSET 0xff00) + .if (PHYS_OFFSET

Re: [PATCH] ARM: map ATAGs when not in first 1MB of RAM

2011-01-27 Thread Russell King - ARM Linux
On Thu, Jan 27, 2011 at 11:41:30AM -0600, Rob Herring wrote: Russell, On 01/27/2011 10:31 AM, Russell King - ARM Linux wrote: On Thu, Jan 27, 2011 at 09:50:43AM -0600, Rob Herring wrote: + /* +* Otherwise map the 1MB region r2 points to (atags or dtb) +*/ +1: mov r0, r2, lsr

Re: [PATCH v2] ARM: map ATAGs when not in first 1MB of RAM

2011-01-28 Thread Russell King - ARM Linux
On Fri, Jan 28, 2011 at 08:00:46AM -0600, Rob Herring wrote: @@ -206,11 +206,17 @@ __create_page_tables: #endif /* - * Then map first 1MB of ram in case it contains our boot params. + * Then map boot params address in r2 or + * the first 1MB of ram if boot params

Re: [PATCHv3] ARM:boot:device tree: Allow the device tree binary to be appended to zImage

2011-04-29 Thread Russell King - ARM Linux
On Fri, Apr 29, 2011 at 09:16:39AM -0400, Nicolas Pitre wrote: On Fri, 29 Apr 2011, Tony Lindgren wrote: If the compressed image is smaller than BSS, then we end up having DT data in the BSS area. In this case the compressed image is about 2.3 MB for LZMA. The uncompress code does

Re: [RFC PATCH 4/4] ARM: Xilinx: Adding Xilinx board support

2011-05-02 Thread Russell King - ARM Linux
On Mon, May 02, 2011 at 09:50:11PM +, johnl...@comcast.net wrote: Seems easy enough assuming we don't need the SCU early for the core count and can get that from the device tree. Beware. Things may not be that trivial when you start considering some of the weirdnesses that some vendors

Re: [RFC PATCH 4/4] ARM: Xilinx: Adding Xilinx board support

2011-05-03 Thread Russell King - ARM Linux
On Tue, May 03, 2011 at 09:58:14AM +0200, Arnd Bergmann wrote: On Tuesday 03 May 2011 01:01:18 Russell King - ARM Linux wrote: It is preferable to use the same mapping, as it ensures that you're not going to create incompatible aliases. Is aliasing a problem for MMIO mappings? I would

Re: device_tree binding for amba bus

2011-05-17 Thread Russell King - ARM Linux
On Tue, May 17, 2011 at 05:05:12PM -0700, Stephen Neuendorffer wrote: In drivers/amba/bus.c: static int amba_get_enable_pclk(struct amba_device *pcdev) { struct clk *pclk = clk_get(pcdev-dev, apb_pclk); static int amba_get_enable_vcore(struct amba_device *pcdev) { struct

Re: [PATCH 2/2] drivers/amba: probe via device tree

2011-05-21 Thread Russell King - ARM Linux
On Sat, May 21, 2011 at 11:42:34AM -0600, Grant Likely wrote: Russell, it seems to me that the primary behaviour that amba_bus has over platform_bus is the clock management, and secondarily verification of the type of device by the device id. Am I correct, or am I missing something? It

Re: [PATCH 2/2] drivers/amba: probe via device tree

2011-05-23 Thread Russell King - ARM Linux
On Mon, May 23, 2011 at 08:00:15AM -0700, Stephen Neuendorffer wrote: To be specific (whether this is 'to shreds' or not, you can decide). 1. amba_bus expects the old ARM primcell ID. The one in the new A9 IP appears to be different. (b105900d instead of b105f00d) Ok, so we can update to

Re: [RFC 1/2] ARM:Tegra: Device Tree Support: Initialize the audio card from the device tree.

2011-06-02 Thread Russell King - ARM Linux
On Thu, Jun 02, 2011 at 10:04:45AM -0600, Grant Likely wrote: Right now we can't do dynamic registration for on-chip devices in a lot of cases because we don't have the infrastructure to hook up the associated struct clks. I've been wondering about this, and I don't see it as a blocking

Re: [RFC 1/2] ARM:Tegra: Device Tree Support: Initialize the audio card from the device tree.

2011-06-02 Thread Russell King - ARM Linux
On Fri, Jun 03, 2011 at 12:21:50AM +0800, Barry Song wrote: Arnd has required me to use device tree in our new SoC for the coming upstream. so i am trying to define a property like clock = uart in dts. then in drivers, i get this string by: clk = of_get_property(np, clock, NULL); then

Re: [RFC 1/2] ARM:Tegra: Device Tree Support: Initialize the audio card from the device tree.

2011-06-03 Thread Russell King - ARM Linux
On Fri, Jun 03, 2011 at 10:32:52AM +0800, Barry Song wrote: but there is really no an unified rule by now, for exmaple, samsung just required platform device names matched with the string parameter to get a clock. it looks like clk_get in plat-samsung depends on the string more than device

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 02:06:37AM -0400, Nicolas Pitre wrote: This is a resend of those patches with fixups after the latest changes in mainline. [PATCH 1/3] ARM: zImage: ensure it is always a multiple of 64 bits in size This one is new and trivial. [PATCH 2/3] ARM: zImage: Allow the

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 04:34:15PM +0800, Shawn Guo wrote: On Sun, Jun 12, 2011 at 09:15:41AM +0100, Russell King - ARM Linux wrote: On Sun, Jun 12, 2011 at 02:06:37AM -0400, Nicolas Pitre wrote: This is a resend of those patches with fixups after the latest changes in mainline

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 06:42:16PM +0800, Shawn Guo wrote: On Sun, Jun 12, 2011 at 10:52:17AM +0100, Russell King - ARM Linux wrote: On Sun, Jun 12, 2011 at 05:38:23PM +0800, Shawn Guo wrote: On Sun, Jun 12, 2011 at 10:21:31AM +0100, Russell King - ARM Linux wrote: What if your platform

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 01:22:19PM +0200, Petr Štetiar wrote: Shawn Guo shawn@freescale.com [2011-06-12 16:34:15]: On Sun, Jun 12, 2011 at 09:15:41AM +0100, Russell King - ARM Linux wrote: One thing which has been bugging me for some time is that the DT stuff completely

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 04:15:23PM +0200, Arnd Bergmann wrote: On Sunday 12 June 2011 13:58:20 Russell King - ARM Linux wrote: Exactly my point - I have quite a number of platforms here which will never be able to have a boot loader capable of modifying a DT blob for the kernel. One

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 08:57:51AM -0600, Grant Likely wrote: On Sun, Jun 12, 2011 at 04:15:23PM +0200, Arnd Bergmann wrote: But when you have both atag and DT and the atag overrides the DT, that means we have incorrect information in the DT, and code might later rely on that information.

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 05:01:22PM +0200, Arnd Bergmann wrote: Of course it should override the device tree, I'm not arguing that. All I'm saying is that we don't need to special-case this or support both formats once the kernel is there as long as we move the information into appropriate

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-12 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 11:47:59AM -0400, Nicolas Pitre wrote: On Sun, 12 Jun 2011, Russell King - ARM Linux wrote: And we've ended up with a fucked up situation which is extremely fragile, and actually makes me _NOT_ want to convert any existing platforms to use DT in the least. Agreed

Re: [PATCH 1/3] ARM: zImage: ensure it is always a multiple of 64 bits in size

2011-06-13 Thread Russell King - ARM Linux
On Sun, Jun 12, 2011 at 02:06:38AM -0400, Nicolas Pitre wrote: diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.in index ea80abe..6c02db1 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.in +++ b/arch/arm/boot/compressed/vmlinux.lds.in @@ -47,6

Re: [PATCH 2/3] ARM: zImage: Allow the appending of a device tree binary

2011-06-13 Thread Russell King - ARM Linux
On Mon, Jun 13, 2011 at 03:46:49AM -0700, Tony Lindgren wrote: * Nicolas Pitre nicolas.pi...@linaro.org [110611 23:03]: From: John Bonesio bo...@secretlab.ca This patch provides the ability to boot using a device tree that is appended to the raw binary zImage (e.g. cat zImage

Re: [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

2011-06-13 Thread Russell King - ARM Linux
On Mon, Jun 13, 2011 at 10:14:07AM -0400, Nicolas Pitre wrote: On Mon, 13 Jun 2011, Tony Lindgren wrote: * Nicolas Pitre nicolas.pi...@linaro.org [110612 11:55]: On Sun, 12 Jun 2011, Russell King - ARM Linux wrote: I don't see this as a sustainable way forward. If we're going

Re: [PATCH 2/3] ARM: gic: add OF based initialization

2011-06-13 Thread Russell King - ARM Linux
On Mon, Jun 13, 2011 at 10:53:16AM -0600, Grant Likely wrote: On Tue, Jun 07, 2011 at 09:22:20AM -0500, Rob Herring wrote: +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source.

Re: [PATCH v2] ARM: CSR: Adding CSR SiRFprimaII board support

2011-07-02 Thread Russell King - ARM Linux
On Fri, Jul 01, 2011 at 06:19:43PM +0200, Arnd Bergmann wrote: On Friday 01 July 2011, Barry Song wrote: It looks like we can new a common function named as of_io_earlymap() or something in drivers/of/address.c. of_iomap() does ioremap, of_io_earlymap() does early static mapping? Then all

Re: [PATCH 1/2] Input: gpio-keys: do not reference platform_data after .probe exits

2011-07-19 Thread Russell King - ARM Linux
On Tue, Jul 19, 2011 at 09:17:26AM +0800, Shawn Guo wrote: On Mon, Jul 18, 2011 at 10:02:44AM -0700, Dmitry Torokhov wrote: On Monday, July 18, 2011 09:45:07 AM Shawn Guo wrote: The patch makes a copy of platform data into driver data, so that any reference to platform_data after .probe

Re: [PATCH 4/7] tty: serial: support device tree in pxa

2011-07-19 Thread Russell King - ARM Linux
On Tue, Jul 19, 2011 at 01:53:53PM -0600, Grant Likely wrote: On Tue, Jul 19, 2011 at 1:48 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 19 July 2011 13:40:10 Grant Likely wrote: On Tue, Jul 19, 2011 at 10:24:47AM +0800, Haojian Zhuang wrote: Support both normal platform driver and

Re: [RFC/PATCH 2/7] OMAP3: beagle: don't touch omap_device internals

2011-07-28 Thread Russell King - ARM Linux
On Thu, Jul 28, 2011 at 12:53:47AM -0500, Nishanth Menon wrote: +struct device *omap_hwmod_to_device(const char *oh_name) +{ + struct omap_hwmod *oh; + + if (!oh_name) { + WARN(1, %s: no hwmod name!\n, __func__); + return ERR_PTR(-EINVAL); + } + +

Re: [PATCH v2 4/7] tty: serial: support device tree in pxa

2011-07-29 Thread Russell King - ARM Linux
On Fri, Jul 29, 2011 at 10:45:39AM -0600, Grant Likely wrote: On Thu, Jul 28, 2011 at 02:41:30PM +0800, Haojian Zhuang wrote: +#ifdef CONFIG_OF + for (i = 0; i PXA_SERIAL_NR; i++) { + if (serial_pxa_ports[i] == NULL) + break; + } + if (i =

Re: [PATCH v2 6/7] i2c: pxa: support i2c controller from DT

2011-07-29 Thread Russell King - ARM Linux
On Fri, Jul 29, 2011 at 10:52:22AM -0600, Grant Likely wrote: On Thu, Jul 28, 2011 at 02:41:32PM +0800, Haojian Zhuang wrote: - /* -* If dev-id is negative we consider it as zero. -* The reason to do so is to avoid sysfs names that only make -* sense when there are multiple

Re: [RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device

2011-07-30 Thread Russell King - ARM Linux
On Thu, Jul 21, 2011 at 04:52:18PM -0700, Kevin Hilman wrote: Rather than embedding a struct platform_device inside a struct omap_device, decouple them, leaving only a pointer to the platform_device inside the omap_device. This patch uses devres to allocate and attach the omap_device to the

Re: [PATCH v2 6/7] i2c: pxa: support i2c controller from DT

2011-07-30 Thread Russell King - ARM Linux
On Sat, Jul 30, 2011 at 04:29:50AM -1000, Mitch Bradley wrote: On 7/29/2011 6:55 AM, Russell King - ARM Linux wrote: On Fri, Jul 29, 2011 at 10:52:22AM -0600, Grant Likely wrote: On Thu, Jul 28, 2011 at 02:41:32PM +0800, Haojian Zhuang wrote: - /* - * If dev-id is negative we consider

Re: [RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device

2011-07-31 Thread Russell King - ARM Linux
On Sat, Jul 30, 2011 at 08:58:07PM -0600, Grant Likely wrote: On Sat, Jul 30, 2011 at 01:03:32PM +0100, Russell King - ARM Linux wrote: On Thu, Jul 21, 2011 at 04:52:18PM -0700, Kevin Hilman wrote: Rather than embedding a struct platform_device inside a struct omap_device, decouple them

Re: [PATCH v2 1/7] ARM: mmp: parse irq from DT

2011-08-01 Thread Russell King - ARM Linux
On Thu, Jul 28, 2011 at 02:41:27PM +0800, Haojian Zhuang wrote: + unsigned int status, mask, irq_base, nr, data; + int cascade; + ... + mux_info = kzalloc(sizeof(*mux_info), GFP_KERNEL); + if (mux_info == NULL) + goto out; +

Re: [PATCH v2 4/7] tty: serial: support device tree in pxa

2011-08-01 Thread Russell King - ARM Linux
On Mon, Aug 01, 2011 at 10:50:47AM +0800, Haojian Zhuang wrote: On Sat, Jul 30, 2011 at 12:49 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: Oh ffs, why is this DT stuff causing all the clk stuff to have to change. And specifically why is stuff converting to use clk_get_sys

Re: [RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device

2011-08-01 Thread Russell King - ARM Linux
On Tue, Aug 02, 2011 at 01:55:55AM +0300, Felipe Balbi wrote: Hi, On Mon, Aug 01, 2011 at 03:11:57PM -0700, Kevin Hilman wrote: Russell King - ARM Linux li...@arm.linux.org.uk writes: Help the typechecker do its job. As we have only one (at the moment...) And make it: +struct

Re: [PATCH 1/2] arm/mx5: parse iomuxc pad configuratoin from device tree

2011-08-07 Thread Russell King - ARM Linux
On Fri, Aug 05, 2011 at 01:36:56PM -0500, Matt Sealey wrote: On Fri, Aug 5, 2011 at 2:07 AM, David Brown dav...@codeaurora.org wrote: On Thu, Aug 04, 2011 at 06:07:15PM -0500, Matt Sealey wrote: Hi Grant, Shawn, On Mon, Jul 25, 2011 at 3:46 PM, Grant Likely grant.lik...@secretlab.ca

Re: How to handle named resources with DT?

2011-08-09 Thread Russell King - ARM Linux
On Tue, Aug 09, 2011 at 11:23:20AM +0200, Cousson, Benoit wrote: Hi Grant, Trying to bind hwmod informations with DT, I'm facing a little limitation. A bunch of drivers are using the platform_get_resource_byname, so the name for the resource is needed. The name is used so far for

Re: Subject: L2x0 OF properties do not include interrupt #

2011-08-12 Thread Russell King - ARM Linux
On Thu, Aug 11, 2011 at 11:06:23AM -0500, Rob Herring wrote: No, either you have 1 interrupt and it is the combined one. or you have the 9? separate interrupts. Having both combined and separate hooked up is a bit dumb, so I would not worry about that case. I would just define the event

Re: How to handle named resources with DT?

2011-08-25 Thread Russell King - ARM Linux
On Thu, Aug 25, 2011 at 02:16:14AM +0300, Felipe Balbi wrote: on top of all that, for IPs which are used on many SoCs (such as MUSB) it's quite silly to force all users to provide resources in a certain order. It sounds to me that this will be prone to error in many ways until everything is

Re: [PATCH 4/6] DMA: PL330: Add device tree support

2011-08-26 Thread Russell King - ARM Linux
On Fri, Aug 26, 2011 at 08:16:11AM -0500, Rob Herring wrote: Thomas, On 08/26/2011 03:40 AM, Thomas Abraham wrote: + - arm,pl330-peri-reqs: number of actual peripheral requests connected to the +dma controller. Maximum value is 32. Perhaps could be a bitmask for sparsely

Re: How to handle named resources with DT?

2011-08-28 Thread Russell King - ARM Linux
On Sun, Aug 28, 2011 at 05:06:43PM -0600, Paul Walmsley wrote: DMA resource data are usually DMA request line ID numbers. Not always. On ARMs development platforms, we ended up using strings - because we've ended up with a DMA controller with N request signals, where the first three request

Re: [PATCH 6/7] OMAP3: board-dt: Add generic board file for DT support

2011-09-02 Thread Russell King - ARM Linux
On Fri, Sep 02, 2011 at 10:46:56AM +0200, Cousson, Benoit wrote: Now, that kernel.org is back, I'll pull you branches :-). Umm. Are you sure? What are you checking - that some kernel.org servers are reachable or that master.kernel.org is reachable (it isn't.)

Re: [PATCH 5/5] ARM: gic: add OF based initialization

2011-09-15 Thread Russell King - ARM Linux
On Thu, Sep 15, 2011 at 12:07:25PM +0200, Cousson, Benoit wrote: On OMAP4 the SoC interrupts external to the MPU (SPI) have an offset of 32. Only the internal PPI are between 0 and 31. SGIs are 0 to 15, PPIs are 16 to 31, and SPIs are 32+ - that's the numbering given to us by the GIC. The

Re: [PATCH 5/5] ARM: gic: add OF based initialization

2011-09-15 Thread Russell King - ARM Linux
On Thu, Sep 15, 2011 at 02:28:06PM +0200, Cousson, Benoit wrote: The HW specs is obviously counting the IRQ number at the GIC interface. That offset is not known outside the MPUSS. Please have a look at the OMAP4430 TRM p4761 (NDA vM version). As far as I know, I have no access to that.

Re: [PATCH] pata-generic/of: Make probing via device tree non-powerpc-specific

2011-09-16 Thread Russell King - ARM Linux
On Fri, Sep 16, 2011 at 03:38:10PM +0100, Dave Martin wrote: This patch enables device-tree-based probing of the pata-generic platform driver across all architectures: * make the pata_of_generic module depend on OF instead of PPC_OF; * supply some missing inclues; * replace

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Russell King - ARM Linux
On Fri, Sep 09, 2011 at 01:02:19AM -0700, Allen Martin wrote: +#ifdef CONFIG_ARCH_TEGRA_2x_SOC +# ifdef SOC_NAME +# undef MULTI_SOC +# define MULTI_SOC +# else +# define SOC_NAME tegra2 +# endif +#endif +#ifdef CONFIG_ARCH_TEGRA_3x_SOC +# ifdef SOC_NAME +# undef MULTI_SOC +#

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Russell King - ARM Linux
On Sat, Sep 17, 2011 at 12:34:57PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 11:28 Sat 17 Sep , Russell King - ARM Linux wrote: One last point to raise here is - and it's quite a fundamental one - do we really want this? If we're making decisions based on the SoC type

Re: [PATCH 4/5] ARM: gic: allow irq_start to be 0

2011-09-18 Thread Russell King - ARM Linux
On Wed, Sep 14, 2011 at 11:31:39AM -0500, Rob Herring wrote: From: Rob Herring rob.herr...@calxeda.com There's really no need to set irq_start per platform for the primary gic. The SGIs and PPIs are not handled as normal irqs, so how irqs 0-31 are setup doesn't really matter. So allow

Re: [PATCH 5/5] ARM: gic: add OF based initialization

2011-09-19 Thread Russell King - ARM Linux
On Mon, Sep 19, 2011 at 11:47:18AM +0200, Cousson, Benoit wrote: Since the cpumask is not relevant for the SPI, maybe having two interrupt controllers will be more relevant. Or maybe 3, since there is some SGIs as well. I don't think anyone uses SGIs outside of the common SMP code.

Re: [PATCH 5/5] ARM: gic: add OF based initialization

2011-09-19 Thread Russell King - ARM Linux
On Mon, Sep 19, 2011 at 02:09:46PM +0200, Cousson, Benoit wrote: Every CortexA9 based SoC have to add the 32 offset to the SoC level interrupt number line. The ID numbering scheme is relevant only inside the GIC, but at SoC level only the IRQ lines that entered the MP core are relevant. That

Re: [PATCH V2] AT91: dt: at91sam9g45 family and board device tree files

2011-10-03 Thread Russell King - ARM Linux
On Mon, Oct 03, 2011 at 12:00:56PM +0200, Nicolas Ferre wrote: diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c new file mode 100644 index 000..7bcb9a9 --- /dev/null +++ b/arch/arm/mach-at91/board-dt.c @@ -0,0 +1,122 @@ +/* + * Setup code for AT91SAM

Re: [PATCH 2/9] regulator: helper routine to extract regulator_init_data

2011-10-04 Thread Russell King - ARM Linux
On Tue, Sep 27, 2011 at 01:10:04PM +0100, Mark Brown wrote: On Tue, Sep 27, 2011 at 03:42:45PM +0530, Rajendra Nayak wrote: + init_data = devm_kzalloc(dev, sizeof(struct regulator_init_data), +GFP_KERNEL); + if (!init_data) +

Re: [PATCH 1/2] arm: samsung: move timer irq numbers to end of linux irq space

2011-10-06 Thread Russell King - ARM Linux
On Fri, Oct 07, 2011 at 02:41:42AM +0530, Thomas Abraham wrote: All of Samsung's s5p platforms have timer irqs statically mapped from linux irq numbers 11 to 15. These timer irqs are moved to end of the statically mapped linux irq space and the hardware irqs, which were statically mapped

Re: [PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler

2011-11-03 Thread Russell King - ARM Linux
On Thu, Nov 03, 2011 at 01:29:08PM +0100, Linus Walleij wrote: No, if we receive another IRQ *after* the read of the register was the question, right? Just replace stat = ~(1 irq); with a second stat = readl_relaxed(vic-base + VIC_IRQ_STATUS); It'll work just fine, the IRQ line

Re: [PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler

2011-11-03 Thread Russell King - ARM Linux
On Thu, Nov 03, 2011 at 02:00:15PM +0100, Linus Walleij wrote: On Thu, Nov 3, 2011 at 1:51 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote:        stat = readl_relaxed(vic-base + VIC_IRQ_STATUS);        while (stat) {                while (stat) {                        irq

Re: [PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler

2011-11-03 Thread Russell King - ARM Linux
On Thu, Nov 03, 2011 at 03:03:37PM +, Jamie Iles wrote: On Thu, Nov 03, 2011 at 01:31:02PM +, Russell King - ARM Linux wrote: On Thu, Nov 03, 2011 at 02:00:15PM +0100, Linus Walleij wrote: On Thu, Nov 3, 2011 at 1:51 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote

Re: [PATCH 2/5] ARM: vexpress: Remove platform SMP functions from ct_desc

2011-11-17 Thread Russell King - ARM Linux
On Fri, Nov 11, 2011 at 06:27:03PM +, Pawel Moll wrote: This patch removes platform SMP callbacks from ct_desc struct and replaces them with global symbols in preparation for DT-based support code. Will and myself discussed how to do this, and we came up with the ct_desc solution. Now

Re: [PATCH 1/5] ARM: vexpress: Get rid of MMIO_P2V

2011-11-17 Thread Russell King - ARM Linux
On Fri, Nov 11, 2011 at 06:27:02PM +, Pawel Moll wrote: @@ -17,3 +14,12 @@ struct amba_device name##_device = { \ .irq= IRQ_##base, \ /* .dma = DMA_##base,*/ \ } + +/* 2MB large area for motherboard's peripherals static

Re: [PATCH 3/5] ARM: vexpress: Add DT support in v2m

2011-11-17 Thread Russell King - ARM Linux
On Wed, Nov 16, 2011 at 05:07:51PM +, Pawel Moll wrote: On Wed, 2011-11-16 at 16:59 +, Rob Herring wrote: It has nothing to do with taste and obviously documentation changes over time. I'm going to start naming everything with legacy because someday it all will be... It's about

Re: [PATCH 3/5] ARM: vexpress: Add DT support in v2m

2011-11-17 Thread Russell King - ARM Linux
On Fri, Nov 11, 2011 at 06:27:04PM +, Pawel Moll wrote: +#if defined(CONFIG_ARCH_VEXPRESS_DT) + int err; + const char *path; + struct device_node *node; + + node = of_find_compatible_node(NULL, NULL, arm,sp810); +

Re: [PATCH 04/10] arm/tegra: prepare early init for multiple tegra variants

2011-11-17 Thread Russell King - ARM Linux
On Thu, Nov 17, 2011 at 06:19:18PM +0200, Peter De Schrijver wrote: This patch splits the early init code in a common and a tegra20 specific part. L2 cache initialization is generalized and discovers the cache associativity at runtime. Also use arm_pm_restart instead of arm_arch_reset and reset

Re: [PATCH 1/5] ARM: vexpress: Get rid of MMIO_P2V

2011-11-18 Thread Russell King - ARM Linux
On Fri, Nov 18, 2011 at 12:20:48PM +, Pawel Moll wrote: On Thu, 2011-11-17 at 15:43 +, Russell King - ARM Linux wrote: +/* Tile's peripherals static mappings should start here */ +#define V2T_PERIPH 0xf820 +#define V2T_PERIPH_P2V(offset) ((void __iomem *)(V2T_PERIPH | (offset

Re: [PATCH 3/5] ARM: vexpress: Add DT support in v2m

2011-11-18 Thread Russell King - ARM Linux
On Fri, Nov 18, 2011 at 12:20:49PM +, Pawel Moll wrote: On Thu, 2011-11-17 at 15:53 +, Russell King - ARM Linux wrote: Again, this is _not_ how DT is supposed to work. DT is about describing the hardware, not describing the state of something. And that's exactly what I

Re: [PATCH 3/5] ARM: vexpress: Add DT support in v2m

2011-11-18 Thread Russell King - ARM Linux
On Thu, Nov 17, 2011 at 06:37:26PM +, Dave Martin wrote: On Thu, Nov 17, 2011 at 04:05:37PM +, Russell King - ARM Linux wrote: You do understand that system_rev is for the system _revision_ not for some kind of system ID. For example, it's to identify whether we're on a revision 4

Re: [PATCH 4/5] ARM: vexpress: Initial RS1 memory map support

2011-11-18 Thread Russell King - ARM Linux
On Fri, Nov 18, 2011 at 12:20:50PM +, Pawel Moll wrote: On Thu, 2011-11-17 at 15:36 +, Russell King - ARM Linux wrote: You do know that this will probably cause uboot to load the uImage at 0x80008000 instead of 0x60008000, and therefore we'll lose half the RAM on this board? I

Re: [PATCH v2 1/4] ARM: vexpress: Get rid of MMIO_P2V

2011-11-28 Thread Russell King - ARM Linux
On Fri, Nov 25, 2011 at 04:15:00PM +, Dave Martin wrote: diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S index d397a1f..0be2efc 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/plat-versatile/headsmp.S @@ -28,6 +28,7 @@

Re: [PATCH v3 4/5] ARM: vexpress: Initial RS1 memory map support

2011-11-30 Thread Russell King - ARM Linux
On Wed, Nov 30, 2011 at 04:38:26PM -0500, Nicolas Pitre wrote: On Wed, 30 Nov 2011, Mark Brown wrote: On Wed, Nov 30, 2011 at 03:43:50PM -0500, Nicolas Pitre wrote: annoying. If nothing moves I might just go ahead with those changes and simply rip the uImage make target out of the

Re: [PATCH v3 4/5] ARM: vexpress: Initial RS1 memory map support

2011-12-01 Thread Russell King - ARM Linux
On Thu, Dec 01, 2011 at 11:10:50AM +, Mark Brown wrote: On Wed, Nov 30, 2011 at 04:38:26PM -0500, Nicolas Pitre wrote: On Wed, 30 Nov 2011, Mark Brown wrote: Oh, dear. Any pointers to the discussions on the u-boot side? Certainly. Many different threads actually. Here's a few:

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 09:37:09AM +, Dave Martin wrote: To clarify, you're suggesting that the meanings of all other IRQ values would not change initially? (i.e., we remap HW irq 0, if there is one, to some other random number but have a 1:1 mapping for everything else). Even better.

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 09:30:00AM +, Dave Martin wrote: Do we expect there to be any platform drivers which are shared between legacy platforms and newer DT-ised platforms? Those drivers would be pain points since they would need to understand both conventions. So far as I can see,

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 12:00:12PM +0100, Geert Uytterhoeven wrote: On Tue, Dec 6, 2011 at 11:46, Russell King - ARM Linux li...@arm.linux.org.uk wrote: But.. let's make one thing clear: Alan Cox and Linus have been going on about how IRQ0 should not be used.  Let's be crystal clear: even

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 11:05:54AM +, Alan Cox wrote: Even better. Avoid the first 16 IRQ numbers altogether - so that ISA drivers which have these numbers hard-encoded in them will see failures if they're expecting standard ISA IRQ numbering. The ISA bus space is non-discoverable so

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 11:37:35AM +, Dave Martin wrote: 1) All OF code and drivers should be migrating to use 0 instead of NO_IRQ for the no-interrupt case. Code which receives irq numbers directly from the OF framework and refers to NO_IRQ, or expects 0 to be a valid needs to

Re: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver

2011-12-06 Thread Russell King - ARM Linux
On Tue, Dec 06, 2011 at 11:20:49AM -0800, Linus Torvalds wrote: Not for any device driver, though. It's used entirely internally, and it doesn't even use request_irq(). It uses the magic internal setup_irq() and never *ever* exposes irq0 as anything that a driver can see. That's what

Re: [PATCH v5 5/9] ARM: versatile: Map local timers using Device Tree when possible

2011-12-12 Thread Russell King - ARM Linux
On Fri, Dec 09, 2011 at 07:03:48PM +, Pawel Moll wrote: If twd_base is not set, try to map the TWD registers from arm,smp-twd Device Tree node (compatible value as used in Highbank's DT). Please do it the other way around - allow DT to override twd_base if the DT node is present. The

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2012-01-03 Thread Russell King - ARM Linux
On Mon, Dec 26, 2011 at 09:44:52PM +0800, Richard Zhao wrote: On Mon, Dec 26, 2011 at 11:10:30AM +, Mark Brown wrote: The *call* is there in the regulator subsystem, it's just that none of the drivers back it up with an actual implementation yet. Which turns out to be a good thing as

Re: [PATCH v3] Input: keyboard - add device tree bindings for simple key matrixes

2012-01-03 Thread Russell King - ARM Linux
On Tue, Jan 03, 2012 at 08:22:21AM -0800, Simon Glass wrote: Can the Linux key codes fit in 8 bits? That depends on your point of view. If you hack on X, then the answer is yes and you ignore the squeels of your users when certain key presses get misinterpreted. (The Psion LX platform,

Re: [PATCH v3] Input: keyboard - add device tree bindings for simple key matrixes

2012-01-03 Thread Russell King - ARM Linux
On Tue, Jan 03, 2012 at 08:44:32AM -0800, Dmitry Torokhov wrote: On Tue, Jan 03, 2012 at 04:29:30PM +, Russell King - ARM Linux wrote: On Tue, Jan 03, 2012 at 08:22:21AM -0800, Simon Glass wrote: Can the Linux key codes fit in 8 bits? That depends on your point of view. If you

Re: [PATCH v2 3/6] ARM: at91/gpio: add DT support

2012-01-04 Thread Russell King - ARM Linux
On Tue, Jan 03, 2012 at 07:34:48PM +0100, Nicolas Ferre wrote: + at91_gpio-clock = clk_get_sys(NULL, at91_gpio-chip.label); + if (!at91_gpio-clock) { + pr_err(at91_gpio.%d, failed to get clock, ignoring.\n, +

Re: [RFC PATCH v2 1/9] arm: avoid using on_each_cpu hard coded ret value

2012-01-08 Thread Russell King - ARM Linux
On Sun, Jan 08, 2012 at 03:32:21PM +0200, Gilad Ben-Yossef wrote: on_each_cpu always returns a hard coded return code of zero. Removing all tests based on this return value saves run time cycles for compares and code bloat for branches. Signed-off-by: Gilad Ben-Yossef gi...@benyossef.com

Re: [RFC PATCH v2 8/9] smp: refactor on_each_cpu to void returning func

2012-01-08 Thread Russell King - ARM Linux
On Sun, Jan 08, 2012 at 03:32:28PM +0200, Gilad Ben-Yossef wrote: on_each_cpu returns the retunr value of smp_call_function which is hard coded to 0. Refactor on_each_cpu to a void function and the few callers that check the return value to save compares and branches. Signed-off-by: Gilad

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: +#ifdef CONFIG_OF +int __init sic_of_init(struct device_node *np, struct device_node *parent) +{ + struct fpga_irq_data *sic_data = kzalloc(sizeof(*sic_data), GFP_KERNEL); + int err = -ENOMEM, irq; + + if

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 11:41:51AM -0700, Grant Likely wrote: On Fri, Jan 13, 2012 at 10:58:34AM +, Jamie Iles wrote: On Fri, Jan 13, 2012 at 10:48:42AM +, Russell King - ARM Linux wrote: On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: +#ifdef CONFIG_OF +int

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 02:00:41PM -0700, Grant Likely wrote: Let me look at it a bit. You can leave the initialization loop in fpga_irq_init() for now. I'm looking at adding a mask field to irq_domain_add_legacy in addition to the host_data pointer. I also want to investigate replacing

Re: [RFC PATCH 0/5] ARM: introducing DT topology

2012-01-18 Thread Russell King - ARM Linux
On Wed, Jan 18, 2012 at 02:36:43PM +, Lorenzo Pieralisi wrote: Current code in the kernel, in particular the boot sequence, hinges upon a sequential mapping of MPIDR values for cpus and related interrupt controller CPU interfaces to logical cpu indexing. I don't believe it does. What it

Re: [RFC PATCH 0/5] ARM: introducing DT topology

2012-01-19 Thread Russell King - ARM Linux
On Thu, Jan 19, 2012 at 12:18:32PM +, Catalin Marinas wrote: On Wed, Jan 18, 2012 at 06:04:53PM +, Russell King - ARM Linux wrote: On Wed, Jan 18, 2012 at 05:50:28PM +, Lorenzo Pieralisi wrote: This sounds like you're saying that the contents of MPIDR might be buggy sometime

Re: [PATCH v6 9/9] ARM: vexpress: Add Device Tree for V2P-CA15 core tile (TC1 variant)

2012-01-19 Thread Russell King - ARM Linux
On Thu, Jan 19, 2012 at 05:00:56PM +, David Vrabel wrote: I don't expect any real production vexpress system to use this config options I do - _if_ I decide to try DT on my Versatile Express. That'll be with the existing boot setup, which will be ATAG based.

Re: [PATCH v6 9/9] ARM: vexpress: Add Device Tree for V2P-CA15 core tile (TC1 variant)

2012-01-19 Thread Russell King - ARM Linux
On Thu, Jan 19, 2012 at 05:27:15PM +, Pawel Moll wrote: On Thu, 2012-01-19 at 17:00 +, David Vrabel wrote: The problem wasn't with including skeleton.dtsi. Including as it is creates two device_type=memory nodes, one with regs=0 0, which is definitely wrong. With

[PATCH 00/31] Clean up amba/primecell bus support

2012-01-20 Thread Russell King - ARM Linux
This patch set cleans up the AMBA/Primecell bus support. Contained within this set are: 1. Patches 1-5 - Allocation APIs It seems several places in the kernel want to allocate and register amba_device structures. Let's make this official, and common code. So we introduce

[PATCH 16/31] ARM: amba: u300: get rid of NO_IRQ initializers

2012-01-20 Thread Russell King - ARM Linux
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- arch/arm/mach-u300/core.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index b4c6926..ed92967 100644 --- a/arch/arm/mach-u300/core.c +++

[PATCH 17/31] ARM: amba: make use of -1 IRQs warn

2012-01-20 Thread Russell King - ARM Linux
Make the core warn about the use of -1 (NO_IRQ) Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/amba/bus.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index d15acbb..01c2cf4 100644 --- a/drivers/amba/bus.c

[PATCH 18/31] ARM: amba: provide common initializers for static amba devices

2012-01-20 Thread Russell King - ARM Linux
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- include/linux/amba/bus.h | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index e192962..a9fab83 100644 ---

[PATCH 19/31] ARM: amba: vexpress: get rid of private platform amba_device initializer

2012-01-20 Thread Russell King - ARM Linux
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- arch/arm/mach-vexpress/core.h | 17 - arch/arm/mach-vexpress/ct-ca9x4.c |8 arch/arm/mach-vexpress/v2m.c | 20 ++-- 3 files changed, 14 insertions(+), 31 deletions(-) diff --git

[PATCH 21/31] ARM: amba: realview: get rid of private platform amba_device initializer

2012-01-20 Thread Russell King - ARM Linux
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- arch/arm/mach-realview/core.h| 20 --- arch/arm/mach-realview/realview_eb.c | 38 +++--- arch/arm/mach-realview/realview_pb1176.c | 38 +++---

  1   2   3   4   >