RE: [PATCH v8 6/9] ARM: dts: add AM33XX EDMA support

2013-03-05 Thread Kumar, Anil
Hi,

On Wed, Mar 06, 2013 at 02:23:12, Porter, Matt wrote:
> Adds AM33XX EDMA support to the am33xx.dtsi as documented in
> Documentation/devicetree/bindings/dma/ti-edma.txt
> 
> Signed-off-by: Matt Porter 
> ---
>  arch/arm/boot/dts/am33xx.dtsi |   20 
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 0957645..aaf44122 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -87,6 +87,26 @@
>   reg = <0x4820 0x1000>;
>   };
>  
> + edma: edma@4900 {
> + compatible = "ti,edma3";
> + ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
> + reg =   <0x4900 0x1>,
> + <0x44e10f90 0x10>;
> + interrupt-parent = <>;

Is it really need of "interrupt-parent = <>" here ?
as this property is already with root node.  
I am taking reference of 3.9-rc1

Thanks,
Anil

> + interrupts = <12 13 14>;
> + #dma-cells = <1>;
> + dma-channels = <64>;
> + ti,edma-regions = <4>;
> + ti,edma-slots = <256>;
> + ti,edma-queue-tc-map = <0 0
> + 1 1
> + 2 2>;
> + ti,edma-queue-priority-map = <0 0
> +   1 1
> +   2 2>;
> + ti,edma-default-queue = <0>;
> + };
> +
>   gpio1: gpio@44e07000 {
>   compatible = "ti,omap4-gpio";
>   ti,hwmods = "gpio1";
> -- 
> 1.7.9.5
> 
> ___
> Davinci-linux-open-source mailing list
> davinci-linux-open-sou...@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v8 6/9] ARM: dts: add AM33XX EDMA support

2013-03-05 Thread Kumar, Anil
Hi,

On Wed, Mar 06, 2013 at 02:23:12, Porter, Matt wrote:
 Adds AM33XX EDMA support to the am33xx.dtsi as documented in
 Documentation/devicetree/bindings/dma/ti-edma.txt
 
 Signed-off-by: Matt Porter mpor...@ti.com
 ---
  arch/arm/boot/dts/am33xx.dtsi |   20 
  1 file changed, 20 insertions(+)
 
 diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
 index 0957645..aaf44122 100644
 --- a/arch/arm/boot/dts/am33xx.dtsi
 +++ b/arch/arm/boot/dts/am33xx.dtsi
 @@ -87,6 +87,26 @@
   reg = 0x4820 0x1000;
   };
  
 + edma: edma@4900 {
 + compatible = ti,edma3;
 + ti,hwmods = tpcc, tptc0, tptc1, tptc2;
 + reg =   0x4900 0x1,
 + 0x44e10f90 0x10;
 + interrupt-parent = intc;

Is it really need of interrupt-parent = intc here ?
as this property is already with root node.  
I am taking reference of 3.9-rc1

Thanks,
Anil

 + interrupts = 12 13 14;
 + #dma-cells = 1;
 + dma-channels = 64;
 + ti,edma-regions = 4;
 + ti,edma-slots = 256;
 + ti,edma-queue-tc-map = 0 0
 + 1 1
 + 2 2;
 + ti,edma-queue-priority-map = 0 0
 +   1 1
 +   2 2;
 + ti,edma-default-queue = 0;
 + };
 +
   gpio1: gpio@44e07000 {
   compatible = ti,omap4-gpio;
   ti,hwmods = gpio1;
 -- 
 1.7.9.5
 
 ___
 Davinci-linux-open-source mailing list
 davinci-linux-open-sou...@linux.davincidsp.com
 http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V2] watchdog: davinci_wdt: update to devm_* API

2013-02-17 Thread Kumar, Anil
Hi,

On Fri, Feb 08, 2013 at 13:09:30, Kumar, Anil wrote:
> Update the code to use devm_* API so that driver
> core will manage resources.
> 
> Signed-off-by: Kumar, Anil 
> ---
> This patch applies on top of v3.8-rc6.
> 
> Tested on da850 EVM.
> 
> Changes for V2:
>  - Use return -EADDRNOTAVAIL in case of devm_request_and_ioremap() fail.
>  - Use devm_clk_get() instead of clk_get().
>  - Revert back the change for *dev.
>  - Removes static type for "wdt_mem" structure as it is used only
>inside the function now. 
>

Gentle Ping. As there are no review comments on this patch,
Could you please pull this patch ?


> :100644 100644 e8e8724... 7df1fdc... Mdrivers/watchdog/davinci_wdt.c
>  drivers/watchdog/davinci_wdt.c |   29 ++---
>  1 files changed, 6 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index e8e8724..7df1fdc 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
> @@ -69,7 +69,6 @@ static unsigned long wdt_status;
>  #define WDT_REGION_INITED 2
>  #define WDT_DEVICE_INITED 3
>  
> -static struct resource   *wdt_mem;
>  static void __iomem  *wdt_base;
>  struct clk   *wdt_clk;
>  
> @@ -201,10 +200,11 @@ static struct miscdevice davinci_wdt_miscdev = {
>  
>  static int davinci_wdt_probe(struct platform_device *pdev)
>  {
> - int ret = 0, size;
> + int ret = 0;
>   struct device *dev = >dev;
> + struct resource  *wdt_mem;
>  
> - wdt_clk = clk_get(dev, NULL);
> + wdt_clk = devm_clk_get(dev, NULL);
>   if (WARN_ON(IS_ERR(wdt_clk)))
>   return PTR_ERR(wdt_clk);
>  
> @@ -221,43 +221,26 @@ static int davinci_wdt_probe(struct platform_device 
> *pdev)
>   return -ENOENT;
>   }
>  
> - size = resource_size(wdt_mem);
> - if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
> - dev_err(dev, "failed to get memory region\n");
> - return -ENOENT;
> - }
> -
> - wdt_base = ioremap(wdt_mem->start, size);
> + wdt_base = devm_request_and_ioremap(dev, wdt_mem);
>   if (!wdt_base) {
> - dev_err(dev, "failed to map memory region\n");
> - release_mem_region(wdt_mem->start, size);
> - wdt_mem = NULL;
> - return -ENOMEM;
> + dev_err(dev, "ioremap failed\n");
> + return -EADDRNOTAVAIL;
>   }
>  
>   ret = misc_register(_wdt_miscdev);
>   if (ret < 0) {
>   dev_err(dev, "cannot register misc device\n");
> - release_mem_region(wdt_mem->start, size);
> - wdt_mem = NULL;
>   } else {
>   set_bit(WDT_DEVICE_INITED, _status);
>   }
>  
> - iounmap(wdt_base);
>   return ret;
>  }
>  
>  static int davinci_wdt_remove(struct platform_device *pdev)
>  {
>   misc_deregister(_wdt_miscdev);
> - if (wdt_mem) {
> - release_mem_region(wdt_mem->start, resource_size(wdt_mem));
> - wdt_mem = NULL;
> - }
> -
>   clk_disable_unprepare(wdt_clk);
> - clk_put(wdt_clk);
>  
>   return 0;
>  }
> -- 
> 1.7.4.1
> 
> 

Thanks,
Anil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V2] watchdog: davinci_wdt: update to devm_* API

2013-02-17 Thread Kumar, Anil
Hi,

On Fri, Feb 08, 2013 at 13:09:30, Kumar, Anil wrote:
 Update the code to use devm_* API so that driver
 core will manage resources.
 
 Signed-off-by: Kumar, Anil anilkuma...@ti.com
 ---
 This patch applies on top of v3.8-rc6.
 
 Tested on da850 EVM.
 
 Changes for V2:
  - Use return -EADDRNOTAVAIL in case of devm_request_and_ioremap() fail.
  - Use devm_clk_get() instead of clk_get().
  - Revert back the change for *dev.
  - Removes static type for wdt_mem structure as it is used only
inside the function now. 


Gentle Ping. As there are no review comments on this patch,
Could you please pull this patch ?


 :100644 100644 e8e8724... 7df1fdc... Mdrivers/watchdog/davinci_wdt.c
  drivers/watchdog/davinci_wdt.c |   29 ++---
  1 files changed, 6 insertions(+), 23 deletions(-)
 
 diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
 index e8e8724..7df1fdc 100644
 --- a/drivers/watchdog/davinci_wdt.c
 +++ b/drivers/watchdog/davinci_wdt.c
 @@ -69,7 +69,6 @@ static unsigned long wdt_status;
  #define WDT_REGION_INITED 2
  #define WDT_DEVICE_INITED 3
  
 -static struct resource   *wdt_mem;
  static void __iomem  *wdt_base;
  struct clk   *wdt_clk;
  
 @@ -201,10 +200,11 @@ static struct miscdevice davinci_wdt_miscdev = {
  
  static int davinci_wdt_probe(struct platform_device *pdev)
  {
 - int ret = 0, size;
 + int ret = 0;
   struct device *dev = pdev-dev;
 + struct resource  *wdt_mem;
  
 - wdt_clk = clk_get(dev, NULL);
 + wdt_clk = devm_clk_get(dev, NULL);
   if (WARN_ON(IS_ERR(wdt_clk)))
   return PTR_ERR(wdt_clk);
  
 @@ -221,43 +221,26 @@ static int davinci_wdt_probe(struct platform_device 
 *pdev)
   return -ENOENT;
   }
  
 - size = resource_size(wdt_mem);
 - if (!request_mem_region(wdt_mem-start, size, pdev-name)) {
 - dev_err(dev, failed to get memory region\n);
 - return -ENOENT;
 - }
 -
 - wdt_base = ioremap(wdt_mem-start, size);
 + wdt_base = devm_request_and_ioremap(dev, wdt_mem);
   if (!wdt_base) {
 - dev_err(dev, failed to map memory region\n);
 - release_mem_region(wdt_mem-start, size);
 - wdt_mem = NULL;
 - return -ENOMEM;
 + dev_err(dev, ioremap failed\n);
 + return -EADDRNOTAVAIL;
   }
  
   ret = misc_register(davinci_wdt_miscdev);
   if (ret  0) {
   dev_err(dev, cannot register misc device\n);
 - release_mem_region(wdt_mem-start, size);
 - wdt_mem = NULL;
   } else {
   set_bit(WDT_DEVICE_INITED, wdt_status);
   }
  
 - iounmap(wdt_base);
   return ret;
  }
  
  static int davinci_wdt_remove(struct platform_device *pdev)
  {
   misc_deregister(davinci_wdt_miscdev);
 - if (wdt_mem) {
 - release_mem_region(wdt_mem-start, resource_size(wdt_mem));
 - wdt_mem = NULL;
 - }
 -
   clk_disable_unprepare(wdt_clk);
 - clk_put(wdt_clk);
  
   return 0;
  }
 -- 
 1.7.4.1
 
 

Thanks,
Anil
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] pinctrl: pinctrl-single: fix the binding documentation

2013-02-10 Thread Kumar, Anil
As there are no use of #address-cells and #size-cells properties
in pinctrl-single driver DT node. Fix pinctrl-single binding documentation
to remove these properties.

Signed-off-by: Kumar, Anil 
---
Tested on da850 EVM.

:100644 100644 2c81e45... c6384e2... M  
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 .../devicetree/bindings/pinctrl/pinctrl-single.txt |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt 
b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
index 2c81e45..c6384e2 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
@@ -50,8 +50,6 @@ Example:
 pmx_core: pinmux@4a100040 {
compatible = "pinctrl-single";
reg = <0x4a100040 0x0196>;
-   #address-cells = <1>;
-   #size-cells = <0>;
pinctrl-single,register-width = <16>;
pinctrl-single,function-mask = <0x>;
 };
@@ -60,8 +58,6 @@ pmx_core: pinmux@4a100040 {
 pmx_wkup: pinmux@4a31e040 {
compatible = "pinctrl-single;
reg = <0x4a31e040 0x0038>;
-   #address-cells = <1>;
-   #size-cells = <0>;
pinctrl-single,register-width = <16>;
pinctrl-single,function-mask = <0x>;
 };
@@ -69,8 +65,6 @@ pmx_wkup: pinmux@4a31e040 {
 control_devconf0: pinmux@48002274 {
compatible = "pinctrl-single";
reg = <0x48002274 4>;   /* Single register */
-   #address-cells = <1>;
-   #size-cells = <0>;
pinctrl-single,bit-per-mux;
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x5F>;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] pinctrl: pinctrl-single: fix the binding documentation

2013-02-10 Thread Kumar, Anil
As there are no use of #address-cells and #size-cells properties
in pinctrl-single driver DT node. Fix pinctrl-single binding documentation
to remove these properties.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
Tested on da850 EVM.

:100644 100644 2c81e45... c6384e2... M  
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 .../devicetree/bindings/pinctrl/pinctrl-single.txt |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt 
b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
index 2c81e45..c6384e2 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
@@ -50,8 +50,6 @@ Example:
 pmx_core: pinmux@4a100040 {
compatible = pinctrl-single;
reg = 0x4a100040 0x0196;
-   #address-cells = 1;
-   #size-cells = 0;
pinctrl-single,register-width = 16;
pinctrl-single,function-mask = 0x;
 };
@@ -60,8 +58,6 @@ pmx_core: pinmux@4a100040 {
 pmx_wkup: pinmux@4a31e040 {
compatible = pinctrl-single;
reg = 0x4a31e040 0x0038;
-   #address-cells = 1;
-   #size-cells = 0;
pinctrl-single,register-width = 16;
pinctrl-single,function-mask = 0x;
 };
@@ -69,8 +65,6 @@ pmx_wkup: pinmux@4a31e040 {
 control_devconf0: pinmux@48002274 {
compatible = pinctrl-single;
reg = 0x48002274 4;   /* Single register */
-   #address-cells = 1;
-   #size-cells = 0;
pinctrl-single,bit-per-mux;
pinctrl-single,register-width = 32;
pinctrl-single,function-mask = 0x5F;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Update the code to use devm_* API so that driver
core will manage resources.

Signed-off-by: Kumar, Anil 
---
This patch applies on top of v3.8-rc6.

Tested on da850 EVM.

Changes for V2:
 - Use return -EADDRNOTAVAIL in case of devm_request_and_ioremap() fail.
 - Use devm_clk_get() instead of clk_get().
 - Revert back the change for *dev.
 - Removes static type for "wdt_mem" structure as it is used only
   inside the function now. 

:100644 100644 e8e8724... 7df1fdc... M  drivers/watchdog/davinci_wdt.c
 drivers/watchdog/davinci_wdt.c |   29 ++---
 1 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index e8e8724..7df1fdc 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -69,7 +69,6 @@ static unsigned long wdt_status;
 #define WDT_REGION_INITED 2
 #define WDT_DEVICE_INITED 3
 
-static struct resource *wdt_mem;
 static void __iomem*wdt_base;
 struct clk *wdt_clk;
 
@@ -201,10 +200,11 @@ static struct miscdevice davinci_wdt_miscdev = {
 
 static int davinci_wdt_probe(struct platform_device *pdev)
 {
-   int ret = 0, size;
+   int ret = 0;
struct device *dev = >dev;
+   struct resource  *wdt_mem;
 
-   wdt_clk = clk_get(dev, NULL);
+   wdt_clk = devm_clk_get(dev, NULL);
if (WARN_ON(IS_ERR(wdt_clk)))
return PTR_ERR(wdt_clk);
 
@@ -221,43 +221,26 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return -ENOENT;
}
 
-   size = resource_size(wdt_mem);
-   if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
-   dev_err(dev, "failed to get memory region\n");
-   return -ENOENT;
-   }
-
-   wdt_base = ioremap(wdt_mem->start, size);
+   wdt_base = devm_request_and_ioremap(dev, wdt_mem);
if (!wdt_base) {
-   dev_err(dev, "failed to map memory region\n");
-   release_mem_region(wdt_mem->start, size);
-   wdt_mem = NULL;
-   return -ENOMEM;
+   dev_err(dev, "ioremap failed\n");
+   return -EADDRNOTAVAIL;
}
 
ret = misc_register(_wdt_miscdev);
if (ret < 0) {
dev_err(dev, "cannot register misc device\n");
-   release_mem_region(wdt_mem->start, size);
-   wdt_mem = NULL;
} else {
set_bit(WDT_DEVICE_INITED, _status);
}
 
-   iounmap(wdt_base);
return ret;
 }
 
 static int davinci_wdt_remove(struct platform_device *pdev)
 {
misc_deregister(_wdt_miscdev);
-   if (wdt_mem) {
-   release_mem_region(wdt_mem->start, resource_size(wdt_mem));
-   wdt_mem = NULL;
-   }
-
clk_disable_unprepare(wdt_clk);
-   clk_put(wdt_clk);
 
return 0;
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
On Thu, Feb 07, 2013 at 09:02:15, Kumar, Anil wrote:
> Update the code to use devm_* API so that driver
> core will manage resources.
> 
> Signed-off-by: Kumar, Anil 
> ---
> This patch applies on top of v3.8-rc6.
> 
> Tested on da850 EVM.
> 
> :100644 100644 e8e8724... 6ad76a3... Mdrivers/watchdog/davinci_wdt.c
>  drivers/watchdog/davinci_wdt.c |   34 +-
>  1 files changed, 9 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index e8e8724..6ad76a3 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
> @@ -69,7 +69,6 @@ static unsigned long wdt_status;
>  #define WDT_REGION_INITED 2
>  #define WDT_DEVICE_INITED 3
>  
> -static struct resource   *wdt_mem;
>  static void __iomem  *wdt_base;
>  struct clk   *wdt_clk;
>  
> @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
>  
>  static int davinci_wdt_probe(struct platform_device *pdev)
>  {
> - int ret = 0, size;
> - struct device *dev = >dev;
> + int ret = 0;
> + static struct resource  *wdt_mem;
>  
> - wdt_clk = clk_get(dev, NULL);
> + wdt_clk = clk_get(>dev, NULL);
>   if (WARN_ON(IS_ERR(wdt_clk)))
>   return PTR_ERR(wdt_clk);
>  
> @@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device 
> *pdev)
>   if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
>   heartbeat = DEFAULT_HEARTBEAT;
>  
> - dev_info(dev, "heartbeat %d sec\n", heartbeat);
> + dev_info(>dev, "heartbeat %d sec\n", heartbeat);
>  
>   wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   if (wdt_mem == NULL) {
> - dev_err(dev, "failed to get memory region resource\n");
> + dev_err(>dev, "failed to get memory region resource\n");
>   return -ENOENT;
>   }
>  
> - size = resource_size(wdt_mem);
> - if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
> - dev_err(dev, "failed to get memory region\n");
> - return -ENOENT;
> - }
> -
> - wdt_base = ioremap(wdt_mem->start, size);
> + wdt_base = devm_request_and_ioremap(>dev, wdt_mem);
>   if (!wdt_base) {
> - dev_err(dev, "failed to map memory region\n");
> - release_mem_region(wdt_mem->start, size);
> - wdt_mem = NULL;
> + dev_err(>dev, "ioremap failed\n");
>   return -ENOMEM;
>   }
>  
>   ret = misc_register(_wdt_miscdev);
>   if (ret < 0) {
> - dev_err(dev, "cannot register misc device\n");
> - release_mem_region(wdt_mem->start, size);
> - wdt_mem = NULL;
> + dev_err(>dev, "cannot register misc device\n");
>   } else {
>   set_bit(WDT_DEVICE_INITED, _status);
> + return ret;

No need of return "ret" as it is retuning "ret" just below.
I will fix it in V2.

>   }
>  
> - iounmap(wdt_base);
>   return ret;
>  }
>  
>  static int davinci_wdt_remove(struct platform_device *pdev)
>  {
>   misc_deregister(_wdt_miscdev);
> - if (wdt_mem) {
> - release_mem_region(wdt_mem->start, resource_size(wdt_mem));
> - wdt_mem = NULL;
> - }
> -
>   clk_disable_unprepare(wdt_clk);
>   clk_put(wdt_clk);
>  
> -- 
> 1.7.4.1
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
On Fri, Feb 08, 2013 at 09:49:27, Nori, Sekhar wrote:
> On 2/8/2013 8:05 AM, Kumar, Anil wrote:
> > On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
> >> On 2/7/2013 9:02 AM, Kumar, Anil wrote:
> 
> >>> Update the code to use devm_* API so that driver
> >>> core will manage resources.
> 
> >>> Signed-off-by: Kumar, Anil 
> 
> >>> diff --git a/drivers/watchdog/davinci_wdt.c 
> >>> b/drivers/watchdog/davinci_wdt.c
> 
> >>> @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
> >>>  
> >>>  static int davinci_wdt_probe(struct platform_device *pdev)
> >>>  {
> >>> - int ret = 0, size;
> >>> - struct device *dev = >dev;
> >>
> >> Its not clear why you had to drop use of this variable?
> > 
> > Actually, I have not found any particular need to take pointer
> > into dev and then use in the code. Rather we can directly use. 
> 
> No, it is good enough as-is. It will help rid your patch of unnecessary
> changes and its not really convenient to to keep reading >dev all
> the time.
> 

Ok

Thanks,
Anil 



RE: [PATCH V2 2/2] ARM: davinci: restart: fix wdt to machine restart with DT

2013-02-07 Thread Kumar, Anil
Hi Sekhar,

Thanks for the review.

On Thu, Feb 07, 2013 at 23:45:53, Nori, Sekhar wrote:
> 
> On 2/6/2013 9:30 AM, Kumar, Anil wrote:
> > In non DT case da8xx_register_watchdog() is called to register platform 
> > device
> > "da8xx_wdt_device" by board file. But in DT case it is not called and wdt
> > device get registered via wdt DT node.
> > 
> > Currently code is passing platform device "da8xx_wdt_device" in
> > "davinci_watchdog_reset" function in both DT and non DT case and that
> > leads to crash in DT boot.
> > 
> > Update restart function to make it generic DaVinci machine restart
> 
> s/DaVinci/da8xx. Also, subject can simply be "ARM: davinci: da850 DT:
> add support for machine reboot" since reboot never worked with DT
> before, "fix" isn't really appropriate.

ok

> 
> > in case of DT and non DT boot.
> > 
> > Signed-off-by: Kumar, Anil 
> > ---
> > :100644 100644 2d5502d... 1df68fd... M  
> > arch/arm/mach-davinci/devices-da8xx.c
> > :100644 100644 700d311... ef9f70e... M  
> > arch/arm/mach-davinci/include/mach/da8xx.h
> >  arch/arm/mach-davinci/devices-da8xx.c  |   14 --
> >  arch/arm/mach-davinci/include/mach/da8xx.h |1 -
> >  2 files changed, 12 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-davinci/devices-da8xx.c 
> > b/arch/arm/mach-davinci/devices-da8xx.c
> > index 2d5502d..1df68fd 100644
> > --- a/arch/arm/mach-davinci/devices-da8xx.c
> > +++ b/arch/arm/mach-davinci/devices-da8xx.c
> > @@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
> > },
> >  };
> >  
> > -struct platform_device da8xx_wdt_device = {
> > +static struct platform_device da8xx_wdt_device = {
> 
> Making of da8xx_wdt_device static should find a mention in description.

Ok, 
I made da8xx_wdt_device structure static as it is used only
in file. I will update description for this.

> 
> > .name   = "watchdog",
> > .id = -1,
> > .num_resources  = ARRAY_SIZE(da8xx_watchdog_resources),
> > @@ -368,7 +368,17 @@ struct platform_device da8xx_wdt_device = {
> >  
> >  void da8xx_restart(char mode, const char *cmd)
> >  {
> > -   davinci_watchdog_reset(_wdt_device);
> > +   struct device *dev = NULL;
> > +   struct platform_device *wdt_device = NULL;
> 
> No need to initialize these variables here.

Ok,
I think no need to define wdt_device, can be used as

davinci_watchdog_reset(to_platform_device(dev));

> 
> > +
> > +   dev = bus_find_device_by_name(_bus_type, NULL, "watchdog");
> > +   if (!dev) {
> > +   pr_err("wdt device not found to machine reboot\n");
> 
> Rather: "%s: failed to find watchdog device", __func__

ok
Thanks,
Anil


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Hi Sekhar,

Thanks for the review. 

On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
> 
> On 2/7/2013 9:02 AM, Kumar, Anil wrote:
> > Update the code to use devm_* API so that driver
> > core will manage resources.
> > 
> > Signed-off-by: Kumar, Anil 
> > ---
> > This patch applies on top of v3.8-rc6.
> > 
> > Tested on da850 EVM.
> > 
> > :100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
> >  drivers/watchdog/davinci_wdt.c |   34 +-
> >  1 files changed, 9 insertions(+), 25 deletions(-)
> > 
> > diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> > index e8e8724..6ad76a3 100644
> > --- a/drivers/watchdog/davinci_wdt.c
> > +++ b/drivers/watchdog/davinci_wdt.c
> > @@ -69,7 +69,6 @@ static unsigned long wdt_status;
> >  #define WDT_REGION_INITED 2
> >  #define WDT_DEVICE_INITED 3
> >  
> > -static struct resource *wdt_mem;
> >  static void __iomem*wdt_base;
> >  struct clk *wdt_clk;
> >  
> > @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
> >  
> >  static int davinci_wdt_probe(struct platform_device *pdev)
> >  {
> > -   int ret = 0, size;
> > -   struct device *dev = >dev;
> 
> Its not clear why you had to drop use of this variable?

Actually, I have not found any particular need to take pointer
into dev and then use in the code. Rather we can directly use.  

> 
> > +   int ret = 0;
> > +   static struct resource  *wdt_mem;
> >  
> > -   wdt_clk = clk_get(dev, NULL);
> > +   wdt_clk = clk_get(>dev, NULL);
> 
> When you are converting to use devres, why not convert this to
> devm_clk_get() as well?
> 
Right. I will do it.

Thanks,
Anil



RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Hi Sergei

On Thu, Feb 07, 2013 at 16:51:37, Sergei Shtylyov wrote:
> Hello.
> 
> On 07-02-2013 7:32, Kumar, Anil wrote:
> 
> > Update the code to use devm_* API so that driver
> > core will manage resources.
> 
> > Signed-off-by: Kumar, Anil 
> > ---
> > This patch applies on top of v3.8-rc6.
> 
> > Tested on da850 EVM.
> 
> > :100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
> >   drivers/watchdog/davinci_wdt.c |   34 +-
> >   1 files changed, 9 insertions(+), 25 deletions(-)
> 
> > diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> > index e8e8724..6ad76a3 100644
> > --- a/drivers/watchdog/davinci_wdt.c
> > +++ b/drivers/watchdog/davinci_wdt.c
> [...]
> > @@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device 
> > *pdev)
> [...]
> > -   size = resource_size(wdt_mem);
> > -   if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
> > -   dev_err(dev, "failed to get memory region\n");
> > -   return -ENOENT;
> > -   }
> > -
> > -   wdt_base = ioremap(wdt_mem->start, size);
> > +   wdt_base = devm_request_and_ioremap(>dev, wdt_mem);
> > if (!wdt_base) {
> > -   dev_err(dev, "failed to map memory region\n");
> > -   release_mem_region(wdt_mem->start, size);
> > -   wdt_mem = NULL;
> > +   dev_err(>dev, "ioremap failed\n");
> > return -ENOMEM;
> 
> Comment to devm_request_and_ioremap() suggest returning -EADDRNOTAVAIL 
> instead.

Right. 

Thanks,
Anil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Hi Sergei

On Thu, Feb 07, 2013 at 16:51:37, Sergei Shtylyov wrote:
 Hello.
 
 On 07-02-2013 7:32, Kumar, Anil wrote:
 
  Update the code to use devm_* API so that driver
  core will manage resources.
 
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  ---
  This patch applies on top of v3.8-rc6.
 
  Tested on da850 EVM.
 
  :100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
drivers/watchdog/davinci_wdt.c |   34 +-
1 files changed, 9 insertions(+), 25 deletions(-)
 
  diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
  index e8e8724..6ad76a3 100644
  --- a/drivers/watchdog/davinci_wdt.c
  +++ b/drivers/watchdog/davinci_wdt.c
 [...]
  @@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device 
  *pdev)
 [...]
  -   size = resource_size(wdt_mem);
  -   if (!request_mem_region(wdt_mem-start, size, pdev-name)) {
  -   dev_err(dev, failed to get memory region\n);
  -   return -ENOENT;
  -   }
  -
  -   wdt_base = ioremap(wdt_mem-start, size);
  +   wdt_base = devm_request_and_ioremap(pdev-dev, wdt_mem);
  if (!wdt_base) {
  -   dev_err(dev, failed to map memory region\n);
  -   release_mem_region(wdt_mem-start, size);
  -   wdt_mem = NULL;
  +   dev_err(pdev-dev, ioremap failed\n);
  return -ENOMEM;
 
 Comment to devm_request_and_ioremap() suggest returning -EADDRNOTAVAIL 
 instead.

Right. 

Thanks,
Anil
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Hi Sekhar,

Thanks for the review. 

On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
 
 On 2/7/2013 9:02 AM, Kumar, Anil wrote:
  Update the code to use devm_* API so that driver
  core will manage resources.
  
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  ---
  This patch applies on top of v3.8-rc6.
  
  Tested on da850 EVM.
  
  :100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
   drivers/watchdog/davinci_wdt.c |   34 +-
   1 files changed, 9 insertions(+), 25 deletions(-)
  
  diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
  index e8e8724..6ad76a3 100644
  --- a/drivers/watchdog/davinci_wdt.c
  +++ b/drivers/watchdog/davinci_wdt.c
  @@ -69,7 +69,6 @@ static unsigned long wdt_status;
   #define WDT_REGION_INITED 2
   #define WDT_DEVICE_INITED 3
   
  -static struct resource *wdt_mem;
   static void __iomem*wdt_base;
   struct clk *wdt_clk;
   
  @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
   
   static int davinci_wdt_probe(struct platform_device *pdev)
   {
  -   int ret = 0, size;
  -   struct device *dev = pdev-dev;
 
 Its not clear why you had to drop use of this variable?

Actually, I have not found any particular need to take pointer
into dev and then use in the code. Rather we can directly use.  

 
  +   int ret = 0;
  +   static struct resource  *wdt_mem;
   
  -   wdt_clk = clk_get(dev, NULL);
  +   wdt_clk = clk_get(pdev-dev, NULL);
 
 When you are converting to use devres, why not convert this to
 devm_clk_get() as well?
 
Right. I will do it.

Thanks,
Anil



RE: [PATCH V2 2/2] ARM: davinci: restart: fix wdt to machine restart with DT

2013-02-07 Thread Kumar, Anil
Hi Sekhar,

Thanks for the review.

On Thu, Feb 07, 2013 at 23:45:53, Nori, Sekhar wrote:
 
 On 2/6/2013 9:30 AM, Kumar, Anil wrote:
  In non DT case da8xx_register_watchdog() is called to register platform 
  device
  da8xx_wdt_device by board file. But in DT case it is not called and wdt
  device get registered via wdt DT node.
  
  Currently code is passing platform device da8xx_wdt_device in
  davinci_watchdog_reset function in both DT and non DT case and that
  leads to crash in DT boot.
  
  Update restart function to make it generic DaVinci machine restart
 
 s/DaVinci/da8xx. Also, subject can simply be ARM: davinci: da850 DT:
 add support for machine reboot since reboot never worked with DT
 before, fix isn't really appropriate.

ok

 
  in case of DT and non DT boot.
  
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  ---
  :100644 100644 2d5502d... 1df68fd... M  
  arch/arm/mach-davinci/devices-da8xx.c
  :100644 100644 700d311... ef9f70e... M  
  arch/arm/mach-davinci/include/mach/da8xx.h
   arch/arm/mach-davinci/devices-da8xx.c  |   14 --
   arch/arm/mach-davinci/include/mach/da8xx.h |1 -
   2 files changed, 12 insertions(+), 3 deletions(-)
  
  diff --git a/arch/arm/mach-davinci/devices-da8xx.c 
  b/arch/arm/mach-davinci/devices-da8xx.c
  index 2d5502d..1df68fd 100644
  --- a/arch/arm/mach-davinci/devices-da8xx.c
  +++ b/arch/arm/mach-davinci/devices-da8xx.c
  @@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
  },
   };
   
  -struct platform_device da8xx_wdt_device = {
  +static struct platform_device da8xx_wdt_device = {
 
 Making of da8xx_wdt_device static should find a mention in description.

Ok, 
I made da8xx_wdt_device structure static as it is used only
in file. I will update description for this.

 
  .name   = watchdog,
  .id = -1,
  .num_resources  = ARRAY_SIZE(da8xx_watchdog_resources),
  @@ -368,7 +368,17 @@ struct platform_device da8xx_wdt_device = {
   
   void da8xx_restart(char mode, const char *cmd)
   {
  -   davinci_watchdog_reset(da8xx_wdt_device);
  +   struct device *dev = NULL;
  +   struct platform_device *wdt_device = NULL;
 
 No need to initialize these variables here.

Ok,
I think no need to define wdt_device, can be used as

davinci_watchdog_reset(to_platform_device(dev));

 
  +
  +   dev = bus_find_device_by_name(platform_bus_type, NULL, watchdog);
  +   if (!dev) {
  +   pr_err(wdt device not found to machine reboot\n);
 
 Rather: %s: failed to find watchdog device, __func__

ok
Thanks,
Anil


RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
On Fri, Feb 08, 2013 at 09:49:27, Nori, Sekhar wrote:
 On 2/8/2013 8:05 AM, Kumar, Anil wrote:
  On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
  On 2/7/2013 9:02 AM, Kumar, Anil wrote:
 
  Update the code to use devm_* API so that driver
  core will manage resources.
 
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
 
  diff --git a/drivers/watchdog/davinci_wdt.c 
  b/drivers/watchdog/davinci_wdt.c
 
  @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
   
   static int davinci_wdt_probe(struct platform_device *pdev)
   {
  - int ret = 0, size;
  - struct device *dev = pdev-dev;
 
  Its not clear why you had to drop use of this variable?
  
  Actually, I have not found any particular need to take pointer
  into dev and then use in the code. Rather we can directly use. 
 
 No, it is good enough as-is. It will help rid your patch of unnecessary
 changes and its not really convenient to to keep reading pdev-dev all
 the time.
 

Ok

Thanks,
Anil 



RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
On Thu, Feb 07, 2013 at 09:02:15, Kumar, Anil wrote:
 Update the code to use devm_* API so that driver
 core will manage resources.
 
 Signed-off-by: Kumar, Anil anilkuma...@ti.com
 ---
 This patch applies on top of v3.8-rc6.
 
 Tested on da850 EVM.
 
 :100644 100644 e8e8724... 6ad76a3... Mdrivers/watchdog/davinci_wdt.c
  drivers/watchdog/davinci_wdt.c |   34 +-
  1 files changed, 9 insertions(+), 25 deletions(-)
 
 diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
 index e8e8724..6ad76a3 100644
 --- a/drivers/watchdog/davinci_wdt.c
 +++ b/drivers/watchdog/davinci_wdt.c
 @@ -69,7 +69,6 @@ static unsigned long wdt_status;
  #define WDT_REGION_INITED 2
  #define WDT_DEVICE_INITED 3
  
 -static struct resource   *wdt_mem;
  static void __iomem  *wdt_base;
  struct clk   *wdt_clk;
  
 @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
  
  static int davinci_wdt_probe(struct platform_device *pdev)
  {
 - int ret = 0, size;
 - struct device *dev = pdev-dev;
 + int ret = 0;
 + static struct resource  *wdt_mem;
  
 - wdt_clk = clk_get(dev, NULL);
 + wdt_clk = clk_get(pdev-dev, NULL);
   if (WARN_ON(IS_ERR(wdt_clk)))
   return PTR_ERR(wdt_clk);
  
 @@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device 
 *pdev)
   if (heartbeat  1 || heartbeat  MAX_HEARTBEAT)
   heartbeat = DEFAULT_HEARTBEAT;
  
 - dev_info(dev, heartbeat %d sec\n, heartbeat);
 + dev_info(pdev-dev, heartbeat %d sec\n, heartbeat);
  
   wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   if (wdt_mem == NULL) {
 - dev_err(dev, failed to get memory region resource\n);
 + dev_err(pdev-dev, failed to get memory region resource\n);
   return -ENOENT;
   }
  
 - size = resource_size(wdt_mem);
 - if (!request_mem_region(wdt_mem-start, size, pdev-name)) {
 - dev_err(dev, failed to get memory region\n);
 - return -ENOENT;
 - }
 -
 - wdt_base = ioremap(wdt_mem-start, size);
 + wdt_base = devm_request_and_ioremap(pdev-dev, wdt_mem);
   if (!wdt_base) {
 - dev_err(dev, failed to map memory region\n);
 - release_mem_region(wdt_mem-start, size);
 - wdt_mem = NULL;
 + dev_err(pdev-dev, ioremap failed\n);
   return -ENOMEM;
   }
  
   ret = misc_register(davinci_wdt_miscdev);
   if (ret  0) {
 - dev_err(dev, cannot register misc device\n);
 - release_mem_region(wdt_mem-start, size);
 - wdt_mem = NULL;
 + dev_err(pdev-dev, cannot register misc device\n);
   } else {
   set_bit(WDT_DEVICE_INITED, wdt_status);
 + return ret;

No need of return ret as it is retuning ret just below.
I will fix it in V2.

   }
  
 - iounmap(wdt_base);
   return ret;
  }
  
  static int davinci_wdt_remove(struct platform_device *pdev)
  {
   misc_deregister(davinci_wdt_miscdev);
 - if (wdt_mem) {
 - release_mem_region(wdt_mem-start, resource_size(wdt_mem));
 - wdt_mem = NULL;
 - }
 -
   clk_disable_unprepare(wdt_clk);
   clk_put(wdt_clk);
  
 -- 
 1.7.4.1
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] watchdog: davinci_wdt: update to devm_* API

2013-02-07 Thread Kumar, Anil
Update the code to use devm_* API so that driver
core will manage resources.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
This patch applies on top of v3.8-rc6.

Tested on da850 EVM.

Changes for V2:
 - Use return -EADDRNOTAVAIL in case of devm_request_and_ioremap() fail.
 - Use devm_clk_get() instead of clk_get().
 - Revert back the change for *dev.
 - Removes static type for wdt_mem structure as it is used only
   inside the function now. 

:100644 100644 e8e8724... 7df1fdc... M  drivers/watchdog/davinci_wdt.c
 drivers/watchdog/davinci_wdt.c |   29 ++---
 1 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index e8e8724..7df1fdc 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -69,7 +69,6 @@ static unsigned long wdt_status;
 #define WDT_REGION_INITED 2
 #define WDT_DEVICE_INITED 3
 
-static struct resource *wdt_mem;
 static void __iomem*wdt_base;
 struct clk *wdt_clk;
 
@@ -201,10 +200,11 @@ static struct miscdevice davinci_wdt_miscdev = {
 
 static int davinci_wdt_probe(struct platform_device *pdev)
 {
-   int ret = 0, size;
+   int ret = 0;
struct device *dev = pdev-dev;
+   struct resource  *wdt_mem;
 
-   wdt_clk = clk_get(dev, NULL);
+   wdt_clk = devm_clk_get(dev, NULL);
if (WARN_ON(IS_ERR(wdt_clk)))
return PTR_ERR(wdt_clk);
 
@@ -221,43 +221,26 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return -ENOENT;
}
 
-   size = resource_size(wdt_mem);
-   if (!request_mem_region(wdt_mem-start, size, pdev-name)) {
-   dev_err(dev, failed to get memory region\n);
-   return -ENOENT;
-   }
-
-   wdt_base = ioremap(wdt_mem-start, size);
+   wdt_base = devm_request_and_ioremap(dev, wdt_mem);
if (!wdt_base) {
-   dev_err(dev, failed to map memory region\n);
-   release_mem_region(wdt_mem-start, size);
-   wdt_mem = NULL;
-   return -ENOMEM;
+   dev_err(dev, ioremap failed\n);
+   return -EADDRNOTAVAIL;
}
 
ret = misc_register(davinci_wdt_miscdev);
if (ret  0) {
dev_err(dev, cannot register misc device\n);
-   release_mem_region(wdt_mem-start, size);
-   wdt_mem = NULL;
} else {
set_bit(WDT_DEVICE_INITED, wdt_status);
}
 
-   iounmap(wdt_base);
return ret;
 }
 
 static int davinci_wdt_remove(struct platform_device *pdev)
 {
misc_deregister(davinci_wdt_miscdev);
-   if (wdt_mem) {
-   release_mem_region(wdt_mem-start, resource_size(wdt_mem));
-   wdt_mem = NULL;
-   }
-
clk_disable_unprepare(wdt_clk);
-   clk_put(wdt_clk);
 
return 0;
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-06 Thread Kumar, Anil
Update the code to use devm_* API so that driver
core will manage resources.

Signed-off-by: Kumar, Anil 
---
This patch applies on top of v3.8-rc6.

Tested on da850 EVM.

:100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
 drivers/watchdog/davinci_wdt.c |   34 +-
 1 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index e8e8724..6ad76a3 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -69,7 +69,6 @@ static unsigned long wdt_status;
 #define WDT_REGION_INITED 2
 #define WDT_DEVICE_INITED 3
 
-static struct resource *wdt_mem;
 static void __iomem*wdt_base;
 struct clk *wdt_clk;
 
@@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
 
 static int davinci_wdt_probe(struct platform_device *pdev)
 {
-   int ret = 0, size;
-   struct device *dev = >dev;
+   int ret = 0;
+   static struct resource  *wdt_mem;
 
-   wdt_clk = clk_get(dev, NULL);
+   wdt_clk = clk_get(>dev, NULL);
if (WARN_ON(IS_ERR(wdt_clk)))
return PTR_ERR(wdt_clk);
 
@@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device *pdev)
if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
heartbeat = DEFAULT_HEARTBEAT;
 
-   dev_info(dev, "heartbeat %d sec\n", heartbeat);
+   dev_info(>dev, "heartbeat %d sec\n", heartbeat);
 
wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (wdt_mem == NULL) {
-   dev_err(dev, "failed to get memory region resource\n");
+   dev_err(>dev, "failed to get memory region resource\n");
return -ENOENT;
}
 
-   size = resource_size(wdt_mem);
-   if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
-   dev_err(dev, "failed to get memory region\n");
-   return -ENOENT;
-   }
-
-   wdt_base = ioremap(wdt_mem->start, size);
+   wdt_base = devm_request_and_ioremap(>dev, wdt_mem);
if (!wdt_base) {
-   dev_err(dev, "failed to map memory region\n");
-   release_mem_region(wdt_mem->start, size);
-   wdt_mem = NULL;
+   dev_err(>dev, "ioremap failed\n");
return -ENOMEM;
}
 
ret = misc_register(_wdt_miscdev);
if (ret < 0) {
-   dev_err(dev, "cannot register misc device\n");
-   release_mem_region(wdt_mem->start, size);
-   wdt_mem = NULL;
+   dev_err(>dev, "cannot register misc device\n");
} else {
set_bit(WDT_DEVICE_INITED, _status);
+   return ret;
}
 
-   iounmap(wdt_base);
return ret;
 }
 
 static int davinci_wdt_remove(struct platform_device *pdev)
 {
misc_deregister(_wdt_miscdev);
-   if (wdt_mem) {
-   release_mem_region(wdt_mem->start, resource_size(wdt_mem));
-   wdt_mem = NULL;
-   }
-
clk_disable_unprepare(wdt_clk);
clk_put(wdt_clk);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] watchdog: davinci_wdt: update to devm_* API

2013-02-06 Thread Kumar, Anil
Update the code to use devm_* API so that driver
core will manage resources.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
This patch applies on top of v3.8-rc6.

Tested on da850 EVM.

:100644 100644 e8e8724... 6ad76a3... M  drivers/watchdog/davinci_wdt.c
 drivers/watchdog/davinci_wdt.c |   34 +-
 1 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index e8e8724..6ad76a3 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -69,7 +69,6 @@ static unsigned long wdt_status;
 #define WDT_REGION_INITED 2
 #define WDT_DEVICE_INITED 3
 
-static struct resource *wdt_mem;
 static void __iomem*wdt_base;
 struct clk *wdt_clk;
 
@@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
 
 static int davinci_wdt_probe(struct platform_device *pdev)
 {
-   int ret = 0, size;
-   struct device *dev = pdev-dev;
+   int ret = 0;
+   static struct resource  *wdt_mem;
 
-   wdt_clk = clk_get(dev, NULL);
+   wdt_clk = clk_get(pdev-dev, NULL);
if (WARN_ON(IS_ERR(wdt_clk)))
return PTR_ERR(wdt_clk);
 
@@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device *pdev)
if (heartbeat  1 || heartbeat  MAX_HEARTBEAT)
heartbeat = DEFAULT_HEARTBEAT;
 
-   dev_info(dev, heartbeat %d sec\n, heartbeat);
+   dev_info(pdev-dev, heartbeat %d sec\n, heartbeat);
 
wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (wdt_mem == NULL) {
-   dev_err(dev, failed to get memory region resource\n);
+   dev_err(pdev-dev, failed to get memory region resource\n);
return -ENOENT;
}
 
-   size = resource_size(wdt_mem);
-   if (!request_mem_region(wdt_mem-start, size, pdev-name)) {
-   dev_err(dev, failed to get memory region\n);
-   return -ENOENT;
-   }
-
-   wdt_base = ioremap(wdt_mem-start, size);
+   wdt_base = devm_request_and_ioremap(pdev-dev, wdt_mem);
if (!wdt_base) {
-   dev_err(dev, failed to map memory region\n);
-   release_mem_region(wdt_mem-start, size);
-   wdt_mem = NULL;
+   dev_err(pdev-dev, ioremap failed\n);
return -ENOMEM;
}
 
ret = misc_register(davinci_wdt_miscdev);
if (ret  0) {
-   dev_err(dev, cannot register misc device\n);
-   release_mem_region(wdt_mem-start, size);
-   wdt_mem = NULL;
+   dev_err(pdev-dev, cannot register misc device\n);
} else {
set_bit(WDT_DEVICE_INITED, wdt_status);
+   return ret;
}
 
-   iounmap(wdt_base);
return ret;
 }
 
 static int davinci_wdt_remove(struct platform_device *pdev)
 {
misc_deregister(davinci_wdt_miscdev);
-   if (wdt_mem) {
-   release_mem_region(wdt_mem-start, resource_size(wdt_mem));
-   wdt_mem = NULL;
-   }
-
clk_disable_unprepare(wdt_clk);
clk_put(wdt_clk);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 0/2] ARM: davinci: da850: add wdt DT node

2013-02-05 Thread Kumar, Anil
Add wdt DT node and OF_DEV_AUXDATA for wdt driver in
da850 board dt file to use wdt clock.

This is tested on da850 EVM.

Test Procedure:

$watchdog -F /dev/watchdog (Device should not reboot)
 After wdt heartbeat timeout(DEFAULT_HEARTBEAT is 60 sec)
$ctr + c   (Device should reboot after heartbeat timeout)

Changes since V1:

 - Rebase changes on top of v3.8-rc6.
 - Make single patch for wdt DT node and its OF_DEV_AUXDATA entry changes.
 - Fix wdt to machine restart with DT.

Kumar, Anil (2):
  ARM: davinci: da850: add wdt DT node
  ARM: davinci: restart: fix wdt to machine restart with DT

 arch/arm/boot/dts/da850-evm.dts|3 +++
 arch/arm/boot/dts/da850.dtsi   |5 +
 arch/arm/mach-davinci/da8xx-dt.c   |8 +++-
 arch/arm/mach-davinci/devices-da8xx.c  |   14 --
 arch/arm/mach-davinci/include/mach/da8xx.h |1 -
 5 files changed, 27 insertions(+), 4 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 2/2] ARM: davinci: restart: fix wdt to machine restart with DT

2013-02-05 Thread Kumar, Anil
In non DT case da8xx_register_watchdog() is called to register platform device
"da8xx_wdt_device" by board file. But in DT case it is not called and wdt
device get registered via wdt DT node.

Currently code is passing platform device "da8xx_wdt_device" in
"davinci_watchdog_reset" function in both DT and non DT case and that
leads to crash in DT boot.

Update restart function to make it generic DaVinci machine restart
in case of DT and non DT boot.

Signed-off-by: Kumar, Anil 
---
:100644 100644 2d5502d... 1df68fd... M  arch/arm/mach-davinci/devices-da8xx.c
:100644 100644 700d311... ef9f70e... M  
arch/arm/mach-davinci/include/mach/da8xx.h
 arch/arm/mach-davinci/devices-da8xx.c  |   14 --
 arch/arm/mach-davinci/include/mach/da8xx.h |1 -
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-davinci/devices-da8xx.c 
b/arch/arm/mach-davinci/devices-da8xx.c
index 2d5502d..1df68fd 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
},
 };
 
-struct platform_device da8xx_wdt_device = {
+static struct platform_device da8xx_wdt_device = {
.name   = "watchdog",
.id = -1,
.num_resources  = ARRAY_SIZE(da8xx_watchdog_resources),
@@ -368,7 +368,17 @@ struct platform_device da8xx_wdt_device = {
 
 void da8xx_restart(char mode, const char *cmd)
 {
-   davinci_watchdog_reset(_wdt_device);
+   struct device *dev = NULL;
+   struct platform_device *wdt_device = NULL;
+
+   dev = bus_find_device_by_name(_bus_type, NULL, "watchdog");
+   if (!dev) {
+   pr_err("wdt device not found to machine reboot\n");
+   return;
+   }
+
+   wdt_device = to_platform_device(dev);
+   davinci_watchdog_reset(wdt_device);
 }
 
 int __init da8xx_register_watchdog(void)
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h 
b/arch/arm/mach-davinci/include/mach/da8xx.h
index 700d311..ef9f70e 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -112,7 +112,6 @@ extern struct da8xx_lcdc_platform_data 
sharp_lcd035q3dg01_pdata;
 extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;
 extern struct davinci_spi_platform_data da8xx_spi_pdata[];
 
-extern struct platform_device da8xx_wdt_device;
 
 extern const short da830_emif25_pins[];
 extern const short da830_spi0_pins[];
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 1/2] ARM: davinci: da850: add wdt DT node

2013-02-05 Thread Kumar, Anil
Add da850 wdt DT node.
Add OF_DEV_AUXDATA for wdt driver to use wdt clock.

Signed-off-by: Kumar, Anil 
---
Changes for V2:

 -Make single patch for wdt DT node and its OF_DEV_AUXDATA entry changes.

:100644 100644 37dc5a3... 4666ce9... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 640ab75... ffba00f... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 37c27af... 01521ed... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/boot/dts/da850-evm.dts  |3 +++
 arch/arm/boot/dts/da850.dtsi |5 +
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 3 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..4666ce9 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -24,5 +24,8 @@
serial2: serial@1d0d000 {
status = "okay";
};
+   wdt: wdt@1c21000 {
+   status = "okay";
+   };
};
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 640ab75..ffba00f 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -56,5 +56,10 @@
interrupt-parent = <>;
status = "disabled";
};
+   wdt: wdt@1c21000 {
+   compatible = "ti,davinci-wdt";
+   reg = <0x21000 0x1000>;
+   status = "disabled";
+   };
};
 };
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..01521ed 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
of_irq_init(da8xx_irq_match);
 }
 
+struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
+   OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
+   {}
+};
+
 #ifdef CONFIG_ARCH_DAVINCI_DA850
 
 static void __init da850_init_machine(void)
 {
-   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+   of_platform_populate(NULL, of_default_bus_match_table,
+   da850_auxdata_lookup, NULL);
 
da8xx_uart_clk_enable();
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 1/2] ARM: davinci: da850: add wdt DT node

2013-02-05 Thread Kumar, Anil
Add da850 wdt DT node.
Add OF_DEV_AUXDATA for wdt driver to use wdt clock.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
Changes for V2:

 -Make single patch for wdt DT node and its OF_DEV_AUXDATA entry changes.

:100644 100644 37dc5a3... 4666ce9... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 640ab75... ffba00f... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 37c27af... 01521ed... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/boot/dts/da850-evm.dts  |3 +++
 arch/arm/boot/dts/da850.dtsi |5 +
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 3 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..4666ce9 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -24,5 +24,8 @@
serial2: serial@1d0d000 {
status = okay;
};
+   wdt: wdt@1c21000 {
+   status = okay;
+   };
};
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 640ab75..ffba00f 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -56,5 +56,10 @@
interrupt-parent = intc;
status = disabled;
};
+   wdt: wdt@1c21000 {
+   compatible = ti,davinci-wdt;
+   reg = 0x21000 0x1000;
+   status = disabled;
+   };
};
 };
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..01521ed 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
of_irq_init(da8xx_irq_match);
 }
 
+struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
+   OF_DEV_AUXDATA(ti,davinci-wdt, 0x01c21000, watchdog, NULL),
+   {}
+};
+
 #ifdef CONFIG_ARCH_DAVINCI_DA850
 
 static void __init da850_init_machine(void)
 {
-   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+   of_platform_populate(NULL, of_default_bus_match_table,
+   da850_auxdata_lookup, NULL);
 
da8xx_uart_clk_enable();
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 0/2] ARM: davinci: da850: add wdt DT node

2013-02-05 Thread Kumar, Anil
Add wdt DT node and OF_DEV_AUXDATA for wdt driver in
da850 board dt file to use wdt clock.

This is tested on da850 EVM.

Test Procedure:

$watchdog -F /dev/watchdog (Device should not reboot)
 After wdt heartbeat timeout(DEFAULT_HEARTBEAT is 60 sec)
$ctr + c   (Device should reboot after heartbeat timeout)

Changes since V1:

 - Rebase changes on top of v3.8-rc6.
 - Make single patch for wdt DT node and its OF_DEV_AUXDATA entry changes.
 - Fix wdt to machine restart with DT.

Kumar, Anil (2):
  ARM: davinci: da850: add wdt DT node
  ARM: davinci: restart: fix wdt to machine restart with DT

 arch/arm/boot/dts/da850-evm.dts|3 +++
 arch/arm/boot/dts/da850.dtsi   |5 +
 arch/arm/mach-davinci/da8xx-dt.c   |8 +++-
 arch/arm/mach-davinci/devices-da8xx.c  |   14 --
 arch/arm/mach-davinci/include/mach/da8xx.h |1 -
 5 files changed, 27 insertions(+), 4 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 2/2] ARM: davinci: restart: fix wdt to machine restart with DT

2013-02-05 Thread Kumar, Anil
In non DT case da8xx_register_watchdog() is called to register platform device
da8xx_wdt_device by board file. But in DT case it is not called and wdt
device get registered via wdt DT node.

Currently code is passing platform device da8xx_wdt_device in
davinci_watchdog_reset function in both DT and non DT case and that
leads to crash in DT boot.

Update restart function to make it generic DaVinci machine restart
in case of DT and non DT boot.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 2d5502d... 1df68fd... M  arch/arm/mach-davinci/devices-da8xx.c
:100644 100644 700d311... ef9f70e... M  
arch/arm/mach-davinci/include/mach/da8xx.h
 arch/arm/mach-davinci/devices-da8xx.c  |   14 --
 arch/arm/mach-davinci/include/mach/da8xx.h |1 -
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-davinci/devices-da8xx.c 
b/arch/arm/mach-davinci/devices-da8xx.c
index 2d5502d..1df68fd 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
},
 };
 
-struct platform_device da8xx_wdt_device = {
+static struct platform_device da8xx_wdt_device = {
.name   = watchdog,
.id = -1,
.num_resources  = ARRAY_SIZE(da8xx_watchdog_resources),
@@ -368,7 +368,17 @@ struct platform_device da8xx_wdt_device = {
 
 void da8xx_restart(char mode, const char *cmd)
 {
-   davinci_watchdog_reset(da8xx_wdt_device);
+   struct device *dev = NULL;
+   struct platform_device *wdt_device = NULL;
+
+   dev = bus_find_device_by_name(platform_bus_type, NULL, watchdog);
+   if (!dev) {
+   pr_err(wdt device not found to machine reboot\n);
+   return;
+   }
+
+   wdt_device = to_platform_device(dev);
+   davinci_watchdog_reset(wdt_device);
 }
 
 int __init da8xx_register_watchdog(void)
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h 
b/arch/arm/mach-davinci/include/mach/da8xx.h
index 700d311..ef9f70e 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -112,7 +112,6 @@ extern struct da8xx_lcdc_platform_data 
sharp_lcd035q3dg01_pdata;
 extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;
 extern struct davinci_spi_platform_data da8xx_spi_pdata[];
 
-extern struct platform_device da8xx_wdt_device;
 
 extern const short da830_emif25_pins[];
 extern const short da830_spi0_pins[];
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-02-04 Thread Kumar, Anil
Hi Serqei,

On Mon, Feb 04, 2013 at 17:30:20, Sergei Shtylyov wrote:
> Hello.
> 
> On 04-02-2013 15:50, Sekhar Nori wrote:
> 
> > Auxdata is not evm specific. This can instead be called 
> > da850_auxdata_lookup[].
> 
> > Also, I dont think it is necessary to add auxdata in a separate patch
> > from dt nodes. So, I fixed these issues and came up with below patch. I
> > tested basic wdt reboot. reboot command is still broken (with or
> > without this patch). Can you please look at that?
> 
> > Thanks,
> > Sekhar
> 
> > 8<
> > From: "Kumar, Anil" 
> > Date: Thu, 24 Jan 2013 14:08:14 +0530
> > Subject: [PATCH 1/1] ARM: davinci: da850: add wdt DT node
> 
> > Add da850 wdt DT node.
> 
> > Signed-off-by: Kumar, Anil 
> > Signed-off-by: Sekhar Nori 
> [...]
> 
> > diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> > index 8dd15c0..2800090 100644
> > --- a/arch/arm/boot/dts/da850.dtsi
> > +++ b/arch/arm/boot/dts/da850.dtsi
> > @@ -88,6 +88,11 @@
> >   19>;
> > status = "disabled";
> > };
> > +   wdt: wdt@1c21000 {
> > +   compatible = "ti,davinci-wdt";
> > +   reg = <0x21000 0xfff>;
> 
> Not 0x1000? This is region size, not upper limit.

Oh, you are right. It should be 0x1000. Thanks for correcting. 

In da850 timer1 is used as wdt and according to da850 data sheet.

Timer1 start address is 0x01C21000
Timer1 end address is   0x01C21FFF 

I had wrongly calculated upper limit. I will fix it. 

Thanks,
Anil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-02-04 Thread Kumar, Anil
On Mon, Feb 04, 2013 at 17:20:55, Nori, Sekhar wrote:
> Hi Anil,
> 
> On 1/24/2013 2:08 PM, Kumar, Anil wrote:
> > Add OF_DEV_AUXDATA for wdt driver in da850 board dt
> > file to use wdt clock.
> > 
> > Signed-off-by: Kumar, Anil 
> > ---
> > :100644 100644 37c27af... 1b295d2... M  arch/arm/mach-davinci/da8xx-dt.c
> >  arch/arm/mach-davinci/da8xx-dt.c |8 +++-
> >  1 files changed, 7 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/mach-davinci/da8xx-dt.c 
> > b/arch/arm/mach-davinci/da8xx-dt.c
> > index 37c27af..1b295d2 100644
> > --- a/arch/arm/mach-davinci/da8xx-dt.c
> > +++ b/arch/arm/mach-davinci/da8xx-dt.c
> > @@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
> > of_irq_init(da8xx_irq_match);
> >  }
> >  
> > +struct of_dev_auxdata da850_evm_auxdata_lookup[] __initdata = {
> 
> Auxdata is not evm specific. This can instead be called 
> da850_auxdata_lookup[].

ok

> 
> Also, I dont think it is necessary to add auxdata in a separate patch 
> from dt nodes. So, I fixed these issues and came up with below patch. I 
> tested basic wdt reboot. reboot command is still broken (with or 
> without this patch). Can you please look at that?
> 

ok, I will look into reboot command issue.

> Thanks,
> Sekhar
> 
> 8<
> From: "Kumar, Anil" 
> Date: Thu, 24 Jan 2013 14:08:14 +0530
> Subject: [PATCH 1/1] ARM: davinci: da850: add wdt DT node
> 
> Add da850 wdt DT node.
> 
> Signed-off-by: Kumar, Anil 
> Signed-off-by: Sekhar Nori 
> ---
>  arch/arm/boot/dts/da850-evm.dts  |3 +++
>  arch/arm/boot/dts/da850.dtsi |5 +
>  arch/arm/mach-davinci/da8xx-dt.c |8 +++-
>  3 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index fa04152..cc777dc 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -30,6 +30,9 @@
>   rtc0: rtc@1c23000 {
>   status = "okay";
>   };
> + wdt: wdt@1c21000 {
> + status = "okay";
> + };
>   };
>   nand_cs3@6200 {
>   status = "okay";
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 8dd15c0..2800090 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -88,6 +88,11 @@
> 19>;
>   status = "disabled";
>   };
> + wdt: wdt@1c21000 {
> + compatible = "ti,davinci-wdt";
> + reg = <0x21000 0xfff>;
> + status = "disabled";
> + };
>   };
>   nand_cs3@6200 {
>   compatible = "ti,davinci-nand";
> diff --git a/arch/arm/mach-davinci/da8xx-dt.c 
> b/arch/arm/mach-davinci/da8xx-dt.c
> index 37c27af..90c3c69 100644
> --- a/arch/arm/mach-davinci/da8xx-dt.c
> +++ b/arch/arm/mach-davinci/da8xx-dt.c
> @@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
>   of_irq_init(da8xx_irq_match);
>  }
>  
> +struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
> + OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
> + {}
> +};
> +
>  #ifdef CONFIG_ARCH_DAVINCI_DA850
>  
>  static void __init da850_init_machine(void)
>  {
> - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> + of_platform_populate(NULL, of_default_bus_match_table,
> +  da850_auxdata_lookup, NULL);
>  
>   da8xx_uart_clk_enable();
>  }
> 
> 



RE: [PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-02-04 Thread Kumar, Anil
On Mon, Feb 04, 2013 at 17:20:55, Nori, Sekhar wrote:
 Hi Anil,
 
 On 1/24/2013 2:08 PM, Kumar, Anil wrote:
  Add OF_DEV_AUXDATA for wdt driver in da850 board dt
  file to use wdt clock.
  
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  ---
  :100644 100644 37c27af... 1b295d2... M  arch/arm/mach-davinci/da8xx-dt.c
   arch/arm/mach-davinci/da8xx-dt.c |8 +++-
   1 files changed, 7 insertions(+), 1 deletions(-)
  
  diff --git a/arch/arm/mach-davinci/da8xx-dt.c 
  b/arch/arm/mach-davinci/da8xx-dt.c
  index 37c27af..1b295d2 100644
  --- a/arch/arm/mach-davinci/da8xx-dt.c
  +++ b/arch/arm/mach-davinci/da8xx-dt.c
  @@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
  of_irq_init(da8xx_irq_match);
   }
   
  +struct of_dev_auxdata da850_evm_auxdata_lookup[] __initdata = {
 
 Auxdata is not evm specific. This can instead be called 
 da850_auxdata_lookup[].

ok

 
 Also, I dont think it is necessary to add auxdata in a separate patch 
 from dt nodes. So, I fixed these issues and came up with below patch. I 
 tested basic wdt reboot. reboot command is still broken (with or 
 without this patch). Can you please look at that?
 

ok, I will look into reboot command issue.

 Thanks,
 Sekhar
 
 8
 From: Kumar, Anil anilkuma...@ti.com
 Date: Thu, 24 Jan 2013 14:08:14 +0530
 Subject: [PATCH 1/1] ARM: davinci: da850: add wdt DT node
 
 Add da850 wdt DT node.
 
 Signed-off-by: Kumar, Anil anilkuma...@ti.com
 Signed-off-by: Sekhar Nori nsek...@ti.com
 ---
  arch/arm/boot/dts/da850-evm.dts  |3 +++
  arch/arm/boot/dts/da850.dtsi |5 +
  arch/arm/mach-davinci/da8xx-dt.c |8 +++-
  3 files changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
 index fa04152..cc777dc 100644
 --- a/arch/arm/boot/dts/da850-evm.dts
 +++ b/arch/arm/boot/dts/da850-evm.dts
 @@ -30,6 +30,9 @@
   rtc0: rtc@1c23000 {
   status = okay;
   };
 + wdt: wdt@1c21000 {
 + status = okay;
 + };
   };
   nand_cs3@6200 {
   status = okay;
 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
 index 8dd15c0..2800090 100644
 --- a/arch/arm/boot/dts/da850.dtsi
 +++ b/arch/arm/boot/dts/da850.dtsi
 @@ -88,6 +88,11 @@
 19;
   status = disabled;
   };
 + wdt: wdt@1c21000 {
 + compatible = ti,davinci-wdt;
 + reg = 0x21000 0xfff;
 + status = disabled;
 + };
   };
   nand_cs3@6200 {
   compatible = ti,davinci-nand;
 diff --git a/arch/arm/mach-davinci/da8xx-dt.c 
 b/arch/arm/mach-davinci/da8xx-dt.c
 index 37c27af..90c3c69 100644
 --- a/arch/arm/mach-davinci/da8xx-dt.c
 +++ b/arch/arm/mach-davinci/da8xx-dt.c
 @@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
   of_irq_init(da8xx_irq_match);
  }
  
 +struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 + OF_DEV_AUXDATA(ti,davinci-wdt, 0x01c21000, watchdog, NULL),
 + {}
 +};
 +
  #ifdef CONFIG_ARCH_DAVINCI_DA850
  
  static void __init da850_init_machine(void)
  {
 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 + of_platform_populate(NULL, of_default_bus_match_table,
 +  da850_auxdata_lookup, NULL);
  
   da8xx_uart_clk_enable();
  }
 
 



RE: [PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-02-04 Thread Kumar, Anil
Hi Serqei,

On Mon, Feb 04, 2013 at 17:30:20, Sergei Shtylyov wrote:
 Hello.
 
 On 04-02-2013 15:50, Sekhar Nori wrote:
 
  Auxdata is not evm specific. This can instead be called 
  da850_auxdata_lookup[].
 
  Also, I dont think it is necessary to add auxdata in a separate patch
  from dt nodes. So, I fixed these issues and came up with below patch. I
  tested basic wdt reboot. reboot command is still broken (with or
  without this patch). Can you please look at that?
 
  Thanks,
  Sekhar
 
  8
  From: Kumar, Anil anilkuma...@ti.com
  Date: Thu, 24 Jan 2013 14:08:14 +0530
  Subject: [PATCH 1/1] ARM: davinci: da850: add wdt DT node
 
  Add da850 wdt DT node.
 
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  Signed-off-by: Sekhar Nori nsek...@ti.com
 [...]
 
  diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
  index 8dd15c0..2800090 100644
  --- a/arch/arm/boot/dts/da850.dtsi
  +++ b/arch/arm/boot/dts/da850.dtsi
  @@ -88,6 +88,11 @@
19;
  status = disabled;
  };
  +   wdt: wdt@1c21000 {
  +   compatible = ti,davinci-wdt;
  +   reg = 0x21000 0xfff;
 
 Not 0x1000? This is region size, not upper limit.

Oh, you are right. It should be 0x1000. Thanks for correcting. 

In da850 timer1 is used as wdt and according to da850 data sheet.

Timer1 start address is 0x01C21000
Timer1 end address is   0x01C21FFF 

I had wrongly calculated upper limit. I will fix it. 

Thanks,
Anil
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] arm: dts: omap4-sdp: Add I2c pinctrl data

2013-01-30 Thread Kumar, Anil
On Wed, Jan 30, 2013 at 14:36:10, Coelho, Luciano wrote:
> On Wed, 2013-01-30 at 14:18 +0530, Santosh Shilimkar wrote:
> > On Wednesday 30 January 2013 02:13 PM, Kumar, Anil wrote:
> > > Hi Sourav,
> > >
> > > On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
> > >> Hi Luciano,
> > >> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> > >>> Hi Sourav,
> > >>>
> > >>> On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> > >>>> Booting 3.8-rc4 om omap 4430sdp results in the following error
> > >>>>
> > >>>> omap_i2c 4807.i2c: did not get pins for i2c error: -19
> > >>>> [1.024261] omap_i2c 4807.i2c: bus 0 rev0.12 at 100 kHz
> > >>>> [1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: 
> > >>>> -19
> > >>>> [1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> > >>>> [1.043762] omap_i2c 4806.i2c: did not get pins for i2c error: 
> > >>>> -19
> > >>>> [1.050964] omap_i2c 4806.i2c: bus 2 rev0.12 at 100 kHz
> > >>>> [1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: 
> > >>>> -19
> > >>>> [1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> > >>>>
> > >>>> This happens because omap4 dts file is not adapted to use i2c through 
> > >>>> pinctrl
> > >>>> framework. Populating i2c pinctrl data to get rid of the error.
> > >>>>
> > >>>> Tested on omap4430 sdp with 3.8-rc4 kernel.
> > >>>>
> > >>>> Signed-off-by: Sourav Poddar 
> > >>>> Reported-by: Santosh Shilimkar 
> > >>>> ---
> > >>> Could you do the same thing for panda? I'm getting the same kind of
> > >>> errors with it:
> > >
> > > omap4 uses pinctrl-single driver for pinmux with DT. Currently
> > > pinctrl-single driver is getting up after I2C driver. So I2c cannot
> > > use pinctrl. The below patch solve this issue
> > >
> > > http://www.gossamer-threads.com/lists/linux/kernel/1669067
> > >
> > > Can you try with this ? it may solve it.
> > >
> > OMAP i2c driver already takes care of -EPROBE_DEFER. The issue
> > as you see from the log is not probe failure but missing the
> > pin information in DT blob. And thats what patch does.
> 
> Yes, Santosh is right.  I tried this patch, but it didn't fix the
> warnings.

Sorry, I misunderstood this issue.

Anil 



RE: [PATCH] arm: dts: omap4-sdp: Add I2c pinctrl data

2013-01-30 Thread Kumar, Anil
Hi Sourav,

On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
> Hi Luciano,
> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> > Hi Sourav,
> >
> > On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> >> Booting 3.8-rc4 om omap 4430sdp results in the following error
> >>
> >> omap_i2c 4807.i2c: did not get pins for i2c error: -19
> >> [1.024261] omap_i2c 4807.i2c: bus 0 rev0.12 at 100 kHz
> >> [1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> >> [1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> >> [1.043762] omap_i2c 4806.i2c: did not get pins for i2c error: -19
> >> [1.050964] omap_i2c 4806.i2c: bus 2 rev0.12 at 100 kHz
> >> [1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
> >> [1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> >>
> >> This happens because omap4 dts file is not adapted to use i2c through 
> >> pinctrl
> >> framework. Populating i2c pinctrl data to get rid of the error.
> >>
> >> Tested on omap4430 sdp with 3.8-rc4 kernel.
> >>
> >> Signed-off-by: Sourav Poddar 
> >> Reported-by: Santosh Shilimkar 
> >> ---
> > Could you do the same thing for panda? I'm getting the same kind of
> > errors with it:

omap4 uses pinctrl-single driver for pinmux with DT. Currently
pinctrl-single driver is getting up after I2C driver. So I2c cannot
use pinctrl. The below patch solve this issue 

http://www.gossamer-threads.com/lists/linux/kernel/1669067

Can you try with this ? it may solve it.

Thanks,
Anil
[...]

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] arm: dts: omap4-sdp: Add I2c pinctrl data

2013-01-30 Thread Kumar, Anil
Hi Sourav,

On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
 Hi Luciano,
 On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
  Hi Sourav,
 
  On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
  Booting 3.8-rc4 om omap 4430sdp results in the following error
 
  omap_i2c 4807.i2c: did not get pins for i2c error: -19
  [1.024261] omap_i2c 4807.i2c: bus 0 rev0.12 at 100 kHz
  [1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
  [1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
  [1.043762] omap_i2c 4806.i2c: did not get pins for i2c error: -19
  [1.050964] omap_i2c 4806.i2c: bus 2 rev0.12 at 100 kHz
  [1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
  [1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
 
  This happens because omap4 dts file is not adapted to use i2c through 
  pinctrl
  framework. Populating i2c pinctrl data to get rid of the error.
 
  Tested on omap4430 sdp with 3.8-rc4 kernel.
 
  Signed-off-by: Sourav Poddar sourav.pod...@ti.com
  Reported-by: Santosh Shilimkar santosh.shilim...@ti.com
  ---
  Could you do the same thing for panda? I'm getting the same kind of
  errors with it:

omap4 uses pinctrl-single driver for pinmux with DT. Currently
pinctrl-single driver is getting up after I2C driver. So I2c cannot
use pinctrl. The below patch solve this issue 

http://www.gossamer-threads.com/lists/linux/kernel/1669067

Can you try with this ? it may solve it.

Thanks,
Anil
[...]

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] arm: dts: omap4-sdp: Add I2c pinctrl data

2013-01-30 Thread Kumar, Anil
On Wed, Jan 30, 2013 at 14:36:10, Coelho, Luciano wrote:
 On Wed, 2013-01-30 at 14:18 +0530, Santosh Shilimkar wrote:
  On Wednesday 30 January 2013 02:13 PM, Kumar, Anil wrote:
   Hi Sourav,
  
   On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
   Hi Luciano,
   On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
   Hi Sourav,
  
   On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
   Booting 3.8-rc4 om omap 4430sdp results in the following error
  
   omap_i2c 4807.i2c: did not get pins for i2c error: -19
   [1.024261] omap_i2c 4807.i2c: bus 0 rev0.12 at 100 kHz
   [1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: 
   -19
   [1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
   [1.043762] omap_i2c 4806.i2c: did not get pins for i2c error: 
   -19
   [1.050964] omap_i2c 4806.i2c: bus 2 rev0.12 at 100 kHz
   [1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: 
   -19
   [1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
  
   This happens because omap4 dts file is not adapted to use i2c through 
   pinctrl
   framework. Populating i2c pinctrl data to get rid of the error.
  
   Tested on omap4430 sdp with 3.8-rc4 kernel.
  
   Signed-off-by: Sourav Poddar sourav.pod...@ti.com
   Reported-by: Santosh Shilimkar santosh.shilim...@ti.com
   ---
   Could you do the same thing for panda? I'm getting the same kind of
   errors with it:
  
   omap4 uses pinctrl-single driver for pinmux with DT. Currently
   pinctrl-single driver is getting up after I2C driver. So I2c cannot
   use pinctrl. The below patch solve this issue
  
   http://www.gossamer-threads.com/lists/linux/kernel/1669067
  
   Can you try with this ? it may solve it.
  
  OMAP i2c driver already takes care of -EPROBE_DEFER. The issue
  as you see from the log is not probe failure but missing the
  pin information in DT blob. And thats what patch does.
 
 Yes, Santosh is right.  I tried this patch, but it didn't fix the
 warnings.

Sorry, I misunderstood this issue.

Anil 



[PATCH 0/2] DaVinci: da850: Add NOR flash DT node support

2013-01-28 Thread Kumar, Anil
Add NOR flash DT node support for DA850 EVM and related pin mux.
Configure 16 bit data bus width for CS2(aemif) to use the norflash on
DA850.

This series is based on top of 3.8-rc4 and the following patches.

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/
 -ARM: davinci: da850: add pinctrl driver DT entries

Tested on DA850 EVM.

Kumar, Anil (2):
  ARM: davinci: da850 evm: add norflash DT node
  ARM: davinci: da850: configure CS2(aemif) for norflash

 arch/arm/boot/dts/da850-evm.dts  |   25 +++
 arch/arm/boot/dts/da850.dtsi |   41 ++
 arch/arm/mach-davinci/da8xx-dt.c |   17 +++
 3 files changed, 83 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ARM: davinci: da850 evm: add norflash DT node

2013-01-28 Thread Kumar, Anil
Add norflash DT node on DA850 EVM and related pin mux.

Signed-off-by: Kumar, Anil 
---
:100644 100644 087ba28... 95ffeca... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 160ebac... 036b02a... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   25 +++
 arch/arm/boot/dts/da850.dtsi|   41 +++
 2 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 087ba28..95ffeca 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,29 @@
status = "okay";
};
};
+   norflash_cs2@6000 {
+   compatible = "intel,PC28F640P30T85", "cfi-flash";
+   reg = <0x6000 0x1FF>;
+   bank-width = <2>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   linux,mtd-name = "physmap-flash";
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs2_pins>;
+
+   bootloaders_env@0 {
+   label = "bootloaders_env";
+   reg = <0 0x8>;
+   };
+
+   kernel@8 {
+   label = "kernel";
+   reg = <0x8 0x20>;
+   };
+
+   filesystem@28 {
+   label = "filesystem";
+   reg = <0x28 0x58>;
+   };
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 160ebac..036b02a 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,47 @@
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x>;
status = "disabled";
+
+   norflash_cs2_pins: pinmux_norflash_pins{
+   pinctrl-single,bits = <
+   /* EMA_BA[1] */
+   0x14 0x0100 0x0f00
+   /* EMA_CLK, EMA_WAIT[1] */
+   0x18 0x0101 0x0f0f
+   /* EMA_OE, EMA_WE, EMA_CS[2] */
+   0x1c 0x00110001 0x00ff000f
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x 0x
+   /*
+* EMA_D[8], EMA_D[9], EMA_D[10],
+* EMA_D[11], EMA_D[12], EMA_D[13],
+* EMA_D[14], EMA_D[15]
+*/
+   0x20 0x 0x
+   /*
+* EMA_A[0], EMA_A[1], EMA_A[2],
+* EMA_A[3], EMA_A[4], EMA_A[5],
+* EMA_A[6], EMA_A[7]
+*/
+   0x30 0x 0x
+   /*
+* EMA_A[8], EMA_A[9], EMA_A[10],
+* EMA_A[11], EMA_A[12], EMA_A[13],
+* EMA_A[14], EMA_A[15]
+*/
+   0x2c 0x 0x
+   /*
+* EMA_A[16], EMA_A[17], EMA_A[18],
+* EMA_A[19], EMA_A[20], EMA_A[21],
+* EMA_A[22]
+*/
+   0x28 0x1110 0xfff0
+   >;
+   };
};
serial0: serial@1c42000 {
compatible = "ns16550a";
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ARM: davinci: da850: configure CS2(aemif) for norflash

2013-01-28 Thread Kumar, Anil
Configure 16 bit data bus width for CS2(aemif) to use the norflash on
DA850.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37c27af... 540e284... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/mach-davinci/da8xx-dt.c |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..540e284 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -38,12 +38,29 @@ static void __init da8xx_init_irq(void)
 }
 
 #ifdef CONFIG_ARCH_DAVINCI_DA850
+#define DA8XX_AEMIF_CE2CFG_OFFSET   0x10
+#define DA8XX_AEMIF_ASIZE_16BIT 0x1
+
+static void __init da8xx_init_nor(void)
+{
+   void __iomem *aemif_addr;
+
+   aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+
+   /* Configure data bus width of CS2 to 16 bit */
+   writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
+   DA8XX_AEMIF_ASIZE_16BIT,
+   aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
+
+   iounmap(aemif_addr);
+}
 
 static void __init da850_init_machine(void)
 {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
da8xx_uart_clk_enable();
+   da8xx_init_nor();
 }
 
 static const char *da850_boards_compat[] __initdata = {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ARM: davinci: da850: configure CS2(aemif) for norflash

2013-01-28 Thread Kumar, Anil
Configure 16 bit data bus width for CS2(aemif) to use the norflash on
DA850.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37c27af... 540e284... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/mach-davinci/da8xx-dt.c |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..540e284 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -38,12 +38,29 @@ static void __init da8xx_init_irq(void)
 }
 
 #ifdef CONFIG_ARCH_DAVINCI_DA850
+#define DA8XX_AEMIF_CE2CFG_OFFSET   0x10
+#define DA8XX_AEMIF_ASIZE_16BIT 0x1
+
+static void __init da8xx_init_nor(void)
+{
+   void __iomem *aemif_addr;
+
+   aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+
+   /* Configure data bus width of CS2 to 16 bit */
+   writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
+   DA8XX_AEMIF_ASIZE_16BIT,
+   aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
+
+   iounmap(aemif_addr);
+}
 
 static void __init da850_init_machine(void)
 {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
da8xx_uart_clk_enable();
+   da8xx_init_nor();
 }
 
 static const char *da850_boards_compat[] __initdata = {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] DaVinci: da850: Add NOR flash DT node support

2013-01-28 Thread Kumar, Anil
Add NOR flash DT node support for DA850 EVM and related pin mux.
Configure 16 bit data bus width for CS2(aemif) to use the norflash on
DA850.

This series is based on top of 3.8-rc4 and the following patches.

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/
 -ARM: davinci: da850: add pinctrl driver DT entries

Tested on DA850 EVM.

Kumar, Anil (2):
  ARM: davinci: da850 evm: add norflash DT node
  ARM: davinci: da850: configure CS2(aemif) for norflash

 arch/arm/boot/dts/da850-evm.dts  |   25 +++
 arch/arm/boot/dts/da850.dtsi |   41 ++
 arch/arm/mach-davinci/da8xx-dt.c |   17 +++
 3 files changed, 83 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ARM: davinci: da850 evm: add norflash DT node

2013-01-28 Thread Kumar, Anil
Add norflash DT node on DA850 EVM and related pin mux.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 087ba28... 95ffeca... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 160ebac... 036b02a... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   25 +++
 arch/arm/boot/dts/da850.dtsi|   41 +++
 2 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 087ba28..95ffeca 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,29 @@
status = okay;
};
};
+   norflash_cs2@6000 {
+   compatible = intel,PC28F640P30T85, cfi-flash;
+   reg = 0x6000 0x1FF;
+   bank-width = 2;
+   #address-cells = 1;
+   #size-cells = 1;
+   linux,mtd-name = physmap-flash;
+   pinctrl-names = default;
+   pinctrl-0 = norflash_cs2_pins;
+
+   bootloaders_env@0 {
+   label = bootloaders_env;
+   reg = 0 0x8;
+   };
+
+   kernel@8 {
+   label = kernel;
+   reg = 0x8 0x20;
+   };
+
+   filesystem@28 {
+   label = filesystem;
+   reg = 0x28 0x58;
+   };
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 160ebac..036b02a 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,47 @@
pinctrl-single,register-width = 32;
pinctrl-single,function-mask = 0x;
status = disabled;
+
+   norflash_cs2_pins: pinmux_norflash_pins{
+   pinctrl-single,bits = 
+   /* EMA_BA[1] */
+   0x14 0x0100 0x0f00
+   /* EMA_CLK, EMA_WAIT[1] */
+   0x18 0x0101 0x0f0f
+   /* EMA_OE, EMA_WE, EMA_CS[2] */
+   0x1c 0x00110001 0x00ff000f
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x 0x
+   /*
+* EMA_D[8], EMA_D[9], EMA_D[10],
+* EMA_D[11], EMA_D[12], EMA_D[13],
+* EMA_D[14], EMA_D[15]
+*/
+   0x20 0x 0x
+   /*
+* EMA_A[0], EMA_A[1], EMA_A[2],
+* EMA_A[3], EMA_A[4], EMA_A[5],
+* EMA_A[6], EMA_A[7]
+*/
+   0x30 0x 0x
+   /*
+* EMA_A[8], EMA_A[9], EMA_A[10],
+* EMA_A[11], EMA_A[12], EMA_A[13],
+* EMA_A[14], EMA_A[15]
+*/
+   0x2c 0x 0x
+   /*
+* EMA_A[16], EMA_A[17], EMA_A[18],
+* EMA_A[19], EMA_A[20], EMA_A[21],
+* EMA_A[22]
+*/
+   0x28 0x1110 0xfff0
+   ;
+   };
};
serial0: serial@1c42000 {
compatible = ns16550a;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ARM: davinci: da850: add wdt DT node

2013-01-24 Thread Kumar, Anil
Add da850 wdt DT node.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37dc5a3... 4666ce9... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 640ab75... 08bf974... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|5 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..4666ce9 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -24,5 +24,8 @@
serial2: serial@1d0d000 {
status = "okay";
};
+   wdt: wdt@1c21000 {
+   status = "okay";
+   };
};
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 640ab75..08bf974 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -56,5 +56,10 @@
interrupt-parent = <>;
status = "disabled";
};
+   wdt: wdt@1c21000 {
+   compatible = "ti,davinci-wdt";
+   reg = <0x21000 0xfff>;
+   status = "disabled";
+   };
};
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-01-24 Thread Kumar, Anil
Add OF_DEV_AUXDATA for wdt driver in da850 board dt
file to use wdt clock.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37c27af... 1b295d2... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..1b295d2 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
of_irq_init(da8xx_irq_match);
 }
 
+struct of_dev_auxdata da850_evm_auxdata_lookup[] __initdata = {
+   OF_DEV_AUXDATA("ti,davinci-wdt", 0x1c21000, "watchdog", NULL),
+   {}
+};
+
 #ifdef CONFIG_ARCH_DAVINCI_DA850
 
 static void __init da850_init_machine(void)
 {
-   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+   of_platform_populate(NULL, of_default_bus_match_table,
+   da850_evm_auxdata_lookup, NULL);
 
da8xx_uart_clk_enable();
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] ARM: davinci: da850: add wdt DT node

2013-01-24 Thread Kumar, Anil
Add wdt DT node and OF_DEV_AUXDATA for wdt driver in
da850 board dt file to use wdt clock.

This series applies on top of v3.8-rc4.

This is tested on da850 EVM.

Test Procedure:

$watchdog -F /dev/watchdog (Device should not reboot)
 After wdt heartbeat timeout(DEFAULT_HEARTBEAT is 60 sec)
$ctr + c   (Device should reboot after heartbeat timeout)

Kumar, Anil (2):
  ARM: davinci: da850: add wdt DT node
  ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

 arch/arm/boot/dts/da850-evm.dts  |3 +++
 arch/arm/boot/dts/da850.dtsi |5 +
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 3 files changed, 15 insertions(+), 1 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] ARM: davinci: da850: add wdt DT node

2013-01-24 Thread Kumar, Anil
Add wdt DT node and OF_DEV_AUXDATA for wdt driver in
da850 board dt file to use wdt clock.

This series applies on top of v3.8-rc4.

This is tested on da850 EVM.

Test Procedure:

$watchdog -F /dev/watchdog (Device should not reboot)
 After wdt heartbeat timeout(DEFAULT_HEARTBEAT is 60 sec)
$ctr + c   (Device should reboot after heartbeat timeout)

Kumar, Anil (2):
  ARM: davinci: da850: add wdt DT node
  ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

 arch/arm/boot/dts/da850-evm.dts  |3 +++
 arch/arm/boot/dts/da850.dtsi |5 +
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 3 files changed, 15 insertions(+), 1 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ARM: davinci: da850: add wdt OF_DEV_AUXDATA entry

2013-01-24 Thread Kumar, Anil
Add OF_DEV_AUXDATA for wdt driver in da850 board dt
file to use wdt clock.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37c27af... 1b295d2... M  arch/arm/mach-davinci/da8xx-dt.c
 arch/arm/mach-davinci/da8xx-dt.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..1b295d2 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void)
of_irq_init(da8xx_irq_match);
 }
 
+struct of_dev_auxdata da850_evm_auxdata_lookup[] __initdata = {
+   OF_DEV_AUXDATA(ti,davinci-wdt, 0x1c21000, watchdog, NULL),
+   {}
+};
+
 #ifdef CONFIG_ARCH_DAVINCI_DA850
 
 static void __init da850_init_machine(void)
 {
-   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+   of_platform_populate(NULL, of_default_bus_match_table,
+   da850_evm_auxdata_lookup, NULL);
 
da8xx_uart_clk_enable();
 }
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ARM: davinci: da850: add wdt DT node

2013-01-24 Thread Kumar, Anil
Add da850 wdt DT node.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37dc5a3... 4666ce9... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 640ab75... 08bf974... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|5 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..4666ce9 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -24,5 +24,8 @@
serial2: serial@1d0d000 {
status = okay;
};
+   wdt: wdt@1c21000 {
+   status = okay;
+   };
};
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 640ab75..08bf974 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -56,5 +56,10 @@
interrupt-parent = intc;
status = disabled;
};
+   wdt: wdt@1c21000 {
+   compatible = ti,davinci-wdt;
+   reg = 0x21000 0xfff;
+   status = disabled;
+   };
};
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-16 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil 
---
Cosmetic changes for pmx_core: pinmux@1c14120 DT node

:100644 100644 37dc5a3... 087ba28... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... 160ebac... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..087ba28 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = "DA850/AM1808/OMAP-L138 EVM";
 
soc {
+   pmx_core: pinmux@1c14120 {
+   status = "okay";
+   };
serial0: serial@1c42000 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..160ebac 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = <1>;
ranges = <0x0 0x01c0 0x40>;
 
+   pmx_core: pinmux@1c14120 {
+   compatible = "pinctrl-single";
+   reg = <0x14120 0x50>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x>;
+   status = "disabled";
+   };
serial0: serial@1c42000 {
compatible = "ns16550a";
reg = <0x42000 0x100>;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool "Support DA8XX platforms using device tree"
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-16 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil 
---
:100644 100644 087ba28... 98c1a48... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 160ebac... f014f7b... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |5 +
 arch/arm/boot/dts/da850.dtsi|   30 ++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 087ba28..98c1a48 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,9 @@
status = "okay";
};
};
+   nand_cs3@6200 {
+   status = "okay";
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs3_pins>;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 160ebac..f014f7b 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,23 @@
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x>;
status = "disabled";
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = <
+   /* EMA_OE, EMA_WE */
+   0x1c 0x0011  0x00ff
+   /* EMA_CS[4],EMA_CS[3]*/
+   0x1c 0x0110  0x0ff0
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x  0x
+   /* EMA_A[1], EMA_A[2] */
+   0x30 0x0110  0x0ff0
+   >;
+   };
};
serial0: serial@1c42000 {
compatible = "ns16550a";
@@ -67,4 +84,17 @@
status = "disabled";
};
};
+   nand_cs3@6200 {
+   compatible = "ti,davinci-nand";
+   reg = <0x6200 0x807ff
+   0x6800 0x8000>;
+   ti,davinci-chipselect = <1>;
+   ti,davinci-mask-ale = <0>;
+   ti,davinci-mask-cle = <0>;
+   ti,davinci-mask-chipsel = <0>;
+   ti,davinci-ecc-mode = "hw";
+   ti,davinci-ecc-bits = <4>;
+   ti,davinci-nand-use-bbt;
+   status = "disabled";
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-16 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil 
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 0/3] ARM: davinci: da850: add pinctrl support

2013-01-16 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V4:

 -Cosmetic changes.

Changes since V3:

 -Move NAND related pinctrl DT data into the da850.dtsi file so it can
  be reused.

Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|8 ++
 arch/arm/boot/dts/da850.dtsi   |   40 
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 50 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V4 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-16 Thread Kumar, Anil
On Wed, Jan 16, 2013 at 09:18:20, Kumar, Anil wrote:
> For DT, DaVinci platform can use pinctrl-single driver for handling
> padconf registers.
> 
> Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
> pinctrl DT entries in da850 dts file.
> 
>  Test procedure
>   1)Populate DT file with NAND node information.
>   2)Populate board DT file with pinmux information for NAND.
>   3)Boot and confirm NAND is detected by the kernel.
>   4)cat /proc/mtd to show partitions.
> 
> Signed-off-by: Kumar, Anil 
> ---
> :100644 100644 37dc5a3... c7609d0... March/arm/boot/dts/da850-evm.dts
> :100644 100644 fbada87... e9c6e82... March/arm/boot/dts/da850.dtsi
> :100644 100644 0153950... a075b3e... March/arm/mach-davinci/Kconfig
>  arch/arm/boot/dts/da850-evm.dts |3 +++
>  arch/arm/boot/dts/da850.dtsi|   10 ++
>  arch/arm/mach-davinci/Kconfig   |1 +
>  3 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 37dc5a3..c7609d0 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -15,6 +15,9 @@
>   model = "DA850/AM1808/OMAP-L138 EVM";
>  
>   soc {
> + pmx_core:pinmux@1c14120 {

I have found cosmetics issue here. I will correct it and send next version.

> + status = "okay";
> + };
>   serial0: serial@1c42000 {
>   status = "okay";
>   };
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index fbada87..e9c6e82 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -29,6 +29,16 @@
>   #size-cells = <1>;
>   ranges = <0x0 0x01c0 0x40>;
>  
> + pmx_core:pinmux@1c14120 {

I have found cosmetics issue here. I will correct it and send next version.

> + compatible = "pinctrl-single";
> + reg = <0x14120 0x50>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pinctrl-single,bit-per-mux;
> + pinctrl-single,register-width = <32>;
> + pinctrl-single,function-mask = <0x>;
> + status = "disabled";
> + };
>   serial0: serial@1c42000 {
>   compatible = "ns16550a";
>   reg = <0x42000 0x100>;
> diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
> index 0153950..a075b3e 100644
> --- a/arch/arm/mach-davinci/Kconfig
> +++ b/arch/arm/mach-davinci/Kconfig
> @@ -62,6 +62,7 @@ config MACH_DA8XX_DT
>   bool "Support DA8XX platforms using device tree"
>   default y
>   depends on ARCH_DAVINCI_DA8XX
> + select PINCTRL
>   help
> Say y here to include support for TI DaVinci DA850 based using
> Flattened Device Tree. More information at Documentation/devicetree
> -- 
> 1.7.4.1
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V4 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-16 Thread Kumar, Anil
On Wed, Jan 16, 2013 at 09:18:20, Kumar, Anil wrote:
 For DT, DaVinci platform can use pinctrl-single driver for handling
 padconf registers.
 
 Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
 pinctrl DT entries in da850 dts file.
 
  Test procedure
   1)Populate DT file with NAND node information.
   2)Populate board DT file with pinmux information for NAND.
   3)Boot and confirm NAND is detected by the kernel.
   4)cat /proc/mtd to show partitions.
 
 Signed-off-by: Kumar, Anil anilkuma...@ti.com
 ---
 :100644 100644 37dc5a3... c7609d0... March/arm/boot/dts/da850-evm.dts
 :100644 100644 fbada87... e9c6e82... March/arm/boot/dts/da850.dtsi
 :100644 100644 0153950... a075b3e... March/arm/mach-davinci/Kconfig
  arch/arm/boot/dts/da850-evm.dts |3 +++
  arch/arm/boot/dts/da850.dtsi|   10 ++
  arch/arm/mach-davinci/Kconfig   |1 +
  3 files changed, 14 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
 index 37dc5a3..c7609d0 100644
 --- a/arch/arm/boot/dts/da850-evm.dts
 +++ b/arch/arm/boot/dts/da850-evm.dts
 @@ -15,6 +15,9 @@
   model = DA850/AM1808/OMAP-L138 EVM;
  
   soc {
 + pmx_core:pinmux@1c14120 {

I have found cosmetics issue here. I will correct it and send next version.

 + status = okay;
 + };
   serial0: serial@1c42000 {
   status = okay;
   };
 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
 index fbada87..e9c6e82 100644
 --- a/arch/arm/boot/dts/da850.dtsi
 +++ b/arch/arm/boot/dts/da850.dtsi
 @@ -29,6 +29,16 @@
   #size-cells = 1;
   ranges = 0x0 0x01c0 0x40;
  
 + pmx_core:pinmux@1c14120 {

I have found cosmetics issue here. I will correct it and send next version.

 + compatible = pinctrl-single;
 + reg = 0x14120 0x50;
 + #address-cells = 1;
 + #size-cells = 0;
 + pinctrl-single,bit-per-mux;
 + pinctrl-single,register-width = 32;
 + pinctrl-single,function-mask = 0x;
 + status = disabled;
 + };
   serial0: serial@1c42000 {
   compatible = ns16550a;
   reg = 0x42000 0x100;
 diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
 index 0153950..a075b3e 100644
 --- a/arch/arm/mach-davinci/Kconfig
 +++ b/arch/arm/mach-davinci/Kconfig
 @@ -62,6 +62,7 @@ config MACH_DA8XX_DT
   bool Support DA8XX platforms using device tree
   default y
   depends on ARCH_DAVINCI_DA8XX
 + select PINCTRL
   help
 Say y here to include support for TI DaVinci DA850 based using
 Flattened Device Tree. More information at Documentation/devicetree
 -- 
 1.7.4.1
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 0/3] ARM: davinci: da850: add pinctrl support

2013-01-16 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V4:

 -Cosmetic changes.

Changes since V3:

 -Move NAND related pinctrl DT data into the da850.dtsi file so it can
  be reused.

Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|8 ++
 arch/arm/boot/dts/da850.dtsi   |   40 
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 50 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-16 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-16 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 087ba28... 98c1a48... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 160ebac... f014f7b... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |5 +
 arch/arm/boot/dts/da850.dtsi|   30 ++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 087ba28..98c1a48 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,9 @@
status = okay;
};
};
+   nand_cs3@6200 {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = nand_cs3_pins;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 160ebac..f014f7b 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,23 @@
pinctrl-single,register-width = 32;
pinctrl-single,function-mask = 0x;
status = disabled;
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = 
+   /* EMA_OE, EMA_WE */
+   0x1c 0x0011  0x00ff
+   /* EMA_CS[4],EMA_CS[3]*/
+   0x1c 0x0110  0x0ff0
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x  0x
+   /* EMA_A[1], EMA_A[2] */
+   0x30 0x0110  0x0ff0
+   ;
+   };
};
serial0: serial@1c42000 {
compatible = ns16550a;
@@ -67,4 +84,17 @@
status = disabled;
};
};
+   nand_cs3@6200 {
+   compatible = ti,davinci-nand;
+   reg = 0x6200 0x807ff
+   0x6800 0x8000;
+   ti,davinci-chipselect = 1;
+   ti,davinci-mask-ale = 0;
+   ti,davinci-mask-cle = 0;
+   ti,davinci-mask-chipsel = 0;
+   ti,davinci-ecc-mode = hw;
+   ti,davinci-ecc-bits = 4;
+   ti,davinci-nand-use-bbt;
+   status = disabled;
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V5 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-16 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
Cosmetic changes for pmx_core: pinmux@1c14120 DT node

:100644 100644 37dc5a3... 087ba28... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... 160ebac... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..087ba28 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = DA850/AM1808/OMAP-L138 EVM;
 
soc {
+   pmx_core: pinmux@1c14120 {
+   status = okay;
+   };
serial0: serial@1c42000 {
status = okay;
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..160ebac 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = 1;
ranges = 0x0 0x01c0 0x40;
 
+   pmx_core: pinmux@1c14120 {
+   compatible = pinctrl-single;
+   reg = 0x14120 0x50;
+   #address-cells = 1;
+   #size-cells = 0;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = 32;
+   pinctrl-single,function-mask = 0x;
+   status = disabled;
+   };
serial0: serial@1c42000 {
compatible = ns16550a;
reg = 0x42000 0x100;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool Support DA8XX platforms using device tree
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-15 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil 
---
:100644 100644 c7609d0... 433027f... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 59e6ea4... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |5 +
 arch/arm/boot/dts/da850.dtsi|   30 ++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..433027f 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,9 @@
status = "okay";
};
};
+   nand_cs3@6200 {
+   status = "okay";
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs3_pins>;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..59e6ea4 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,23 @@
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x>;
status = "disabled";
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = <
+   /* EMA_OE, EMA_WE */
+   0x1c 0x0011  0x00ff
+   /* EMA_CS[4],EMA_CS[3]*/
+   0x1c 0x0110  0x0ff0
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x  0x
+   /* EMA_A[1], EMA_A[2] */
+   0x30 0x0110  0x0ff0
+   >;
+   };
};
serial0: serial@1c42000 {
compatible = "ns16550a";
@@ -67,4 +84,17 @@
status = "disabled";
};
};
+   nand_cs3@6200 {
+   compatible = "ti,davinci-nand";
+   reg = <0x6200 0x807ff
+   0x6800 0x8000>;
+   ti,davinci-chipselect = <1>;
+   ti,davinci-mask-ale = <0>;
+   ti,davinci-mask-cle = <0>;
+   ti,davinci-mask-chipsel = <0>;
+   ti,davinci-ecc-mode = "hw";
+   ti,davinci-ecc-bits = <4>;
+   ti,davinci-nand-use-bbt;
+   status = "disabled";
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-15 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil 
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-15 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = "DA850/AM1808/OMAP-L138 EVM";
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = "okay";
+   };
serial0: serial@1c42000 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = <1>;
ranges = <0x0 0x01c0 0x40>;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = "pinctrl-single";
+   reg = <0x14120 0x50>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x>;
+   status = "disabled";
+   };
serial0: serial@1c42000 {
compatible = "ns16550a";
reg = <0x42000 0x100>;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool "Support DA8XX platforms using device tree"
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 0/3] ARM: davinci: da850: add pinctrl support

2013-01-15 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V3:

 -Move NAND related pinctrl DT data into the da850.dtsi file so it can
  be reused.
 
Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|8 ++
 arch/arm/boot/dts/da850.dtsi   |   40 
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 50 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-15 Thread Kumar, Anil
On Thu, Jan 10, 2013 at 17:49:13, Nori, Sekhar wrote:
> On 1/10/2013 1:07 PM, Kumar, Anil wrote:
> > On Wed, Jan 09, 2013 at 18:17:46, Nori, Sekhar wrote:
> 
> > I do not think that it is good idea to move NAND pin mux information
> > into da850.dtsi because this information is evm specific.
> > if we will use this approach then we must use the same approach for
> > other modules also as ASoC etc.   
> 
> Why do you consider this EVM specific. IOW, which pins do you see
> changing on another board? BTW, if there are additional pins needed than
> what are listed, we can always add more pinux entries in the .dts files.
> The pins present in dtsi file should the base case.
 
Ok, we can use this approach for DaVinci as its SoC modules do not
have multiple pin configuration option. I will do the changes in 
next patch series.

Thanks,
Anil
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

[PATCH V4 0/3] ARM: davinci: da850: add pinctrl support

2013-01-15 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V3:

 -Move NAND related pinctrl DT data into the da850.dtsi file so it can
  be reused.
 
Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|8 ++
 arch/arm/boot/dts/da850.dtsi   |   40 
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 50 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-15 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-15 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = DA850/AM1808/OMAP-L138 EVM;
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = okay;
+   };
serial0: serial@1c42000 {
status = okay;
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = 1;
ranges = 0x0 0x01c0 0x40;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = pinctrl-single;
+   reg = 0x14120 0x50;
+   #address-cells = 1;
+   #size-cells = 0;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = 32;
+   pinctrl-single,function-mask = 0x;
+   status = disabled;
+   };
serial0: serial@1c42000 {
compatible = ns16550a;
reg = 0x42000 0x100;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool Support DA8XX platforms using device tree
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V4 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-15 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 c7609d0... 433027f... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 59e6ea4... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |5 +
 arch/arm/boot/dts/da850.dtsi|   30 ++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..433027f 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,9 @@
status = okay;
};
};
+   nand_cs3@6200 {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = nand_cs3_pins;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..59e6ea4 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -38,6 +38,23 @@
pinctrl-single,register-width = 32;
pinctrl-single,function-mask = 0x;
status = disabled;
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = 
+   /* EMA_OE, EMA_WE */
+   0x1c 0x0011  0x00ff
+   /* EMA_CS[4],EMA_CS[3]*/
+   0x1c 0x0110  0x0ff0
+   /*
+* EMA_D[0], EMA_D[1], EMA_D[2],
+* EMA_D[3], EMA_D[4], EMA_D[5],
+* EMA_D[6], EMA_D[7]
+*/
+   0x24 0x  0x
+   /* EMA_A[1], EMA_A[2] */
+   0x30 0x0110  0x0ff0
+   ;
+   };
};
serial0: serial@1c42000 {
compatible = ns16550a;
@@ -67,4 +84,17 @@
status = disabled;
};
};
+   nand_cs3@6200 {
+   compatible = ti,davinci-nand;
+   reg = 0x6200 0x807ff
+   0x6800 0x8000;
+   ti,davinci-chipselect = 1;
+   ti,davinci-mask-ale = 0;
+   ti,davinci-mask-cle = 0;
+   ti,davinci-mask-chipsel = 0;
+   ti,davinci-ecc-mode = hw;
+   ti,davinci-ecc-bits = 4;
+   ti,davinci-nand-use-bbt;
+   status = disabled;
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-15 Thread Kumar, Anil
On Thu, Jan 10, 2013 at 17:49:13, Nori, Sekhar wrote:
 On 1/10/2013 1:07 PM, Kumar, Anil wrote:
  On Wed, Jan 09, 2013 at 18:17:46, Nori, Sekhar wrote:
 
  I do not think that it is good idea to move NAND pin mux information
  into da850.dtsi because this information is evm specific.
  if we will use this approach then we must use the same approach for
  other modules also as ASoC etc.   
 
 Why do you consider this EVM specific. IOW, which pins do you see
 changing on another board? BTW, if there are additional pins needed than
 what are listed, we can always add more pinux entries in the .dts files.
 The pins present in dtsi file should the base case.
 
Ok, we can use this approach for DaVinci as its SoC modules do not
have multiple pin configuration option. I will do the changes in 
next patch series.

Thanks,
Anil
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

[PATCH V3 0/3] ARM: davinci: da850: add pinctrl support

2013-01-10 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed. 

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|   19 +++
 arch/arm/boot/dts/da850.dtsi   |   23 +++
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 44 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-10 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil 
---
:100644 100644 c7609d0... 32ccecf... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   16 
 arch/arm/boot/dts/da850.dtsi|   13 +
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..32ccecf 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,20 @@
status = "okay";
};
};
+   nand_cs3@6200 {
+   status = "okay";
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs3_pins>;
+   };
+};
+_core{
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = <
+   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
+   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
+   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
EMA_D[2], EMA_D[3],
+  EMA_D[4], EMA_D[5], 
EMA_D[6], EMA_D[7] */
+   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
+   >;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..16e2ac2 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -67,4 +67,17 @@
status = "disabled";
};
};
+   nand_cs3@6200 {
+   compatible = "ti,davinci-nand";
+   reg = <0x6200 0x807ff
+   0x6800 0x8000>;
+   ti,davinci-chipselect = <1>;
+   ti,davinci-mask-ale = <0>;
+   ti,davinci-mask-cle = <0>;
+   ti,davinci-mask-chipsel = <0>;
+   ti,davinci-ecc-mode = "hw";
+   ti,davinci-ecc-bits = <4>;
+   ti,davinci-nand-use-bbt;
+   status = "disabled";
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-10 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil 
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-10 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = "DA850/AM1808/OMAP-L138 EVM";
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = "okay";
+   };
serial0: serial@1c42000 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = <1>;
ranges = <0x0 0x01c0 0x40>;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = "pinctrl-single";
+   reg = <0x14120 0x50>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x>;
+   status = "disabled";
+   };
serial0: serial@1c42000 {
compatible = "ns16550a";
reg = <0x42000 0x100>;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool "Support DA8XX platforms using device tree"
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-10 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 1/3] ARM: davinci: da850: add pinctrl driver DT entries

2013-01-10 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = DA850/AM1808/OMAP-L138 EVM;
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = okay;
+   };
serial0: serial@1c42000 {
status = okay;
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = 1;
ranges = 0x0 0x01c0 0x40;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = pinctrl-single;
+   reg = 0x14120 0x50;
+   #address-cells = 1;
+   #size-cells = 0;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = 32;
+   pinctrl-single,function-mask = 0x;
+   status = disabled;
+   };
serial0: serial@1c42000 {
compatible = ns16550a;
reg = 0x42000 0x100;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool Support DA8XX platforms using device tree
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 0/3] ARM: davinci: da850: add pinctrl support

2013-01-10 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
and the following patch

 -drivers/pinctrl: grab default handles from device core
  https://patchwork.kernel.org/patch/1862231/

This series is tested on da850 EVM.

Changes since V2:

 -Move NAND pins configuration into the nand_cs3 DT node to avoid pins
  configuration if it is not probed. 

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver DT entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver DT entries

 arch/arm/boot/dts/da850-evm.dts|   19 +++
 arch/arm/boot/dts/da850.dtsi   |   23 +++
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 44 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 3/3] ARM: davinci: da850: add NAND driver DT entries

2013-01-10 Thread Kumar, Anil
Add NAND driver DT node and related pinctrl DT data to export NAND
functionality on da850 evm.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 c7609d0... 32ccecf... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   16 
 arch/arm/boot/dts/da850.dtsi|   13 +
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..32ccecf 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,20 @@
status = okay;
};
};
+   nand_cs3@6200 {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = nand_cs3_pins;
+   };
+};
+pmx_core{
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = 
+   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
+   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
+   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
EMA_D[2], EMA_D[3],
+  EMA_D[4], EMA_D[5], 
EMA_D[6], EMA_D[7] */
+   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
+   ;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..16e2ac2 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -67,4 +67,17 @@
status = disabled;
};
};
+   nand_cs3@6200 {
+   compatible = ti,davinci-nand;
+   reg = 0x6200 0x807ff
+   0x6800 0x8000;
+   ti,davinci-chipselect = 1;
+   ti,davinci-mask-ale = 0;
+   ti,davinci-mask-cle = 0;
+   ti,davinci-mask-chipsel = 0;
+   ti,davinci-ecc-mode = hw;
+   ti,davinci-ecc-bits = 4;
+   ti,davinci-nand-use-bbt;
+   status = disabled;
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-09 Thread Kumar, Anil
On Wed, Jan 09, 2013 at 18:17:46, Nori, Sekhar wrote:
> On 1/8/2013 1:50 PM, Kumar, Anil wrote:
> > Add NAND driver entries to export NAND functionality on da850 EVM and
> > NAND pinctrl node to do pin mux according to pinctrl-single driver.
> 
> Subject line should have DT and da850 evm somewhere.
> Otherwise NAND has been supported on DA850 for long.

I will update it in V3 of this patch series.

> 
> > 
> > Signed-off-by: Kumar, Anil 
> > ---
> > :100644 100644 c7609d0... 382a7da... M  arch/arm/boot/dts/da850-evm.dts
> > :100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
> >  arch/arm/boot/dts/da850-evm.dts |   19 +++
> >  arch/arm/boot/dts/da850.dtsi|   13 +
> >  2 files changed, 32 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/da850-evm.dts 
> > b/arch/arm/boot/dts/da850-evm.dts
> > index c7609d0..382a7da 100644
> > --- a/arch/arm/boot/dts/da850-evm.dts
> > +++ b/arch/arm/boot/dts/da850-evm.dts
> > @@ -28,4 +28,23 @@
> > status = "okay";
> > };
> > };
> > +   nand_cs3@6200 {
> > +   status = "okay";
> > +   };
> > +};
> > +_core{
> > +   pinctrl-names = "default";
> > +   pinctrl-0 = <
> > +   _cs3_pins
> > +   >;
> 
> This means that the NAND pins are configured even if NAND is not
> probed. Right?

Right 

> This can be moved into the nand_cs3 node to avoid that. 
> And then when used with Linus Walleij's patch "drivers/pinctrl: grab 
> default handles from device core" which should be accepted soon, the 
> pins will be automatically setup when the NAND gets probed.

It is better. I will do it in V3 of this patch series.

> 
> > +
> > +   nand_cs3_pins: pinmux_nand_pins {
> > +   pinctrl-single,bits = <
> > +   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
> > +   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
> > +   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
> > EMA_D[2], EMA_D[3],
> > +  EMA_D[4], EMA_D[5], 
> > EMA_D[6], EMA_D[7] */
> > +   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
> > +   >;
> > +   };
> 
> I suspect a number of other boards using NAND on CS3 would have to 
> repeat these configurations. It will be better to move them into the 
> da850.dtsi file so it can be reused.

> 
> Since I am new to the DT and pinctrl stuff, I had to actually try these to 
> make sure what I am suggesting isn't nonsense. I came up with this 
> patch on top of your series. Please test it at your end

Tested. It is working. 

> and also see if you 
> are happy with the changes.

I do not think that it is good idea to move NAND pin mux information
into da850.dtsi because this information is evm specific.
if we will use this approach then we must use the same approach for
other modules also as ASoC etc.   

Thanks,
Anil

> ---8<
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 382a7da..52abb9d 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -30,21 +30,8 @@
>   };
>   nand_cs3@6200 {
>   status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <_cs3_pins>;
>   };
>  };
> -_core{
> - pinctrl-names = "default";
> - pinctrl-0 = <
> - _cs3_pins
> - >;
>  
> - nand_cs3_pins: pinmux_nand_pins {
> - pinctrl-single,bits = <
> - 0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
> - 0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
> - 0x24 0x  0x /* EMA_D[0], EMA_D[1], 
> EMA_D[2], EMA_D[3],
> -EMA_D[4], EMA_D[5], 
> EMA_D[6], EMA_D[7] */
> - 0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
> - >;
> - };
> -};
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 6ab9730..c4b21a8 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -38,7 +38,25 @@
>   pinctrl-single,register-width = <32>;
>   pinctrl-single,function-mask = <0x>;
>   status = "disabled";
> +
&g

RE: [PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-09 Thread Kumar, Anil
On Wed, Jan 09, 2013 at 18:17:46, Nori, Sekhar wrote:
 On 1/8/2013 1:50 PM, Kumar, Anil wrote:
  Add NAND driver entries to export NAND functionality on da850 EVM and
  NAND pinctrl node to do pin mux according to pinctrl-single driver.
 
 Subject line should have DT and da850 evm somewhere.
 Otherwise NAND has been supported on DA850 for long.

I will update it in V3 of this patch series.

 
  
  Signed-off-by: Kumar, Anil anilkuma...@ti.com
  ---
  :100644 100644 c7609d0... 382a7da... M  arch/arm/boot/dts/da850-evm.dts
  :100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
   arch/arm/boot/dts/da850-evm.dts |   19 +++
   arch/arm/boot/dts/da850.dtsi|   13 +
   2 files changed, 32 insertions(+), 0 deletions(-)
  
  diff --git a/arch/arm/boot/dts/da850-evm.dts 
  b/arch/arm/boot/dts/da850-evm.dts
  index c7609d0..382a7da 100644
  --- a/arch/arm/boot/dts/da850-evm.dts
  +++ b/arch/arm/boot/dts/da850-evm.dts
  @@ -28,4 +28,23 @@
  status = okay;
  };
  };
  +   nand_cs3@6200 {
  +   status = okay;
  +   };
  +};
  +pmx_core{
  +   pinctrl-names = default;
  +   pinctrl-0 = 
  +   nand_cs3_pins
  +   ;
 
 This means that the NAND pins are configured even if NAND is not
 probed. Right?

Right 

 This can be moved into the nand_cs3 node to avoid that. 
 And then when used with Linus Walleij's patch drivers/pinctrl: grab 
 default handles from device core which should be accepted soon, the 
 pins will be automatically setup when the NAND gets probed.

It is better. I will do it in V3 of this patch series.

 
  +
  +   nand_cs3_pins: pinmux_nand_pins {
  +   pinctrl-single,bits = 
  +   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
  +   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
  +   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
  EMA_D[2], EMA_D[3],
  +  EMA_D[4], EMA_D[5], 
  EMA_D[6], EMA_D[7] */
  +   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
  +   ;
  +   };
 
 I suspect a number of other boards using NAND on CS3 would have to 
 repeat these configurations. It will be better to move them into the 
 da850.dtsi file so it can be reused.

 
 Since I am new to the DT and pinctrl stuff, I had to actually try these to 
 make sure what I am suggesting isn't nonsense. I came up with this 
 patch on top of your series. Please test it at your end

Tested. It is working. 

 and also see if you 
 are happy with the changes.

I do not think that it is good idea to move NAND pin mux information
into da850.dtsi because this information is evm specific.
if we will use this approach then we must use the same approach for
other modules also as ASoC etc.   

Thanks,
Anil

 ---8
 diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
 index 382a7da..52abb9d 100644
 --- a/arch/arm/boot/dts/da850-evm.dts
 +++ b/arch/arm/boot/dts/da850-evm.dts
 @@ -30,21 +30,8 @@
   };
   nand_cs3@6200 {
   status = okay;
 + pinctrl-names = default;
 + pinctrl-0 = nand_cs3_pins;
   };
  };
 -pmx_core{
 - pinctrl-names = default;
 - pinctrl-0 = 
 - nand_cs3_pins
 - ;
  
 - nand_cs3_pins: pinmux_nand_pins {
 - pinctrl-single,bits = 
 - 0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
 - 0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
 - 0x24 0x  0x /* EMA_D[0], EMA_D[1], 
 EMA_D[2], EMA_D[3],
 -EMA_D[4], EMA_D[5], 
 EMA_D[6], EMA_D[7] */
 - 0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
 - ;
 - };
 -};
 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
 index 6ab9730..c4b21a8 100644
 --- a/arch/arm/boot/dts/da850.dtsi
 +++ b/arch/arm/boot/dts/da850.dtsi
 @@ -38,7 +38,25 @@
   pinctrl-single,register-width = 32;
   pinctrl-single,function-mask = 0x;
   status = disabled;
 +
 + nand_cs3_pins: pinmux_nand_pins {
 + pinctrl-single,bits = 
 + /* EMA_OE, EMA_WE */
 + 0x1c 0x0011  0x00ff
 + /* EMA_CS[4],EMA_CS[3]*/
 + 0x1c 0x0110  0x0ff0
 + /*
 +  * EMA_D[0], EMA_D[1], EMA_D[2],
 +  * EMA_D[3], EMA_D[4], EMA_D[5],
 +  * EMA_D[6], EMA_D[7]
 +  */
 + 0x24

[PATCH V2 0/3] ARM: davinci: da850: add pinctrl support

2013-01-08 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

This series is tested on da850 EVM.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.  

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver entries

 arch/arm/boot/dts/da850-evm.dts|   22 ++
 arch/arm/boot/dts/da850.dtsi   |   23 +++
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 47 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-08 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil 
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 1/3] ARM: davinci: da850: add pinctrl driver entries

2013-01-08 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil 
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = "DA850/AM1808/OMAP-L138 EVM";
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = "okay";
+   };
serial0: serial@1c42000 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = <1>;
ranges = <0x0 0x01c0 0x40>;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = "pinctrl-single";
+   reg = <0x14120 0x50>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x>;
+   status = "disabled";
+   };
serial0: serial@1c42000 {
compatible = "ns16550a";
reg = <0x42000 0x100>;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool "Support DA8XX platforms using device tree"
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-08 Thread Kumar, Anil
Add NAND driver entries to export NAND functionality on da850 EVM and
NAND pinctrl node to do pin mux according to pinctrl-single driver.

Signed-off-by: Kumar, Anil 
---
:100644 100644 c7609d0... 382a7da... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   19 +++
 arch/arm/boot/dts/da850.dtsi|   13 +
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..382a7da 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,23 @@
status = "okay";
};
};
+   nand_cs3@6200 {
+   status = "okay";
+   };
+};
+_core{
+   pinctrl-names = "default";
+   pinctrl-0 = <
+   _cs3_pins
+   >;
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = <
+   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
+   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
+   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
EMA_D[2], EMA_D[3],
+  EMA_D[4], EMA_D[5], 
EMA_D[6], EMA_D[7] */
+   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
+   >;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..16e2ac2 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -67,4 +67,17 @@
status = "disabled";
};
};
+   nand_cs3@6200 {
+   compatible = "ti,davinci-nand";
+   reg = <0x6200 0x807ff
+   0x6800 0x8000>;
+   ti,davinci-chipselect = <1>;
+   ti,davinci-mask-ale = <0>;
+   ti,davinci-mask-cle = <0>;
+   ti,davinci-mask-chipsel = <0>;
+   ti,davinci-ecc-mode = "hw";
+   ti,davinci-ecc-bits = <4>;
+   ti,davinci-nand-use-bbt;
+   status = "disabled";
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 3/3] ARM: davinci: da850: add NAND driver entries

2013-01-08 Thread Kumar, Anil
Add NAND driver entries to export NAND functionality on da850 EVM and
NAND pinctrl node to do pin mux according to pinctrl-single driver.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 c7609d0... 382a7da... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 e9c6e82... 16e2ac2... M  arch/arm/boot/dts/da850.dtsi
 arch/arm/boot/dts/da850-evm.dts |   19 +++
 arch/arm/boot/dts/da850.dtsi|   13 +
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c7609d0..382a7da 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -28,4 +28,23 @@
status = okay;
};
};
+   nand_cs3@6200 {
+   status = okay;
+   };
+};
+pmx_core{
+   pinctrl-names = default;
+   pinctrl-0 = 
+   nand_cs3_pins
+   ;
+
+   nand_cs3_pins: pinmux_nand_pins {
+   pinctrl-single,bits = 
+   0x1c 0x0011  0x00ff /* EMA_OE, EMA_WE */
+   0x1c 0x0110  0x0ff0 /* EMA_CS[4],EMA_CS[3]*/
+   0x24 0x  0x /* EMA_D[0], EMA_D[1], 
EMA_D[2], EMA_D[3],
+  EMA_D[4], EMA_D[5], 
EMA_D[6], EMA_D[7] */
+   0x30 0x0110  0x0ff0 /* EMA_A[1], EMA_A[2] */
+   ;
+   };
 };
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e9c6e82..16e2ac2 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -67,4 +67,17 @@
status = disabled;
};
};
+   nand_cs3@6200 {
+   compatible = ti,davinci-nand;
+   reg = 0x6200 0x807ff
+   0x6800 0x8000;
+   ti,davinci-chipselect = 1;
+   ti,davinci-mask-ale = 0;
+   ti,davinci-mask-cle = 0;
+   ti,davinci-mask-chipsel = 0;
+   ti,davinci-ecc-mode = hw;
+   ti,davinci-ecc-bits = 4;
+   ti,davinci-nand-use-bbt;
+   status = disabled;
+   };
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 1/3] ARM: davinci: da850: add pinctrl driver entries

2013-01-08 Thread Kumar, Anil
For DT, DaVinci platform can use pinctrl-single driver for handling
padconf registers.

Enable PINCTRL Kconfig for MACH_DA8XX_DT platform. Add required
pinctrl DT entries in da850 dts file.

 Test procedure
  1)Populate DT file with NAND node information.
  2)Populate board DT file with pinmux information for NAND.
  3)Boot and confirm NAND is detected by the kernel.
  4)cat /proc/mtd to show partitions.

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 37dc5a3... c7609d0... M  arch/arm/boot/dts/da850-evm.dts
:100644 100644 fbada87... e9c6e82... M  arch/arm/boot/dts/da850.dtsi
:100644 100644 0153950... a075b3e... M  arch/arm/mach-davinci/Kconfig
 arch/arm/boot/dts/da850-evm.dts |3 +++
 arch/arm/boot/dts/da850.dtsi|   10 ++
 arch/arm/mach-davinci/Kconfig   |1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 37dc5a3..c7609d0 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -15,6 +15,9 @@
model = DA850/AM1808/OMAP-L138 EVM;
 
soc {
+   pmx_core:pinmux@1c14120 {
+   status = okay;
+   };
serial0: serial@1c42000 {
status = okay;
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index fbada87..e9c6e82 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -29,6 +29,16 @@
#size-cells = 1;
ranges = 0x0 0x01c0 0x40;
 
+   pmx_core:pinmux@1c14120 {
+   compatible = pinctrl-single;
+   reg = 0x14120 0x50;
+   #address-cells = 1;
+   #size-cells = 0;
+   pinctrl-single,bit-per-mux;
+   pinctrl-single,register-width = 32;
+   pinctrl-single,function-mask = 0x;
+   status = disabled;
+   };
serial0: serial@1c42000 {
compatible = ns16550a;
reg = 0x42000 0x100;
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 0153950..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -62,6 +62,7 @@ config MACH_DA8XX_DT
bool Support DA8XX platforms using device tree
default y
depends on ARCH_DAVINCI_DA8XX
+   select PINCTRL
help
  Say y here to include support for TI DaVinci DA850 based using
  Flattened Device Tree. More information at Documentation/devicetree
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 2/3] ARM: davinci: da8xx defconfig: enable pinctrl config option

2013-01-08 Thread Kumar, Anil
Enable pinctrl related config option in da8xx_omapl_defconfig

Signed-off-by: Kumar, Anil anilkuma...@ti.com
---
:100644 100644 f292239... 0892db4... M  arch/arm/configs/da8xx_omapl_defconfig
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/da8xx_omapl_defconfig 
b/arch/arm/configs/da8xx_omapl_defconfig
index f292239..0892db4 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_REGULATOR=y
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 0/3] ARM: davinci: da850: add pinctrl support

2013-01-08 Thread Kumar, Anil
This set of patches adds:

* Add pinctrl-single for handling Padconf registers.
* Add NAND node to export NAND functionality on da850 EVM.
* Add NAND pinctrl node to do pin mux according to pinctrl-single driver.


This series applies on top of tag next-20130107 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

This series is tested on da850 EVM.

Changes since V1:

 -Remove the binding documentation as already documented as part of
  Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
 -Enable PINCTRL Kconfig for MACH_DA8XX_DT platform only.
 -Fix the pinctrl driver node unit-address.
 -Make separate patch for da8xx_omapl_defconfig changes.  

Kumar, Anil (3):
  ARM: davinci: da850: add pinctrl driver entries
  ARM: davinci: da8xx defconfig: enable pinctrl config option
  ARM: davinci: da850: add NAND driver entries

 arch/arm/boot/dts/da850-evm.dts|   22 ++
 arch/arm/boot/dts/da850.dtsi   |   23 +++
 arch/arm/configs/da8xx_omapl_defconfig |1 +
 arch/arm/mach-davinci/Kconfig  |1 +
 4 files changed, 47 insertions(+), 0 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: linux-next: manual merge of the l2-mtd tree with Linus' tree

2012-12-14 Thread Kumar, Anil


From: Karicheri, Muralidharan
Sent: Thursday, December 13, 2012 8:45 PM
To: Kumar, Anil
Cc: Stephen Rothwell; Artem Bityutskiy; linux-n...@vger.kernel.org; 
linux-kernel@vger.kernel.org; Grant Likely
Subject: Re: linux-next: manual merge of the l2-mtd tree with Linus' tree

On 12/13/2012 12:38 AM, Kumar, Anil wrote:
> On Thu, Dec 13, 2012 at 07:07:55, Stephen Rothwell wrote:
>> Hi Artem,
>>
>> Today's linux-next merge of the l2-mtd tree got a conflict in
>> Documentation/devicetree/bindings/arm/davinci/nand.txt between commit
>> fed16bba8726 ("mtd: nand: davinci: fix the binding documentation") from
>> Linus' tree and commit 192afdbfbc5c ("mtd: davinci: add support for
>> parition binding nodes") from the l2-mtd tree.
>>
>> I fixed it up (maybe- see below) and can carry the fix as necessary (no
>> action is required).
>>
>> --
>> Cheers,
>> Stephen Rothwells...@canb.auug.org.au
>>
>> diff --cc Documentation/devicetree/bindings/arm/davinci/nand.txt
>> index 49fc7ad,4746452..000
>> --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
>> +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
>> @@@ -23,16 -23,37 +23,24 @@@ Recommended properties
>>- ti,davinci-nand-buswidth: buswidth 8 or 16
>>- ti,davinci-nand-use-bbt: use flash based bad block table support.
>>
>> + nand device bindings may contain additional sub-nodes describing
>> + partitions of the address space. See partition.txt for more detail.
>> +
>>   -Example (enbw_cmc board):
>>   -aemif@6000 {
>>   -  compatible = "ti,davinci-aemif";
>>   -  #address-cells =<2>;
>>   -  #size-cells =<1>;
>>   -  reg =<0x6800 0x8>;
>>   -  ranges =<2 0 0x6000 0x0200
>>   -3 0 0x6200 0x0200
>>   -4 0 0x6400 0x0200
>>   -5 0 0x6600 0x0200
>>   -6 0 0x6800 0x0200>;
>>   -  nand@3,0 {
>>   -  compatible = "ti,davinci-nand";
>>   -  reg =<3 0x0 0x807ff
>>   -  6 0x0 0x8000>;
>>   -  #address-cells =<1>;
>>   -  #size-cells =<1>;
>>   -  ti,davinci-chipselect =<1>;
>>   -  ti,davinci-mask-ale =<0>;
>>   -  ti,davinci-mask-cle =<0>;
>>   -  ti,davinci-mask-chipsel =<0>;
>>   -  ti,davinci-ecc-mode = "hw";
>>   -  ti,davinci-ecc-bits =<4>;
>>   -  ti,davinci-nand-use-bbt;
>>   +Example(da850 EVM ):
>>   +nand_cs3@6200 {
>>   +  compatible = "ti,davinci-nand";
>>   +  reg =<0x6200 0x807ff
>>   +  0x6800 0x8000>;
>>   +  ti,davinci-chipselect =<1>;
>>   +  ti,davinci-mask-ale =<0>;
>>   +  ti,davinci-mask-cle =<0>;
>>   +  ti,davinci-mask-chipsel =<0>;
>>   +  ti,davinci-ecc-mode = "hw";
>>   +  ti,davinci-ecc-bits =<4>;
>>   +  ti,davinci-nand-use-bbt;
>> +
>>   -  partition@18 {
>>   -  label = "ubifs";
>>   -  reg =<0x18 0x7e8>;
>>   -  };
>> ++   partition@18 {
>> ++   label = "ubifs";
>> ++   reg =<0x18 0x7e8>;
> partition@18 is sub-node of nand_cs3@6200.
> nand_cs3@6200 needs to use below properties
>
> #address-cells =<1>;
> #size-cells =<1>;
>
> Without these properties DT build will give reg format Warning.
>
>> +};
>>};
>>
>Anul,

>Could you point me to a corresponding driver commit id?

from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
commit ID : cdeadd712f52b16a9285386d61ee26fd14eb4085
add OF support for the davinci nand controller

Thanks,
Anil--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: linux-next: manual merge of the l2-mtd tree with Linus' tree

2012-12-14 Thread Kumar, Anil


From: Karicheri, Muralidharan
Sent: Thursday, December 13, 2012 8:45 PM
To: Kumar, Anil
Cc: Stephen Rothwell; Artem Bityutskiy; linux-n...@vger.kernel.org; 
linux-kernel@vger.kernel.org; Grant Likely
Subject: Re: linux-next: manual merge of the l2-mtd tree with Linus' tree

On 12/13/2012 12:38 AM, Kumar, Anil wrote:
 On Thu, Dec 13, 2012 at 07:07:55, Stephen Rothwell wrote:
 Hi Artem,

 Today's linux-next merge of the l2-mtd tree got a conflict in
 Documentation/devicetree/bindings/arm/davinci/nand.txt between commit
 fed16bba8726 (mtd: nand: davinci: fix the binding documentation) from
 Linus' tree and commit 192afdbfbc5c (mtd: davinci: add support for
 parition binding nodes) from the l2-mtd tree.

 I fixed it up (maybe- see below) and can carry the fix as necessary (no
 action is required).

 --
 Cheers,
 Stephen Rothwells...@canb.auug.org.au

 diff --cc Documentation/devicetree/bindings/arm/davinci/nand.txt
 index 49fc7ad,4746452..000
 --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
 +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
 @@@ -23,16 -23,37 +23,24 @@@ Recommended properties
- ti,davinci-nand-buswidth: buswidth 8 or 16
- ti,davinci-nand-use-bbt: use flash based bad block table support.

 + nand device bindings may contain additional sub-nodes describing
 + partitions of the address space. See partition.txt for more detail.
 +
   -Example (enbw_cmc board):
   -aemif@6000 {
   -  compatible = ti,davinci-aemif;
   -  #address-cells =2;
   -  #size-cells =1;
   -  reg =0x6800 0x8;
   -  ranges =2 0 0x6000 0x0200
   -3 0 0x6200 0x0200
   -4 0 0x6400 0x0200
   -5 0 0x6600 0x0200
   -6 0 0x6800 0x0200;
   -  nand@3,0 {
   -  compatible = ti,davinci-nand;
   -  reg =3 0x0 0x807ff
   -  6 0x0 0x8000;
   -  #address-cells =1;
   -  #size-cells =1;
   -  ti,davinci-chipselect =1;
   -  ti,davinci-mask-ale =0;
   -  ti,davinci-mask-cle =0;
   -  ti,davinci-mask-chipsel =0;
   -  ti,davinci-ecc-mode = hw;
   -  ti,davinci-ecc-bits =4;
   -  ti,davinci-nand-use-bbt;
   +Example(da850 EVM ):
   +nand_cs3@6200 {
   +  compatible = ti,davinci-nand;
   +  reg =0x6200 0x807ff
   +  0x6800 0x8000;
   +  ti,davinci-chipselect =1;
   +  ti,davinci-mask-ale =0;
   +  ti,davinci-mask-cle =0;
   +  ti,davinci-mask-chipsel =0;
   +  ti,davinci-ecc-mode = hw;
   +  ti,davinci-ecc-bits =4;
   +  ti,davinci-nand-use-bbt;
 +
   -  partition@18 {
   -  label = ubifs;
   -  reg =0x18 0x7e8;
   -  };
 ++   partition@18 {
 ++   label = ubifs;
 ++   reg =0x18 0x7e8;
 partition@18 is sub-node of nand_cs3@6200.
 nand_cs3@6200 needs to use below properties

 #address-cells =1;
 #size-cells =1;

 Without these properties DT build will give reg format Warning.

 +};
};

Anul,

Could you point me to a corresponding driver commit id?

from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
commit ID : cdeadd712f52b16a9285386d61ee26fd14eb4085
add OF support for the davinci nand controller

Thanks,
Anil--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: linux-next: manual merge of the l2-mtd tree with Linus' tree

2012-12-12 Thread Kumar, Anil
On Thu, Dec 13, 2012 at 07:07:55, Stephen Rothwell wrote:
> Hi Artem,
> 
> Today's linux-next merge of the l2-mtd tree got a conflict in
> Documentation/devicetree/bindings/arm/davinci/nand.txt between commit
> fed16bba8726 ("mtd: nand: davinci: fix the binding documentation") from
> Linus' tree and commit 192afdbfbc5c ("mtd: davinci: add support for
> parition binding nodes") from the l2-mtd tree.
> 
> I fixed it up (maybe- see below) and can carry the fix as necessary (no
> action is required).
> 
> -- 
> Cheers,
> Stephen Rothwells...@canb.auug.org.au
> 
> diff --cc Documentation/devicetree/bindings/arm/davinci/nand.txt
> index 49fc7ad,4746452..000
> --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
> +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
> @@@ -23,16 -23,37 +23,24 @@@ Recommended properties 
>   - ti,davinci-nand-buswidth: buswidth 8 or 16
>   - ti,davinci-nand-use-bbt: use flash based bad block table support.
>   
> + nand device bindings may contain additional sub-nodes describing
> + partitions of the address space. See partition.txt for more detail.
> + 
>  -Example (enbw_cmc board):
>  -aemif@6000 {
>  -compatible = "ti,davinci-aemif";
>  -#address-cells = <2>;
>  -#size-cells = <1>;
>  -reg = <0x6800 0x8>;
>  -ranges = <2 0 0x6000 0x0200
>  -  3 0 0x6200 0x0200
>  -  4 0 0x6400 0x0200
>  -  5 0 0x6600 0x0200
>  -  6 0 0x6800 0x0200>;
>  -nand@3,0 {
>  -compatible = "ti,davinci-nand";
>  -reg = <3 0x0 0x807ff
>  -6 0x0 0x8000>;
>  -#address-cells = <1>;
>  -#size-cells = <1>;
>  -ti,davinci-chipselect = <1>;
>  -ti,davinci-mask-ale = <0>;
>  -ti,davinci-mask-cle = <0>;
>  -ti,davinci-mask-chipsel = <0>;
>  -ti,davinci-ecc-mode = "hw";
>  -ti,davinci-ecc-bits = <4>;
>  -ti,davinci-nand-use-bbt;
>  +Example(da850 EVM ):
>  +nand_cs3@6200 {
>  +compatible = "ti,davinci-nand";
>  +reg = <0x6200 0x807ff
>  +0x6800 0x8000>;
>  +ti,davinci-chipselect = <1>;
>  +ti,davinci-mask-ale = <0>;
>  +ti,davinci-mask-cle = <0>;
>  +ti,davinci-mask-chipsel = <0>;
>  +ti,davinci-ecc-mode = "hw";
>  +ti,davinci-ecc-bits = <4>;
>  +ti,davinci-nand-use-bbt;
> + 
>  -partition@18 {
>  -label = "ubifs";
>  -reg = <0x18 0x7e8>;
>  -};
> ++partition@18 {
> ++label = "ubifs";
> ++reg = <0x18 0x7e8>;

partition@18 is sub-node of nand_cs3@6200.
nand_cs3@6200 needs to use below properties 

#address-cells = <1>;
#size-cells = <1>;

Without these properties DT build will give reg format Warning. 

> + };
>   };
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: linux-next: manual merge of the l2-mtd tree with Linus' tree

2012-12-12 Thread Kumar, Anil
On Thu, Dec 13, 2012 at 07:07:55, Stephen Rothwell wrote:
 Hi Artem,
 
 Today's linux-next merge of the l2-mtd tree got a conflict in
 Documentation/devicetree/bindings/arm/davinci/nand.txt between commit
 fed16bba8726 (mtd: nand: davinci: fix the binding documentation) from
 Linus' tree and commit 192afdbfbc5c (mtd: davinci: add support for
 parition binding nodes) from the l2-mtd tree.
 
 I fixed it up (maybe- see below) and can carry the fix as necessary (no
 action is required).
 
 -- 
 Cheers,
 Stephen Rothwells...@canb.auug.org.au
 
 diff --cc Documentation/devicetree/bindings/arm/davinci/nand.txt
 index 49fc7ad,4746452..000
 --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
 +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
 @@@ -23,16 -23,37 +23,24 @@@ Recommended properties 
   - ti,davinci-nand-buswidth: buswidth 8 or 16
   - ti,davinci-nand-use-bbt: use flash based bad block table support.
   
 + nand device bindings may contain additional sub-nodes describing
 + partitions of the address space. See partition.txt for more detail.
 + 
  -Example (enbw_cmc board):
  -aemif@6000 {
  -compatible = ti,davinci-aemif;
  -#address-cells = 2;
  -#size-cells = 1;
  -reg = 0x6800 0x8;
  -ranges = 2 0 0x6000 0x0200
  -  3 0 0x6200 0x0200
  -  4 0 0x6400 0x0200
  -  5 0 0x6600 0x0200
  -  6 0 0x6800 0x0200;
  -nand@3,0 {
  -compatible = ti,davinci-nand;
  -reg = 3 0x0 0x807ff
  -6 0x0 0x8000;
  -#address-cells = 1;
  -#size-cells = 1;
  -ti,davinci-chipselect = 1;
  -ti,davinci-mask-ale = 0;
  -ti,davinci-mask-cle = 0;
  -ti,davinci-mask-chipsel = 0;
  -ti,davinci-ecc-mode = hw;
  -ti,davinci-ecc-bits = 4;
  -ti,davinci-nand-use-bbt;
  +Example(da850 EVM ):
  +nand_cs3@6200 {
  +compatible = ti,davinci-nand;
  +reg = 0x6200 0x807ff
  +0x6800 0x8000;
  +ti,davinci-chipselect = 1;
  +ti,davinci-mask-ale = 0;
  +ti,davinci-mask-cle = 0;
  +ti,davinci-mask-chipsel = 0;
  +ti,davinci-ecc-mode = hw;
  +ti,davinci-ecc-bits = 4;
  +ti,davinci-nand-use-bbt;
 + 
  -partition@18 {
  -label = ubifs;
  -reg = 0x18 0x7e8;
  -};
 ++partition@18 {
 ++label = ubifs;
 ++reg = 0x18 0x7e8;

partition@18 is sub-node of nand_cs3@6200.
nand_cs3@6200 needs to use below properties 

#address-cells = 1;
#size-cells = 1;

Without these properties DT build will give reg format Warning. 

 + };
   };
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 0/2] Convert davinci ASoC to genalloc SRAM

2012-10-10 Thread Kumar, Anil
On Wed, Oct 10, 2012 at 12:34:47, Daniel Mack wrote:
> On 10.10.2012 08:54, Kumar, Anil wrote:
> > On Thu, Oct 04, 2012 at 15:45:43, Porter, Matt wrote:
> >> This series converts davinci ASoC to use genalloc and enables
> >> that support on DA850. It applies on top of the uio_pruss/genalloc
> >> series [1] which allows DaVinci to provide a gen_pool via pdata
> >> for driver use.
> >>
> >> I've tested this on the AM180x EVM. Note that prior to this,
> >> the SRAM paths in the driver were completely unused. I've only
> >> enabled ping-pong buffering on the platform I can test as it's
> >> best to allow those with DM644x and similar platforms to set the
> >> playback/capture sram size to something that's known to work
> >> for them.
> >>
> >> [1] http://www.spinics.net/lists/arm-kernel/msg198854.html
> > 
> > Tested on DA850 EVM after applying patches from [1] above.
> > Tested on Linux-torvalds 3.6-rc6 master branch.
> > Tested ASoC module (aplay & arecord for various frequencies)
> > 
> > Acked-by: Kumar, Anil 
> 
> As you're on it, could you also quickly merge this branch
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
> topic/davinci
> 
> And see if my recent patches for more McASP flexibility cause any
> trouble on your hardware?
> 
> 
> Daniel
> 
> 

I have merged it with 3.6-rc6 and I have got error at compile time.
I have fixed this locally with the following patch [1]. 
Kindly confirm if the patch is correct?

With that 
Tested on DA850 EVM
Tested on Linux-torvalds 3.6-rc6 master branch merged + [1]
Tested ASoC module (aplay & arecord for various frequencies)   

Tested-By: Kumar, Anil  

[1]
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
topic/davinci.

[2] patch
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 09da4e5..9c02a45 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -591,7 +591,7 @@ struct dma_device {
struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
size_t period_len, enum dma_transfer_direction direction,
-   unsigned long flags, void *context);
+   void *context);
struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
struct dma_chan *chan, struct dma_interleaved_template *xt,
unsigned long flags);
@@ -656,7 +656,7 @@ static inline struct dma_async_tx_descriptor 
*dmaengine_prep_dma_cyclic(
size_t period_len, enum dma_transfer_direction dir)
 {
return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
-   period_len, dir, flags, NULL);
+   period_len, dir, NULL);
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 0/2] Convert davinci ASoC to genalloc SRAM

2012-10-10 Thread Kumar, Anil
On Thu, Oct 04, 2012 at 15:45:43, Porter, Matt wrote:
> This series converts davinci ASoC to use genalloc and enables
> that support on DA850. It applies on top of the uio_pruss/genalloc
> series [1] which allows DaVinci to provide a gen_pool via pdata
> for driver use.
> 
> I've tested this on the AM180x EVM. Note that prior to this,
> the SRAM paths in the driver were completely unused. I've only
> enabled ping-pong buffering on the platform I can test as it's
> best to allow those with DM644x and similar platforms to set the
> playback/capture sram size to something that's known to work
> for them.
> 
> [1] http://www.spinics.net/lists/arm-kernel/msg198854.html

Tested on DA850 EVM after applying patches from [1] above.
Tested on Linux-torvalds 3.6-rc6 master branch.
Tested ASoC module (aplay & arecord for various frequencies)

Acked-by: Kumar, Anil 
 
> Matt Porter (2):
>   ASoC: davinci: replace private sram api with genalloc
>   ARM: davinci: enable SRAM ping ping buffering on DA850
> 
>  arch/arm/mach-davinci/board-da850-evm.c   |   24 ++--
>  include/linux/platform_data/davinci_asp.h |3 +++
>  sound/soc/davinci/davinci-mcasp.c |2 ++
>  sound/soc/davinci/davinci-pcm.c   |   18 --
>  sound/soc/davinci/davinci-pcm.h   |2 ++
>  5 files changed, 33 insertions(+), 16 deletions(-)
> 
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 0/2] Convert davinci ASoC to genalloc SRAM

2012-10-10 Thread Kumar, Anil
On Thu, Oct 04, 2012 at 15:45:43, Porter, Matt wrote:
 This series converts davinci ASoC to use genalloc and enables
 that support on DA850. It applies on top of the uio_pruss/genalloc
 series [1] which allows DaVinci to provide a gen_pool via pdata
 for driver use.
 
 I've tested this on the AM180x EVM. Note that prior to this,
 the SRAM paths in the driver were completely unused. I've only
 enabled ping-pong buffering on the platform I can test as it's
 best to allow those with DM644x and similar platforms to set the
 playback/capture sram size to something that's known to work
 for them.
 
 [1] http://www.spinics.net/lists/arm-kernel/msg198854.html

Tested on DA850 EVM after applying patches from [1] above.
Tested on Linux-torvalds 3.6-rc6 master branch.
Tested ASoC module (aplay  arecord for various frequencies)

Acked-by: Kumar, Anil anilkuma...@ti.com
 
 Matt Porter (2):
   ASoC: davinci: replace private sram api with genalloc
   ARM: davinci: enable SRAM ping ping buffering on DA850
 
  arch/arm/mach-davinci/board-da850-evm.c   |   24 ++--
  include/linux/platform_data/davinci_asp.h |3 +++
  sound/soc/davinci/davinci-mcasp.c |2 ++
  sound/soc/davinci/davinci-pcm.c   |   18 --
  sound/soc/davinci/davinci-pcm.h   |2 ++
  5 files changed, 33 insertions(+), 16 deletions(-)
 
 -- 
 1.7.9.5
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 0/2] Convert davinci ASoC to genalloc SRAM

2012-10-10 Thread Kumar, Anil
On Wed, Oct 10, 2012 at 12:34:47, Daniel Mack wrote:
 On 10.10.2012 08:54, Kumar, Anil wrote:
  On Thu, Oct 04, 2012 at 15:45:43, Porter, Matt wrote:
  This series converts davinci ASoC to use genalloc and enables
  that support on DA850. It applies on top of the uio_pruss/genalloc
  series [1] which allows DaVinci to provide a gen_pool via pdata
  for driver use.
 
  I've tested this on the AM180x EVM. Note that prior to this,
  the SRAM paths in the driver were completely unused. I've only
  enabled ping-pong buffering on the platform I can test as it's
  best to allow those with DM644x and similar platforms to set the
  playback/capture sram size to something that's known to work
  for them.
 
  [1] http://www.spinics.net/lists/arm-kernel/msg198854.html
  
  Tested on DA850 EVM after applying patches from [1] above.
  Tested on Linux-torvalds 3.6-rc6 master branch.
  Tested ASoC module (aplay  arecord for various frequencies)
  
  Acked-by: Kumar, Anil anilkuma...@ti.com
 
 As you're on it, could you also quickly merge this branch
 
   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
 topic/davinci
 
 And see if my recent patches for more McASP flexibility cause any
 trouble on your hardware?
 
 
 Daniel
 
 

I have merged it with 3.6-rc6 and I have got error at compile time.
I have fixed this locally with the following patch [1]. 
Kindly confirm if the patch is correct?

With that 
Tested on DA850 EVM
Tested on Linux-torvalds 3.6-rc6 master branch merged + [1]
Tested ASoC module (aplay  arecord for various frequencies)   

Tested-By: Kumar, Anil anilkuma...@ti.com 

[1]
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
topic/davinci.

[2] patch
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 09da4e5..9c02a45 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -591,7 +591,7 @@ struct dma_device {
struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
size_t period_len, enum dma_transfer_direction direction,
-   unsigned long flags, void *context);
+   void *context);
struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
struct dma_chan *chan, struct dma_interleaved_template *xt,
unsigned long flags);
@@ -656,7 +656,7 @@ static inline struct dma_async_tx_descriptor 
*dmaengine_prep_dma_cyclic(
size_t period_len, enum dma_transfer_direction dir)
 {
return chan-device-device_prep_dma_cyclic(chan, buf_addr, buf_len,
-   period_len, dir, flags, NULL);
+   period_len, dir, NULL);
 }

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/