Re: [PATCH 1/2] staging: iio: tsl2563 ambient light sensor driver

2009-11-10 Thread Zhang Rui
On Tue, 2009-11-10 at 02:08 +0800, Jonathan Cameron wrote:
 Amit Kucheria wrote:
  On 09 Nov 09, Jonathan Cameron wrote:
  Hi Amit,
 
  Normally I'd welcome this in IIO, except that all ambient light sensors 
  are in the
  process of moving to the new ALS subsystem.  There are still some issues 
  to resolve
  in that subsystem (mainly to do with naming conventions) but hopefully we 
  will
  get them sorted out shortly.
  
  Groan! :)
 You have my sympathies on this! Typical that the first other developer to put
 forward a patch for IIO picks the one type of device we are moving out.
 If you do have any comments on IIO as a result of using it please send them
 on.
  Who will be the subsystem maintainer and is there already a public git
  tree?
 No git tree as far as I know.  Maintainer is Zhang Rui (Cc'd)
 Zhang, what are your plans wrt to that?  I guess I can put one up with the 
 current
 patches if it is helpful?  We really need to sort out the naming issue as the 
 one
 thing that people have come out against. 
 
well. I'd prefer a generic name alsX with an extra name/desc file.

 After that I'm guessing ping Andrew Morton to see if he is willing to handle 
 the push
 to Linus? Or does Zhang want to try doing one directly?
 
I'll refresh the patch and send to Andrew.

thanks,
rui

  I'll take a close look at this sometime over the next few days though.  On 
  a quick
  glance at the data sheet, it looks very similar to the tsl2561.  Perhaps 
  we can merge
  the drivers? Yours is certainly more complete than the tsl2561 version in 
  IIO so it
  would make sense to lift the functional elements in to the code I have for 
  an ALS
  driver. I hadn't posted that previously as I hadn't quite worked out how 
  to handle
  the various gain related settings. What you have done seems to make sense 
  (from a very
  quick look.)
  
  I've got no problem merging the tsl2563 with 2561. I don't have any 2561
  hardware to check a merged driver though.
 
 On a reasonably thorough review of data sheets I think the only difference is 
 the
 input voltage range and a few timing parameters.  These two chips even use 
 the same
 addresses.  I'll actually test your driver against the tsl2561 sometime later 
 in the
 week to be sure.  So the merge looks like adding a few more lines to the 
 i2c_device_id
 table.  As a quick comment you would ideally have the tsl2563 and tsl2562 in 
 there
 already.
  
  
  Do you think the ALS framework will be finalised before the 2.6.33 merge
  window (in a few weeks)? If not, I wonder if Greg would take this driver to
  staging to begin with and I'll modify it to use the ALS subsystem when it
  settles down.
 I'm certainly happy with that as an option if Greg is willing. In fact,
 adding this with tsl2560- tsl2563 support and removing the current tsl2561 
 driver would
 be great (post any reviews over the next couple of days).
 
 Thanks,
 
 Jonathan

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


Re: [PATCH 1/2] staging: iio: tsl2563 ambient light sensor driver

2009-11-10 Thread Amit Kucheria
On 09 Nov 09, Jonathan Cameron wrote:
 Amit Kucheria wrote:
  On 09 Nov 09, Jonathan Cameron wrote:
  Hi Amit,
 
  Normally I'd welcome this in IIO, except that all ambient light sensors 
  are in the
  process of moving to the new ALS subsystem.  There are still some issues 
  to resolve
  in that subsystem (mainly to do with naming conventions) but hopefully we 
  will
  get them sorted out shortly.
  
  Groan! :)
 You have my sympathies on this! Typical that the first other developer to put
 forward a patch for IIO picks the one type of device we are moving out.

Hehe :) Will accelerometers and leds move to IIO?

 If you do have any comments on IIO as a result of using it please send them
 on.

I guess the only major comment would be that the Documentation/device.txt
probably needs to be more focussed on driver writers. For example,

indio_dev-attrs
   general attributes such as polled access to device channels.

would become

indio_dev-attrs
sysfs attribute control files. This contains a pointer to a struct
attribute_group containing a list of all attributes that export a
sysfs control.

followed by a sample driver stub. That is probably the only part where I got
stuck for a bit. The rest was straightforward after looking at the source for
the tsl2561.

  Who will be the subsystem maintainer and is there already a public git
  tree?
 No git tree as far as I know.  Maintainer is Zhang Rui (Cc'd)
 Zhang, what are your plans wrt to that?  I guess I can put one up with the 
 current
 patches if it is helpful?  We really need to sort out the naming issue as the 
 one
 thing that people have come out against. 

No plans. Just wanted to know if there was a tree where I could pull in
regularly to see changes without having to wade through LKML :)

 After that I'm guessing ping Andrew Morton to see if he is willing to handle 
 the push
 to Linus? Or does Zhang want to try doing one directly?
 
  I'll take a close look at this sometime over the next few days though.  On 
  a quick
  glance at the data sheet, it looks very similar to the tsl2561.  Perhaps 
  we can merge
  the drivers? Yours is certainly more complete than the tsl2561 version in 
  IIO so it
  would make sense to lift the functional elements in to the code I have for 
  an ALS
  driver. I hadn't posted that previously as I hadn't quite worked out how 
  to handle
  the various gain related settings. What you have done seems to make sense 
  (from a very
  quick look.)
  
  I've got no problem merging the tsl2563 with 2561. I don't have any 2561
  hardware to check a merged driver though.
 
 On a reasonably thorough review of data sheets I think the only difference is 
 the
 input voltage range and a few timing parameters.  These two chips even use 
 the same
 addresses.  I'll actually test your driver against the tsl2561 sometime later 
 in the
 week to be sure.  So the merge looks like adding a few more lines to the 
 i2c_device_id
 table.  As a quick comment you would ideally have the tsl2563 and tsl2562 in 
 there
 already.
  
  
  Do you think the ALS framework will be finalised before the 2.6.33 merge
  window (in a few weeks)? If not, I wonder if Greg would take this driver to
  staging to begin with and I'll modify it to use the ALS subsystem when it
  settles down.
 I'm certainly happy with that as an option if Greg is willing. In fact,
 adding this with tsl2560- tsl2563 support and removing the current tsl2561 
 driver would
 be great (post any reviews over the next couple of days).
 

I could certainly add support for tsl2560-2562 to my driver if you want, along
with incorporating comments from the review.

Regards,
Amit

-- 
-
Amit Kucheria,   Kernel Developer, Verdurent
-
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH-v5 0/4] OMAP: Adding flash support to SDP, ZOOM2 and LDP boards

2009-11-10 Thread Vimal Singh
From 225e5c1e38ba1d4a14757150b0b7caf1d8cab893 Mon Sep 17 00:00:00 2001
From: Vimal Singh vimalsi...@ti.com
Date: Tue, 10 Nov 2009 15:24:29 +0530
Subject: [PATCH] OMAP: Adding flash support to SDP, ZOOM2 and LDP boards

This is v5 of this patch series.

This patch series adds flash support for NAND (in sdp, zoom2 and ldp),
OneNAND and NOR (in sdp)

Tested on Zoom2 by Vikram, On SDP by Vimal

Vimal Singh (4):
[PATCH-v5 1/4] OMAP2/3: Add support for flash on SDP boards
[PATCH-v5 2/4] OMAP3: Add support for NAND on ZOOM2/LDP boards
[PATCH-v5 3/4] OMAP: Zoom2: Enable NAND and JFFS2 support in defconfig
[PATCH-v5 4/4] OMAP: 3430SDP: Enable NAND in defconfig

v4-v5:
[PATCH-v5 1/4] OMAP2/3: Add support for flash on SDP boards:
Implemented Tony's comments.


 arch/arm/configs/omap_3430sdp_defconfig  |  591 --
 arch/arm/configs/omap_zoom2_defconfig|  333 +++
 arch/arm/mach-omap2/Makefile |4 +
 arch/arm/mach-omap2/board-2430sdp.c  |2 +
 arch/arm/mach-omap2/board-3430sdp.c  |2 +
 arch/arm/mach-omap2/board-ldp.c  |2 +
 arch/arm/mach-omap2/board-sdp-flash.c|  326 ++
 arch/arm/mach-omap2/board-zoom-flash.c   |  196 +
 arch/arm/mach-omap2/board-zoom2.c|2 +
 arch/arm/plat-omap/include/plat/board-sdp.h  |   15 +
 arch/arm/plat-omap/include/plat/board-zoom.h |   36 ++
 arch/arm/plat-omap/include/plat/gpmc.h   |2 +
 arch/arm/plat-omap/include/plat/nand.h   |2 +
 13 files changed, 1103 insertions(+), 410 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-sdp-flash.c
 create mode 100644 arch/arm/mach-omap2/board-zoom-flash.c
 create mode 100644 arch/arm/plat-omap/include/plat/board-sdp.h
 create mode 100644 arch/arm/plat-omap/include/plat/board-zoom.h


-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH-v5 1/4] OMAP2/3: Add support for flash on SDP boards

2009-11-10 Thread Vimal Singh
From 42f080e0915bbce1509fc8ab3773569fec0a44f1 Mon Sep 17 00:00:00 2001
From: Vimal Singh vimalsi...@ti.com
Date: Tue, 10 Nov 2009 11:39:39 +0530
Subject: [PATCH] OMAP2/3: Add support for flash on SDP boards

Add support for flash on SDP boards. NAND, NOR and OneNAND
are supported.

Only tested on 3430SDP (ES2 and ES3.1), somebody please test on
2430SDP and check the chips select for 2430SDP.

Also note that:
For OneNAND: in the earlier 2430SDP code the kernel partition
was set to only 1MB instead of 2MB on 3430SDP. If people want
the old partition sizes back on 2430SDP, please provide a patch.

For NAND: 'U-Boot', 'Boot Env' and 'Kernel' partitions sizes increased
by few blocks to provide few spare blocks for NAND bab block management
in u-boot. If people want old partition sizes, please provide a patch.

Signed-off-by: Vimal Singh vimalsi...@ti.com
Cc: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Makefile|2 +
 arch/arm/mach-omap2/board-2430sdp.c |2 +
 arch/arm/mach-omap2/board-3430sdp.c |2 +
 arch/arm/mach-omap2/board-sdp-flash.c   |  326 +++
 arch/arm/plat-omap/include/plat/board-sdp.h |   15 ++
 arch/arm/plat-omap/include/plat/gpmc.h  |2 +
 6 files changed, 349 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-sdp-flash.c
 create mode 100644 arch/arm/plat-omap/include/plat/board-sdp.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..627f500 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_OMAP_IOMMU)  += $(iommu-y)
 obj-$(CONFIG_MACH_OMAP_GENERIC)+= board-generic.o
 obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)+= board-2430sdp.o \
+  board-sdp-flash.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
@@ -66,6 +67,7 @@ obj-$(CONFIG_MACH_OMAP3EVM)   += board-omap3evm.o \
 obj-$(CONFIG_MACH_OMAP3_PANDORA)   += board-omap3pandora.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
+  board-sdp-flash.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)  += board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)  += board-rx51.o \
diff --git a/arch/arm/mach-omap2/board-2430sdp.c
b/arch/arm/mach-omap2/board-2430sdp.c
index db9374b..5676ab9 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -38,6 +38,7 @@
 #include plat/usb.h
 #include plat/gpmc-smc91x.h

+#include plat/board-sdp.h
 #include mmc-twl4030.h

 #define SDP2430_CS0_BASE   0x0400
@@ -205,6 +206,7 @@ static void __init omap_2430sdp_init(void)
twl4030_mmc_init(mmc);
usb_musb_init();
board_smc91x_init();
+   sdp_flash_init();

/* Turn off secondary LCD backlight */
ret = gpio_request(SECONDARY_LCD_GPIO, Secondary LCD backlight);
diff --git a/arch/arm/mach-omap2/board-3430sdp.c
b/arch/arm/mach-omap2/board-3430sdp.c
index a3c1271..4497ded 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -41,6 +41,7 @@
 #include plat/control.h
 #include plat/gpmc-smc91x.h

+#include plat/board-sdp.h
 #include sdram-qimonda-hyb18m512160af-6.h
 #include mmc-twl4030.h

@@ -511,6 +512,7 @@ static void __init omap_3430sdp_init(void)
omap_serial_init();
usb_musb_init();
board_smc91x_init();
+   sdp_flash_init();
enable_board_wakeup_source();
usb_ehci_init(ehci_pdata);
 }
diff --git a/arch/arm/mach-omap2/board-sdp-flash.c
b/arch/arm/mach-omap2/board-sdp-flash.c
new file mode 100644
index 000..c881772
--- /dev/null
+++ b/arch/arm/mach-omap2/board-sdp-flash.c
@@ -0,0 +1,326 @@
+/*
+ * arch/arm/mach-omap2/board-sdp-flash.c
+ *
+ * Copyright (C) 2009 Nokia Corporation
+ * Copyright (C) 2007 Texas Instruments
+ *
+ * Modified from mach-omap2/board-3430sdp-flash.c
+ * Author: Vimal Singh vimalsi...@ti.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/platform_device.h
+#include linux/mtd/mtd.h
+#include linux/mtd/partitions.h
+#include linux/io.h
+
+#include asm/mach/flash.h
+#include plat/onenand.h
+#include plat/gpmc.h
+#include plat/nand.h
+
+#define REG_FPGA_REV   0x10
+#define REG_FPGA_DIP_SWITCH_INPUT2 0x60
+#define MAX_SUPPORTED_GPMC_CONFIG  3
+
+/* various memory sizes */
+#define FLASH_SIZE_SDPV1   SZ_64M
+#define 

[PATCH-v5 2/4] OMAP3: Add support for NAND on ZOOM2/LDP boards

2009-11-10 Thread Vimal Singh
From 6f535d7128ca392458dd0cb31d138cda84747c06 Mon Sep 17 00:00:00 2001
From: Vimal Singh vimalsi...@ti.com
Date: Tue, 10 Nov 2009 11:42:45 +0530
Subject: [PATCH] OMAP3: Add support for NAND on ZOOM2/LDP boards

Adding NAND support for ZOOM2 and LDP board. I have tested it for ZOOM2 boards,
someone can verify it for LDP, hopefully it should not have any problem.

The size of the U-Boot environment partition was increased to 1.25MB.

Vikram: Changed ldp name to zoom.
  Future boards will be called Zoom2/3/4 etc.
  LDP is a Zoom1. Somhow the LDP name got stuck to that.

Signed-off-by: Vimal Singh vimalsi...@ti.com
Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-ldp.c  |2 +
 arch/arm/mach-omap2/board-zoom-flash.c   |  196 ++
 arch/arm/mach-omap2/board-zoom2.c|2 +
 arch/arm/plat-omap/include/plat/board-zoom.h |   36 +
 arch/arm/plat-omap/include/plat/nand.h   |2 +
 6 files changed, 240 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom-flash.c
 create mode 100644 arch/arm/plat-omap/include/plat/board-zoom.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 627f500..b3a9d1c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_MACH_OMAP_APOLLON)   += 
board-apollon.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
+  board-zoom-flash.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OVERO)   += board-overo.o \
   mmc-twl4030.o
@@ -74,6 +75,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
   board-rx51-peripherals.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2.o \
+  board-zoom-flash.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index c062238..8aebdf9 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -42,6 +42,7 @@
 #include asm/delay.h
 #include plat/control.h
 #include plat/usb.h
+#include plat/board-zoom.h

 #include mmc-twl4030.h

@@ -385,6 +386,7 @@ static void __init omap_ldp_init(void)
ads7846_dev_init();
omap_serial_init();
usb_musb_init();
+   zoom_flash_init();

twl4030_mmc_init(mmc);
/* link regulators to MMC adapters */
diff --git a/arch/arm/mach-omap2/board-zoom-flash.c
b/arch/arm/mach-omap2/board-zoom-flash.c
new file mode 100644
index 000..1406a57
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-flash.c
@@ -0,0 +1,196 @@
+/*
+ * arch/arm/mach-omap2/board-zoom-flash.c
+ *
+ * Copyright (C) 2008-09 Texas Instruments Inc.
+ *
+ * Modified from mach-omap2/board-2430sdp-flash.c
+ * Author(s): Rohit Choraria rohi...@ti.com
+ *Vimal Singh vimalsi...@ti.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/delay.h
+#include linux/platform_device.h
+#include linux/mtd/mtd.h
+#include linux/mtd/partitions.h
+#include linux/mtd/nand.h
+#include linux/types.h
+#include linux/io.h
+
+#include asm/mach/flash.h
+#include plat/board.h
+#include plat/gpmc.h
+#include plat/nand.h
+
+#include plat/board-zoom.h
+
+#define NAND_CMD_UNLOCK1   0x23
+#define NAND_CMD_UNLOCK2   0x24
+/**
+ * @brief platform specific unlock function
+ *
+ * @param mtd - mtd info
+ * @param ofs - offset to start unlock from
+ * @param len - length to unlock
+ *
+ * @return - unlock status
+ */
+static int omap_ldp_nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+{
+   int ret = 0;
+   int chipnr;
+   int status;
+   unsigned long page;
+   struct nand_chip *this = mtd-priv;
+   printk(KERN_INFO nand_unlock: start: %08x, length: %d!\n,
+   (int)ofs, (int)len);
+
+   /* select the NAND device */
+   chipnr = (int)(ofs  this-chip_shift);
+   this-select_chip(mtd, chipnr);
+   /* check the WP bit */
+   this-cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
+   if ((this-read_byte(mtd)  0x80) == 0) {
+   printk(KERN_ERR nand_unlock: Device is write protected!\n);
+   ret = -EINVAL;
+   goto out;
+   }
+
+   if ((ofs  

[PATCH-v5 3/4] OMAP: Zoom2: Enable NAND and JFFS2 support in defconfig

2009-11-10 Thread Vimal Singh
From ddd6a39e4725c1e3947fab9a54399e9e7de508cd Mon Sep 17 00:00:00 2001
From: Vimal Singh vimalsi...@ti.com
Date: Tue, 10 Nov 2009 11:48:24 +0530
Subject: [PATCH] OMAP: Zoom2: Enable NAND and JFFS2 support in defconfig

Enable NAND and JFFS2 options by default in zoom2_defconfig file
Other changes in defconfig come from make menuconfig syncup

Signed-off-by: Vimal Singh vimalsi...@ti.com
---
 arch/arm/configs/omap_zoom2_defconfig |  333 -
 1 files changed, 243 insertions(+), 90 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..23116c4 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -1,15 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-omap1
-# Fri Jun 12 17:25:46 2009
+# Linux kernel version: 2.6.32-rc6
+# Tue Nov 10 11:46:50 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_MMU=y
-# CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,13 +16,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_HAS_CPUFREQ=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y

 #
 # General setup
@@ -46,11 +44,12 @@ CONFIG_BSD_PROCESS_ACCT=y
 #
 # RCU Subsystem
 #
-CONFIG_CLASSIC_RCU=y
-# CONFIG_TREE_RCU is not set
-# CONFIG_PREEMPT_RCU is not set
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
 # CONFIG_TREE_RCU_TRACE is not set
-# CONFIG_PREEMPT_RCU_TRACE is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_GROUP_SCHED=y
@@ -77,7 +76,6 @@ CONFIG_UID16=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
-# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
@@ -90,18 +88,25 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
 # CONFIG_SLOW_WORK is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
@@ -114,7 +119,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set

@@ -135,19 +140,22 @@ CONFIG_FREEZER=y
 #
 # System Type
 #
+CONFIG_MMU=y
 # CONFIG_ARCH_AAEC2000 is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_GEMINI is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_NOMADIK is not set
 # CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IOP32X is not set
 # CONFIG_ARCH_IOP33X is not set
@@ -156,25 +164,27 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_KIRKWOOD is not set
-# CONFIG_ARCH_KS8695 is not set
-# CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_LOKI is not set
 # CONFIG_ARCH_MV78XX0 is not set
-# CONFIG_ARCH_MXC is not set
 # CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_MSM is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
 # CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
-# CONFIG_ARCH_MSM is not set
-# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_BCMRING is not set

 #
 # TI OMAP Implementations
@@ -203,20 +213,23 @@ CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_LL_DEBUG_UART1 is not set
 # 

[PATCH-v5 4/4] OMAP: 3430SDP: Enable NAND in defconfig

2009-11-10 Thread Vimal Singh
From 225e5c1e38ba1d4a14757150b0b7caf1d8cab893 Mon Sep 17 00:00:00 2001
From: Vimal Singh vimalsi...@ti.com
Date: Tue, 10 Nov 2009 15:24:07 +0530
Subject: [PATCH] OMAP: 3430SDP: Enable NAND in defconfig

Enable NAND by default in 3430sdp_defconfig file.
This patch also enables MTD_CMDLINE_PARTS option.
Other changes in defconfig come from make menuconfig syncup

Signed-off-by: Vimal Singh vimalsi...@ti.com
---
 arch/arm/configs/omap_3430sdp_defconfig |  591 ++-
 1 files changed, 271 insertions(+), 320 deletions(-)

diff --git a/arch/arm/configs/omap_3430sdp_defconfig
b/arch/arm/configs/omap_3430sdp_defconfig
index 5a305f0..b48d73a 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -1,15 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-omap1
-# Tue Jun 23 10:36:45 2009
+# Linux kernel version: 2.6.32-rc6
+# Tue Nov 10 15:20:01 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_MMU=y
-# CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +16,14 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_HAS_CPUFREQ=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_OPROFILE_ARMV7=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y

 #
 # General setup
@@ -47,11 +45,12 @@ CONFIG_BSD_PROCESS_ACCT=y
 #
 # RCU Subsystem
 #
-CONFIG_CLASSIC_RCU=y
-# CONFIG_TREE_RCU is not set
-# CONFIG_PREEMPT_RCU is not set
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
 # CONFIG_TREE_RCU_TRACE is not set
-# CONFIG_PREEMPT_RCU_TRACE is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
@@ -67,6 +66,9 @@ CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 CONFIG_ANON_INODES=y
@@ -88,6 +90,10 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_COMPAT_BRK is not set
@@ -96,13 +102,18 @@ CONFIG_SLUB=y
 # CONFIG_SLOB is not set
 CONFIG_PROFILING=y
 CONFIG_TRACEPOINTS=y
-# CONFIG_MARKERS is not set
 CONFIG_OPROFILE=y
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+# CONFIG_SLOW_WORK is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -114,8 +125,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_BLOCK=y
-CONFIG_LBD=y
-# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set

@@ -136,18 +146,22 @@ CONFIG_FREEZER=y
 #
 # System Type
 #
+CONFIG_MMU=y
 # CONFIG_ARCH_AAEC2000 is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_NOMADIK is not set
 # CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IOP32X is not set
 # CONFIG_ARCH_IOP33X is not set
@@ -156,24 +170,27 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_KIRKWOOD is not set
-# CONFIG_ARCH_KS8695 is not set
-# CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_LOKI is not set
 # CONFIG_ARCH_MV78XX0 is not set
-# CONFIG_ARCH_MXC is not set
 # CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
 # CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
-# CONFIG_ARCH_MSM is not 

RE: [PATCH 1/2] OMAP3: Enable DSS2 for OMAP3EVM board

2009-11-10 Thread Tomi Valkeinen
On Tue, 2009-11-10 at 04:42 +0100, ext Hiremath, Vaibhav wrote:

  
  It's best that we let Tomi queue up all the DSS2 related patches.
 [Hiremath, Vaibhav] I am ok with that.
 Let me update this patch with the latest kernel + DSS2 and re-submit it again.

Wait until DSS2 patches have been merged. I don't want the extra
complexity of board/panel patches, there's enough work with just the
half-megabyte DSS patches =).

 Tomi


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


Re: [PATCH 1/2] AM35xx: Runtime detection of the device

2009-11-10 Thread Felipe Balbi

Hi,

On Tue, Oct 27, 2009 at 10:08:54PM +0100, Balbi Felipe (Nokia-D/Helsinki) wrote:

From: Felipe Balbi felipe.ba...@nokia.com
Subject: [PATCH] arm: omap: code cleanup to id.c

Cleanup the coding style in id.c while avoiding unneeded switch()
statements.

Signed-off-by: Felipe Balbi felipe.ba...@nokia.com
---

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..dbdeb09 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -53,11 +53,11 @@ int omap_type(void)
{
u32 val = 0;

-   if (cpu_is_omap24xx())
+   if (cpu_is_omap24xx()) {
val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
-   else if (cpu_is_omap34xx())
+   } else if (cpu_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
-   else {
+   } else {
pr_err(Cannot detect omap type!\n);
goto out;
}
@@ -224,24 +224,14 @@ void __init omap3_check_revision(void)
omap_revision = OMAP3430_REV_ES3_0;
break;
case 4:
-   omap_revision = OMAP3430_REV_ES3_1;
-   break;
+   /* FALLTHROUGH */
default:
/* Use the latest known revision as default */
omap_revision = OMAP3430_REV_ES3_1;
}
break;
case 0xb891:
-   /* Handle 36xx devices */
-   switch (rev) {
-   case 0:
-   omap_revision = OMAP3630_REV_ES1_0;
-   break;
-   default:
-   /* Use the latest known revision as default */
-   omap_revision = OMAP3630_REV_ES1_0;
-   }
-   break;
+   /* FALLTHROUGH */
default:
/* Unknown default to latest silicon rev as default*/
omap_revision = OMAP3630_REV_ES1_0;
@@ -266,19 +256,17 @@ void __init omap3_cpuinfo(void)
 * on available features. Upon detection, update the CPU id
 * and CPU class bits.
 */
-   if (cpu_is_omap3630())
+   if (cpu_is_omap3630()) {
strcpy(cpu_name, 3630);
-   else if (omap3_has_iva()  omap3_has_sgx())
+   } else if (omap3_has_iva()  omap3_has_sgx()) {
strcpy(cpu_name, 3430/3530);
-   else if (omap3_has_sgx()) {
+   } else if (omap3_has_sgx()) {
omap_revision = OMAP3525_REV(rev);
strcpy(cpu_name, 3525);
-   }
-   else if (omap3_has_iva()) {
+   } else if (omap3_has_iva()) {
omap_revision = OMAP3515_REV(rev);
strcpy(cpu_name, 3515);
-   }
-   else {
+   } else {
omap_revision = OMAP3503_REV(rev);
strcpy(cpu_name, 3503);
}
@@ -297,8 +285,7 @@ void __init omap3_cpuinfo(void)
strcpy(cpu_rev, 3.0);
break;
case OMAP_REVBITS_40:
-   strcpy(cpu_rev, 3.1);
-   break;
+   /* FALLTHROUGH */
default:
/* Use the latest known revision as default */
strcpy(cpu_rev, 3.1);
@@ -325,18 +312,18 @@ void __init omap2_check_revision(void)
 * At this point we have an idea about the processor revision set
 * earlier with omap2_set_globals_tap().
 */
-   if (cpu_is_omap24xx())
+   if (cpu_is_omap24xx()) {
omap24xx_check_revision();
-   else if (cpu_is_omap34xx()) {
+   } else if (cpu_is_omap34xx()) {
omap3_check_features();
omap3_check_revision();
omap3_cpuinfo();
-   }
-   else if (cpu_is_omap44xx()) {
+   } else if (cpu_is_omap44xx()) {
printk(KERN_INFO FIXME: CPU revision = OMAP4430\n);
return;
-   } else
+   } else {
pr_err(OMAP revision unknown, please fix!\n);
+   }

/*
 * OK, now we know the exact revision. Initialize omap_chip bits


how about this patch, any comments ??

--
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2 v2] OMAP3:clk - introduce DPLL4 jtype support

2009-11-10 Thread Paul Walmsley
Hi Richard, Nishanth

(adding Ari back in to cc, also Tony, Kevin)

On Sat, 31 Oct 2009, Woodruff, Richard wrote:

  From: Paul Walmsley [mailto:p...@pwsan.com]
  Sent: Wednesday, October 28, 2009 9:39 PM
 
   +static void lookup_dco_sddiv(struct clk *clk, u8 *dco, u8 *sd_div, u16 m,
  u8 n)
   +{
   +   unsigned long fint, clkinp, sd; /* watch out for overflow */
   +   int mod1, mod2;
   +
   +   n++; /* always n+1 below */
 
  The N that's passed into lookup_dco_sddiv() is the real N -- that is, it's
  the register bitfield plus one.  That can be seen below in this line:
 
   v |= (n - 1)  __ffs(dd-div1_mask);
 
  Given this, is the n++; above correct?
 
 Probably not...

Great - so can we count on you and/or Nishanth to update this patch taking 
this and Ari's comments into account and to resend to the list?

  The rest of the code looks fine.  (Of course, I can't review the
  technical basis of the code since I don't have the 3630 docs yet, but I'm
  fine with taking it in the meantime.)
 
  I might change the 'u8 jtype;' field below into 'u8 flags;'; please let me
  know if you foresee a problem with that.
 
 Don't care.  Jtype seemed description but flag |= jtype is just as 
 descriptive and can hold a few more.

OK.

 Thanks for looking over.

You're welcome.


- Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/2] omap: RX-51: enable tsc2005

2009-11-10 Thread Kalle Valo
Aaro Koskinen aaro.koski...@nokia.com writes:

 I sent a wl1251 patch which adds spi_board_info and conflicts with
 this patch:

 http://www.mail-archive.com/linux-omap@vger.kernel.org/msg17604.html

 How do we handle this?

 I can resend/rebase this patch once the wl1251 patch is integrated.

Ok, thanks. I'll resend the wl1251 patch just to be sure that it
doesn't get lost.

 BTW, check the comment from Tommi Rantala - spi_board_info can be marked
 with __initdata.

I'll add it to my patch.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP1: PM: Fix omapfb/lcd on Amstrad Delta broken when PM set

2009-11-10 Thread Paul Walmsley
Hello Janusz et al,

On Fri, 30 Oct 2009, Janusz Krzysztofik wrote:

 More looking at it, I found that might be omap_dma_running() from 
 arch/arm/plat-omap/dma.c that needs correction. It already checks for LCD dma 
 running for OMAP1610, but does nothing similiar for 1510. I have revisited 
 http://focus.ti.com/lit/ug/spru674/spru674.pdf, but found no hint how to do 
 that in a 1610 similiar way.

Speaking of this code, here's a project suggestion if someone has some 
spare time.  All of the LCD DMA code in plat-omap/dma.c appears to be 
OMAP1-only (and apparently only is available on a subset of OMAP1 chips).  
It would be great if this code could be moved to mach-omap1/lcd_dma.c or 
a similar place.


- Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4 v2] MFD: TWL4030: Add audio_mclk to the codec platform data

2009-11-10 Thread Mark Brown
On Wed, Nov 04, 2009 at 09:58:17AM +0200, Peter Ujfalusi wrote:
 Add audio_mclk to the platform data struct for the
 twl4030-codec MFD driver.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@nokia.com
 Acked-by: Samuel Ortiz sa...@linux.intel.com

Applied all, thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V3] [OMAP] GPIO module enable/disable

2009-11-10 Thread charu
From: Charulatha V ch...@ti.com

This patch disables a GPIO module when all pins of a GPIO
module are inactive (clock gating forced at module level) and
enables the module when any gpio in the module is requested.

The module is enabled only when mod_usage indicates that no GPIO
in that module is currently active and the GPIO being requested
is the 1st one to be active in that module.

Each module would be disabled in omap_gpio_free() API when all
GPIOs in a particular module becomes inactive. The module is
re-enabled in omap_gpio_request() API when a GPIO is requested
from the module that was previously disabled.

Since individual GPIO's bookkeeping is added in this patch
via mod_usage, the same is used in omap_set_gpio_debounce()
 omap_set_gpio_debounce_time() APIs to ensure that the gpio being
used is actually requested prior to being used (Nishant Menon's
Suggestion n...@ti.com)

GPIO module level details are specific to hardware and hence
introducing this patch in low level layer (plat-omap/gpio.c)

Signed-off-by: Charulatha V ch...@ti.com
Acked-by: Nishanth Menon n...@ti.com
---
 arch/arm/plat-omap/gpio.c |   32 
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 4c35f9f..06a391b 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -199,6 +199,7 @@ struct gpio_bank {
struct gpio_chip chip;
struct clk *dbck;
u32 dbck_enable_mask;
+   u32 mod_usage;
 };
 
 #define METHOD_MPUIO   0
@@ -690,6 +691,10 @@ void omap_set_gpio_debounce(int gpio, int enable)
 #else
reg += OMAP24XX_GPIO_DEBOUNCE_EN;
 #endif
+   if (!(bank-mod_usage  l)) {
+   printk(KERN_ERR GPIO %d not requested\n, gpio);
+   return;
+   }
 
spin_lock_irqsave(bank-lock, flags);
val = __raw_readl(reg);
@@ -726,6 +731,11 @@ void omap_set_gpio_debounce_time(int gpio, int enc_time)
bank = get_gpio_bank(gpio);
reg = bank-base;
 
+   if (!bank-mod_usage) {
+   printk(KERN_ERR GPIO not requested\n);
+   return;
+   }
+
enc_time = 0xff;
 #ifdef CONFIG_ARCH_OMAP4
reg += OMAP4_GPIO_DEBOUNCINGTIME;
@@ -1219,6 +1229,16 @@ static int omap_gpio_request(struct gpio_chip *chip, 
unsigned offset)
__raw_writel(__raw_readl(reg) | (1  offset), reg);
}
 #endif
+   if (!cpu_class_is_omap1()) {
+   if (!bank-mod_usage) {
+   u32 ctrl;
+   ctrl = __raw_readl(bank-base + OMAP24XX_GPIO_CTRL);
+   ctrl = 0xFFFE;
+   /* Module is enabled, clocks are not gated */
+   __raw_writel(ctrl, bank-base + OMAP24XX_GPIO_CTRL);
+   }
+   bank-mod_usage |= 1  offset;
+   }
spin_unlock_irqrestore(bank-lock, flags);
 
return 0;
@@ -1245,6 +1265,16 @@ static void omap_gpio_free(struct gpio_chip *chip, 
unsigned offset)
__raw_writel(1  offset, reg);
}
 #endif
+   if (!cpu_class_is_omap1()) {
+   bank-mod_usage = ~(1  offset);
+   if (!bank-mod_usage) {
+   u32 ctrl;
+   ctrl = __raw_readl(bank-base + OMAP24XX_GPIO_CTRL);
+   /* Module is disabled, clocks are gated */
+   ctrl |= 1;
+   __raw_writel(ctrl, bank-base + OMAP24XX_GPIO_CTRL);
+   }
+   }
_reset_gpio(bank, bank-chip.base + offset);
spin_unlock_irqrestore(bank-lock, flags);
 }
@@ -1879,6 +1909,8 @@ static int __init _omap_gpio_init(void)
gpio_count = 32;
}
 #endif
+
+   bank-mod_usage = 0;
/* REVISIT eventually switch from OMAP-specific gpio structs
 * over to the generic ones
 */
-- 
1.6.0.4

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


Re: [PATCH 00/19] OMAP: DSS2 v5 intro

2009-11-10 Thread Artem Bityutskiy
Tomi,

could you please kindly ask Stephen (CCed) to include the DSS2 tree into
linux-next, because you are going to merge it the next merge window, and
there does not seem to be any blocker for this.

Being in linux-next for a while is really important.

On Mon, 2009-11-09 at 13:45 +0200, Tomi Valkeinen wrote:
 This patch set implement new display subsystem driver (DSS2) and omapfb driver
 for OMAP2/3. The patches have been reviewed on linux-omap and 
 linux-fbdev-devel
 mailing lists. The patches can also be found from master branch in
 http://gitorious.org/linux-omap-dss2/linux. The branch is based on the
 linux-next tree.
 
 The patches include DSS documentation patch that includes more instructions 
 for
 module parameters, sysfs files etc.
 
 The patches enable DSS2 for OMAP3430 SDP board and support for other boards 
 can
 be sent after the DSS2 has been merged. DSS2 is used in various boards, for
 example Nokia N900, Beagle Board and Overo.
 
 I don't currently have any OMAP2 board to test DSS2, but it has worked on 
 OMAP2
 and the possible fixes needed should be minimal.
 
 OMAP1 is not supported, and so the old DSS needs to be used on OMAP1 boards. 
 My
 longer term plan is to move all OMAP2 stuff from the old DSS to the new one,
 and then shrink the old DSS to support OMAP1 only.
 
 DSS2 is partly based on the old omapfb driver by Imre Deak, and Imre has also
 contributed to DSS2 quite a bit. Ville Syrjälä has been contributing to 
 scaling
 and tv-out work, and Topi Pohjolainen to VRFB. Also some contributions have
 been made by Hardik Shah, Vaibhav Hiremath, and perhaps some others that I 
 have
 forgotten =).

Tomi,

could you please kindly ask Stephen (CCed) to include the DSS2 tree into
linux-next, because you are going to merge it the next merge window, and
there does not seem to be any blocker for this.

Being in linux-next for a while is really important.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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


Re: omap3 otg host not working since 2.6.28? (sys_boot affects this)

2009-11-10 Thread Brad Parker

Brad Parker wrote:
I can't get OTG host mode to work with any recent kernels.  I'm 
curious if anyone else has tried this.

It may well be something most people don't do.
I know it's poor form to respond to you own posts, but I thought I'd 
add/ask the following:


I've found that the sys_boot settings can affect whether OTG host mode 
works or does not work (when it works :-)


Has anyone else seen this? 

OMAP3530; the beagleboard uses 0 for sys_boot[4:0];  If you set them 
to say,  00110,

USB OTG host won't work, even in older kernels which normally work.

0 is  nand,usb,uart3,mmc
00110 is mmc,usb

So in the second case it looks like the ROM has not touched the USB 
hardware when it

boots from from mmc.  In the first case it has set up the USB OTG hardware.

It seems that the OMAP ROM is doing something in the way of hardware 
initialization which

the linux driver is depending on...

-brad

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


RE: [PATCH 0/2] Introduce support for AM35xx

2009-11-10 Thread Premi, Sanjeev
 -Original Message-
 From: Premi, Sanjeev 
 Sent: Tuesday, October 27, 2009 7:32 PM
 To: linux-omap@vger.kernel.org
 Cc: Premi, Sanjeev
 Subject: [PATCH 0/2] Introduce support for AM35xx
 
 This patch adds support for the recently announced
 AM3505 and AM3517 devices from Texas Instruments.
 
 It also defines the AM3517 EVM board. Detailed
 support will follow in subsequent patches.
 
   [1] http://www.ti.com/sitara 
   [2] http://www.ti.com/arm 
   [3] 
 http://tiexpressdsp.com/index.php?title=Applications_Processor
 s_Crossreference 
   [4] http://marc.info/?l=linux-omapm=125615009412281w=2
   
 The patches have been created against omap-next branch.
 
 Sanjeev Premi (2):
   AM35xx: Runtime detection of the device
   AM35xx: Define the AM3517EVM board
 
  arch/arm/mach-omap2/Kconfig   |4 +++
  arch/arm/mach-omap2/id.c  |   43 
 
  arch/arm/plat-omap/include/plat/cpu.h |   12 +
  3 files changed, 53 insertions(+), 6 deletions(-)
 
 
Tony,

Where does this stand in your queue?

Best regards,
Sanjeev
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] Fixing compilation warning for 'nand/omap2.c'

2009-11-10 Thread Artem Bityutskiy
On Tue, 2009-11-03 at 14:31 +0530, Vimal Singh wrote:
  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 090ab87..92573d5 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
  @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  mtd_info *mtd, u_char
 
  :-) It is the same again.
 
  Try to send the e-mail to yourself, then save it and apply with git-am.
  If it works, send to the mailing list.
 
 Below patch applies. Sorry for noise... :(
 
 Thanks,
 vimal
 
 
 From eebbd81141b196af2dc3f7a2650ce16b6b0d76ae Mon Sep 17 00:00:00 2001
 From: Vimal Singh vimalsi...@ti.com
 Date: Fri, 30 Oct 2009 11:31:34 +0530
 Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
 
 Fixing below warning in compilation:
 drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
 drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
 'omap_nand_dma_transfer' discards qualifiers from pointer target type
 
 Signed-off-by: Vimal Singh vimalsi...@ti.com
 ---
  drivers/mtd/nand/omap2.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 090ab87..92573d5 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c
 @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  static void omap_write_buf_dma_pref(struct mtd_info *mtd,
   const u_char *buf, int len)
  {
 + u_char *p = (u_char *)buf;
 +
   if (len = mtd-oobsize)
 - omap_write_buf_pref(mtd, buf, len);
 + omap_write_buf_pref(mtd, p, len);
   else
   /* start transfer in DMA mode */
 - omap_nand_dma_transfer(mtd, buf, len, 0x1);
 + omap_nand_dma_transfer(mtd, p, len, 0x1);
  }

I think that you should instead remove the 'const' modifier from the
'omap_write_buf_dma_pref()' function. Indeed, if it has the 'const'
modifier, it should never change the bugger.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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


Re: [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module

2009-11-10 Thread Artem Bityutskiy
On Fri, 2009-10-30 at 14:57 +0530, Vimal Singh wrote:
 Last time I forgot to 'git add' for 'arch/arm/mach-omap2/gpmc.c'... My bad.
 Correct patch is below.
 
 -vimal
 
 
 From: Vimal Singh vimalsi...@ti.com
 Date: Fri, 30 Oct 2009 14:54:29 +0530
 Subject: [PATCH] NAND: OMAP: Fixing omap nand driver, compiled as module
 
 Removing OMAP NAND driver, when loaded as a module, gives error and
 does not get success. This fixes this and makes driver loadable and
 removable run time.
 
 Signed-off-by: Vimal Singh vimalsi...@ti.com
 ---
  arch/arm/mach-omap2/gpmc.c |2 ++
  drivers/mtd/nand/omap2.c   |5 -
  2 files changed, 6 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
 index 1587682..1d10b7b 100644
 --- a/arch/arm/mach-omap2/gpmc.c
 +++ b/arch/arm/mach-omap2/gpmc.c
 @@ -88,6 +88,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
   reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
   __raw_writel(val, reg_addr);
  }
 +EXPORT_SYMBOL(gpmc_cs_write_reg);
 
  u32 gpmc_cs_read_reg(int cs, int idx)
  {
 @@ -96,6 +97,7 @@ u32 gpmc_cs_read_reg(int cs, int idx)
   reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
   return __raw_readl(reg_addr);
  }
 +EXPORT_SYMBOL(gpmc_cs_read_reg);

You should get Tony's ack for this. I do not know the code, but on
surface it looks strange. Exporting so low-level functions is bad in
general, IMO. These function should either be inlined, or you should
invent better abstraction, so that you would not need to ever call these
functions from omap2.c. 

 
  /* TODO: Add support for gpmc_fck to clock framework and use it */
  unsigned long gpmc_get_fclk_period(void)
 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 92573d5..ecc4d32 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c
 @@ -1056,7 +1056,8 @@ out_free_info:
  static int omap_nand_remove(struct platform_device *pdev)
  {
   struct mtd_info *mtd = platform_get_drvdata(pdev);
 - struct omap_nand_info *info = mtd-priv;
 + struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
 + mtd);
 
   platform_set_drvdata(pdev, NULL);
   if (use_dma)
 @@ -1064,7 +1065,9 @@ static int omap_nand_remove(struct platform_device 
 *pdev)
 
   /* Release NAND device, its internal structures and partitions */
   nand_release(info-mtd);
 + release_mem_region(info-phys_base, NAND_IO_SIZE);
   iounmap(info-nand_pref_fifo_add);
 + gpmc_cs_free(info-gpmc_cs);
   kfree(info-mtd);
   return 0;
  }
-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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


Re: [PATCH 1/3] Fixing compilation warning for 'nand/omap2.c'

2009-11-10 Thread Artem Bityutskiy
On Tue, 2009-11-03 at 14:31 +0530, Vimal Singh wrote:
  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 090ab87..92573d5 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
  @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  mtd_info *mtd, u_char
 
  :-) It is the same again.
 
  Try to send the e-mail to yourself, then save it and apply with git-am.
  If it works, send to the mailing list.
 
 Below patch applies. Sorry for noise... :(
 
 Thanks,
 vimal
 
 
 From eebbd81141b196af2dc3f7a2650ce16b6b0d76ae Mon Sep 17 00:00:00 2001
 From: Vimal Singh vimalsi...@ti.com
 Date: Fri, 30 Oct 2009 11:31:34 +0530
 Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
 
 Fixing below warning in compilation:
 drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
 drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
 'omap_nand_dma_transfer' discards qualifiers from pointer target type
 
 Signed-off-by: Vimal Singh vimalsi...@ti.com
 ---
  drivers/mtd/nand/omap2.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 090ab87..92573d5 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c
 @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  static void omap_write_buf_dma_pref(struct mtd_info *mtd,
   const u_char *buf, int len)
  {
 + u_char *p = (u_char *)buf;
 +
   if (len = mtd-oobsize)
 - omap_write_buf_pref(mtd, buf, len);
 + omap_write_buf_pref(mtd, p, len);
   else
   /* start transfer in DMA mode */
 - omap_nand_dma_transfer(mtd, buf, len, 0x1);
 + omap_nand_dma_transfer(mtd, p, len, 0x1);
  }
 
  /**

BTW, this patch is still corrupted for me. And it is strange that I do
not see it in the archives, so I cannot check is this my setup which is
guilty, or it is you sending the patches incorrectly:

http://lists.infradead.org/pipermail/linux-mtd/2009-November/027918.html

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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


Re: n8x0 idle power problem (updated with registers dump)

2009-11-10 Thread xl6

Thanks for the reply.

I think the l-o kernel explicitly turns off UART clock before entering  
full retention:


in pm24xx.c:omap2_enter_full_retention():

if (omap2_pm_debug) {
omap2_pm_dump(0, 0, 0);
getnstimeofday(ts_preidle);
}

/* One last check for pending IRQs to avoid extra latency due
 * to sleeping unnecessarily. */
if (omap_irq_pending())
goto no_sleep;

omap_uart_prepare_idle(0);
omap_uart_prepare_idle(1);
omap_uart_prepare_idle(2);

/* Jump to SRAM suspend code */
omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL),
OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL),
OMAP_SDRC_REGADDR(SDRC_POWER));
no_sleep:
omap_uart_resume_idle(2);
omap_uart_resume_idle(1);
omap_uart_resume_idle(0);

At the time of dumping register, UART clock may still be on. However  
omap_uart_prepare_idle() will turn it off if allowed. Am I right?


Btw, I have set clocks_off_while_idle to 1.

Is it possible that the extra idle power is because of the improper  
management of the regulator (i.e. menelaus chip) ?


Thanks!

-Felix

Quoting Tony Lindgren t...@atomide.com:


Hi,

* x...@rice.edu x...@rice.edu [091105 09:49]:

Hi,

I turned on pm_debug, dumped all related registers for both systems
and compared them (as attached below). Most registers have quite the
same contents, while some like CORE_MOD.CM_ICLKEN1 and
CORE_MOD.CM_ICLKEN1 there is 1-bit difference (looks like the newer
clock has one UART clock on while sleeping..?)


The uart will certainly block the retention state. The uart should
time out after 5 seconds and power down, so you should check that
it's happening.

Maybe try something like to allow the uart to idle before dumping
the registers:

# echo 0  /proc/sys/kernel/printk
# sleep 10; dmesg  /tmp/out
# echo 7  /proc/sys/kernel/printk


What is confusing to me is CORE_MOD.PM_PWSTST (the working system has
0x00080010 while the newer system has 0x00080030). Does it mean their
last power states are different?


Added Kevin to Cc as he probably knows best which is the correct
PM_PWSTST register :)


Can any one take a look the dmesg and offer some suggestions? Thanks.


So far it looks like it's the UART..

Tony


---From 2.6.21 Maemo Kernel---
Nokia-N810-:~# dmesg
: 0x
[  128.828125] --- Going to full retention (next timer after 7 ms)
[  128.828125] PRCM_IRQENABLE_MPU  : 0x
[  128.828125] CM_CLKSTCTRL_MPU: 0x0001
[  128.828125] PM_PWSTCTRL_MPU : 0x000d
[  128.828125] PM_PWSTST_MPU   : 0x0010
[  128.828125] PM_WKDEP_MPU: 0x0010
[  128.828125] INTC_MIR0   : 0x1cffef6f
[  128.828125] INTC_MIR1   : 0xfcde
[  128.828125] INTC_MIR2   : 0xfff7feff
[  128.828125] CM_FCLKEN1_CORE : 0x
[  128.828125] CM_FCLKEN2_CORE : 0x
[  128.828125] CM_FCLKEN_WKUP  : 0x0005
[  128.828125] CM_ICLKEN1_CORE : 0x0401
[  128.828125] CM_ICLKEN2_CORE : 0x
[  128.828125] CM_ICLKEN_WKUP  : 0x0027
[  128.828125] CM_CLKEN_PLL: 0x00cf
[  128.828125] PRCM_CLKEMUL_CTRL   : 0x0001
[  128.828125] CM_AUTOIDLE_PLL : 0x00cf
[  128.828125] PM_PWSTST_CORE  : 0x00080010
[  128.828125] PRCM_CLKSRC_CTRL: 0x0058
[  128.828125] CM_FCLKEN_DSP   : 0x
[  128.828125] CM_ICLKEN_DSP   : 0x
[  128.828125] CM_IDLEST_DSP   : 0x
[  128.828125] CM_AUTOIDLE_DSP : 0x0002
[  128.828125] CM_CLKSEL_DSP   : 0x0443
[  128.828125] CM_CLKSTCTRL_DSP: 0x0101
[  128.828125] RM_RSTCTRL_DSP  : 0x0103
[  128.828125] RM_RSTST_DSP: 0x0003
[  128.828125] PM_PWSTCTRL_DSP : 0x00040017
[  128.828125] PM_PWSTST_DSP   : 0x0003
[  128.828125] --- Woke up (slept for 3.234 ms)
[  128.828125] PM_WKST1_CORE   : 0x
[  128.828125] PM_WKST2_CORE   : 0x
[  128.828125] PM_WKST_WKUP: 0x0001
[  128.828125] PRCM_IRQSTATUS_MPU  : 0x0021
[  128.828125] INTC_PENDING_IRQ0   : 0x
[  128.828125] INTC_PENDING_IRQ1   : 0x0020
[  128.828125] INTC_PENDING_IRQ2   : 0x
[  128.835937] --- Going to full retention (next timer after 1242 ms)
[  128.835937] PRCM_IRQENABLE_MPU  : 0x
[  128.835937] CM_CLKSTCTRL_MPU: 0x0001
[  128.835937] PM_PWSTCTRL_MPU : 0x000d
[  128.835937] PM_PWSTST_MPU   : 0x0010
[  128.835937] PM_WKDEP_MPU: 0x0010
[  128.835937] INTC_MIR0   : 0x1cffef6f
[  128.835937] INTC_MIR1   : 0xfcde
[  128.835937] INTC_MIR2   : 0xfff7feff
[  128.835937] CM_FCLKEN1_CORE : 0x
[  128.835937] CM_FCLKEN2_CORE : 0x
[  128.835937] CM_FCLKEN_WKUP  : 0x0005
[  128.835937] CM_ICLKEN1_CORE : 0x0401
[  128.835937] CM_ICLKEN2_CORE : 0x
[  128.835937] CM_ICLKEN_WKUP  : 0x0027

Re: [PATCH 1/3] Fixing compilation warning for 'nand/omap2.c'

2009-11-10 Thread Artem Bityutskiy
On Tue, 2009-11-10 at 16:20 +0200, Artem Bityutskiy wrote:
 On Tue, 2009-11-03 at 14:31 +0530, Vimal Singh wrote:
   diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
   index 090ab87..92573d5 100644
   --- a/drivers/mtd/nand/omap2.c
   +++ b/drivers/mtd/nand/omap2.c
   @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
   mtd_info *mtd, u_char
  
   :-) It is the same again.
  
   Try to send the e-mail to yourself, then save it and apply with git-am.
   If it works, send to the mailing list.
  
  Below patch applies. Sorry for noise... :(
  
  Thanks,
  vimal
  
  
  From eebbd81141b196af2dc3f7a2650ce16b6b0d76ae Mon Sep 17 00:00:00 2001
  From: Vimal Singh vimalsi...@ti.com
  Date: Fri, 30 Oct 2009 11:31:34 +0530
  Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
  
  Fixing below warning in compilation:
  drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
  drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
  'omap_nand_dma_transfer' discards qualifiers from pointer target type
  
  Signed-off-by: Vimal Singh vimalsi...@ti.com
  ---
   drivers/mtd/nand/omap2.c |6 --
   1 files changed, 4 insertions(+), 2 deletions(-)
  
  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 090ab87..92573d5 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
  @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
   static void omap_write_buf_dma_pref(struct mtd_info *mtd,
  const u_char *buf, int len)
   {
  +   u_char *p = (u_char *)buf;
  +
  if (len = mtd-oobsize)
  -   omap_write_buf_pref(mtd, buf, len);
  +   omap_write_buf_pref(mtd, p, len);
  else
  /* start transfer in DMA mode */
  -   omap_nand_dma_transfer(mtd, buf, len, 0x1);
  +   omap_nand_dma_transfer(mtd, p, len, 0x1);
   }
 
 I think that you should instead remove the 'const' modifier from the
 'omap_write_buf_dma_pref()' function. Indeed, if it has the 'const'
 modifier, it should never change the bugger.

Sorry, s/bugger/buffer/
:-)

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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


[PATCH v3] mfd: Initial support for twl5031

2009-11-10 Thread Ilkka Koskinen
TWL5031 introduces two new interrupts in PIH. Moreover, BCI
has changed remarkably and, thus, it's disabled when TWL5031
is in use.

Signed-off-by: Ilkka Koskinen ilkka.koski...@nokia.com
---
 drivers/mfd/twl4030-core.c  |   13 -
 drivers/mfd/twl4030-irq.c   |  131 +-
 include/linux/i2c/twl4030.h |   47 +--
 3 files changed, 180 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c
index 9b74f88..61c2bb7 100644
--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -152,6 +152,10 @@
 #define TWL4030_BASEADD_PWMB   0x00F1
 #define TWL4030_BASEADD_KEYPAD 0x00D2
 
+#define TWL5031_BASEADD_ACCESSORY  0x0074 /* Replaces Main Charge */
+#define TWL5031_BASEADD_INTERRUPTS 0x00B9 /* Different than TWL4030's
+ one */
+
 /* subchip/slave 3 - POWER ID */
 #define TWL4030_BASEADD_BACKUP 0x0014
 #define TWL4030_BASEADD_INT0x002E
@@ -183,6 +187,7 @@
 /* chip-specific feature flags, for i2c_device_id.driver_data */
 #define TWL4030_VAUX2  BIT(0)  /* pre-5030 voltage ranges */
 #define TPS_SUBSET BIT(1)  /* tps659[23]0 have fewer LDOs */
+#define TWL5031BIT(2)  /* twl5031 has different 
registers */
 
 /*--*/
 
@@ -235,6 +240,8 @@ static struct twl4030mapping 
twl4030_map[TWL4030_MODULE_LAST + 1] = {
{ 2, TWL4030_BASEADD_PWM1 },
{ 2, TWL4030_BASEADD_PWMA },
{ 2, TWL4030_BASEADD_PWMB },
+   { 2, TWL5031_BASEADD_ACCESSORY },
+   { 2, TWL5031_BASEADD_INTERRUPTS },
 
{ 3, TWL4030_BASEADD_BACKUP },
{ 3, TWL4030_BASEADD_INT },
@@ -482,7 +489,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned 
long features)
 {
struct device   *child;
 
-   if (twl_has_bci()  pdata-bci  !(features  TPS_SUBSET)) {
+   if (twl_has_bci()  pdata-bci 
+   !(features  (TPS_SUBSET | TWL5031))) {
child = add_child(3, twl4030_bci,
pdata-bci, sizeof(*pdata-bci),
false,
@@ -746,6 +754,7 @@ static void clocks_init(struct device *dev,
 
 int twl_init_irq(int irq_num, unsigned irq_base, unsigned irq_end);
 int twl_exit_irq(void);
+int twl_init_chip_irq(const char *chip);
 
 static int twl4030_remove(struct i2c_client *client)
 {
@@ -821,6 +830,7 @@ twl4030_probe(struct i2c_client *client, const struct 
i2c_device_id *id)
if (client-irq
 pdata-irq_base
 pdata-irq_end  pdata-irq_base) {
+   twl_init_chip_irq(id-name);
status = twl_init_irq(client-irq, pdata-irq_base, 
pdata-irq_end);
if (status  0)
goto fail;
@@ -836,6 +846,7 @@ fail:
 static const struct i2c_device_id twl4030_ids[] = {
{ twl4030, TWL4030_VAUX2 },   /* Triton 2 */
{ twl5030, 0 },   /* T2 updated */
+   { twl5031, TWL5031 }, /* TWL5030 updated */
{ tps65950, 0 },  /* catalog version of twl5030 */
{ tps65930, TPS_SUBSET }, /* fewer LDOs and DACs; no charger */
{ tps65920, TPS_SUBSET }, /* fewer LDOs; no codec or charger */
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index fb194fe..0b73302 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -74,6 +74,8 @@ struct sih {
u8  edr_offset;
u8  bytes_edr;  /* bytelen of EDR */
 
+   u8  irq_lines;  /* number of supported irq lines */
+
/* SIR ignored -- set interrupt, for testing only */
struct irq_data {
u8  isr_offset;
@@ -82,6 +84,9 @@ struct sih {
/* + 2 bytes padding */
 };
 
+static const struct sih *sih_modules;
+static int nr_sih_modules;
+
 #define SIH_INITIALIZER(modname, nbits) \
.module = TWL4030_MODULE_ ## modname, \
.control_offset = TWL4030_ ## modname ## _SIH_CTRL, \
@@ -89,6 +94,7 @@ struct sih {
.bytes_ixr  = DIV_ROUND_UP(nbits, 8), \
.edr_offset = TWL4030_ ## modname ## _EDR, \
.bytes_edr  = DIV_ROUND_UP((2*(nbits)), 8), \
+   .irq_lines  = 2, \
.mask = { { \
.isr_offset = TWL4030_ ## modname ## _ISR1, \
.imr_offset = TWL4030_ ## modname ## _IMR1, \
@@ -107,7 +113,8 @@ struct sih {
 /* Order in this table matches order in PIH_ISR.  That is,
  * BIT(n) in PIH_ISR is sih_modules[n].
  */
-static const struct sih sih_modules[6] = {
+/* sih_modules_twl4030 is used both in twl4030 and twl5030 */
+static const struct sih sih_modules_twl4030[6] = {
[0] = {
.name   = gpio,
.module = TWL4030_MODULE_GPIO,
@@ -118,6 +125,7 @@ static const struct sih 

[PATCH] Disable headset jack detection for SDP3430

2009-11-10 Thread Romero, Felipe
From: Felipe Romero felipe.rom...@ti.com

This patch Disable headset jack detection for SDP3430 boards,
to avoid CPU kernel utilization.
---
 sound/soc/omap/sdp3430.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index b719e5d..3ef489e 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
/* SDP3430 connected pins */
snd_soc_dapm_enable_pin(codec, Ext Mic);
snd_soc_dapm_enable_pin(codec, Ext Spk);
-   snd_soc_dapm_disable_pin(codec, Headset Mic);
-   snd_soc_dapm_disable_pin(codec, Headset Stereophone);
+   snd_soc_dapm_enable_pin(codec, Headset Mic);
+   snd_soc_dapm_enable_pin(codec, Headset Stereophone);
 
/* TWL4030 not connected pins */
snd_soc_dapm_nc_pin(codec, AUXL);
@@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
ret = snd_soc_dapm_sync(codec);
if (ret)
return ret;
-
+#if 0
/* Headset jack detection */
ret = snd_soc_jack_new(snd_soc_sdp3430, Headset Jack,
SND_JACK_HEADSET, hs_jack);
@@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
 
ret = snd_soc_jack_add_gpios(hs_jack, ARRAY_SIZE(hs_jack_gpios),
hs_jack_gpios);
-
+#endif
return ret;
 }
 
@@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
 
 static void __exit sdp3430_soc_exit(void)
 {
+#if 0
snd_soc_jack_free_gpios(hs_jack, ARRAY_SIZE(hs_jack_gpios),
hs_jack_gpios);
-
+#endif
platform_device_unregister(sdp3430_snd_device);
 }
 module_exit(sdp3430_soc_exit);
-- 
1.6.0.4

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


Re: [PATCH] Disable headset jack detection for SDP3430

2009-11-10 Thread Nishanth Menon

Romero, Felipe had written, on 11/10/2009 11:54 AM, the following:

From: Felipe Romero felipe.rom...@ti.com

This patch Disable headset jack detection for SDP3430 boards,
to avoid CPU kernel utilization.


please read Documentation/SubmittingPatches
12) Sign your work


---
 sound/soc/omap/sdp3430.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index b719e5d..3ef489e 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
/* SDP3430 connected pins */
snd_soc_dapm_enable_pin(codec, Ext Mic);
snd_soc_dapm_enable_pin(codec, Ext Spk);
-   snd_soc_dapm_disable_pin(codec, Headset Mic);
-   snd_soc_dapm_disable_pin(codec, Headset Stereophone);
+   snd_soc_dapm_enable_pin(codec, Headset Mic);
+   snd_soc_dapm_enable_pin(codec, Headset Stereophone);
 
 	/* TWL4030 not connected pins */

snd_soc_dapm_nc_pin(codec, AUXL);
@@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
ret = snd_soc_dapm_sync(codec);
if (ret)
return ret;
-
+#if 0

NAK to #if 0s. if you dont need that code, please remove it

/* Headset jack detection */
ret = snd_soc_jack_new(snd_soc_sdp3430, Headset Jack,
SND_JACK_HEADSET, hs_jack);
@@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
 
 	ret = snd_soc_jack_add_gpios(hs_jack, ARRAY_SIZE(hs_jack_gpios),

hs_jack_gpios);
-
+#endif
return ret;
 }
 
@@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
 
 static void __exit sdp3430_soc_exit(void)

 {
+#if 0

NAK to #if 0s. if you dont need that code, please remove it

snd_soc_jack_free_gpios(hs_jack, ARRAY_SIZE(hs_jack_gpios),
hs_jack_gpios);
-
+#endif
platform_device_unregister(sdp3430_snd_device);
 }
 module_exit(sdp3430_soc_exit);



--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread chudson
From: Chris Hudson chud...@kionix.com

This is a request for comments for adding driver support for the Kionix KXTE9 
digital tri-axis accelerometer.  This part features built-in tilt position 
(orientation), wake-up and back-to-sleep algorithms, which can trigger a 
user-configurable physical interrupt.  The driver uses i2c for device 
communication, a misc node for IOCTLs, and input nodes for reporting 
acceleration data and interrupt status information.

Signed-off-by: Chris Hudson chud...@kionix.com
---
 drivers/hwmon/Kconfig  |   10 +
 drivers/hwmon/Makefile |1 +
 drivers/hwmon/kxte9.c  |  998 
 include/linux/kxte9.h  |   95 +
 4 files changed, 1104 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hwmon/kxte9.c
 create mode 100644 include/linux/kxte9.h

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 700e93a..f52e141 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -419,6 +419,16 @@ config SENSORS_IT87
  This driver can also be built as a module.  If so, the module
  will be called it87.
 
+config SENSORS_KXTE9
+   tristate Kionix KXTE9 tri-axis digital accelerometer
+   depends on I2C  SYSFS
+   help
+ If you say yes here you get support for the Kionix KXTE9 digital
+ tri-axis accelerometer.
+
+ This driver can also be built as a module.  If so, the module
+ will be called kxte9.
+
 config SENSORS_LM63
tristate National Semiconductor LM63
depends on I2C
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 9f46cb0..65ce35e 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_SENSORS_IBMAEM)  += ibmaem.o
 obj-$(CONFIG_SENSORS_IBMPEX)   += ibmpex.o
 obj-$(CONFIG_SENSORS_IT87) += it87.o
 obj-$(CONFIG_SENSORS_K8TEMP)   += k8temp.o
+obj-$(CONFIG_SENSORS_KXTE9)+= kxte9.o
 obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o hp_accel.o
 obj-$(CONFIG_SENSORS_LIS3_SPI) += lis3lv02d.o lis3lv02d_spi.o
 obj-$(CONFIG_SENSORS_LM63) += lm63.o
diff --git a/drivers/hwmon/kxte9.c b/drivers/hwmon/kxte9.c
new file mode 100644
index 000..29df50e
--- /dev/null
+++ b/drivers/hwmon/kxte9.c
@@ -0,0 +1,998 @@
+/*
+ * Copyright (C) 2009 Kionix, Inc.
+ * Written by Chris Hudson chud...@kionix.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA
+ */
+
+#include linux/err.h
+#include linux/errno.h
+#include linux/delay.h
+#include linux/fs.h
+#include linux/i2c.h
+#include linux/input.h
+#include linux/input-polldev.h
+#include linux/miscdevice.h
+#include linux/uaccess.h
+#include linux/workqueue.h
+#include linux/irq.h
+#include linux/gpio.h
+#include linux/interrupt.h
+#include linux/kxte9.h
+
+#define NAME   kxte9
+#define G_MAX  2000
+/* OUTPUT REGISTERS */
+#define XOUT   0x12
+#define INT_STATUS_REG 0x16
+#define INT_SRC_REG2   0x17
+#define TILT_POS_CUR   0x10
+#define TILT_POS_PRE   0x11
+#define INT_REL0x1A
+/* CONTROL REGISTERS */
+#define CTRL_REG1  0x1B
+#define CTRL_REG3  0x1D
+#define INT_CTRL1  0x1E
+#define TILT_TIMER 0x28
+#define WUF_TIMER  0x29
+#define B2S_TIMER  0x2A
+#define WUF_THRESH 0x5A
+#define B2S_THRESH 0x5B
+/* CONTROL REGISTER 1 BITS */
+#define PC1_OFF0x00
+#define PC1_ON 0x80
+/* INTERRUPT SOURCE 1 BITS */
+#define TPS0x01
+#define WUFS   0x02
+#define B2SS   0x04
+/* INPUT_ABS CONSTANTS */
+#define FUZZ   32
+#define FLAT   32
+#define I2C_RETRY_DELAY5
+#define I2C_RETRIES5
+/* RESUME STATE INDICES */
+#define RES_CTRL_REG1  0
+#define RES_CTRL_REG3  1
+#define RES_INT_CTRL1  2
+#define RES_TILT_TIMER 3
+#define RES_WUF_TIMER  4
+#define RES_B2S_TIMER  5
+#define RES_WUF_THRESH 6
+#define RES_B2S_THRESH 7
+#define RES_INTERVAL   8
+#define RES_CURRENT_ODR9
+#define RESUME_ENTRIES 10
+
+struct {
+   unsigned int cutoff;
+   u8 mask;
+} kxte9_odr_table[] = {
+   {
+   25, ODR125}, {
+   

[RFC PATCH 2/3] mach-omap2:kxte9 accelerometer support for OMAP ZoomII

2009-11-10 Thread chudson
From: Chris Hudson chud...@kionix.com

This patch alters board-zoom2.c to add platform data initialization, gpio 
configuration, and i2c-2 bus initialization in support of the kxte9 
accelerometer on the OMAP ZoomII platform.

Signed-off-by: Chris Hudson chud...@kionix.com
---
 arch/arm/mach-omap2/board-zoom2.c |   58 +
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom2.c 
b/arch/arm/mach-omap2/board-zoom2.c
index 4ad9b94..da59d9c 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -27,6 +27,47 @@
 #include mmc-twl4030.h
 #include sdram-micron-mt46h32m32lf-6.h
 
+#ifdef CONFIG_SENSORS_KXTE9
+/* KIONIX KXTE9 Digital Tri-axis Accelerometer */
+#include plat/mux.h
+#include linux/kxte9.h
+#define ZOOM2_KIONIX_INT_GPIO  156
+
+static void __init zoom2_kionix_init(void)
+{
+   omap_cfg_reg(Y21_34XX_GPIO156);
+   if (gpio_request(ZOOM2_KIONIX_INT_GPIO, kionix_irq)  0) {
+   printk(KERN_ERR kionix error retrieving GPIO\n);
+   return;
+   }
+   gpio_direction_input(ZOOM2_KIONIX_INT_GPIO);
+}
+
+static struct kxte9_platform_data zoom2_kxte9_data = {
+   .min_interval   = 25,
+   .poll_interval  = 200,
+
+   .axis_map_x = 0,
+   .axis_map_y = 1,
+   .axis_map_z = 2,
+
+   .negate_x   = 0,
+   .negate_y   = 0,
+   .negate_z   = 0,
+
+   .ctrl_reg1_init = TPE | WUFE | B2SE,
+   .engine_odr_init= OB2S10 | OWUF40,
+   .int_ctrl_init  = KXTE9_IEN | KXTE9_IEA,
+   .tilt_timer_init= 0x03,
+   .wuf_timer_init = 0x01,
+   .b2s_timer_init = 0x01,
+   .wuf_thresh_init= 0x20,
+   .b2s_thresh_init= 0x60,
+
+   .gpio = ZOOM2_KIONIX_INT_GPIO,
+};
+#endif
+
 /* Zoom2 has Qwerty keyboard*/
 static int board_keymap[] = {
KEY(0, 0, KEY_E),
@@ -256,11 +297,25 @@ static struct i2c_board_info __initdata 
zoom2_i2c_boardinfo[] = {
},
 };
 
+#ifdef CONFIG_SENSORS_KXTE9
+static struct i2c_board_info __initdata zoom2_i2c_bus2info[] = {
+   {
+   I2C_BOARD_INFO(kxte9, KXTE9_I2C_ADDR),
+   .platform_data = zoom2_kxte9_data,
+   },
+};
+#endif
+
 static int __init omap_i2c_init(void)
 {
omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo,
ARRAY_SIZE(zoom2_i2c_boardinfo));
+#ifndef CONFIG_SENSORS_KXTE9
omap_register_i2c_bus(2, 400, NULL, 0);
+#else
+   omap_register_i2c_bus(2, 400, zoom2_i2c_bus2info,
+   ARRAY_SIZE(zoom2_i2c_bus2info));
+#endif
omap_register_i2c_bus(3, 400, NULL, 0);
return 0;
 }
@@ -269,6 +324,9 @@ extern int __init omap_zoom2_debugboard_init(void);
 
 static void __init omap_zoom2_init(void)
 {
+#ifdef CONFIG_SENSORS_KXTE9
+   zoom2_kionix_init();
+#endif
omap_i2c_init();
omap_serial_init();
omap_zoom2_debugboard_init();
-- 
1.5.4.3

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


[RFC PATCH 3/3] mach-omap2:mux support for kxte9 accelerometer on OMAP ZoomII

2009-11-10 Thread chudson
From: Chris Hudson chud...@kionix.com

This patch alters mux.c and mux.h to allow gpio configuration in support of the 
kxte9 accelerometer on the OMAP ZoomII platform.

Signed-off-by: Chris Hudson chud...@kionix.com
---
 arch/arm/mach-omap2/mux.c |2 ++
 arch/arm/plat-omap/include/plat/mux.h |1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 32c953e..1158315 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -486,6 +486,8 @@ MUX_CFG_34XX(AF5_34XX_GPIO142, 0x170,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
 MUX_CFG_34XX(AE5_34XX_GPIO143, 0x172,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
+MUX_CFG_34XX(Y21_34XX_GPIO156, 0x18c,
+   OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
 MUX_CFG_34XX(H19_34XX_GPIO164_OUT, 0x19c,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
 MUX_CFG_34XX(J25_34XX_GPIO170, 0x1c6,
diff --git a/arch/arm/plat-omap/include/plat/mux.h 
b/arch/arm/plat-omap/include/plat/mux.h
index f3c1d8a..c17905a 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -803,6 +803,7 @@ enum omap34xx_index {
AE6_34XX_GPIO141,
AF5_34XX_GPIO142,
AE5_34XX_GPIO143,
+   Y21_34XX_GPIO156,
H19_34XX_GPIO164_OUT,
J25_34XX_GPIO170,
 
-- 
1.5.4.3

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


Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread Jean Delvare
On Tue, 10 Nov 2009 13:28:47 -0500, chud...@kionix.com wrote:
 From: Chris Hudson chud...@kionix.com
 
 This is a request for comments for adding driver support for the Kionix KXTE9 
 digital tri-axis accelerometer.  This part features built-in tilt position 
 (orientation), wake-up and back-to-sleep algorithms, which can trigger a 
 user-configurable physical interrupt.  The driver uses i2c for device 
 communication, a misc node for IOCTLs, and input nodes for reporting 
 acceleration data and interrupt status information.
 
 Signed-off-by: Chris Hudson chud...@kionix.com

Nack. We want less accelerometer drivers polluting drivers/hwmon, not
more.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread Chris Hudson



Jean Delvare wrote:

On Tue, 10 Nov 2009 13:28:47 -0500, chud...@kionix.com wrote:
  

From: Chris Hudson chud...@kionix.com

This is a request for comments for adding driver support for the Kionix KXTE9 
digital tri-axis accelerometer.  This part features built-in tilt position 
(orientation), wake-up and back-to-sleep algorithms, which can trigger a 
user-configurable physical interrupt.  The driver uses i2c for device 
communication, a misc node for IOCTLs, and input nodes for reporting 
acceleration data and interrupt status information.


Signed-off-by: Chris Hudson chud...@kionix.com



Nack. We want less accelerometer drivers polluting drivers/hwmon, not
more.

  
Thank you Jean for your quick reply.  I have seen some accelerometer 
drivers in drivers/staging/iio/accel; is this where they are all being 
moved to?

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


Re: [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module

2009-11-10 Thread Tony Lindgren
* Artem Bityutskiy dedeki...@gmail.com [091110 06:22]:
 On Fri, 2009-10-30 at 14:57 +0530, Vimal Singh wrote:
  Last time I forgot to 'git add' for 'arch/arm/mach-omap2/gpmc.c'... My bad.
  Correct patch is below.
  
  -vimal
  
  
  From: Vimal Singh vimalsi...@ti.com
  Date: Fri, 30 Oct 2009 14:54:29 +0530
  Subject: [PATCH] NAND: OMAP: Fixing omap nand driver, compiled as module
  
  Removing OMAP NAND driver, when loaded as a module, gives error and
  does not get success. This fixes this and makes driver loadable and
  removable run time.
  
  Signed-off-by: Vimal Singh vimalsi...@ti.com
  ---
   arch/arm/mach-omap2/gpmc.c |2 ++
   drivers/mtd/nand/omap2.c   |5 -
   2 files changed, 6 insertions(+), 1 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
  index 1587682..1d10b7b 100644
  --- a/arch/arm/mach-omap2/gpmc.c
  +++ b/arch/arm/mach-omap2/gpmc.c
  @@ -88,6 +88,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
  reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
  __raw_writel(val, reg_addr);
   }
  +EXPORT_SYMBOL(gpmc_cs_write_reg);
  
   u32 gpmc_cs_read_reg(int cs, int idx)
   {
  @@ -96,6 +97,7 @@ u32 gpmc_cs_read_reg(int cs, int idx)
  reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
  return __raw_readl(reg_addr);
   }
  +EXPORT_SYMBOL(gpmc_cs_read_reg);
 
 You should get Tony's ack for this. I do not know the code, but on
 surface it looks strange. Exporting so low-level functions is bad in
 general, IMO. These function should either be inlined, or you should
 invent better abstraction, so that you would not need to ever call these
 functions from omap2.c. 

NAK. We don't want the drivers to tinker with these registers
directly. And really, the drivers should be platform independent.

This seems like a quick hack to add back the missing functionality
we threw out of the linux-omap tree. It was thrown out because there
were the same cut and paste hacks duplicated all over the place
tinkering with the GPMC registers directly.

We've fixed a lot of this by creating gpmc-onenand.c and gpmc-smc91x.c,
and that's clearly the way to go.

So instead of trying to add back the same old hacks, how about rather
spend that time to create something that we can use for all boards
using GPMC?

To me it looks like platform init like this should be done in a
generic way in arch/arm/mach-omap2/gpmc-nand.c the same way we have
gpmc-onenand.c and gpmc-smc91x.c.

Also, you should calculate the GPMC timings dynamically as they
can change based on the L3 frequency. Just take a look at the
gpmc-onenand.c and gpmc-smc91x.c.

Cheers,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread Chris Hudson



Jonathan Cameron wrote:

Chris Hudson wrote:
  

Jean Delvare wrote:


On Tue, 10 Nov 2009 13:28:47 -0500, chud...@kionix.com wrote:
 
  

From: Chris Hudson chud...@kionix.com

This is a request for comments for adding driver support for the
Kionix KXTE9 digital tri-axis accelerometer.  This part features
built-in tilt position (orientation), wake-up and back-to-sleep
algorithms, which can trigger a user-configurable physical
interrupt.  The driver uses i2c for device communication, a misc node
for IOCTLs, and input nodes for reporting acceleration data and
interrupt status information.

Signed-off-by: Chris Hudson chud...@kionix.com



Nack. We want less accelerometer drivers polluting drivers/hwmon, not
more.

  
  

Thank you Jean for your quick reply.  I have seen some accelerometer
drivers in drivers/staging/iio/accel; is this where they are all being
moved to?



Sorry Chris, meant to send my reply to the list as this question keeps
coming up.

That somewhat depends on the intended application.  The purpose of IIO
is to provide a more general sensors framework, handling reasonably high
capture speeds and things like triggering and ring buffers.  As things
currently stand it isn't the place for devices that are principally being
used for input or as wake up triggers. I'd be perfectly happy if there
was a driver in IIO for this chip, (we already have a basic kxsd9 driver)
but the support for much of what you describe in your summary would be
pretty much unconnected to that subsystem. Not necessarily a problem
though handling exactly what was getting the data at a given moment
might get fiddly.
 
Jonathan

--

  
Thank you for your insight Jonathan.  The driver was originally written 
for the 2.6.29 omap-android kernel to facilitate integration of the 
kxte9 into customer projects.  Unfortunately, it seems that things in 
the kernel have changed since then, but I'm not sure how much we can 
change without sacrificing compatibility with the Android sensor API.  
Is there a different place where this driver could go without requiring 
significant redesign?

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


[APPLIED] [PATCH] update mach-types

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-testing

Initial commit ID (Likely to change): 1b5ff48f2abdb53de12e23d50ce43f0c4348e3d8

PatchWorks
http://patchwork.kernel.org/patch/55509/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=1b5ff48f2abdb53de12e23d50ce43f0c4348e3d8


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


Re: [PATCH 1/1] input: lm8323: setting correct value to size_y

2009-11-10 Thread Tony Lindgren
* Carlos Aguiar carlos.agu...@indt.org.br [091024 13:18]:
 From: Carlos Eduardo Aguiar carlos.agu...@indt.org.br
 
 This simple patch fixes the correct value to plataform parameter size_y.
 
 Fix needed to make N810 keyboard work properly.
 
 Signed-off-by: Carlos Eduardo Aguiar carlos.agu...@indt.org.br
 ---
  arch/arm/mach-omap2/board-n800.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-n800.c 
 b/arch/arm/mach-omap2/board-n800.c
 index cb32b61..0a50fd3 100644
 --- a/arch/arm/mach-omap2/board-n800.c
 +++ b/arch/arm/mach-omap2/board-n800.c

Looks like this needs to be refreshed for board-n8x0.c..

Regards,

Tony


 @@ -115,7 +115,7 @@ static struct lm8323_platform_data lm8323_pdata = {
   .repeat = 0, /* Repeat is handled in userspace for now. */
   .keymap = rx44_keymap,
   .size_x = 8,
 - .size_y = 8,
 + .size_y = 12,
   .debounce_time  = 12,
   .active_time= 500,
  
 -- 1.5.4.3
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


linux-omap-2.6 does not allow configuring rt2xx

2009-11-10 Thread Sid Boyce
Spotted over the last few days.
make ARCH=arm CROSS_COMPILE=/opt/arm-2009q1/bin/arm-none-linux/gnueabi-
omap3_beagle_defconfig, then xconfig/menuconfig/config, the option
never shows up.
Regards
Sid.
-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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


Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread Jean Delvare
On Tue, 10 Nov 2009 15:32:50 -0500, Chris Hudson wrote:
 Thank you for your insight Jonathan.  The driver was originally written 
 for the 2.6.29 omap-android kernel to facilitate integration of the 
 kxte9 into customer projects.  Unfortunately, it seems that things in 
 the kernel have changed since then, but I'm not sure how much we can 
 change without sacrificing compatibility with the Android sensor API.  
 Is there a different place where this driver could go without requiring 
 significant redesign?

I don't think a move implies a redesign. You could put exactly the same
driver under drivers/misc, drivers/accel, drivers/input or what do I
know. I don't want it in drivers/hwmon, but I don't care about anything
else.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread Chris Hudson

Jean Delvare wrote:

On Tue, 10 Nov 2009 15:32:50 -0500, Chris Hudson wrote:
  
Thank you for your insight Jonathan.  The driver was originally written 
for the 2.6.29 omap-android kernel to facilitate integration of the 
kxte9 into customer projects.  Unfortunately, it seems that things in 
the kernel have changed since then, but I'm not sure how much we can 
change without sacrificing compatibility with the Android sensor API.  
Is there a different place where this driver could go without requiring 
significant redesign?



I don't think a move implies a redesign. You could put exactly the same
driver under drivers/misc, drivers/accel, drivers/input or what do I
know. I don't want it in drivers/hwmon, but I don't care about anything
else.

  
Thank you Jean; I will resubmit the driver for drivers/input/misc if 
that sounds appropriate.  On another note, I accidentally left some 
debug code in place that I will be removing (unless it seems appropriate 
to leave that in for intermediate testing).  Any thoughts on this?

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


Re: [PATCH 3/5] omap: mux: Add new style pin multiplexing data for 34xx

2009-11-10 Thread Tony Lindgren
Hi,

Sorry for the delay, have not had a chance to work on this for a few
days.

* Mike Rapoport m...@compulab.co.il [091103 23:14]:
 
 
 Tony Lindgren wrote:
  * Mike Rapoport mike.rapop...@gmail.com [091102 23:10]:
  On Mon, Nov 2, 2009 at 9:10 PM, Tony Lindgren t...@atomide.com wrote:
  * Mike Rapoport m...@compulab.co.il [091101 02:30]:
 
  Tony Lindgren wrote:

snip snip
 
  We can easily do something like this if we add char *muxname to
  struct omap_board_mux (untested):
  
  #define OMAP_MUX_SIGNAL(signal, mux_flags)  \
  {   \
  .muxname= #signal,  \
  .flags  = (mux_flags),  \
  }
  
  #define OMAP_MUX_GPIO(gpio, mux_flags)  
  \
  {   \
  .muxname= gpio_##signal,\
  .flags  = (mux_flags),  \
  }
  
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
  OMAP_MUX_SIGNAL(i2c1_scl, OMAP_PIN_INPUT),
  OMAP_MUX_GPIO(98, OMAP_PIN_INPUT_PULLUP),
  OMAP_MUX_GPIO(99, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_DYNAMIC),
  { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  #endif
  
  Of course then we have to warn on potential duplicate signal names,
  but those can be specified using the register offset + mode as
  needed.

Or use mode0_name.modeX_name for the full naming.

  Is the above close enough to what you have in mind regarding the
  board specific mux tables, or do you have still something else
  in mind?
 
 It's closer :)

OK, hopefully that means close to usable then :)

 What I have in mind is a simple wrapper macro defining mux configuration for
 straightforward cases, just like a bunch of defines in
 arch/arm/mach-omap2/include/mach/mux34xx.h in my earlier patch [1].
 And just use OMAP_MUX_SIGNAL, or OMAP3_MUX for more complicated cases where
 flags and/or OFF mode settings are required.
 For instance, for making i2c1_scl to be actually routed to its pin you would 
 have
 
 static struct omap_board_mux board_mux[] __initdata = {
   OMAP_MUX_I2C1_SCL,
 ...
 }
 
 and for dss_pclk to became hw_dbg12 you have
 
 static struct omap_board_mux board_mux[] __initdata = {
   OMAP_MUX_PCLK_HW_DBG12,
 ...
 }

The more I've been thinking about it, I think we should move away from using
the register offsets if we can use the signal names instead. A lot of the board
init code can be done in a generic way then, and should work across various
omaps better.

For example, see what setup_ehci_io_mux() becomes then:

switch (port_mode[0]) {
case EHCI_HCD_OMAP_MODE_PHY:
omap_mux_init_signal(hsusb1_stp, OMAP_PIN_OUTPUT);
omap_mux_init_signal(hsusb1_clk, OMAP_PIN_OUTPUT);
omap_mux_init_signal(hsusb1_dir, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_nxt, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data0, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data1, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data2, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data3, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data4, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data5, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data6, OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal(hsusb1_data7, OMAP_PIN_INPUT_PULLDOWN);
break;
...

Of course, that does not mean that we should not allow muxing by using the
register offsets especially for board specific custom devices. But it helps
with the common platform init code for the integrated devices.
 
 Another my point was, that each board-* file will have all the mux settings in
 one consolidated place. Indeed, currently there are no many uses of 
 omap_cfg_reg
 in the board files, but think of crappy bootloaders that fail to configure 
 half
 of the pins or cases when you delibarately want to setup mux configuration in
 kernel.

Agreed. We should do it in the board-*.c files because bootloaders do what they
do. And for common integrated devices we can do it in the common platform init
code based on the nr_lines like we do for MMC and USB already.
 
 I agree, that having the macros I'm talking about is more or less syntactic
 sugar and I'm Ok to live without them :)

OK, let's see how it works once I get back to working on it..

 The most important that we don't need to add enumerated mux setting to
 arch/arm/*omap*/mux.[ch] for each pin that was not there and mux setup can
 completely defined by the board-* files.

:)

Except we still have it for mach-omap1. The mux 

[PATCH v2 0/8] introduce 3630 boards

2009-11-10 Thread Vikram Pandita
Introducing 3630 boards: zoom3 and sdp3630

The peripherals are very similar for the two bards as per this discussion:
http://marc.info/?l=linux-omapm=125676595710748w=2

So maximum reuse is done for the board files for zoom3 and sdp3630

V1: Review comments incorporated:
http://marc.info/?l=linux-omapm=125632676504364w=2
http://marc.info/?l=linux-omapm=125632720804869w=2
http://marc.info/?l=linux-omapm=125633994320138w=2

V2: Review comments by Nishanth Menon
http://marc.info/?l=linux-omapm=125728617825678w=2
http://marc.info/?l=linux-omapm=125728665226332w=2
http://marc.info/?l=linux-omapm=125728729027309w=2
http://marc.info/?l=linux-omapm=125728749327603w=2

Vikram Pandita (8):
  omap: 3630: update is_chip variable
  omap: DEBUG_LL: allow no omap uart configuration
  omap: zoom2: split board file for reuse
  omap: zoom2: update defconfig
  omap: zoom3: introduce zoom3 board support
  omap: zoom3: defconfig creation
  omap: 3630sdp: introduce 3630 sdp board support
  omap: 3630sdp: defconfig creation

 arch/arm/configs/omap_3630sdp_defconfig| 1606 
 arch/arm/configs/omap_zoom2_defconfig  |  231 ++--
 arch/arm/configs/omap_zoom3_defconfig  | 1605 +++
 arch/arm/mach-omap2/Kconfig|8 +
 arch/arm/mach-omap2/Makefile   |8 +
 arch/arm/mach-omap2/board-3630sdp.c|   96 ++
 arch/arm/mach-omap2/board-zoom-peripherals.c   |  403 +
 arch/arm/mach-omap2/board-zoom2.c  |  261 +---
 arch/arm/mach-omap2/board-zoom3.c  |   59 +
 arch/arm/mach-omap2/id.c   |2 +
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   52 +
 arch/arm/plat-omap/Kconfig |3 +
 arch/arm/plat-omap/include/plat/cpu.h  |7 +-
 arch/arm/plat-omap/include/plat/uncompress.h   |4 +-
 14 files changed, 4005 insertions(+), 340 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c
 create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h

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


[PATCH v2 2/8] omap: introduce OMAP_LL_DEBUG_NONE DEBUG_LL config

2009-11-10 Thread Vikram Pandita
Zoom2/Zoom3 kind of boards do not use omap uarts for console.
These use external debug board for console.

So these boards should not have Uncompressing Kernel
log put on omap uarts.

By interoducing OMAP_LL_DEBUG_NONE option,
unnecessary writes to omap uarts is avoided.

In future, the DEBUG_LL interface will be enhanced
to use external debug board.

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/plat-omap/Kconfig   |5 -
 arch/arm/plat-omap/include/plat/uncompress.h |6 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 64b3f52..f348ddf 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -165,7 +165,7 @@ config OMAP_DM_TIMER
 choice
prompt Low-level debug console UART
depends on ARCH_OMAP
-   default OMAP_LL_DEBUG_UART1
+   default OMAP_LL_DEBUG_NONE
 
 config OMAP_LL_DEBUG_UART1
bool UART1
@@ -176,6 +176,9 @@ config OMAP_LL_DEBUG_UART2
 config OMAP_LL_DEBUG_UART3
bool UART3
 
+config OMAP_LL_DEBUG_NONE
+   bool None
+
 endchoice
 
 config OMAP_SERIAL_WAKE
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h 
b/arch/arm/plat-omap/include/plat/uncompress.h
index e22f575..13c305d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -44,8 +44,12 @@ static void putc(int c)
uart = (volatile u8 *)(OMAP_UART3_BASE);
 #elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
uart = (volatile u8 *)(OMAP_UART2_BASE);
-#else
+#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
uart = (volatile u8 *)(OMAP_UART1_BASE);
+#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
+   return;
+#else
+   return;
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1
-- 
1.6.5.1.69.g36942

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


[PATCH v2 7/8] omap: 3630sdp: introduce 3630 sdp board support

2009-11-10 Thread Vikram Pandita
Add 3630SDP board support

The board shares the same peripherals as a zoom2 main.
So reuse the peripheral file of zoom platform.

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (persent on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

OMAP3630 details can be found here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123navigationId=12836contentId=52606

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/mach-omap2/Kconfig |4 ++
 arch/arm/mach-omap2/Makefile|3 +
 arch/arm/mach-omap2/board-3630sdp.c |  101 +++
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 9824775..83551a8 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,10 @@ config MACH_OMAP_ZOOM3
bool OMAP3630 Zoom3 board
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool OMAP3630 SDP board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP_4430SDP
bool OMAP 4430 SDP board
depends on ARCH_OMAP4
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 712e7fc..90cf2cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -79,6 +79,9 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
new file mode 100755
index 000..f0bc5c6
--- /dev/null
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/gpio.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/common.h
+#include plat/board.h
+#include plat/gpmc-smc91x.h
+#include plat/mux.h
+#include plat/usb.h
+
+#include sdram-hynix-h8mbx00u0mer-0em.h
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+
+static struct omap_smc91x_platform_data board_smc91x_data = {
+   .cs = 3,
+   .flags  = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
+};
+
+static void __init board_smc91x_init(void)
+{
+   board_smc91x_data.gpio_irq = 158;
+   gpmc_smc91x_init(board_smc91x_data);
+}
+
+#else
+
+static inline void board_smc91x_init(void)
+{
+}
+
+#endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
+
+static void enable_board_wakeup_source(void)
+{
+   omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
+}
+
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset  = true,
+   .reset_gpio_port[0]  = 126,
+   .reset_gpio_port[1]  = 61,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap_sdp_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel sdp_config[] __initdata = {
+};
+
+static void __init omap_sdp_init_irq(void)
+{
+   omap_board_config = sdp_config;
+   omap_board_config_size = ARRAY_SIZE(sdp_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_sdp_init(void)
+{
+   zoom_peripherals_init();
+   board_smc91x_init();
+   enable_board_wakeup_source();
+   

[PATCH v2 1/8] omap: 3630: update is_chip variable

2009-11-10 Thread Vikram Pandita
3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
arch/arm/mach-omap2/powerdomains34xx.h
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
Acked-by: Alexander Shishkin virtu...@slind.org
Acked-by: Ari Kauppi kau...@papupata.org
Acked-by: Nishanth Menon n...@ti.com
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/plat/cpu.h |7 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..189cf7a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err(Uninitialized omap_chip, please fix!\n);
}
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 7cb0556..05a0a33 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -454,6 +454,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1  4)
 #define CHIP_IS_OMAP3430ES3_0  (1  5)
 #define CHIP_IS_OMAP3430ES3_1  (1  6)
+#define CHIP_IS_OMAP3630ES1(1  7)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +466,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.1.69.g36942

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


[PATCH v2 4/8] omap: zoom2: update defconfig for LL_DEBUG_NONE

2009-11-10 Thread Vikram Pandita
Update DEBUG_LL for zoom2 board as CONFIG_OMAP_LL_DEBUG_NONE

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/configs/omap_zoom2_defconfig |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..2eec53b 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -202,7 +202,8 @@ CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_LL_DEBUG_UART1 is not set
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_LL_DEBUG_NONE=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
 
-- 
1.6.5.1.69.g36942

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


[PATCH v2 3/8] omap: zoom2: split board file for software reuse

2009-11-10 Thread Vikram Pandita
Split zoom2 board file into:
base board file and a board-zoom-peripherals.c file

that way the same peripherals file can be reused for: zoom3 and sdp3630

Following list shows the commonality across the three platforms and hence the
case for software reuse:

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (present on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/mach-omap2/Makefile |1 +
 arch/arm/mach-omap2/board-zoom-peripherals.c |  278 ++
 arch/arm/mach-omap2/board-zoom2.c|  247 +--
 3 files changed, 286 insertions(+), 240 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..4d66b42 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
   board-rx51-peripherals.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2.o \
+  board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
new file mode 100644
index 000..d872588
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * Modified from mach-omap2/board-zoom2.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/input/matrix_keypad.h
+#include linux/gpio.h
+#include linux/i2c/twl4030.h
+#include linux/regulator/machine.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include plat/common.h
+#include plat/usb.h
+
+#include mmc-twl4030.h
+
+/* Zoom2 has Qwerty keyboard*/
+static int zoom_board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1 User defined */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2 User defined */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3 User defined */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4 User defined */
+   0
+};
+
+static struct matrix_keymap_data zoom_board_map_data = {
+   .keymap = zoom_board_keymap,
+   .keymap_size= ARRAY_SIZE(zoom_board_keymap),
+};
+
+static struct twl4030_keypad_data zoom_kp_twl4030_data = {
+   .keymap_data= zoom_board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct twl4030_madc_platform_data zoom_madc_data = {
+   .irq_line   = 1,
+};
+
+static struct 

[PATCH v2 5/8] omap: zoom3: introduce zoom3 board support

2009-11-10 Thread Vikram Pandita
Zoom3 is the next versoin of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.
Zoom2 has OMAP34xx
Zoom3 has OMAP3630 [1]
Zoom3 = OMAP3630 SOM board [2] + same zoom2 main board [3] + same debugboard

Zoom3 has a SDRAM part from Hynix
Zoom2 had SDRAM part from micron

Hynix memory timings are contributed by:
Chalhoub, Nicole and Bour, Vincent

Reuse the zoom2 files as much for zoom3, as at board level,
there is no change at all.

References: (courtesy Nishant Menon)
[1] OMAP3630
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123navigationId=12836contentId=52606

[2] SOM boards
http://logicpd.com/products/system-modules/texas-instruments-omap35x-som-lv

[3] Zoom2 boards
http://logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp
OMAP3630:

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
Cc: Chalhoub, Nicole n-chalh...@ti.com
Cc: Bour, Vincent v-b...@ti.com
---
 arch/arm/mach-omap2/Kconfig|4 +
 arch/arm/mach-omap2/Makefile   |4 +
 arch/arm/mach-omap2/board-zoom3.c  |   60 
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   51 +
 4 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..9824775 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -101,6 +101,10 @@ config MACH_CM_T35
bool CompuLab CM-T35 module
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP_ZOOM3
+   bool OMAP3630 Zoom3 board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP_4430SDP
bool OMAP 4430 SDP board
depends on ARCH_OMAP4
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4d66b42..712e7fc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -75,6 +75,10 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2)+= 
board-zoom2.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_ZOOM3)  += board-zoom3.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o \
+  board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
new file mode 100644
index 000..b031eaa
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/gpio.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/common.h
+#include plat/board.h
+
+#include sdram-hynix-h8mbx00u0mer-0em.h
+
+static void __init omap_zoom_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel zoom_config[] __initdata = {
+};
+
+static void __init omap_zoom_init_irq(void)
+{
+   omap_board_config = zoom_config;
+   omap_board_config_size = ARRAY_SIZE(zoom_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern int __init omap_zoom2_debugboard_init(void);
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_zoom_init(void)
+{
+   zoom_peripherals_init();
+   omap_zoom2_debugboard_init();
+}
+
+MACHINE_START(OMAP_ZOOM3, OMAP Zoom3 board)
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xfa00)  18)  0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_zoom_map_io,
+   .init_irq   = omap_zoom_init_irq,
+   .init_machine   = omap_zoom_init,
+   .timer  = omap_timer,
+MACHINE_END
diff --git a/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h 
b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
new file mode 100644
index 000..8bfaf34
--- /dev/null
+++ b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
@@ -0,0 +1,51 @@
+/*
+ * SDRC register values for the Hynix H8MBX00U0MER-0EM
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it 

[PATCH v2 8/8] omap: 3630sdp: defconfig creation

2009-11-10 Thread Vikram Pandita
Create 3630sdp defconfig file

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/configs/omap_3630sdp_defconfig | 1606 +++
 1 files changed, 1606 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig

diff --git a/arch/arm/configs/omap_3630sdp_defconfig 
b/arch/arm/configs/omap_3630sdp_defconfig
new file mode 100644
index 000..eb96b1a
--- /dev/null
+++ b/arch/arm/configs/omap_3630sdp_defconfig
@@ -0,0 +1,1606 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 14:18:44 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# 

[PATCH v2 6/8] omap: zoom3: defconfig creation

2009-11-10 Thread Vikram Pandita
Create zoom3 defconfig file

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/configs/omap_zoom3_defconfig | 1605 +
 1 files changed, 1605 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig

diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
new file mode 100644
index 000..989cedd
--- /dev/null
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -0,0 +1,1605 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 09:50:40 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# 

[RFC PATCH v2 1/3] input:misc:driver support for Kionix kxte9 accelerometer

2009-11-10 Thread chudson
From: Chris Hudson chud...@kionix.com

This is a request for comments regarding adding driver support for the Kionix 
KXTE9 digital tri-axis accelerometer.  This part features built-in tilt 
position (orientation), wake-up and back-to-sleep algorithms, which can trigger 
a user-configurable physical interrupt.  The driver uses i2c for device 
communication, a misc node for IOCTLs, and input nodes for reporting 
acceleration data and interrupt status information.  Moved to 
drivers/input/misc after discussion on linux-omap mailing list.

Signed-off-by: Chris Hudson chud...@kionix.com
---
 drivers/input/misc/Kconfig  |   11 +
 drivers/input/misc/Makefile |1 +
 drivers/input/misc/kxte9.c  |  980 +++
 include/linux/kxte9.h   |   95 +
 4 files changed, 1087 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/misc/kxte9.c
 create mode 100644 include/linux/kxte9.h

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index a9bb254..a9f957d 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -317,4 +317,15 @@ config INPUT_PCAP
  To compile this driver as a module, choose M here: the
  module will be called pcap_keys.
 
+config INPUT_KXTE9
+   tristate Kionix KXTE9 tri-axis digital accelerometer
+   depends on I2C  SYSFS
+   help
+ If you say yes here you get support for the Kionix KXTE9 digital
+ tri-axis accelerometer.
+
+ This driver can also be built as a module.  If so, the module
+ will be called kxte9.
+
+
 endif
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index a8b8485..010d19b 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_INPUT_DM355EVM)  += dm355evm_keys.o
 obj-$(CONFIG_HP_SDC_RTC)   += hp_sdc_rtc.o
 obj-$(CONFIG_INPUT_IXP4XX_BEEPER)  += ixp4xx-beeper.o
 obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o
+obj-$(CONFIG_SENSORS_KXTE9)+= kxte9.o
 obj-$(CONFIG_INPUT_M68K_BEEP)  += m68kspkr.o
 obj-$(CONFIG_INPUT_PCAP)   += pcap_keys.o
 obj-$(CONFIG_INPUT_PCF50633_PMU)   += pcf50633-input.o
diff --git a/drivers/input/misc/kxte9.c b/drivers/input/misc/kxte9.c
new file mode 100644
index 000..d470f02
--- /dev/null
+++ b/drivers/input/misc/kxte9.c
@@ -0,0 +1,980 @@
+/*
+ * Copyright (C) 2009 Kionix, Inc.
+ * Written by Chris Hudson chud...@kionix.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA
+ */
+
+#include linux/err.h
+#include linux/errno.h
+#include linux/delay.h
+#include linux/fs.h
+#include linux/i2c.h
+#include linux/input.h
+#include linux/input-polldev.h
+#include linux/miscdevice.h
+#include linux/uaccess.h
+#include linux/workqueue.h
+#include linux/irq.h
+#include linux/gpio.h
+#include linux/interrupt.h
+#include linux/kxte9.h
+
+#define NAME   kxte9
+#define G_MAX  2000
+/* OUTPUT REGISTERS */
+#define XOUT   0x12
+#define INT_STATUS_REG 0x16
+#define INT_SRC_REG2   0x17
+#define TILT_POS_CUR   0x10
+#define TILT_POS_PRE   0x11
+#define INT_REL0x1A
+/* CONTROL REGISTERS */
+#define CTRL_REG1  0x1B
+#define CTRL_REG3  0x1D
+#define INT_CTRL1  0x1E
+#define TILT_TIMER 0x28
+#define WUF_TIMER  0x29
+#define B2S_TIMER  0x2A
+#define WUF_THRESH 0x5A
+#define B2S_THRESH 0x5B
+/* CONTROL REGISTER 1 BITS */
+#define PC1_OFF0x00
+#define PC1_ON 0x80
+/* INTERRUPT SOURCE 1 BITS */
+#define TPS0x01
+#define WUFS   0x02
+#define B2SS   0x04
+/* INPUT_ABS CONSTANTS */
+#define FUZZ   32
+#define FLAT   32
+#define I2C_RETRY_DELAY5
+#define I2C_RETRIES5
+/* RESUME STATE INDICES */
+#define RES_CTRL_REG1  0
+#define RES_CTRL_REG3  1
+#define RES_INT_CTRL1  2
+#define RES_TILT_TIMER 3
+#define RES_WUF_TIMER  4
+#define RES_B2S_TIMER  5
+#define RES_WUF_THRESH 6
+#define RES_B2S_THRESH 7
+#define RES_INTERVAL   8
+#define RES_CURRENT_ODR9
+#define 

[RFC PATCH v2 3/3] mach-omap2:kxte9 accelerometer mux support for OMAP ZoomII

2009-11-10 Thread chudson
From: Chris Hudson chud...@kionix.com

This patch alters mux.c and mux.h to allow gpio configuration in support of the 
kxte9 accelerometer on the OMAP ZoomII platform.

Signed-off-by: Chris Hudson chud...@kionix.com
---
 arch/arm/mach-omap2/mux.c |2 ++
 arch/arm/plat-omap/include/plat/mux.h |1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 32c953e..1158315 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -486,6 +486,8 @@ MUX_CFG_34XX(AF5_34XX_GPIO142, 0x170,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
 MUX_CFG_34XX(AE5_34XX_GPIO143, 0x172,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
+MUX_CFG_34XX(Y21_34XX_GPIO156, 0x18c,
+   OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
 MUX_CFG_34XX(H19_34XX_GPIO164_OUT, 0x19c,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
 MUX_CFG_34XX(J25_34XX_GPIO170, 0x1c6,
diff --git a/arch/arm/plat-omap/include/plat/mux.h 
b/arch/arm/plat-omap/include/plat/mux.h
index f3c1d8a..c17905a 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -803,6 +803,7 @@ enum omap34xx_index {
AE6_34XX_GPIO141,
AF5_34XX_GPIO142,
AE5_34XX_GPIO143,
+   Y21_34XX_GPIO156,
H19_34XX_GPIO164_OUT,
J25_34XX_GPIO170,
 
-- 
1.5.4.3

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


Re: [PATCH 1/3] [OMAP] htcherald: Add board support and LCD for HTC Herald

2009-11-10 Thread Tony Lindgren
Hi,

Tried adding this to omap for-next, can you please refresh
and repost the whole series against current omap for-next branch?

Also few minor comments below.

* Cory Maccarrone darkstar6...@gmail.com [091004 14:21]:
 This patch introduces support for the HTC Herald (T-Mobile
 Wing, etc.) series of smart phones -- board support and LCD
 panel settings.
 
 Signed-off-by: Cory Maccarrone darkstar6...@gmail.com
 ---
  arch/arm/mach-omap1/board-htcherald.c |  246 
 +
  drivers/video/omap/lcd_htcherald.c|  129 +
  2 files changed, 375 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/mach-omap1/board-htcherald.c
  create mode 100644 drivers/video/omap/lcd_htcherald.c
 
 diff --git a/arch/arm/mach-omap1/board-htcherald.c
 b/arch/arm/mach-omap1/board-htcherald.c
 new file mode 100644
 index 000..e21cf9a
 --- /dev/null
 +++ b/arch/arm/mach-omap1/board-htcherald.c
 @@ -0,0 +1,246 @@
 +/*
 + * HTC Herald board configuration
 + * Copyright (C) 2009 Cory Maccarrone darkstar6...@gmail.com
 + * Copyright (C) 2009 Wing Linux
 + *
 + * Based on the board-htcwizard.c file from the linwizard project:
 + * Copyright (C) 2006 Unai Uribarri
 + * Copyright (C) 2008 linwizard.sourceforge.net
 + *
 + * This  program is  free  software; you  can  redistribute it  and/or
 + * modify  it under the  terms of  the GNU  General Public  License as
 + * published by the Free Software  Foundation; either version 2 of the
 + * License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful, but
 + * WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
 + * MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
 + * General Public License for more details.
 + *
 + * You should have  received a copy of the  GNU General Public License
 + * along  with  this program;  if  not,  write  to the  Free  Software
 + * Foundation,  Inc.,  51 Franklin  Street,  Fifth  Floor, Boston,  MA
 + * 02110-1301, USA.
 + *
 + */
 +
 +#include linux/kernel.h
 +#include linux/init.h
 +#include linux/platform_device.h
 +#include linux/input.h
 +#include linux/bootmem.h
 +
 +#include asm/mach-types.h
 +#include asm/mach/arch.h
 +#include asm/mach/map.h
 +#include mach/omap7xx.h
 +#include asm/page.h
 +#include asm/memory.h
 +#include mach/common.h
 +#include mach/board.h
 +
 +#include mach/io.h
 +#include mach/irqs.h
 +#include mach/gpio.h
 +#include mach/keypad.h

Please use linux/io.h and linux/gpio.h.


 +
 +#include linux/delay.h
 +
 +/* LCD register definition */
 +#define   OMAP_LCDC_CONTROL   (0xfffec000 + 0x00)
 +#define   OMAP_LCDC_STATUS(0xfffec000 + 0x10)
 +#define   OMAP_DMA_LCD_CCR(0xfffee300 + 0xc2)
 +#define   OMAP_DMA_LCD_CTRL   (0xfffee300 + 0xc4)
 +#define   OMAP_LCDC_CTRL_LCD_EN   (1  0)
 +#define   OMAP_LCDC_STAT_DONE (1  0)
 +
 +static struct omap_lcd_config htcherald_lcd_config __initdata = {
 + .ctrl_name  = internal,
 +};
 +
 +static struct omap_board_config_kernel htcherald_config[] __initdata =
 +{
 + { OMAP_TAG_LCD, htcherald_lcd_config },
 +};
 +
 +/* Keyboard definition */
 +
 +static int htc_herald_keymap[] = {
 + KEY(0,0,KEY_RECORD), /* Mail button */
 + KEY(0,1,KEY_CAMERA), /* Camera */
 + KEY(0,2,KEY_PHONE), /* Send key */
 + KEY(0,3,KEY_VOLUMEUP), /* Volume up */
 + KEY(0,4,KEY_F2),  /* Right bar (landscape) */
 + KEY(0,5,KEY_MAIL), /* Win key (portrait) */
 + KEY(0,6,KEY_DIRECTORY), /* Right bar (protrait) */
 + KEY(1,0,KEY_LEFTCTRL), /* Windows key */
 + KEY(1,1,KEY_COMMA),
 + KEY(1,2,KEY_M),
 + KEY(1,3,KEY_K),
 + KEY(1,4,KEY_SLASH), /* OK key */
 + KEY(1,5,KEY_I),
 + KEY(1,6,KEY_U),
 + KEY(2,0,KEY_LEFTALT),
 + KEY(2,1,KEY_TAB),
 + KEY(2,2,KEY_N),
 + KEY(2,3,KEY_J),
 + KEY(2,4,KEY_ENTER),
 + KEY(2,5,KEY_H),
 + KEY(2,6,KEY_Y),
 + KEY(3,0,KEY_SPACE),
 + KEY(3,1,KEY_L),
 + KEY(3,2,KEY_B),
 + KEY(3,3,KEY_V),
 + KEY(3,4,KEY_BACKSPACE),
 + KEY(3,5,KEY_G),
 + KEY(3,6,KEY_T),
 + KEY(4,0,KEY_CAPSLOCK), /* Shift */
 + KEY(4,1,KEY_C),
 + KEY(4,2,KEY_F),
 + KEY(4,3,KEY_R),
 + KEY(4,4,KEY_O),
 + KEY(4,5,KEY_E),
 + KEY(4,6,KEY_D),
 + KEY(5,0,KEY_X),
 + KEY(5,1,KEY_Z),
 + KEY(5,2,KEY_S),
 + KEY(5,3,KEY_W),
 + KEY(5,4,KEY_P),
 + KEY(5,5,KEY_Q),
 + KEY(5,6,KEY_A),
 + KEY(6,0,KEY_CONNECT), /* Voice button */
 + KEY(6,2,KEY_CANCEL), /* End key */
 + KEY(6,3,KEY_VOLUMEDOWN), /* Volume down */
 + KEY(6,4,KEY_F1), /* Left bar (landscape) */
 + KEY(6,5,KEY_WWW), /* OK button (portrait) */
 + KEY(6,6,KEY_CALENDAR), /* Left bar (portrait) */
 + 0
 +};
 +
 +struct omap_kp_platform_data htcherald_kp_data = {
 + .rows   = 7,
 + .cols   = 7,
 + .delay = 20,
 + .rep = 1,
 + .keymap = 

Re: [PATCH] OMAP1: PM: Fix omapfb/lcd on Amstrad Delta broken when PM set

2009-11-10 Thread Janusz Krzysztofik
Tuesday 10 November 2009 11:50:52 Paul Walmsley napisał(a):
 Hello Janusz et al,

 On Fri, 30 Oct 2009, Janusz Krzysztofik wrote:
  More looking at it, I found that might be omap_dma_running() from
  arch/arm/plat-omap/dma.c that needs correction. It already checks for LCD
  dma running for OMAP1610, but does nothing similiar for 1510. I have
  revisited http://focus.ti.com/lit/ug/spru674/spru674.pdf, but found no
  hint how to do that in a 1610 similiar way.

 Speaking of this code, here's a project suggestion if someone has some
 spare time.  All of the LCD DMA code in plat-omap/dma.c appears to be
 OMAP1-only (and apparently only is available on a subset of OMAP1 chips).
 It would be great if this code could be moved to mach-omap1/lcd_dma.c or
 a similar place.

Paul,

Thank you for putting me into right direction (I hope :-)). If there are no 
more comments, I'll try to take care of what you suggest after the situation 
with my pending patches AND Tomi Valkeinen's DSS2 patch series, that both 
more or less fiddle with LCD DMA related files, gets clear.

Thanks,
Janusz
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] omap_udc fixes for omap7xx

2009-11-10 Thread Tony Lindgren
* Cory Maccarrone darkstar6...@gmail.com [091005 07:51]:
 The following four patches patch the OMAP UDC subsystem to allow
 omap7xx-based systems to operate with USB in client mode.
 
 Cory Maccarrone (4):
   [OMAP] Clocks: Add omap7xx-specific USB clock configuration
   [OMAP] omap_udc: Updates for omap7xx IRQs and config
   [OMAP] omap_udc: Add clocking and disable vbus sense for omap7xx
   [OMAP1] Make ARCH_OMAP850 select ARCH_OMAP_OTG
 
  arch/arm/mach-omap1/Kconfig   |1 +
  arch/arm/mach-omap1/clock.c   |3 ++-
  arch/arm/mach-omap1/clock.h   |   10 ++
  arch/arm/plat-omap/usb.c  |   20 ++--
  drivers/usb/gadget/omap_udc.c |   19 +--

Pushing these as a single patch to omap for-next today. Please
check and patch as needed.

BTW, had to unwrap some of these manually..

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP7XX] Add missing clocks for MMC

2009-11-10 Thread Tony Lindgren
* Cory Maccarrone darkstar6...@gmail.com [091003 15:09]:
 The omap730 and omap850 both use a different clock for the fck
 clock of the MMC interface than other omap processors based on the
 SOFT_REQ_REG, pin 12.  The ick clock is the same as that used
 by other omap processors.
 
 * Added the missing clock definition as mmc3_ck to clock.h
 * Added the clock definition to omap_clks in clock.c
 * Added CK_7XX to the mmci-omap.0 ick clock already in clock.c
 
 With this change, it is now possible to initialize and use MMC
 cards with omap730 and omap850 devices.

Pushing all the 7xx mmc platform init code as a single patch to
for-next today. Can you please check?

The drivers/mmc/host/omap.c patch you need to get merged via
linux-...@vger.kernel.org list :)

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/8] omap: zoom2: split board file for software reuse

2009-11-10 Thread Tony Lindgren
* Vikram Pandita vikram.pand...@ti.com [091110 14:48]:
 Split zoom2 board file into:
 base board file and a board-zoom-peripherals.c file
 
 that way the same peripherals file can be reused for: zoom3 and sdp3630
 
 Following list shows the commonality across the three platforms and hence the
 case for software reuse:
 
 Peripheralzoom2zoom3  sdp3630
 ---
 Ethernetsmscsmscsmc
 NOR n/a n/a B
 Onenand n/a n/a B
 HDMIA   A   B (present on different i2c)
 NANDA   A   A (same nand)
 SDRAM   A   A   A (same sdram)
 Keypad  A   A   A (same twl)
 Camera  A   A   A (same sensor can be mounted)
 LCD Display A   A   A (same wvga display)
 OPPsA   A   A (same chip feature)
 Audio   A   A   A (same audio via twl5030)

Thanks for pulling together all the 3630 patches!

Can you please do this one in two steps:

1. Move the existing functions to board-zoom-peripherals.c without
   renaming or changing anything except minimal changes to compile.

2. Do the desired renames and changes.

Then resend the patches using -M option for git to detect renames ;)

That way it will be easy for everybody to see what exactly got
changed.

Regards,

Tony


 
 Signed-off-by: Vikram Pandita vikram.pand...@ti.com
 ---
  arch/arm/mach-omap2/Makefile |1 +
  arch/arm/mach-omap2/board-zoom-peripherals.c |  278 
 ++
  arch/arm/mach-omap2/board-zoom2.c|  247 +--
  3 files changed, 286 insertions(+), 240 deletions(-)
  create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c
 
 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
 index 03cb4fc..4d66b42 100644
 --- a/arch/arm/mach-omap2/Makefile
 +++ b/arch/arm/mach-omap2/Makefile
 @@ -72,6 +72,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51)   += board-rx51.o 
 \
  board-rx51-peripherals.o \
  mmc-twl4030.o
  obj-$(CONFIG_MACH_OMAP_ZOOM2)+= board-zoom2.o \
 +board-zoom-peripherals.o \
  mmc-twl4030.o \
  board-zoom-debugboard.o
  obj-$(CONFIG_MACH_CM_T35)+= board-cm-t35.o \
 diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
 b/arch/arm/mach-omap2/board-zoom-peripherals.c
 new file mode 100644
 index 000..d872588
 --- /dev/null
 +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
 @@ -0,0 +1,278 @@
 +/*
 + * Copyright (C) 2009 Texas Instruments Inc.
 + *
 + * Modified from mach-omap2/board-zoom2.c
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + */
 +
 +#include linux/kernel.h
 +#include linux/init.h
 +#include linux/platform_device.h
 +#include linux/input.h
 +#include linux/input/matrix_keypad.h
 +#include linux/gpio.h
 +#include linux/i2c/twl4030.h
 +#include linux/regulator/machine.h
 +
 +#include asm/mach-types.h
 +#include asm/mach/arch.h
 +#include asm/mach/map.h
 +
 +#include plat/common.h
 +#include plat/usb.h
 +
 +#include mmc-twl4030.h
 +
 +/* Zoom2 has Qwerty keyboard*/
 +static int zoom_board_keymap[] = {
 + KEY(0, 0, KEY_E),
 + KEY(1, 0, KEY_R),
 + KEY(2, 0, KEY_T),
 + KEY(3, 0, KEY_HOME),
 + KEY(6, 0, KEY_I),
 + KEY(7, 0, KEY_LEFTSHIFT),
 + KEY(0, 1, KEY_D),
 + KEY(1, 1, KEY_F),
 + KEY(2, 1, KEY_G),
 + KEY(3, 1, KEY_SEND),
 + KEY(6, 1, KEY_K),
 + KEY(7, 1, KEY_ENTER),
 + KEY(0, 2, KEY_X),
 + KEY(1, 2, KEY_C),
 + KEY(2, 2, KEY_V),
 + KEY(3, 2, KEY_END),
 + KEY(6, 2, KEY_DOT),
 + KEY(7, 2, KEY_CAPSLOCK),
 + KEY(0, 3, KEY_Z),
 + KEY(1, 3, KEY_KPPLUS),
 + KEY(2, 3, KEY_B),
 + KEY(3, 3, KEY_F1),
 + KEY(6, 3, KEY_O),
 + KEY(7, 3, KEY_SPACE),
 + KEY(0, 4, KEY_W),
 + KEY(1, 4, KEY_Y),
 + KEY(2, 4, KEY_U),
 + KEY(3, 4, KEY_F2),
 + KEY(4, 4, KEY_VOLUMEUP),
 + KEY(6, 4, KEY_L),
 + KEY(7, 4, KEY_LEFT),
 + KEY(0, 5, KEY_S),
 + KEY(1, 5, KEY_H),
 + KEY(2, 5, KEY_J),
 + KEY(3, 5, KEY_F3),
 + KEY(5, 5, KEY_VOLUMEDOWN),
 + KEY(6, 5, KEY_M),
 + KEY(4, 5, KEY_ENTER),
 + KEY(7, 5, KEY_RIGHT),
 + KEY(0, 6, KEY_Q),
 + KEY(1, 6, KEY_A),
 + KEY(2, 6, KEY_N),
 + KEY(3, 6, KEY_BACKSPACE),
 + KEY(6, 6, KEY_P),
 + KEY(7, 6, KEY_UP),
 + KEY(6, 7, KEY_SELECT),
 + KEY(7, 7, KEY_DOWN),
 + KEY(0, 7, KEY_PROG1),   /*MACRO 1 User defined */
 + KEY(1, 7, KEY_PROG2),   /*MACRO 2 User defined */
 + KEY(2, 7, KEY_PROG3),   /*MACRO 3 User defined */
 + KEY(3, 7, KEY_PROG4),   /*MACRO 4 User defined */
 + 

[APPLIED] [PATCH v2 1/8] omap: 3630: update is_chip variable

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 4d2b130c190627af16cb7b9961da037436ad6d36

PatchWorks
http://patchwork.kernel.org/patch/59199/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=4d2b130c190627af16cb7b9961da037436ad6d36


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


[APPLIED] [PATCH v2 2/8] omap: introduce OMAP_LL_DEBUG_NONE DEBUG_LL config

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 6c6b4924e24051c432259f3ee917cd08aabdc0ec

PatchWorks
http://patchwork.kernel.org/patch/59197/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=6c6b4924e24051c432259f3ee917cd08aabdc0ec


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


[APPLIED] [PATCH] omap3: Fix macro definitions

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): d298760e4faf8112f2adb47b6b60144f8049f3b1

PatchWorks
http://patchwork.kernel.org/patch/56283/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=d298760e4faf8112f2adb47b6b60144f8049f3b1


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


[APPLIED] [PATCH v2] AM35xx: Runtime detection of the device

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 81200e4520967f1ffd3df0b2875eacdc6042666f

PatchWorks
http://patchwork.kernel.org/patch/56289/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=81200e4520967f1ffd3df0b2875eacdc6042666f


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


[APPLIED] [PATCH] AM35xx: Initialize omap_chip bits

2009-11-10 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): be8f758c7ea40290790af0514632c00389f9f1a8

PatchWorks
http://patchwork.kernel.org/patch/58948/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=be8f758c7ea40290790af0514632c00389f9f1a8


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


[PATCH 0/8] Omap fixes for v2.6.32-rc6

2009-11-10 Thread Tony Lindgren
Hi all,

Here are still few more fixes for review for the current -rc series.

Regards,

Tony

---

Grazvydas Ignotas (2):
  omap: update Pandora defconfig
  omap3: pandora: Fix keypad keymap

Janusz Krzysztofik (1):
  omap1: Amstrad Delta defconfig fixes

Jarkko Nikula (1):
  omap3: beagle: Fix USB host port power control

Mike Turquette (1):
  omap3: Decrease cpufreq transition latency

Sergio Aguirre (1):
  omap3: 3430sdp: Enable Linux Regulator framework

Tao Hu (1):
  omap: Fix race condition in omap dma driver

Tobias Klauser (1):
  omap: Use resource_size


 arch/arm/configs/ams_delta_defconfig |   24 +++--
 arch/arm/configs/omap3_pandora_defconfig |   49 +--
 arch/arm/configs/omap_3430sdp_defconfig  |9 +++
 arch/arm/mach-omap2/board-omap3beagle.c  |2 -
 arch/arm/mach-omap2/board-omap3pandora.c |   78 +++---
 arch/arm/mach-omap2/gpmc.c   |2 -
 arch/arm/mach-omap2/mailbox.c|2 -
 arch/arm/plat-omap/cpu-omap.c|2 -
 arch/arm/plat-omap/dma.c |6 ++
 9 files changed, 118 insertions(+), 56 deletions(-)

-- 
Signature
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/8] omap: Fix race condition in omap dma driver

2009-11-10 Thread Tony Lindgren
From: Tao Hu ta...@motorola.com

The bug could cause irq enable bit of one DMA channel is
cleared/set unexpectedly when 2 (or more) drivers are calling
omap_request_dma()/omap_free_dma() simultaneously

Signed-off-by: Fei Yang afy...@motorola.com
Signed-off-by: Tao Hu ta...@motorola.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/dma.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index b53125f..02ed945 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -691,13 +691,16 @@ static inline void disable_lnk(int lch)
 static inline void omap2_enable_irq_lch(int lch)
 {
u32 val;
+   unsigned long flags;
 
if (!cpu_class_is_omap2())
return;
 
+   spin_lock_irqsave(dma_chan_lock, flags);
val = dma_read(IRQENABLE_L0);
val |= 1  lch;
dma_write(val, IRQENABLE_L0);
+   spin_unlock_irqrestore(dma_chan_lock, flags);
 }
 
 int omap_request_dma(int dev_id, const char *dev_name,
@@ -799,10 +802,13 @@ void omap_free_dma(int lch)
 
if (cpu_class_is_omap2()) {
u32 val;
+
+   spin_lock_irqsave(dma_chan_lock, flags);
/* Disable interrupts */
val = dma_read(IRQENABLE_L0);
val = ~(1  lch);
dma_write(val, IRQENABLE_L0);
+   spin_unlock_irqrestore(dma_chan_lock, flags);
 
/* Clear the CSR register and IRQ status register */
dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR(lch));

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


[PATCH 2/8] omap: Use resource_size

2009-11-10 Thread Tony Lindgren
From: Tobias Klauser tklau...@distanz.ch

Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors
and actually fixes one in mailbox.c.

Signed-off-by: Tobias Klauser tklau...@distanz.ch
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/gpmc.c|2 +-
 arch/arm/mach-omap2/mailbox.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 1587682..f865756 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -366,7 +366,7 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned 
long *base)
if (r  0)
goto out;
 
-   gpmc_cs_enable_mem(cs, res-start, res-end - res-start + 1);
+   gpmc_cs_enable_mem(cs, res-start, resource_size(res));
*base = res-start;
gpmc_cs_set_reserved(cs, 1);
 out:
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index c035ad3..ef57b38 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -300,7 +300,7 @@ static int __devinit omap2_mbox_probe(struct 
platform_device *pdev)
dev_err(pdev-dev, invalid mem resource\n);
return -ENODEV;
}
-   mbox_base = ioremap(res-start, res-end - res-start);
+   mbox_base = ioremap(res-start, resource_size(res));
if (!mbox_base)
return -ENOMEM;
 

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


[PATCH 3/8] omap1: Amstrad Delta defconfig fixes

2009-11-10 Thread Tony Lindgren
From: Janusz Krzysztofik jkrz...@tis.icnet.pl

The patch provides the following fixes:

- keep kernel small enough to boot with standard tools,
- ensure compatibility with both new and legacy distros,
- turn on support for recently added or fixed hardware features.

Created and tested against linux-2.6.32-rc5.

Signed-off-by: Janusz Krzysztofik jkrz...@tis.icnet.pl
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/ams_delta_defconfig |   24 +---
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/arch/arm/configs/ams_delta_defconfig 
b/arch/arm/configs/ams_delta_defconfig
index 7647325..e8f7380 100644
--- a/arch/arm/configs/ams_delta_defconfig
+++ b/arch/arm/configs/ams_delta_defconfig
@@ -55,10 +55,10 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
+CONFIG_EMBEDDED=y
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS is not set
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_HOTPLUG=y
@@ -224,7 +224,7 @@ CONFIG_CPU_CP15_MMU=y
 #
 # Processor Features
 #
-# CONFIG_ARM_THUMB is not set
+CONFIG_ARM_THUMB=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 # CONFIG_CPU_DCACHE_DISABLE is not set
 CONFIG_CPU_DCACHE_WRITETHROUGH=y
@@ -248,7 +248,7 @@ CONFIG_CPU_DCACHE_WRITETHROUGH=y
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_PREEMPT=y
 CONFIG_HZ=100
-# CONFIG_AEABI is not set
+CONFIG_AEABI=y
 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -299,7 +299,9 @@ CONFIG_BINFMT_ELF=y
 #
 # Power management options
 #
-# CONFIG_PM is not set
+CONFIG_PM=y
+# CONFIG_SUSPEND is not set
+CONFIG_PM_RUNTIME=y
 
 #
 # Networking
@@ -670,7 +672,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_EVBUG is not set
 
 #
@@ -784,6 +786,7 @@ CONFIG_I2C_OMAP=y
 #
 # CONFIG_SPI is not set
 # CONFIG_SPI_MASTER is not set
+CONFIG_GPIO_SYSFS=y
 
 #
 # Dallas's 1-wire bus
@@ -820,6 +823,7 @@ CONFIG_LEDS_AMS_DELTA=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 
 #
 # Multimedia devices
@@ -896,7 +900,13 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_AMS_DELTA=y
 
 #
 # HID Devices

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


[PATCH 4/8] omap3: pandora: Fix keypad keymap

2009-11-10 Thread Tony Lindgren
From: Grazvydas Ignotas nota...@gmail.com

The original TWL4030 keypad driver from linux-omap used KEY()
macro defined as (col, row), but while it was merged upstream
it was changed to use matrix keypad infrastructure, which uses
(row, col) format. Update the keymap in board file to match
layout of mainline driver.

Signed-off-by: Grazvydas Ignotas nota...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-omap3pandora.c |   78 +++---
 1 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 5326e0d..7519edb 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -134,50 +134,50 @@ static void __init pandora_keys_gpio_init(void)
 }
 
 static int board_keymap[] = {
-   /* col, row, code */
+   /* row, col, code */
KEY(0, 0, KEY_9),
-   KEY(0, 1, KEY_0),
-   KEY(0, 2, KEY_BACKSPACE),
-   KEY(0, 3, KEY_O),
-   KEY(0, 4, KEY_P),
-   KEY(0, 5, KEY_K),
-   KEY(0, 6, KEY_L),
-   KEY(0, 7, KEY_ENTER),
-   KEY(1, 0, KEY_8),
+   KEY(0, 1, KEY_8),
+   KEY(0, 2, KEY_I),
+   KEY(0, 3, KEY_J),
+   KEY(0, 4, KEY_N),
+   KEY(0, 5, KEY_M),
+   KEY(1, 0, KEY_0),
KEY(1, 1, KEY_7),
-   KEY(1, 2, KEY_6),
-   KEY(1, 3, KEY_5),
-   KEY(1, 4, KEY_4),
-   KEY(1, 5, KEY_3),
-   KEY(1, 6, KEY_2),
-   KEY(1, 7, KEY_1),
-   KEY(2, 0, KEY_I),
-   KEY(2, 1, KEY_U),
+   KEY(1, 2, KEY_U),
+   KEY(1, 3, KEY_H),
+   KEY(1, 4, KEY_B),
+   KEY(1, 5, KEY_SPACE),
+   KEY(2, 0, KEY_BACKSPACE),
+   KEY(2, 1, KEY_6),
KEY(2, 2, KEY_Y),
-   KEY(2, 3, KEY_T),
-   KEY(2, 4, KEY_R),
-   KEY(2, 5, KEY_E),
-   KEY(2, 6, KEY_W),
-   KEY(2, 7, KEY_Q),
-   KEY(3, 0, KEY_J),
-   KEY(3, 1, KEY_H),
-   KEY(3, 2, KEY_G),
+   KEY(2, 3, KEY_G),
+   KEY(2, 4, KEY_V),
+   KEY(2, 5, KEY_FN),
+   KEY(3, 0, KEY_O),
+   KEY(3, 1, KEY_5),
+   KEY(3, 2, KEY_T),
KEY(3, 3, KEY_F),
-   KEY(3, 4, KEY_D),
-   KEY(3, 5, KEY_S),
-   KEY(3, 6, KEY_A),
-   KEY(3, 7, KEY_LEFTSHIFT),
-   KEY(4, 0, KEY_N),
-   KEY(4, 1, KEY_B),
-   KEY(4, 2, KEY_V),
-   KEY(4, 3, KEY_C),
+   KEY(3, 4, KEY_C),
+   KEY(4, 0, KEY_P),
+   KEY(4, 1, KEY_4),
+   KEY(4, 2, KEY_R),
+   KEY(4, 3, KEY_D),
KEY(4, 4, KEY_X),
-   KEY(4, 5, KEY_Z),
-   KEY(4, 6, KEY_DOT),
-   KEY(4, 7, KEY_COMMA),
-   KEY(5, 0, KEY_M),
-   KEY(5, 1, KEY_SPACE),
-   KEY(5, 2, KEY_FN),
+   KEY(5, 0, KEY_K),
+   KEY(5, 1, KEY_3),
+   KEY(5, 2, KEY_E),
+   KEY(5, 3, KEY_S),
+   KEY(5, 4, KEY_Z),
+   KEY(6, 0, KEY_L),
+   KEY(6, 1, KEY_2),
+   KEY(6, 2, KEY_W),
+   KEY(6, 3, KEY_A),
+   KEY(6, 4, KEY_DOT),
+   KEY(7, 0, KEY_ENTER),
+   KEY(7, 1, KEY_1),
+   KEY(7, 2, KEY_Q),
+   KEY(7, 3, KEY_LEFTSHIFT),
+   KEY(7, 4, KEY_COMMA),
 };
 
 static struct matrix_keymap_data board_map_data = {

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


[PATCH 5/8] omap3: beagle: Fix USB host port power control

2009-11-10 Thread Tony Lindgren
From: Jarkko Nikula jhnik...@gmail.com

The host port power is enabled by driving the nEN_USB_PWR low as stated in
the comment. This fix is originally from Steve Sakoman st...@sakoman.com.

Signed-off-by: Jarkko Nikula jhnik...@gmail.com
Cc: Steve Sakoman st...@sakoman.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-omap3beagle.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 70df6b4..08b0816 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -162,7 +162,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
 
/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
gpio_request(gpio + TWL4030_GPIO_MAX, nEN_USB_PWR);
-   gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+   gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;

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


[PATCH 6/8] omap3: 3430sdp: Enable Linux Regulator framework

2009-11-10 Thread Tony Lindgren
From: Sergio Aguirre saagui...@ti.com

Some drivers have dependencies on this, and therefore should be
enabled.

Signed-off-by: Sergio Aguirre saagui...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/omap_3430sdp_defconfig |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
b/arch/arm/configs/omap_3430sdp_defconfig
index 8a4a7e2..5a305f0 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -1703,7 +1703,14 @@ CONFIG_RTC_DRV_TWL4030=y
 # on-CPU RTC drivers
 #
 # CONFIG_DMADEVICES is not set
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 

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


[PATCH 7/8] omap: update Pandora defconfig

2009-11-10 Thread Tony Lindgren
From: Grazvydas Ignotas nota...@gmail.com

This patch updates defconfig to enable options needed to properly
boot OMAP3 pandora board. It also enables MMC, OTG, GPIO LEDs,
TWL4030 GPIO and sound drivers.

Signed-off-by: Grazvydas Ignotas nota...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/omap3_pandora_defconfig |   49 +++---
 1 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/arch/arm/configs/omap3_pandora_defconfig 
b/arch/arm/configs/omap3_pandora_defconfig
index b54ad2e..150deaf 100644
--- a/arch/arm/configs/omap3_pandora_defconfig
+++ b/arch/arm/configs/omap3_pandora_defconfig
@@ -611,7 +611,7 @@ CONFIG_INPUT_KEYBOARD=y
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
 # CONFIG_KEYBOARD_STOWAWAY is not set
-# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_GPIO=y
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
@@ -634,7 +634,8 @@ CONFIG_TOUCHSCREEN_ADS7846=y
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
-# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_TWL4030_PWRBUTTON=y
 
 #
 # Hardware I/O ports
@@ -834,7 +835,29 @@ CONFIG_DAB=y
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_JACK=y
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DRIVERS=y
+CONFIG_SND_USB=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SOC_TWL4030=y
+
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
@@ -1020,7 +1043,13 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_SPI is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_HCTOSYS=y
@@ -1084,9 +1113,12 @@ CONFIG_RTC_DRV_TWL4030=y
 # on-CPU RTC drivers
 #
 # CONFIG_DMADEVICES is not set
-# CONFIG_REGULATOR is not set
 # CONFIG_UIO is not set
 
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_TWL4030=y
+
 #
 # File systems
 #
@@ -1407,3 +1439,10 @@ CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+
+# added by hand for now
+CONFIG_KEYBOARD_TWL4030=y
+CONFIG_USB_OTG_UTILS=y
+CONFIG_TWL4030_USB=y
+CONFIG_MMC_OMAP_HS=y
+

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


[PATCH 8/8] omap3: Decrease cpufreq transition latency

2009-11-10 Thread Tony Lindgren
From: Mike Turquette mturque...@gmail.com

Adjust OMAP3 frequency transition latency from 10,000,000uS to a more
reasonable 300,000uS.  This causes ondemand and conservative governors to
sample CPU load more often resulting in more responsive behavior.

Tested on Android 2.6.29; using this value and conservative governor, CORE
power consumption on Zoom2 was comparable to the old and unresponsive
10,000,000uS value while UI responsiveness was greatly improved.

Signed-off-by: Mike Turquette mturque...@ti.com
Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/cpu-omap.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 1868c0d..341235c 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -127,7 +127,7 @@ static int __init omap_cpu_init(struct cpufreq_policy 
*policy)
}
 
/* FIXME: what's the actual transition time? */
-   policy-cpuinfo.transition_latency = 10 * 1000 * 1000;
+   policy-cpuinfo.transition_latency = 300 * 1000;
 
return 0;
 }

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


Re: [PATCH 0/2] Introduce support for AM35xx

2009-11-10 Thread Tony Lindgren
* Premi, Sanjeev pr...@ti.com [091110 05:41]:
  -Original Message-
  From: Premi, Sanjeev 
  Sent: Tuesday, October 27, 2009 7:32 PM
  To: linux-omap@vger.kernel.org
  Cc: Premi, Sanjeev
  Subject: [PATCH 0/2] Introduce support for AM35xx
  
  This patch adds support for the recently announced
  AM3505 and AM3517 devices from Texas Instruments.
  
  It also defines the AM3517 EVM board. Detailed
  support will follow in subsequent patches.
  
[1] http://www.ti.com/sitara 
[2] http://www.ti.com/arm 
[3] 
  http://tiexpressdsp.com/index.php?title=Applications_Processor
  s_Crossreference 
[4] http://marc.info/?l=linux-omapm=125615009412281w=2

  The patches have been created against omap-next branch.
  
  Sanjeev Premi (2):
AM35xx: Runtime detection of the device
AM35xx: Define the AM3517EVM board
  
   arch/arm/mach-omap2/Kconfig   |4 +++
   arch/arm/mach-omap2/id.c  |   43 
  
   arch/arm/plat-omap/include/plat/cpu.h |   12 +
   3 files changed, 53 insertions(+), 6 deletions(-)
  
  
 Tony,
 
 Where does this stand in your queue?

Cpu detection merged now, can you please check?

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/8] Omap fixes for v2.6.32-rc6

2009-11-10 Thread Sid Boyce
I still haven't been able to find the reason why the Ralink drivers
haven't been offered in make config/menuconfig/xconfig - cross compiling
on Fedora 12 x86_64 as per my previous post. I downloaded the latest
linux-omap snapshot Tuesday, 6 hours after it was up.
Regards
Sid.

On 11/11/09 03:00, Tony Lindgren wrote:
 Hi all,
 
 Here are still few more fixes for review for the current -rc series.
 
 Regards,
 
 Tony
 
 ---
 
 Grazvydas Ignotas (2):
   omap: update Pandora defconfig
   omap3: pandora: Fix keypad keymap
 
 Janusz Krzysztofik (1):
   omap1: Amstrad Delta defconfig fixes
 
 Jarkko Nikula (1):
   omap3: beagle: Fix USB host port power control
 
 Mike Turquette (1):
   omap3: Decrease cpufreq transition latency
 
 Sergio Aguirre (1):
   omap3: 3430sdp: Enable Linux Regulator framework
 
 Tao Hu (1):
   omap: Fix race condition in omap dma driver
 
 Tobias Klauser (1):
   omap: Use resource_size
 
 
  arch/arm/configs/ams_delta_defconfig |   24 +++--
  arch/arm/configs/omap3_pandora_defconfig |   49 +--
  arch/arm/configs/omap_3430sdp_defconfig  |9 +++
  arch/arm/mach-omap2/board-omap3beagle.c  |2 -
  arch/arm/mach-omap2/board-omap3pandora.c |   78 
 +++---
  arch/arm/mach-omap2/gpmc.c   |2 -
  arch/arm/mach-omap2/mailbox.c|2 -
  arch/arm/plat-omap/cpu-omap.c|2 -
  arch/arm/plat-omap/dma.c |6 ++
  9 files changed, 118 insertions(+), 56 deletions(-)
 


-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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


Re: [PATCH 1/3] Fixing compilation warning for 'nand/omap2.c'

2009-11-10 Thread Vimal Singh
On Tue, Nov 10, 2009 at 7:56 PM, Artem Bityutskiy dedeki...@gmail.com wrote:
 On Tue, 2009-11-10 at 16:20 +0200, Artem Bityutskiy wrote:
 On Tue, 2009-11-03 at 14:31 +0530, Vimal Singh wrote:
   diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
   index 090ab87..92573d5 100644
   --- a/drivers/mtd/nand/omap2.c
   +++ b/drivers/mtd/nand/omap2.c
   @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
   mtd_info *mtd, u_char
  
   :-) It is the same again.
  
   Try to send the e-mail to yourself, then save it and apply with git-am.
   If it works, send to the mailing list.
 
  Below patch applies. Sorry for noise... :(
 
  Thanks,
  vimal
 
 
  From eebbd81141b196af2dc3f7a2650ce16b6b0d76ae Mon Sep 17 00:00:00 2001
  From: Vimal Singh vimalsi...@ti.com
  Date: Fri, 30 Oct 2009 11:31:34 +0530
  Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
 
  Fixing below warning in compilation:
  drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
  drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
  'omap_nand_dma_transfer' discards qualifiers from pointer target type
 
  Signed-off-by: Vimal Singh vimalsi...@ti.com
  ---
   drivers/mtd/nand/omap2.c |    6 --
   1 files changed, 4 insertions(+), 2 deletions(-)
 
  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 090ab87..92573d5 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
  @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
   static void omap_write_buf_dma_pref(struct mtd_info *mtd,
                                      const u_char *buf, int len)
   {
  +   u_char *p = (u_char *)buf;
  +
      if (len = mtd-oobsize)
  -           omap_write_buf_pref(mtd, buf, len);
  +           omap_write_buf_pref(mtd, p, len);
      else
              /* start transfer in DMA mode */
  -           omap_nand_dma_transfer(mtd, buf, len, 0x1);
  +           omap_nand_dma_transfer(mtd, p, len, 0x1);
   }

 I think that you should instead remove the 'const' modifier from the
 'omap_write_buf_dma_pref()' function. Indeed, if it has the 'const'
 modifier, it should never change the bugger.

 Sorry, s/bugger/buffer/
 :-)

Write calls are intended to copy data bytes from supplied buffer to
NAND. So yes, these calls are not supposed to change this buffer.

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] Fixing compilation warning for 'nand/omap2.c'

2009-11-10 Thread Vimal Singh
On Tue, Nov 10, 2009 at 7:54 PM, Artem Bityutskiy dedeki...@gmail.com wrote:
 On Tue, 2009-11-03 at 14:31 +0530, Vimal Singh wrote:
  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 090ab87..92573d5 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
  @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  mtd_info *mtd, u_char
 
  :-) It is the same again.
 
  Try to send the e-mail to yourself, then save it and apply with git-am.
  If it works, send to the mailing list.

 Below patch applies. Sorry for noise... :(

 Thanks,
 vimal


 From eebbd81141b196af2dc3f7a2650ce16b6b0d76ae Mon Sep 17 00:00:00 2001
 From: Vimal Singh vimalsi...@ti.com
 Date: Fri, 30 Oct 2009 11:31:34 +0530
 Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'

 Fixing below warning in compilation:
 drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
 drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
 'omap_nand_dma_transfer' discards qualifiers from pointer target type

 Signed-off-by: Vimal Singh vimalsi...@ti.com
 ---
  drivers/mtd/nand/omap2.c |    6 --
  1 files changed, 4 insertions(+), 2 deletions(-)

 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 090ab87..92573d5 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c
 @@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
  static void omap_write_buf_dma_pref(struct mtd_info *mtd,
                                       const u_char *buf, int len)
  {
 +     u_char *p = (u_char *)buf;
 +
       if (len = mtd-oobsize)
 -             omap_write_buf_pref(mtd, buf, len);
 +             omap_write_buf_pref(mtd, p, len);
       else
               /* start transfer in DMA mode */
 -             omap_nand_dma_transfer(mtd, buf, len, 0x1);
 +             omap_nand_dma_transfer(mtd, p, len, 0x1);
  }

  /**

 BTW, this patch is still corrupted for me. And it is strange that I do
 not see it in the archives, so I cannot check is this my setup which is
 guilty, or it is you sending the patches incorrectly:

 http://lists.infradead.org/pipermail/linux-mtd/2009-November/027918.html

Here is the patch once again:

Fixing below warning in compilation:
drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
'omap_nand_dma_transfer' discards qualifiers from pointer target type

Signed-off-by: Vimal Singh vimalsi...@ti.com
---
 drivers/mtd/nand/omap2.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 090ab87..92573d5 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -501,11 +501,13 @@ static void omap_read_buf_dma_pref(struct
 static void omap_write_buf_dma_pref(struct mtd_info *mtd,
const u_char *buf, int len)
 {
+   u_char *p = (u_char *)buf;
+
if (len = mtd-oobsize)
-   omap_write_buf_pref(mtd, buf, len);
+   omap_write_buf_pref(mtd, p, len);
else
/* start transfer in DMA mode */
-   omap_nand_dma_transfer(mtd, buf, len, 0x1);
+   omap_nand_dma_transfer(mtd, p, len, 0x1);
 }

 /**
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module

2009-11-10 Thread Vimal Singh
On Wed, Nov 11, 2009 at 12:26 AM, Tony Lindgren t...@atomide.com wrote:
 * Artem Bityutskiy dedeki...@gmail.com [091110 06:22]:
 On Fri, 2009-10-30 at 14:57 +0530, Vimal Singh wrote:
  Last time I forgot to 'git add' for 'arch/arm/mach-omap2/gpmc.c'... My bad.
  Correct patch is below.
 
  -vimal
 
 
  From: Vimal Singh vimalsi...@ti.com
  Date: Fri, 30 Oct 2009 14:54:29 +0530
  Subject: [PATCH] NAND: OMAP: Fixing omap nand driver, compiled as module
 
  Removing OMAP NAND driver, when loaded as a module, gives error and
  does not get success. This fixes this and makes driver loadable and
  removable run time.
 
  Signed-off-by: Vimal Singh vimalsi...@ti.com
  ---
   arch/arm/mach-omap2/gpmc.c |    2 ++
   drivers/mtd/nand/omap2.c   |    5 -
   2 files changed, 6 insertions(+), 1 deletions(-)
 
  diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
  index 1587682..1d10b7b 100644
  --- a/arch/arm/mach-omap2/gpmc.c
  +++ b/arch/arm/mach-omap2/gpmc.c
  @@ -88,6 +88,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
      reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
      __raw_writel(val, reg_addr);
   }
  +EXPORT_SYMBOL(gpmc_cs_write_reg);
 
   u32 gpmc_cs_read_reg(int cs, int idx)
   {
  @@ -96,6 +97,7 @@ u32 gpmc_cs_read_reg(int cs, int idx)
      reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
      return __raw_readl(reg_addr);
   }
  +EXPORT_SYMBOL(gpmc_cs_read_reg);

 You should get Tony's ack for this. I do not know the code, but on
 surface it looks strange. Exporting so low-level functions is bad in
 general, IMO. These function should either be inlined, or you should
 invent better abstraction, so that you would not need to ever call these
 functions from omap2.c.

 NAK. We don't want the drivers to tinker with these registers
 directly. And really, the drivers should be platform independent.

 This seems like a quick hack to add back the missing functionality
 we threw out of the linux-omap tree. It was thrown out because there
 were the same cut and paste hacks duplicated all over the place
 tinkering with the GPMC registers directly.

 We've fixed a lot of this by creating gpmc-onenand.c and gpmc-smc91x.c,
 and that's clearly the way to go.

 So instead of trying to add back the same old hacks, how about rather
 spend that time to create something that we can use for all boards
 using GPMC?

 To me it looks like platform init like this should be done in a
 generic way in arch/arm/mach-omap2/gpmc-nand.c the same way we have
 gpmc-onenand.c and gpmc-smc91x.c.

 Also, you should calculate the GPMC timings dynamically as they
 can change based on the L3 frequency. Just take a look at the
 gpmc-onenand.c and gpmc-smc91x.c.

Ok, I'll look into these and will try to do something generic.

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 1/2] OMAP3: Enable DSS2 for OMAP3EVM board

2009-11-10 Thread Hiremath, Vaibhav

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Tomi Valkeinen
 Sent: Tuesday, November 10, 2009 3:43 PM
 To: Hiremath, Vaibhav
 Cc: Tony Lindgren; linux-omap@vger.kernel.org
 Subject: RE: [PATCH 1/2] OMAP3: Enable DSS2 for OMAP3EVM board
 
 On Tue, 2009-11-10 at 04:42 +0100, ext Hiremath, Vaibhav wrote:
 
  
   It's best that we let Tomi queue up all the DSS2 related
 patches.
  [Hiremath, Vaibhav] I am ok with that.
  Let me update this patch with the latest kernel + DSS2 and re-
 submit it again.
 
 Wait until DSS2 patches have been merged. I don't want the extra
 complexity of board/panel patches, there's enough work with just the
 half-megabyte DSS patches =).
 
[Hiremath, Vaibhav] I understand that and will submit once it gets merged. 
Again I have one more platform now, AM3517 which has same DSS IP.

Thanks,
Vaibhav

  Tomi
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-
 omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

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


Re: linux-omap-2.6 does not allow configuring rt2xx

2009-11-10 Thread Mike Rapoport


Sid Boyce wrote:
 Spotted over the last few days.
 make ARCH=arm CROSS_COMPILE=/opt/arm-2009q1/bin/arm-none-linux/gnueabi-
 omap3_beagle_defconfig, then xconfig/menuconfig/config, the option
 never shows up.

Have you tried enabling cfg80211 and mac80211 in Networking support - 
Wireless?

 Regards
 Sid.

-- 
Sincerely yours,
Mike.

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


[PATCH 0/3] DSPBRDIGE: Implement WDT3 to notify DSP hangs

2009-11-10 Thread Guzman Lugo, Fernando

Hi All,

This set of patches implement wdt3 to detect when DSP hangs, there are 
the mail features:

- Added to catch DSP hang or crash which is not caught by MMU   
faults or exceptions.
- This can also catch the tight loop in the DSP.
- WDT3 (IVA2 WD) causes an interrupt to ARM in the event of 
overflow.
- MPU configures the IVA2 WD.
- DSP periodically re-loads the counter in order to avoid the overflow  
when active.
* Reload occurs in the IDLE task.
* Reload also occurs when the interrupt is sent back to MPU.
- WD is disabled when IVA go to OFF and enabled when coming out OFF.
- WD will be delivered disabled by default.  It can be enabled with 
the sysfs entry.
- WD timer value will also be configurable through sysfs entry.

Regards,
Fernando.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] DSPBRDIGE: Implement WDT3 to notify DSP hangs

2009-11-10 Thread Guzman Lugo, Fernando
From 7056cebae5cf03d17770f5ea7f18117d519d3898 Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo x0095...@ti.com
Date: Wed, 11 Nov 2009 00:16:02 -0600
Subject: [PATCH] DSPBRDIGE: Implement WDT3 to notify DSP hangs

This patch implements wdt3 feature to notify wdt3 overflow.
This new feature is can chosen or not by doing make menuconfig,
the default it disable.

Signed-off-by: Fernando Guzman Lugo x0095...@ti.com
Signed-off-by: Armando Uribe x0095...@ti.com
Signed-off-by: Somashekar Chandrappa somasheka...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |   23 +++--
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |   39 
 arch/arm/plat-omap/include/dspbridge/drv.h  |3 +
 arch/arm/plat-omap/include/dspbridge/host_os.h  |1 +
 drivers/dsp/bridge/Kconfig  |   12 +++
 drivers/dsp/bridge/rmgr/drv.c   |3 +-
 drivers/dsp/bridge/rmgr/proc.c  |5 +-
 drivers/dsp/bridge/wmd/_tiomap.h|   22 
 drivers/dsp/bridge/wmd/io_sm.c  |  121 +--
 drivers/dsp/bridge/wmd/tiomap3430.c |   48 +
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |   24 +-
 drivers/dsp/bridge/wmd/tiomap_sm.c  |9 ++
 drivers/dsp/bridge/wmd/ue_deh.c |   16 +++
 13 files changed, 287 insertions(+), 39 deletions(-)
 mode change 100644 = 100755 drivers/dsp/bridge/rmgr/drv_interface.c

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index 28af799..f85e364 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -105,11 +105,13 @@ struct loadMonStruct {
 u32 predDspFreq;
 };

-   enum SHM_DESCTYPE {
-   SHM_CURROPP = 0,
-   SHM_OPPINFO = 1,
-   SHM_GETOPP = 2, /* Get DSP requested OPP info */
-   } ;
+enum SHM_DESCTYPE {
+   SHM_CURROPP = 0,
+   SHM_OPPINFO = 1,
+   SHM_GETOPP = 2, /* Get DSP requested OPP info */
+   SHM_WDTOVF = 3, /* Set the WDT overflow time */
+   SHM_WDTCLOCKS = 4   /* Set/unset F/I WDT clocks flag */
+} ;

 /* Structure in shared between DSP and PC for communication.*/
struct SHM {
@@ -133,8 +135,15 @@ struct loadMonStruct {
struct oppRqstStruct oppRequest;
/* load monitor information structure*/
struct loadMonStruct loadMonInfo;
-   char dummy[184]; /* padding to 256 byte boundary */
-   u32 shm_dbg_var[64]; /* shared memory debug variables */
+#ifdef CONFIG_BRIDGE_WDT3
+   /* Flag for WDT enable/disable F/I clocks */
+   u32 wdt_setclocks;
+   u32 wdt_overflow;   /* WDT overflow time */
+   char dummy[176];/* padding to 256 byte boundary */
+#else
+   char dummy[184];/* padding to 256 byte boundary */
+#endif
+   u32 shm_dbg_var[64];/* shared memory debug variables */
} ;

/* Channel Manager: only one created per board: */
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 3570171..856ec61 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -102,6 +102,7 @@
 #define DSP_SYSERROR0x0020
 #define DSP_EXCEPTIONABORT  0x0300
 #define DSP_PWRERROR0x0080
+#define DSP_WDTOVERFLOW0x0040

 /* IVA exception events (IVA MMU fault) */
 #define IVA_MMUFAULT0x0040
@@ -168,25 +169,27 @@

 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
-   DSP_PROCESSORATTACH | \
-   DSP_PROCESSORDETACH | \
-   DSP_PROCESSORRESTART | \
-   DSP_NODESTATECHANGE | \
-   DSP_STREAMDONE | \
-   DSP_STREAMIOCOMPLETION | \
-   DSP_MMUFAULT | \
-   DSP_SYSERROR | \
-   DSP_PWRERROR))  \
+   DSP_PROCESSORATTACH | \
+   DSP_PROCESSORDETACH | \
+   DSP_PROCESSORRESTART | \
+   DSP_NODESTATECHANGE | \
+   DSP_STREAMDONE | \
+   DSP_STREAMIOCOMPLETION | \
+   DSP_MMUFAULT | \
+   DSP_SYSERROR | \
+   DSP_PWRERROR | \
+   DSP_WDTOVERFLOW))  \
!((x)  ~(DSP_PROCESSORSTATECHANGE | \
-  

[PATCH 2/3] DSPBRIDGE: Implement sysfs entry to enable/disable wdt3

2009-11-10 Thread Guzman Lugo, Fernando
From 538a9876a6a1568a0c63679cab0f1ce787aedef9 Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo x0095...@ti.com
Date: Wed, 11 Nov 2009 00:31:48 -0600
Subject: [PATCH] DSPBRIDGE: Implement sysfs entry to enable/disable wdt3

This patch implements new sysfs entry to enable or disable
wdt3 at run time:
echo 1  /sys/devices/platform/C6410/wdt3_enable //to enable
echo 0  /sys/devices/platform/C6410/wdt3_enable //to disable

Signed-off-by: Fernando Guzman Lugo x0095...@ti.com
Signed-off-by: Armando Uribe x0095...@ti.com
Signed-off-by: Somashekar Chandrappa somasheka...@ti.com
---
 drivers/dsp/bridge/rmgr/drv_interface.c |   63 +--
 1 files changed, 59 insertions(+), 4 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c 
b/drivers/dsp/bridge/rmgr/drv_interface.c
index 65ac1e7..e9cd647 100755
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -130,6 +130,9 @@ static s32 shm_size = 0x50; /* 5 MB */
 static u32 phys_mempool_base;
 static u32 phys_mempool_size;
 static int tc_wordswapon;  /* Default value is always false */
+#ifdef CONFIG_BRIDGE_WDT3
+extern u32 wtd3_enable;
+#endif
 
 /* Minimum ACTIVE VDD1 OPP level for reliable DSP operation */
 unsigned short min_active_opp = 3;
@@ -680,7 +683,7 @@ DSP_STATUS DRV_RemoveAllResources(HANDLE hPCtxt)
 /*
  * sysfs
  */
-static ssize_t drv_state_show(struct kobject *kobj, struct kobj_attribute 
*attr,
+static ssize_t drv_state_show(struct device *dev, struct device_attribute 
*attr,
 char *buf)
 {
struct WMD_DEV_CONTEXT *dwContext;
@@ -701,11 +704,63 @@ static ssize_t drv_state_show(struct kobject *kobj, 
struct kobj_attribute *attr,
 return sprintf(buf, %d\n, drv_state);
 }
 
-static struct kobj_attribute drv_state_attr = __ATTR_RO(drv_state);
+static DEVICE_ATTR(drv_state, S_IRUGO, drv_state_show, NULL);
+
+#ifdef CONFIG_BRIDGE_WDT3
+static ssize_t wdt3_show(struct device *dev, struct device_attribute *attr,
+   char *buf)
+{
+   return sprintf(buf, %d\n, wtd3_enable);
+}
+
+static ssize_t wdt3_store(struct device *dev, struct device_attribute *attr,
+   const char *buf, size_t n)
+{
+   u32 wdt3;
+   struct DEV_OBJECT *dev_object;
+   struct WMD_DEV_CONTEXT *dev_ctxt;
+
+   if (sscanf(buf, %d, wdt3) != 1)
+   return -EINVAL;
+
+   dev_object = DEV_GetFirst();
+   if (!dev_object)
+   goto func_end;
+   DEV_GetWMDContext(dev_object, dev_ctxt);
+   if (!dev_ctxt)
+   goto func_end;
+
+   /* enable WDT */
+   if (wdt3 == 1) {
+   if (wtd3_enable)
+   goto func_end;
+   if (!CLK_Get_UseCnt(SERVICESCLK_wdt3_fck) 
+   dev_ctxt-dwBrdState != BRD_DSP_HIBERNATION 
+   DSP_FAILED(dsp_wdt_config(WDT3_ENABLE))) {
+   pr_err(Error enabling WDT3\n);
+   goto func_end;
+   }
+   wtd3_enable = 1;
+   } else if (!wdt3) {
+   if (!wtd3_enable)
+   goto func_end;
+   if (CLK_Get_UseCnt(SERVICESCLK_wdt3_fck))
+   dsp_wdt_config(WDT3_DISABLE);
+   wtd3_enable = 0;
+   }
+func_end:
+   return n;
+}
+
+static DEVICE_ATTR(wdt3_enable, S_IWUSR | S_IRUGO, wdt3_show, wdt3_store);
+#endif
 
 static struct attribute *attrs[] = {
-drv_state_attr.attr,
-NULL,
+   dev_attr_drv_state.attr,
+#ifdef CONFIG_BRIDGE_WDT3
+   dev_attr_wdt3_enable.attr,
+#endif
+   NULL,
 };
 
 static struct attribute_group attr_group = {
-- 
1.6.0.4

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


[PATCH 3/3] DSPBRIDGE: Implement sysfs entry to set wdt3 timeout

2009-11-10 Thread Guzman Lugo, Fernando
From c4d13985d498633b56b9e87165361c8511f37fa5 Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo x0095...@ti.com
Date: Wed, 11 Nov 2009 00:38:27 -0600
Subject: [PATCH] DSPBRIDGE: Implement sysfs entry to set wdt3 timeout

This patch implements new sysfs entry to change on runtime
the value of the wdt3 timeout (timeout is in sec):

echo timeout value  /sys/devices/platform/C6410/wdt3_timeout

Signed-off-by: Fernando Guzman Lugo x0095...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |5 +-
 drivers/dsp/bridge/rmgr/drv_interface.c |   49 +++
 drivers/dsp/bridge/wmd/io_sm.c  |8 
 3 files changed, 60 insertions(+), 2 deletions(-)
 mode change 100755 = 100644 drivers/dsp/bridge/rmgr/drv_interface.c

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index f85e364..60471b6 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -109,8 +109,9 @@ enum SHM_DESCTYPE {
SHM_CURROPP = 0,
SHM_OPPINFO = 1,
SHM_GETOPP = 2, /* Get DSP requested OPP info */
-   SHM_WDTOVF = 3, /* Set the WDT overflow time */
-   SHM_WDTCLOCKS = 4   /* Set/unset F/I WDT clocks flag */
+   SHM_GETWDTOVF,  /* Set the WDT overflow time */
+   SHM_WDTOVF, /* Set the WDT overflow time */
+   SHM_WDTCLOCKS   /* Set/unset F/I WDT clocks flag */
 } ;
 
 /* Structure in shared between DSP and PC for communication.*/
diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c 
b/drivers/dsp/bridge/rmgr/drv_interface.c
old mode 100755
new mode 100644
index e9cd647..0319573
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -65,6 +65,9 @@
 #include dspbridge/dbdefs.h
 #include dspbridge/errbase.h
 #include _tiomap.h
+#ifdef CONFIG_BRIDGE_WDT3
+#include dspbridge/io_sm.h
+#endif
 
 /*  --- Trace  Debug */
 #include dspbridge/gt.h
@@ -753,12 +756,58 @@ func_end:
 }
 
 static DEVICE_ATTR(wdt3_enable, S_IWUSR | S_IRUGO, wdt3_show, wdt3_store);
+
+static ssize_t wdt3_timeout_show(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   u32 wdt3_to;
+   struct DEV_OBJECT *dev_object;
+   struct IO_MGR *io_mgr;
+
+   dev_object = DEV_GetFirst();
+   if (!dev_object)
+   return 0;
+   DEV_GetIOMgr(dev_object, io_mgr);
+   if (!io_mgr)
+   return 0;
+
+   if (DSP_FAILED(IO_SHMsetting(io_mgr, SHM_GETWDTOVF, wdt3_to)))
+   return 0;
+
+   return sprintf(buf, %u\n, wdt3_to);
+}
+
+static ssize_t wdt3_timeout_store(struct device *dev,
+   struct device_attribute *attr, const char *buf, size_t n)
+{
+   u32 wdt3_to;
+   struct DEV_OBJECT *dev_object;
+   struct IO_MGR *io_mgr;
+
+   if (sscanf(buf, %u, wdt3_to) != 1)
+   return -EINVAL;
+
+   dev_object = DEV_GetFirst();
+   if (!dev_object)
+   goto func_end;
+   DEV_GetIOMgr(dev_object, io_mgr);
+   if (!io_mgr)
+   goto func_end;
+
+   IO_SHMsetting(io_mgr, SHM_WDTOVF, (void *)wdt3_to);
+func_end:
+   return n;
+}
+
+static DEVICE_ATTR(wdt3_timeout, S_IWUSR | S_IRUGO, wdt3_timeout_show,
+   wdt3_timeout_store);
 #endif
 
 static struct attribute *attrs[] = {
dev_attr_drv_state.attr,
 #ifdef CONFIG_BRIDGE_WDT3
dev_attr_wdt3_enable.attr,
+   dev_attr_wdt3_timeout.attr,
 #endif
NULL,
 };
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 588074c..b17cc8b 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -1815,6 +1815,14 @@ DSP_STATUS IO_SHMsetting(IN struct IO_MGR *hIOMgr, IN 
enum SHM_DESCTYPE desc,
 #endif
switch (desc) {
 #ifdef CONFIG_BRIDGE_WDT3
+   case SHM_GETWDTOVF:
+   /* Update the shared memory with WDT timeout */
+   if (pArgs  hIOMgr-pSharedMem 
+   (int)hIOMgr-pSharedMem != -1)
+   *(u32 *)pArgs = hIOMgr-pSharedMem-wdt_overflow;
+   else
+   return DSP_EPOINTER;
+   break;
case SHM_WDTOVF:
/* Update the shared memory with WDT timeout */
if (hIOMgr-pSharedMem  (int)hIOMgr-pSharedMem != -1)
-- 
1.6.0.4

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


RE: [RFC] [PATCH] OMAP3630 PM: Correct width for CLKSEL Fields

2009-11-10 Thread Sripathy, Vishwanath
Alex,
On Wed, Nov 04, 2009 at 04:58:40 +0530, Sripathy, Vishwanath wrote:
  @@ -134,13 +135,13 @@ static struct omap_clk omap34xx_clks[] = {
  CLK(NULL,   omap_12m_fck, omap_12m_fck,  CK_343X),
  CLK(NULL,   dpll4_m2_ck,  dpll4_m2_ck,   CK_343X),
  CLK(NULL,   dpll4_m2x2_ck, dpll4_m2x2_ck, CK_343X),
  -   CLK(NULL,   dpll4_m3_ck,  dpll4_m3_ck,   CK_343X),
  +   CLK(NULL,   dpll4_m3_ck,  dpll4_m3_ck,   CK_343X | CK_363X),
  CLK(NULL,   dpll4_m3x2_ck, dpll4_m3x2_ck, CK_343X),
  -   CLK(NULL,   dpll4_m4_ck,  dpll4_m4_ck,   CK_343X),
  +   CLK(NULL,   dpll4_m4_ck,  dpll4_m4_ck,   CK_343X | CK_363X),
  CLK(NULL,   dpll4_m4x2_ck, dpll4_m4x2_ck, CK_343X),
  -   CLK(NULL,   dpll4_m5_ck,  dpll4_m5_ck,   CK_343X),
  +   CLK(NULL,   dpll4_m5_ck,  dpll4_m5_ck,   CK_343X | CK_363X),
  CLK(NULL,   dpll4_m5x2_ck, dpll4_m5x2_ck, CK_343X),
  -   CLK(NULL,   dpll4_m6_ck,  dpll4_m6_ck,   CK_343X),
  +   CLK(NULL,   dpll4_m6_ck,  dpll4_m6_ck,   CK_343X | CK_363X),
  CLK(NULL,   dpll4_m6x2_ck, dpll4_m6x2_ck, CK_343X),
  CLK(NULL,   emu_per_alwon_ck, emu_per_alwon_ck, CK_343X),
  CLK(NULL,   dpll5_ck, dpll5_ck,  CK_3430ES2),
 
 Doesn't it make more sense to have separate dpll4_*_ck's for 363X so as to 
 avoid the   clksel_mask_3630?
 

Then you will have to duplicate all the nodes in dpll4 clock tree which is 
redundant. There is no much difference in clock tree (between 3630 and 3430) 
except that clksel width is changed for 3630 which I feel does not justify 
adding a new clock tree. Updating the clksel mask is the simplest way to 
achieve it.

  @@ -1216,6 +1217,10 @@ int __init omap2_clk_init(void)
  cpu_mask |= RATE_IN_3430ES2;
  cpu_clkflg |= CK_3430ES2;
  }
  +   if (cpu_is_omap36xx()) {
  +   dpll4_dd.mult_mask = OMAP3630_PERIPH_DPLL_MULT_MASK;
  +   cpu_mask  |= RATE_IN_363X;
 
 Extra space before '|'.
 
  +   }
  }
 
 I think there's an indentation problem.
 
   
  clk_init(omap2_clk_functions);
  @@ -1225,6 +1230,11 @@ int __init omap2_clk_init(void)
   
  for (c = omap34xx_clks; c  omap34xx_clks + ARRAY_SIZE(omap34xx_clks); 
  c++)
  if (c-cpu  cpu_clkflg) {
  +   /* for 3630, change the mask value for clocks which are
  +   marked as CK_363X*/
  +   if (cpu_is_omap36xx())
  +   if (c-cpu   CK_363X)
 
 Extra space before ''.
 
  +   c-lk.clk-clksel_mask = 
  c-lk.clk-clksel_mask_3630;
 
 This looks longer than normally allowed.

What is longer? I did not get the comment.

 
 Regards,
 --
 Alex
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html