All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window
@ 2009-08-12 12:10 Tony Lindgren
  2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
                   ` (10 more replies)
  0 siblings, 11 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:10 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

Hi all,

Here are mostly omap3 specific updates for the merge window.

Regards,

Tony

---

Felipe Balbi (1):
      OMAP3: beagle: add missing twl4030 usb platform_data

Hiroshi DOYU (2):
      OMAP: iommu: add initial debugfs support
      OMAP: iommu: fix wrong argument in flush_cache_vmap()

Paul Walmsley (1):
      OMAP3: update OMAP3 Beagle defconfig

Sergio Aguirre (1):
      OMAP3: 3430SDP: Fix defconfig

Timo Kokkonen (1):
      OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration

Vikram Pandita (4):
      OMAP3: Zoom2: Update board defconfig
      OMAP3: Zoom2: Add TWL4030 support
      OMAP3: MMC: Add mux for pins
      OMAP2/3: Pass irqflags to 8250 driver


 arch/arm/configs/omap3_beagle_defconfig     |   11 +
 arch/arm/configs/omap_3430sdp_defconfig     |   20 +
 arch/arm/configs/omap_zoom2_defconfig       |  484 +++++++++++++++++++++++----
 arch/arm/configs/rx51_defconfig             |    1 
 arch/arm/mach-omap2/board-omap3beagle.c     |    5 
 arch/arm/mach-omap2/board-zoom-debugboard.c |    2 
 arch/arm/mach-omap2/board-zoom2.c           |  204 +++++++++++
 arch/arm/mach-omap2/devices.c               |   42 ++
 arch/arm/mach-omap2/mux.c                   |   49 +++
 arch/arm/mach-omap2/serial.c                |    2 
 arch/arm/plat-omap/Kconfig                  |    4 
 arch/arm/plat-omap/Makefile                 |    1 
 arch/arm/plat-omap/include/mach/mux.h       |   28 ++
 arch/arm/plat-omap/iommu-debug.c            |  334 +++++++++++++++++++
 arch/arm/plat-omap/iovmm.c                  |    2 
 15 files changed, 1088 insertions(+), 101 deletions(-)
 create mode 100644 arch/arm/plat-omap/iommu-debug.c

-- 
Signature

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap()
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
@ 2009-08-12 12:12 ` Tony Lindgren
  2009-08-13  9:21   ` Russell King - ARM Linux
  2009-08-12 12:13 ` [PATCH 02/10] OMAP: iommu: add initial debugfs support Tony Lindgren
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:12 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Hiroshi DOYU

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>

The second argument should be the end address, not the
length. Actually there will not be any effect on the behavior of this
driver since flush_cache_vmap() calls flush_cache_all() in the end.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/iovmm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 2fce2c1..6fc52fc 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -199,7 +199,7 @@ static void *vmap_sg(const struct sg_table *sgt)
 		va += bytes;
 	}
 
-	flush_cache_vmap(new->addr, total);
+	flush_cache_vmap(new->addr, new->addr + total);
 	return new->addr;
 
 err_out:


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
  2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
@ 2009-08-12 12:13 ` Tony Lindgren
  2009-08-13  9:23   ` Russell King - ARM Linux
  2009-08-12 12:14 ` [PATCH 03/10] OMAP2/3: Pass irqflags to 8250 driver Tony Lindgren
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:13 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Hiroshi DOYU

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>

This enables to peek the following data.

$ /debug/iommu/isp# ls
mem             nr_tlb_entries  regs
mmap            pagetable       tlb
$ /debug/iommu/isp# head pagetable
L:      da:      pa:
-----------------------------------------
2: 00001000 8ae4a002
2: 00002000 8e7bb002
2: 00003000 8ae49002
2: 00004000 8ae65002
.....

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/Kconfig       |    4 
 arch/arm/plat-omap/Makefile      |    1 
 arch/arm/plat-omap/iommu-debug.c |  334 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 339 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-omap/iommu-debug.c

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..ab9f9ef 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
 config OMAP_IOMMU
 	tristate
 
+config OMAP_IOMMU_DEBUG
+	depends on OMAP_IOMMU
+	tristate
+
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a832795..769a4c2 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
 
 obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
 obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
new file mode 100644
index 0000000..9811c19
--- /dev/null
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -0,0 +1,334 @@
+/*
+ * omap iommu: debugfs interface
+ *
+ * Copyright (C) 2008-2009 Nokia Corporation
+ *
+ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
+#include <linux/platform_device.h>
+#include <linux/debugfs.h>
+
+#include <mach/iommu.h>
+#include <mach/iovmm.h>
+
+#include "iopgtable.h"
+
+#define MAXCOLUMN 100 /* for short messages */
+
+static DEFINE_MUTEX(iommu_debug_lock);
+static char local_buffer[SZ_4K];
+
+static struct dentry *iommu_debug_root;
+
+static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	u32 ver = iommu_arch_version();
+	char buf[MAXCOLUMN], *p = buf;
+
+	p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
+
+	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+}
+
+static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p = local_buffer;
+	ssize_t bytes;
+
+	mutex_lock(&iommu_debug_lock);
+	p += iommu_dump_ctx(obj, p);
+	bytes = simple_read_from_buffer(userbuf, count, ppos, local_buffer,
+					p - local_buffer);
+	mutex_unlock(&iommu_debug_lock);
+	return bytes;
+}
+
+static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p = local_buffer;
+	ssize_t bytes;
+
+	mutex_lock(&iommu_debug_lock);
+	p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
+	p += sprintf(p, "-----------------------------------------\n");
+	p += dump_tlb_entries(obj, p);
+	bytes = simple_read_from_buffer(userbuf, count, ppos, local_buffer,
+					p - local_buffer);
+	mutex_unlock(&iommu_debug_lock);
+	return bytes;
+}
+
+static ssize_t debug_write_pagetable(struct file *file,
+		     const char __user *userbuf, size_t count, loff_t *ppos)
+{
+	struct iotlb_entry e;
+	struct cr_regs cr;
+	int err;
+	struct iommu *obj = file->private_data;
+	char buf[MAXCOLUMN], *p = buf;
+
+	count = min(count, sizeof(buf));
+
+	mutex_lock(&iommu_debug_lock);
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	sscanf(p, "%x %x", &cr.cam, &cr.ram);
+	if (!cr.cam || !cr.ram) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+
+	iotlb_cr_to_e(&cr, &e);
+	err = iopgtable_store_entry(obj, &e);
+	if (err)
+		dev_err(obj->dev, "%s: fail to store cr\n", __func__);
+
+	mutex_unlock(&iommu_debug_lock);
+	return count;
+}
+
+static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
+				    size_t count, loff_t *ppos)
+{
+	int i;
+	u32 *iopgd;
+	struct iommu *obj = file->private_data;
+	char *p = local_buffer;
+	ssize_t bytes;
+
+	mutex_lock(&iommu_debug_lock);
+
+	p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
+	p += sprintf(p, "-----------------------------------------\n");
+
+	spin_lock(&obj->page_table_lock);
+
+	iopgd = iopgd_offset(obj, 0);
+	for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
+		int j;
+		u32 *iopte;
+
+		if (!*iopgd)
+			continue;
+
+		if (!(*iopgd & IOPGD_TABLE)) {
+			u32 da;
+
+			da = i << IOPGD_SHIFT;
+			p += sprintf(p, "1: %08x %08x\n", da, *iopgd);
+			continue;
+		}
+
+		iopte = iopte_offset(iopgd, 0);
+
+		for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
+			u32 da;
+
+			if (!*iopte)
+				continue;
+
+			da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
+			p += sprintf(p, "2: %08x %08x\n", da, *iopte);
+		}
+	}
+	spin_unlock(&obj->page_table_lock);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, local_buffer,
+					p - local_buffer);
+	mutex_unlock(&iommu_debug_lock);
+	return bytes;
+}
+
+static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p = local_buffer;
+	struct iovm_struct *tmp;
+	int uninitialized_var(i);
+	ssize_t bytes;
+
+	mutex_lock(&iommu_debug_lock);
+
+	p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
+		     "No", "start", "end", "size", "flags");
+	p += sprintf(p, "-------------------------------------------------\n");
+
+	list_for_each_entry(tmp, &obj->mmap, list) {
+		size_t len;
+
+		len = tmp->da_end - tmp->da_start;
+		p += sprintf(p, "%3d %08x-%08x %6x %8x\n",
+			     i, tmp->da_start, tmp->da_end, len, tmp->flags);
+		i++;
+	}
+	bytes = simple_read_from_buffer(userbuf, count, ppos, local_buffer,
+					p - local_buffer);
+	mutex_unlock(&iommu_debug_lock);
+	return bytes;
+}
+
+static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p = local_buffer;
+	struct iovm_struct *area;
+	ssize_t bytes;
+
+	mutex_lock(&iommu_debug_lock);
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(p, area->va, count);
+	p += count;
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, local_buffer,
+					p - local_buffer);
+	mutex_unlock(&iommu_debug_lock);
+	return bytes;
+}
+
+static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	struct iovm_struct *area;
+	char *p = local_buffer;
+
+	count = min(count, sizeof(local_buffer));
+
+	mutex_lock(&iommu_debug_lock);
+
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(area->va, p, count);
+	mutex_unlock(&iommu_debug_lock);
+	return count;
+}
+
+static int debug_open_generic(struct inode *inode, struct file *file)
+{
+	file->private_data = inode->i_private;
+	return 0;
+}
+
+#define DEBUG_FOPS(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+		.write = debug_write_##name,				\
+	};
+
+#define DEBUG_FOPS_RO(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+	};
+
+DEBUG_FOPS_RO(ver);
+DEBUG_FOPS_RO(regs);
+DEBUG_FOPS_RO(tlb);
+DEBUG_FOPS(pagetable);
+DEBUG_FOPS_RO(mmap);
+DEBUG_FOPS(mem);
+
+#define __DEBUG_ADD_FILE(attr, mode)					\
+	{								\
+		struct dentry *dent;					\
+		dent = debugfs_create_file(#attr, mode, parent,		\
+					   obj, &debug_##attr##_fops);	\
+		if (!dent)						\
+			return -ENOMEM;					\
+	}
+
+#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
+#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
+
+static int iommu_debug_register(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct iommu *obj = platform_get_drvdata(pdev);
+	struct dentry *d, *parent;
+
+	if (!obj || !obj->dev)
+		return -EINVAL;
+
+	d = debugfs_create_dir(obj->name, iommu_debug_root);
+	if (!d)
+		return -ENOMEM;
+	parent = d;
+
+	d = debugfs_create_u8("nr_tlb_entries", 400, parent,
+			      (u8 *)&obj->nr_tlb_entries);
+	if (!d)
+		return -ENOMEM;
+
+	DEBUG_ADD_FILE_RO(ver);
+	DEBUG_ADD_FILE_RO(regs);
+	DEBUG_ADD_FILE_RO(tlb);
+	DEBUG_ADD_FILE(pagetable);
+	DEBUG_ADD_FILE_RO(mmap);
+	DEBUG_ADD_FILE(mem);
+
+	return 0;
+}
+
+static int __init iommu_debug_init(void)
+{
+	struct dentry *d;
+	int err;
+
+	d = debugfs_create_dir("iommu", NULL);
+	if (!d)
+		return -ENOMEM;
+	iommu_debug_root = d;
+
+	err = foreach_iommu_device(d, iommu_debug_register);
+	if (err)
+		goto err_out;
+	return 0;
+
+err_out:
+	debugfs_remove_recursive(iommu_debug_root);
+	return err;
+}
+module_init(iommu_debug_init)
+
+static void __exit iommu_debugfs_exit(void)
+{
+	debugfs_remove_recursive(iommu_debug_root);
+}
+module_exit(iommu_debugfs_exit)
+
+MODULE_DESCRIPTION("omap iommu: debugfs interface");
+MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
+MODULE_LICENSE("GPL v2");


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 03/10] OMAP2/3: Pass irqflags to 8250 driver
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
  2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
  2009-08-12 12:13 ` [PATCH 02/10] OMAP: iommu: add initial debugfs support Tony Lindgren
@ 2009-08-12 12:14 ` Tony Lindgren
  2009-08-12 12:16 ` [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig Tony Lindgren
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:14 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Vikram Pandita, linux-omap

From: Vikram Pandita <vikram.pandita@ti.com>

Pass irqflags to 8250 driver with platform_data. At least Zoom2 has
IRQF_TRIGGER_RISING requirement for the 8250 GPIO irq.

This patch is dependent on 8250 driver changes getting accepted upstream:
http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=commit;h=7053133124d5cdf207c1168c7a0c582a18e12ea7

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |    2 ++
 arch/arm/mach-omap2/serial.c                |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index bac5c43..f546063 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -12,6 +12,7 @@
 #include <linux/gpio.h>
 #include <linux/serial_8250.h>
 #include <linux/smsc911x.h>
+#include <linux/interrupt.h>
 
 #include <mach/gpmc.h>
 
@@ -84,6 +85,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
 		.mapbase	= 0x10000000,
 		.irq		= OMAP_GPIO_IRQ(102),
 		.flags		= UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+		.irqflags	= IRQF_SHARED | IRQF_TRIGGER_RISING,
 		.iotype		= UPIO_MEM,
 		.regshift	= 1,
 		.uartclk	= QUART_CLK,
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 555e735..3f29376 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -429,7 +429,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 		omap_ctrl_writew(v, uart->padconf);
 	}
 
-	p->flags |= UPF_SHARE_IRQ;
+	p->irqflags |= IRQF_SHARED;
 	ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED,
 			  "serial idle", (void *)uart);
 	WARN_ON(ret);


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (2 preceding siblings ...)
  2009-08-12 12:14 ` [PATCH 03/10] OMAP2/3: Pass irqflags to 8250 driver Tony Lindgren
@ 2009-08-12 12:16 ` Tony Lindgren
  2009-08-13  9:24   ` Russell King - ARM Linux
  2009-08-12 12:17 ` [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration Tony Lindgren
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:16 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Sergio Aguirre, linux-omap

From: Sergio Aguirre <saaguirre@ti.com>

This patch makes the SDP boot again with the defconfig.

Changes done:

 - Removes other selected boards.
 - Sets the Low Level debug output for UART1.
 - Disables some paripherals from other boards.

Tested on a SDP3430-VE5.1.0 (OMAP3430 ES3.1)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/configs/omap_3430sdp_defconfig |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/configs/omap_3430sdp_defconfig b/arch/arm/configs/omap_3430sdp_defconfig
index 8fb918d..9a510ea 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc8
-# Fri Mar 13 14:17:01 2009
+# Linux kernel version: 2.6.30-omap1
+# Tue Jun 23 10:36:45 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -197,9 +197,9 @@ CONFIG_OMAP_MCBSP=y
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
-# CONFIG_OMAP_LL_DEBUG_UART1 is not set
+CONFIG_OMAP_LL_DEBUG_UART1=y
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
 CONFIG_OMAP_SERIAL_WAKE=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
@@ -207,10 +207,10 @@ CONFIG_ARCH_OMAP3430=y
 #
 # OMAP Board Type
 #
-CONFIG_MACH_OMAP3_BEAGLE=y
-CONFIG_MACH_OMAP_LDP=y
-CONFIG_MACH_OVERO=y
-CONFIG_MACH_OMAP3_PANDORA=y
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3_PANDORA is not set
 CONFIG_MACH_OMAP_3430SDP=y
 
 #
@@ -950,7 +950,7 @@ CONFIG_SPI_OMAP24XX=y
 # CONFIG_SPI_TLE62X0 is not set
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_GPIOLIB=y
-CONFIG_DEBUG_GPIO=y
+# CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
 
 #
@@ -1370,7 +1370,7 @@ CONFIG_SND_OMAP_SOC=y
 CONFIG_SND_OMAP_SOC_MCBSP=y
 # CONFIG_SND_OMAP_SOC_OVERO is not set
 CONFIG_SND_OMAP_SOC_SDP3430=y
-CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y
+# CONFIG_SND_OMAP_SOC_OMAP3_PANDORA is not set
 CONFIG_SND_SOC_I2C_AND_SPI=y
 # CONFIG_SND_SOC_ALL_CODECS is not set
 CONFIG_SND_SOC_TWL4030=y


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (3 preceding siblings ...)
  2009-08-12 12:16 ` [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig Tony Lindgren
@ 2009-08-12 12:17 ` Tony Lindgren
  2009-08-13  9:24   ` Russell King - ARM Linux
  2009-08-12 12:18 ` [PATCH 06/10] OMAP3: MMC: Add mux for pins Tony Lindgren
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:17 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Atal Shargorodsky, linux-omap

From: Timo Kokkonen <timo.t.kokkonen@nokia.com>

twl4030 watchdog will be compiled as a module by default.

Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/configs/rx51_defconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index eb2cb31..f4fb6ee 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -1006,6 +1006,7 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_OMAP_WATCHDOG=m
+CONFIG_TWL4030_WATCHDOG=m
 
 #
 # USB-based Watchdog Cards


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 06/10] OMAP3: MMC: Add mux for pins
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (4 preceding siblings ...)
  2009-08-12 12:17 ` [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration Tony Lindgren
@ 2009-08-12 12:18 ` Tony Lindgren
  2009-08-13  9:26   ` Russell King - ARM Linux
  2009-08-12 12:20 ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support Tony Lindgren
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:18 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Vikram Pandita, linux-omap, Chikkature Rajashekar

From: Vikram Pandita <vikram.pandita@ti.com>

For OMAP3 add MMC1 MMC2 pin mux
MMC3 mux is not added as there are multiple configurations possible,
so the muxing is left to be done in board file

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Chikkature Rajashekar <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/devices.c         |   42 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/mux.c             |   49 +++++++++++++++++++++++++++++++++
 arch/arm/plat-omap/include/mach/mux.h |   28 +++++++++++++++++++
 3 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 894cc35..91cb84d 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -513,6 +513,48 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
 		}
 	}
+
+	if (cpu_is_omap3430()) {
+		if (controller_nr == 0) {
+			omap_cfg_reg(N28_3430_MMC1_CLK);
+			omap_cfg_reg(M27_3430_MMC1_CMD);
+			omap_cfg_reg(N27_3430_MMC1_DAT0);
+			if (mmc_controller->slots[0].wires == 4 ||
+				mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(N26_3430_MMC1_DAT1);
+				omap_cfg_reg(N25_3430_MMC1_DAT2);
+				omap_cfg_reg(P28_3430_MMC1_DAT3);
+			}
+			if (mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(P27_3430_MMC1_DAT4);
+				omap_cfg_reg(P26_3430_MMC1_DAT5);
+				omap_cfg_reg(R27_3430_MMC1_DAT6);
+				omap_cfg_reg(R25_3430_MMC1_DAT7);
+			}
+		}
+		if (controller_nr == 1) {
+			/* MMC2 */
+			omap_cfg_reg(AE2_3430_MMC2_CLK);
+			omap_cfg_reg(AG5_3430_MMC2_CMD);
+			omap_cfg_reg(AH5_3430_MMC2_DAT0);
+			if (mmc_controller->slots[0].wires == 4 ||
+				mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(AH4_3430_MMC2_DAT1);
+				omap_cfg_reg(AG4_3430_MMC2_DAT2);
+				omap_cfg_reg(AF4_3430_MMC2_DAT3);
+			}
+			if (mmc_controller->slots[0].wires == 8)
+				printk(KERN_WARNING
+					"\n MMC2: DAT4, DAT5, DAT6, DAT7: "
+					"Setup the mux in board file");
+		}
+		if (controller_nr == 2) {
+			/* MMC3 */
+			printk(KERN_WARNING
+				"\n MMC3: Setup the mux in board file: "
+				"Multiple options exist, so is board specific");
+		}
+	}
 }
 
 void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 026c4fc..d49b9a7 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -486,6 +486,55 @@ MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c,
 		OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
 MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6,
 		OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
+/* MMC1 */
+MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
+/* MMC2 */
+MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
+/* MMC3 */
+MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
+		OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
 };
 
 #define OMAP34XX_PINS_SZ	ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 85a6217..d24fdf9 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -853,6 +853,34 @@ enum omap34xx_index {
 	AE5_34XX_GPIO143,
 	H19_34XX_GPIO164_OUT,
 	J25_34XX_GPIO170,
+
+	/* MMC1 */
+	N28_3430_MMC1_CLK,
+	M27_3430_MMC1_CMD,
+	N27_3430_MMC1_DAT0,
+	N26_3430_MMC1_DAT1,
+	N25_3430_MMC1_DAT2,
+	P28_3430_MMC1_DAT3,
+	P27_3430_MMC1_DAT4,
+	P26_3430_MMC1_DAT5,
+	R27_3430_MMC1_DAT6,
+	R25_3430_MMC1_DAT7,
+
+	/* MMC2 */
+	AE2_3430_MMC2_CLK,
+	AG5_3430_MMC2_CMD,
+	AH5_3430_MMC2_DAT0,
+	AH4_3430_MMC2_DAT1,
+	AG4_3430_MMC2_DAT2,
+	AF4_3430_MMC2_DAT3,
+
+	/* MMC3 */
+	AF10_3430_MMC3_CLK,
+	AC3_3430_MMC3_CMD,
+	AE11_3430_MMC3_DAT0,
+	AH9_3430_MMC3_DAT1,
+	AF13_3430_MMC3_DAT2,
+	AF13_3430_MMC3_DAT3,
 };
 
 struct omap_mux_cfg {


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (5 preceding siblings ...)
  2009-08-12 12:18 ` [PATCH 06/10] OMAP3: MMC: Add mux for pins Tony Lindgren
@ 2009-08-12 12:20 ` Tony Lindgren
  2009-08-13  9:27   ` Russell King - ARM Linux
  2009-08-12 12:21 ` [PATCH 08/10] OMAP3: Zoom2: Update board defconfig Tony Lindgren
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:20 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Vikram Pandita, linux-omap

From: Vikram Pandita <vikram.pandita@ti.com>

Add TWL4030 CORE and TWL4030 drivers to Zoom2 board file
TWL drivers enabled are:
	bci
	madc
	usb
	keypad
	mmc

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-zoom2.c |  204 +++++++++++++++++++++++++++++++++++--
 1 files changed, 193 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 4cefa3f..98e6dc8 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -12,17 +12,83 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/input.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 <mach/common.h>
 #include <mach/usb.h>
+#include <mach/keypad.h>
 
 #include "mmc-twl4030.h"
 
+/* Zoom2 has Qwerty keyboard*/
+static int zoom2_twl4030_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 twl4030_keypad_data zoom2_kp_twl4030_data = {
+	.rows		= 8,
+	.cols		= 8,
+	.keymap		= zoom2_twl4030_keymap,
+	.keymapsize	= ARRAY_SIZE(zoom2_twl4030_keymap),
+	.rep		= 1,
+};
 static void __init omap_zoom2_init_irq(void)
 {
 	omap2_init_common_hw(NULL);
@@ -37,10 +103,129 @@ static struct omap_uart_platform_data zoom2_uart_config __initdata = {
 static struct omap_board_config_kernel zoom2_config[] __initdata = {
 };
 
+
+
+static struct regulator_consumer_supply zoom2_vmmc1_supply = {
+	.supply		= "vmmc",
+};
+
+static struct regulator_consumer_supply zoom2_vsim_supply = {
+	.supply		= "vmmc_aux",
+};
+
+static struct regulator_consumer_supply zoom2_vmmc2_supply = {
+	.supply		= "vmmc",
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
+static struct regulator_init_data zoom2_vmmc1 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 3150000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vmmc1_supply,
+};
+
+/* VMMC2 for MMC2 card */
+static struct regulator_init_data zoom2_vmmc2 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 1850000,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vmmc2_supply,
+};
+
+/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
+static struct regulator_init_data zoom2_vsim = {
+	.constraints = {
+		.min_uV			= 1800000,
+		.max_uV			= 3000000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vsim_supply,
+};
+
+static struct twl4030_hsmmc_info mmc[] __initdata = {
+	{
+		.mmc		= 1,
+		.wires		= 4,
+		.gpio_wp	= -EINVAL,
+	},
+	{
+		.mmc		= 2,
+		.wires		= 4,
+		.gpio_wp	= -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+static int zoom2_twl_gpio_setup(struct device *dev,
+		unsigned gpio, unsigned ngpio)
+{
+	/* gpio + 0 is "mmc0_cd" (input/IRQ),
+	 * gpio + 1 is "mmc1_cd" (input/IRQ)
+	 */
+	mmc[0].gpio_cd = gpio + 0;
+	mmc[1].gpio_cd = gpio + 1;
+	twl4030_mmc_init(mmc);
+
+	/* link regulators to MMC adapters ... we "know" the
+	 * regulators will be set up only *after* we return.
+	*/
+	zoom2_vmmc1_supply.dev = mmc[0].dev;
+	zoom2_vsim_supply.dev = mmc[0].dev;
+	zoom2_vmmc2_supply.dev = mmc[1].dev;
+
+	return 0;
+}
+
+
+static int zoom2_batt_table[] = {
+/* 0 C*/
+30800, 29500, 28300, 27100,
+26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
+17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
+11600, 11200, 10800, 10400, 10000, 9630,  9280,  8950,  8620,  8310,
+8020,  7730,  7460,  7200,  6950,  6710,  6470,  6250,  6040,  5830,
+5640,  5450,  5260,  5090,  4920,  4760,  4600,  4450,  4310,  4170,
+4040,  3910,  3790,  3670,  3550
+};
+
+static struct twl4030_bci_platform_data zoom2_bci_data = {
+	.battery_tmp_tbl	= zoom2_batt_table,
+	.tblsize		= ARRAY_SIZE(zoom2_batt_table),
+};
+
+static struct twl4030_usb_data zoom2_usb_data = {
+	.usb_mode	= T2_USB_MODE_ULPI,
+};
+
 static struct twl4030_gpio_platform_data zoom2_gpio_data = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
+	.setup		= zoom2_twl_gpio_setup,
+};
+
+static struct twl4030_madc_platform_data zoom2_madc_data = {
+	.irq_line	= 1,
 };
 
 static struct twl4030_platform_data zoom2_twldata = {
@@ -48,7 +233,15 @@ static struct twl4030_platform_data zoom2_twldata = {
 	.irq_end	= TWL4030_IRQ_END,
 
 	/* platform_data for children goes here */
+	.bci		= &zoom2_bci_data,
+	.madc		= &zoom2_madc_data,
+	.usb		= &zoom2_usb_data,
 	.gpio		= &zoom2_gpio_data,
+	.keypad		= &zoom2_kp_twl4030_data,
+	.vmmc1          = &zoom2_vmmc1,
+	.vmmc2          = &zoom2_vmmc2,
+	.vsim           = &zoom2_vsim,
+
 };
 
 static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
@@ -69,16 +262,6 @@ static int __init omap_i2c_init(void)
 	return 0;
 }
 
-static struct twl4030_hsmmc_info mmc[] __initdata = {
-	{
-		.mmc		= 1,
-		.wires		= 4,
-		.gpio_cd	= -EINVAL,
-		.gpio_wp	= -EINVAL,
-	},
-	{}	/* Terminator */
-};
-
 extern int __init omap_zoom2_debugboard_init(void);
 
 static void __init omap_zoom2_init(void)
@@ -88,7 +271,6 @@ static void __init omap_zoom2_init(void)
 	omap_board_config_size = ARRAY_SIZE(zoom2_config);
 	omap_serial_init(&zoom2_uart_config);
 	omap_zoom2_debugboard_init();
-	twl4030_mmc_init(mmc);
 	usb_musb_init();
 }
 


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 08/10] OMAP3: Zoom2: Update board defconfig
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (6 preceding siblings ...)
  2009-08-12 12:20 ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support Tony Lindgren
@ 2009-08-12 12:21 ` Tony Lindgren
  2009-08-13  9:28   ` Russell King - ARM Linux
  2009-08-12 12:22 ` [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data Tony Lindgren
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:21 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Vikram Pandita, linux-omap

From: Vikram Pandita <vikram.pandita@ti.com>

Update defconfig for Zoom2 to include
TWL4030 core
TWL4030 drivers (bci, gpio, keypad, usb, mmc)

Also sync the defconfig after issuing a menuconfig

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/configs/omap_zoom2_defconfig |  484 ++++++++++++++++++++++++++++-----
 1 files changed, 408 insertions(+), 76 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig
index 213fe9c..f1739fa 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc5
-# Fri Oct 10 11:49:41 2008
+# Linux kernel version: 2.6.30-omap1
+# Fri Jun 12 17:25:46 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -22,8 +22,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_ARCH_SUPPORTS_AOUT=y
-CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -39,44 +37,61 @@ 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_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU 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_CGROUPS is not set
 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_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
-CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
@@ -84,19 +99,13 @@ CONFIG_SLAB=y
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
 CONFIG_HAVE_CLK=y
-CONFIG_PROC_PAGE_MONITOR=y
+# CONFIG_SLOW_WORK is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 # CONFIG_MODULE_FORCE_LOAD is not set
@@ -104,11 +113,8 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
-# CONFIG_BLK_DEV_IO_TRACE is not set
-# CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -124,7 +130,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
-CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -134,10 +140,10 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X 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_NETX is not set
 # CONFIG_ARCH_H720X is not set
@@ -158,14 +164,17 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_ORION5X is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MMP 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_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
-# CONFIG_ARCH_MSM7X00A is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
 
 #
 # TI OMAP Implementations
@@ -174,6 +183,7 @@ CONFIG_ARCH_OMAP_OTG=y
 # CONFIG_ARCH_OMAP1 is not set
 # CONFIG_ARCH_OMAP2 is not set
 CONFIG_ARCH_OMAP3=y
+# CONFIG_ARCH_OMAP4 is not set
 
 #
 # OMAP Feature Selections
@@ -185,6 +195,7 @@ CONFIG_OMAP_MUX=y
 CONFIG_OMAP_MUX_DEBUG=y
 CONFIG_OMAP_MUX_WARNINGS=y
 CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MBOX_FWK is not set
 # CONFIG_OMAP_MPU_TIMER is not set
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
@@ -192,25 +203,20 @@ 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_SERIAL_WAKE=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
 
 #
 # OMAP Board Type
 #
-# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
 # CONFIG_MACH_OMAP_LDP is not set
-CONFIG_MACH_OMAP_ZOOM2=y
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_OMAP3EVM is not set
+# CONFIG_MACH_OMAP3_BEAGLE is not set
 # CONFIG_MACH_OVERO is not set
-
-#
-# Boot options
-#
-
-#
-# Power management
-#
+# CONFIG_MACH_OMAP3_PANDORA is not set
+CONFIG_MACH_OMAP_ZOOM2=y
 
 #
 # Processor Type
@@ -239,6 +245,10 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
 CONFIG_HAS_TLS_REG=y
 # CONFIG_OUTER_CACHE is not set
+# CONFIG_ARM_ERRATA_430973 is not set
+# CONFIG_ARM_ERRATA_458693 is not set
+# CONFIG_ARM_ERRATA_460075 is not set
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -254,26 +264,32 @@ CONFIG_TICK_ONESHOT=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
 # CONFIG_PREEMPT is not set
 CONFIG_HZ=128
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-CONFIG_ARCH_FLATMEM_HAS_HOLES=y
-# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 # CONFIG_LEDS is not set
 CONFIG_ALIGNMENT_TRAP=y
 
@@ -287,9 +303,10 @@ CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/home/user/buildroot ip=192.16
 # CONFIG_KEXEC is not set
 
 #
-# CPU Frequency scaling
+# CPU Power Management
 #
 # CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
 
 #
 # Floating point emulation
@@ -309,13 +326,23 @@ CONFIG_VFPv3=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 CONFIG_BINFMT_MISC=y
 
 #
 # Power management options
 #
-# CONFIG_PM is not set
+CONFIG_PM=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_VERBOSE=y
+CONFIG_CAN_PM_TRACE=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
@@ -378,7 +405,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
 # CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
 
 #
 # Network testing
@@ -389,8 +418,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 # CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -416,14 +445,28 @@ CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 CONFIG_MISC_DEVICES=y
-# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_OMAP_STI is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -461,14 +504,20 @@ CONFIG_SCSI_WAIT_SCAN=m
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
 CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -501,8 +550,10 @@ CONFIG_MII=y
 # CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
 # CONFIG_ENC28J60 is not set
+# CONFIG_ETHOC is not set
 # CONFIG_SMC911X is not set
 CONFIG_SMSC911X=y
+# CONFIG_DNET is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -519,7 +570,10 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
 
 #
 # USB Network Adapters
@@ -561,17 +615,25 @@ CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_TABLET is not set
 CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ADS7846=y
+# CONFIG_TOUCHSCREEN_AD7877 is not set
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
 # CONFIG_TOUCHSCREEN_MTOUCH is not set
 # CONFIG_TOUCHSCREEN_INEXIO is not set
 # CONFIG_TOUCHSCREEN_MK712 is not set
 # CONFIG_TOUCHSCREEN_PENMOUNT is not set
 # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC210X is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
 # CONFIG_INPUT_MISC is not set
 
 #
@@ -607,13 +669,15 @@ CONFIG_SERIAL_8250_RSA=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_MAX3100 is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
-# CONFIG_NVRAM is not set
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
 # CONFIG_R3964 is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
@@ -639,6 +703,7 @@ CONFIG_I2C_OMAP=y
 #
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
 
 #
 # Other I2C/SMBus bus drivers
@@ -650,14 +715,11 @@ CONFIG_I2C_OMAP=y
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
-# CONFIG_EEPROM_AT24 is not set
-# CONFIG_EEPROM_LEGACY is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_ISP1301_OMAP is not set
-# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_MADC is not set
+# CONFIG_TWL4030_POWEROFF is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
@@ -672,12 +734,12 @@ CONFIG_SPI_MASTER=y
 # SPI Master Controller Drivers
 #
 # CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
 CONFIG_SPI_OMAP24XX=y
 
 #
 # SPI Protocol Masters
 #
-# CONFIG_EEPROM_AT25 is not set
 # CONFIG_SPI_SPIDEV is not set
 # CONFIG_SPI_TLE62X0 is not set
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -686,11 +748,16 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_SYSFS is not set
 
 #
+# Memory mapped GPIO expanders:
+#
+
+#
 # I2C GPIO expanders:
 #
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
@@ -702,26 +769,34 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX7301 is not set
 # CONFIG_GPIO_MCP23S08 is not set
 CONFIG_W1=y
+CONFIG_W1_CON=y
 
 #
 # 1-wire Bus Masters
 #
+# CONFIG_W1_MASTER_DS2490 is not set
 # CONFIG_W1_MASTER_DS2482 is not set
 # CONFIG_W1_MASTER_DS1WM is not set
 # CONFIG_W1_MASTER_GPIO is not set
+# CONFIG_HDQ_MASTER_OMAP is not set
 
 #
 # 1-wire Slaves
 #
 # CONFIG_W1_SLAVE_THERM is not set
 # CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2431 is not set
 # CONFIG_W1_SLAVE_DS2433 is not set
 # CONFIG_W1_SLAVE_DS2760 is not set
+# CONFIG_W1_SLAVE_BQ27000 is not set
 CONFIG_POWER_SUPPLY=y
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 # CONFIG_PDA_POWER is not set
 # CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
 # CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_WATCHDOG_NOWAYOUT=y
 
@@ -729,11 +804,17 @@ CONFIG_WATCHDOG_NOWAYOUT=y
 # Watchdog Device Drivers
 #
 # CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_OMAP_WATCHDOG is not set
 
 #
-# Sonics Silicon Backplane
+# USB-based Watchdog Cards
 #
+# CONFIG_USBPCWATCHDOG is not set
 CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
 # CONFIG_SSB is not set
 
 #
@@ -741,12 +822,19 @@ CONFIG_SSB_POSSIBLE=y
 #
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_CORE=y
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_T7L66XB is not set
 # CONFIG_MFD_TC6387XB is not set
 # CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
 
 #
 # Multimedia devices
@@ -756,12 +844,14 @@ CONFIG_SSB_POSSIBLE=y
 # Multimedia core support
 #
 # CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
 # CONFIG_VIDEO_MEDIA is not set
 
 #
 # Multimedia drivers
 #
 CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
@@ -782,10 +872,12 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
 CONFIG_SND=y
 # CONFIG_SND_SEQUENCER is not set
 # CONFIG_SND_MIXER_OSS is not set
 # CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_HRTIMER is not set
 # CONFIG_SND_DYNAMIC_MINORS is not set
 CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
@@ -798,19 +890,197 @@ CONFIG_SND_DRIVERS=y
 # CONFIG_SND_MPU401 is not set
 CONFIG_SND_ARM=y
 CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
 # CONFIG_SND_SOC is not set
 # CONFIG_SOUND_PRIME is not set
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
 # CONFIG_HIDRAW is not set
-# CONFIG_USB_SUPPORT is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+# CONFIG_HID_A4TECH is not set
+# CONFIG_HID_APPLE is not set
+# CONFIG_HID_BELKIN is not set
+# CONFIG_HID_CHERRY is not set
+# CONFIG_HID_CHICONY is not set
+# CONFIG_HID_CYPRESS is not set
+# CONFIG_DRAGONRISE_FF is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_KYE is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_KENSINGTON is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_NTRIG is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_GREENASIA_FF is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 343x high speed USB support
+#
+# CONFIG_USB_MUSB_HOST is not set
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_HDRC_HCD=y
+# CONFIG_MUSB_PIO_ONLY is not set
+CONFIG_USB_INVENTRA_DMA=y
+# CONFIG_USB_TI_CPPI_DMA is not set
+CONFIG_USB_MUSB_DEBUG=y
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+# CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DEBUG=y
+CONFIG_USB_GADGET_DEBUG_FILES=y
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=y
+# CONFIG_USB_ZERO_HNPTEST is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+# CONFIG_NOP_USB_XCEIV is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
@@ -818,11 +1088,13 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 # CONFIG_MMC_SDHCI is not set
-# CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
 # CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_NEW_LEDS is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
@@ -852,43 +1124,55 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_PCF8563 is not set
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_TWL4030 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
 # CONFIG_RTC_DRV_M41T94 is not set
 # CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
 # CONFIG_RTC_DRV_MAX6902 is not set
 # CONFIG_RTC_DRV_R9701 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
 # CONFIG_DMADEVICES is not set
-
-#
-# Voltage and Current regulators
-#
-# CONFIG_REGULATOR is not set
+# CONFIG_AUXDISPLAY 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_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# CBUS support
+#
+# CONFIG_CBUS is not set
 
 #
 # File systems
@@ -897,18 +1181,24 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
 CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QUOTA_TREE=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
 CONFIG_QUOTACTL=y
@@ -917,6 +1207,11 @@ CONFIG_QUOTACTL=y
 # CONFIG_FUSE_FS is not set
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 # CONFIG_ISO9660_FS is not set
@@ -937,15 +1232,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 # CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
+CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
@@ -954,6 +1247,7 @@ CONFIG_TMPFS=y
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_OMFS_FS is not set
@@ -962,6 +1256,7 @@ CONFIG_TMPFS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -975,7 +1270,6 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1045,6 +1339,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
@@ -1062,6 +1357,9 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
@@ -1084,21 +1382,36 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
-CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_NOTIFIERS is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
-CONFIG_HAVE_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-# CONFIG_FTRACE is not set
+# CONFIG_PAGE_POISONING is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
 # CONFIG_IRQSOFF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
 # CONFIG_DEBUG_USER is not set
 # CONFIG_DEBUG_ERRORS is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
@@ -1110,17 +1423,28 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 # CONFIG_CRYPTO_AUTHENC is not set
 # CONFIG_CRYPTO_TEST is not set
@@ -1152,7 +1476,7 @@ CONFIG_CRYPTO_PCBC=m
 #
 # Digest
 #
-# CONFIG_CRYPTO_CRC32C is not set
+CONFIG_CRYPTO_CRC32C=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1189,15 +1513,21 @@ CONFIG_CRYPTO_DES=y
 # Compression
 #
 # CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
+# CONFIG_BINARY_PRINTF is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_GENERIC_FIND_LAST_BIT=y
 CONFIG_CRC_CCITT=y
 # CONFIG_CRC16 is not set
 CONFIG_CRC_T10DIF=y
@@ -1205,7 +1535,9 @@ CONFIG_CRC_T10DIF=y
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=y
-CONFIG_PLIST=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_DECOMPRESS_GZIP=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (7 preceding siblings ...)
  2009-08-12 12:21 ` [PATCH 08/10] OMAP3: Zoom2: Update board defconfig Tony Lindgren
@ 2009-08-12 12:22 ` Tony Lindgren
  2009-08-13  9:28   ` Russell King - ARM Linux
  2009-08-12 12:24 ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig Tony Lindgren
  2009-08-24 13:05 ` [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:22 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Felipe Balbi, linux-omap

From: Felipe Balbi <felipe.balbi@nokia.com>

without it twl4030_usb driver will not probe.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index cc02002..681f8b8 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -249,11 +249,16 @@ static struct regulator_init_data beagle_vpll2 = {
 	.consumer_supplies	= &beagle_vdvi_supply,
 };
 
+static struct twl4030_usb_data beagle_usb_data = {
+	.usb_mode	= T2_USB_MODE_ULPI,
+};
+
 static struct twl4030_platform_data beagle_twldata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
 
 	/* platform_data for children goes here */
+	.usb		= &beagle_usb_data,
 	.gpio		= &beagle_gpio_data,
 	.vmmc1		= &beagle_vmmc1,
 	.vsim		= &beagle_vsim,


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (8 preceding siblings ...)
  2009-08-12 12:22 ` [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data Tony Lindgren
@ 2009-08-12 12:24 ` Tony Lindgren
  2009-08-12 12:27   ` Felipe Balbi
  2009-08-24 13:05 ` [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
  10 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 12:24 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Paul Walmsley, linux-omap, Jason Kridner

From: Paul Walmsley <paul@pwsan.com>

Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
rev C2.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/configs/omap3_beagle_defconfig |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index 4c6fb7e..264ac2e 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -236,6 +236,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
 CONFIG_HAS_TLS_REG=y
 # CONFIG_OUTER_CACHE is not set
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -713,6 +714,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
@@ -741,6 +743,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
+CONFIG_TWL4030_CORE=y
 # CONFIG_UCB1400_CORE is not set
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_T7L66XB is not set
@@ -787,7 +790,7 @@ CONFIG_DUMMY_CONSOLE=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
-# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
 # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
@@ -806,6 +809,8 @@ CONFIG_USB_MON=y
 #
 # USB Host Controller Drivers
 #
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
 # CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_ISP1760_HCD is not set
@@ -923,6 +928,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 #
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_NEW_LEDS is not set
@@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
 #
 # Voltage and Current regulators
 #
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
 # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
 # CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
 
 #


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig
  2009-08-12 12:24 ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig Tony Lindgren
@ 2009-08-12 12:27   ` Felipe Balbi
  2009-08-12 16:52     ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2 Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Felipe Balbi @ 2009-08-12 12:27 UTC (permalink / raw)
  To: ext Tony Lindgren
  Cc: linux-arm-kernel, Paul Walmsley, linux-omap, Jason Kridner

Hi,

On Wed, Aug 12, 2009 at 02:24:15PM +0200, ext Tony Lindgren wrote:
> From: Paul Walmsley <paul@pwsan.com>
> 
> Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> rev C2.
> 
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Jason Kridner <jkridner@beagleboard.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/configs/omap3_beagle_defconfig |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
> index 4c6fb7e..264ac2e 100644
> --- a/arch/arm/configs/omap3_beagle_defconfig
> +++ b/arch/arm/configs/omap3_beagle_defconfig
> @@ -236,6 +236,7 @@ CONFIG_ARM_THUMB=y
>  # CONFIG_CPU_BPREDICT_DISABLE is not set
>  CONFIG_HAS_TLS_REG=y
>  # CONFIG_OUTER_CACHE is not set
> +CONFIG_COMMON_CLKDEV=y
>  
>  #
>  # Bus support
> @@ -713,6 +714,7 @@ CONFIG_GPIOLIB=y
>  # CONFIG_GPIO_MAX732X is not set
>  # CONFIG_GPIO_PCA953X is not set
>  # CONFIG_GPIO_PCF857X is not set
> +CONFIG_GPIO_TWL4030=y
>  
>  #
>  # PCI GPIO expanders:
> @@ -741,6 +743,7 @@ CONFIG_SSB_POSSIBLE=y
>  # CONFIG_MFD_SM501 is not set
>  # CONFIG_HTC_EGPIO is not set
>  # CONFIG_HTC_PASIC3 is not set
> +CONFIG_TWL4030_CORE=y
>  # CONFIG_UCB1400_CORE is not set
>  # CONFIG_MFD_TMIO is not set
>  # CONFIG_MFD_T7L66XB is not set
> @@ -787,7 +790,7 @@ CONFIG_DUMMY_CONSOLE=y
>  CONFIG_USB_SUPPORT=y
>  CONFIG_USB_ARCH_HAS_HCD=y
>  CONFIG_USB_ARCH_HAS_OHCI=y
> -# CONFIG_USB_ARCH_HAS_EHCI is not set
> +CONFIG_USB_ARCH_HAS_EHCI=y
>  CONFIG_USB=y
>  # CONFIG_USB_DEBUG is not set
>  # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
> @@ -806,6 +809,8 @@ CONFIG_USB_MON=y
>  #
>  # USB Host Controller Drivers
>  #
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_EHCI_ROOT_HUB_TT=y
>  # CONFIG_USB_C67X00_HCD is not set
>  # CONFIG_USB_ISP116X_HCD is not set
>  # CONFIG_USB_ISP1760_HCD is not set
> @@ -923,6 +928,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
>  #
>  # CONFIG_MMC_SDHCI is not set
>  # CONFIG_MMC_OMAP is not set
> +CONFIG_MMC_OMAP_HS=y
>  # CONFIG_MEMSTICK is not set
>  # CONFIG_ACCESSIBILITY is not set
>  # CONFIG_NEW_LEDS is not set
> @@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
>  #
>  # Voltage and Current regulators
>  #
> -# CONFIG_REGULATOR is not set
> +CONFIG_REGULATOR=y
>  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
>  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
>  # CONFIG_REGULATOR_BQ24022 is not set
> +CONFIG_REGULATOR_TWL4030=y
>  # CONFIG_UIO is not set

musb will still fail here if we don't have twl4030-usb enabled.

could you updated the patch to add that as well ??

-- 
balbi

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2
  2009-08-12 12:27   ` Felipe Balbi
@ 2009-08-12 16:52     ` Tony Lindgren
  2009-08-12 17:20       ` Kevin Hilman
  0 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-12 16:52 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-arm-kernel, Paul Walmsley, linux-omap, Jason Kridner

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

* Felipe Balbi <felipe.balbi@nokia.com> [090812 15:29]:
> Hi,
> 
> On Wed, Aug 12, 2009 at 02:24:15PM +0200, ext Tony Lindgren wrote:
> > From: Paul Walmsley <paul@pwsan.com>
> > 
> > Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> > Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> > rev C2.
> > 

<snip>

> > @@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
> >  #
> >  # Voltage and Current regulators
> >  #
> > -# CONFIG_REGULATOR is not set
> > +CONFIG_REGULATOR=y
> >  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
> >  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
> >  # CONFIG_REGULATOR_BQ24022 is not set
> > +CONFIG_REGULATOR_TWL4030=y
> >  # CONFIG_UIO is not set
> 
> musb will still fail here if we don't have twl4030-usb enabled.
> 
> could you updated the patch to add that as well ??

Updated. Maybe take a look and see if the USB options make sense
to you? I could not enable OTG for some reason..

Regards,

Tony

[-- Attachment #2: beagle-defconfig-v2.patch --]
[-- Type: text/x-diff, Size: 2840 bytes --]

>From 5dc8c8ffb27d93533d71493ca4a419f0290a3b2f Mon Sep 17 00:00:00 2001
From: Paul Walmsley <paul@pwsan.com>
Date: Wed, 12 Aug 2009 15:06:36 +0300
Subject: [PATCH] OMAP3: update OMAP3 Beagle defconfig

Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
rev C2.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index 4c6fb7e..882f374 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -236,6 +236,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
 CONFIG_HAS_TLS_REG=y
 # CONFIG_OUTER_CACHE is not set
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -713,6 +714,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
@@ -741,6 +743,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
+CONFIG_TWL4030_CORE=y
 # CONFIG_UCB1400_CORE is not set
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_T7L66XB is not set
@@ -787,7 +790,7 @@ CONFIG_DUMMY_CONSOLE=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
-# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
 # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
@@ -806,6 +809,8 @@ CONFIG_USB_MON=y
 #
 # USB Host Controller Drivers
 #
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
 # CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_ISP1760_HCD is not set
@@ -906,6 +911,15 @@ CONFIG_USB_ETH_RNDIS=y
 # CONFIG_USB_MIDI_GADGET is not set
 # CONFIG_USB_G_PRINTER is not set
 # CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+# CONFIG_NOP_USB_XCEIV is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
@@ -923,6 +937,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 #
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_NEW_LEDS is not set
@@ -981,10 +996,11 @@ CONFIG_RTC_INTF_DEV=y
 #
 # Voltage and Current regulators
 #
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
 # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
 # CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
 
 #

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2
  2009-08-12 16:52     ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2 Tony Lindgren
@ 2009-08-12 17:20       ` Kevin Hilman
  2009-08-12 19:11         ` Felipe Balbi
  0 siblings, 1 reply; 39+ messages in thread
From: Kevin Hilman @ 2009-08-12 17:20 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, linux-arm-kernel, Paul Walmsley, linux-omap, Jason Kridner

Tony Lindgren <tony@atomide.com> writes:

> * Felipe Balbi <felipe.balbi@nokia.com> [090812 15:29]:
>> Hi,
>> 
>> On Wed, Aug 12, 2009 at 02:24:15PM +0200, ext Tony Lindgren wrote:
>> > From: Paul Walmsley <paul@pwsan.com>
>> > 
>> > Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
>> > Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
>> > rev C2.
>> > 
>
> <snip>
>
>> > @@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
>> >  #
>> >  # Voltage and Current regulators
>> >  #
>> > -# CONFIG_REGULATOR is not set
>> > +CONFIG_REGULATOR=y
>> >  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
>> >  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
>> >  # CONFIG_REGULATOR_BQ24022 is not set
>> > +CONFIG_REGULATOR_TWL4030=y
>> >  # CONFIG_UIO is not set
>> 
>> musb will still fail here if we don't have twl4030-usb enabled.
>> 
>> could you updated the patch to add that as well ??
>
> Updated. Maybe take a look and see if the USB options make sense
> to you? I could not enable OTG for some reason..
>

Probably because OTG depends on CONFIG_PM I think.

Kevin

>
> From 5dc8c8ffb27d93533d71493ca4a419f0290a3b2f Mon Sep 17 00:00:00 2001
> From: Paul Walmsley <paul@pwsan.com>
> Date: Wed, 12 Aug 2009 15:06:36 +0300
> Subject: [PATCH] OMAP3: update OMAP3 Beagle defconfig
>
> Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> rev C2.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Jason Kridner <jkridner@beagleboard.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
> index 4c6fb7e..882f374 100644
> --- a/arch/arm/configs/omap3_beagle_defconfig
> +++ b/arch/arm/configs/omap3_beagle_defconfig
> @@ -236,6 +236,7 @@ CONFIG_ARM_THUMB=y
>  # CONFIG_CPU_BPREDICT_DISABLE is not set
>  CONFIG_HAS_TLS_REG=y
>  # CONFIG_OUTER_CACHE is not set
> +CONFIG_COMMON_CLKDEV=y
>  
>  #
>  # Bus support
> @@ -713,6 +714,7 @@ CONFIG_GPIOLIB=y
>  # CONFIG_GPIO_MAX732X is not set
>  # CONFIG_GPIO_PCA953X is not set
>  # CONFIG_GPIO_PCF857X is not set
> +CONFIG_GPIO_TWL4030=y
>  
>  #
>  # PCI GPIO expanders:
> @@ -741,6 +743,7 @@ CONFIG_SSB_POSSIBLE=y
>  # CONFIG_MFD_SM501 is not set
>  # CONFIG_HTC_EGPIO is not set
>  # CONFIG_HTC_PASIC3 is not set
> +CONFIG_TWL4030_CORE=y
>  # CONFIG_UCB1400_CORE is not set
>  # CONFIG_MFD_TMIO is not set
>  # CONFIG_MFD_T7L66XB is not set
> @@ -787,7 +790,7 @@ CONFIG_DUMMY_CONSOLE=y
>  CONFIG_USB_SUPPORT=y
>  CONFIG_USB_ARCH_HAS_HCD=y
>  CONFIG_USB_ARCH_HAS_OHCI=y
> -# CONFIG_USB_ARCH_HAS_EHCI is not set
> +CONFIG_USB_ARCH_HAS_EHCI=y
>  CONFIG_USB=y
>  # CONFIG_USB_DEBUG is not set
>  # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
> @@ -806,6 +809,8 @@ CONFIG_USB_MON=y
>  #
>  # USB Host Controller Drivers
>  #
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_EHCI_ROOT_HUB_TT=y
>  # CONFIG_USB_C67X00_HCD is not set
>  # CONFIG_USB_ISP116X_HCD is not set
>  # CONFIG_USB_ISP1760_HCD is not set
> @@ -906,6 +911,15 @@ CONFIG_USB_ETH_RNDIS=y
>  # CONFIG_USB_MIDI_GADGET is not set
>  # CONFIG_USB_G_PRINTER is not set
>  # CONFIG_USB_CDC_COMPOSITE is not set
> +
> +#
> +# OTG and related infrastructure
> +#
> +CONFIG_USB_OTG_UTILS=y
> +# CONFIG_USB_GPIO_VBUS is not set
> +# CONFIG_ISP1301_OMAP is not set
> +CONFIG_TWL4030_USB=y
> +# CONFIG_NOP_USB_XCEIV is not set
>  CONFIG_MMC=y
>  # CONFIG_MMC_DEBUG is not set
>  # CONFIG_MMC_UNSAFE_RESUME is not set
> @@ -923,6 +937,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
>  #
>  # CONFIG_MMC_SDHCI is not set
>  # CONFIG_MMC_OMAP is not set
> +CONFIG_MMC_OMAP_HS=y
>  # CONFIG_MEMSTICK is not set
>  # CONFIG_ACCESSIBILITY is not set
>  # CONFIG_NEW_LEDS is not set
> @@ -981,10 +996,11 @@ CONFIG_RTC_INTF_DEV=y
>  #
>  # Voltage and Current regulators
>  #
> -# CONFIG_REGULATOR is not set
> +CONFIG_REGULATOR=y
>  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
>  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
>  # CONFIG_REGULATOR_BQ24022 is not set
> +CONFIG_REGULATOR_TWL4030=y
>  # CONFIG_UIO is not set
>  
>  #

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2
  2009-08-12 17:20       ` Kevin Hilman
@ 2009-08-12 19:11         ` Felipe Balbi
  2009-08-13  7:02           ` Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Felipe Balbi @ 2009-08-12 19:11 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Tony Lindgren, Felipe Balbi, linux-arm-kernel, Paul Walmsley,
	linux-omap, Jason Kridner

On Wed, Aug 12, 2009 at 10:20:34AM -0700, Kevin Hilman wrote:
> Tony Lindgren <tony@atomide.com> writes:
> 
> > * Felipe Balbi <felipe.balbi@nokia.com> [090812 15:29]:
> >> Hi,
> >> 
> >> On Wed, Aug 12, 2009 at 02:24:15PM +0200, ext Tony Lindgren wrote:
> >> > From: Paul Walmsley <paul@pwsan.com>
> >> > 
> >> > Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> >> > Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> >> > rev C2.
> >> > 
> >
> > <snip>
> >
> >> > @@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
> >> >  #
> >> >  # Voltage and Current regulators
> >> >  #
> >> > -# CONFIG_REGULATOR is not set
> >> > +CONFIG_REGULATOR=y
> >> >  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
> >> >  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
> >> >  # CONFIG_REGULATOR_BQ24022 is not set
> >> > +CONFIG_REGULATOR_TWL4030=y
> >> >  # CONFIG_UIO is not set
> >> 
> >> musb will still fail here if we don't have twl4030-usb enabled.
> >> 
> >> could you updated the patch to add that as well ??
> >
> > Updated. Maybe take a look and see if the USB options make sense
> > to you? I could not enable OTG for some reason..
> >
> 
> Probably because OTG depends on CONFIG_PM I think.

correct

-- 
balbi

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2
  2009-08-12 19:11         ` Felipe Balbi
@ 2009-08-13  7:02           ` Tony Lindgren
  2009-08-16  1:48             ` Eric Witcher
  0 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-13  7:02 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Kevin Hilman, Felipe Balbi, linux-arm-kernel, Paul Walmsley,
	linux-omap, Jason Kridner

* Felipe Balbi <me@felipebalbi.com> [090812 22:11]:
> On Wed, Aug 12, 2009 at 10:20:34AM -0700, Kevin Hilman wrote:
> > Tony Lindgren <tony@atomide.com> writes:
> > 
> > > * Felipe Balbi <felipe.balbi@nokia.com> [090812 15:29]:
> > >> Hi,
> > >> 
> > >> On Wed, Aug 12, 2009 at 02:24:15PM +0200, ext Tony Lindgren wrote:
> > >> > From: Paul Walmsley <paul@pwsan.com>
> > >> > 
> > >> > Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> > >> > Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> > >> > rev C2.
> > >> > 
> > >
> > > <snip>
> > >
> > >> > @@ -981,10 +987,11 @@ CONFIG_RTC_INTF_DEV=y
> > >> >  #
> > >> >  # Voltage and Current regulators
> > >> >  #
> > >> > -# CONFIG_REGULATOR is not set
> > >> > +CONFIG_REGULATOR=y
> > >> >  # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
> > >> >  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
> > >> >  # CONFIG_REGULATOR_BQ24022 is not set
> > >> > +CONFIG_REGULATOR_TWL4030=y
> > >> >  # CONFIG_UIO is not set
> > >> 
> > >> musb will still fail here if we don't have twl4030-usb enabled.
> > >> 
> > >> could you updated the patch to add that as well ??
> > >
> > > Updated. Maybe take a look and see if the USB options make sense
> > > to you? I could not enable OTG for some reason..
> > >
> > 
> > Probably because OTG depends on CONFIG_PM I think.
> 
> correct

I don't have a Beagle, so somebody please check this defconfig and enable
PM and OTG if possible.

Tony

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap()
  2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
@ 2009-08-13  9:21   ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:21 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap, Hiroshi DOYU

On Wed, Aug 12, 2009 at 03:12:00PM +0300, Tony Lindgren wrote:
> From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> 
> The second argument should be the end address, not the
> length. Actually there will not be any effect on the behavior of this
> driver since flush_cache_vmap() calls flush_cache_all() in the end.

Ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-12 12:13 ` [PATCH 02/10] OMAP: iommu: add initial debugfs support Tony Lindgren
@ 2009-08-13  9:23   ` Russell King - ARM Linux
  2009-08-15 12:06     ` Hiroshi DOYU
  0 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:23 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap, Hiroshi DOYU

On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> +static DEFINE_MUTEX(iommu_debug_lock);
> +static char local_buffer[SZ_4K];

I don't like this - what if the data you're sprintf'ing into this
buffer overflows it?

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig
  2009-08-12 12:16 ` [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig Tony Lindgren
@ 2009-08-13  9:24   ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:24 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, Sergio Aguirre, linux-omap

On Wed, Aug 12, 2009 at 03:16:00PM +0300, Tony Lindgren wrote:
> From: Sergio Aguirre <saaguirre@ti.com>
> 
> This patch makes the SDP boot again with the defconfig.

Ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration
  2009-08-12 12:17 ` [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration Tony Lindgren
@ 2009-08-13  9:24   ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:24 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, Atal Shargorodsky, linux-omap

On Wed, Aug 12, 2009 at 03:17:24PM +0300, Tony Lindgren wrote:
> From: Timo Kokkonen <timo.t.kokkonen@nokia.com>
> 
> twl4030 watchdog will be compiled as a module by default.

Ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 06/10] OMAP3: MMC: Add mux for pins
  2009-08-12 12:18 ` [PATCH 06/10] OMAP3: MMC: Add mux for pins Tony Lindgren
@ 2009-08-13  9:26   ` Russell King - ARM Linux
  2009-08-16 15:25     ` [PATCH 06/10] OMAP3: MMC: Add mux for pins, v2 Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, Vikram Pandita, linux-omap, Chikkature Rajashekar

On Wed, Aug 12, 2009 at 03:18:49PM +0300, Tony Lindgren wrote:
> +			if (mmc_controller->slots[0].wires == 8)
> +				printk(KERN_WARNING
> +					"\n MMC2: DAT4, DAT5, DAT6, DAT7: "
> +					"Setup the mux in board file");
> +		}
> +		if (controller_nr == 2) {
> +			/* MMC3 */
> +			printk(KERN_WARNING
> +				"\n MMC3: Setup the mux in board file: "
> +				"Multiple options exist, so is board specific");
> +		}

Having printks which issue a level, followed by a newline, message and
omitting the newline at the end looks really wrong:

- firstly, the KERN_WARNING "\n" line creates a blank line in the kernel
  message log.
- the message itself will be at the kernels default message level
- the following kernel message will be appended to the end, with any
  level tag exposed.

So I think the above printk statements are completely wrong and broken.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support
  2009-08-12 12:20 ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support Tony Lindgren
@ 2009-08-13  9:27   ` Russell King - ARM Linux
  2009-08-16 15:28     ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support,v 2 Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, Vikram Pandita, linux-omap

On Wed, Aug 12, 2009 at 03:20:07PM +0300, Tony Lindgren wrote:
> +static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
> +	.rows		= 8,
> +	.cols		= 8,
> +	.keymap		= zoom2_twl4030_keymap,
> +	.keymapsize	= ARRAY_SIZE(zoom2_twl4030_keymap),
> +	.rep		= 1,
> +};

Normally have a blank line here.

>  static void __init omap_zoom2_init_irq(void)
>  {
>  	omap2_init_common_hw(NULL);

Otherwise ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 08/10] OMAP3: Zoom2: Update board defconfig
  2009-08-12 12:21 ` [PATCH 08/10] OMAP3: Zoom2: Update board defconfig Tony Lindgren
@ 2009-08-13  9:28   ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:28 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, Vikram Pandita, linux-omap

On Wed, Aug 12, 2009 at 03:21:25PM +0300, Tony Lindgren wrote:
> From: Vikram Pandita <vikram.pandita@ti.com>
> 
> Update defconfig for Zoom2 to include
> TWL4030 core
> TWL4030 drivers (bci, gpio, keypad, usb, mmc)

Ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data
  2009-08-12 12:22 ` [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data Tony Lindgren
@ 2009-08-13  9:28   ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-13  9:28 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, Felipe Balbi, linux-omap

On Wed, Aug 12, 2009 at 03:22:51PM +0300, Tony Lindgren wrote:
> From: Felipe Balbi <felipe.balbi@nokia.com>
> 
> without it twl4030_usb driver will not probe.

Ok.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-13  9:23   ` Russell King - ARM Linux
@ 2009-08-15 12:06     ` Hiroshi DOYU
  2009-08-16 15:13       ` Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Hiroshi DOYU @ 2009-08-15 12:06 UTC (permalink / raw)
  To: linux; +Cc: tony, linux-arm-kernel, linux-omap

[-- Attachment #1: Type: Text/Plain, Size: 535 bytes --]

Hi Russell,

From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
Date: Thu, 13 Aug 2009 11:23:59 +0200

> On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> > +static DEFINE_MUTEX(iommu_debug_lock);
> > +static char local_buffer[SZ_4K];
> 
> I don't like this - what if the data you're sprintf'ing into this
> buffer overflows it?

Right.

I have attached the updated version which limits max write counts to
avoid the above buffer overflow.




[-- Attachment #2: 0001-OMAP-iommu-add-initial-debugfs-support.patch --]
[-- Type: Application/Octet-Stream, Size: 15615 bytes --]

From ac6962fe970c7d6259a17e36a578eac8a800452a Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Wed, 12 Aug 2009 15:06:33 +0300
Subject: [PATCH 1/1] OMAP: iommu: add initial debugfs support

This enables to peek the following data.

$ /debug/iommu/isp# ls
mem             nr_tlb_entries  regs
mmap            pagetable       tlb
$ /debug/iommu/isp# head pagetable
L:      da:      pa:
-----------------------------------------
2: 00001000 8ae4a002
2: 00002000 8e7bb002
2: 00003000 8ae49002
2: 00004000 8ae65002
.....

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/iommu2.c            |   18 +-
 arch/arm/plat-omap/Kconfig              |    4 +
 arch/arm/plat-omap/Makefile             |    1 +
 arch/arm/plat-omap/include/mach/iommu.h |    6 +-
 arch/arm/plat-omap/iommu-debug.c        |  413 +++++++++++++++++++++++++++++++
 arch/arm/plat-omap/iommu.c              |   23 +-
 6 files changed, 446 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/plat-omap/iommu-debug.c

diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a..00f0ab3 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -217,10 +217,18 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
 }
 
 #define pr_reg(name)							\
-	p += sprintf(p, "%20s: %08x\n",					\
-		     __stringify(name), iommu_read_reg(obj, MMU_##name));
-
-static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
+	do {								\
+		ssize_t bytes;						\
+		const char *str = "%20s: %08x\n";			\
+		bytes = snprintf(p, 32, str, __stringify(name),		\
+				 iommu_read_reg(obj, MMU_##name));	\
+		p += bytes;						\
+		len -= bytes;						\
+		if (len < strlen(str) + 1)				\
+			goto out;					\
+	} while (0)
+
+static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
 {
 	char *p = buf;
 
@@ -242,7 +250,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
 	pr_reg(READ_CAM);
 	pr_reg(READ_RAM);
 	pr_reg(EMU_FAULT_AD);
-
+out:
 	return p - buf;
 }
 
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..ab9f9ef 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
 config OMAP_IOMMU
 	tristate
 
+config OMAP_IOMMU_DEBUG
+	depends on OMAP_IOMMU
+	tristate
+
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a832795..769a4c2 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
 
 obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
 obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
index 769b00b..46d41ac 100644
--- a/arch/arm/plat-omap/include/mach/iommu.h
+++ b/arch/arm/plat-omap/include/mach/iommu.h
@@ -95,7 +95,7 @@ struct iommu_functions {
 
 	void (*save_ctx)(struct iommu *obj);
 	void (*restore_ctx)(struct iommu *obj);
-	ssize_t (*dump_ctx)(struct iommu *obj, char *buf);
+	ssize_t (*dump_ctx)(struct iommu *obj, char *buf, ssize_t len);
 };
 
 struct iommu_platform_data {
@@ -162,7 +162,7 @@ extern void uninstall_iommu_arch(const struct iommu_functions *ops);
 extern int foreach_iommu_device(void *data,
 				int (*fn)(struct device *, void *));
 
-extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf);
-extern size_t dump_tlb_entries(struct iommu *obj, char *buf);
+extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len);
+extern size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t len);
 
 #endif /* __MACH_IOMMU_H */
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
new file mode 100644
index 0000000..536e897
--- /dev/null
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -0,0 +1,413 @@
+/*
+ * omap iommu: debugfs interface
+ *
+ * Copyright (C) 2008-2009 Nokia Corporation
+ *
+ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
+#include <linux/platform_device.h>
+#include <linux/debugfs.h>
+
+#include <mach/iommu.h>
+#include <mach/iovmm.h>
+
+#include "iopgtable.h"
+
+#define MAXCOLUMN 100 /* for short messages */
+
+static DEFINE_MUTEX(iommu_debug_lock);
+
+static struct dentry *iommu_debug_root;
+
+static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	u32 ver = iommu_arch_version();
+	char buf[MAXCOLUMN], *p = buf;
+
+	p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
+
+	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+}
+
+static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = iommu_dump_ctx(obj, p, count);
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes, rest;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
+	p += sprintf(p, "-----------------------------------------\n");
+	rest = count - (p - buf);
+	p += dump_tlb_entries(obj, p, rest);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_pagetable(struct file *file,
+		     const char __user *userbuf, size_t count, loff_t *ppos)
+{
+	struct iotlb_entry e;
+	struct cr_regs cr;
+	int err;
+	struct iommu *obj = file->private_data;
+	char buf[MAXCOLUMN], *p = buf;
+
+	count = min(count, sizeof(buf));
+
+	mutex_lock(&iommu_debug_lock);
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	sscanf(p, "%x %x", &cr.cam, &cr.ram);
+	if (!cr.cam || !cr.ram) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+
+	iotlb_cr_to_e(&cr, &e);
+	err = iopgtable_store_entry(obj, &e);
+	if (err)
+		dev_err(obj->dev, "%s: fail to store cr\n", __func__);
+
+	mutex_unlock(&iommu_debug_lock);
+	return count;
+}
+
+#define dump_ioptable_entry_one(lv, da, pteval)			\
+	({							\
+		int __err = 0;					\
+		ssize_t bytes;					\
+		const char *str = "%d: %08x %08x\n";		\
+		bytes = snprintf(p, 22, str, lv, da, pteval);	\
+		p += bytes;					\
+		len -= bytes;					\
+		if (len < strlen(str) + 1)			\
+			__err = -ENOMEM;			\
+		__err;						\
+	})
+
+static ssize_t dump_ioptable(struct iommu *obj, char *buf, ssize_t len)
+{
+	int i;
+	u32 *iopgd;
+	char *p = buf;
+
+	spin_lock(&obj->page_table_lock);
+
+	iopgd = iopgd_offset(obj, 0);
+	for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
+		int j, err;
+		u32 *iopte;
+		u32 da;
+
+		if (!*iopgd)
+			continue;
+
+		if (!(*iopgd & IOPGD_TABLE)) {
+			da = i << IOPGD_SHIFT;
+
+			err = dump_ioptable_entry_one(1, da, *iopgd);
+			if (err)
+				goto out;
+			continue;
+		}
+
+		iopte = iopte_offset(iopgd, 0);
+
+		for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
+			if (!*iopte)
+				continue;
+
+			da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
+			err = dump_ioptable_entry_one(2, da, *iopgd);
+			if (err)
+				goto out;
+		}
+	}
+out:
+	spin_unlock(&obj->page_table_lock);
+
+	return p - buf;
+}
+
+static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
+				    size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	size_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
+	p += sprintf(p, "-----------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = PAGE_SIZE - (p - buf);
+	p += dump_ioptable(obj, p, bytes);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *tmp;
+	int uninitialized_var(i);
+	ssize_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
+		     "No", "start", "end", "size", "flags");
+	p += sprintf(p, "-------------------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	list_for_each_entry(tmp, &obj->mmap, list) {
+		size_t len;
+		const char *str = "%3d %08x-%08x %6x %8x\n";
+
+		len = tmp->da_end - tmp->da_start;
+		p += snprintf(p, strlen(str) + 1, str,
+			      i, tmp->da_start, tmp->da_end, len, tmp->flags);
+
+		if ((strlen(str) + 1) > (PAGE_SIZE - (p - buf)))
+			break;
+		i++;
+	}
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *area;
+	ssize_t bytes;
+
+	count = min_t(ssize_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(p, area->va, count);
+	p += count;
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	struct iovm_struct *area;
+	char *p, *buf;
+
+	count = min_t(size_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(area->va, p, count);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return count;
+}
+
+static int debug_open_generic(struct inode *inode, struct file *file)
+{
+	file->private_data = inode->i_private;
+	return 0;
+}
+
+#define DEBUG_FOPS(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+		.write = debug_write_##name,				\
+	};
+
+#define DEBUG_FOPS_RO(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+	};
+
+DEBUG_FOPS_RO(ver);
+DEBUG_FOPS_RO(regs);
+DEBUG_FOPS_RO(tlb);
+DEBUG_FOPS(pagetable);
+DEBUG_FOPS_RO(mmap);
+DEBUG_FOPS(mem);
+
+#define __DEBUG_ADD_FILE(attr, mode)					\
+	{								\
+		struct dentry *dent;					\
+		dent = debugfs_create_file(#attr, mode, parent,		\
+					   obj, &debug_##attr##_fops);	\
+		if (!dent)						\
+			return -ENOMEM;					\
+	}
+
+#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
+#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
+
+static int iommu_debug_register(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct iommu *obj = platform_get_drvdata(pdev);
+	struct dentry *d, *parent;
+
+	if (!obj || !obj->dev)
+		return -EINVAL;
+
+	d = debugfs_create_dir(obj->name, iommu_debug_root);
+	if (!d)
+		return -ENOMEM;
+	parent = d;
+
+	d = debugfs_create_u8("nr_tlb_entries", 400, parent,
+			      (u8 *)&obj->nr_tlb_entries);
+	if (!d)
+		return -ENOMEM;
+
+	DEBUG_ADD_FILE_RO(ver);
+	DEBUG_ADD_FILE_RO(regs);
+	DEBUG_ADD_FILE_RO(tlb);
+	DEBUG_ADD_FILE(pagetable);
+	DEBUG_ADD_FILE_RO(mmap);
+	DEBUG_ADD_FILE(mem);
+
+	return 0;
+}
+
+static int __init iommu_debug_init(void)
+{
+	struct dentry *d;
+	int err;
+
+	d = debugfs_create_dir("iommu", NULL);
+	if (!d)
+		return -ENOMEM;
+	iommu_debug_root = d;
+
+	err = foreach_iommu_device(d, iommu_debug_register);
+	if (err)
+		goto err_out;
+	return 0;
+
+err_out:
+	debugfs_remove_recursive(iommu_debug_root);
+	return err;
+}
+module_init(iommu_debug_init)
+
+static void __exit iommu_debugfs_exit(void)
+{
+	debugfs_remove_recursive(iommu_debug_root);
+}
+module_exit(iommu_debugfs_exit)
+
+MODULE_DESCRIPTION("omap iommu: debugfs interface");
+MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
+MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4a03013..4b60127 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -351,16 +351,14 @@ EXPORT_SYMBOL_GPL(flush_iotlb_all);
 
 #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
 
-ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
+ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	ssize_t bytes;
-
 	if (!obj || !buf)
 		return -EINVAL;
 
 	clk_enable(obj->clk);
 
-	bytes = arch_iommu->dump_ctx(obj, buf);
+	bytes = arch_iommu->dump_ctx(obj, buf, bytes);
 
 	clk_disable(obj->clk);
 
@@ -368,7 +366,7 @@ ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
 }
 EXPORT_SYMBOL_GPL(iommu_dump_ctx);
 
-static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
+static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs, int num)
 {
 	int i;
 	struct iotlb_lock saved, l;
@@ -379,7 +377,7 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
 	iotlb_lock_get(obj, &saved);
 	memcpy(&l, &saved, sizeof(saved));
 
-	for (i = 0; i < obj->nr_tlb_entries; i++) {
+	for (i = 0; i < num; i++) {
 		struct cr_regs tmp;
 
 		iotlb_lock_get(obj, &l);
@@ -402,18 +400,21 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
  * @obj:	target iommu
  * @buf:	output buffer
  **/
-size_t dump_tlb_entries(struct iommu *obj, char *buf)
+size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	int i, n;
+	int i, num;
 	struct cr_regs *cr;
 	char *p = buf;
 
-	cr = kcalloc(obj->nr_tlb_entries, sizeof(*cr), GFP_KERNEL);
+	num = bytes / sizeof(*cr);
+	num = min(obj->nr_tlb_entries, num);
+
+	cr = kcalloc(num, sizeof(*cr), GFP_KERNEL);
 	if (!cr)
 		return 0;
 
-	n = __dump_tlb_entries(obj, cr);
-	for (i = 0; i < n; i++)
+	num = __dump_tlb_entries(obj, cr, num);
+	for (i = 0; i < num; i++)
 		p += iotlb_dump_cr(obj, cr + i, p);
 	kfree(cr);
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2
  2009-08-13  7:02           ` Tony Lindgren
@ 2009-08-16  1:48             ` Eric Witcher
  2009-08-16 15:42               ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3 Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Eric Witcher @ 2009-08-16  1:48 UTC (permalink / raw)
  To: linux-omap

Tony Lindgren <tony <at> atomide.com> writes:

<snip>

> I don't have a Beagle, so somebody please check this defconfig and enable
> PM and OTG if possible.
> 
> Tony
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo <at> vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
Hi,

I checked this defconfig at it's commit
5dc8c8ffb27d93533d71493ca4a419f0290a3b2f
with the following:

1.  Brought omap3_beagle_defconfig forward to  2.6.31-rc5 level.
(via make gconfig)  

2.  Enabled CONFIG_PM, CONFIG_USB_MUSB_OTG, and
 CONFIG_USB_GADGET_MUSB_HDRC with associated
default subchoices. (via make gconfig)

3.  Removed 1 line work in progress? from arch/arm/mach-omap2/serial.c

4.  Added previously posted (but not committed) patch
for drivers/usb/otg/twl4030-usb.c

I was able to boot through INIT.

The diffs are against the 2.6.31-rc5 generated
version of omap3_beagle_defconfig.

Hope this helps.

diff --git a/arch/arm/configs/omap3_beagle_defconfig
b/arch/arm/configs/omap3_beagle_defconfig
index 59eaf8c..3c001e5 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.31-rc5
-# Sat Aug 15 19:12:37 2009
+# Sat Aug 15 20:05:10 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -136,7 +136,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
-# CONFIG_FREEZER is not set
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -338,7 +338,12 @@ CONFIG_BINFMT_MISC=y
 #
 # Power management options
 #
-# CONFIG_PM is not set
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
@@ -829,7 +834,8 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 CONFIG_USB_DEVICE_CLASS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
 CONFIG_USB_MON=y
@@ -853,10 +859,10 @@ CONFIG_USB_MUSB_SOC=y
 #
 # OMAP 343x high speed USB support
 #
-CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_HOST is not set
 # CONFIG_USB_MUSB_PERIPHERAL is not set
-# CONFIG_USB_MUSB_OTG is not set
-# CONFIG_USB_GADGET_MUSB_HDRC is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
 CONFIG_USB_MUSB_HDRC_HCD=y
 # CONFIG_MUSB_PIO_ONLY is not set
 CONFIG_USB_INVENTRA_DMA=y
@@ -931,8 +937,7 @@ CONFIG_USB_GADGET_SELECTED=y
 # CONFIG_USB_GADGET_S3C_HSOTG is not set
 # CONFIG_USB_GADGET_IMX is not set
 # CONFIG_USB_GADGET_S3C2410 is not set
-CONFIG_USB_GADGET_M66592=y
-CONFIG_USB_M66592=y
+# CONFIG_USB_GADGET_M66592 is not set
 # CONFIG_USB_GADGET_AMD5536UDC is not set
 # CONFIG_USB_GADGET_FSL_QE is not set
 # CONFIG_USB_GADGET_CI13XXX is not set
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 3f29376..bd9e2b2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -429,7 +429,6 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 		omap_ctrl_writew(v, uart->padconf);
 	}
 
-	p->irqflags |= IRQF_SHARED;
 	ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED,
 			  "serial idle", (void *)uart);
 	WARN_ON(ret);
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 9e3e7a5..d1852d4 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -774,7 +774,7 @@ static int __init twl4030_usb_init(void)
 {
 	return platform_driver_register(&twl4030_usb_driver);
 }
-subsys_initcall(twl4030_usb_init);
+subsys_initcall_sync(twl4030_usb_init);
 
 static void __exit twl4030_usb_exit(void)
 {













^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-15 12:06     ` Hiroshi DOYU
@ 2009-08-16 15:13       ` Tony Lindgren
  2009-08-16 20:47         ` Russell King - ARM Linux
  0 siblings, 1 reply; 39+ messages in thread
From: Tony Lindgren @ 2009-08-16 15:13 UTC (permalink / raw)
  To: Hiroshi DOYU; +Cc: linux, linux-arm-kernel, linux-omap

* Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090815 15:06]:
> Hi Russell,
> 
> From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
> Date: Thu, 13 Aug 2009 11:23:59 +0200
> 
> > On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> > > +static DEFINE_MUTEX(iommu_debug_lock);
> > > +static char local_buffer[SZ_4K];
> > 
> > I don't like this - what if the data you're sprintf'ing into this
> > buffer overflows it?
> 
> Right.
> 
> I have attached the updated version which limits max write counts to
> avoid the above buffer overflow.

Thanks, I've update my queue with it.

Tony


> From ac6962fe970c7d6259a17e36a578eac8a800452a Mon Sep 17 00:00:00 2001
> From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> Date: Wed, 12 Aug 2009 15:06:33 +0300
> Subject: [PATCH 1/1] OMAP: iommu: add initial debugfs support
> 
> This enables to peek the following data.
> 
> $ /debug/iommu/isp# ls
> mem             nr_tlb_entries  regs
> mmap            pagetable       tlb
> $ /debug/iommu/isp# head pagetable
> L:      da:      pa:
> -----------------------------------------
> 2: 00001000 8ae4a002
> 2: 00002000 8e7bb002
> 2: 00003000 8ae49002
> 2: 00004000 8ae65002
> .....
> 
> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/iommu2.c            |   18 +-
>  arch/arm/plat-omap/Kconfig              |    4 +
>  arch/arm/plat-omap/Makefile             |    1 +
>  arch/arm/plat-omap/include/mach/iommu.h |    6 +-
>  arch/arm/plat-omap/iommu-debug.c        |  413 +++++++++++++++++++++++++++++++
>  arch/arm/plat-omap/iommu.c              |   23 +-
>  6 files changed, 446 insertions(+), 19 deletions(-)
>  create mode 100644 arch/arm/plat-omap/iommu-debug.c
> 
> diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
> index 015f22a..00f0ab3 100644
> --- a/arch/arm/mach-omap2/iommu2.c
> +++ b/arch/arm/mach-omap2/iommu2.c
> @@ -217,10 +217,18 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
>  }
>  
>  #define pr_reg(name)							\
> -	p += sprintf(p, "%20s: %08x\n",					\
> -		     __stringify(name), iommu_read_reg(obj, MMU_##name));
> -
> -static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
> +	do {								\
> +		ssize_t bytes;						\
> +		const char *str = "%20s: %08x\n";			\
> +		bytes = snprintf(p, 32, str, __stringify(name),		\
> +				 iommu_read_reg(obj, MMU_##name));	\
> +		p += bytes;						\
> +		len -= bytes;						\
> +		if (len < strlen(str) + 1)				\
> +			goto out;					\
> +	} while (0)
> +
> +static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
>  {
>  	char *p = buf;
>  
> @@ -242,7 +250,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
>  	pr_reg(READ_CAM);
>  	pr_reg(READ_RAM);
>  	pr_reg(EMU_FAULT_AD);
> -
> +out:
>  	return p - buf;
>  }
>  
> diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> index efe85d0..ab9f9ef 100644
> --- a/arch/arm/plat-omap/Kconfig
> +++ b/arch/arm/plat-omap/Kconfig
> @@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
>  config OMAP_IOMMU
>  	tristate
>  
> +config OMAP_IOMMU_DEBUG
> +	depends on OMAP_IOMMU
> +	tristate
> +
>  choice
>          prompt "System timer"
>  	default OMAP_MPU_TIMER
> diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
> index a832795..769a4c2 100644
> --- a/arch/arm/plat-omap/Makefile
> +++ b/arch/arm/plat-omap/Makefile
> @@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
>  
>  obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
>  obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
> +obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
>  
>  obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
>  obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
> diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
> index 769b00b..46d41ac 100644
> --- a/arch/arm/plat-omap/include/mach/iommu.h
> +++ b/arch/arm/plat-omap/include/mach/iommu.h
> @@ -95,7 +95,7 @@ struct iommu_functions {
>  
>  	void (*save_ctx)(struct iommu *obj);
>  	void (*restore_ctx)(struct iommu *obj);
> -	ssize_t (*dump_ctx)(struct iommu *obj, char *buf);
> +	ssize_t (*dump_ctx)(struct iommu *obj, char *buf, ssize_t len);
>  };
>  
>  struct iommu_platform_data {
> @@ -162,7 +162,7 @@ extern void uninstall_iommu_arch(const struct iommu_functions *ops);
>  extern int foreach_iommu_device(void *data,
>  				int (*fn)(struct device *, void *));
>  
> -extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf);
> -extern size_t dump_tlb_entries(struct iommu *obj, char *buf);
> +extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len);
> +extern size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t len);
>  
>  #endif /* __MACH_IOMMU_H */
> diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
> new file mode 100644
> index 0000000..536e897
> --- /dev/null
> +++ b/arch/arm/plat-omap/iommu-debug.c
> @@ -0,0 +1,413 @@
> +/*
> + * omap iommu: debugfs interface
> + *
> + * Copyright (C) 2008-2009 Nokia Corporation
> + *
> + * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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/err.h>
> +#include <linux/clk.h>
> +#include <linux/io.h>
> +#include <linux/uaccess.h>
> +#include <linux/platform_device.h>
> +#include <linux/debugfs.h>
> +
> +#include <mach/iommu.h>
> +#include <mach/iovmm.h>
> +
> +#include "iopgtable.h"
> +
> +#define MAXCOLUMN 100 /* for short messages */
> +
> +static DEFINE_MUTEX(iommu_debug_lock);
> +
> +static struct dentry *iommu_debug_root;
> +
> +static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
> +			      size_t count, loff_t *ppos)
> +{
> +	u32 ver = iommu_arch_version();
> +	char buf[MAXCOLUMN], *p = buf;
> +
> +	p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
> +
> +	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> +}
> +
> +static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
> +			       size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	char *p, *buf;
> +	ssize_t bytes;
> +
> +	buf = kmalloc(count, GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	bytes = iommu_dump_ctx(obj, p, count);
> +	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	kfree(buf);
> +
> +	return bytes;
> +}
> +
> +static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
> +			      size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	char *p, *buf;
> +	ssize_t bytes, rest;
> +
> +	buf = kmalloc(count, GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
> +	p += sprintf(p, "-----------------------------------------\n");
> +	rest = count - (p - buf);
> +	p += dump_tlb_entries(obj, p, rest);
> +
> +	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	kfree(buf);
> +
> +	return bytes;
> +}
> +
> +static ssize_t debug_write_pagetable(struct file *file,
> +		     const char __user *userbuf, size_t count, loff_t *ppos)
> +{
> +	struct iotlb_entry e;
> +	struct cr_regs cr;
> +	int err;
> +	struct iommu *obj = file->private_data;
> +	char buf[MAXCOLUMN], *p = buf;
> +
> +	count = min(count, sizeof(buf));
> +
> +	mutex_lock(&iommu_debug_lock);
> +	if (copy_from_user(p, userbuf, count)) {
> +		mutex_unlock(&iommu_debug_lock);
> +		return -EFAULT;
> +	}
> +
> +	sscanf(p, "%x %x", &cr.cam, &cr.ram);
> +	if (!cr.cam || !cr.ram) {
> +		mutex_unlock(&iommu_debug_lock);
> +		return -EINVAL;
> +	}
> +
> +	iotlb_cr_to_e(&cr, &e);
> +	err = iopgtable_store_entry(obj, &e);
> +	if (err)
> +		dev_err(obj->dev, "%s: fail to store cr\n", __func__);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	return count;
> +}
> +
> +#define dump_ioptable_entry_one(lv, da, pteval)			\
> +	({							\
> +		int __err = 0;					\
> +		ssize_t bytes;					\
> +		const char *str = "%d: %08x %08x\n";		\
> +		bytes = snprintf(p, 22, str, lv, da, pteval);	\
> +		p += bytes;					\
> +		len -= bytes;					\
> +		if (len < strlen(str) + 1)			\
> +			__err = -ENOMEM;			\
> +		__err;						\
> +	})
> +
> +static ssize_t dump_ioptable(struct iommu *obj, char *buf, ssize_t len)
> +{
> +	int i;
> +	u32 *iopgd;
> +	char *p = buf;
> +
> +	spin_lock(&obj->page_table_lock);
> +
> +	iopgd = iopgd_offset(obj, 0);
> +	for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
> +		int j, err;
> +		u32 *iopte;
> +		u32 da;
> +
> +		if (!*iopgd)
> +			continue;
> +
> +		if (!(*iopgd & IOPGD_TABLE)) {
> +			da = i << IOPGD_SHIFT;
> +
> +			err = dump_ioptable_entry_one(1, da, *iopgd);
> +			if (err)
> +				goto out;
> +			continue;
> +		}
> +
> +		iopte = iopte_offset(iopgd, 0);
> +
> +		for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
> +			if (!*iopte)
> +				continue;
> +
> +			da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
> +			err = dump_ioptable_entry_one(2, da, *iopgd);
> +			if (err)
> +				goto out;
> +		}
> +	}
> +out:
> +	spin_unlock(&obj->page_table_lock);
> +
> +	return p - buf;
> +}
> +
> +static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
> +				    size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	char *p, *buf;
> +	size_t bytes;
> +
> +	buf = (char *)__get_free_page(GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
> +	p += sprintf(p, "-----------------------------------------\n");
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	bytes = PAGE_SIZE - (p - buf);
> +	p += dump_ioptable(obj, p, bytes);
> +
> +	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	free_page((unsigned long)buf);
> +
> +	return bytes;
> +}
> +
> +static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
> +			       size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	char *p, *buf;
> +	struct iovm_struct *tmp;
> +	int uninitialized_var(i);
> +	ssize_t bytes;
> +
> +	buf = (char *)__get_free_page(GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
> +		     "No", "start", "end", "size", "flags");
> +	p += sprintf(p, "-------------------------------------------------\n");
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	list_for_each_entry(tmp, &obj->mmap, list) {
> +		size_t len;
> +		const char *str = "%3d %08x-%08x %6x %8x\n";
> +
> +		len = tmp->da_end - tmp->da_start;
> +		p += snprintf(p, strlen(str) + 1, str,
> +			      i, tmp->da_start, tmp->da_end, len, tmp->flags);
> +
> +		if ((strlen(str) + 1) > (PAGE_SIZE - (p - buf)))
> +			break;
> +		i++;
> +	}
> +
> +	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	free_page((unsigned long)buf);
> +
> +	return bytes;
> +}
> +
> +static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
> +			      size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	char *p, *buf;
> +	struct iovm_struct *area;
> +	ssize_t bytes;
> +
> +	count = min_t(ssize_t, count, PAGE_SIZE);
> +
> +	buf = (char *)__get_free_page(GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	area = find_iovm_area(obj, (u32)ppos);
> +	if (IS_ERR(area)) {
> +		mutex_unlock(&iommu_debug_lock);
> +		return -EINVAL;
> +	}
> +	memcpy(p, area->va, count);
> +	p += count;
> +
> +	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	free_page((unsigned long)buf);
> +
> +	return bytes;
> +}
> +
> +static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
> +			       size_t count, loff_t *ppos)
> +{
> +	struct iommu *obj = file->private_data;
> +	struct iovm_struct *area;
> +	char *p, *buf;
> +
> +	count = min_t(size_t, count, PAGE_SIZE);
> +
> +	buf = (char *)__get_free_page(GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +	p = buf;
> +
> +	mutex_lock(&iommu_debug_lock);
> +
> +	if (copy_from_user(p, userbuf, count)) {
> +		mutex_unlock(&iommu_debug_lock);
> +		return -EFAULT;
> +	}
> +
> +	area = find_iovm_area(obj, (u32)ppos);
> +	if (IS_ERR(area)) {
> +		mutex_unlock(&iommu_debug_lock);
> +		return -EINVAL;
> +	}
> +	memcpy(area->va, p, count);
> +
> +	mutex_unlock(&iommu_debug_lock);
> +	free_page((unsigned long)buf);
> +
> +	return count;
> +}
> +
> +static int debug_open_generic(struct inode *inode, struct file *file)
> +{
> +	file->private_data = inode->i_private;
> +	return 0;
> +}
> +
> +#define DEBUG_FOPS(name)						\
> +	static const struct file_operations debug_##name##_fops = {	\
> +		.open = debug_open_generic,				\
> +		.read = debug_read_##name,				\
> +		.write = debug_write_##name,				\
> +	};
> +
> +#define DEBUG_FOPS_RO(name)						\
> +	static const struct file_operations debug_##name##_fops = {	\
> +		.open = debug_open_generic,				\
> +		.read = debug_read_##name,				\
> +	};
> +
> +DEBUG_FOPS_RO(ver);
> +DEBUG_FOPS_RO(regs);
> +DEBUG_FOPS_RO(tlb);
> +DEBUG_FOPS(pagetable);
> +DEBUG_FOPS_RO(mmap);
> +DEBUG_FOPS(mem);
> +
> +#define __DEBUG_ADD_FILE(attr, mode)					\
> +	{								\
> +		struct dentry *dent;					\
> +		dent = debugfs_create_file(#attr, mode, parent,		\
> +					   obj, &debug_##attr##_fops);	\
> +		if (!dent)						\
> +			return -ENOMEM;					\
> +	}
> +
> +#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
> +#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
> +
> +static int iommu_debug_register(struct device *dev, void *data)
> +{
> +	struct platform_device *pdev = to_platform_device(dev);
> +	struct iommu *obj = platform_get_drvdata(pdev);
> +	struct dentry *d, *parent;
> +
> +	if (!obj || !obj->dev)
> +		return -EINVAL;
> +
> +	d = debugfs_create_dir(obj->name, iommu_debug_root);
> +	if (!d)
> +		return -ENOMEM;
> +	parent = d;
> +
> +	d = debugfs_create_u8("nr_tlb_entries", 400, parent,
> +			      (u8 *)&obj->nr_tlb_entries);
> +	if (!d)
> +		return -ENOMEM;
> +
> +	DEBUG_ADD_FILE_RO(ver);
> +	DEBUG_ADD_FILE_RO(regs);
> +	DEBUG_ADD_FILE_RO(tlb);
> +	DEBUG_ADD_FILE(pagetable);
> +	DEBUG_ADD_FILE_RO(mmap);
> +	DEBUG_ADD_FILE(mem);
> +
> +	return 0;
> +}
> +
> +static int __init iommu_debug_init(void)
> +{
> +	struct dentry *d;
> +	int err;
> +
> +	d = debugfs_create_dir("iommu", NULL);
> +	if (!d)
> +		return -ENOMEM;
> +	iommu_debug_root = d;
> +
> +	err = foreach_iommu_device(d, iommu_debug_register);
> +	if (err)
> +		goto err_out;
> +	return 0;
> +
> +err_out:
> +	debugfs_remove_recursive(iommu_debug_root);
> +	return err;
> +}
> +module_init(iommu_debug_init)
> +
> +static void __exit iommu_debugfs_exit(void)
> +{
> +	debugfs_remove_recursive(iommu_debug_root);
> +}
> +module_exit(iommu_debugfs_exit)
> +
> +MODULE_DESCRIPTION("omap iommu: debugfs interface");
> +MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
> +MODULE_LICENSE("GPL v2");
> diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
> index 4a03013..4b60127 100644
> --- a/arch/arm/plat-omap/iommu.c
> +++ b/arch/arm/plat-omap/iommu.c
> @@ -351,16 +351,14 @@ EXPORT_SYMBOL_GPL(flush_iotlb_all);
>  
>  #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
>  
> -ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
> +ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
>  {
> -	ssize_t bytes;
> -
>  	if (!obj || !buf)
>  		return -EINVAL;
>  
>  	clk_enable(obj->clk);
>  
> -	bytes = arch_iommu->dump_ctx(obj, buf);
> +	bytes = arch_iommu->dump_ctx(obj, buf, bytes);
>  
>  	clk_disable(obj->clk);
>  
> @@ -368,7 +366,7 @@ ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
>  }
>  EXPORT_SYMBOL_GPL(iommu_dump_ctx);
>  
> -static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
> +static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs, int num)
>  {
>  	int i;
>  	struct iotlb_lock saved, l;
> @@ -379,7 +377,7 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
>  	iotlb_lock_get(obj, &saved);
>  	memcpy(&l, &saved, sizeof(saved));
>  
> -	for (i = 0; i < obj->nr_tlb_entries; i++) {
> +	for (i = 0; i < num; i++) {
>  		struct cr_regs tmp;
>  
>  		iotlb_lock_get(obj, &l);
> @@ -402,18 +400,21 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
>   * @obj:	target iommu
>   * @buf:	output buffer
>   **/
> -size_t dump_tlb_entries(struct iommu *obj, char *buf)
> +size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t bytes)
>  {
> -	int i, n;
> +	int i, num;
>  	struct cr_regs *cr;
>  	char *p = buf;
>  
> -	cr = kcalloc(obj->nr_tlb_entries, sizeof(*cr), GFP_KERNEL);
> +	num = bytes / sizeof(*cr);
> +	num = min(obj->nr_tlb_entries, num);
> +
> +	cr = kcalloc(num, sizeof(*cr), GFP_KERNEL);
>  	if (!cr)
>  		return 0;
>  
> -	n = __dump_tlb_entries(obj, cr);
> -	for (i = 0; i < n; i++)
> +	num = __dump_tlb_entries(obj, cr, num);
> +	for (i = 0; i < num; i++)
>  		p += iotlb_dump_cr(obj, cr + i, p);
>  	kfree(cr);
>  
> -- 
> 1.6.0.4
> 


^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 06/10] OMAP3: MMC: Add mux for pins, v2
  2009-08-13  9:26   ` Russell King - ARM Linux
@ 2009-08-16 15:25     ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-16 15:25 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-arm-kernel, Vikram Pandita, linux-omap, Chikkature Rajashekar

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

* Russell King - ARM Linux <linux@arm.linux.org.uk> [090813 12:26]:
> On Wed, Aug 12, 2009 at 03:18:49PM +0300, Tony Lindgren wrote:
> > +			if (mmc_controller->slots[0].wires == 8)
> > +				printk(KERN_WARNING
> > +					"\n MMC2: DAT4, DAT5, DAT6, DAT7: "
> > +					"Setup the mux in board file");
> > +		}
> > +		if (controller_nr == 2) {
> > +			/* MMC3 */
> > +			printk(KERN_WARNING
> > +				"\n MMC3: Setup the mux in board file: "
> > +				"Multiple options exist, so is board specific");
> > +		}
> 
> Having printks which issue a level, followed by a newline, message and
> omitting the newline at the end looks really wrong:
> 
> - firstly, the KERN_WARNING "\n" line creates a blank line in the kernel
>   message log.
> - the message itself will be at the kernels default message level
> - the following kernel message will be appended to the end, with any
>   level tag exposed.
> 
> So I think the above printk statements are completely wrong and broken.

I've updated the patch to change the printk statements to just comments.

Regards,

Tony

[-- Attachment #2: mmc-mux-v2.patch --]
[-- Type: text/x-diff, Size: 5490 bytes --]

>From fc3866a4da5cfcc7090809367997b2f4fce6a382 Mon Sep 17 00:00:00 2001
From: Vikram Pandita <vikram.pandita@ti.com>
Date: Sun, 16 Aug 2009 18:17:06 +0300
Subject: [PATCH] OMAP3: MMC: Add mux for pins

For OMAP3 add MMC1 MMC2 pin mux MMC3 mux is not added as there are
multiple configurations possible, so the muxing is left to be done
in board file.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Chikkature Rajashekar <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 894cc35..a2e9156 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -513,6 +513,47 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
 		}
 	}
+
+	if (cpu_is_omap3430()) {
+		if (controller_nr == 0) {
+			omap_cfg_reg(N28_3430_MMC1_CLK);
+			omap_cfg_reg(M27_3430_MMC1_CMD);
+			omap_cfg_reg(N27_3430_MMC1_DAT0);
+			if (mmc_controller->slots[0].wires == 4 ||
+				mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(N26_3430_MMC1_DAT1);
+				omap_cfg_reg(N25_3430_MMC1_DAT2);
+				omap_cfg_reg(P28_3430_MMC1_DAT3);
+			}
+			if (mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(P27_3430_MMC1_DAT4);
+				omap_cfg_reg(P26_3430_MMC1_DAT5);
+				omap_cfg_reg(R27_3430_MMC1_DAT6);
+				omap_cfg_reg(R25_3430_MMC1_DAT7);
+			}
+		}
+		if (controller_nr == 1) {
+			/* MMC2 */
+			omap_cfg_reg(AE2_3430_MMC2_CLK);
+			omap_cfg_reg(AG5_3430_MMC2_CMD);
+			omap_cfg_reg(AH5_3430_MMC2_DAT0);
+
+			/*
+			 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
+			 * in the board-*.c files
+			 */
+			if (mmc_controller->slots[0].wires == 4 ||
+				mmc_controller->slots[0].wires == 8) {
+				omap_cfg_reg(AH4_3430_MMC2_DAT1);
+				omap_cfg_reg(AG4_3430_MMC2_DAT2);
+				omap_cfg_reg(AF4_3430_MMC2_DAT3);
+			}
+		}
+
+		/*
+		 * For MMC3 the pins need to be muxed in the board-*.c files
+		 */
+	}
 }
 
 void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 026c4fc..d49b9a7 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -486,6 +486,55 @@ MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c,
 		OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
 MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6,
 		OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
+/* MMC1 */
+MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
+/* MMC2 */
+MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
+		OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
+/* MMC3 */
+MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
+		OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
+		OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
 };
 
 #define OMAP34XX_PINS_SZ	ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 85a6217..d24fdf9 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -853,6 +853,34 @@ enum omap34xx_index {
 	AE5_34XX_GPIO143,
 	H19_34XX_GPIO164_OUT,
 	J25_34XX_GPIO170,
+
+	/* MMC1 */
+	N28_3430_MMC1_CLK,
+	M27_3430_MMC1_CMD,
+	N27_3430_MMC1_DAT0,
+	N26_3430_MMC1_DAT1,
+	N25_3430_MMC1_DAT2,
+	P28_3430_MMC1_DAT3,
+	P27_3430_MMC1_DAT4,
+	P26_3430_MMC1_DAT5,
+	R27_3430_MMC1_DAT6,
+	R25_3430_MMC1_DAT7,
+
+	/* MMC2 */
+	AE2_3430_MMC2_CLK,
+	AG5_3430_MMC2_CMD,
+	AH5_3430_MMC2_DAT0,
+	AH4_3430_MMC2_DAT1,
+	AG4_3430_MMC2_DAT2,
+	AF4_3430_MMC2_DAT3,
+
+	/* MMC3 */
+	AF10_3430_MMC3_CLK,
+	AC3_3430_MMC3_CMD,
+	AE11_3430_MMC3_DAT0,
+	AH9_3430_MMC3_DAT1,
+	AF13_3430_MMC3_DAT2,
+	AF13_3430_MMC3_DAT3,
 };
 
 struct omap_mux_cfg {

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support,v 2
  2009-08-13  9:27   ` Russell King - ARM Linux
@ 2009-08-16 15:28     ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-16 15:28 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, Vikram Pandita, linux-omap

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

* Russell King - ARM Linux <linux@arm.linux.org.uk> [090813 12:28]:
> On Wed, Aug 12, 2009 at 03:20:07PM +0300, Tony Lindgren wrote:
> > +static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
> > +	.rows		= 8,
> > +	.cols		= 8,
> > +	.keymap		= zoom2_twl4030_keymap,
> > +	.keymapsize	= ARRAY_SIZE(zoom2_twl4030_keymap),
> > +	.rep		= 1,
> > +};
> 
> Normally have a blank line here.
> 
> >  static void __init omap_zoom2_init_irq(void)
> >  {
> >  	omap2_init_common_hw(NULL);
> 
> Otherwise ok.

Updated patch below.

Tony

[-- Attachment #2: zoom2-twl-v2.patch --]
[-- Type: text/x-diff, Size: 7174 bytes --]

>From 319fc2ce44067ec84eae3a7effd5ad0bb3515a84 Mon Sep 17 00:00:00 2001
From: Vikram Pandita <vikram.pandita@ti.com>
Date: Sun, 16 Aug 2009 18:26:19 +0300
Subject: [PATCH] OMAP3: Zoom2: Add TWL4030 support

Add TWL4030 CORE and TWL4030 drivers to Zoom2 board file
TWL drivers enabled are:
	bci
	madc
	usb
	keypad
	mmc

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 4cefa3f..368e6aa 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -12,17 +12,84 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/input.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 <mach/common.h>
 #include <mach/usb.h>
+#include <mach/keypad.h>
 
 #include "mmc-twl4030.h"
 
+/* Zoom2 has Qwerty keyboard*/
+static int zoom2_twl4030_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 twl4030_keypad_data zoom2_kp_twl4030_data = {
+	.rows		= 8,
+	.cols		= 8,
+	.keymap		= zoom2_twl4030_keymap,
+	.keymapsize	= ARRAY_SIZE(zoom2_twl4030_keymap),
+	.rep		= 1,
+};
+
 static void __init omap_zoom2_init_irq(void)
 {
 	omap2_init_common_hw(NULL);
@@ -37,10 +104,127 @@ static struct omap_uart_platform_data zoom2_uart_config __initdata = {
 static struct omap_board_config_kernel zoom2_config[] __initdata = {
 };
 
+static struct regulator_consumer_supply zoom2_vmmc1_supply = {
+	.supply		= "vmmc",
+};
+
+static struct regulator_consumer_supply zoom2_vsim_supply = {
+	.supply		= "vmmc_aux",
+};
+
+static struct regulator_consumer_supply zoom2_vmmc2_supply = {
+	.supply		= "vmmc",
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
+static struct regulator_init_data zoom2_vmmc1 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 3150000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vmmc1_supply,
+};
+
+/* VMMC2 for MMC2 card */
+static struct regulator_init_data zoom2_vmmc2 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 1850000,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vmmc2_supply,
+};
+
+/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
+static struct regulator_init_data zoom2_vsim = {
+	.constraints = {
+		.min_uV			= 1800000,
+		.max_uV			= 3000000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &zoom2_vsim_supply,
+};
+
+static struct twl4030_hsmmc_info mmc[] __initdata = {
+	{
+		.mmc		= 1,
+		.wires		= 4,
+		.gpio_wp	= -EINVAL,
+	},
+	{
+		.mmc		= 2,
+		.wires		= 4,
+		.gpio_wp	= -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+static int zoom2_twl_gpio_setup(struct device *dev,
+		unsigned gpio, unsigned ngpio)
+{
+	/* gpio + 0 is "mmc0_cd" (input/IRQ),
+	 * gpio + 1 is "mmc1_cd" (input/IRQ)
+	 */
+	mmc[0].gpio_cd = gpio + 0;
+	mmc[1].gpio_cd = gpio + 1;
+	twl4030_mmc_init(mmc);
+
+	/* link regulators to MMC adapters ... we "know" the
+	 * regulators will be set up only *after* we return.
+	*/
+	zoom2_vmmc1_supply.dev = mmc[0].dev;
+	zoom2_vsim_supply.dev = mmc[0].dev;
+	zoom2_vmmc2_supply.dev = mmc[1].dev;
+
+	return 0;
+}
+
+
+static int zoom2_batt_table[] = {
+/* 0 C*/
+30800, 29500, 28300, 27100,
+26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
+17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
+11600, 11200, 10800, 10400, 10000, 9630,  9280,  8950,  8620,  8310,
+8020,  7730,  7460,  7200,  6950,  6710,  6470,  6250,  6040,  5830,
+5640,  5450,  5260,  5090,  4920,  4760,  4600,  4450,  4310,  4170,
+4040,  3910,  3790,  3670,  3550
+};
+
+static struct twl4030_bci_platform_data zoom2_bci_data = {
+	.battery_tmp_tbl	= zoom2_batt_table,
+	.tblsize		= ARRAY_SIZE(zoom2_batt_table),
+};
+
+static struct twl4030_usb_data zoom2_usb_data = {
+	.usb_mode	= T2_USB_MODE_ULPI,
+};
+
 static struct twl4030_gpio_platform_data zoom2_gpio_data = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
+	.setup		= zoom2_twl_gpio_setup,
+};
+
+static struct twl4030_madc_platform_data zoom2_madc_data = {
+	.irq_line	= 1,
 };
 
 static struct twl4030_platform_data zoom2_twldata = {
@@ -48,7 +232,15 @@ static struct twl4030_platform_data zoom2_twldata = {
 	.irq_end	= TWL4030_IRQ_END,
 
 	/* platform_data for children goes here */
+	.bci		= &zoom2_bci_data,
+	.madc		= &zoom2_madc_data,
+	.usb		= &zoom2_usb_data,
 	.gpio		= &zoom2_gpio_data,
+	.keypad		= &zoom2_kp_twl4030_data,
+	.vmmc1          = &zoom2_vmmc1,
+	.vmmc2          = &zoom2_vmmc2,
+	.vsim           = &zoom2_vsim,
+
 };
 
 static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
@@ -69,16 +261,6 @@ static int __init omap_i2c_init(void)
 	return 0;
 }
 
-static struct twl4030_hsmmc_info mmc[] __initdata = {
-	{
-		.mmc		= 1,
-		.wires		= 4,
-		.gpio_cd	= -EINVAL,
-		.gpio_wp	= -EINVAL,
-	},
-	{}	/* Terminator */
-};
-
 extern int __init omap_zoom2_debugboard_init(void);
 
 static void __init omap_zoom2_init(void)
@@ -88,7 +270,6 @@ static void __init omap_zoom2_init(void)
 	omap_board_config_size = ARRAY_SIZE(zoom2_config);
 	omap_serial_init(&zoom2_uart_config);
 	omap_zoom2_debugboard_init();
-	twl4030_mmc_init(mmc);
 	usb_musb_init();
 }
 

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3
  2009-08-16  1:48             ` Eric Witcher
@ 2009-08-16 15:42               ` Tony Lindgren
  2009-08-16 17:07                 ` Felipe Balbi
  2009-08-19 13:40                 ` Felipe Balbi
  0 siblings, 2 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-16 15:42 UTC (permalink / raw)
  To: Eric Witcher; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

Hi,

* Eric Witcher <ewitcher@mindspring.com> [090816 04:50]:
> Tony Lindgren <tony <at> atomide.com> writes:
> 
> <snip>
> 
> > I don't have a Beagle, so somebody please check this defconfig and enable
> > PM and OTG if possible.
> > 
> > Tony
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo <at> vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> Hi,
> 
> I checked this defconfig at it's commit
> 5dc8c8ffb27d93533d71493ca4a419f0290a3b2f
> with the following:
> 
> 1.  Brought omap3_beagle_defconfig forward to  2.6.31-rc5 level.
> (via make gconfig)  
> 
> 2.  Enabled CONFIG_PM, CONFIG_USB_MUSB_OTG, and
>  CONFIG_USB_GADGET_MUSB_HDRC with associated
> default subchoices. (via make gconfig)

Great!
 
> 3.  Removed 1 line work in progress? from arch/arm/mach-omap2/serial.c

Yes, the related change is still in for-next, seem that it's going in
when the merge window opens.
 
> 4.  Added previously posted (but not committed) patch
> for drivers/usb/otg/twl4030-usb.c
> 
> I was able to boot through INIT.
> 

Felipe, can you please check if you have the twl4030-usb.c fix queued up?

> The diffs are against the 2.6.31-rc5 generated
> version of omap3_beagle_defconfig.
> 
> Hope this helps.

Yes, thanks! Updated patch below.

Tony

[-- Attachment #2: beagle-defconfig-v3.patch --]
[-- Type: text/x-diff, Size: 4101 bytes --]

>From f9356c9b5ca663feb3a985b42d0409da5625d537 Mon Sep 17 00:00:00 2001
From: Paul Walmsley <paul@pwsan.com>
Date: Sun, 16 Aug 2009 18:29:49 +0300
Subject: [PATCH] OMAP3: update OMAP3 Beagle defconfig

Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
rev C2.

Patch updated to enable PM and OTG options as suggested by
Eric Witcher <ewitcher@mindspring.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index 4c6fb7e..b213e3b 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -128,6 +128,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -236,6 +237,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
 CONFIG_HAS_TLS_REG=y
 # CONFIG_OUTER_CACHE is not set
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -317,7 +319,12 @@ CONFIG_BINFMT_MISC=y
 #
 # Power management options
 #
-# CONFIG_PM is not set
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
@@ -713,6 +720,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
@@ -741,6 +749,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
+CONFIG_TWL4030_CORE=y
 # CONFIG_UCB1400_CORE is not set
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_T7L66XB is not set
@@ -787,7 +796,7 @@ CONFIG_DUMMY_CONSOLE=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
-# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
 # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
@@ -798,7 +807,8 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 CONFIG_USB_DEVICE_CLASS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
 CONFIG_USB_MON=y
@@ -806,6 +816,8 @@ CONFIG_USB_MON=y
 #
 # USB Host Controller Drivers
 #
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
 # CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_ISP1760_HCD is not set
@@ -818,10 +830,10 @@ CONFIG_USB_MUSB_SOC=y
 #
 # OMAP 343x high speed USB support
 #
-CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_HOST is not set
 # CONFIG_USB_MUSB_PERIPHERAL is not set
-# CONFIG_USB_MUSB_OTG is not set
-# CONFIG_USB_GADGET_MUSB_HDRC is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
 CONFIG_USB_MUSB_HDRC_HCD=y
 # CONFIG_MUSB_PIO_ONLY is not set
 CONFIG_USB_INVENTRA_DMA=y
@@ -906,6 +918,15 @@ CONFIG_USB_ETH_RNDIS=y
 # CONFIG_USB_MIDI_GADGET is not set
 # CONFIG_USB_G_PRINTER is not set
 # CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+# CONFIG_NOP_USB_XCEIV is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
@@ -923,6 +944,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 #
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_NEW_LEDS is not set
@@ -981,10 +1003,11 @@ CONFIG_RTC_INTF_DEV=y
 #
 # Voltage and Current regulators
 #
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
 # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
 # CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
 
 #

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3
  2009-08-16 15:42               ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3 Tony Lindgren
@ 2009-08-16 17:07                 ` Felipe Balbi
  2009-08-16 17:22                   ` Tony Lindgren
  2009-08-19 13:40                 ` Felipe Balbi
  1 sibling, 1 reply; 39+ messages in thread
From: Felipe Balbi @ 2009-08-16 17:07 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Eric Witcher, linux-omap

Hi,

On Sun, Aug 16, 2009 at 06:42:00PM +0300, Tony Lindgren wrote:
> Felipe, can you please check if you have the twl4030-usb.c fix queued up?

Should I take it via linux-usb ? The fix is in board-omap3beagle.c

-- 
balbi

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3
  2009-08-16 17:07                 ` Felipe Balbi
@ 2009-08-16 17:22                   ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-16 17:22 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Eric Witcher, linux-omap

* Felipe Balbi <me@felipebalbi.com> [090816 20:07]:
> Hi,
> 
> On Sun, Aug 16, 2009 at 06:42:00PM +0300, Tony Lindgren wrote:
> > Felipe, can you please check if you have the twl4030-usb.c fix queued up?
> 
> Should I take it via linux-usb ? The fix is in board-omap3beagle.c

Yeh, please do, here's my ack:

Acked-by: Tony Lindgren <tony@atomide.com>


^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-16 15:13       ` Tony Lindgren
@ 2009-08-16 20:47         ` Russell King - ARM Linux
  2009-08-17  4:19           ` Hiroshi DOYU
  2009-08-17  7:28           ` Hiroshi DOYU
  0 siblings, 2 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2009-08-16 20:47 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Hiroshi DOYU, linux-arm-kernel, linux-omap

On Sun, Aug 16, 2009 at 06:13:55PM +0300, Tony Lindgren wrote:
> * Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090815 15:06]:
> > Hi Russell,
> > 
> > From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> > Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
> > Date: Thu, 13 Aug 2009 11:23:59 +0200
> > 
> > > On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> > > > +static DEFINE_MUTEX(iommu_debug_lock);
> > > > +static char local_buffer[SZ_4K];
> > > 
> > > I don't like this - what if the data you're sprintf'ing into this
> > > buffer overflows it?
> > 
> > Right.
> > 
> > I have attached the updated version which limits max write counts to
> > avoid the above buffer overflow.
> 
> Thanks, I've update my queue with it.

I'm not sure the patch is correct yet.  I think this update introduced
some bugs.  Consider the debug_read_* functions and consider what
happens if count = 1 but ppos != 0.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-16 20:47         ` Russell King - ARM Linux
@ 2009-08-17  4:19           ` Hiroshi DOYU
  2009-08-17  7:28           ` Hiroshi DOYU
  1 sibling, 0 replies; 39+ messages in thread
From: Hiroshi DOYU @ 2009-08-17  4:19 UTC (permalink / raw)
  To: linux; +Cc: tony, linux-arm-kernel, linux-omap

From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
Date: Sun, 16 Aug 2009 22:47:32 +0200

> On Sun, Aug 16, 2009 at 06:13:55PM +0300, Tony Lindgren wrote:
> > * Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090815 15:06]:
> > > Hi Russell,
> > > 
> > > From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> > > Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
> > > Date: Thu, 13 Aug 2009 11:23:59 +0200
> > > 
> > > > On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> > > > > +static DEFINE_MUTEX(iommu_debug_lock);
> > > > > +static char local_buffer[SZ_4K];
> > > > 
> > > > I don't like this - what if the data you're sprintf'ing into this
> > > > buffer overflows it?
> > > 
> > > Right.
> > > 
> > > I have attached the updated version which limits max write counts to
> > > avoid the above buffer overflow.
> > 
> > Thanks, I've update my queue with it.
> 
> I'm not sure the patch is correct yet.  I think this update introduced
> some bugs.  Consider the debug_read_* functions and consider what
> happens if count = 1 but ppos != 0.

I think that "simple_read_from_buffer()" can take care of the above
parameter checking?

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-16 20:47         ` Russell King - ARM Linux
  2009-08-17  4:19           ` Hiroshi DOYU
@ 2009-08-17  7:28           ` Hiroshi DOYU
  2009-08-27  7:25             ` Hiroshi DOYU
  1 sibling, 1 reply; 39+ messages in thread
From: Hiroshi DOYU @ 2009-08-17  7:28 UTC (permalink / raw)
  To: linux; +Cc: tony, linux-arm-kernel, linux-omap

[-- Attachment #1: Type: Text/Plain, Size: 3113 bytes --]

From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
Date: Sun, 16 Aug 2009 22:47:32 +0200

> On Sun, Aug 16, 2009 at 06:13:55PM +0300, Tony Lindgren wrote:
> > * Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090815 15:06]:
> > > Hi Russell,
> > > 
> > > From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> > > Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
> > > Date: Thu, 13 Aug 2009 11:23:59 +0200
> > > 
> > > > On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote:
> > > > > +static DEFINE_MUTEX(iommu_debug_lock);
> > > > > +static char local_buffer[SZ_4K];
> > > > 
> > > > I don't like this - what if the data you're sprintf'ing into this
> > > > buffer overflows it?
> > > 
> > > Right.
> > > 
> > > I have attached the updated version which limits max write counts to
> > > avoid the above buffer overflow.
> > 
> > Thanks, I've update my queue with it.
> 
> I'm not sure the patch is correct yet.  I think this update introduced
> some bugs.

I fixed wrong calculation of line length as below.

diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 27b4bfa..7fd97aa 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -223,11 +223,12 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
 	do {								\
 		ssize_t bytes;						\
 		const char *str = "%20s: %08x\n";			\
-		bytes = snprintf(p, 32, str, __stringify(name),		\
+		const int maxcol = 32;					\
+		bytes = snprintf(p, maxcol, str, __stringify(name),	\
 				 iommu_read_reg(obj, MMU_##name));	\
 		p += bytes;						\
 		len -= bytes;						\
-		if (len < strlen(str) + 1)				\
+		if (len < maxcol)					\
 			goto out;					\
 	} while (0)
 
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
index 536e897..5a7e409 100644
--- a/arch/arm/plat-omap/iommu-debug.c
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -121,15 +121,16 @@ static ssize_t debug_write_pagetable(struct file *file,
 	return count;
 }
 
-#define dump_ioptable_entry_one(lv, da, pteval)			\
+#define dump_ioptable_entry_one(lv, da, val)			\
 	({							\
 		int __err = 0;					\
 		ssize_t bytes;					\
+		const int maxcol = 22;				\
 		const char *str = "%d: %08x %08x\n";		\
-		bytes = snprintf(p, 22, str, lv, da, pteval);	\
+		bytes = snprintf(p, maxcol, str, lv, da, val);	\
 		p += bytes;					\
 		len -= bytes;					\
-		if (len < strlen(str) + 1)			\
+		if (len < maxcol)				\
 			__err = -ENOMEM;			\
 		__err;						\
 	})
@@ -229,12 +230,13 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
 	list_for_each_entry(tmp, &obj->mmap, list) {
 		size_t len;
 		const char *str = "%3d %08x-%08x %6x %8x\n";
+		const int maxcol = 39;
 
 		len = tmp->da_end - tmp->da_start;
-		p += snprintf(p, strlen(str) + 1, str,
+		p += snprintf(p, maxcol, str,
 			      i, tmp->da_start, tmp->da_end, len, tmp->flags);
 
-		if ((strlen(str) + 1) > (PAGE_SIZE - (p - buf)))
+		if (PAGE_SIZE - (p - buf) < maxcol)
 			break;
 		i++;
 	}
-- 
1.6.0.4


[-- Attachment #2: 0001-OMAP-iommu-add-initial-debugfs-support.patch --]
[-- Type: Application/Octet-Stream, Size: 15720 bytes --]

From 1fcfd62179f3da9104515cd47fd1a2d25ac25cce Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Sun, 16 Aug 2009 18:07:47 +0300
Subject: [PATCH 1/1] OMAP: iommu: add initial debugfs support

This enables to peek the following data.

$ /debug/iommu/isp# ls
mem             nr_tlb_entries  regs
mmap            pagetable       tlb
$ /debug/iommu/isp# head pagetable
L:      da:      pa:
-----------------------------------------
2: 00001000 8ae4a002
2: 00002000 8e7bb002
2: 00003000 8ae49002
2: 00004000 8ae65002
.....

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
 arch/arm/mach-omap2/iommu2.c            |   19 +-
 arch/arm/plat-omap/Kconfig              |    4 +
 arch/arm/plat-omap/Makefile             |    1 +
 arch/arm/plat-omap/include/mach/iommu.h |    6 +-
 arch/arm/plat-omap/iommu-debug.c        |  415 +++++++++++++++++++++++++++++++
 arch/arm/plat-omap/iommu.c              |   23 +-
 6 files changed, 449 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/plat-omap/iommu-debug.c

diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a..2d9b5cc 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
 }
 
 #define pr_reg(name)							\
-	p += sprintf(p, "%20s: %08x\n",					\
-		     __stringify(name), iommu_read_reg(obj, MMU_##name));
-
-static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
+	do {								\
+		ssize_t bytes;						\
+		const char *str = "%20s: %08x\n";			\
+		const int maxcol = 32;					\
+		bytes = snprintf(p, maxcol, str, __stringify(name),	\
+				 iommu_read_reg(obj, MMU_##name));	\
+		p += bytes;						\
+		len -= bytes;						\
+		if (len < maxcol)					\
+			goto out;					\
+	} while (0)
+
+static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
 {
 	char *p = buf;
 
@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
 	pr_reg(READ_CAM);
 	pr_reg(READ_RAM);
 	pr_reg(EMU_FAULT_AD);
-
+out:
 	return p - buf;
 }
 
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..ab9f9ef 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
 config OMAP_IOMMU
 	tristate
 
+config OMAP_IOMMU_DEBUG
+	depends on OMAP_IOMMU
+	tristate
+
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a832795..769a4c2 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
 
 obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
 obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
index 769b00b..46d41ac 100644
--- a/arch/arm/plat-omap/include/mach/iommu.h
+++ b/arch/arm/plat-omap/include/mach/iommu.h
@@ -95,7 +95,7 @@ struct iommu_functions {
 
 	void (*save_ctx)(struct iommu *obj);
 	void (*restore_ctx)(struct iommu *obj);
-	ssize_t (*dump_ctx)(struct iommu *obj, char *buf);
+	ssize_t (*dump_ctx)(struct iommu *obj, char *buf, ssize_t len);
 };
 
 struct iommu_platform_data {
@@ -162,7 +162,7 @@ extern void uninstall_iommu_arch(const struct iommu_functions *ops);
 extern int foreach_iommu_device(void *data,
 				int (*fn)(struct device *, void *));
 
-extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf);
-extern size_t dump_tlb_entries(struct iommu *obj, char *buf);
+extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len);
+extern size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t len);
 
 #endif /* __MACH_IOMMU_H */
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
new file mode 100644
index 0000000..5a7e409
--- /dev/null
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -0,0 +1,415 @@
+/*
+ * omap iommu: debugfs interface
+ *
+ * Copyright (C) 2008-2009 Nokia Corporation
+ *
+ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
+#include <linux/platform_device.h>
+#include <linux/debugfs.h>
+
+#include <mach/iommu.h>
+#include <mach/iovmm.h>
+
+#include "iopgtable.h"
+
+#define MAXCOLUMN 100 /* for short messages */
+
+static DEFINE_MUTEX(iommu_debug_lock);
+
+static struct dentry *iommu_debug_root;
+
+static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	u32 ver = iommu_arch_version();
+	char buf[MAXCOLUMN], *p = buf;
+
+	p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
+
+	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+}
+
+static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = iommu_dump_ctx(obj, p, count);
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes, rest;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
+	p += sprintf(p, "-----------------------------------------\n");
+	rest = count - (p - buf);
+	p += dump_tlb_entries(obj, p, rest);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_pagetable(struct file *file,
+		     const char __user *userbuf, size_t count, loff_t *ppos)
+{
+	struct iotlb_entry e;
+	struct cr_regs cr;
+	int err;
+	struct iommu *obj = file->private_data;
+	char buf[MAXCOLUMN], *p = buf;
+
+	count = min(count, sizeof(buf));
+
+	mutex_lock(&iommu_debug_lock);
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	sscanf(p, "%x %x", &cr.cam, &cr.ram);
+	if (!cr.cam || !cr.ram) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+
+	iotlb_cr_to_e(&cr, &e);
+	err = iopgtable_store_entry(obj, &e);
+	if (err)
+		dev_err(obj->dev, "%s: fail to store cr\n", __func__);
+
+	mutex_unlock(&iommu_debug_lock);
+	return count;
+}
+
+#define dump_ioptable_entry_one(lv, da, val)			\
+	({							\
+		int __err = 0;					\
+		ssize_t bytes;					\
+		const int maxcol = 22;				\
+		const char *str = "%d: %08x %08x\n";		\
+		bytes = snprintf(p, maxcol, str, lv, da, val);	\
+		p += bytes;					\
+		len -= bytes;					\
+		if (len < maxcol)				\
+			__err = -ENOMEM;			\
+		__err;						\
+	})
+
+static ssize_t dump_ioptable(struct iommu *obj, char *buf, ssize_t len)
+{
+	int i;
+	u32 *iopgd;
+	char *p = buf;
+
+	spin_lock(&obj->page_table_lock);
+
+	iopgd = iopgd_offset(obj, 0);
+	for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
+		int j, err;
+		u32 *iopte;
+		u32 da;
+
+		if (!*iopgd)
+			continue;
+
+		if (!(*iopgd & IOPGD_TABLE)) {
+			da = i << IOPGD_SHIFT;
+
+			err = dump_ioptable_entry_one(1, da, *iopgd);
+			if (err)
+				goto out;
+			continue;
+		}
+
+		iopte = iopte_offset(iopgd, 0);
+
+		for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
+			if (!*iopte)
+				continue;
+
+			da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
+			err = dump_ioptable_entry_one(2, da, *iopgd);
+			if (err)
+				goto out;
+		}
+	}
+out:
+	spin_unlock(&obj->page_table_lock);
+
+	return p - buf;
+}
+
+static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
+				    size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	size_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
+	p += sprintf(p, "-----------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = PAGE_SIZE - (p - buf);
+	p += dump_ioptable(obj, p, bytes);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *tmp;
+	int uninitialized_var(i);
+	ssize_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
+		     "No", "start", "end", "size", "flags");
+	p += sprintf(p, "-------------------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	list_for_each_entry(tmp, &obj->mmap, list) {
+		size_t len;
+		const char *str = "%3d %08x-%08x %6x %8x\n";
+		const int maxcol = 39;
+
+		len = tmp->da_end - tmp->da_start;
+		p += snprintf(p, maxcol, str,
+			      i, tmp->da_start, tmp->da_end, len, tmp->flags);
+
+		if (PAGE_SIZE - (p - buf) < maxcol)
+			break;
+		i++;
+	}
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *area;
+	ssize_t bytes;
+
+	count = min_t(ssize_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(p, area->va, count);
+	p += count;
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	struct iovm_struct *area;
+	char *p, *buf;
+
+	count = min_t(size_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+	memcpy(area->va, p, count);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return count;
+}
+
+static int debug_open_generic(struct inode *inode, struct file *file)
+{
+	file->private_data = inode->i_private;
+	return 0;
+}
+
+#define DEBUG_FOPS(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+		.write = debug_write_##name,				\
+	};
+
+#define DEBUG_FOPS_RO(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+	};
+
+DEBUG_FOPS_RO(ver);
+DEBUG_FOPS_RO(regs);
+DEBUG_FOPS_RO(tlb);
+DEBUG_FOPS(pagetable);
+DEBUG_FOPS_RO(mmap);
+DEBUG_FOPS(mem);
+
+#define __DEBUG_ADD_FILE(attr, mode)					\
+	{								\
+		struct dentry *dent;					\
+		dent = debugfs_create_file(#attr, mode, parent,		\
+					   obj, &debug_##attr##_fops);	\
+		if (!dent)						\
+			return -ENOMEM;					\
+	}
+
+#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
+#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
+
+static int iommu_debug_register(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct iommu *obj = platform_get_drvdata(pdev);
+	struct dentry *d, *parent;
+
+	if (!obj || !obj->dev)
+		return -EINVAL;
+
+	d = debugfs_create_dir(obj->name, iommu_debug_root);
+	if (!d)
+		return -ENOMEM;
+	parent = d;
+
+	d = debugfs_create_u8("nr_tlb_entries", 400, parent,
+			      (u8 *)&obj->nr_tlb_entries);
+	if (!d)
+		return -ENOMEM;
+
+	DEBUG_ADD_FILE_RO(ver);
+	DEBUG_ADD_FILE_RO(regs);
+	DEBUG_ADD_FILE_RO(tlb);
+	DEBUG_ADD_FILE(pagetable);
+	DEBUG_ADD_FILE_RO(mmap);
+	DEBUG_ADD_FILE(mem);
+
+	return 0;
+}
+
+static int __init iommu_debug_init(void)
+{
+	struct dentry *d;
+	int err;
+
+	d = debugfs_create_dir("iommu", NULL);
+	if (!d)
+		return -ENOMEM;
+	iommu_debug_root = d;
+
+	err = foreach_iommu_device(d, iommu_debug_register);
+	if (err)
+		goto err_out;
+	return 0;
+
+err_out:
+	debugfs_remove_recursive(iommu_debug_root);
+	return err;
+}
+module_init(iommu_debug_init)
+
+static void __exit iommu_debugfs_exit(void)
+{
+	debugfs_remove_recursive(iommu_debug_root);
+}
+module_exit(iommu_debugfs_exit)
+
+MODULE_DESCRIPTION("omap iommu: debugfs interface");
+MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
+MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4a03013..4b60127 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -351,16 +351,14 @@ EXPORT_SYMBOL_GPL(flush_iotlb_all);
 
 #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
 
-ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
+ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	ssize_t bytes;
-
 	if (!obj || !buf)
 		return -EINVAL;
 
 	clk_enable(obj->clk);
 
-	bytes = arch_iommu->dump_ctx(obj, buf);
+	bytes = arch_iommu->dump_ctx(obj, buf, bytes);
 
 	clk_disable(obj->clk);
 
@@ -368,7 +366,7 @@ ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
 }
 EXPORT_SYMBOL_GPL(iommu_dump_ctx);
 
-static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
+static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs, int num)
 {
 	int i;
 	struct iotlb_lock saved, l;
@@ -379,7 +377,7 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
 	iotlb_lock_get(obj, &saved);
 	memcpy(&l, &saved, sizeof(saved));
 
-	for (i = 0; i < obj->nr_tlb_entries; i++) {
+	for (i = 0; i < num; i++) {
 		struct cr_regs tmp;
 
 		iotlb_lock_get(obj, &l);
@@ -402,18 +400,21 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
  * @obj:	target iommu
  * @buf:	output buffer
  **/
-size_t dump_tlb_entries(struct iommu *obj, char *buf)
+size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	int i, n;
+	int i, num;
 	struct cr_regs *cr;
 	char *p = buf;
 
-	cr = kcalloc(obj->nr_tlb_entries, sizeof(*cr), GFP_KERNEL);
+	num = bytes / sizeof(*cr);
+	num = min(obj->nr_tlb_entries, num);
+
+	cr = kcalloc(num, sizeof(*cr), GFP_KERNEL);
 	if (!cr)
 		return 0;
 
-	n = __dump_tlb_entries(obj, cr);
-	for (i = 0; i < n; i++)
+	num = __dump_tlb_entries(obj, cr, num);
+	for (i = 0; i < num; i++)
 		p += iotlb_dump_cr(obj, cr + i, p);
 	kfree(cr);
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3
  2009-08-16 15:42               ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3 Tony Lindgren
  2009-08-16 17:07                 ` Felipe Balbi
@ 2009-08-19 13:40                 ` Felipe Balbi
  1 sibling, 0 replies; 39+ messages in thread
From: Felipe Balbi @ 2009-08-19 13:40 UTC (permalink / raw)
  To: ext Tony Lindgren; +Cc: Eric Witcher, linux-omap

Hi,

On Sun, Aug 16, 2009 at 05:42:00PM +0200, ext Tony Lindgren wrote:
> From f9356c9b5ca663feb3a985b42d0409da5625d537 Mon Sep 17 00:00:00 2001
> From: Paul Walmsley <paul@pwsan.com>
> Date: Sun, 16 Aug 2009 18:29:49 +0300
> Subject: [PATCH] OMAP3: update OMAP3 Beagle defconfig
> 
> Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
> Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
> rev C2.
> 
> Patch updated to enable PM and OTG options as suggested by
> Eric Witcher <ewitcher@mindspring.com>.
> 
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Jason Kridner <jkridner@beagleboard.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Felipe Balbi <felipe.balbi@nokia.com>

now that we have REGULATOR and TWL4030_USB it will work.

-- 
balbi

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window
  2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
                   ` (9 preceding siblings ...)
  2009-08-12 12:24 ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig Tony Lindgren
@ 2009-08-24 13:05 ` Tony Lindgren
  10 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-24 13:05 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

* Tony Lindgren <tony@atomide.com> [090812 15:10]:
> Hi all,
> 
> Here are mostly omap3 specific updates for the merge window.

I've added this series into omap for-next branch.
 
> Regards,
> 
> Tony
> 
> ---
> 
> Felipe Balbi (1):
>       OMAP3: beagle: add missing twl4030 usb platform_data
> 
> Hiroshi DOYU (2):
>       OMAP: iommu: add initial debugfs support
>       OMAP: iommu: fix wrong argument in flush_cache_vmap()
> 
> Paul Walmsley (1):
>       OMAP3: update OMAP3 Beagle defconfig
> 
> Sergio Aguirre (1):
>       OMAP3: 3430SDP: Fix defconfig
> 
> Timo Kokkonen (1):
>       OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration
> 
> Vikram Pandita (4):
>       OMAP3: Zoom2: Update board defconfig
>       OMAP3: Zoom2: Add TWL4030 support
>       OMAP3: MMC: Add mux for pins
>       OMAP2/3: Pass irqflags to 8250 driver
> 
> 
>  arch/arm/configs/omap3_beagle_defconfig     |   11 +
>  arch/arm/configs/omap_3430sdp_defconfig     |   20 +
>  arch/arm/configs/omap_zoom2_defconfig       |  484 +++++++++++++++++++++++----
>  arch/arm/configs/rx51_defconfig             |    1 
>  arch/arm/mach-omap2/board-omap3beagle.c     |    5 
>  arch/arm/mach-omap2/board-zoom-debugboard.c |    2 
>  arch/arm/mach-omap2/board-zoom2.c           |  204 +++++++++++
>  arch/arm/mach-omap2/devices.c               |   42 ++
>  arch/arm/mach-omap2/mux.c                   |   49 +++
>  arch/arm/mach-omap2/serial.c                |    2 
>  arch/arm/plat-omap/Kconfig                  |    4 
>  arch/arm/plat-omap/Makefile                 |    1 
>  arch/arm/plat-omap/include/mach/mux.h       |   28 ++
>  arch/arm/plat-omap/iommu-debug.c            |  334 +++++++++++++++++++
>  arch/arm/plat-omap/iovmm.c                  |    2 
>  15 files changed, 1088 insertions(+), 101 deletions(-)
>  create mode 100644 arch/arm/plat-omap/iommu-debug.c
> 
> -- 
> Signature
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-17  7:28           ` Hiroshi DOYU
@ 2009-08-27  7:25             ` Hiroshi DOYU
  2009-08-28 18:24               ` Tony Lindgren
  0 siblings, 1 reply; 39+ messages in thread
From: Hiroshi DOYU @ 2009-08-27  7:25 UTC (permalink / raw)
  To: tony; +Cc: linux-arm-kernel, linux-omap, linux

[-- Attachment #1: Type: Text/Plain, Size: 1388 bytes --]

Hi Tony,

I fixed the error exit path as below and attached the updated verion
of the patch. Please replace the old one in for-next with the attached
one.
	Modified arch/arm/plat-omap/iommu-debug.c
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
index 5a7e409..c799b3b 100644
--- a/arch/arm/plat-omap/iommu-debug.c
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -268,14 +268,14 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
 
 	area = find_iovm_area(obj, (u32)ppos);
 	if (IS_ERR(area)) {
-		mutex_unlock(&iommu_debug_lock);
-		return -EINVAL;
+		bytes = -EINVAL;
+		goto err_out;
 	}
 	memcpy(p, area->va, count);
 	p += count;
 
 	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
-
+err_out:
 	mutex_unlock(&iommu_debug_lock);
 	free_page((unsigned long)buf);
 
@@ -299,17 +299,17 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
 	mutex_lock(&iommu_debug_lock);
 
 	if (copy_from_user(p, userbuf, count)) {
-		mutex_unlock(&iommu_debug_lock);
-		return -EFAULT;
+		count =  -EFAULT;
+		goto err_out;
 	}
 
 	area = find_iovm_area(obj, (u32)ppos);
 	if (IS_ERR(area)) {
-		mutex_unlock(&iommu_debug_lock);
-		return -EINVAL;
+		count = -EINVAL;
+		goto err_out;
 	}
 	memcpy(area->va, p, count);
-
+err_out:
 	mutex_unlock(&iommu_debug_lock);
 	free_page((unsigned long)buf);
 

[-- Attachment #2: 0001-OMAP-iommu-add-initial-debugfs-support.patch --]
[-- Type: Application/Octet-Stream, Size: 15675 bytes --]

From f11a995afc9b8de6d15f10dc9a868878e15bd0dc Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Mon, 24 Aug 2009 12:29:01 +0300
Subject: [PATCH 1/1] OMAP: iommu: add initial debugfs support

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>

This enables to peek the following data.

$ /debug/iommu/isp# ls
mem             nr_tlb_entries  regs
mmap            pagetable       tlb
$ /debug/iommu/isp# head pagetable
L:      da:      pa:
-----------------------------------------
2: 00001000 8ae4a002
2: 00002000 8e7bb002
2: 00003000 8ae49002
2: 00004000 8ae65002
.....

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/iommu2.c            |   19 +-
 arch/arm/plat-omap/Kconfig              |    4 +
 arch/arm/plat-omap/Makefile             |    1 +
 arch/arm/plat-omap/include/mach/iommu.h |    6 +-
 arch/arm/plat-omap/iommu-debug.c        |  415 +++++++++++++++++++++++++++++++
 arch/arm/plat-omap/iommu.c              |   23 +-
 6 files changed, 449 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/plat-omap/iommu-debug.c

diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a..2d9b5cc 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
 }
 
 #define pr_reg(name)							\
-	p += sprintf(p, "%20s: %08x\n",					\
-		     __stringify(name), iommu_read_reg(obj, MMU_##name));
-
-static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
+	do {								\
+		ssize_t bytes;						\
+		const char *str = "%20s: %08x\n";			\
+		const int maxcol = 32;					\
+		bytes = snprintf(p, maxcol, str, __stringify(name),	\
+				 iommu_read_reg(obj, MMU_##name));	\
+		p += bytes;						\
+		len -= bytes;						\
+		if (len < maxcol)					\
+			goto out;					\
+	} while (0)
+
+static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
 {
 	char *p = buf;
 
@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
 	pr_reg(READ_CAM);
 	pr_reg(READ_RAM);
 	pr_reg(EMU_FAULT_AD);
-
+out:
 	return p - buf;
 }
 
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..ab9f9ef 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
 config OMAP_IOMMU
 	tristate
 
+config OMAP_IOMMU_DEBUG
+	depends on OMAP_IOMMU
+	tristate
+
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a832795..769a4c2 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
 
 obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
 obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
index 769b00b..46d41ac 100644
--- a/arch/arm/plat-omap/include/mach/iommu.h
+++ b/arch/arm/plat-omap/include/mach/iommu.h
@@ -95,7 +95,7 @@ struct iommu_functions {
 
 	void (*save_ctx)(struct iommu *obj);
 	void (*restore_ctx)(struct iommu *obj);
-	ssize_t (*dump_ctx)(struct iommu *obj, char *buf);
+	ssize_t (*dump_ctx)(struct iommu *obj, char *buf, ssize_t len);
 };
 
 struct iommu_platform_data {
@@ -162,7 +162,7 @@ extern void uninstall_iommu_arch(const struct iommu_functions *ops);
 extern int foreach_iommu_device(void *data,
 				int (*fn)(struct device *, void *));
 
-extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf);
-extern size_t dump_tlb_entries(struct iommu *obj, char *buf);
+extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len);
+extern size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t len);
 
 #endif /* __MACH_IOMMU_H */
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
new file mode 100644
index 0000000..c799b3b
--- /dev/null
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -0,0 +1,415 @@
+/*
+ * omap iommu: debugfs interface
+ *
+ * Copyright (C) 2008-2009 Nokia Corporation
+ *
+ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
+#include <linux/platform_device.h>
+#include <linux/debugfs.h>
+
+#include <mach/iommu.h>
+#include <mach/iovmm.h>
+
+#include "iopgtable.h"
+
+#define MAXCOLUMN 100 /* for short messages */
+
+static DEFINE_MUTEX(iommu_debug_lock);
+
+static struct dentry *iommu_debug_root;
+
+static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	u32 ver = iommu_arch_version();
+	char buf[MAXCOLUMN], *p = buf;
+
+	p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
+
+	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+}
+
+static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = iommu_dump_ctx(obj, p, count);
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	ssize_t bytes, rest;
+
+	buf = kmalloc(count, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
+	p += sprintf(p, "-----------------------------------------\n");
+	rest = count - (p - buf);
+	p += dump_tlb_entries(obj, p, rest);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	kfree(buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_pagetable(struct file *file,
+		     const char __user *userbuf, size_t count, loff_t *ppos)
+{
+	struct iotlb_entry e;
+	struct cr_regs cr;
+	int err;
+	struct iommu *obj = file->private_data;
+	char buf[MAXCOLUMN], *p = buf;
+
+	count = min(count, sizeof(buf));
+
+	mutex_lock(&iommu_debug_lock);
+	if (copy_from_user(p, userbuf, count)) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EFAULT;
+	}
+
+	sscanf(p, "%x %x", &cr.cam, &cr.ram);
+	if (!cr.cam || !cr.ram) {
+		mutex_unlock(&iommu_debug_lock);
+		return -EINVAL;
+	}
+
+	iotlb_cr_to_e(&cr, &e);
+	err = iopgtable_store_entry(obj, &e);
+	if (err)
+		dev_err(obj->dev, "%s: fail to store cr\n", __func__);
+
+	mutex_unlock(&iommu_debug_lock);
+	return count;
+}
+
+#define dump_ioptable_entry_one(lv, da, val)			\
+	({							\
+		int __err = 0;					\
+		ssize_t bytes;					\
+		const int maxcol = 22;				\
+		const char *str = "%d: %08x %08x\n";		\
+		bytes = snprintf(p, maxcol, str, lv, da, val);	\
+		p += bytes;					\
+		len -= bytes;					\
+		if (len < maxcol)				\
+			__err = -ENOMEM;			\
+		__err;						\
+	})
+
+static ssize_t dump_ioptable(struct iommu *obj, char *buf, ssize_t len)
+{
+	int i;
+	u32 *iopgd;
+	char *p = buf;
+
+	spin_lock(&obj->page_table_lock);
+
+	iopgd = iopgd_offset(obj, 0);
+	for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
+		int j, err;
+		u32 *iopte;
+		u32 da;
+
+		if (!*iopgd)
+			continue;
+
+		if (!(*iopgd & IOPGD_TABLE)) {
+			da = i << IOPGD_SHIFT;
+
+			err = dump_ioptable_entry_one(1, da, *iopgd);
+			if (err)
+				goto out;
+			continue;
+		}
+
+		iopte = iopte_offset(iopgd, 0);
+
+		for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
+			if (!*iopte)
+				continue;
+
+			da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
+			err = dump_ioptable_entry_one(2, da, *iopgd);
+			if (err)
+				goto out;
+		}
+	}
+out:
+	spin_unlock(&obj->page_table_lock);
+
+	return p - buf;
+}
+
+static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
+				    size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	size_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
+	p += sprintf(p, "-----------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	bytes = PAGE_SIZE - (p - buf);
+	p += dump_ioptable(obj, p, bytes);
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *tmp;
+	int uninitialized_var(i);
+	ssize_t bytes;
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
+		     "No", "start", "end", "size", "flags");
+	p += sprintf(p, "-------------------------------------------------\n");
+
+	mutex_lock(&iommu_debug_lock);
+
+	list_for_each_entry(tmp, &obj->mmap, list) {
+		size_t len;
+		const char *str = "%3d %08x-%08x %6x %8x\n";
+		const int maxcol = 39;
+
+		len = tmp->da_end - tmp->da_start;
+		p += snprintf(p, maxcol, str,
+			      i, tmp->da_start, tmp->da_end, len, tmp->flags);
+
+		if (PAGE_SIZE - (p - buf) < maxcol)
+			break;
+		i++;
+	}
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
+			      size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	char *p, *buf;
+	struct iovm_struct *area;
+	ssize_t bytes;
+
+	count = min_t(ssize_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		bytes = -EINVAL;
+		goto err_out;
+	}
+	memcpy(p, area->va, count);
+	p += count;
+
+	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+err_out:
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return bytes;
+}
+
+static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
+			       size_t count, loff_t *ppos)
+{
+	struct iommu *obj = file->private_data;
+	struct iovm_struct *area;
+	char *p, *buf;
+
+	count = min_t(size_t, count, PAGE_SIZE);
+
+	buf = (char *)__get_free_page(GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	p = buf;
+
+	mutex_lock(&iommu_debug_lock);
+
+	if (copy_from_user(p, userbuf, count)) {
+		count =  -EFAULT;
+		goto err_out;
+	}
+
+	area = find_iovm_area(obj, (u32)ppos);
+	if (IS_ERR(area)) {
+		count = -EINVAL;
+		goto err_out;
+	}
+	memcpy(area->va, p, count);
+err_out:
+	mutex_unlock(&iommu_debug_lock);
+	free_page((unsigned long)buf);
+
+	return count;
+}
+
+static int debug_open_generic(struct inode *inode, struct file *file)
+{
+	file->private_data = inode->i_private;
+	return 0;
+}
+
+#define DEBUG_FOPS(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+		.write = debug_write_##name,				\
+	};
+
+#define DEBUG_FOPS_RO(name)						\
+	static const struct file_operations debug_##name##_fops = {	\
+		.open = debug_open_generic,				\
+		.read = debug_read_##name,				\
+	};
+
+DEBUG_FOPS_RO(ver);
+DEBUG_FOPS_RO(regs);
+DEBUG_FOPS_RO(tlb);
+DEBUG_FOPS(pagetable);
+DEBUG_FOPS_RO(mmap);
+DEBUG_FOPS(mem);
+
+#define __DEBUG_ADD_FILE(attr, mode)					\
+	{								\
+		struct dentry *dent;					\
+		dent = debugfs_create_file(#attr, mode, parent,		\
+					   obj, &debug_##attr##_fops);	\
+		if (!dent)						\
+			return -ENOMEM;					\
+	}
+
+#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
+#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
+
+static int iommu_debug_register(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct iommu *obj = platform_get_drvdata(pdev);
+	struct dentry *d, *parent;
+
+	if (!obj || !obj->dev)
+		return -EINVAL;
+
+	d = debugfs_create_dir(obj->name, iommu_debug_root);
+	if (!d)
+		return -ENOMEM;
+	parent = d;
+
+	d = debugfs_create_u8("nr_tlb_entries", 400, parent,
+			      (u8 *)&obj->nr_tlb_entries);
+	if (!d)
+		return -ENOMEM;
+
+	DEBUG_ADD_FILE_RO(ver);
+	DEBUG_ADD_FILE_RO(regs);
+	DEBUG_ADD_FILE_RO(tlb);
+	DEBUG_ADD_FILE(pagetable);
+	DEBUG_ADD_FILE_RO(mmap);
+	DEBUG_ADD_FILE(mem);
+
+	return 0;
+}
+
+static int __init iommu_debug_init(void)
+{
+	struct dentry *d;
+	int err;
+
+	d = debugfs_create_dir("iommu", NULL);
+	if (!d)
+		return -ENOMEM;
+	iommu_debug_root = d;
+
+	err = foreach_iommu_device(d, iommu_debug_register);
+	if (err)
+		goto err_out;
+	return 0;
+
+err_out:
+	debugfs_remove_recursive(iommu_debug_root);
+	return err;
+}
+module_init(iommu_debug_init)
+
+static void __exit iommu_debugfs_exit(void)
+{
+	debugfs_remove_recursive(iommu_debug_root);
+}
+module_exit(iommu_debugfs_exit)
+
+MODULE_DESCRIPTION("omap iommu: debugfs interface");
+MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
+MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4a03013..4b60127 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -351,16 +351,14 @@ EXPORT_SYMBOL_GPL(flush_iotlb_all);
 
 #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
 
-ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
+ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	ssize_t bytes;
-
 	if (!obj || !buf)
 		return -EINVAL;
 
 	clk_enable(obj->clk);
 
-	bytes = arch_iommu->dump_ctx(obj, buf);
+	bytes = arch_iommu->dump_ctx(obj, buf, bytes);
 
 	clk_disable(obj->clk);
 
@@ -368,7 +366,7 @@ ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
 }
 EXPORT_SYMBOL_GPL(iommu_dump_ctx);
 
-static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
+static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs, int num)
 {
 	int i;
 	struct iotlb_lock saved, l;
@@ -379,7 +377,7 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
 	iotlb_lock_get(obj, &saved);
 	memcpy(&l, &saved, sizeof(saved));
 
-	for (i = 0; i < obj->nr_tlb_entries; i++) {
+	for (i = 0; i < num; i++) {
 		struct cr_regs tmp;
 
 		iotlb_lock_get(obj, &l);
@@ -402,18 +400,21 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
  * @obj:	target iommu
  * @buf:	output buffer
  **/
-size_t dump_tlb_entries(struct iommu *obj, char *buf)
+size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t bytes)
 {
-	int i, n;
+	int i, num;
 	struct cr_regs *cr;
 	char *p = buf;
 
-	cr = kcalloc(obj->nr_tlb_entries, sizeof(*cr), GFP_KERNEL);
+	num = bytes / sizeof(*cr);
+	num = min(obj->nr_tlb_entries, num);
+
+	cr = kcalloc(num, sizeof(*cr), GFP_KERNEL);
 	if (!cr)
 		return 0;
 
-	n = __dump_tlb_entries(obj, cr);
-	for (i = 0; i < n; i++)
+	num = __dump_tlb_entries(obj, cr, num);
+	for (i = 0; i < num; i++)
 		p += iotlb_dump_cr(obj, cr + i, p);
 	kfree(cr);
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
  2009-08-27  7:25             ` Hiroshi DOYU
@ 2009-08-28 18:24               ` Tony Lindgren
  0 siblings, 0 replies; 39+ messages in thread
From: Tony Lindgren @ 2009-08-28 18:24 UTC (permalink / raw)
  To: Hiroshi DOYU; +Cc: linux-arm-kernel, linux-omap, linux

* Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090827 00:26]:
> Hi Tony,
> 
> I fixed the error exit path as below and attached the updated verion
> of the patch. Please replace the old one in for-next with the attached
> one.

OK will update.

Tony

> 	Modified arch/arm/plat-omap/iommu-debug.c
> diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
> index 5a7e409..c799b3b 100644
> --- a/arch/arm/plat-omap/iommu-debug.c
> +++ b/arch/arm/plat-omap/iommu-debug.c
> @@ -268,14 +268,14 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
>  
>  	area = find_iovm_area(obj, (u32)ppos);
>  	if (IS_ERR(area)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EINVAL;
> +		bytes = -EINVAL;
> +		goto err_out;
>  	}
>  	memcpy(p, area->va, count);
>  	p += count;
>  
>  	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> -
> +err_out:
>  	mutex_unlock(&iommu_debug_lock);
>  	free_page((unsigned long)buf);
>  
> @@ -299,17 +299,17 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
>  	mutex_lock(&iommu_debug_lock);
>  
>  	if (copy_from_user(p, userbuf, count)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EFAULT;
> +		count =  -EFAULT;
> +		goto err_out;
>  	}
>  
>  	area = find_iovm_area(obj, (u32)ppos);
>  	if (IS_ERR(area)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EINVAL;
> +		count = -EINVAL;
> +		goto err_out;
>  	}
>  	memcpy(area->va, p, count);
> -
> +err_out:
>  	mutex_unlock(&iommu_debug_lock);
>  	free_page((unsigned long)buf);
>  



^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2009-08-28 18:24 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
2009-08-13  9:21   ` Russell King - ARM Linux
2009-08-12 12:13 ` [PATCH 02/10] OMAP: iommu: add initial debugfs support Tony Lindgren
2009-08-13  9:23   ` Russell King - ARM Linux
2009-08-15 12:06     ` Hiroshi DOYU
2009-08-16 15:13       ` Tony Lindgren
2009-08-16 20:47         ` Russell King - ARM Linux
2009-08-17  4:19           ` Hiroshi DOYU
2009-08-17  7:28           ` Hiroshi DOYU
2009-08-27  7:25             ` Hiroshi DOYU
2009-08-28 18:24               ` Tony Lindgren
2009-08-12 12:14 ` [PATCH 03/10] OMAP2/3: Pass irqflags to 8250 driver Tony Lindgren
2009-08-12 12:16 ` [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig Tony Lindgren
2009-08-13  9:24   ` Russell King - ARM Linux
2009-08-12 12:17 ` [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration Tony Lindgren
2009-08-13  9:24   ` Russell King - ARM Linux
2009-08-12 12:18 ` [PATCH 06/10] OMAP3: MMC: Add mux for pins Tony Lindgren
2009-08-13  9:26   ` Russell King - ARM Linux
2009-08-16 15:25     ` [PATCH 06/10] OMAP3: MMC: Add mux for pins, v2 Tony Lindgren
2009-08-12 12:20 ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support Tony Lindgren
2009-08-13  9:27   ` Russell King - ARM Linux
2009-08-16 15:28     ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support,v 2 Tony Lindgren
2009-08-12 12:21 ` [PATCH 08/10] OMAP3: Zoom2: Update board defconfig Tony Lindgren
2009-08-13  9:28   ` Russell King - ARM Linux
2009-08-12 12:22 ` [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data Tony Lindgren
2009-08-13  9:28   ` Russell King - ARM Linux
2009-08-12 12:24 ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig Tony Lindgren
2009-08-12 12:27   ` Felipe Balbi
2009-08-12 16:52     ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2 Tony Lindgren
2009-08-12 17:20       ` Kevin Hilman
2009-08-12 19:11         ` Felipe Balbi
2009-08-13  7:02           ` Tony Lindgren
2009-08-16  1:48             ` Eric Witcher
2009-08-16 15:42               ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3 Tony Lindgren
2009-08-16 17:07                 ` Felipe Balbi
2009-08-16 17:22                   ` Tony Lindgren
2009-08-19 13:40                 ` Felipe Balbi
2009-08-24 13:05 ` [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.