Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH] mmc: omap_hsmmc: introduce omap_hsmmc_prepare/complete
From: Venkatraman S @ 2012-11-06 15:50 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350910768-8522-1-git-send-email-balbi@ti.com>

On Mon, Oct 22, 2012 at 6:29 PM, Felipe Balbi <balbi@ti.com> wrote:
> prepare() is supposed to prevent new children from
> being registered. On the MMC subsystem, children
> (new cards) registration starts with the card
> detect IRQ.
>
> Move card detect IRQ disabling to prepare() so that
> no new cards will be registered while we're trying
> to suspend.
>
> Likewise, move card detect IRQ enabling to complete()
> so we only try to register new children after our MMC
> IP is back up.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>
> Venkat, do you think the patch below makes sense ?

Except for the minor nit mentioned below, it works well.
I'll include it in my patch series.

>
> cheers
>
>  drivers/mmc/host/omap_hsmmc.c | 45 ++++++++++++++++++++++++-------------------
>  1 file changed, 25 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 54bfd0c..4c8b41e 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2022,6 +2022,26 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev)
>  }
>
>  #ifdef CONFIG_PM
> +static int omap_hsmmc_prepare(struct device *dev)
> +{
> +       struct omap_hsmmc_host *host = dev_get_drvdata(dev);
> +
> +       if (host->pdata->suspend)
> +               return host->pdata->suspend(dev, host->slot_id);
> +
> +       return 0;
> +}
> +
> +static int omap_hsmmc_complete(struct device *dev)

The .complete() function prototype requires to return void.
This one emits a compilation warning.

^ permalink raw reply

* [GIT PULL] kill plat-nomadik and convert Nomadik+Ux500 to SPARSE_IRQ
From: Olof Johansson @ 2012-11-06 15:48 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CACRpkdY9ppMQ5UG5WRCJQSbme82HJACF8pz9v4SVbC6_CUt+2g@mail.gmail.com>

On Mon, Nov 05, 2012 at 10:25:41AM +0100, Linus Walleij wrote:
> Hi ARM SoC maintainers,
> 
> this pull request will move all headers away from plat-nomadik, move the
> timer driver to drivers/clocksource, delete plat-nomadik and then convert
> Nomadik and Ux500 to SPARSE_IRQ. I consider this a big piece of
> cleanup that we need to move ahead with single zImage.
> 
> As discussed with Arnd in Copenhagen here is a pull request including a few
> patches that are for obvious reasons also in the pinctrl tree. We will have
> to fix this up in the merge window as the end result is the removal of the
> plat-nomadik directory which means there will be massive collissions if we
> try to pretend the changes are orthogonal.
> 
> The patches have all been circulated to relevant subsystem maintainers,
> but I have not recieved an ACK from Samuel Ortiz, Mike Turquette yet,
> nor from the clocksource maintainer.
> 
> However they have had time to review the patches and they're basically
> only changing #include <> statements and so I think we should move ahead
> with this anyway. I'm a bit uncertain about the clocksource though, it should
> be straight-forward.
> 
> Waiting for weeks for ACKs before being able to merge to ARM SoC
> will delay any linux-next testing which slows down everything :-(
> 
> Signed tag per below.
> 
> Yours,
> Linus Walleij
> 
> 
> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> 
>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
> tags/kill-plat-sparse-irq
> 
> for you to fetch changes up to c3b9d1db23c4ebd4d8a0964ebcf5f27d4eb8fa3f:
> 
>   ARM: plat-nomadik: convert platforms to SPARSE_IRQ (2012-11-05 09:55:34 +0100)


I pulled this into next/multiplatform. Could have gone in next/cleanup I guess,
but the lines are blurring a bit since this is partially staging for
multiplatform enablement.


Thanks,

-Olof

^ permalink raw reply

* [GIT PULL] Integrator & Versatile IRQchip changes
From: Olof Johansson @ 2012-11-06 15:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CACRpkdY8_Bdd3_m85ucCSP2Sog4a0BoJM93z=JLFWz9pO3p=Pw@mail.gmail.com>

On Sun, Nov 04, 2012 at 06:28:11PM +0100, Linus Walleij wrote:
> Hi ARM SoC maintainers,
> 
> this is a set of three irq cleanup/movement patches that affect the FPGA
> IRQ chip make the integrator a better example of how irq descriptors
> should be treated. As I suspect there may be more irqchip drivers moving
> out of arch/arm I figured that pushing these through ARM SoC was the
> best thing.
> 
> Please pull them in!
> 
> Yours,
> Linus Walleij
> 
> 
> The following changes since commit 6f0c0580b70c89094b3422ba81118c7b959c7556:
> 
>   Linux 3.7-rc2 (2012-10-20 12:11:32 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> tags/integrator-irq


Pulled, thanks!


-Olof

^ permalink raw reply

* [PATCH] irqchip: irq-bcm2835: Add terminating entry for of_device_id table
From: Olof Johansson @ 2012-11-06 15:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1351828970-15081-1-git-send-email-swarren@wwwdotorg.org>

On Thu, Nov 01, 2012 at 10:02:50PM -0600, Stephen Warren wrote:
> From: Axel Lin <axel.lin@ingics.com>
> 
> The of_device_id table is supposed to be zero-terminated.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> This is a fix for v3.7.

Thanks, applied.


-Olof

^ permalink raw reply

* [GIT PULL] ARM: tegra: fixes for 3.7-rc4
From: Olof Johansson @ 2012-11-06 15:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1351784594-28982-1-git-send-email-swarren@wwwdotorg.org>

On Thu, Nov 01, 2012 at 09:43:14AM -0600, Stephen Warren wrote:
> Here we have just a single fix for the Tegra30 pinctrl module's register
> range size in device tre.
> 
> ----------------------------------------------------------------
> 
> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> 
>   Linux 3.7-rc3
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git tegra-for-3.7-fixes-for-rc4
> 
> for you to fetch changes up to 322337b8fbd8c392246529d5db924820fc0c7381:
> 
>   ARM: dt: tegra: fix length of pad control and mux registers

Hi,

Looks like tegra-for-3.7-fixes-for-rc4 is not in that repo, but I did find
a for-3.7/fixes-for-rc4 with the same contents, which I pulled.


-Olof

^ permalink raw reply

* [GIT PULL] Next batch of ux500 related patches due for -next
From: Olof Johansson @ 2012-11-06 15:32 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121101141709.GA14016@gmail.com>

On Thu, Nov 01, 2012 at 03:17:09PM +0100, Lee Jones wrote:
> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> 
>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
> 
> are available in the git repository at:
> 
>   git://git.linaro.org/people/ljones/linux-3.0-ux500.git ste-dt-for-next


Pulled, thanks.


-Olof

^ permalink raw reply

* [PATCH v2] ARM: dts: AM33XX: Add usbss node
From: Benoit Cousson @ 2012-11-06 15:32 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121106142950.GA3056@arwen.pp.htv.fi>

On 11/06/2012 03:29 PM, Felipe Balbi wrote:
> Hi,
> 
> On Tue, Nov 06, 2012 at 07:59:38PM +0530, Afzal Mohammed wrote:
>> From: Ajay Kumar Gupta <ajay.gupta@ti.com>
>>
>> Device tree node for usbss on AM33XX. There are two musb
>> controllers on am33xx platform so have port0-mode and
>> port1-mode data.
>>
>> [afzal at ti.com: reg & interrupt property addition]
>>
>> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
>> Signed-off-by: Santhapuri, Damodar <damodar.santhapuri@ti.com>
>> Signed-off-by: Ravi Babu <ravibabu@ti.com>
>> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> 
> to my eyes, this looks ok.
> 
> Reviewed-by: Felipe Balbi <balbi@ti.com>

Thanks Felipe. Patch applied in for_3.8/dts_part2 branch.

Regards,
Benoit

> 
>> ---
>>
>> v2: node named as "usb"
>>
>> Depends on "usb: musb: dsps: dt binding - add resources, example"
>> (https://patchwork.kernel.org/patch/1704691/)
>>
>>  arch/arm/boot/dts/am33xx.dtsi | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>> index 5dfd682..20a3f29 100644
>> --- a/arch/arm/boot/dts/am33xx.dtsi
>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>> @@ -321,5 +321,22 @@
>>  			ti,hwmods = "spi1";
>>  			status = "disabled";
>>  		};
>> +
>> +		usb at 47400000 {
>> +			compatible = "ti,musb-am33xx";
>> +			reg = <0x47400000 0x1000	/* usbss */
>> +			       0x47401000 0x800		/* musb instance 0 */
>> +			       0x47401800 0x800>;	/* musb instance 1 */
>> +			interrupts = <17		/* usbss */
>> +				      18		/* musb instance 0 */
>> +				      19>;		/* musb instance 1 */
>> +			multipoint = <1>;
>> +			num-eps = <16>;
>> +			ram-bits = <12>;
>> +			port0-mode = <3>;
>> +			port1-mode = <3>;
>> +			power = <250>;
>> +			ti,hwmods = "usb_otg_hs";
>> +		};
>>  	};
>>  };
>> -- 
>> 1.7.12
>>
> 

^ permalink raw reply

* [RFC patch v3 1/4] ARM: at91: atmel-ssc: add platform device id table
From: Nicolas Ferre @ 2012-11-06 15:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121106145255.GC20063@game.jcrosoft.org>

On 11/06/2012 03:52 PM, Jean-Christophe PLAGNIOL-VILLARD :
> On 13:57 Tue 06 Nov     , Bo Shen wrote:
>> Add platform device id to check whether the SSC controller support
>> pdc or dam for data transfer
>>
>> If match "at91rm9200_ssc", which support pdc for data transfer
>> If match "at91sam9g45_ssc", which support dma for data transfer
> 
> you add the dt but no pinctrl NACK
> 
> pinctrl is mandoatory for any new dt switch

Well, that is a bit too demanding: We will move to pinctrl in... 3.8!
So, it does not break something I am for merging this patch and then
concentrating in adding the pinctrl piece just after.

Best regards,

>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>> Change since v2
>>   No change
>> Change since v1
>>   No change
>> ---
>>  arch/arm/mach-at91/at91rm9200.c          |    6 +++---
>>  arch/arm/mach-at91/at91rm9200_devices.c  |    6 +++---
>>  arch/arm/mach-at91/at91sam9260.c         |    2 +-
>>  arch/arm/mach-at91/at91sam9260_devices.c |    2 +-
>>  arch/arm/mach-at91/at91sam9261.c         |    6 +++---
>>  arch/arm/mach-at91/at91sam9261_devices.c |    6 +++---
>>  arch/arm/mach-at91/at91sam9263.c         |    4 ++--
>>  arch/arm/mach-at91/at91sam9263_devices.c |    4 ++--
>>  arch/arm/mach-at91/at91sam9g45.c         |    4 ++--
>>  arch/arm/mach-at91/at91sam9g45_devices.c |    4 ++--
>>  arch/arm/mach-at91/at91sam9rl.c          |    4 ++--
>>  arch/arm/mach-at91/at91sam9rl_devices.c  |    4 ++--
>>  drivers/misc/atmel-ssc.c                 |   23 +++++++++++++++++++++++
>>  include/linux/atmel-ssc.h                |    5 +++++
>>  14 files changed, 54 insertions(+), 26 deletions(-)
>>
>> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
>> index b4f0565..85d53c5 100644
>> --- a/arch/arm/mach-at91/at91rm9200.c
>> +++ b/arch/arm/mach-at91/at91rm9200.c
>> @@ -184,9 +184,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
>>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
>>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
>>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk),
>>  	/* fake hclk clock */
>>  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
>> diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
>> index a563189..59ceea1 100644
>> --- a/arch/arm/mach-at91/at91rm9200_devices.c
>> +++ b/arch/arm/mach-at91/at91rm9200_devices.c
>> @@ -752,7 +752,7 @@ static struct resource ssc0_resources[] = {
>>  };
>>  
>>  static struct platform_device at91rm9200_ssc0_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc0_dmamask,
>> @@ -794,7 +794,7 @@ static struct resource ssc1_resources[] = {
>>  };
>>  
>>  static struct platform_device at91rm9200_ssc1_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 1,
>>  	.dev	= {
>>  		.dma_mask		= &ssc1_dmamask,
>> @@ -836,7 +836,7 @@ static struct resource ssc2_resources[] = {
>>  };
>>  
>>  static struct platform_device at91rm9200_ssc2_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 2,
>>  	.dev	= {
>>  		.dma_mask		= &ssc2_dmamask,
>> diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
>> index ad29f93..2c8aab0 100644
>> --- a/arch/arm/mach-at91/at91sam9260.c
>> +++ b/arch/arm/mach-at91/at91sam9260.c
>> @@ -210,7 +210,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
>>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
>>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
>>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk),
>>  	/* more usart lookup table for DT entries */
>> diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
>> index 805ef95..9cfdc3f 100644
>> --- a/arch/arm/mach-at91/at91sam9260_devices.c
>> +++ b/arch/arm/mach-at91/at91sam9260_devices.c
>> @@ -742,7 +742,7 @@ static struct resource ssc_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9260_ssc_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc_dmamask,
>> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
>> index 8d999eb..4e8c56e 100644
>> --- a/arch/arm/mach-at91/at91sam9261.c
>> +++ b/arch/arm/mach-at91/at91sam9261.c
>> @@ -174,9 +174,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
>>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
>>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
>>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
>>  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk),
>> diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
>> index 9752f17..299637f 100644
>> --- a/arch/arm/mach-at91/at91sam9261_devices.c
>> +++ b/arch/arm/mach-at91/at91sam9261_devices.c
>> @@ -706,7 +706,7 @@ static struct resource ssc0_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9261_ssc0_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc0_dmamask,
>> @@ -748,7 +748,7 @@ static struct resource ssc1_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9261_ssc1_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 1,
>>  	.dev	= {
>>  		.dma_mask		= &ssc1_dmamask,
>> @@ -790,7 +790,7 @@ static struct resource ssc2_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9261_ssc2_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 2,
>>  	.dev	= {
>>  		.dma_mask		= &ssc2_dmamask,
>> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
>> index 6a01d03..95a5471 100644
>> --- a/arch/arm/mach-at91/at91sam9263.c
>> +++ b/arch/arm/mach-at91/at91sam9263.c
>> @@ -186,8 +186,8 @@ static struct clk *periph_clocks[] __initdata = {
>>  static struct clk_lookup periph_clocks_lookups[] = {
>>  	/* One additional fake clock for macb_hclk */
>>  	CLKDEV_CON_ID("hclk", &macb_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
>>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
>>  	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
>> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
>> index 8dde220..df89a00 100644
>> --- a/arch/arm/mach-at91/at91sam9263_devices.c
>> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
>> @@ -1199,7 +1199,7 @@ static struct resource ssc0_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9263_ssc0_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc0_dmamask,
>> @@ -1241,7 +1241,7 @@ static struct resource ssc1_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9263_ssc1_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 1,
>>  	.dev	= {
>>  		.dma_mask		= &ssc1_dmamask,
>> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
>> index 84af1b5..f4f96a6 100644
>> --- a/arch/arm/mach-at91/at91sam9g45.c
>> +++ b/arch/arm/mach-at91/at91sam9g45.c
>> @@ -239,8 +239,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi0_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.1", &twi1_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.0", &ssc0_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.1", &ssc1_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "atmel-trng", &trng_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
>> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
>> index b159607..27e3bf6 100644
>> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
>> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
>> @@ -1459,7 +1459,7 @@ static struct resource ssc0_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9g45_ssc0_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91sam9g45_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc0_dmamask,
>> @@ -1501,7 +1501,7 @@ static struct resource ssc1_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9g45_ssc1_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91sam9g45_ssc",
>>  	.id	= 1,
>>  	.dev	= {
>>  		.dma_mask		= &ssc1_dmamask,
>> diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
>> index 72e9084..4110b54 100644
>> --- a/arch/arm/mach-at91/at91sam9rl.c
>> +++ b/arch/arm/mach-at91/at91sam9rl.c
>> @@ -184,8 +184,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
>>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
>>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
>> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk),
>>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk),
>>  	CLKDEV_CON_ID("pioA", &pioA_clk),
>> diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
>> index d6ca054..01220c7 100644
>> --- a/arch/arm/mach-at91/at91sam9rl_devices.c
>> +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
>> @@ -832,7 +832,7 @@ static struct resource ssc0_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9rl_ssc0_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 0,
>>  	.dev	= {
>>  		.dma_mask		= &ssc0_dmamask,
>> @@ -874,7 +874,7 @@ static struct resource ssc1_resources[] = {
>>  };
>>  
>>  static struct platform_device at91sam9rl_ssc1_device = {
>> -	.name	= "ssc",
>> +	.name	= "at91rm9200_ssc",
>>  	.id	= 1,
>>  	.dev	= {
>>  		.dma_mask		= &ssc1_dmamask,
>> diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
>> index ac00f83..f40abd8 100644
>> --- a/drivers/misc/atmel-ssc.c
>> +++ b/drivers/misc/atmel-ssc.c
>> @@ -68,6 +68,26 @@ void ssc_free(struct ssc_device *ssc)
>>  }
>>  EXPORT_SYMBOL(ssc_free);
>>  
>> +static struct atmel_ssc_platform_data at91rm9200_config = {
>> +	.use_dma = 0,
>> +};
>> +
>> +static struct atmel_ssc_platform_data at91sam9g45_config = {
>> +	.use_dma = 1,
>> +};
>> +
>> +static const struct platform_device_id atmel_ssc_devtypes[] = {
>> +	{
>> +		.name = "at91rm9200_ssc",
>> +		.driver_data = (unsigned long) &at91rm9200_config,
>> +	}, {
>> +		.name = "at91sam9g45_ssc",
>> +		.driver_data = (unsigned long) &at91sam9g45_config,
>> +	}, {
>> +		/* sentinel */
>> +	}
>> +};
>> +
>>  static int ssc_probe(struct platform_device *pdev)
>>  {
>>  	struct resource *regs;
>> @@ -80,6 +100,8 @@ static int ssc_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	ssc->pdev = pdev;
>> +	ssc->pdata = (struct atmel_ssc_platform_data *)
>> +			platform_get_device_id(pdev)->driver_data;
>>  
>>  	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>  	if (!regs) {
>> @@ -139,6 +161,7 @@ static struct platform_driver ssc_driver = {
>>  		.name		= "ssc",
>>  		.owner		= THIS_MODULE,
>>  	},
>> +	.id_table	= atmel_ssc_devtypes,
>>  	.probe		= ssc_probe,
>>  	.remove		= __devexit_p(ssc_remove),
>>  };
>> diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h
>> index 4eb3175..1ca0e32 100644
>> --- a/include/linux/atmel-ssc.h
>> +++ b/include/linux/atmel-ssc.h
>> @@ -5,10 +5,15 @@
>>  #include <linux/list.h>
>>  #include <linux/io.h>
>>  
>> +struct atmel_ssc_platform_data {
>> +	int			use_dma;
>> +};
>> +
>>  struct ssc_device {
>>  	struct list_head	list;
>>  	void __iomem		*regs;
>>  	struct platform_device	*pdev;
>> +	struct atmel_ssc_platform_data *pdata;
>>  	struct clk		*clk;
>>  	int			user;
>>  	int			irq;
>> -- 
>> 1.7.9.5
>>
> 


-- 
Nicolas Ferre

^ permalink raw reply

* [PATCH 5/5] gpiolib: separation of pin concerns
From: Linus Walleij @ 2012-11-06 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

The fact that of_gpiochip_add_pin_range() and
gpiochip_add_pin_range() share too much code is fragile and
will invariably mean that bugs need to be fixed in two places
instead of one.

So separate the concerns of gpiolib.c and gpiolib-of.c and
have the latter call the former as back-end. This is necessary
also when going forward with other device descriptions such
as ACPI.

This is done by:

- Adding a return code to gpiochip_add_pin_range() so we can
  reliably check whether this succeeds.

- Get rid of the custom of_pinctrl_add_gpio_range() from
  pinctrl. Instead create of_pinctrl_get() to just retrive the
  pin controller per se from an OF node. This composite
  function was just begging to be deleted, it was way to
  purpose-specific.

- Use pinctrl_dev_get_name() to get the name of the retrieved
  pin controller and use that to call back into the generic
  gpiochip_add_pin_range().

Now the pin range is only allocated and tied to a pin
controller from the core implementation in gpiolib.c.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c       | 23 +++++++++--------------
 drivers/gpio/gpiolib.c          |  8 +++++---
 drivers/pinctrl/devicetree.c    |  4 +---
 include/asm-generic/gpio.h      |  4 ++--
 include/linux/gpio.h            |  2 +-
 include/linux/pinctrl/pinctrl.h |  7 ++-----
 6 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 67403e4..a40cd84 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -221,8 +221,8 @@ EXPORT_SYMBOL(of_mm_gpiochip_add);
 static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 {
 	struct device_node *np = chip->of_node;
-	struct gpio_pin_range *pin_range;
 	struct of_phandle_args pinspec;
+	struct pinctrl_dev *pctldev;
 	int index = 0, ret;
 
 	if (!np)
@@ -234,22 +234,17 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 		if (ret)
 			break;
 
-		pin_range = devm_kzalloc(chip->dev, sizeof(*pin_range),
-				GFP_KERNEL);
-		if (!pin_range) {
-			pr_err("%s: GPIO chip: failed to allocate pin ranges\n",
-					chip->label);
+		pctldev = of_pinctrl_get(pinspec.np);
+		if (!pctldev)
 			break;
-		}
 
-		pin_range->range.name = chip->label;
-		pin_range->range.base = chip->base;
-		pin_range->range.pin_base = pinspec.args[0];
-		pin_range->range.npins = pinspec.args[1];
-		pin_range->pctldev = of_pinctrl_add_gpio_range(pinspec.np,
-				&pin_range->range);
+		ret = gpiochip_add_pin_range(chip,
+					     pinctrl_dev_get_name(pctldev),
+					     pinspec.args[0],
+					     pinspec.args[1]);
 
-		list_add_tail(&pin_range->node, &chip->pin_ranges);
+		if (ret)
+			break;
 
 	} while (index++);
 }
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index fd7280f..addbabb 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1185,8 +1185,8 @@ EXPORT_SYMBOL_GPL(gpiochip_find);
 
 #ifdef CONFIG_PINCTRL
 
-void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
-		unsigned int pin_base, unsigned int npins)
+int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+			   unsigned int pin_base, unsigned int npins)
 {
 	struct gpio_pin_range *pin_range;
 
@@ -1194,7 +1194,7 @@ void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
 	if (!pin_range) {
 		pr_err("%s: GPIO chip: failed to allocate pin ranges\n",
 				chip->label);
-		return;
+		return -ENOMEM;
 	}
 
 	pin_range->range.name = chip->label;
@@ -1205,6 +1205,8 @@ void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
 			&pin_range->range);
 
 	list_add_tail(&pin_range->node, &chip->pin_ranges);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(gpiochip_add_pin_range);
 
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 6728ec7..fe2d1af 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -106,8 +106,7 @@ static struct pinctrl_dev *find_pinctrl_by_of_node(struct device_node *np)
 	return NULL;
 }
 
-struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
-		struct pinctrl_gpio_range *range)
+struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
 	struct pinctrl_dev *pctldev;
 
@@ -115,7 +114,6 @@ struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
 	if (!pctldev)
 		return NULL;
 
-	pinctrl_add_gpio_range(pctldev, range);
 	return pctldev;
 }
 
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 2e60de4..50d995e 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -63,8 +63,8 @@ struct gpio_pin_range {
 	struct pinctrl_gpio_range range;
 };
 
-void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
-			    unsigned int pin_base, unsigned int npins);
+int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+			   unsigned int pin_base, unsigned int npins);
 void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
 
 #endif
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 21d28b9..81bbfe5 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -233,7 +233,7 @@ static inline int irq_to_gpio(unsigned irq)
 
 #ifdef CONFIG_PINCTRL
 
-static inline void
+static inline int
 gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
 		       unsigned int pin_base, unsigned int npins)
 {
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 434e5a9..4a58428 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -141,16 +141,13 @@ extern struct pinctrl_dev *find_pinctrl_and_add_gpio_range(const char *devname,
 		struct pinctrl_gpio_range *range);
 
 #ifdef CONFIG_OF
-extern struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
-		struct pinctrl_gpio_range *range);
+extern struct pinctrl_dev *of_pinctrl_get(struct device_node *np);
 #else
 static inline
-struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
-		struct pinctrl_gpio_range *range)
+struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
 {
 	return NULL;
 }
-
 #endif /* CONFIG_OF */
 
 extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH 4/5] gpiolib: call pin removal in chip removal function
From: Linus Walleij @ 2012-11-06 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

This makes us call gpiochio_remove_pin_ranges() in the
gpiochip_remove() function, so we get rid of ranges when
freeing the chip.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 10fc9c3..fd7280f 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1125,6 +1125,7 @@ int gpiochip_remove(struct gpio_chip *chip)
 
 	spin_lock_irqsave(&gpio_lock, flags);
 
+	gpiochip_remove_pin_ranges(chip);
 	of_gpiochip_remove(chip);
 
 	for (id = chip->base; id < chip->base + chip->ngpio; id++) {
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH 3/5] gpiolib: remove duplicate pin range code
From: Linus Walleij @ 2012-11-06 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Introduced both of_gpiochip_remove_pin_range() and
gpiochip_remove_pin_ranges(). But the contents are exactly
the same so remove the OF one and rely on the range deletion
in the core.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 220caa5..67403e4 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -254,19 +254,8 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 	} while (index++);
 }
 
-static void of_gpiochip_remove_pin_range(struct gpio_chip *chip)
-{
-	struct gpio_pin_range *pin_range, *tmp;
-
-	list_for_each_entry_safe(pin_range, tmp, &chip->pin_ranges, node) {
-		list_del(&pin_range->node);
-		pinctrl_remove_gpio_range(pin_range->pctldev,
-				&pin_range->range);
-	}
-}
 #else
 static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {}
-static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {}
 #endif
 
 void of_gpiochip_add(struct gpio_chip *chip)
@@ -288,7 +277,7 @@ void of_gpiochip_add(struct gpio_chip *chip)
 
 void of_gpiochip_remove(struct gpio_chip *chip)
 {
-	of_gpiochip_remove_pin_range(chip);
+	gpiochip_remove_pin_ranges(chip);
 
 	if (chip->of_node)
 		of_node_put(chip->of_node);
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH 2/5] gpiolib-of: staticize the pin range calls
From: Linus Walleij @ 2012-11-06 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Declared the of_gpiochip_[add|remove]_pin_range() global
while they should be static as they are only ever used in
this file. Let's convert them to static.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index a5b90c8..220caa5 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -218,7 +218,7 @@ err0:
 EXPORT_SYMBOL(of_mm_gpiochip_add);
 
 #ifdef CONFIG_PINCTRL
-void of_gpiochip_add_pin_range(struct gpio_chip *chip)
+static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 {
 	struct device_node *np = chip->of_node;
 	struct gpio_pin_range *pin_range;
@@ -254,7 +254,7 @@ void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 	} while (index++);
 }
 
-void of_gpiochip_remove_pin_range(struct gpio_chip *chip)
+static void of_gpiochip_remove_pin_range(struct gpio_chip *chip)
 {
 	struct gpio_pin_range *pin_range, *tmp;
 
@@ -265,8 +265,8 @@ void of_gpiochip_remove_pin_range(struct gpio_chip *chip)
 	}
 }
 #else
-void of_gpiochip_add_pin_range(struct gpio_chip *chip) {}
-void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {}
+static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {}
+static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {}
 #endif
 
 void of_gpiochip_add(struct gpio_chip *chip)
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH 1/5] gpiolib: fix up function prototypes etc
From: Linus Walleij @ 2012-11-06 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Got most of it's function prototypes wrong, so fix this up by:

- Moving the void declarations into static inlines in
  <linux/gpio.h> (previously the actual prototypes were declared
  here...)

- Declare the gpiochip_add_pin_range() and
  gpiochip_remove_pin_ranges() functions in <asm-generic/gpio.h>
  together with the pin range struct declaration itself.

- Actually only implement these very functions in gpiolib.c
  if CONFIG_PINCTRL is set.

- Additionally export the symbols since modules will need to
  be able to do this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib.c     | 10 +++++-----
 include/asm-generic/gpio.h |  6 ++++++
 include/linux/gpio.h       | 24 ++++++++++++++++++------
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 3e84796..10fc9c3 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1183,6 +1183,7 @@ struct gpio_chip *gpiochip_find(void *data,
 EXPORT_SYMBOL_GPL(gpiochip_find);
 
 #ifdef CONFIG_PINCTRL
+
 void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
 		unsigned int pin_base, unsigned int npins)
 {
@@ -1204,6 +1205,7 @@ void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
 
 	list_add_tail(&pin_range->node, &chip->pin_ranges);
 }
+EXPORT_SYMBOL_GPL(gpiochip_add_pin_range);
 
 void gpiochip_remove_pin_ranges(struct gpio_chip *chip)
 {
@@ -1215,11 +1217,9 @@ void gpiochip_remove_pin_ranges(struct gpio_chip *chip)
 				&pin_range->range);
 	}
 }
-#else
-void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
-		unsigned int pin_base, unsigned int npins) {}
-void gpiochip_remove_pin_ranges(struct gpio_chip *chip) {}
-#endif
+EXPORT_SYMBOL_GPL(gpiochip_remove_pin_ranges);
+
+#endif /* CONFIG_PINCTRL */
 
 /* These "optional" allocation calls help prevent drivers from stomping
  * on each other, and help provide better diagnostics in debugfs.
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 92e5c43..2e60de4 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -49,6 +49,7 @@ struct module;
 struct device_node;
 
 #ifdef CONFIG_PINCTRL
+
 /**
  * struct gpio_pin_range - pin range controlled by a gpio chip
  * @head: list for maintaining set of pin ranges, used internally
@@ -61,6 +62,11 @@ struct gpio_pin_range {
 	struct pinctrl_dev *pctldev;
 	struct pinctrl_gpio_range range;
 };
+
+void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+			    unsigned int pin_base, unsigned int npins);
+void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
+
 #endif
 
 /**
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index a284459..21d28b9 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -72,9 +72,9 @@ static inline int irq_to_gpio(unsigned int irq)
 	return -EINVAL;
 }
 
-#endif
+#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */
 
-#else
+#else /* ! CONFIG_GENERIC_GPIO */
 
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -231,9 +231,21 @@ static inline int irq_to_gpio(unsigned irq)
 	return -EINVAL;
 }
 
-void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
-		unsigned int pin_base, unsigned int npins);
-void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
-#endif
+#ifdef CONFIG_PINCTRL
+
+static inline void
+gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+		       unsigned int pin_base, unsigned int npins)
+{
+}
+
+static inline void
+gpiochip_remove_pin_ranges(struct gpio_chip *chip)
+{
+}
+
+#endif /* CONFIG_PINCTRL */
+
+#endif /* ! CONFIG_GENERIC_GPIO */
 
 #endif /* __LINUX_GPIO_H */
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH v3 03/11] clk: davinci - common clk utilities to init clk driver
From: Murali Karicheri @ 2012-11-06 15:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <5098D904.7050707@ti.com>

On 11/06/2012 04:31 AM, Sekhar Nori wrote:
>
> On 11/5/2012 8:50 PM, Murali Karicheri wrote:
>> On 11/03/2012 08:35 AM, Sekhar Nori wrote:
>>> On 10/25/2012 9:41 PM, Murali Karicheri wrote:
>>>> This is the common clk driver initialization functions for DaVinci
>>>> SoCs and other SoCs that uses similar hardware architecture.
>>>> clock.h also defines struct types for clock definitions in a SoC
>>>> and clock data type for configuring clk-mux. The initialization
>>>> functions are used by clock initialization code in a specific
>>>> platform/SoC.
>>>>
>>>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>>>> ---
>>>>    drivers/clk/davinci/clock.c |  112
>>>> +++++++++++++++++++++++++++++++++++++++++++
>>>>    drivers/clk/davinci/clock.h |   80 +++++++++++++++++++++++++++++++
>>>>    2 files changed, 192 insertions(+)
>>>>    create mode 100644 drivers/clk/davinci/clock.c
>>>>    create mode 100644 drivers/clk/davinci/clock.h
>>>>
>>>> diff --git a/drivers/clk/davinci/clock.c b/drivers/clk/davinci/clock.c
>>>> new file mode 100644
>>>> index 0000000..ad02149
>>>> --- /dev/null
>>>> +++ b/drivers/clk/davinci/clock.c
>>>> @@ -0,0 +1,112 @@
>>>> +/*
>>>> + * clock.c - davinci clock initialization functions for various clocks
>>>> + *
>>>> + * Copyright (C) 2006-2012 Texas Instruments.
>>>> + * Copyright (C) 2008-2009 Deep Root Systems, LLC
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or modify
>>>> + * it under the terms of the GNU General Public License as published by
>>>> + * the Free Software Foundation; either version 2 of the License, or
>>>> + * (at your option) any later version.
>>>> + */
>>>> +#include <linux/init.h>
>>>> +#include <linux/clk-provider.h>
>>>> +#include <linux/clkdev.h>
>>>> +#include <linux/io.h>
>>>> +#include <linux/slab.h>
>>>> +
>>>> +#include "clk-pll.h"
>>>> +#include "clk-psc.h"
>>>> +#include "clk-div.h"
>>>> +#include "clock.h"
>>>> +
>>>> +static DEFINE_SPINLOCK(_lock);
>>>> +
>>>> +#ifdef    CONFIG_CLK_DAVINCI_PLL
>>>> +struct clk *davinci_pll_clk(const char *name, const char *parent,
>>>> +        u32 phys_pllm, u32 phys_prediv, u32 phys_postdiv,
>>>> +        struct clk_pll_data *pll_data)
>>>> +{
>>>> +    struct clk *clkp = NULL;
>>>> +
>>>> +    pll_data->reg_pllm = ioremap(phys_pllm, 4);
>>>> +    if (WARN_ON(!pll_data->reg_pllm))
>>>> +        return clkp;
>>> I would prefer ERR_PTR(-ENOMEM) here. Same comment applies to other
>>> instances elsewhere in the patch.
>>>
>>>> diff --git a/drivers/clk/davinci/clock.h b/drivers/clk/davinci/clock.h
>>>> new file mode 100644
>>>> index 0000000..73204b8
>>>> --- /dev/null
>>>> +++ b/drivers/clk/davinci/clock.h
>>>> @@ -0,0 +1,80 @@
>>>> +/*
>>>> + * TI DaVinci Clock definitions -  Contains Macros and Types used for
>>>> + * defining various clocks on a DaVinci SoC
>>>> + *
>>>> + * Copyright (C) 2012 Texas Instruments
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or
>>>> + * modify it under the terms of the GNU General Public License as
>>>> + * published by the Free Software Foundation version 2.
>>>> + *
>>>> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
>>>> + * kind, whether express or implied; without even the implied warranty
>>>> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>>> + * GNU General Public License for more details.
>>>> + */
>>>> +#ifndef __DAVINCI_CLOCK_H
>>>> +#define __DAVINCI_CLOCK_H
>>>> +
>>>> +#include <linux/types.h>
>>>> +
>>>> +/* general flags: */
>>>> +#define ALWAYS_ENABLED        BIT(0)
>>> This is not used in this patch. Can you add the define along with its
>>> usage so it is immediately clear why you need it?
>> This is used on the next patch as this adds a bunch of utilities or
>> types for the platform specific clock code. Do you want to combine this
>> patch with 05/11?  It will become a bigger patch then? Is that fine.
>> IMO, this is a logical group that can be a standalone patch than
>> combining with 05/11.
> It is more important to divide patches in logical functional blocks
> rather than split it based on files. Reading this patch, I have no idea
> what that define is for.
>
> Thanks,
> Sekhar
>
>
Will combine with 05/11 since utilities are used by the clock init code 
in dm644x.
Murali

^ permalink raw reply

* [PATCH RESEND 00/10] ARM: dts: AM33XX: Add device tree data
From: Benoit Cousson @ 2012-11-06 14:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1352209718-5586-1-git-send-email-anilkumar@ti.com>

Hi Anil,

On 11/06/2012 02:48 PM, AnilKumar Ch wrote:
> Add device tree date for GPIO based various drivers matrix keypad,
> volume keys, push buttons and use leds accross three AM33XX devices
> viz EVM, BeagleBone and Starter Kit.
> 
> To make it functional this series also adds pinctrl data for all
> the GPIOs used by various drivers. In this series only default state
> pinmux/conf settings are added because of sleep/idle state pinctrl
> values are not available.
> 
> These patches are based on linux-omap-dt:for_3.8/dts_part2 tree and
> these were tested on am33xx devices according to added functionality.
> 
> Change log:
> 	- Rebased on for_3.8/dts_part2

Thanks for the update. Applied in for_3.8/dts_part2.

BTW, I've just noticed that am335x-evmsk is not built with make dtbs. The target was missing from the arch/arm/boot/dts/Makefile.

Please find below the patch to add it.

Thanks,
Benoit

---
>From 6990451aca80a5107206688308302241f799057a Mon Sep 17 00:00:00 2001
From: Benoit Cousson <b-cousson@ti.com>
Date: Tue, 6 Nov 2012 15:52:23 +0100
Subject: [PATCH] ARM: dts: Makefile: Add the am335x-evmsk target in dtbs list

The EVMSK was not built with the 'make dtbs' command.
Add the missing antry in the dts Makefile.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
---
 arch/arm/boot/dts/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 634bd42..2458b69 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -73,6 +73,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap4-sdp.dtb \
 	omap5-evm.dtb \
 	am335x-evm.dtb \
+	am335x-evmsk.dtb \
 	am335x-bone.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH] ARM: highbank: retry wfi on reset request
From: Olof Johansson @ 2012-11-06 14:55 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1351221637-21747-1-git-send-email-robherring2@gmail.com>

On Thu, Oct 25, 2012 at 10:20:37PM -0500, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> In some cases, an interrupt can occur and prevent cause failure to enter
> wfi. This causes reset to hang. Retrying the wfi should be enough to
> prevent reset from hanging.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Applied, thanks.


-Olof

^ permalink raw reply

* [RFC patch v3 1/4] ARM: at91: atmel-ssc: add platform device id table
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-11-06 14:52 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1352181474-19597-1-git-send-email-voice.shen@atmel.com>

On 13:57 Tue 06 Nov     , Bo Shen wrote:
> Add platform device id to check whether the SSC controller support
> pdc or dam for data transfer
> 
> If match "at91rm9200_ssc", which support pdc for data transfer
> If match "at91sam9g45_ssc", which support dma for data transfer

you add the dt but no pinctrl NACK

pinctrl is mandoatory for any new dt switch

Best Regards,
J.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Change since v2
>   No change
> Change since v1
>   No change
> ---
>  arch/arm/mach-at91/at91rm9200.c          |    6 +++---
>  arch/arm/mach-at91/at91rm9200_devices.c  |    6 +++---
>  arch/arm/mach-at91/at91sam9260.c         |    2 +-
>  arch/arm/mach-at91/at91sam9260_devices.c |    2 +-
>  arch/arm/mach-at91/at91sam9261.c         |    6 +++---
>  arch/arm/mach-at91/at91sam9261_devices.c |    6 +++---
>  arch/arm/mach-at91/at91sam9263.c         |    4 ++--
>  arch/arm/mach-at91/at91sam9263_devices.c |    4 ++--
>  arch/arm/mach-at91/at91sam9g45.c         |    4 ++--
>  arch/arm/mach-at91/at91sam9g45_devices.c |    4 ++--
>  arch/arm/mach-at91/at91sam9rl.c          |    4 ++--
>  arch/arm/mach-at91/at91sam9rl_devices.c  |    4 ++--
>  drivers/misc/atmel-ssc.c                 |   23 +++++++++++++++++++++++
>  include/linux/atmel-ssc.h                |    5 +++++
>  14 files changed, 54 insertions(+), 26 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
> index b4f0565..85d53c5 100644
> --- a/arch/arm/mach-at91/at91rm9200.c
> +++ b/arch/arm/mach-at91/at91rm9200.c
> @@ -184,9 +184,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk),
>  	/* fake hclk clock */
>  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
> diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
> index a563189..59ceea1 100644
> --- a/arch/arm/mach-at91/at91rm9200_devices.c
> +++ b/arch/arm/mach-at91/at91rm9200_devices.c
> @@ -752,7 +752,7 @@ static struct resource ssc0_resources[] = {
>  };
>  
>  static struct platform_device at91rm9200_ssc0_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc0_dmamask,
> @@ -794,7 +794,7 @@ static struct resource ssc1_resources[] = {
>  };
>  
>  static struct platform_device at91rm9200_ssc1_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 1,
>  	.dev	= {
>  		.dma_mask		= &ssc1_dmamask,
> @@ -836,7 +836,7 @@ static struct resource ssc2_resources[] = {
>  };
>  
>  static struct platform_device at91rm9200_ssc2_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 2,
>  	.dev	= {
>  		.dma_mask		= &ssc2_dmamask,
> diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
> index ad29f93..2c8aab0 100644
> --- a/arch/arm/mach-at91/at91sam9260.c
> +++ b/arch/arm/mach-at91/at91sam9260.c
> @@ -210,7 +210,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk),
>  	/* more usart lookup table for DT entries */
> diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
> index 805ef95..9cfdc3f 100644
> --- a/arch/arm/mach-at91/at91sam9260_devices.c
> +++ b/arch/arm/mach-at91/at91sam9260_devices.c
> @@ -742,7 +742,7 @@ static struct resource ssc_resources[] = {
>  };
>  
>  static struct platform_device at91sam9260_ssc_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc_dmamask,
> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> index 8d999eb..4e8c56e 100644
> --- a/arch/arm/mach-at91/at91sam9261.c
> +++ b/arch/arm/mach-at91/at91sam9261.c
> @@ -174,9 +174,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
>  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk),
> diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
> index 9752f17..299637f 100644
> --- a/arch/arm/mach-at91/at91sam9261_devices.c
> +++ b/arch/arm/mach-at91/at91sam9261_devices.c
> @@ -706,7 +706,7 @@ static struct resource ssc0_resources[] = {
>  };
>  
>  static struct platform_device at91sam9261_ssc0_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc0_dmamask,
> @@ -748,7 +748,7 @@ static struct resource ssc1_resources[] = {
>  };
>  
>  static struct platform_device at91sam9261_ssc1_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 1,
>  	.dev	= {
>  		.dma_mask		= &ssc1_dmamask,
> @@ -790,7 +790,7 @@ static struct resource ssc2_resources[] = {
>  };
>  
>  static struct platform_device at91sam9261_ssc2_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 2,
>  	.dev	= {
>  		.dma_mask		= &ssc2_dmamask,
> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
> index 6a01d03..95a5471 100644
> --- a/arch/arm/mach-at91/at91sam9263.c
> +++ b/arch/arm/mach-at91/at91sam9263.c
> @@ -186,8 +186,8 @@ static struct clk *periph_clocks[] __initdata = {
>  static struct clk_lookup periph_clocks_lookups[] = {
>  	/* One additional fake clock for macb_hclk */
>  	CLKDEV_CON_ID("hclk", &macb_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
>  	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index 8dde220..df89a00 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -1199,7 +1199,7 @@ static struct resource ssc0_resources[] = {
>  };
>  
>  static struct platform_device at91sam9263_ssc0_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc0_dmamask,
> @@ -1241,7 +1241,7 @@ static struct resource ssc1_resources[] = {
>  };
>  
>  static struct platform_device at91sam9263_ssc1_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 1,
>  	.dev	= {
>  		.dma_mask		= &ssc1_dmamask,
> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
> index 84af1b5..f4f96a6 100644
> --- a/arch/arm/mach-at91/at91sam9g45.c
> +++ b/arch/arm/mach-at91/at91sam9g45.c
> @@ -239,8 +239,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi0_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.1", &twi1_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.0", &ssc0_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.1", &ssc1_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "atmel-trng", &trng_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index b159607..27e3bf6 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -1459,7 +1459,7 @@ static struct resource ssc0_resources[] = {
>  };
>  
>  static struct platform_device at91sam9g45_ssc0_device = {
> -	.name	= "ssc",
> +	.name	= "at91sam9g45_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc0_dmamask,
> @@ -1501,7 +1501,7 @@ static struct resource ssc1_resources[] = {
>  };
>  
>  static struct platform_device at91sam9g45_ssc1_device = {
> -	.name	= "ssc",
> +	.name	= "at91sam9g45_ssc",
>  	.id	= 1,
>  	.dev	= {
>  		.dma_mask		= &ssc1_dmamask,
> diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
> index 72e9084..4110b54 100644
> --- a/arch/arm/mach-at91/at91sam9rl.c
> +++ b/arch/arm/mach-at91/at91sam9rl.c
> @@ -184,8 +184,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
>  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
>  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
> -	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
> +	CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk),
>  	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk),
>  	CLKDEV_CON_ID("pioA", &pioA_clk),
> diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
> index d6ca054..01220c7 100644
> --- a/arch/arm/mach-at91/at91sam9rl_devices.c
> +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
> @@ -832,7 +832,7 @@ static struct resource ssc0_resources[] = {
>  };
>  
>  static struct platform_device at91sam9rl_ssc0_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 0,
>  	.dev	= {
>  		.dma_mask		= &ssc0_dmamask,
> @@ -874,7 +874,7 @@ static struct resource ssc1_resources[] = {
>  };
>  
>  static struct platform_device at91sam9rl_ssc1_device = {
> -	.name	= "ssc",
> +	.name	= "at91rm9200_ssc",
>  	.id	= 1,
>  	.dev	= {
>  		.dma_mask		= &ssc1_dmamask,
> diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
> index ac00f83..f40abd8 100644
> --- a/drivers/misc/atmel-ssc.c
> +++ b/drivers/misc/atmel-ssc.c
> @@ -68,6 +68,26 @@ void ssc_free(struct ssc_device *ssc)
>  }
>  EXPORT_SYMBOL(ssc_free);
>  
> +static struct atmel_ssc_platform_data at91rm9200_config = {
> +	.use_dma = 0,
> +};
> +
> +static struct atmel_ssc_platform_data at91sam9g45_config = {
> +	.use_dma = 1,
> +};
> +
> +static const struct platform_device_id atmel_ssc_devtypes[] = {
> +	{
> +		.name = "at91rm9200_ssc",
> +		.driver_data = (unsigned long) &at91rm9200_config,
> +	}, {
> +		.name = "at91sam9g45_ssc",
> +		.driver_data = (unsigned long) &at91sam9g45_config,
> +	}, {
> +		/* sentinel */
> +	}
> +};
> +
>  static int ssc_probe(struct platform_device *pdev)
>  {
>  	struct resource *regs;
> @@ -80,6 +100,8 @@ static int ssc_probe(struct platform_device *pdev)
>  	}
>  
>  	ssc->pdev = pdev;
> +	ssc->pdata = (struct atmel_ssc_platform_data *)
> +			platform_get_device_id(pdev)->driver_data;
>  
>  	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!regs) {
> @@ -139,6 +161,7 @@ static struct platform_driver ssc_driver = {
>  		.name		= "ssc",
>  		.owner		= THIS_MODULE,
>  	},
> +	.id_table	= atmel_ssc_devtypes,
>  	.probe		= ssc_probe,
>  	.remove		= __devexit_p(ssc_remove),
>  };
> diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h
> index 4eb3175..1ca0e32 100644
> --- a/include/linux/atmel-ssc.h
> +++ b/include/linux/atmel-ssc.h
> @@ -5,10 +5,15 @@
>  #include <linux/list.h>
>  #include <linux/io.h>
>  
> +struct atmel_ssc_platform_data {
> +	int			use_dma;
> +};
> +
>  struct ssc_device {
>  	struct list_head	list;
>  	void __iomem		*regs;
>  	struct platform_device	*pdev;
> +	struct atmel_ssc_platform_data *pdata;
>  	struct clk		*clk;
>  	int			user;
>  	int			irq;
> -- 
> 1.7.9.5
> 

^ permalink raw reply

* [GIT PULL] Calxeda ECX-2000 support
From: Olof Johansson @ 2012-11-06 14:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50917936.2030405@gmail.com>

On Wed, Oct 31, 2012 at 02:17:10PM -0500, Rob Herring wrote:
> Arnd, Olof,
> 
> Please pull support for Calxeda ECX-2000 SOC.
> 
> There will be a trivial conflict with the GIC move to drivers/irqchip once
> that goes in. 
> 
> Rob
> 
> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> 
>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
> 
> are available in the git repository at:
> 
>   git://sources.calxeda.com/kernel/linux.git tags/calxeda-ecx-2000

Thanks, pulled into next/soc.


-Olof

^ permalink raw reply

* [PATCH 00/15] ARM: Patchset for CLPS711X
From: Olof Johansson @ 2012-11-06 14:44 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1351762006-27368-16-git-send-email-shc_work@mail.ru>

On Thu, Nov 01, 2012 at 01:26:46PM +0400, Alexander Shiyan wrote:
> Here is a next small patchset for a CLPS711X-target.
> The main direction of this patchset - approaching the platform to the
> possibility of using configurations with multiple platforms in a single
> kernel. Added support of the majority of the necessary kernel symbol.
> Also part of the driver code used only for the platform was moved to the
> board code and converted to the use of standard drivers.

Hi,

Based on the pending comments from Russell, I'll hold off merging these. Please
repost with his comments addressed and I'll be happy to merge this set.

Thanks,

-Olof

^ permalink raw reply

* [PATCH v3 9/9] pinctrl: single: dump pinmux register value
From: Linus Walleij @ 2012-11-06 14:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAN1soZxVp73uNWD7Q9r_3X1hCA=JhMiMpx2UMPPGiXBtQ2QjAA@mail.gmail.com>

On Thu, Nov 1, 2012 at 6:48 AM, Haojian Zhuang <haojian.zhuang@gmail.com> wrote:
> On Thu, Nov 1, 2012 at 1:47 AM, Tony Lindgren <tony@atomide.com> wrote:

>>>  static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
>>>                                       struct seq_file *s,
>>> -                                     unsigned offset)
>>> +                                     unsigned pin)
>>>  {
>>>       struct pcs_device *pcs;
>>> -     unsigned val;
>>> +     unsigned val, mux_bytes;
>>>
>>>       pcs = pinctrl_dev_get_drvdata(pctldev);
>>>
>>> -     val = pcs->read(pcs->base + offset);
>>> -     val &= pcs->fmask;
>>> +     mux_bytes = pcs->width / BITS_PER_BYTE;
>>> +     val = pcs->read(pcs->base + pin * mux_bytes);
>>>
>>>       seq_printf(s, "%08x %s " , val, DRIVER_NAME);
>>>  }
>>> --
>>> 1.7.10.4
>>>
>
> There's also include a bug fix. I'm OK that this patch could be
> included in -rc cycle.

A debug print can by definition not be a regression, it
should not have a specific use other than debugging.

And those debugging can use linux-next or separate
patches or whatever ... better keep this series together.

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH 11/15] ARM: OMAP: timer: Interchange clksrc and clkevt for AM33XX
From: Bedia, Vaibhav @ 2012-11-06 14:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <509836BA.5030507@ti.com>

Hi Santosh,

On Tue, Nov 06, 2012 at 03:29:22, Shilimkar, Santosh wrote:

[...]

> >
> > IMO, assuming that idle will not be useful from the begining is leading
> > down the path to poor design choices that will be much more difficult to
> > fixup down the road in order to add idle support later.  We need to
> > design both idle and suspend at the same time.
> >
> I agree with Kevin. Not supporting CPUIDLE deep states can hit the
> active power numbers dearly. I just don't know why the SOCs don't share
> the standard and must have design choices. But thats another discussion.
> 

Yes, active power numbers are not comparable to OMAP :(

> How about leaving the timer choices as is. PER timer for clock source
> and wakeuptimer for clock event. Anyway in suspend the clock-source
> can be suspended and that is evident from recent discussion. The only
> downside is you won't count time in suspend which is any way the case.
> 
> Vaibhav,
> Do you guys see any implementation bottleneck for above ?
> 

Looking at the timekeeping code I see one more potential reason for making
this change. OMAP registers the 32k sync timer as the persistent clock and
since there's no 32k sync timer in AM33xx it doesn't register a persistent
clock right now. Based on what I understood, we need to have to register
one and DMTimer1 is the only clock that can serve as the persistent clock
in suspend state. When we do so we might as well use it as the clocksource.

A related question that I had was, is there a mechanism to handle the 32k
counter (DMTimer or sync timer) wraparound condition in suspend?

Regards,
Vaibhav

^ permalink raw reply

* [PATCH v2] ARM: plat-versatile: move FPGA irq driver to drivers/irqchip
From: Arnd Bergmann @ 2012-11-06 14:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121105231410.GK28327@n2100.arm.linux.org.uk>

On Monday 05 November 2012, Russell King - ARM Linux wrote:
> On Mon, Nov 05, 2012 at 10:42:26PM +0000, Arnd Bergmann wrote:
> > On Monday 05 November 2012, Rob Herring wrote:
> > > But this should work:
> > > 
> > > if (!handle_arch_irq)
> > >         handle_arch_irq = fpga_handle_irq;
> > > 
> > > As long as the primary controller is always initialized first, this will
> > > work. This is guaranteed by DT of_irq_init, and you will probably have
> > > other problems if that wasn't the case for non-DT.
> > 
> > How about adding a top-level function in arch/arm that does the assignment
> > and hides the handle_arch_irq variable:
> > 
> > void set_handle_irq(void (*handle_irq)(struct pt_regs *))
> > {
> >       if (WARN_ON(handle_arch_irq))
> >               return;
> > 
> >       handle_arch_irq = handle_irq;
> > }
> > EXPORT_SYMBOL_GPL(set_handle_irq);
> > 
> > Hmm, maybe putting the top-level handler into a loadable module is a bit
> > far-fetched, but one can hope ;-)
> 
> Definitely no point in exporting this (never export a symbol unless you
> really want to use it from a module) - if you don't already have something
> in handle_arch_irq, you're not going to get anywhere near the module
> loader.

Yes, I agree. While I think we might theoretically get to the point where
even the main IRQ handler can be in a module loaded from initramfs, we
are not anywhere close to that now, and it would be better to just export
the symbol once it actually gets used that way.

The one case where I think we might use it earlier is when we have an irq
chip driver that can be either a primary or a secondary chip. It has
to call set_handle_irq() in the former case (as a built-in driver), but
could be a module in the latter case. If this actually happens, we might
want to export the symbol rather than adding an "#ifdef MODULE" in the
driver.

	Arnd

^ permalink raw reply

* [GIT PULL][for 3.8] pull request from upload/board in arch-pxa git tree
From: Paul Parsons @ 2012-11-06 14:34 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121106140051.GB27284@quad.lixom.net>

Hello Olof,

On 06/11/12 14:00, Olof Johansson wrote:
> On Sun, Oct 28, 2012 at 07:59:54AM +0800, Haojian Zhuang wrote:
>> ----------------------------------------------------------------
>> Paul Parsons (1):
>>        ARM: pxa2xx: Remove EXPERIMENTAL dependency from spi-pxa2xx driver
>
> This is a SPI driver change, and should either go through or be acked by that
> maintainer. In this particular case, there's been several series of the
> EXPERIMENTAL removals, and I think Kees Cook has one that removes it for all
> options in one go. So please ack that patch instead.

According to the current MAINTAINERS file, the drivers/spi/spi-pxa2xx*
driver is maintained by the PXA2xx/PXA3xx guys.
That is why I submitted this patch to the linux-arm-kernel list.
Is the MAINTAINERS file incorrect?

Regards,
Paul

^ permalink raw reply

* [PATCH] ARM: dts: add missing ux500 device trees
From: Linus Walleij @ 2012-11-06 14:33 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1352209871-25202-1-git-send-email-fabio.baltieri@linaro.org>

On Tue, Nov 6, 2012 at 2:51 PM, Fabio Baltieri
<fabio.baltieri@linaro.org> wrote:

> This adds hrefprev60, hrefv60plus and ccu9540 to device trees compiled
> during build.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH 11/15] ARM: OMAP: timer: Interchange clksrc and clkevt for AM33XX
From: Bedia, Vaibhav @ 2012-11-06 14:33 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <87pq3s7wro.fsf@deeprootsystems.com>

Hi Kevin,

On Mon, Nov 05, 2012 at 23:33:07, Kevin Hilman wrote:
> "Bedia, Vaibhav" <vaibhav.bedia@ti.com> writes:
> 
> > On Sat, Nov 03, 2012 at 18:34:30, Kevin Hilman wrote:
> > [...]
> >> >>
> >> >> Doesn't this also mean that you won't get timer wakeups
> >> >> in idle?  Or are you keeping the domain where the clockevent is
> >> >> on during idle?
> >> >>
> >> >
> >> > The lowest idle state that we are targeting will have MPU powered
> >> > off with external memory in self-refresh mode. Peripheral domain
> >> > with the clockevent will be kept on.
> >> 
> >> Is this a limitation of the hardware?  or the software?
> >> 
> >
> > Well, making the lowest idle state same as the suspend state will
> > require us to involve WKUP_M3 in the idle path and wakeup sources get
> > limited to the IPs in the WKUP domain alone. There's no IO daisy
> > chaining in AM33XX so that's one big difference compared to OMAP.  The
> > other potential problem is that the IPC mechanism that we have uses
> > interrupts.
> 
> It can still interrupt the M3, it's only the interrupt back to the MPU
> that is the issue, right?  That being said, there's no reason it
> couldn't use polling in the idle path, right?  
> 

Yes we could use polling but I think we have a bigger problem in the
chip architecture.

> > Assuming that the lowest idle state, say Cx, is the same as the
> > suspend state, we'll need to communicate with the WKUP_M3 using
> > interrupts once we decide to enter Cx. I am not sure if we can do
> > something in the cpuidle implementation to work around the "interrupt
> > for idle" problem. 
> >
> > We could probably not wait for an ACK when we want to enter Cx, 
> 
> why not?
> 
> Are the response times from the M3 really up to 500ms (guessing based on
> the timeout you used in the suspend path.)  That seems rather unlikely.
> 

No 500ms is too high. Actual delays would be much lower, I need to check
with the design team on the expected number.

> Hmm, but as I think about it.  Why does the MPU need to wait for an ACK
> at all?  Why not just send the cmd and WFI?
> 

I have myself being going back and forth on this. There are lot of things
that we do in software, DDR being one of them. We can't do some of the
DDR related stuff unless memory enter self-refresh AND EMIF gets disabled.
Doing so essentially means that the drivers have entered sort of suspend
state. Given this h/w limitation I don't see how we could handle without
impacting a running system.

> > but the problem of limited wakeup sources remains. If we let the
> > various drivers block the entry to Cx, since almost all the IPs are in
> > the peripheral domain a system which uses anything other than UART and
> > Timer in WKUP domain will probably never be able enter Cx.
> 
> Even so, I think the system needs to be designed to hit the same power
> states in idle and suspend.  Then, the states can be restricted based
> wakeup capabilities as you described.  This would be easy to do in the
> runtime PM implementation for this device.
> 
> IMO, assuming that idle will not be useful from the begining is leading
> down the path to poor design choices that will be much more difficult to
> fixup down the road in order to add idle support later.  We need to
> design both idle and suspend at the same time.
> 

Getting PER to transition on a running system is something I can't figure out.
Maybe MPU OFF is the lowest we can go.

> Also, don't forget about GPIO0.  Systems could easily be built such that
> peripherals which want to wakeup but don't have native wakeup
> capabilities could use a GPIO in bank 0 to wake the system.
> 
> Similarily, I2C0 is in WKUP, and brought out to capes, so some simple
> designs with with I2C devices on a cape might be perfectly capable of
> hitting deep power states in idle.
> 

Ok this is interesting. AFAIK I2C wakeup requires the device to be operating
in slave mode. If so, is this something that's already supported on OMAP?

Regards,
Vaibhav

^ 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