Re: [PATCH v3 2/9] ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430

2012-08-18 Thread Tony Lindgren
* Peter Ujfalusi peter.ujfal...@ti.com [120817 07:03]:
 On 08/17/2012 04:14 PM, Jarkko Nikula wrote:
  On 08/17/2012 04:07 PM, Tony Lindgren wrote:
  * Peter Ujfalusi peter.ujfal...@ti.com [120816 06:41]:
  On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
  the FIFO for the audio stack.
  Is this the case also for 2420? I thought some only had a FIFO at
  one port?
 
  IRCC (I don't have specs), nope. Only 2430 (as noted by Peter) and
  onwards have FIFO.
  
  But that's true that FIFO sizes differ between the ports. E.g. only
  ports 2 and 3 have 1024+128 deep FIFOs in OMAP3.
  
 
 OMAP2420 McBSP does not have FIFO (the IP is closer to OMAP1 McBSP).
 OMAP2430, OMAP4, OMAP5 has 128 word long FIFO on all McBSP ports.
 On OMAP3: McBSP2 have 1024+256 (1280) word FIFO the rest of the ports have 128
 long FIFO.

Thanks, is this patch still correct so it does not try to enable FIFO
for 2420?

Regards,

Tony
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: dynamic device tree char driver

2012-08-18 Thread Rob Herring
On 08/16/2012 02:43 PM, Alan Tull wrote:
 
 Hello,
 
 I'm Alan Tull, interested in dynamic features of device trees.

Hey Alan. How are you doing?

 The following patch adds a char driver to add or remove device tree
 nodes dynamically.  Its ioctl passes a struct with:
  - size of the blob
  - pointer to the blob
 
 The path to add the nodes under is coded in the blob with dummy nodes.
 For example the following can be compiled into a blob and sent to this
 driver adding a single node under /soc/apb_periphs:
 
 /dts-v1/;
 / {
 soc {
 apb_periphs {
 i2c1: i2c@ffc05000 {
 compatible = snps,designware-i2c;
 reg = 0xffc05000 0x1000;
 interrupts = 0 159 4;
 emptyfifo_hold_master = 1;
 };
 };
 };
 };
 
 I wanted to get feeback early before I went too far down this particular
 path.  As such, this code doesn't do any notification for drivers yet.
 Also it won't properly add nested nodes yet.  It can add/remove a single
 node and see it show up properly under /proc/device-tree.

Have you looked at arch/powerpc/platforms/pseries/reconfig.c?

There was also a recent discussion titled OF_DYNAMIC usage that you
should look at.

I don't think a char driver and ioctls will fly...

Another option could be kexecing with a new DTB if you can live with a
reboot.

Rob

 
 Alan Tull
 Altera
 
 ___
 devicetree-discuss mailing list
 devicetree-discuss@lists.ozlabs.org
 https://lists.ozlabs.org/listinfo/devicetree-discuss
 

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[patch] video: mb862xxfb: prevent divide by zero bug

2012-08-18 Thread Dan Carpenter
Do a sanity check on these before using them as divisors.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c 
b/drivers/video/mb862xx/mb862xxfbdrv.c
index 00ce1f3..57d940b 100644
--- a/drivers/video/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -328,6 +328,8 @@ static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned 
int cmd,
case MB862XX_L1_SET_CFG:
if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
return -EFAULT;
+   if (l1_cfg-dh == 0 || l1_cfg-dw == 0)
+   return -EINVAL;
if ((l1_cfg-sw = l1_cfg-dw)  (l1_cfg-sh = l1_cfg-dh)) {
/* downscaling */
outreg(cap, GC_CAP_CSC,
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH v3 2/9] ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430

2012-08-18 Thread Ujfalusi, Peter
Hi Tony,

On Sat, Aug 18, 2012 at 8:08 AM, Tony Lindgren t...@atomide.com wrote:
 Thanks, is this patch still correct so it does not try to enable FIFO
 for 2420?

Yes it only enables the FIFO for 2430, 2420 is not affected.

-- 
Péter
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [patch] video: mb862xxfb: prevent divide by zero bug

2012-08-18 Thread Anatolij Gustschin
On Sat, 18 Aug 2012 18:55:41 +0300
Dan Carpenter dan.carpen...@oracle.com wrote:

 Do a sanity check on these before using them as divisors.
 
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Acked-by: Anatolij Gustschin ag...@denx.de

 diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c 
 b/drivers/video/mb862xx/mb862xxfbdrv.c
 index 00ce1f3..57d940b 100644
 --- a/drivers/video/mb862xx/mb862xxfbdrv.c
 +++ b/drivers/video/mb862xx/mb862xxfbdrv.c
 @@ -328,6 +328,8 @@ static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned 
 int cmd,
   case MB862XX_L1_SET_CFG:
   if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
   return -EFAULT;
 + if (l1_cfg-dh == 0 || l1_cfg-dw == 0)
 + return -EINVAL;
   if ((l1_cfg-sw = l1_cfg-dw)  (l1_cfg-sh = l1_cfg-dh)) {
   /* downscaling */
   outreg(cap, GC_CAP_CSC,

Thanks,

Anatolij
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 3/6] OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC

2012-08-18 Thread Linus Walleij
On Wed, Aug 15, 2012 at 10:14 PM, John Crispin blo...@openwrt.org wrote:

 Is it ok if i have these pinctrl patches go upstream via the MIPS tree ?

Yes, go ahead.

Yours,
Linus Walleij
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 5/6] ARM: integrator: convert AMBA devices to device tree

2012-08-18 Thread Linus Walleij
On Thu, Aug 16, 2012 at 2:40 PM, Jean-Christophe PLAGNIOL-VILLARD
plagn...@jcrosoft.com wrote:
 On 14:16 Thu 16 Aug , Linus Walleij wrote:
 +/* For the Device Tree, add in the UART callbacks as AUXDATA */
 +static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = {
 + OF_DEV_AUXDATA(arm,primecell, INTEGRATOR_RTC_BASE,
 + rtc, NULL),
 + OF_DEV_AUXDATA(arm,primecell, INTEGRATOR_UART0_BASE,
 + uart0, integrator_uart_data),
 + OF_DEV_AUXDATA(arm,primecell, INTEGRATOR_UART1_BASE,
 + uart1, integrator_uart_data),
 + OF_DEV_AUXDATA(arm,primecell, KMI0_BASE,
 + kmi0, NULL),
 + OF_DEV_AUXDATA(arm,primecell, KMI1_BASE,
 + kmi1, NULL),
 + { /* sentinel */ },

 why that?

Based on similar code by Grant in arch/arm/mach-versatile/core.c
also ending with a {}. Also at other places ... I though this terminated
the list iteration, is it not needed anymore?

Yours,
Linus Walleij
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 0/6] Integrator devicetree support

2012-08-18 Thread Linus Walleij
On Thu, Aug 16, 2012 at 3:44 PM, Arnd Bergmann a...@arndb.de wrote:
 On Thursday 16 August 2012, Linus Walleij wrote:
 This patch set moves all the non-DT platform code into
 #ifndef CONFIG_OF sections for clarity. The plan is to
 delete them after deprecation.

 I'm fine with your playing around with this in any way you
 like, but I think in general we should have a new CONFIG_ATAG
 symbol, so you can build a kernel that supports booting
 both with and without DT for the same platform, depending
 on what the boot loader supports.

 Then you can enclose all the non-DT sections in #ifdef
 CONFIG_ATAG and we can remove them at some later stage.

Since we already have CONFIG_USE_OF I think
CONFIG_USE_ATAGS is more apropriate, but I get the
idea. So it begins like this:

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e91c7cd..0764ef7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1907,6 +1907,12 @@ endmenu

 menu Boot options

+config USE_ATAGS
+   bool ATAGS support
+   default y
+   help
+ Include support for ATAGS-based machine descriptions.
+
 config USE_OF
bool Flattened Device Tree support
select OF
@@ -2110,6 +2116,7 @@ config KEXEC

 config ATAGS_PROC
bool Export atags in procfs
+   depends on USE_ATAGS
depends on KEXEC
default y
help

But then we hit #ifdeffing and compiling out a lot of dangerous stuff
in arch/arm/kernel and then I get the creeps. I can try, but I think
this is typical Nico territory for example...

Yours,
Linus Walleij
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss