asm/types.h Header file wont get generated while building uImage ?

2013-03-08 Thread Prabhakar Lad
Hi,

Usually for building uImage I follow this steps,
1: do a clean distclean
2: make ARCH=arm CROSS_COMPILE=xxx   xxxdefconfig
3: make ARCH=arm CROSS_COMPILE=xxx  uImage

This used to work until 3.8, for 3.9 I see the following error:

  HOSTCC  scripts/genksyms/parse.tab.o
In file included from include/linux/types.h:5:0,
 from include/linux/mod_devicetable.h:11,
 from scripts/mod/devicetable-offsets.c:2:
include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such
file or directory
compilation terminated.

Well this get fixed if do  make ARCH=arm
CROSS_COMPILE=arm-none-linux-gnueabi- headers_install
and the build the uImage.

Is it the same way now its going to be followed or is it I am missing
something ?
(For  reference I have used da8xx_omapl_defconfig config when I faced
this issue)

Regards,
--Prabhakar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[GIT PULL FOR v3.10] tvp7002/davinci/blackfin legacy cleanups

2013-03-08 Thread Hans Verkuil
Hi Mauro,

This patch series cleans up some legacy code:

- remove the references to the obsolete DV_PRESET API from the tvp7002 and
  davinci drivers. They were already converted to the DV_TIMINGS API, but
  some remnants of the old API remained.
- convert one more driver to the control framework (trivial exercise in this
  case).
- remove some (broken) uses of current_norm from davinci drivers.
- fix a dm644x_ccdc compiler warning and fix a number of typos.
- replace the obsolete use of V4L2_IN/OUT_CAP_CUSTOM_TIMINGS in the blackfin
  driver.

After this series the only user of the DV_PRESET API is the s5p-tv driver for
which patches are in the works.

Note that this patch series is identical to the review patch series posted on
Monday:

http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/61341

Regards,

Hans

The following changes since commit 457ba4ce4f435d0b4dd82a0acc6c796e541a2ea7:

  [media] bttv: move fini_bttv_i2c() from bttv-input.c to bttv-i2c.c 
(2013-03-05 17:11:12 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git davinci

for you to fetch changes up to 319e3780787955abf6d617150eaa1caac3881e25:

  blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS (2013-03-08 
09:55:51 +0100)


Hans Verkuil (12):
  tvp7002: replace 'preset' by 'timings' in various structs/variables.
  tvp7002: use dv_timings structs instead of presets.
  tvp7002: remove dv_preset support.
  davinci_vpfe: fix copy-paste errors in several comments.
  davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
  davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  davinci/vpfe_capture: convert to the control framework.
  davinci/vpbe_display: remove deprecated current_norm.
  davinci/vpfe_capture: remove current_norm
  davinci/dm644x_ccdc: fix compiler warning
  davinci: more gama - gamma typo fixes.
  blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS

 arch/arm/mach-davinci/board-dm644x-evm.c  |4 +-
 arch/arm/mach-davinci/board-dm646x-evm.c  |2 +-
 arch/arm/mach-davinci/dm644x.c|2 +-
 arch/blackfin/mach-bf609/boards/ezkit.c   |8 +--
 drivers/media/i2c/tvp7002.c   |  182 
+
 drivers/media/platform/blackfin/bfin_capture.c|4 +-
 drivers/media/platform/davinci/dm355_ccdc.c   |   10 ++--
 drivers/media/platform/davinci/dm355_ccdc_regs.h  |2 +-
 drivers/media/platform/davinci/dm644x_ccdc.c  |   13 +++--
 drivers/media/platform/davinci/dm644x_ccdc_regs.h |2 +-
 drivers/media/platform/davinci/isif.c |2 +-
 drivers/media/platform/davinci/isif_regs.h|4 +-
 drivers/media/platform/davinci/vpbe.c |8 +--
 drivers/media/platform/davinci/vpbe_display.c |   12 +
 drivers/media/platform/davinci/vpbe_venc.c|8 +--
 drivers/media/platform/davinci/vpfe_capture.c |   48 +++--
 drivers/staging/media/davinci_vpfe/vpfe_video.c   |   12 ++---
 include/media/davinci/dm355_ccdc.h|6 +--
 include/media/davinci/dm644x_ccdc.h   |   24 ++---
 include/media/davinci/vpbe_types.h|3 +-
 20 files changed, 119 insertions(+), 237 deletions(-)
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH] davinci: vpif: Fix module build for capture and display

2013-03-08 Thread Sekhar Nori
Hi Prabhakar,

On 3/7/2013 12:44 PM, Prabhakar lad wrote:
 From: Lad, Prabhakar prabhakar@ti.com
 
 export the symbols which are used by two modules vpif_capture and
 vpif_display.
 
 This patch fixes following error:
 ERROR: ch_params [drivers/media/platform/davinci/vpif_display.ko] undefined!
 ERROR: vpif_ch_params_count 
 [drivers/media/platform/davinci/vpif_display.ko] undefined!
 ERROR: vpif_base [drivers/media/platform/davinci/vpif_display.ko] undefined!
 ERROR: ch_params [drivers/media/platform/davinci/vpif_capture.ko] undefined!
 ERROR: vpif_ch_params_count 
 [drivers/media/platform/davinci/vpif_capture.ko] undefined!
 ERROR: vpif_base [drivers/media/platform/davinci/vpif_capture.ko] undefined!
 make[1]: *** [__modpost] Error 1
 
 Reported-by: Sekhar Nori nsek...@ti.com
 Signed-off-by: Lad, Prabhakar prabhakar@ti.com
 ---
  drivers/media/platform/davinci/vpif.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/platform/davinci/vpif.c 
 b/drivers/media/platform/davinci/vpif.c
 index 28638a8..8fbb4a2 100644
 --- a/drivers/media/platform/davinci/vpif.c
 +++ b/drivers/media/platform/davinci/vpif.c
 @@ -44,6 +44,8 @@ static struct resource  *res;
  spinlock_t vpif_lock;
  
  void __iomem *vpif_base;
 +EXPORT_SYMBOL(vpif_base);

Should be EXPORT_SYMBOL_GPL() as nothing except GPL code would be
needing this internal symbol.

Also exporting this shows that the driver is written for only one
instance. It seems to me that the driver modules can use much better
abstractions so all these exports wont be needed but having broken
module build is bad as well.

Thanks,
Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH] davinci: vpif: Fix module build for capture and display

2013-03-08 Thread Prabhakar Lad
Sekhar,

On Fri, Mar 8, 2013 at 2:53 PM, Sekhar Nori nsek...@ti.com wrote:
 Hi Prabhakar,

 On 3/7/2013 12:44 PM, Prabhakar lad wrote:
 From: Lad, Prabhakar prabhakar@ti.com

 export the symbols which are used by two modules vpif_capture and
 vpif_display.

 This patch fixes following error:
 ERROR: ch_params [drivers/media/platform/davinci/vpif_display.ko] 
 undefined!
 ERROR: vpif_ch_params_count 
 [drivers/media/platform/davinci/vpif_display.ko] undefined!
 ERROR: vpif_base [drivers/media/platform/davinci/vpif_display.ko] 
 undefined!
 ERROR: ch_params [drivers/media/platform/davinci/vpif_capture.ko] 
 undefined!
 ERROR: vpif_ch_params_count 
 [drivers/media/platform/davinci/vpif_capture.ko] undefined!
 ERROR: vpif_base [drivers/media/platform/davinci/vpif_capture.ko] 
 undefined!
 make[1]: *** [__modpost] Error 1

 Reported-by: Sekhar Nori nsek...@ti.com
 Signed-off-by: Lad, Prabhakar prabhakar@ti.com
 ---
  drivers/media/platform/davinci/vpif.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)

 diff --git a/drivers/media/platform/davinci/vpif.c 
 b/drivers/media/platform/davinci/vpif.c
 index 28638a8..8fbb4a2 100644
 --- a/drivers/media/platform/davinci/vpif.c
 +++ b/drivers/media/platform/davinci/vpif.c
 @@ -44,6 +44,8 @@ static struct resource  *res;
  spinlock_t vpif_lock;

  void __iomem *vpif_base;
 +EXPORT_SYMBOL(vpif_base);

 Should be EXPORT_SYMBOL_GPL() as nothing except GPL code would be
 needing this internal symbol.

 Also exporting this shows that the driver is written for only one
 instance. It seems to me that the driver modules can use much better
 abstractions so all these exports wont be needed but having broken
 module build is bad as well.

OK as of now I'll go with EXPORT_SYMBOL_GPL() and revisit this at later
point of time.

Regards,
--Prabhakar

 Thanks,
 Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Error while building vpbe display as module

2013-03-08 Thread Sekhar Nori
Prabhakar,

Building with CONFIG_VIDEO_DAVINCI_VPBE_DISPLAY=m in latest mainline
gives the error:

   MODPOST 130 modules
drivers/media/platform/davinci/vpbe_osd: struct platform_device_id is 24
bytes.  The last of 3 is:
0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x6f 0x73 0x64
0x00 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00
FATAL: drivers/media/platform/davinci/vpbe_osd: struct
platform_device_id is not  terminated with a NULL entry!

Can you please look into this?

Thanks,
Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH v2 4/6] ARM: davinci: da850: add DT node for eth0.

2013-03-08 Thread Prabhakar Lad
Sekhar,

On Mon, Feb 4, 2013 at 11:20 PM, Sekhar Nori nsek...@ti.com wrote:
 On 2/4/2013 10:37 AM, Prabhakar Lad wrote:
 Sekhar ,

 On Sun, Feb 3, 2013 at 5:33 PM, Sekhar Nori nsek...@ti.com wrote:
 On 1/28/2013 7:17 PM, Prabhakar Lad wrote:
 From: Lad, Prabhakar prabhakar@ti.com

 Add eth0 device tree node information and pinmux for mii to da850 by
 providing interrupt details and local mac address of eth0.

 Signed-off-by: Lad, Prabhakar prabhakar@ti.com
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-ker...@vger.kernel.org
 Cc: davinci-linux-open-source@linux.davincidsp.com
 Cc: net...@vger.kernel.org
 Cc: devicetree-disc...@lists.ozlabs.org
 Cc: Sekhar Nori nsek...@ti.com
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/arm/boot/dts/da850-evm.dts |5 +
  arch/arm/boot/dts/da850.dtsi|   35 +++
  2 files changed, 40 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/da850-evm.dts 
 b/arch/arm/boot/dts/da850-evm.dts
 index a319491..19aa2b3 100644
 --- a/arch/arm/boot/dts/da850-evm.dts
 +++ b/arch/arm/boot/dts/da850-evm.dts
 @@ -30,6 +30,11 @@
   mdio: davinci_mdio@1e24000 {
   status = okay;
   };
 + eth0: emac@1e2 {
 + status = okay;
 + pinctrl-names = default;
 + pinctrl-0 = mii_pins;
 + };
   };
   nand_cs3@6200 {
   status = okay;
 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
 index ba28f2d..76905f3 100644
 --- a/arch/arm/boot/dts/da850.dtsi
 +++ b/arch/arm/boot/dts/da850.dtsi
 @@ -56,6 +56,26 @@
   0x30 0x0110  0x0ff0
   ;
   };
 + mii_pins: pinmux_mii_pins {
 + pinctrl-single,bits = 
 + /*
 +  * MII_TXEN, MII_TXCLK, MII_COL
 +  * MII_TXD_3, MII_TXD_2, MII_TXD_1
 +  * MII_TXD_0
 +  */
 + 0x8 0x8880 0xfff0
 + /*
 +  * MII_RXER, MII_CRS, MII_RXCLK
 +  * MII_RXDV, MII_RXD_3, MII_RXD_2
 +  * MII_RXD_1, MII_RXD_0
 +  */
 + 0xc 0x 0x
 + /* MDIO_CLK, MDIO_D */

 You call this mii_pins, but include mdio pins in there as well. Can you
 separate them out? Then some board which uses rmii can simply reuse the
 entry.

 Ok makes sense.

 + 0x10 0x0088 0x00ff
 + /* GPIO2_6 */
 + 0x18 0x0080 0x00f0

 This is SoC specific pin list. Such board specific pins should not make
 it here.

 Ok, so this should be set up using GPIO API's ?

 Yes, the pins ultimately will be controlled by gpiolib APIs, but the
 pins should be defined under the eth node in .dts

You mean '0x18 0x0080 0x00f0'  still needs to defined in eth0 node ?
Can you elaborate and give some pointers.

Regards,
--Prabhakar

 Thanks,
 Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH v2 4/6] ARM: davinci: da850: add DT node for eth0.

2013-03-08 Thread Sekhar Nori
On 3/8/2013 3:15 PM, Prabhakar Lad wrote:
 Sekhar,
 
 On Mon, Feb 4, 2013 at 11:20 PM, Sekhar Nori nsek...@ti.com wrote:
 On 2/4/2013 10:37 AM, Prabhakar Lad wrote:
 Sekhar ,

 On Sun, Feb 3, 2013 at 5:33 PM, Sekhar Nori nsek...@ti.com wrote:
 On 1/28/2013 7:17 PM, Prabhakar Lad wrote:
 From: Lad, Prabhakar prabhakar@ti.com

 Add eth0 device tree node information and pinmux for mii to da850 by
 providing interrupt details and local mac address of eth0.

 Signed-off-by: Lad, Prabhakar prabhakar@ti.com
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-ker...@vger.kernel.org
 Cc: davinci-linux-open-source@linux.davincidsp.com
 Cc: net...@vger.kernel.org
 Cc: devicetree-disc...@lists.ozlabs.org
 Cc: Sekhar Nori nsek...@ti.com
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/arm/boot/dts/da850-evm.dts |5 +
  arch/arm/boot/dts/da850.dtsi|   35 
 +++
  2 files changed, 40 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/da850-evm.dts 
 b/arch/arm/boot/dts/da850-evm.dts
 index a319491..19aa2b3 100644
 --- a/arch/arm/boot/dts/da850-evm.dts
 +++ b/arch/arm/boot/dts/da850-evm.dts
 @@ -30,6 +30,11 @@
   mdio: davinci_mdio@1e24000 {
   status = okay;
   };
 + eth0: emac@1e2 {
 + status = okay;
 + pinctrl-names = default;
 + pinctrl-0 = mii_pins;
 + };
   };
   nand_cs3@6200 {
   status = okay;
 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
 index ba28f2d..76905f3 100644
 --- a/arch/arm/boot/dts/da850.dtsi
 +++ b/arch/arm/boot/dts/da850.dtsi
 @@ -56,6 +56,26 @@
   0x30 0x0110  0x0ff0
   ;
   };
 + mii_pins: pinmux_mii_pins {
 + pinctrl-single,bits = 
 + /*
 +  * MII_TXEN, MII_TXCLK, MII_COL
 +  * MII_TXD_3, MII_TXD_2, MII_TXD_1
 +  * MII_TXD_0
 +  */
 + 0x8 0x8880 0xfff0
 + /*
 +  * MII_RXER, MII_CRS, MII_RXCLK
 +  * MII_RXDV, MII_RXD_3, MII_RXD_2
 +  * MII_RXD_1, MII_RXD_0
 +  */
 + 0xc 0x 0x
 + /* MDIO_CLK, MDIO_D */

 You call this mii_pins, but include mdio pins in there as well. Can you
 separate them out? Then some board which uses rmii can simply reuse the
 entry.

 Ok makes sense.

 + 0x10 0x0088 0x00ff
 + /* GPIO2_6 */
 + 0x18 0x0080 0x00f0

 This is SoC specific pin list. Such board specific pins should not make
 it here.

 Ok, so this should be set up using GPIO API's ?

 Yes, the pins ultimately will be controlled by gpiolib APIs, but the
 pins should be defined under the eth node in .dts

 You mean '0x18 0x0080 0x00f0'  still needs to defined in eth0 node ?
 Can you elaborate and give some pointers.

Since the GPIO usage for ethernet is board specific, it cannot be in
.dtsi which is SoC generic. I am suggesting do in the .dts file which is
board specific.

Thanks,
Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH] davinci: vpbe: fix module build

2013-03-08 Thread Prabhakar lad
From: Lad, Prabhakar prabhakar.cse...@gmail.com

add a null entry in platform_device_id {}.

This patch fixes following error:
drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 24 
bytes.  The last of 3 is:
0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x76 0x65 0x6e 0x63 0x00 
0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00
FATAL: drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 
not terminated with a NULL entry!
make[1]: *** [__modpost] Error 1

Reported-by: Sekhar Nori nsek...@ti.com
Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com
---
 drivers/media/platform/davinci/vpbe_osd.c  |3 +++
 drivers/media/platform/davinci/vpbe_venc.c |3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/media/platform/davinci/vpbe_osd.c 
b/drivers/media/platform/davinci/vpbe_osd.c
index 12ad17c..396a51c 100644
--- a/drivers/media/platform/davinci/vpbe_osd.c
+++ b/drivers/media/platform/davinci/vpbe_osd.c
@@ -52,6 +52,9 @@ static struct platform_device_id vpbe_osd_devtype[] = {
.name = DM355_VPBE_OSD_SUBDEV_NAME,
.driver_data = VPBE_VERSION_3,
},
+   {
+   /* sentinel */
+   }
 };
 
 MODULE_DEVICE_TABLE(platform, vpbe_osd_devtype);
diff --git a/drivers/media/platform/davinci/vpbe_venc.c 
b/drivers/media/platform/davinci/vpbe_venc.c
index bdbebd5..34c704b 100644
--- a/drivers/media/platform/davinci/vpbe_venc.c
+++ b/drivers/media/platform/davinci/vpbe_venc.c
@@ -51,6 +51,9 @@ static struct platform_device_id vpbe_venc_devtype[] = {
.name = DM355_VPBE_VENC_SUBDEV_NAME,
.driver_data = VPBE_VERSION_3,
},
+   {
+   /* sentinel */
+   }
 };
 
 MODULE_DEVICE_TABLE(platform, vpbe_venc_devtype);
-- 
1.7.4.1

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Error while building vpbe display as module

2013-03-08 Thread Prabhakar Lad
Sekhar,

On Fri, Mar 8, 2013 at 3:00 PM, Sekhar Nori nsek...@ti.com wrote:
 Prabhakar,

 Building with CONFIG_VIDEO_DAVINCI_VPBE_DISPLAY=m in latest mainline
 gives the error:

MODPOST 130 modules
 drivers/media/platform/davinci/vpbe_osd: struct platform_device_id is 24
 bytes.  The last of 3 is:
 0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x6f 0x73 0x64
 0x00 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00
 FATAL: drivers/media/platform/davinci/vpbe_osd: struct
 platform_device_id is not  terminated with a NULL entry!

 Can you please look into this?

posted a patch(http://patchwork.linuxtv.org/patch/17159/) fixing the issue.

Regards,
--Prabhakar

 Thanks,
 Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v2] davinci: vpif: Fix module build for capture and display

2013-03-08 Thread Prabhakar lad
From: Lad, Prabhakar prabhakar.cse...@gmail.com

export the symbols which are used by two modules vpif_capture and
vpif_display.

This patch fixes following error:
ERROR: ch_params [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: vpif_ch_params_count [drivers/media/platform/davinci/vpif_display.ko] 
undefined!
ERROR: vpif_base [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: ch_params [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: vpif_ch_params_count [drivers/media/platform/davinci/vpif_capture.ko] 
undefined!
ERROR: vpif_base [drivers/media/platform/davinci/vpif_capture.ko] undefined!
make[1]: *** [__modpost] Error 1

Reported-by: Sekhar Nori nsek...@ti.com
Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com
---
 Changes for v2:
 1: use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL() as pointed by
Sekhar.

 drivers/media/platform/davinci/vpif.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/platform/davinci/vpif.c 
b/drivers/media/platform/davinci/vpif.c
index 28638a8..42c7eba 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -44,6 +44,8 @@ static struct resource*res;
 spinlock_t vpif_lock;
 
 void __iomem *vpif_base;
+EXPORT_SYMBOL_GPL(vpif_base);
+
 struct clk *vpif_clk;
 
 /**
@@ -220,8 +222,10 @@ const struct vpif_channel_config_params ch_params[] = {
.stdid = V4L2_STD_625_50,
},
 };
+EXPORT_SYMBOL_GPL(ch_params);
 
 const unsigned int vpif_ch_params_count = ARRAY_SIZE(ch_params);
+EXPORT_SYMBOL_GPL(vpif_ch_params_count);
 
 static inline void vpif_wr_bit(u32 reg, u32 bit, u32 val)
 {
-- 
1.7.4.1

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH] davinci: vpbe: fix module build

2013-03-08 Thread Sekhar Nori

On 3/8/2013 3:52 PM, Prabhakar lad wrote:
 From: Lad, Prabhakar prabhakar.cse...@gmail.com
 
 add a null entry in platform_device_id {}.
 
 This patch fixes following error:
 drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 24 
 bytes.  The last of 3 is:
 0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x76 0x65 0x6e 0x63 
 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00
 FATAL: drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 
 not terminated with a NULL entry!
 make[1]: *** [__modpost] Error 1
 
 Reported-by: Sekhar Nori nsek...@ti.com
 Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com

This fixed the issue for me. Thanks!

Tested-by: Sekhar Nori nsek...@ti.com

~Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH v2 6/6] ARM: davinci: da850: configure system configuration chip(CFGCHIP3) for emac

2013-03-08 Thread Prabhakar Lad
Sekhar,

On Mon, Feb 4, 2013 at 10:33 AM, Prabhakar Lad
prabhakar.cse...@gmail.com wrote:
 Sekhar ,

 On Sun, Feb 3, 2013 at 6:15 PM, Sekhar Nori nsek...@ti.com wrote:
 On 1/28/2013 7:17 PM, Prabhakar Lad wrote:
 From: Lad, Prabhakar prabhakar@ti.com

 The system configuration chip CFGCHIP3, controls the emac module.
 This patch appropriately configures this register for emac and
 sets DA850_MII_MDIO_CLKEN_PIN GPIO pin appropriately.

 Signed-off-by: Lad, Prabhakar prabhakar@ti.com
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: linux-ker...@vger.kernel.org
 Cc: davinci-linux-open-source@linux.davincidsp.com
 Cc: net...@vger.kernel.org
 Cc: devicetree-disc...@lists.ozlabs.org
 Cc: Sekhar Nori nsek...@ti.com
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/arm/mach-davinci/da8xx-dt.c |   28 
  1 files changed, 28 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/mach-davinci/da8xx-dt.c 
 b/arch/arm/mach-davinci/da8xx-dt.c
 index e533a0a..4a096e3 100644
 --- a/arch/arm/mach-davinci/da8xx-dt.c
 +++ b/arch/arm/mach-davinci/da8xx-dt.c
 @@ -8,6 +8,7 @@
   * published by the Free Software Foundation.
   */
  #include linux/io.h
 +#include linux/gpio.h
  #include linux/of_irq.h
  #include linux/of_platform.h
  #include linux/irqdomain.h
 @@ -39,6 +40,32 @@ static void __init da8xx_init_irq(void)

  #ifdef CONFIG_ARCH_DAVINCI_DA850

 +static void __init da8xx_config_emac(void)
 +{
 +#define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
 +#define DA850_EMAC_MODE_SELECT   BIT(8)
 + void __iomem *cfg_chip3_base;
 + int ret;
 + u32 val;
 +
 + cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
 +
 + val = __raw_readl(cfg_chip3_base);
 + val = ~DA850_EMAC_MODE_SELECT;
 + /* configure the CFGCHIP3 register for MII */
 + __raw_writel(val, cfg_chip3_base);

 Use readl/writel instead.

 Ok.

 + pr_info(EMAC: MII PHY configured\n);
 +
 + ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, mdio_clk_en);
 + if (ret) {
 + pr_warn(Cannot open GPIO %d\n,
 + DA850_MII_MDIO_CLKEN_PIN);
 + return;
 + }
 + /* Enable/Disable MII MDIO clock */
 + gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, 0);
 +}
 +
  struct of_dev_auxdata da8xx_auxdata[] __initdata = {
   OF_DEV_AUXDATA(ti,davinci_mdio, 0x01e24000, davinci_mdio.0, NULL),
   OF_DEV_AUXDATA(ti,davinci-dm6467-emac, 0x01e2, davinci_emac.1,
 @@ -52,6 +79,7 @@ static void __init da850_init_machine(void)
da8xx_auxdata, NULL);

   da8xx_uart_clk_enable();
 + da8xx_config_emac();

 There are couple of issues with this implementation.

 1) da8xx_config_emac() is specific to DA850 EVM, but masquerades as
generic for da8xx. Looks like you need two functions, one for soc
specific configuration and one board specific.
 Ok.

 2) da8xx_config_emac() goes through all the time, whether the
particular board has emac module or not. Shouldn't
da8xx_config_emac() check if emac is actually enabled in the passed
dtb and only the do the configuration?

 Ok. Can you give some pointers how we can access the dtb in board files.

Any pointers on this could be helpful.

Regards,
--Prabhakar

 3) The function assumes mii is used always, you can use the rmii_en dt
property to check if rmii/mii is enabled and configure the soc/board
accordingly.

 Ok.

 4) If the same function can work both for da850 and da830, then it can
be implemented outside of CONFIG_ARCH_DAVINCI_DA850.

 Ok.

 Regards,
 --Prabhakar

 Thanks,
 Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 0/7] ARM: davinci: remoteproc support

2013-03-08 Thread Robert Tivy
This patch series adds remoteproc support for OMAP-L138, along with needed
supporting mach-davinci infrastructure.

Some enhancements have been made to the general remoteproc  rpmsg
modules, in order to support simplified da8xx (and other) remoteproc driver
architecture.

These patches are based on Sekhar's commit id
595ab716fc6e648b7dc79a58a01917ebb67b9508
at git://gitorious.org/linux-davinci/linux-davinci.git

Some notes for reviewers...

DOCUMENTATION maintainers: patch 6/7 in this series contains a change to
kernel-parameters.txt that adds a description for a new kernel command-line
parameter, along with the code that defines the new kernel command-line
parameter.  You are, of course, free to look at the whole series, but only
patch 6/7 is of particular interest.

This is actually a subset of the complete patch series, since the other
patches in this set have already been committed to a staging area by the
tree maintainer.


Robert Tivy (7):
  Process all available messages in virtqueue callback.
  Allow all virtqueues processing in rproc_vq_interrupt().
  Add support for configuring DA8XX_REMOTEPROC.
  Add support to rproc_alloc() for a default firmware name.
  Add a remoteproc driver implementation for OMAP-L138 DSP
  Add a new remoteproc platform device for DA8XX.
  remoteproc platform support.

 Documentation/kernel-parameters.txt |6 +
 arch/arm/mach-davinci/board-da850-evm.c |6 +
 arch/arm/mach-davinci/board-omapl138-hawk.c |6 +
 arch/arm/mach-davinci/devices-da8xx.c   |   88 +++-
 arch/arm/mach-davinci/include/mach/da8xx.h  |4 +
 drivers/remoteproc/Kconfig  |   26 ++-
 drivers/remoteproc/Makefile |1 +
 drivers/remoteproc/da8xx_remoteproc.c   |  323 +++
 drivers/remoteproc/remoteproc_core.c|   25 ++-
 drivers/remoteproc/remoteproc_virtio.c  |   34 ++-
 drivers/rpmsg/virtio_rpmsg_bus.c|   97 
 11 files changed, 569 insertions(+), 47 deletions(-)
 create mode 100644 drivers/remoteproc/da8xx_remoteproc.c

-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 7/7] ARM: davinci: da850 board: remoteproc platform support

2013-03-08 Thread Robert Tivy
Add .reserve function for reserving CMA memory block to MACHINE_START.

Add call to remoteproc platform device registration function during init.

Signed-off-by: Robert Tivy rt...@ti.com
---
 arch/arm/mach-davinci/board-da850-evm.c |6 ++
 arch/arm/mach-davinci/board-omapl138-hawk.c |6 ++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c 
b/arch/arm/mach-davinci/board-da850-evm.c
index bbb7979..3277bcf 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1566,6 +1566,11 @@ static __init void da850_evm_init(void)
pr_warn(%s: SATA registration failed: %d\n, __func__, ret);
 
da850_evm_setup_mac_addr();
+
+   ret = da8xx_register_rproc();
+   if (ret)
+   pr_warn(%s: dsp/rproc registration failed: %d\n,
+   __func__, ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -1593,4 +1598,5 @@ MACHINE_START(DAVINCI_DA850_EVM, DaVinci 
DA850/OMAP-L138/AM18x EVM)
.init_late  = davinci_init_late,
.dma_zone_size  = SZ_128M,
.restart= da8xx_restart,
+   .reserve= da8xx_rproc_reserve_cma,
 MACHINE_END
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c 
b/arch/arm/mach-davinci/board-omapl138-hawk.c
index d5a6bcd..f60cfd1 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -311,6 +311,11 @@ static __init void omapl138_hawk_init(void)
if (ret)
pr_warn(%s: watchdog registration failed: %d\n,
__func__, ret);
+
+   ret = da8xx_register_rproc();
+   if (ret)
+   pr_warn(%s: dsp/rproc registration failed: %d\n,
+   __func__, ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -338,4 +343,5 @@ MACHINE_START(OMAPL138_HAWKBOARD, AM18x/OMAP-L138 
Hawkboard)
.init_late  = davinci_init_late,
.dma_zone_size  = SZ_128M,
.restart= da8xx_restart,
+   .reserve= da8xx_rproc_reserve_cma,
 MACHINE_END
-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 2/7] Allow all virtqueues processing in rproc_vq_interrupt()

2013-03-08 Thread Robert Tivy
Add support to rproc_vq_interrupt() for a notifyid of -1 which will cause
all valid virtqueues to be processed.

Signed-off-by: Robert Tivy rt...@ti.com
---
 drivers/remoteproc/remoteproc_virtio.c |   34 
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_virtio.c 
b/drivers/remoteproc/remoteproc_virtio.c
index 9e198e5..07fa6cb 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -41,6 +41,21 @@ static void rproc_virtio_notify(struct virtqueue *vq)
rproc-ops-kick(rproc, notifyid);
 }
 
+/* processing function when iterating all virtqueues */
+static int rproc_vring_interrupt(int id, void *p, void *data)
+{
+   struct rproc_vring *rvring = (struct rproc_vring *)p;
+   irqreturn_t *retp = (irqreturn_t *)data;
+
+   if (!rvring-vq)
+   return 0;
+
+   if (vring_interrupt(0, rvring-vq) == IRQ_HANDLED)
+   *retp = IRQ_HANDLED;
+
+   return 0;
+}
+
 /**
  * rproc_vq_interrupt() - tell remoteproc that a virtqueue is interrupted
  * @rproc: handle to the remote processor
@@ -52,18 +67,29 @@ static void rproc_virtio_notify(struct virtqueue *vq)
  *
  * Returns IRQ_NONE if no message was found in the @notifyid virtqueue,
  * and otherwise returns IRQ_HANDLED.
+ *
+ * A @notifyid value of -1 can be passed in order to signal all available
+ * virtqueues for this @rproc.  In this case this function returns IRQ_HANDLED
+ * if any virtqueue contained a message, and IRQ_NONE if none of them did.
  */
 irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int notifyid)
 {
struct rproc_vring *rvring;
+   irqreturn_t ret = IRQ_NONE;
 
dev_dbg(rproc-dev, vq index %d is interrupted\n, notifyid);
 
-   rvring = idr_find(rproc-notifyids, notifyid);
-   if (!rvring || !rvring-vq)
-   return IRQ_NONE;
+   if (notifyid = 0) {
+   rvring = idr_find(rproc-notifyids, notifyid);
+   if (!rvring || !rvring-vq)
+   return IRQ_NONE;
 
-   return vring_interrupt(0, rvring-vq);
+   return vring_interrupt(0, rvring-vq);
+   } else {
+   idr_for_each(rproc-notifyids, rproc_vring_interrupt, ret);
+   }
+
+   return ret;
 }
 EXPORT_SYMBOL(rproc_vq_interrupt);
 
-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 3/7] ARM: davinci: Add support for configuring DA8XX_REMOTEPROC

2013-03-08 Thread Robert Tivy
Also fix REMOTEPROC config to select FW_LOADER (instead of FW_CONFIG).

Signed-off-by: Robert Tivy rt...@ti.com
---
 drivers/remoteproc/Kconfig |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 96ce101..21d04f1 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -5,7 +5,7 @@ config REMOTEPROC
tristate
depends on EXPERIMENTAL
depends on HAS_DMA
-   select FW_CONFIG
+   select FW_LOADER
select VIRTIO
 
 config OMAP_REMOTEPROC
@@ -41,4 +41,28 @@ config STE_MODEM_RPROC
  This can be either built-in or a loadable module.
  If unsure say N.
 
+config DA8XX_REMOTEPROC
+   tristate DA830/OMAPL137  DA850/OMAPL138 remoteproc support 
(EXPERIMENTAL)
+   depends on ARCH_DAVINCI_DA8XX
+   select REMOTEPROC
+   select RPMSG
+   select CMA
+   default n
+   help
+ Say y here to support DA830/OMAPL137  DA850/OMAPL138 remote
+ processors via the remote processor framework.
+
+ You want to say y here in order to enable AMP
+ use-cases to run on your platform (multimedia codecs are
+ offloaded to remote DSP processors using this framework).
+
+ This module controls the name of the firmware file that gets
+ loaded on the DSP.  This file must reside in the /lib/firmware
+ directory.  It can be specified via the module parameter
+ da8xx_fw_name=filename, and if not specified will default to
+ rproc-dsp-fw.
+
+ It's safe to say n here if you're not interested in multimedia
+ offloading or just want a bare minimum kernel.
+
 endmenu
-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 4/7] Add support to rproc_alloc() for a default firmware name

2013-03-08 Thread Robert Tivy
Signed-off-by: Robert Tivy rt...@ti.com
---
 drivers/remoteproc/remoteproc_core.c |   25 +++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c 
b/drivers/remoteproc/remoteproc_core.c
index dd3bfaf..94c9b74 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1222,19 +1222,40 @@ struct rproc *rproc_alloc(struct device *dev, const 
char *name,
const char *firmware, int len)
 {
struct rproc *rproc;
+   char *template = rproc-%s-fw;
+   char *p;
+   int name_len = 0;
 
if (!dev || !name || !ops)
return NULL;
 
-   rproc = kzalloc(sizeof(struct rproc) + len, GFP_KERNEL);
+   if (!firmware)
+   /*
+* Make room for default firmware name (minus %s plus '\0').
+* If the caller didn't pass in a firmware name then
+* construct a default name.  We're already glomming 'len'
+* bytes onto the end of the struct rproc allocation, so do
+* a few more for the default firmware name (but only if
+* the caller doesn't pass one).
+*/
+   name_len = strlen(name) + strlen(template) - 2 + 1;
+
+   rproc = kzalloc(sizeof(struct rproc) + len + name_len, GFP_KERNEL);
if (!rproc) {
dev_err(dev, %s: kzalloc failed\n, __func__);
return NULL;
}
 
+   if (!firmware) {
+   p = (char *)rproc + sizeof(struct rproc) + len;
+   sprintf(p, template, name);
+   } else {
+   p = (char *)firmware;
+   }
+
+   rproc-firmware = p;
rproc-name = name;
rproc-ops = ops;
-   rproc-firmware = firmware;
rproc-priv = rproc[1];
 
device_initialize(rproc-dev);
-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source