1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

Major layout change to the packages directory

Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.

The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.

Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie
2010-08-27 15:14:24 +01:00
parent da49de6885
commit 29d6678fd5
2534 changed files with 19 additions and 206 deletions
@@ -0,0 +1,48 @@
From f5b973489beb1a1239dfad53e3ad6e36ff7ee958 Mon Sep 17 00:00:00 2001
From: Segher Boessenkool <segher@kernel.crashing.org>
Date: Thu, 9 Oct 2008 21:18:27 +0100
Subject: [PATCH] fix-gcc-4.3-false-modulo-optimization.patch
I tried to compile the current stable kernel
(a2ef813d2f439a3e9f377d33a2e5baad098afb7e)
and get the following errors:
kernel/built-in.o: In function `timespec_add_ns':
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
undefined reference to `__aeabi_uldivmod'
applying the following patch solved the problem:
--------
Prevent gcc-4.3 form "optimizing" the while loop into a costly modulo operation.
Patch found at http://lkml.org/lkml/2008/2/22/464.
Reported-by: Sven Rebhan <odinshorse@googlemail.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
include/linux/time.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/time.h b/include/linux/time.h
index b04136d..3e8fd9e 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -173,6 +173,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
{
ns += a->tv_nsec;
while(unlikely(ns >= NSEC_PER_SEC)) {
+ /* The following asm() prevents the compiler from
+ * optimising this loop into a modulo operation. */
+ asm("" : "+r"(ns));
+
ns -= NSEC_PER_SEC;
a->tv_sec++;
}
--
1.5.6.5
@@ -0,0 +1,16 @@
Fix compilation of the sumversion "script"
http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=226169
Index: linux-2.6.21/scripts/mod/sumversion.c
===================================================================
--- linux-2.6.21.orig/scripts/mod/sumversion.c 2007-04-26 04:08:32.000000000 +0100
+++ linux-2.6.21/scripts/mod/sumversion.c 2010-05-13 14:41:31.777882280 +0100
@@ -7,6 +7,7 @@
#include <ctype.h>
#include <errno.h>
#include <string.h>
+#include <limits.h>
#include "modpost.h"
/*
@@ -0,0 +1,16 @@
---
arch/arm/kernel/vmlinux.lds.S | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.22/arch/arm/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.22.orig/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:32:29.000000000 +0200
+++ linux-2.6.22/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:33:42.000000000 +0200
@@ -94,6 +94,7 @@
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
+ *(.note.*)
#ifdef CONFIG_MMU
*(.fixup)
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
From e566813cedb9f91724597df45c11075023a7b589 Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 18:58:27 -0400
Subject: [PATCH] cm-x270-match-type
---
arch/arm/boot/compressed/head-xscale.S | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index 73c5d9e..dc89459 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -53,3 +53,8 @@ __XScale_start:
str r1, [r0, #0x18]
#endif
+#if defined(CONFIG_MACH_ARMCORE)
+ mov r7, #(MACH_TYPE_ARMCORE & 0xFF00)
+ add r7, r7, #(MACH_TYPE_ARMCORE & 0xFF)
+#endif
+
--
1.5.1.6
@@ -0,0 +1,186 @@
From f260d5fa4c99cd7df949e6408af59807f8ccf224 Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 18:59:39 -0400
Subject: [PATCH] cm-x270-ide
---
drivers/ide/Kconfig | 8 +++
drivers/ide/arm/Makefile | 1 +
drivers/ide/arm/cm-x270-ide.c | 135 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 144 insertions(+), 0 deletions(-)
create mode 100644 drivers/ide/arm/cm-x270-ide.c
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index b1a9b81..7de4155 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -864,6 +864,14 @@ config BLK_DEV_IDE_BAST
Say Y here if you want to support the onboard IDE channels on the
Simtec BAST or the Thorcom VR1000
+config BLK_DEV_IDE_CM_X270
+ tristate "CompuLab CM-X270 IDE support"
+ depends on ARM && (MACH_ARMCORE)
+ help
+ Say Y here if you want to support the onboard IDE channels on the
+ CompuLab CM-X270 module
+
+
config BLK_DEV_GAYLE
bool "Amiga Gayle IDE interface support"
depends on AMIGA
diff --git a/drivers/ide/arm/Makefile b/drivers/ide/arm/Makefile
index 6a78f07..e5cadb7 100644
--- a/drivers/ide/arm/Makefile
+++ b/drivers/ide/arm/Makefile
@@ -2,5 +2,6 @@
obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
obj-$(CONFIG_BLK_DEV_IDE_BAST) += bast-ide.o
+obj-$(CONFIG_BLK_DEV_IDE_CM_X270) += cm-x270-ide.o
EXTRA_CFLAGS := -Idrivers/ide
diff --git a/drivers/ide/arm/cm-x270-ide.c b/drivers/ide/arm/cm-x270-ide.c
new file mode 100644
index 0000000..a8b15aa
--- /dev/null
+++ b/drivers/ide/arm/cm-x270-ide.c
@@ -0,0 +1,135 @@
+/* linux/drivers/ide/arm/cm-x270-ide.c
+ *
+ * Copyright (c) 2006 CompuLab, Ltd
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ * Based on linux/drivers/ide/arm/bast-ide.c
+ * Copyright (c) 2003-2004 Simtec Electronics
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * 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/module.h>
+#include <linux/errno.h>
+#include <linux/ide.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/io.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/cm-x270.h>
+
+#define CMX270_SB270_IDECS0_VIRT (CMX270_IDE104_VIRT + (1<<24) + (1<<25))
+#define CMX270_SB270_IDECS1_VIRT (CMX270_IDE104_VIRT + (1<<25))
+#define CMX270_ATX_IDECS0_VIRT (CMX270_IDE104_VIRT + (1<<25))
+#define CMX270_ATX_IDECS1_VIRT (CMX270_IDE104_VIRT + (1<<25) + (1<<22))
+
+/* list of registered interfaces */
+static ide_hwif_t *ifs[1];
+
+static int __init
+cmx270_ide_register(unsigned int base, unsigned int aux, int irq,
+ ide_hwif_t **hwif)
+{
+ hw_regs_t hw;
+
+ memset(&hw, 0, sizeof(hw));
+
+ if(!base || !aux) return -EINVAL;
+
+ printk(KERN_DEBUG "%s: base = %08x, aux = %08x\n", __FUNCTION__,
+ base, aux);
+
+ /* Different mappings for local bus IDE and PCMCIA IDE */
+ if(base == CMX270_SB270_IDECS0_VIRT) {
+ hw.io_ports[IDE_DATA_OFFSET] = base + 0;
+ hw.io_ports[IDE_ERROR_OFFSET] = base + (0x1<<3);
+ hw.io_ports[IDE_NSECTOR_OFFSET]= base + (0x2<<3);
+ hw.io_ports[IDE_SECTOR_OFFSET]= base + (0x3<<3);
+ hw.io_ports[IDE_LCYL_OFFSET]= base + (0x4<<3);
+ hw.io_ports[IDE_HCYL_OFFSET]= base + (0x5<<3);
+ hw.io_ports[IDE_SELECT_OFFSET]= base + (0x6<<3);
+ hw.io_ports[IDE_STATUS_OFFSET]= base + (0x7<<3);
+ hw.io_ports[IDE_CONTROL_OFFSET] = aux+(0x6<<3);
+ }
+ else if (base == CMX270_ATX_IDECS0_VIRT) { /* atx base */
+ hw.io_ports[IDE_DATA_OFFSET] = base + 0;
+ hw.io_ports[IDE_ERROR_OFFSET] = base + 8;
+ hw.io_ports[IDE_NSECTOR_OFFSET]= base + 2;
+ hw.io_ports[IDE_SECTOR_OFFSET]= base + 10;
+ hw.io_ports[IDE_LCYL_OFFSET]= base + 4;
+ hw.io_ports[IDE_HCYL_OFFSET]= base + 12;
+ hw.io_ports[IDE_SELECT_OFFSET]= base + 6; //6;
+ hw.io_ports[IDE_STATUS_OFFSET]= base + 14;
+ hw.io_ports[IDE_CONTROL_OFFSET] = (aux+0x6);
+ } else {
+ printk(KERN_DEBUG "%s: registering wrong IDE i/f\n", __FUNCTION__);
+ hw.io_ports[IDE_DATA_OFFSET] = base + 8;
+ hw.io_ports[IDE_ERROR_OFFSET] = base + 13;
+ hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2;
+ hw.io_ports[IDE_SECTOR_OFFSET] = base + 3;
+ hw.io_ports[IDE_LCYL_OFFSET] = base + 4;
+ hw.io_ports[IDE_HCYL_OFFSET] = base + 5;
+ hw.io_ports[IDE_SELECT_OFFSET] = base + 6;
+ hw.io_ports[IDE_STATUS_OFFSET] = base + 7;
+ hw.io_ports[IDE_CONTROL_OFFSET] = aux;
+ }
+
+ hw.irq = irq;
+
+ return ide_register_hw(&hw, hwif);
+}
+
+static int __init cmx270_ide_init(void)
+{
+ int retval = 0;
+
+ if (!(machine_is_armcore()))
+ goto out;
+
+ printk("CM-X270: initializing IDE interface\n");
+
+ MSC1 = 0x7ffc7ff4;
+
+ /* Interrupts on rising edge: lines are inverted before they get to
+ the PXA */
+ pxa_gpio_mode(IRQ_TO_GPIO(CMX270_IDE_IRQ));
+
+ /* try SB-X270 */
+ set_irq_type(CMX270_IDE_IRQ, IRQ_TYPE_EDGE_RISING);
+ retval = cmx270_ide_register(CMX270_SB270_IDECS0_VIRT,
+ CMX270_SB270_IDECS1_VIRT,
+ CMX270_IDE_IRQ, &ifs[0]);
+ if (retval >= 0) {
+ printk(KERN_DEBUG "%s: found IDE interface on SB-X270\n",
+ __FUNCTION__);
+ goto out;
+ }
+
+ /* SB-X270 detection failed, try ATX */
+ set_irq_type(CMX270_IDE_IRQ, IRQ_TYPE_EDGE_FALLING);
+ retval = cmx270_ide_register(CMX270_ATX_IDECS0_VIRT,
+ CMX270_ATX_IDECS1_VIRT,
+ CMX270_IDE_IRQ, &ifs[0]);
+
+ if ( retval >= 0 ) {
+ printk(KERN_DEBUG "%s: found IDE interface on ATX\n",
+ __FUNCTION__);
+ goto out;
+ }
+
+ out:
+ return retval;
+}
+
+module_init(cmx270_ide_init);
+
+MODULE_AUTHOR("CompuLab");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("CompuLab CM-X270 IDE driver");
--
1.5.1.6
@@ -0,0 +1,496 @@
From 1306abec905df1ff5cf2b1d91ac0d94d18d96c5b Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:00:07 -0400
Subject: [PATCH] cm-x270-it8152
---
arch/arm/common/Makefile | 1 +
arch/arm/common/it8152.c | 272 +++++++++++++++++++++++++++++++++++++
arch/arm/kernel/bios32.c | 28 ++++-
include/asm-arm/hardware/it8152.h | 104 ++++++++++++++
include/asm-arm/pci.h | 7 +
include/linux/pci_ids.h | 1 +
6 files changed, 410 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/common/it8152.c
create mode 100644 include/asm-arm/hardware/it8152.h
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index e1289a2..3d0b9fa 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -17,3 +17,4 @@ obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
obj-$(CONFIG_ARCH_IXP2000) += uengine.o
obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
+obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
new file mode 100644
index 0000000..8563610
--- /dev/null
+++ b/arch/arm/common/it8152.c
@@ -0,0 +1,272 @@
+/*
+ * arch/arm/common/it8152.c: PCI functions for IT8152
+ *
+ * Compulab Ltd, 2002-2006
+ *
+ * The DMA bouncing is taken from arch/arm/mach-ixp4xx/common-pci.c
+ * (see this file for respective copyrights)
+ *
+ * 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/sched.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/ptrace.h>
+#include <linux/interrupt.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <asm/mach/map.h>
+
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/mach/pci.h>
+#include <asm/hardware/it8152.h>
+
+#define MAX_SLOTS 21
+
+static unsigned long
+it8152_pci_dev_base_address(struct pci_bus *bus, unsigned int devfn)
+{
+ unsigned long addr = 0;
+
+ if (bus->number == 0) {
+ if (devfn < PCI_DEVFN(MAX_SLOTS, 0))
+ addr = (devfn << 8);
+ } else
+ addr = (bus->number << 16) | (devfn << 8);
+
+ return addr;
+}
+
+static int
+it8152_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where,
+ int size, u32 *value)
+{
+ unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
+ u32 v;
+ int shift;
+
+#ifdef CONFIG_MACH_ARMCORE
+ if(devfn!=0) IT8152_GPIO_GPLR=0x00;
+#endif
+ shift = (where & 3);
+
+ IT8152_PCI_CFG_ADDR = (addr + where);
+ v = (IT8152_PCI_CFG_DATA >> (8 * (shift)));
+
+ *value = v;
+
+#ifdef CONFIG_MACH_ARMCORE
+ if(devfn!=0) IT8152_GPIO_GPLR=0x20;
+#endif
+
+ return PCIBIOS_SUCCESSFUL;
+}
+
+
+static int
+it8152_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where,
+ int size, u32 value)
+{
+ unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
+ u32 v, vtemp, mask=0;
+ int shift;
+
+#ifdef CONFIG_MACH_ARMCORE
+ if(devfn!=0) IT8152_GPIO_GPLR=0x00;
+#endif
+
+ if(size==1) mask=0xff;
+ if(size==2) mask=0xffff;
+
+ shift = (where & 3);
+
+ IT8152_PCI_CFG_ADDR = addr + where;
+ vtemp = IT8152_PCI_CFG_DATA;
+
+ if(mask) vtemp &= ~(mask << (8 * shift));
+ else vtemp = 0;
+
+ v = (value << (8 * shift));
+ IT8152_PCI_CFG_ADDR = addr + where;
+ IT8152_PCI_CFG_DATA = (v | vtemp);
+
+#ifdef CONFIG_MACH_ARMCORE
+ if(devfn!=0) IT8152_GPIO_GPLR=0x20;
+#endif
+
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops it8152_ops = {
+ .read = it8152_pci_read_config,
+ .write = it8152_pci_write_config,
+};
+
+static struct resource it8152_io = {
+ .name = "IT8152 PCI I/O region",
+ .flags = IORESOURCE_IO,
+};
+
+static struct resource it8152_mem1 = {
+ .name = "First IT8152 PCI memory region",
+ .start = 0x10000000,
+ .end = 0x13e00000,
+ .flags = IORESOURCE_MEM,
+};
+
+/*
+ * The following functions are needed for DMA bouncing.
+ * ITE8152 chip can addrees up to 64MByte, so all the devices
+ * connected to ITE8152 (PCI and USB) should have limited DMA window
+ */
+
+/*
+ * Setup DMA mask to 64MB on devices connected to ITE8152. Ignore all
+ * other devices.
+ */
+static int it8152_pci_platform_notify(struct device *dev)
+{
+ if ( dev->bus == &pci_bus_type ) {
+ if ( dev->dma_mask )
+ *dev->dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
+ dev->coherent_dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
+ dmabounce_register_dev(dev, 2048, 4096);
+ }
+ return 0;
+}
+
+static int it8152_pci_platform_notify_remove(struct device *dev)
+{
+ if ( dev->bus == &pci_bus_type ) {
+ dmabounce_unregister_dev(dev);
+ }
+ return 0;
+}
+
+int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
+{
+ dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
+ __FUNCTION__, dma_addr, size);
+ return (dev->bus == &pci_bus_type ) &&
+ ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
+}
+
+/*
+ * Only first 64MB of memory can be accessed via PCI.
+ * We use GFP_DMA to allocate safe buffers to do map/unmap.
+ * This is really ugly and we need a better way of specifying
+ * DMA-capable regions of memory.
+ */
+void __init it8152_adjust_zones(int node, unsigned long *zone_size,
+ unsigned long *zhole_size)
+{
+ unsigned int sz = SZ_64M >> PAGE_SHIFT;
+
+ /*
+ * Only adjust if > 64M on current system
+ */
+ if (node || (zone_size[0] <= sz))
+ return;
+
+ zone_size[1] = zone_size[0] - sz;
+ zone_size[0] = sz;
+ zhole_size[1] = zhole_size[0];
+ zhole_size[0] = 0;
+}
+
+/*
+ * We override these so we properly do dmabounce otherwise drivers
+ * are able to set the dma_mask to 0xffffffff and we can no longer
+ * trap bounces. :(
+ *
+ * We just return true on everyhing except for < 64MB in which case
+ * we will fail miseralby and die since we can't handle that case.
+ */
+int
+pci_set_dma_mask(struct pci_dev *dev, u64 mask)
+{
+ printk(KERN_INFO "===> %s: %s %x\n", __FUNCTION__, dev->dev.bus_id, mask);
+ if (mask >= PHYS_OFFSET + SZ_64M - 1 )
+ return 0;
+
+ return -EIO;
+}
+
+int
+pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
+{
+ printk(KERN_INFO "===> %s: %s %x\n", __FUNCTION__, dev->dev.bus_id, mask);
+ if (mask >= PHYS_OFFSET + SZ_64M - 1 )
+ return 0;
+
+ return -EIO;
+}
+
+EXPORT_SYMBOL(pci_set_dma_mask);
+EXPORT_SYMBOL(pci_set_consistent_dma_mask);
+
+
+int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
+{
+ it8152_io.start = IT8152_IO_BASE + 0x12000;
+ it8152_io.end = IT8152_IO_BASE + 0x100000;
+
+ if (request_resource(&ioport_resource, &it8152_io)) {
+ printk(KERN_ERR "PCI: unable to allocate IO region\n");
+ return -EBUSY;
+ }
+ if (request_resource(&iomem_resource, &it8152_mem1)) {
+ printk(KERN_ERR "PCI: unable to allocate memory region\n");
+ return -EBUSY;
+ }
+
+ sys->resource[0] = &it8152_io;
+ sys->resource[1] = &it8152_mem1;
+
+ if (platform_notify || platform_notify_remove) {
+ printk(KERN_ERR "PCI: Can't use platform_notify\n");
+ return -EBUSY;
+ }
+
+ platform_notify = it8152_pci_platform_notify;
+ platform_notify_remove = it8152_pci_platform_notify_remove;
+
+ return 1;
+}
+
+/*
+ * If we set up a device for bus mastering, we need to check the latency
+ * timer as we don't have even crappy BIOSes to set it properly.
+ * The implementation is from arch/i386/pci/i386.c
+ */
+unsigned int pcibios_max_latency = 255;
+
+void pcibios_set_master(struct pci_dev *dev)
+{
+ u8 lat;
+
+ pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+ if (lat < 16)
+ lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
+ else if (lat > pcibios_max_latency)
+ lat = pcibios_max_latency;
+ else
+ return;
+ printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
+ pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
+}
+
+
+struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys)
+{
+ return pci_scan_bus(nr, &it8152_ops, sys);
+}
+
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 240c448..d8d2352 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -279,6 +279,25 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
+static void __init pci_fixup_it8152(struct pci_dev *dev)
+{
+ int i;
+ /* fixup for ITE 8152 devices */
+ /* FIXME: add defines for class 0x68000 and 0x80103 */
+ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST ||
+ dev->class == 0x68000 ||
+ dev->class == 0x80103) {
+ for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+ dev->resource[i].start = 0;
+ dev->resource[i].end = 0;
+ dev->resource[i].flags = 0;
+ }
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8152, pci_fixup_it8152);
+
+
+
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{
if (debug_pci)
@@ -292,9 +311,12 @@ void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
*/
static inline int pdev_bad_for_parity(struct pci_dev *dev)
{
- return (dev->vendor == PCI_VENDOR_ID_INTERG &&
- (dev->device == PCI_DEVICE_ID_INTERG_2000 ||
- dev->device == PCI_DEVICE_ID_INTERG_2010));
+ return ((dev->vendor == PCI_VENDOR_ID_INTERG &&
+ (dev->device == PCI_DEVICE_ID_INTERG_2000 ||
+ dev->device == PCI_DEVICE_ID_INTERG_2010)) ||
+ (dev->vendor == PCI_VENDOR_ID_ITE &&
+ dev->device == PCI_DEVICE_ID_ITE_8152));
+
}
/*
diff --git a/include/asm-arm/hardware/it8152.h b/include/asm-arm/hardware/it8152.h
new file mode 100644
index 0000000..d28210d
--- /dev/null
+++ b/include/asm-arm/hardware/it8152.h
@@ -0,0 +1,104 @@
+/*
+ * arch/arm/mach-pxa/it8152.h
+ *
+ * Compulab Ltd., 2006
+ *
+ * ITE 8152 companion chip definitions
+ */
+
+
+/* #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) */
+
+
+extern unsigned long it8152_base_address;
+
+#define IT8152_IO_BASE (it8152_base_address + 0x03e00000)
+#define IT8152_CFGREG_BASE (it8152_base_address + 0x03f00000)
+
+/* #define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ) */
+
+#define IT8152_SHORT_IO(x) (*((volatile unsigned short *)(IT8152_CFGREG_BASE+(x))))
+#define IT8152_LONG_IO(x) (*((volatile unsigned long *)(IT8152_CFGREG_BASE+(x))))
+
+
+#define IT8152_PCI_MEMBASE (*((volatile unsigned long *)(it8152_base_address)))
+/* #define IT8152_PCI_IOBASE (*((volatile unsigned long *)(it8152_base_address + 0x3e00000))) */
+
+#define IT8152_PCI_IACK (*((volatile unsigned long *)(it8152_base_address + 0x3f00808)))
+#define IT8152_PCI_CFG_ADDR (*((volatile unsigned long *)(it8152_base_address + 0x3f00800)))
+#define IT8152_PCI_CFG_DATA (*((volatile unsigned long *)(it8152_base_address + 0x3f00804)))
+
+#define IT_BUSNUM_SHF 16
+#define IT_DEVNUM_SHF 11
+#define IT_FUNCNUM_SHF 8
+#define IT_REGNUM_SHF 2
+
+/* Power management & PLL registers */
+#define IT8152_PMPLL_DSR IT8152_LONG_IO(0x00)
+#define IT8152_PMPLL_DSSR IT8152_LONG_IO(0x04)
+#define IT8152_PMPLL_PLLCR IT8152_LONG_IO(0x20)
+#define IT8152_PMPLL_MFSR IT8152_LONG_IO(0x24)
+
+/* Memory controller */
+#define IT8152_MC_REG_OFFSET 0x100
+
+#define IT8152_MC_SDCR IT8152_LONG_IO(IT8152_MC_REG_OFFSET + 0x00)
+#define IT8152_MC_PCICR IT8152_LONG_IO(IT8152_MC_REG_OFFSET + 0x04)
+
+/* Interrupt related definitions */
+#define IT8152_INTC_REG_OFFSET 0x300
+
+#define IT8152_INTC_LDCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x00)
+#define IT8152_INTC_LDPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x04)
+#define IT8152_INTC_LDCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x08)
+#define IT8152_INTC_LDPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x0C)
+#define IT8152_INTC_LDNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x10)
+#define IT8152_INTC_LDNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x14)
+#define IT8152_INTC_LPCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x20)
+#define IT8152_INTC_LPPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x24)
+#define IT8152_INTC_LPCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x28)
+#define IT8152_INTC_LPPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x2C)
+#define IT8152_INTC_LPNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x30)
+#define IT8152_INTC_LPNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x34)
+#define IT8152_INTC_PDCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x40)
+#define IT8152_INTC_PDPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x44)
+#define IT8152_INTC_PDCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x48)
+#define IT8152_INTC_PDPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x4C)
+#define IT8152_INTC_PDNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x50)
+#define IT8152_INTC_PDNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x54)
+#define IT8152_INTC_INTC_TYPER IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0xFC)
+
+#define IT8152_UART_BASE IT8152_LONG_IO(0x200)
+
+#define IT8152_GPIO_REG_OFFSET 0x500
+
+#define IT8152_GPIO_GPLR IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET)
+#define IT8152_GPIO_GPCR12 IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET + 0x04)
+#define IT8152_GPIO_GPCR34 IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET + 0x08)
+
+
+/* Interrupt bit definitions */
+#define PCISERR_BIT (1<<14)
+#define H2PTADR_BIT (1<<13)
+#define H2PMAR_BIT (1<<12)
+#define PCI_INTD_BIT (1<<11)
+#define PCI_INTC_BIT (1<<10)
+#define PCI_INTB_BIT (1<<9)
+#define PCI_INTA_BIT (1<<8)
+#define CDMA_INT_BIT (1<<2)
+#define USB_INT_BIT (1<<1)
+#define AUDIO_INT_BIT (1<<0)
+
+/* IT8152 UART */
+#define ITESER_BIT (1<<5)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index f21abd4..2cf30bf 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -8,10 +8,17 @@
#define pcibios_scan_all_fns(a, b) 0
+#ifdef CONFIG_PCI_HOST_ITE8152
+/* ITE bridge requires setting latency timer to avoid early bus access
+ termination by PIC bus mater devices
+*/
+extern void pcibios_set_master(struct pci_dev *dev);
+#else
static inline void pcibios_set_master(struct pci_dev *dev)
{
/* No special bus mastering setup handling */
}
+#endif
static inline void pcibios_penalize_isa_irq(int irq, int active)
{
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 5b1c999..b4c81d5 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1650,6 +1650,7 @@
#define PCI_DEVICE_ID_ITE_8211 0x8211
#define PCI_DEVICE_ID_ITE_8212 0x8212
#define PCI_DEVICE_ID_ITE_8213 0x8213
+#define PCI_DEVICE_ID_ITE_8152 0x8152
#define PCI_DEVICE_ID_ITE_8872 0x8872
#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
--
1.5.1.6
@@ -0,0 +1,228 @@
From 338653da8f8afcdf8afc7e8a5a0104d5083597cc Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:01:27 -0400
Subject: [PATCH] cm-x270-pcmcia
---
drivers/pcmcia/Makefile | 1 +
drivers/pcmcia/pxa2xx_cm_x270.c | 198 +++++++++++++++++++++++++++++++++++++++
2 files changed, 199 insertions(+), 0 deletions(-)
create mode 100644 drivers/pcmcia/pxa2xx_cm_x270.c
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 4276965..353d5b7 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -69,4 +69,5 @@ sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
pxa2xx_cs-$(CONFIG_ARCH_LUBBOCK) += pxa2xx_lubbock.o sa1111_generic.o
pxa2xx_cs-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o
pxa2xx_cs-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o
+pxa2xx_cs-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x270.o
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
new file mode 100644
index 0000000..25e369f
--- /dev/null
+++ b/drivers/pcmcia/pxa2xx_cm_x270.c
@@ -0,0 +1,198 @@
+/*
+ * linux/drivers/pcmcia/pxa/pxa_armcore.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Compulab Ltd., 2003
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+
+#include <pcmcia/ss.h>
+#include <asm/delay.h>
+#include <asm/hardware.h>
+
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/cm-x270.h>
+
+#include "soc_common.h"
+
+
+static struct pcmcia_irqs irqs[] = {
+ { 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" },
+ { 1, PCMCIA_S1_CD_VALID, "PCMCIA1 CD" },
+};
+
+
+static int
+cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+ int return_val=0;
+
+ GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
+ GPIO_bit(GPIO49_nPWE) |
+ GPIO_bit(GPIO50_nPIOR) |
+ GPIO_bit(GPIO51_nPIOW) |
+ GPIO_bit(GPIO85_nPCE_1) |
+ GPIO_bit(GPIO54_nPCE_2);
+
+ pxa_gpio_mode(GPIO48_nPOE_MD);
+ pxa_gpio_mode(GPIO49_nPWE_MD);
+ pxa_gpio_mode(GPIO50_nPIOR_MD);
+ pxa_gpio_mode(GPIO51_nPIOW_MD);
+ pxa_gpio_mode(GPIO85_nPCE_1_MD);
+ pxa_gpio_mode(GPIO54_nPCE_2_MD);
+ //pxa_gpio_mode(GPIO79_pSKTSEL_MD); /* REVISIT: s/b dependent on num sockets (on ATX base not routed)*/
+ pxa_gpio_mode(GPIO55_nPREG_MD);
+ pxa_gpio_mode(GPIO56_nPWAIT_MD);
+ pxa_gpio_mode(GPIO57_nIOIS16_MD);
+
+ // Reset signal
+ GPDR(GPIO53_nPCE_2) |= GPIO_bit(GPIO53_nPCE_2);
+ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
+
+ GPDR(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID));
+ GPDR(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID));
+
+ set_irq_type(PCMCIA_S0_CD_VALID, IRQ_TYPE_EDGE_BOTH);
+ set_irq_type(PCMCIA_S1_CD_VALID, IRQ_TYPE_EDGE_BOTH);
+
+ //irq's for slots:
+ GPDR(IRQ_TO_GPIO(PCMCIA_S0_RDYINT)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S0_RDYINT));
+ GPDR(IRQ_TO_GPIO(PCMCIA_S1_RDYINT)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S1_RDYINT));
+
+ set_irq_type(PCMCIA_S0_RDYINT, IRQ_TYPE_EDGE_FALLING);
+ set_irq_type(PCMCIA_S1_RDYINT, IRQ_TYPE_EDGE_FALLING);
+
+ skt->irq = (skt->nr == 0) ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
+ return_val = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+
+ return return_val;
+}
+
+
+static void cmx270_pcmcia_shutdown(struct soc_pcmcia_socket *skt)
+{
+ soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
+
+ set_irq_type(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID), IRQ_TYPE_NONE);
+ set_irq_type(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID), IRQ_TYPE_NONE);
+
+ set_irq_type(IRQ_TO_GPIO(PCMCIA_S0_RDYINT), IRQ_TYPE_NONE);
+ set_irq_type(IRQ_TO_GPIO(PCMCIA_S1_RDYINT), IRQ_TYPE_NONE);
+}
+
+
+static void cmx270_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+ struct pcmcia_state *state)
+{
+
+ state->detect = (PCC_DETECT(skt->nr) == 0) ? 1 : 0;
+ state->ready = (PCC_READY(skt->nr) == 0) ? 0 : 1;
+ state->bvd1 = 1;
+ state->bvd2 = 1;
+ state->vs_3v = 0;
+ state->vs_Xv = 0;
+ state->wrprot = 0; /* not available */
+
+}
+
+
+static int
+cmx270_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ const socket_state_t *state)
+{
+
+ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
+ pxa_gpio_mode(GPIO49_nPWE | GPIO_OUT);
+ //pxa_gpio_mode(GPIO79_pSKTSEL_MD | GPIO_OUT); /* For 2-socket mode */
+
+ switch(skt->nr){
+ case 0:
+ if(state->flags & SS_RESET) {
+ //GPCR(GPIO79_pSKTSEL) = GPIO_bit(GPIO79_pSKTSEL); /* For 2-socket mode */
+ //udelay(1);
+ GPCR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
+ GPSR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
+ udelay(10);
+ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
+ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
+ }
+ break;
+ case 1:
+ if(state->flags & SS_RESET) {
+ //GPCR(GPIO79_pSKTSEL) = GPIO_bit(GPIO79_pSKTSEL); /* For 2-socket mode */
+ //udelay(1);
+ GPCR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
+ GPSR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
+ udelay(10);
+ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
+ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
+ }
+ break;
+ }
+
+ pxa_gpio_mode(GPIO49_nPWE_MD);
+ //pxa_gpio_mode(GPIO79_pSKTSEL_MD); /* For 2-socket mode */
+
+
+ return 0;
+}
+
+static void cmx270_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+}
+
+static void cmx270_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+}
+
+
+static struct pcmcia_low_level cmx270_pcmcia_ops = {
+ .owner = THIS_MODULE,
+ .hw_init = cmx270_pcmcia_hw_init,
+ .hw_shutdown = cmx270_pcmcia_shutdown,
+ .socket_state = cmx270_pcmcia_socket_state,
+ .configure_socket = cmx270_pcmcia_configure_socket,
+ .socket_init = cmx270_pcmcia_socket_init,
+ .socket_suspend = cmx270_pcmcia_socket_suspend,
+ .nr = 2,
+};
+
+static struct platform_device *cmx270_pcmcia_device;
+
+static int __init cmx270_pcmcia_init(void)
+{
+ int ret;
+
+ cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+
+ if (!cmx270_pcmcia_device)
+ return -ENOMEM;
+
+ cmx270_pcmcia_device->dev.platform_data = &cmx270_pcmcia_ops;
+
+ printk ("Registering cm-x270 PCMCIA interface.\n");
+ ret = platform_device_add(cmx270_pcmcia_device);
+
+ if (ret)
+ platform_device_put(cmx270_pcmcia_device);
+
+ return ret;
+}
+
+static void __exit cmx270_pcmcia_exit(void)
+{
+ platform_device_unregister(cmx270_pcmcia_device);
+}
+
+module_init(cmx270_pcmcia_init);
+module_exit(cmx270_pcmcia_exit);
+
+MODULE_LICENSE("GPL");
--
1.5.1.6
@@ -0,0 +1,80 @@
From ca4508b1266109208f62e986b51397ce2788e255 Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:01:50 -0400
Subject: [PATCH] ramdisk_load
---
arch/arm/mach-pxa/cm-x270.c | 6 ++++++
include/asm-arm/arch-pxa/cm-x270.h | 2 ++
init/initramfs.c | 16 ++++++++++++++++
3 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index 88b080d..c6ec489 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -308,6 +308,12 @@ static struct map_desc cmx270_io_desc[] __initdata = {
.length = PXA_CS_SIZE,
.type = MT_DEVICE
},
+ [2] = { /* NOR flash */
+ .virtual = CMX270_FLASH_VIRT,
+ .pfn = __phys_to_pfn(PXA_CS0_PHYS),
+ .length = (8<<20), /* up to 8 MByte flash */
+ .type = MT_DEVICE
+ },
};
/*
diff --git a/include/asm-arm/arch-pxa/cm-x270.h b/include/asm-arm/arch-pxa/cm-x270.h
index 24613a5..aad152e 100644
--- a/include/asm-arm/arch-pxa/cm-x270.h
+++ b/include/asm-arm/arch-pxa/cm-x270.h
@@ -20,7 +20,9 @@
#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
#define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + PXA_CS_SIZE)
+#define CMX270_FLASH_VIRT (CMX270_IDE104_VIRT + PXA_CS_SIZE)
+#define CMX270_FLASH_RAMDISK_VIRT (CMX270_FLASH_VIRT + 0x1c0000)
/* GPIO related definitions */
#define GPIO_IT8152_IRQ (22)
diff --git a/init/initramfs.c b/init/initramfs.c
index 00eff7a..0ecd40b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -7,6 +7,9 @@
#include <linux/string.h>
#include <linux/syscalls.h>
+// HACK for compulab cm-x270
+#include <asm/arch/cm-x270.h>
+
static __initdata char *message;
static void __init error(char *x)
{
@@ -550,7 +553,20 @@ static int __init populate_rootfs(void)
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) {
#ifdef CONFIG_BLK_DEV_RAM
+
+ /* hack to make initramfs work because the
+ * compulab BL does not zero out the
+ * initrd memory. This only seems to affect loading
+ * initramfs (cpio.gz) archives. Does not seem to
+ * affect ramdisks.
+ */
+ int initrd_size = *(int *)(CMX270_FLASH_RAMDISK_VIRT);
int fd;
+
+ initrd_end = initrd_start + initrd_size;
+ //printk("CLIFF: initrd_start = 0x%x\n", initrd_start);
+ //printk("CLIFF: initrd_end = 0x%x\n", initrd_end);
+
printk(KERN_INFO "checking if image is initramfs...");
err = unpack_to_rootfs((char *)initrd_start,
initrd_end - initrd_start, 1);
--
1.5.1.6
@@ -0,0 +1,36 @@
From 26638b93f7479dc597a58e2e2b2832c6ff4c8f7b Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:02:55 -0400
Subject: [PATCH] mmcsd_large_cards-r0
---
drivers/mmc/card/block.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 540ff4b..1f8d67d 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -403,6 +403,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
{
struct mmc_blk_data *md;
int devidx, ret;
+ unsigned long cap;
devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
if (devidx >= MMC_NUM_MINORS)
@@ -467,6 +468,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
sprintf(md->disk->disk_name, "mmcblk%d", devidx);
+ if (card->csd.read_blkbits > 9)
+ md->block_bits = 9;
+ else
+ md->block_bits = card->csd.read_blkbits;
+
blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
--
1.5.1.6
@@ -0,0 +1,25 @@
From e1a243564a40d7542a62d4684f2e6ce0b95fa267 Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:04:12 -0400
Subject: [PATCH] cm-x270-nand-simplify-name
---
drivers/mtd/nand/cmx270_nand.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c
index cb663ef..3654ce4 100644
--- a/drivers/mtd/nand/cmx270_nand.c
+++ b/drivers/mtd/nand/cmx270_nand.c
@@ -191,6 +191,8 @@ static int cmx270_init(void)
cmx270_nand_mtd->owner = THIS_MODULE;
cmx270_nand_mtd->priv = this;
+ cmx270_nand_mtd->name = "cm-x270-nand";
+
/* insert callbacks */
this->IO_ADDR_R = cmx270_nand_io;
this->IO_ADDR_W = cmx270_nand_io;
--
1.5.1.6
@@ -0,0 +1,13 @@
Index: linux-2.6.23/arch/arm/mach-pxa/cm-x270.c
===================================================================
--- linux-2.6.23.orig/arch/arm/mach-pxa/cm-x270.c 2008-02-14 20:32:28.000000000 +0000
+++ linux-2.6.23/arch/arm/mach-pxa/cm-x270.c 2008-02-14 20:27:55.000000000 +0000
@@ -383,7 +383,7 @@
static struct pxafb_mode_info generic_crt_640x480_mode = {
.pixclock = 38461,
- .bpp = 8,
+ .bpp = 16,
.xres = 640,
.yres = 480,
.hsync_len = 63,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
Index: linux-2.6.23/arch/arm/mach-pxa/em-x270-pm.c
===================================================================
--- linux-2.6.23.orig/arch/arm/mach-pxa/em-x270-pm.c 2008-02-21 14:30:06.000000000 +0000
+++ linux-2.6.23/arch/arm/mach-pxa/em-x270-pm.c 2008-02-21 14:59:24.000000000 +0000
@@ -461,6 +461,9 @@
else {
val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
}
+ }
+ else {
+ val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
}
}
else {
@@ -547,8 +550,9 @@
pr_debug("%s: MODEL = %s\n", __FUNCTION__, val->strval);
break;
default: break;
+ return -1;
}
-
+
return 0;
}
Index: linux-2.6.23/drivers/power/em_x270_battery.c
===================================================================
--- linux-2.6.23.orig/drivers/power/em_x270_battery.c 2008-02-21 12:21:53.000000000 +0000
+++ linux-2.6.23/drivers/power/em_x270_battery.c 2008-02-21 15:00:51.000000000 +0000
@@ -418,8 +418,9 @@
pr_debug("%s: MODEL = %s\n", __FUNCTION__, val->strval);
break;
default: break;
+ return -1;
}
-
+
return 0;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
SECTION = "kernel"
DESCRIPTION = "Dummy Linux kernel"
LICENSE = "GPL"
PROVIDES += "virtual/kernel"
PACKAGES_DYNAMIC += "kernel-module-*"
PACKAGES_DYNAMIC += "kernel-image-*"
#COMPATIBLE_MACHINE = "your_machine"
PR = "r1"
SRC_URI = ""
do_configure() {
:
}
do_compile () {
:
}
do_install() {
:
}
@@ -0,0 +1,36 @@
From 1a91088e389bd3bbf5d9ee1f3a15edd9edb84eb6 Mon Sep 17 00:00:00 2001
From: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Date: Wed, 16 Jun 2010 17:41:26 +0200
Subject: [PATCH] omap3: init MUX for OMAP3 IGEP module.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
arch/arm/mach-omap2/board-igep0030.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index aa99236..425b2ec 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -420,8 +420,18 @@ static void __init igep3_init_wifi_bt(void)
pr_warning("IGEP: Could not obtain gpio GPIO_BT_NRESET\n");
}
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+ { .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#else
+#define board_mux NULL
+#endif
+
static void __init igep3_init(void)
{
+ omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
omap_serial_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
--
1.7.0.4
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
DESCRIPTION = "2.6 Linux Kernel for IGEP based platforms"
SECTION = "kernel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_igep0020 = "1"
DEFAULT_PREFERENCE_igep0030 = "1"
COMPATIBLE_MACHINE = "(igep0020|igep0030)"
inherit kernel
KV = "${PV}-0"
SRC_URI = "http://downloads.igep.es/sources/linux-omap-${KV}.tar.gz \
file://0001-omap3-init-MUX-for-OMAP3-IGEP-module.patch;patch=1 \
file://defconfig-igep0020 \
file://defconfig-igep0030"
do_configure() {
rm -f ${S}/.config || true
cp ${WORKDIR}/defconfig-${MACHINE} ${S}/.config
yes '' | oe_runmake oldconfig
}
S = "${WORKDIR}/linux-omap-${KV}"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,42 @@
---
arch/arm/boot/compressed/Makefile | 4 ++++
arch/arm/boot/compressed/head-mx3.S | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
Index: linux-2.6.19.2/arch/arm/boot/compressed/Makefile
===================================================================
--- linux-2.6.19.2.orig/arch/arm/boot/compressed/Makefile 2007-01-10 20:10:37.000000000 +0100
+++ linux-2.6.19.2/arch/arm/boot/compressed/Makefile 2007-10-02 15:46:13.000000000 +0200
@@ -50,6 +50,10 @@
OBJS += head-at91rm9200.o
endif
+ifeq ($(CONFIG_ARCH_MX3),y)
+OBJS += head-mx3.o
+endif
+
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
ifeq ($(CONFIG_CPU_CP15),y)
OBJS += big-endian.o
Index: linux-2.6.19.2/arch/arm/boot/compressed/head-mx3.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.19.2/arch/arm/boot/compressed/head-mx3.S 2007-10-02 16:00:13.000000000 +0200
@@ -0,0 +1,17 @@
+/*
+ * linux/arch/arm/boot/compressed/head-mx3.S
+ *
+ * MX3 specific hacks. This is merged into head.S by the linker.
+ *
+ */
+
+#include <linux/linkage.h>
+#include <asm/mach-types.h>
+
+ .section ".start", "ax"
+
+__MX3_start:
+#ifdef CONFIG_MACH_MX31LITE
+ mov r7, #(MACH_TYPE_MX31LITE & 0xff)
+ orr r7, r7, #(MACH_TYPE_MX31LITE & 0xff00)
+#endif
@@ -0,0 +1,85 @@
---
arch/arm/mach-mx3/mx31lite.c | 26 ++++++++++++++++++++++++++
drivers/video/mxc/mxcfb_modedb.c | 25 +++++++++++++++++++++++++
2 files changed, 51 insertions(+)
Index: linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c
===================================================================
--- linux-2.6.19.2.orig/arch/arm/mach-mx3/mx31lite.c 2007-10-03 19:37:43.000000000 +0200
+++ linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c 2007-10-03 19:43:09.000000000 +0200
@@ -280,6 +280,31 @@
}
#endif
+#if defined(CONFIG_FB_MXC_SYNC_PANEL) || defined(CONFIG_FB_MXC_SYNC_PANEL_MODULE)
+static const char fb_default_mode[] = "Sharpsix-VGA";
+
+/* mxc lcd driver */
+static struct platform_device mxc_fb_device = {
+ .name = "mxc_sdc_fb",
+ .id = 0,
+ .dev = {
+ .release = mxc_nop_release,
+ .platform_data = &fb_default_mode,
+ .coherent_dma_mask = 0xFFFFFFFF,
+ },
+};
+
+static void mxc_init_fb(void)
+{
+ (void)platform_device_register(&mxc_fb_device);
+}
+#else
+static inline void mxc_init_fb(void)
+{
+}
+#endif
+
+
/*!
* Board specific fixup function. It is called by \b setup_arch() in
* setup.c file very early on during kernel starts. It allows the user to
@@ -400,6 +425,7 @@
mxc_init_nor_mtd();
mxc_init_nand_mtd();
mxc_init_eth();
+ mxc_init_fb();
}
/*
Index: linux-2.6.19.2/drivers/video/mxc/mxcfb_modedb.c
===================================================================
--- linux-2.6.19.2.orig/drivers/video/mxc/mxcfb_modedb.c 2007-10-03 19:37:43.000000000 +0200
+++ linux-2.6.19.2/drivers/video/mxc/mxcfb_modedb.c 2007-10-03 19:43:02.000000000 +0200
@@ -55,6 +55,31 @@
"TV-VGA", 60, 640, 480, 40574, 35, 45, 9, 1, 46, 5,
0, FB_VMODE_NONINTERLACED, 0,
},
+ [5] = {
+ /* 640x480 @ 60 Hz, 6" */
+ "Sharpsix-VGA",
+ 60, 640, 480, // 60 Hz, 640x480
+ 35285, // 36.66 ns clock period
+ 128, 128, // left & right margin
+ 34, 10, // upper & lower margin
+ 2, 2, // hsync & vsync len
+ FB_SYNC_OE_ACT_HIGH,
+ FB_VMODE_NONINTERLACED,
+ 0,
+ },
+ [6] = {
+ /* 640x480 @ 60 Hz 10" */
+ "Sharpten-VGA",
+ 60, 640, 480, // 60 Hz, 640x480
+ 35285, // 35.285b ns clock period
+ 128, 128, // left & right margin
+ 34, 10, // upper & lower margin
+ 2, 2, // hsync & vsync len
+ FB_SYNC_OE_ACT_HIGH,
+ FB_VMODE_NONINTERLACED,
+ 0,
+ },
+
};
int mxcfb_modedb_sz = ARRAY_SIZE(mxcfb_modedb);
@@ -0,0 +1,42 @@
---
arch/arm/mach-mx3/mx31lite.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Index: linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c
===================================================================
--- linux-2.6.19.2.orig/arch/arm/mach-mx3/mx31lite.c 2007-10-03 20:12:16.000000000 +0200
+++ linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c 2007-10-03 20:14:14.000000000 +0200
@@ -29,6 +29,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
#include <asm/mach/flash.h>
#endif
@@ -304,6 +305,16 @@
}
#endif
+static struct spi_board_info mxc_spi_board_info[] __initdata = {
+ {
+ .modalias = "pmic_spi",
+ .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
+ .max_speed_hz = 4000000,
+ .bus_num = 2,
+ .chip_select = 0,
+ },
+};
+
/*!
* Board specific fixup function. It is called by \b setup_arch() in
@@ -426,6 +437,8 @@
mxc_init_nand_mtd();
mxc_init_eth();
mxc_init_fb();
+ spi_register_board_info(mxc_spi_board_info,
+ ARRAY_SIZE(mxc_spi_board_info));
}
/*
@@ -0,0 +1,13 @@
Index: linux-2.6.19.2/drivers/mtd/chips/cfi_cmdset_0001.c
===================================================================
--- linux-2.6.19.2.orig/drivers/mtd/chips/cfi_cmdset_0001.c 2008-01-10 11:06:29.000000000 +0000
+++ linux-2.6.19.2/drivers/mtd/chips/cfi_cmdset_0001.c 2008-01-10 11:06:58.000000000 +0000
@@ -263,7 +263,7 @@
return NULL;
if (extp->MajorVersion != '1' ||
- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+ (extp->MinorVersion < '0' || extp->MinorVersion > '5')) {
printk(KERN_ERR " Unknown Intel/Sharp Extended Query "
"version %c.%c.\n", extp->MajorVersion,
extp->MinorVersion);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+38
View File
@@ -0,0 +1,38 @@
SECTION = "kernel"
DESCRIPTION = "Linux kernel for imx31 devices"
LICENSE = "GPL"
KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
inherit kernel deploy
COMPATIBLE_MACHINE = "mx31litekit|mx31ads|mx31phy"
do_configure_prepend() {
rm -f ${S}/.config || true
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
echo "CONFIG_AEABI=y" >> ${S}/.config
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
else
echo "# CONFIG_AEABI is not set" >> ${S}/.config
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi
sed -e '/CONFIG_AEABI/d' \
-e '/CONFIG_OABI_COMPAT=/d' \
'${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config'
yes '' | oe_runmake oldconfig
}
do_deploy() {
install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin
cd ${DEPLOYDIR}
ln -sf ${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin ${KERNEL_IMAGETYPE}-${MACHINE}.bin
tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_RELEASE}-${MACHINE}.tgz -C ${D} lib
}
addtask deploy before do_populate_sysroot after do_install
@@ -0,0 +1,227 @@
require linux-mx31.inc
PR = "r8"
FILESDIR = "${WORKDIR}"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.bz2 \
file://sumversion-fix.patch;patch=1 \
file://defconfig-mx31litekit \
file://defconfig-mx31ads \
file://defconfig-mx31phy \
"
SRC_URI_append_mx31litekit = " \
file://linux-2.6.19.2-mx3lite.patch.gz \
file://linux-2.6.19.2-mx3lite.patch;patch=1 \
file://mx31lite-boot.patch;patch=1 \
file://mx31lite-fb.patch;patch=1 \
file://mx31lite-spi.patch;patch=1 \
"
SRC_URI_append_mx31ads = " \
file://mx31ads-patches.tgz \
file://linux-2.6.19.2-mx-arch_arm.patch;patch=1 \
file://linux-2.6.19.2-mx-arm_oprofile.patch;patch=1 \
file://linux-2.6.19.2-mx-codetest.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_char.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_i2c.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_ide.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_input.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_media.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mmc.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mtd.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mxc-2.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_net-2.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_pcmcia.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_serial.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_spi.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_usb.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_video-2.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_w1-2.patch;patch=1 \
file://linux-2.6.19.2-mx-include_mxc.patch;patch=1 \
file://linux-2.6.19.2-mx-mach_mx27-2.patch;patch=1 \
file://linux-2.6.19.2-mx-mach_mx31.patch;patch=1 \
file://linux-2.6.19.2-mx-plat_mxc.patch;patch=1 \
file://linux-2.6.19.2-mx-sound-2.patch;patch=1 \
file://linux-2.6.19.2-mx-irttp_reserve.patch;patch=1 \
file://linux-2.6.19.2-mx-porting-3.patch;patch=1 \
file://linux-2.6.19.2-mx-fsl_logos.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_kfi.patch;patch=1 \
file://linux-2.6.19.2-mx-touchscreen_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-xip_boot_with_nor.patch;patch=1 \
file://linux-2.6.19.2-mx-xip_with_nand.patch;patch=1 \
file://linux-2.6.19.2-mx-alsa_playback_ata_corruption.patch;patch=1 \
file://linux-2.6.19.2-mx-sdma_channel_priority.patch;patch=1 \
file://linux-2.6.19.2-mx-dpm.patch;patch=1 \
file://linux-2.6.19.2-mx-voice_codec_noise.patch;patch=1 \
file://linux-2.6.19.2-mx-mx27_hrt.patch;patch=1 \
file://linux-2.6.19.2-mx-ata_clk_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-ts_suspend_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-i2c_stop_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-mc521da_camera.patch;patch=1 \
file://linux-2.6.19.2-mx-ipu_pm_sleep.patch;patch=1 \
file://linux-2.6.19.2-mx-warns_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-vpu_buf_list.patch;patch=1 \
file://linux-2.6.19.2-mx-wdt_kconfig_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-arm926_dcache_writethrough_flush_fix.patch;patch=1;pnum=0 \
file://linux-2.6.19.2-mx-ide_dma_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-focus453_reset_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-irda_mode_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-watchdog_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-fec_loadable_module.patch;patch=1 \
file://linux-2.6.19.2-mx-fb_loadable_module.patch;patch=1 \
file://linux-2.6.19.2-mx-mx27_warns_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-add_rc_checking_on_copy_to_user.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_nand_two-read_stats_cmd.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_convity_multiple_open_mode.patch;patch=1 \
file://linux-2.6.19.2-mx-csi_dma_si_capture.patch;patch=1 \
file://linux-2.6.19.2-mx-new_mx27_dptc_table.patch;patch=1 \
file://linux-2.6.19.2-mx-8250_dropped_tx_chars-2.patch;patch=1 \
file://linux-2.6.19.2-mx-video_rotate_mirror.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_audio_sequencing.patch;patch=1 \
file://linux-2.6.19.2-mx-rid_offset_asm_macros.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_mxc_err_chk.patch;patch=1 \
file://linux-2.6.19.2-mx-v4l2_to_right_framebuffer.patch;patch=1 \
file://linux-2.6.19.2-mx-v4l2_tearing_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-initialize_initdata_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mx27_printks.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_disconnect_event_with_pin_detect.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_fec_dcache_range_args.patch;patch=1 \
file://linux-2.6.19.2-mx-i2c_plat_cleanup.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mono_output.patch;patch=1 \
file://linux-2.6.19.2-mx-add_12k_playback_support.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_irqreturn_t_arguments.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_erroneous_semicolons.patch;patch=1 \
file://linux-2.6.19.2-mx-port_ctswic_h.patch;patch=1 \
file://linux-2.6.19.2-mx-use_std_clk_api.patch;patch=1 \
file://linux-2.6.19.2-mx-mx31_4_step_dvfs_support.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_mx31_wfi_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_sdma_events_table.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_vpu_debugging_printks.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_vpu_dma_free_coherent.patch;patch=1 \
file://linux-2.6.19.2-mx-mxcuart_shutdown_cleanup.patch;patch=1 \
file://linux-2.6.19.2-mx-1wire_search_rom_accel.patch;patch=1 \
file://linux-2.6.19.2-mx-ss08_sdma_script_update.patch;patch=1 \
file://linux-2.6.19.2-mx-workaround_for_sdma_chn10_access.patch;patch=1 \
file://linux-2.6.19.2-mx-add_1wire_platform_data.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_serial_core_dumping_mctl_status.patch;patch=1 \
file://linux-2.6.19.2-mx-mx31_vga_mpeg4_support-2.patch;patch=1 \
file://linux-2.6.19.2-mx-change_mmc_prescaler_calc.patch;patch=1 \
file://linux-2.6.19.2-mx-mc521da_camera_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mx31_sr_mode_after_csi.patch;patch=1 \
file://linux-2.6.19.2-mx-mx31_sr_mode_broken_after_dma_access.patch;patch=1 \
file://linux-2.6.19.2-mx-unify_light_ioctl.patch;patch=1 \
file://linux-2.6.19.2-mx-use_wtg_srs_for_arch_reset.patch;patch=1 \
file://linux-2.6.19.2-mx-wfi_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mx27_gpio_sensor.patch;patch=1 \
file://linux-2.6.19.2-mx-audio_support_changes.patch;patch=1 \
file://linux-2.6.19.2-mx-add_rngc_support.patch;patch=1 \
file://linux-2.6.19.2-mx-mxc_ir_indent_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-v4l_loopback_demo_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_security_debug_printks.patch;patch=1 \
file://linux-2.6.19.2-mx-update_copyrights-2.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_rng_doxygen_warnings.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_fir_tx_sdma_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx-mxc_debug_leds.patch;patch=1 \
file://linux-2.6.19.2-mx-add_gpio_function_camera_resume.patch;patch=1 \
file://linux-2.6.19.2-mx-mxc_pf_prevent_multiple_opens.patch;patch=1 \
file://linux-2.6.19.2-mx-turn_off_unused_clocks_on_boot.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mx27_vpu_clock_enable_disable.patch;patch=1 \
file://linux-2.6.19.2-mx-usb_clk_off_on_ulpi.patch;patch=1 \
file://linux-2.6.19.2-mx-sdma_ipcv2.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_csi_clk_calc_for_mx31.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_gadget_dtd_allocation.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_wfi_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx-isp1301_i2c.patch;patch=1 \
file://linux-2.6.19.2-mx-mx31_enable_iim_clock.patch;patch=1 \
file://linux-2.6.19.2-mx-add_1wire_enable_disable.patch;patch=1 \
file://linux-2.6.19.2-mx-add_rng_clock_enable_disable.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_wfi_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mx2fb_clock_for_tv_out.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_hacc_clocking.patch;patch=1 \
file://linux-2.6.19.2-mx-1wire_boot_delay.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_mxc_gettimeoffset_div0.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_generation_of_csi_mclk.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_rs232_cea936_handler_issue.patch;patch=1 \
file://linux-2.6.19.2-mx-fix_usb_invalid_printks.patch;patch=1 \
file://linux-2.6.19.2-mx-enable_mbx_clock_at_boot.patch;patch=1 \
file://linux-2.6.19.2-mx-clocking_update_pcmcia.patch;patch=1 \
file://linux-2.6.19.2-mx-combine_mx27_mx31_usb_headers-2.patch;patch=1 \
file://linux-2.6.19.2-mx-unified_doxygen.patch;patch=1 \
file://linux-2.6.19.2-mx-L2618-2_scrub.patch;patch=1 \
file://linux-2.6.19.2-mx-add_kern_info_to_printks-2.patch;patch=1 \
file://linux-2.6.19.2-mx-generic_clk_porting.patch;patch=1 \
file://linux-2.6.19.2-mx-code_review_fixes_following_L2618.2-4.patch;patch=1 \
file://linux-2.6.19.2-mx-yaffs2_filesystem.patch;patch=1;pnum=0 \
file://linux-2.6.19.2-mx-yaffs2_define_min_fix.patch;patch=1;pnum=0 \
file://linux-2.6.19.2-mx-add_mt9v111_camera_detection.patch;patch=1;pnum=0 \
file://linux-2.6.19.2-mx-fix_i2c_adapter_name.patch;patch=1;pnum=0 \
file://linux-2.6.19.2-mx-mx31_enable_2nd_mmc_slot.patch;patch=1 \
file://linux-2.6.19.2-mx-dvfs_compile_fixes.patch;patch=1 \
file://linux-2.6.19.2-mx-mmc_sdhc.patch;patch=1 \
file://linux-2.6.19.2-mx-spi_inactive.patch;patch=1 \
file://linux-2.6.19.2-mx-reserve_mx3_uart2_for_fir.patch;patch=1 \
file://linux-2.6.19.2-mx31_TO2_reg_swizzle_workaround.patch;patch=1 \
file://linux-2.6.19.2-mx31_suspend_resumes_on_eth_activity.patch;patch=1 \
"
SRC_URI_append_mx31phy = " \
file://mx31phy-patches.tgz \
file://linux-2.6.19.2-mx-arch_arm.patch;patch=1 \
file://linux-2.6.19.2-mx-arm_oprofile.patch;patch=1 \
file://linux-2.6.19.2-mx-codetest.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_char.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_i2c.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_ide.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_input.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_media.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mmc.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mtd.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_mxc.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_net.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_pcmcia.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_serial.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_spi.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_usb.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_video.patch;patch=1 \
file://linux-2.6.19.2-mx-drivers_w1.patch;patch=1 \
file://linux-2.6.19.2-mx-include_mxc.patch;patch=1 \
file://linux-2.6.19.2-mx-mach_mx27.patch;patch=1 \
file://linux-2.6.19.2-mx-mach_mx31.patch;patch=1 \
file://linux-2.6.19.2-mx-plat_mxc.patch;patch=1 \
file://linux-2.6.19.2-mx-sound.patch;patch=1 \
file://linux-2.6.19.2-mx-irttp_reserve.patch;patch=1 \
file://linux-2.6.19.2-mx-porting.patch;patch=1 \
file://linux-2.6.19.2-mx-fsl_logos.patch;patch=1 \
file://linux-2.6.19.2-mx-remove_kfi.patch;patch=1 \
file://linux-2.6.19.2-mx-touchscreen_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-xip_boot_with_nor.patch;patch=1 \
file://linux-2.6.19.2-mx-xip_with_nand.patch;patch=1 \
file://linux-2.6.19.2-mx-alsa_playback_ata_corruption.patch;patch=1 \
file://linux-2.6.19.2-mx-sdma_channel_priority.patch;patch=1 \
file://linux-2.6.19.2-mx-dpm.patch;patch=1 \
file://linux-2.6.19.2-mx-voice_codec_noise.patch;patch=1 \
file://linux-2.6.19.2-mx-mx27_hrt.patch;patch=1 \
file://linux-2.6.19.2-mx-ata_clk_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-ts_suspend_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-i2c_stop_fix.patch;patch=1 \
file://linux-2.6.19.2-mx-mc521da_camera.patch;patch=1 \
file://linux-2.6.19.2-mx-ipu_pm_sleep.patch;patch=1 \
file://linux-2.6.19.2-mx-warns_fix.patch;patch=1 \
file://linux-2.6.19.2-can_base.diff;patch=1 \
file://linux-2.6.19.2-drivers_can_loopback.diff;patch=1 \
file://linux-2.6.19.2-drivers_can_ccan.diff;patch=1 \
file://linux-2.6.19.2-drivers_can_sja.diff;patch=1 \
file://linux-2.6.19.2-drivers_can_nios.diff;patch=1 \
file://linux-2.6.19.2-pcm037can.patch;patch=1 \
file://linux-2.6.19.2-smsc-lan921x.patch;patch=1 \
file://linux-2.6.19.2-phyCORE-i.MX31.patch;patch=1 \
file://linux-2.6.19.2-bootlogo.patch;patch=1 \
file://linux-2.6.19.2-mt9v111_bus_fix.patch;patch=1 \
file://linux-2.6.19.2-i2c_fix.patch;patch=1 \
file://linux-2.6.19.2-clock_fix.patch;patch=1 \
file://intel_cfi_version_1.5.patch;patch=1 \
"
S = "${WORKDIR}/linux-2.6.19.2"
@@ -0,0 +1,299 @@
require linux-mx31.inc
PR = "r5"
FILESDIR = "${WORKDIR}"
SRC_URI = " \
${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.22.6.tar.bz2 \
file://1300-fix-gcc-4.3-false-modulo-optimization.patch.patch;patch=1 \
file://defconfig-mx31ads \
file://defconfig-mx31phy \
"
COMPATIBLE_MACHINE = "(mx31ads|mx31phy)"
SRC_URI_append_mx31ads = " \
file://mx31ads-patches.tgz \
file://linux-2.6.22-mx-arch_arm.patch;patch=1 \
file://linux-2.6.22-mx-arm_oprofile.patch;patch=1 \
file://linux-2.6.22-mx-codetest.patch;patch=1 \
file://linux-2.6.22-mx-drivers_char.patch;patch=1 \
file://linux-2.6.22-mx-drivers_i2c.patch;patch=1 \
file://linux-2.6.22-mx-drivers_ide.patch;patch=1 \
file://linux-2.6.22-mx-drivers_input.patch;patch=1 \
file://linux-2.6.22-mx-drivers_media.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mmc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mtd.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc_pmic.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc_security.patch;patch=1 \
file://linux-2.6.22-mx-drivers_net.patch;patch=1 \
file://linux-2.6.22-mx-drivers_pcmcia.patch;patch=1 \
file://linux-2.6.22-mx-drivers_rtc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_serial.patch;patch=1 \
file://linux-2.6.22-mx-drivers_spi.patch;patch=1 \
file://linux-2.6.22-mx-drivers_usb.patch;patch=1 \
file://linux-2.6.22-mx-drivers_video.patch;patch=1 \
file://linux-2.6.22-mx-drivers_w1.patch;patch=1 \
file://linux-2.6.22-mx-include_mxc.patch;patch=1 \
file://linux-2.6.22-mx-mach_mx27.patch;patch=1 \
file://linux-2.6.22-mx-mach_mx3.patch;patch=1 \
file://linux-2.6.22-mx-plat_mxc.patch;patch=1 \
file://linux-2.6.22-mx-sound.patch;patch=1 \
file://linux-2.6.22-mx-Additional-porting-changes-as-a-result-of-.patch;patch=1 \
file://linux-2.6.22-mx-Add-MX27-MX31-and-MX32-splash-screens-to-2.patch;patch=1 \
file://linux-2.6.22-mx-Add-OV2640-camera-support.patch;patch=1 \
file://linux-2.6.22-mx-Sony-s-implementation-of-__mxc_ioremap-por.patch;patch=1 \
file://linux-2.6.22-mx-USB-disable-autosuspend.patch;patch=1 \
file://linux-2.6.22-mx-USB-port-to-2.6.22.patch;patch=1 \
file://linux-2.6.22-mx-USB-fix-OTGSC_IE_1ms_TIMER-bit-definition.patch;patch=1 \
file://linux-2.6.22-mx-USB-Miscellaneous-cleanup-porting.patch;patch=1 \
file://linux-2.6.22-mx-Fix-new-line-problems-on-printk-statements.patch;patch=1 \
file://linux-2.6.22-mx-Add-generic-clksource-and-clkevent-support.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-of-Bugzilla-217-to-ensure-I2C-stop.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-for-when-processor-enters-state-re.patch;patch=1 \
file://linux-2.6.22-mx-ARM926-MX27-D-cache-writethrough-bug-fix.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-fix-dma-errors-when-accessing-IDE.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-properly-reset-the-Focus-453-chip.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-fix-irda-mode-bug.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-enable-mxc-framebuffer-driver-to-.patch;patch=1 \
file://linux-2.6.22-mx-Add-interrogation-of-V4L2-or-Linux-udev-to.patch;patch=1 \
file://linux-2.6.22-mx-CR-SDCaa01608-I2C-uses-wrong-adapter-name.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-422-Enable-second-MMC-SD-slot-for.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-43-Fix-FIR-on-MX31.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-562-Suspend-resumes-on-eth-activi.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00037631-Add-handling-of-prp-overfl.patch;patch=1 \
file://linux-2.6.22-mx-CR-34440439-Under-heavy-load-v4l2-ioctls-s.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR37631-Adds-correct-signal-handling-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00033520-Add-a-new-algorithm-to-the.patch;patch=1 \
file://linux-2.6.22-mx-CR-34439732-Camera-and-V4L2-improvements.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00038129-Add-vpu-latency-hiding-con.patch;patch=1 \
file://linux-2.6.22-mx-Fixed-coding-errors-in-the-mxc-v4l2-output.patch;patch=1 \
file://linux-2.6.22-mx-Make-the-latency-hiding-option-mx27-specif.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-630.-Allow-rng-registers-to-be-re.patch;patch=1 \
file://linux-2.6.22-mx-Add-yaffs2-filesystem.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-511-Redefine-the-min-macro-define.patch;patch=1 \
file://linux-2.6.22-mx-Port-MXC-FIR-driver-forward-to-2.6.22.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-627.-Prevent-DPM-from-calling-DVF.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047179-fix-disable-console-on-mxc.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00043063-platform-device-for-scc-ad.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00049086-fix-scc-fail-fuse-not-blow.patch;patch=1 \
file://linux-2.6.22-mx-Backport-to-2.6.22.6-of-MMC-SD-SDIO-update.patch;patch=1 \
file://linux-2.6.22-mx-Community-MMC-SD-SDIO-support-from-Pierre-.patch;patch=1 \
file://linux-2.6.22-mx-Prototype-FSL-PATA-LIBATA-driver.patch;patch=1 \
file://linux-2.6.22-mx-Workaround-for-IAPI-sleep-issue-spin-in-ia.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-533-Fix-multi-times-message-and-p.patch;patch=1 \
file://linux-2.6.22-mx-Work-around-compile-breakage-for-mx27-on-o.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-of-Bugzilla-363-to-enable-ATA-subs.patch;patch=1 \
file://linux-2.6.22-mx-Update-drivers-such-as-dpm-dvfs-ide-and-si.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-510-Update-to-code-review-fixes-f.patch;patch=1 \
file://linux-2.6.22-mx-MXC-MMC-Remove-custom-error-codes.patch;patch=1 \
file://linux-2.6.22-mx-ioremap-control-reaches-end-of-non-void-fu.patch;patch=1 \
file://linux-2.6.22-mx-USB-check-return-codes-from-gpio_request_m.patch;patch=1 \
file://linux-2.6.22-mx-USB-check-the-return-value-of-clk_enable-u.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options2.patch;patch=1 \
file://linux-2.6.22-mx-USB-More-descriptive-device-registration-m.patch;patch=1 \
file://linux-2.6.22-mx-USB-More-descriptive-device-registration-2.patch;patch=1 \
file://linux-2.6.22-mx-Fixed-a-problem-where-time-ran-too-slow-by.patch;patch=1 \
file://linux-2.6.22-mx-USB-Even-more-descriptive-device-registrat.patch;patch=1 \
file://linux-2.6.22-mx-USB-Even-more-descriptive-device-registra2.patch;patch=1 \
file://linux-2.6.22-mx-USB-Remove-extra-call-to-gpio_usbotg_hs_ac.patch;patch=1 \
file://linux-2.6.22-mx-USB-Restore-mainline-core-Kconfig-contents.patch;patch=1 \
file://linux-2.6.22-mx-USB-Part-of-the-descriptive-registration-m.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options-some-more.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-771-PATA_FSL-Remove-non-working-D.patch;patch=1 \
file://linux-2.6.22-mx-CR-DSPhl24421-Add-power-handlers-to-libata.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-766-PATA_FSL-probe-not-called-whe.patch;patch=1 \
file://linux-2.6.22-mx-Fix-l2x0-cache-invalidate-handling-of-unal.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-776-FS-001-XIP-from-cramfs-Commun.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-771-Fix-pata_fsl-libata-driver-DM.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00046932-Sahara-build-warnings-are-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048159-Add-L2-flush-for-all-mxc-P.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00011205-Move-linux-includes-before.patch;patch=1 \
file://linux-2.6.22-mx-USB-USBCV-1.3-HaltEndpointTest-fails.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00050502-add-custom-ioremap.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00049720-mxc_pf-add-frame_size-limi.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047074-Fix-FIR-functionality-brea.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00039921-v4l2-support-L1-writeback-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048608-Work-around-untrustworthy-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048068-mxc-add-clocksource-and-cl.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00013463-IPU-wait-for-SDC-flips-to-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048072-oprofile-updates-to-suppor.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047020-MX27TO2-MMC-card-removal-s.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-779-Fix-OV2460-camera-driver-oops.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-784-Fixed-MMC-SD-error-110.patch;patch=1 \
file://linux-2.6.22-mx-Remove-vestigial-printk.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00043959-Merging-mxc-nand-driver-ac.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052514-refresh-of-ENGR0045732-to-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00050116-Fix-flawed-implementation-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052743-Reset-CSPI-On-MX27.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052918-fec-2.6.22-workqueue-chang.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053136-fix-mx27-v4l2-rotation-cac.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053173-Fix-SDMA-Mask-Value-In-Sus.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-802-Fix-MX3-DVFS-DPTC-table-initi.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-803-Fix-Suspend-to-RAM.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053192-MXC-Sahara2-Use-CONFIG_OUT.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053563-Fix-Sahara-Issue-For-MX27.patch;patch=1 \
"
SRC_URI_append_mx31phy = " \
file://mx31phy-patches.tgz \
file://linux-2.6.22-mx-arch_arm.patch;patch=1 \
file://linux-2.6.22-mx-arm_oprofile.patch;patch=1 \
file://linux-2.6.22-mx-codetest.patch;patch=1 \
file://linux-2.6.22-mx-drivers_char.patch;patch=1 \
file://linux-2.6.22-mx-drivers_i2c.patch;patch=1 \
file://linux-2.6.22-mx-drivers_ide.patch;patch=1 \
file://linux-2.6.22-mx-drivers_input.patch;patch=1 \
file://linux-2.6.22-mx-drivers_media.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mmc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mtd.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc_pmic.patch;patch=1 \
file://linux-2.6.22-mx-drivers_mxc_security.patch;patch=1 \
file://linux-2.6.22-mx-drivers_net.patch;patch=1 \
file://linux-2.6.22-mx-drivers_pcmcia.patch;patch=1 \
file://linux-2.6.22-mx-drivers_rtc.patch;patch=1 \
file://linux-2.6.22-mx-drivers_serial.patch;patch=1 \
file://linux-2.6.22-mx-drivers_spi.patch;patch=1 \
file://linux-2.6.22-mx-drivers_usb.patch;patch=1 \
file://linux-2.6.22-mx-drivers_video.patch;patch=1 \
file://linux-2.6.22-mx-drivers_w1.patch;patch=1 \
file://linux-2.6.22-mx-include_mxc.patch;patch=1 \
file://linux-2.6.22-mx-mach_mx27.patch;patch=1 \
file://linux-2.6.22-mx-mach_mx3.patch;patch=1 \
file://linux-2.6.22-mx-plat_mxc.patch;patch=1 \
file://linux-2.6.22-mx-sound.patch;patch=1 \
file://linux-2.6.22-mx-Additional-porting-changes-as-a-result-of-.patch;patch=1 \
file://linux-2.6.22-mx-Add-MX27-MX31-and-MX32-splash-screens-to-2.patch;patch=1 \
file://linux-2.6.22-mx-Add-OV2640-camera-support.patch;patch=1 \
file://linux-2.6.22-mx-Sony-s-implementation-of-__mxc_ioremap-por.patch;patch=1 \
file://linux-2.6.22-mx-USB-disable-autosuspend.patch;patch=1 \
file://linux-2.6.22-mx-USB-port-to-2.6.22.patch;patch=1 \
file://linux-2.6.22-mx-USB-fix-OTGSC_IE_1ms_TIMER-bit-definition.patch;patch=1 \
file://linux-2.6.22-mx-USB-Miscellaneous-cleanup-porting.patch;patch=1 \
file://linux-2.6.22-mx-Fix-new-line-problems-on-printk-statements.patch;patch=1 \
file://linux-2.6.22-mx-Add-generic-clksource-and-clkevent-support.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-of-Bugzilla-217-to-ensure-I2C-stop.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-for-when-processor-enters-state-re.patch;patch=1 \
file://linux-2.6.22-mx-ARM926-MX27-D-cache-writethrough-bug-fix.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-fix-dma-errors-when-accessing-IDE.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-properly-reset-the-Focus-453-chip.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-fix-irda-mode-bug.patch;patch=1 \
file://linux-2.6.22-mx-Patch-to-enable-mxc-framebuffer-driver-to-.patch;patch=1 \
file://linux-2.6.22-mx-Add-interrogation-of-V4L2-or-Linux-udev-to.patch;patch=1 \
file://linux-2.6.22-mx-CR-SDCaa01608-I2C-uses-wrong-adapter-name.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-422-Enable-second-MMC-SD-slot-for.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-43-Fix-FIR-on-MX31.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-562-Suspend-resumes-on-eth-activi.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00037631-Add-handling-of-prp-overfl.patch;patch=1 \
file://linux-2.6.22-mx-CR-34440439-Under-heavy-load-v4l2-ioctls-s.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR37631-Adds-correct-signal-handling-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00033520-Add-a-new-algorithm-to-the.patch;patch=1 \
file://linux-2.6.22-mx-CR-34439732-Camera-and-V4L2-improvements.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00038129-Add-vpu-latency-hiding-con.patch;patch=1 \
file://linux-2.6.22-mx-Fixed-coding-errors-in-the-mxc-v4l2-output.patch;patch=1 \
file://linux-2.6.22-mx-Make-the-latency-hiding-option-mx27-specif.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-630.-Allow-rng-registers-to-be-re.patch;patch=1 \
file://linux-2.6.22-mx-Add-yaffs2-filesystem.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-511-Redefine-the-min-macro-define.patch;patch=1 \
file://linux-2.6.22-mx-Port-MXC-FIR-driver-forward-to-2.6.22.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-627.-Prevent-DPM-from-calling-DVF.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047179-fix-disable-console-on-mxc.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00043063-platform-device-for-scc-ad.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00049086-fix-scc-fail-fuse-not-blow.patch;patch=1 \
file://linux-2.6.22-mx-Backport-to-2.6.22.6-of-MMC-SD-SDIO-update.patch;patch=1 \
file://linux-2.6.22-mx-Community-MMC-SD-SDIO-support-from-Pierre-.patch;patch=1 \
file://linux-2.6.22-mx-Prototype-FSL-PATA-LIBATA-driver.patch;patch=1 \
file://linux-2.6.22-mx-Workaround-for-IAPI-sleep-issue-spin-in-ia.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-533-Fix-multi-times-message-and-p.patch;patch=1 \
file://linux-2.6.22-mx-Work-around-compile-breakage-for-mx27-on-o.patch;patch=1 \
file://linux-2.6.22-mx-Bug-fix-of-Bugzilla-363-to-enable-ATA-subs.patch;patch=1 \
file://linux-2.6.22-mx-Update-drivers-such-as-dpm-dvfs-ide-and-si.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-510-Update-to-code-review-fixes-f.patch;patch=1 \
file://linux-2.6.22-mx-MXC-MMC-Remove-custom-error-codes.patch;patch=1 \
file://linux-2.6.22-mx-ioremap-control-reaches-end-of-non-void-fu.patch;patch=1 \
file://linux-2.6.22-mx-USB-check-return-codes-from-gpio_request_m.patch;patch=1 \
file://linux-2.6.22-mx-USB-check-the-return-value-of-clk_enable-u.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options2.patch;patch=1 \
file://linux-2.6.22-mx-USB-More-descriptive-device-registration-m.patch;patch=1 \
file://linux-2.6.22-mx-USB-More-descriptive-device-registration-2.patch;patch=1 \
file://linux-2.6.22-mx-Fixed-a-problem-where-time-ran-too-slow-by.patch;patch=1 \
file://linux-2.6.22-mx-USB-Even-more-descriptive-device-registrat.patch;patch=1 \
file://linux-2.6.22-mx-USB-Even-more-descriptive-device-registra2.patch;patch=1 \
file://linux-2.6.22-mx-USB-Remove-extra-call-to-gpio_usbotg_hs_ac.patch;patch=1 \
file://linux-2.6.22-mx-USB-Restore-mainline-core-Kconfig-contents.patch;patch=1 \
file://linux-2.6.22-mx-USB-Part-of-the-descriptive-registration-m.patch;patch=1 \
file://linux-2.6.22-mx-USB-cleanup-Kconfig-options-some-more.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-771-PATA_FSL-Remove-non-working-D.patch;patch=1 \
file://linux-2.6.22-mx-CR-DSPhl24421-Add-power-handlers-to-libata.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-766-PATA_FSL-probe-not-called-whe.patch;patch=1 \
file://linux-2.6.22-mx-Fix-l2x0-cache-invalidate-handling-of-unal.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-776-FS-001-XIP-from-cramfs-Commun.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-771-Fix-pata_fsl-libata-driver-DM.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00046932-Sahara-build-warnings-are-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048159-Add-L2-flush-for-all-mxc-P.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00011205-Move-linux-includes-before.patch;patch=1 \
file://linux-2.6.22-mx-USB-USBCV-1.3-HaltEndpointTest-fails.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00050502-add-custom-ioremap.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00049720-mxc_pf-add-frame_size-limi.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047074-Fix-FIR-functionality-brea.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00039921-v4l2-support-L1-writeback-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048608-Work-around-untrustworthy-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048068-mxc-add-clocksource-and-cl.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00013463-IPU-wait-for-SDC-flips-to-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00048072-oprofile-updates-to-suppor.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00047020-MX27TO2-MMC-card-removal-s.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-779-Fix-OV2460-camera-driver-oops.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-784-Fixed-MMC-SD-error-110.patch;patch=1 \
file://linux-2.6.22-mx-Remove-vestigial-printk.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00043959-Merging-mxc-nand-driver-ac.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052514-refresh-of-ENGR0045732-to-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00050116-Fix-flawed-implementation-.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052743-Reset-CSPI-On-MX27.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00052918-fec-2.6.22-workqueue-chang.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053136-fix-mx27-v4l2-rotation-cac.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053173-Fix-SDMA-Mask-Value-In-Sus.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-802-Fix-MX3-DVFS-DPTC-table-initi.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-803-Fix-Suspend-to-RAM.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053192-MXC-Sahara2-Use-CONFIG_OUT.patch;patch=1 \
file://linux-2.6.22-mx-CR-ENGR00053563-Fix-Sahara-Issue-For-MX27.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-804-Fix-Suspend-Resume-to-mem.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-677.-Allow-FEC-MAC-address-overri.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-605.-Fix-tearing-when-VPU-rotates.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-833-MXC-Camera-flicker-control-io.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-621-V4L2_CID_AUTO_WHITE_BALAN.patch;patch=1 \
file://linux-2.6.22-mx-CR-34813488-Bugzilla-647-Add-MX31-like-cro.patch;patch=1 \
file://linux-2.6.22-mx-CR-35009507-Support-V4L2-USERPTR-in-output.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-857-2K-NAND-support-bug.patch;patch=1 \
file://linux-2.6.22-mx-CR-34813488-Bugzilla-647-MX31-like-crop-ca.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-1005-Increase-MXC_DMA_ZONE_SIZE-b.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-678-Add-gain-limitation-support-t.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-1088-DVFS-DPM-is-broken.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-1069-Resume-fails-if-key-held.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-1088-Remove-DVFS-DPTC-kernel-conf.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-1083-Disabled-DVFS-says-DVFS.patch;patch=1 \
file://linux-2.6.22-mx-Fix-Bugzilla-1086-framebuffer-bad-after-su.patch;patch=1 \
file://linux-2.6.22-mx-Bugzilla-1088-Fix-freq-changes-via-DPM.patch;patch=1 \
file://phytec_linux-2.6.19.2-bootlogo.patch;patch=1 \
file://phytec_linux-2.6.19.2-can_base.diff;patch=1 \
file://phytec_linux-2.6.19.2-drivers_can_loopback.diff;patch=1 \
file://phytec_linux-2.6.19.2-drivers_can_ccan.diff;patch=1 \
file://phytec_linux-2.6.19.2-drivers_can_sja.diff;patch=1 \
file://phytec_linux-2.6.19.2-drivers_can_nios.diff;patch=1 \
file://phytec_linux-2.6.19.2-pcm037can.patch;patch=1 \
file://phytec_linux-2.6.19.2-smsc-lan921x.patch;patch=1 \
file://phytec_linux-2.6.19.2-phyCORE-i.MX31.patch;patch=1 \
file://phytec_linux-2.6.19.2-pcm037_defconfig;patch=1 \
file://phytec_linux-2.6.19.2-no_blank_lcd.patch;patch=1 \
file://phytec_linux-2.6.22-intel-cfi-version-1.5.patch;patch=1 \
file://phytec_linux-2.6.22_dptc_bug.patch;patch=1 \
file://phytec_linux-2.6.22-i2c_hwmon_class.patch;patch=1 \
file://drivers_i2c_device_st24cxx.diff;patch=1;pnum=0 \
file://debug_logo.patch;patch=1 \
file://debug_mxc_init_time;patch=1 \
file://phytec_linux-2.6.22-mmc-clock.patch;patch=1 \
file://phytec_linux-2.6.22.6-USBH2-ulpi-reset.patch;patch=1 \
"
S = "${WORKDIR}/linux-2.6.22.6"
@@ -0,0 +1,47 @@
Index: linux-2.6.22.19/init/do_mounts.c
===================================================================
--- linux-2.6.22.19.orig/init/do_mounts.c 2008-07-25 17:29:47.000000000 +0100
+++ linux-2.6.22.19/init/do_mounts.c 2008-07-25 17:31:17.000000000 +0100
@@ -25,6 +25,7 @@
int root_mountflags = MS_RDONLY | MS_SILENT;
char * __initdata root_device_name;
static char __initdata saved_root_name[64];
+static int __initdata root_wait;
dev_t ROOT_DEV;
@@ -216,6 +217,16 @@
__setup("root=", root_dev_setup);
+static int __init rootwait_setup(char *str)
+{
+ if (*str)
+ return 0;
+ root_wait = 1;
+ return 1;
+}
+
+__setup("rootwait", rootwait_setup);
+
static char * __initdata root_mount_data;
static int __init root_data_setup(char *str)
{
@@ -443,6 +454,17 @@
if (initrd_load())
goto out;
+ /* wait for any asynchronous scanning to complete */
+ if ((ROOT_DEV == 0) && root_wait) {
+ printk(KERN_INFO "Waiting for root device %s...\n",
+ saved_root_name);
+ while (driver_probe_done() != 0 ||
+ (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
+ msleep(100);
+ }
+
+ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+
if (is_floppy && rd_doload && rd_load_disk(0))
ROOT_DEV = Root_RAM0;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,66 @@
Index: linux-2.6.22.19/arch/arm/Makefile
===================================================================
--- linux-2.6.22.19.orig/arch/arm/Makefile 2008-07-18 18:04:40.000000000 +0100
+++ linux-2.6.22.19/arch/arm/Makefile 2008-07-18 18:07:38.000000000 +0100
@@ -47,7 +47,7 @@
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
+arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
# always available in ARMv7
Index: linux-2.6.22.19/drivers/video/omap/omap_disp_out.c
===================================================================
--- linux-2.6.22.19.orig/drivers/video/omap/omap_disp_out.c 2008-07-18 18:53:28.000000000 +0100
+++ linux-2.6.22.19/drivers/video/omap/omap_disp_out.c 2008-07-18 18:53:33.000000000 +0100
@@ -80,7 +80,7 @@
#ifdef CONFIG_FB_OMAP_LCD_VGA
#define H4_LCD_XRES 480
#define H4_LCD_YRES 640
-#define H4_LCD_PIXCLOCK_MAX 41700 /* in pico seconds */
+#define H4_LCD_PIXCLOCK_MAX 46295 /* in pico seconds */
#define H4_LCD_PIXCLOCK_MIN 38000 /* in pico seconds */
#else
#ifdef CONFIG_OMAP3430_ES2
Index: linux-2.6.22.19/include/asm-arm/processor.h
===================================================================
--- linux-2.6.22.19.orig/include/asm-arm/processor.h 2008-07-18 18:33:36.000000000 +0100
+++ linux-2.6.22.19/include/asm-arm/processor.h 2008-07-18 18:38:05.000000000 +0100
@@ -103,14 +103,16 @@
#if __LINUX_ARM_ARCH__ >= 5
#define ARCH_HAS_PREFETCH
-static inline void prefetch(const void *ptr)
+#define prefetch(ptr) __builtin_prefetch(ptr)
+
+/*static inline void prefetch(const void *ptr)
{
__asm__ __volatile__(
- "pld\t%0"
+ "pld\ta%0"
:
- : "o" (*(char *)ptr)
+ : "p" (ptr)
: "cc");
-}
+}*/
#define ARCH_HAS_PREFETCHW
#define prefetchw(ptr) prefetch(ptr)
Index: linux-2.6.22.19/include/linux/time.h
===================================================================
--- linux-2.6.22.19.orig/include/linux/time.h 2008-07-18 18:31:02.000000000 +0100
+++ linux-2.6.22.19/include/linux/time.h 2008-07-18 18:31:36.000000000 +0100
@@ -171,6 +171,10 @@
{
ns += a->tv_nsec;
while(unlikely(ns >= NSEC_PER_SEC)) {
+ /* The following asm() prevents the compiler from
+ * optimising this loop into a modulo operation. */
+ asm("" : "+r"(ns));
+
ns -= NSEC_PER_SEC;
a->tv_sec++;
}
@@ -0,0 +1,47 @@
Index: linux-2.6.22.19/init/do_mounts.c
===================================================================
--- linux-2.6.22.19.orig/init/do_mounts.c 2008-07-25 17:29:47.000000000 +0100
+++ linux-2.6.22.19/init/do_mounts.c 2008-07-25 17:31:17.000000000 +0100
@@ -25,6 +25,7 @@
int root_mountflags = MS_RDONLY | MS_SILENT;
char * __initdata root_device_name;
static char __initdata saved_root_name[64];
+static int __initdata root_wait;
dev_t ROOT_DEV;
@@ -216,6 +217,16 @@
__setup("root=", root_dev_setup);
+static int __init rootwait_setup(char *str)
+{
+ if (*str)
+ return 0;
+ root_wait = 1;
+ return 1;
+}
+
+__setup("rootwait", rootwait_setup);
+
static char * __initdata root_mount_data;
static int __init root_data_setup(char *str)
{
@@ -443,6 +454,17 @@
if (initrd_load())
goto out;
+ /* wait for any asynchronous scanning to complete */
+ if ((ROOT_DEV == 0) && root_wait) {
+ printk(KERN_INFO "Waiting for root device %s...\n",
+ saved_root_name);
+ while (driver_probe_done() != 0 ||
+ (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
+ msleep(100);
+ }
+
+ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+
if (is_floppy && rd_doload && rd_load_disk(0))
ROOT_DEV = Root_RAM0;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,51 @@
Index: 2.6_kernel/arch/arm/Makefile
===================================================================
--- 2.6_kernel.orig/arch/arm/Makefile 2008-05-07 20:10:22.000000000 +0100
+++ 2.6_kernel/arch/arm/Makefile 2008-07-23 17:40:35.000000000 +0100
@@ -47,7 +47,7 @@
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
+arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
# always available in ARMv7
Index: 2.6_kernel/drivers/video/omap/omap_disp_out.c
===================================================================
--- 2.6_kernel.orig/drivers/video/omap/omap_disp_out.c 2008-06-13 14:37:02.000000000 +0100
+++ 2.6_kernel/drivers/video/omap/omap_disp_out.c 2008-07-23 17:40:35.000000000 +0100
@@ -81,7 +81,7 @@
#ifdef CONFIG_FB_OMAP_LCD_VGA
#define H4_LCD_XRES 480
#define H4_LCD_YRES 640
-#define H4_LCD_PIXCLOCK_MAX 41700 /* in pico seconds */
+#define H4_LCD_PIXCLOCK_MAX 46295 /* in pico seconds */
#define H4_LCD_PIXCLOCK_MIN 38000 /* in pico seconds */
#else
#ifdef CONFIG_OMAP3430_ES2
Index: 2.6_kernel/include/asm-arm/processor.h
===================================================================
--- 2.6_kernel.orig/include/asm-arm/processor.h 2008-04-04 02:30:30.000000000 +0100
+++ 2.6_kernel/include/asm-arm/processor.h 2008-07-23 17:40:35.000000000 +0100
@@ -103,14 +103,16 @@
#if __LINUX_ARM_ARCH__ >= 5
#define ARCH_HAS_PREFETCH
-static inline void prefetch(const void *ptr)
+#define prefetch(ptr) __builtin_prefetch(ptr)
+
+/*static inline void prefetch(const void *ptr)
{
__asm__ __volatile__(
- "pld\t%0"
+ "pld\ta%0"
:
- : "o" (*(char *)ptr)
+ : "p" (ptr)
: "cc");
-}
+}*/
#define ARCH_HAS_PREFETCHW
#define prefetchw(ptr) prefetch(ptr)
@@ -0,0 +1,34 @@
Index: linux-2.6.24/drivers/video/omap/omap_disp_out.c
===================================================================
--- linux-2.6.24.orig/drivers/video/omap/omap_disp_out.c 2008-10-08 10:53:04.000000000 +0100
+++ linux-2.6.24/drivers/video/omap/omap_disp_out.c 2008-10-08 10:53:57.000000000 +0100
@@ -1020,6 +1020,7 @@
else
return -EINVAL;
+#ifdef CONFIG_OMAP2_TV
if (out_dev == OMAP2_OUTPUT_TV) {
if (tv_in_use == 0) {
h4_i2c_tvout_on(NULL);
@@ -1027,6 +1028,7 @@
tv_in_use = 1;
}
}
+#endif
if(omap2_disp_get_output_dev(layer) == out_dev)
return count;
@@ -1050,11 +1052,13 @@
(omap2_disp_get_output_dev(OMAP2_VIDEO1) == OMAP2_OUTPUT_LCD) &&
(omap2_disp_get_output_dev(OMAP2_VIDEO2) == OMAP2_OUTPUT_LCD))
{
+#ifdef CONFIG_OMAP2_TV
if (tv_in_use != 0) {
omap2_disp_disable_output_dev(OMAP2_OUTPUT_TV);
h4_i2c_tvout_off(NULL);
tv_in_use = 0;
}
+#endif
}
return count;
@@ -0,0 +1,16 @@
Index: linux-2.6.24/arch/arm/plat-omap/resource.c
===================================================================
--- linux-2.6.24.orig/arch/arm/plat-omap/resource.c 2008-08-02 18:34:26.000000000 +0100
+++ linux-2.6.24/arch/arm/plat-omap/resource.c 2008-08-02 18:35:28.000000000 +0100
@@ -174,6 +174,11 @@
return res;
}
+EXPORT_SYMBOL(resource_put);
+EXPORT_SYMBOL(resource_get);
+EXPORT_SYMBOL(resource_request);
+EXPORT_SYMBOL(resource_release);
+
/* Adds the request to the list of requests for the given resource.*/
/*Recalulates the target level to be set for the resource and updates */
/*it if not same as the current level. Also calls notification functions */
@@ -0,0 +1,29 @@
commit 38332cb98772f5ea757e6486bed7ed0381cb5f98
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Tue Mar 4 14:59:54 2008 -0800
time: prevent the loop in timespec_add_ns() from being optimised away
Since some architectures don't support __udivdi3().
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/include/linux/time.h b/include/linux/time.h
index 2091a19..d32ef0a 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
{
ns += a->tv_nsec;
while(unlikely(ns >= NSEC_PER_SEC)) {
+ /* The following asm() prevents the compiler from
+ * optimising this loop into a modulo operation. */
+ asm("" : "+r"(ns));
+
ns -= NSEC_PER_SEC;
a->tv_sec++;
}
@@ -0,0 +1,206 @@
From c1dad0b6b434300ae64c902d11611c54c513ea10 Mon Sep 17 00:00:00 2001
From: Anuj Aggarwal <anuj.aggarwal@ti.com>
Date: Fri, 21 Nov 2008 17:41:03 +0530
Subject: [PATCH] ASoC: Add support for OMAP3 EVM
This patch adds ALSA SoC support for OMAP3 EVM using TWL4030 audio codec.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
sound/soc/omap/Kconfig | 8 +++
sound/soc/omap/Makefile | 3 +-
sound/soc/omap/omap3evm.c | 147 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 157 insertions(+), 1 deletions(-)
create mode 100644 sound/soc/omap/omap3evm.c
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 0daeee4..deb6ba9 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -22,6 +22,14 @@ config SND_OMAP_SOC_OMAP3_BEAGLE
help
Say Y if you want to add support for SoC audio on the Beagleboard.
+config SND_OMAP_SOC_OMAP3EVM
+ tristate "SoC Audio support for OMAP3EVM board"
+ depends on SND_OMAP_SOC && MACH_OMAP3EVM
+ select SND_OMAP_SOC_MCBSP
+ select SND_SOC_TWL4030
+ help
+ Say Y if you want to add support for SoC audio on the omap3evm board.
+
config SND_OMAP_SOC_OSK5912
tristate "SoC Audio support for omap osk5912"
depends on SND_OMAP_SOC && MACH_OMAP_OSK
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 4bae404..ef31c25 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,9 +10,10 @@ snd-soc-n810-objs := n810.o
snd-soc-omap3beagle-objs := omap3beagle.o
snd-soc-osk5912-objs := osk5912.o
snd-soc-overo-objs := overo.o
+snd-soc-omap3evm-objs := omap3evm.o
obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
-
+obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
new file mode 100644
index 0000000..570af55
--- /dev/null
+++ b/sound/soc/omap/omap3evm.c
@@ -0,0 +1,147 @@
+/*
+ * omap3evm.c -- ALSA SoC support for OMAP3 EVM
+ *
+ * Author: Anuj Aggarwal <anuj.aggarwal@ti.com>
+ *
+ * Based on sound/soc/omap/beagle.c by Steve Sakoman
+ *
+ * Copyright (C) 2008 Texas Instruments, Incorporated
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/clk.h>
+#include <linux/platform_device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <mach/mcbsp.h>
+
+#include "omap-mcbsp.h"
+#include "omap-pcm.h"
+#include "../codecs/twl4030.h"
+
+static int omap3evm_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+ struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+ int ret;
+
+ /* Set codec DAI configuration */
+ ret = snd_soc_dai_set_fmt(codec_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+ if (ret < 0) {
+ printk(KERN_ERR "can't set codec DAI configuration\n");
+ return ret;
+ }
+
+ /* Set cpu DAI configuration */
+ ret = snd_soc_dai_set_fmt(cpu_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+ if (ret < 0) {
+ printk(KERN_ERR "can't set cpu DAI configuration\n");
+ return ret;
+ }
+
+ /* Set the codec system clock for DAC and ADC */
+ ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
+ SND_SOC_CLOCK_IN);
+ if (ret < 0) {
+ printk(KERN_ERR "can't set codec system clock\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static struct snd_soc_ops omap3evm_ops = {
+ .hw_params = omap3evm_hw_params,
+};
+
+/* Digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link omap3evm_dai = {
+ .name = "TWL4030",
+ .stream_name = "TWL4030",
+ .cpu_dai = &omap_mcbsp_dai[0],
+ .codec_dai = &twl4030_dai,
+ .ops = &omap3evm_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_machine snd_soc_machine_omap3evm = {
+ .name = "omap3evm",
+ .dai_link = &omap3evm_dai,
+ .num_links = 1,
+};
+
+/* Audio subsystem */
+static struct snd_soc_device omap3evm_snd_devdata = {
+ .machine = &snd_soc_machine_omap3evm,
+ .platform = &omap_soc_platform,
+ .codec_dev = &soc_codec_dev_twl4030,
+};
+
+static struct platform_device *omap3evm_snd_device;
+
+static int __init omap3evm_soc_init(void)
+{
+ int ret;
+
+ if (!machine_is_omap3evm()) {
+ pr_debug("Not OMAP3 EVM!\n");
+ return -ENODEV;
+ }
+ pr_info("OMAP3 EVM SoC init\n");
+
+ omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
+ if (!omap3evm_snd_device) {
+ printk(KERN_ERR "Platform device allocation failed\n");
+ return -ENOMEM;
+ }
+
+ platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
+ omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
+ *(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; /* McBSP2 */
+
+ ret = platform_device_add(omap3evm_snd_device);
+ if (ret)
+ goto err1;
+
+ return 0;
+
+err1:
+ printk(KERN_ERR "Unable to add platform device\n");
+ platform_device_put(omap3evm_snd_device);
+
+ return ret;
+}
+
+static void __exit omap3evm_soc_exit(void)
+{
+ platform_device_unregister(omap3evm_snd_device);
+}
+
+module_init(omap3evm_soc_init);
+module_exit(omap3evm_soc_exit);
+
+MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>");
+MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM");
+MODULE_LICENSE("GPL");
--
1.5.6.5
@@ -0,0 +1,146 @@
From f8f10f496bce396416d7156da876222c6ce8c341 Mon Sep 17 00:00:00 2001
From: Steven Kipisz <skipisz@beagleboard.org>
Date: Wed, 9 Jan 2009 12:01:11 -0600
Subject: [PATCH-USB] Omap3 beagleboard: add support for EHCI in revision C1 boards
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
arch/arm/mach-omap2/board-omap3beagle.c | 10 +---------
arch/arm/mach-omap2/usb-ehci.c | 4 +---
drivers/usb/host/ehci-omap.c | 26 ++++++++++++++++++++++++++
3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index fe97bab..de81153 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -140,15 +140,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
* power switch and overcurrent detect
*/
- gpio_request(gpio + 1, "EHCI_nOC");
- gpio_direction_input(gpio + 1);
-
- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
-
- /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
- gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+ /* TODO: This needs to be modified to not rely on u-boot */
return 0;
}
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index 489439d..2c6305b 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -152,9 +152,7 @@ static void setup_ehci_io_mux(void)
void __init usb_ehci_init(void)
{
#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)
- /* Setup Pin IO MUX for EHCI */
- if (cpu_is_omap34xx())
- setup_ehci_io_mux();
+ /* TODO: Setup Pin IO MUX for EHCI - moved this temporarily to U-boot */
if (platform_device_register(&ehci_device) < 0) {
printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 1b3266c..8472996 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -48,16 +48,26 @@
* to get the PHY state machine in working state
*/
#define EXTERNAL_PHY_RESET
+#ifdef CONFIG_MACH_OMAP3_BEAGLE
+#define EXT_PHY_RESET_GPIO_PORT2 (147)
+#else
#define EXT_PHY_RESET_GPIO_PORT1 (57)
#define EXT_PHY_RESET_GPIO_PORT2 (61)
+#endif
#define EXT_PHY_RESET_DELAY (10)
+#define PHY_STP_PULLUP_ENABLE (0x10)
+#define PHY_STP_PULLUP_DISABLE (0x90)
+
+
/* ISSUE2:
* USBHOST supports External charge pump PHYs only
* Use the VBUS from Port1 to power VBUS of Port2 externally
* So use Port2 as the working ULPI port
*/
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
#define VBUS_INTERNAL_CHARGEPUMP_HACK
+#endif
#endif /* CONFIG_OMAP_EHCI_PHY_MODE */
@@ -225,14 +235,43 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
#ifdef EXTERNAL_PHY_RESET
/* Refer: ISSUE1 */
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_request(EXT_PHY_RESET_GPIO_PORT1, "USB1 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT1, 0);
+#endif
gpio_request(EXT_PHY_RESET_GPIO_PORT2, "USB2 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT2, 0);
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 0);
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(EXT_PHY_RESET_DELAY);
#endif
+ /*
+ * The PHY register 0x7 - Interface Control register is
+ * configured to disable the integrated STP pull-up resistor
+ * used for interface protection.
+ *
+ * May not need to be here.
+ */
+ omap_writel((0x7 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* interface reg */
+ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
+ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
+ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
+ (PHY_STP_PULLUP_DISABLE),
+ EHCI_INSNREG05_ULPI);
+
+ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
+
+ /* Force PHY to HS */
+ omap_writel((0x4 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* function ctrl */
+ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
+ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
+ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
+ (0x40),
+ EHCI_INSNREG05_ULPI);
+
+ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
+
/* Configure TLL for 60Mhz clk for ULPI */
ehci_clocks->usbtll_fck_clk = clk_get(&dev->dev, USBHOST_TLL_FCLK);
if (IS_ERR(ehci_clocks->usbtll_fck_clk))
@@ -307,7 +346,9 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
* Hold the PHY in RESET for enough time till PHY is settled and ready
*/
udelay(EXT_PHY_RESET_DELAY);
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 1);
+#endif
gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 1);
#endif
@@ -393,7 +434,9 @@ static void omap_stop_ehc(struct platform_device *dev, struct usb_hcd *hcd)
#ifdef EXTERNAL_PHY_RESET
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_free(EXT_PHY_RESET_GPIO_PORT1);
+#endif
gpio_free(EXT_PHY_RESET_GPIO_PORT2);
#endif
--
1.6.0.4.790.gaa14a
@@ -0,0 +1,90 @@
From 7efa7cc5b807cb840c62b5bf54bf47181c9b95a6 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@openembedded.org>
Date: Mon, 30 Mar 2009 15:21:37 +0200
Subject: [PATCH v2] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
The ldp board was left behind when other boards got updated. The ldp info was copied from the beagleboard board file and s/beagle/ldp/g
Changes since v1:
* dropped vsim portion since only 4 pins are hooked up
Signed-off-by: Koen Kooi <koen@beagleboard.org>
---
arch/arm/mach-omap2/board-ldp.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 30926b0..19a5c15 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
#include <linux/clk.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
+#include <linux/regulator/machine.h>
#include <linux/i2c/twl4030.h>
#include <mach/hardware.h>
@@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
&wrst_script,
};
+static const struct twl4030_resconfig ldp_resconfig[] = {
+ /* disable regulators that u-boot left enabled; the
+ * devices' drivers should be managing these.
+ */
+ { .resource = RES_VMMC1, },
+ { 0, },
+};
+
static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
+ .resource_config = ldp_resconfig,
.scripts = twl4030_scripts,
.size = ARRAY_SIZE(twl4030_scripts),
};
@@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = {
.irq_line = 1,
};
+static struct regulator_consumer_supply ldp_vmmc1_supply = {
+ .supply = "vmmc",
+};
+
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+static struct regulator_init_data ldp_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 = &ldp_vmmc1_supply,
+};
+
static struct twl4030_platform_data ldp_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
@@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = {
.madc = &ldp_madc_data,
.usb = &ldp_usb_data,
.power = &sdp3430_t2scripts_data,
+ .vmmc1 = &ldp_vmmc1,
.gpio = &ldp_gpio_data,
.keypad = &ldp_kp_twl4030_data,
};
@@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
omap_serial_init();
usb_musb_init();
twl4030_mmc_init(mmc);
+ /* link regulators to MMC adapters */
+ ldp_vmmc1_supply.dev = mmc[0].dev;
}
static void __init omap_ldp_map_io(void)
--
1.6.2
@@ -0,0 +1,79 @@
From c810e850d830330cf04225a4cff8e981e153f269 Mon Sep 17 00:00:00 2001
From: David Brownell <david-b@pacbell.net>
Date: Mon, 23 Feb 2009 14:08:14 -0800
Subject: [PATCH 124/133] leds-gpio broken with current git?
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
On Monday 23 February 2009, David Brownell wrote:
>
> > Perhaps something broke with Tony's RC1 merge?
> > The LEDs are broken for me as well.
>
> Still works for me.  Did you maybe not enable the twl4030
> GPIO support in Kconfig?
Oh, and if you did *not*, please give this patch a try.
I've been meaning to test it.
- Dave
==============
Sometimes it's awkward to make sure that the array in the
platform_data handed to the leds-gpio driver has only valid
data ... some leds may not be always available, and coping
with that currently requires patching or rebuilding the array.
This patch fixes that by making it be OK to pass an invalid
GPIO (such as "-EINVAL") ... such table entries are skipped.
---
drivers/leds/leds-gpio.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index b13bd29..83737e6 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -90,13 +90,19 @@ static int gpio_led_probe(struct platform_device *pdev)
cur_led = &pdata->leds[i];
led_dat = &leds_data[i];
+ /* skip leds that aren't available */
+ led_dat->gpio = cur_led->gpio;
+ if (!gpio_is_valid(led_dat->gpio)) {
+ dev_dbg(&pdev->dev, "skipping %s\n", cur_led->name);
+ continue;
+ }
+
ret = gpio_request(cur_led->gpio, cur_led->name);
if (ret < 0)
goto err;
led_dat->cdev.name = cur_led->name;
led_dat->cdev.default_trigger = cur_led->default_trigger;
- led_dat->gpio = cur_led->gpio;
led_dat->can_sleep = gpio_cansleep(cur_led->gpio);
led_dat->active_low = cur_led->active_low;
if (pdata->gpio_blink_set) {
@@ -124,6 +130,8 @@ static int gpio_led_probe(struct platform_device *pdev)
err:
if (i > 0) {
for (i = i - 1; i >= 0; i--) {
+ if (!gpio_is_valid(leds_data[i].gpio))
+ continue;
led_classdev_unregister(&leds_data[i].cdev);
cancel_work_sync(&leds_data[i].work);
gpio_free(leds_data[i].gpio);
@@ -144,6 +152,8 @@ static int __devexit gpio_led_remove(struct platform_device *pdev)
leds_data = platform_get_drvdata(pdev);
for (i = 0; i < pdata->num_leds; i++) {
+ if (!gpio_is_valid(leds_data[i].gpio))
+ continue;
led_classdev_unregister(&leds_data[i].cdev);
cancel_work_sync(&leds_data[i].work);
gpio_free(leds_data[i].gpio);
--
1.6.0.4.790.gaa14a
@@ -0,0 +1,41 @@
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 2ae5ab8..a68b0a6 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1154,9 +1154,16 @@ static int __devinit ads7846_probe(struct spi_device *spi)
/* take a first sample, leaving nPENIRQ active and vREF off; avoid
* the touchscreen, in case it's not connected.
*/
- (void) ads7846_read12_ser(&spi->dev,
+ err = ads7846_read12_ser(&spi->dev,
READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON);
+ /* if sample is all 0's or all 1's then there is no device on spi */
+ if ( (err == 0x000) || (err == 0xfff)) {
+ dev_info(&spi->dev, "no device detected, test read result was 0x%08X\n", err);
+ err = -ENODEV;
+ goto err_free_irq;
+ }
+
err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group);
if (err)
goto err_remove_hwmon;
@@ -1174,7 +1181,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
err_free_irq:
free_irq(spi->irq, ts);
err_free_gpio:
- if (ts->gpio_pendown != -1)
+ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
gpio_free(ts->gpio_pendown);
err_cleanup_filter:
if (ts->filter_cleanup)
@@ -1201,7 +1208,7 @@ static int __devexit ads7846_remove(struct spi_device *spi)
/* suspend left the IRQ disabled */
enable_irq(ts->spi->irq);
- if (ts->gpio_pendown != -1)
+ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
gpio_free(ts->gpio_pendown);
if (ts->filter_cleanup)
@@ -0,0 +1,35 @@
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 4f7f040..ccd8973 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -55,3 +55,13 @@ config SND_OMAP_SOC_OMAP3_PANDORA
select SND_SOC_TWL4030
help
Say Y if you want to add support for SoC audio on the OMAP3 Pandora.
+
+config SND_OMAP_SOC_OMAP3_BEAGLE
+ tristate "SoC Audio support for OMAP3 Beagle"
+ depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_BEAGLE
+ select SND_OMAP_SOC_MCBSP
+ select SND_SOC_TWL4030
+ help
+ Say Y if you want to add support for SoC audio on the Beagleboard.
+
+
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 76fedd9..0c9e4ac 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -12,6 +12,7 @@ snd-soc-overo-objs := overo.o
snd-soc-omap2evm-objs := omap2evm.o
snd-soc-sdp3430-objs := sdp3430.o
snd-soc-omap3pandora-objs := omap3pandora.o
+snd-soc-omap3beagle-objs := omap3beagle.o
obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
@@ -19,3 +20,4 @@ obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
+obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
Index: git/arch/arm/mach-omap2/board-omap3beagle.c
===================================================================
--- git.orig/arch/arm/mach-omap2/board-omap3beagle.c
+++ git/arch/arm/mach-omap2/board-omap3beagle.c
@@ -154,6 +154,7 @@ static int beagle_twl_gpio_setup(struct
* power switch and overcurrent detect
*/
+#if 0 /* TODO: This needs to be modified to not rely on u-boot */
gpio_request(gpio + 1, "EHCI_nOC");
gpio_direction_input(gpio + 1);
@@ -163,7 +164,7 @@ static int beagle_twl_gpio_setup(struct
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
-
+#endif
return 0;
}
Index: git/arch/arm/mach-omap2/usb-ehci.c
===================================================================
--- git.orig/arch/arm/mach-omap2/usb-ehci.c
+++ git/arch/arm/mach-omap2/usb-ehci.c
@@ -147,9 +147,11 @@ static void setup_ehci_io_mux(void)
void __init usb_ehci_init(void)
{
+#if 0 /* TODO: Setup Pin IO MUX for EHCI - moved this temporarily to U-boot */
/* Setup Pin IO MUX for EHCI */
if (cpu_is_omap34xx())
setup_ehci_io_mux();
+#endif
if (platform_device_register(&ehci_device) < 0) {
printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
Index: git/drivers/usb/host/ehci-omap.c
===================================================================
--- git.orig/drivers/usb/host/ehci-omap.c
+++ git/drivers/usb/host/ehci-omap.c
@@ -48,16 +48,25 @@
* to get the PHY state machine in working state
*/
#define EXTERNAL_PHY_RESET
+#ifdef CONFIG_MACH_OMAP3_BEAGLE
+#define EXT_PHY_RESET_GPIO_PORT2 (147)
+#else
#define EXT_PHY_RESET_GPIO_PORT1 (57)
#define EXT_PHY_RESET_GPIO_PORT2 (61)
+#endif
#define EXT_PHY_RESET_DELAY (10)
+#define PHY_STP_PULLUP_ENABLE (0x10)
+#define PHY_STP_PULLUP_DISABLE (0x90)
+
/* ISSUE2:
* USBHOST supports External charge pump PHYs only
* Use the VBUS from Port1 to power VBUS of Port2 externally
* So use Port2 as the working ULPI port
*/
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
#define VBUS_INTERNAL_CHARGEPUMP_HACK
+#endif
#endif /* CONFIG_OMAP_EHCI_PHY_MODE */
@@ -225,14 +234,43 @@ static int omap_start_ehc(struct platfor
#ifdef EXTERNAL_PHY_RESET
/* Refer: ISSUE1 */
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_request(EXT_PHY_RESET_GPIO_PORT1, "USB1 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT1, 0);
+#endif
gpio_request(EXT_PHY_RESET_GPIO_PORT2, "USB2 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT2, 0);
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 0);
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(EXT_PHY_RESET_DELAY);
#endif
+ /*
+ * The PHY register 0x7 - Interface Control register is
+ * configured to disable the integrated STP pull-up resistor
+ * used for interface protection.
+ *
+ * May not need to be here.
+ */
+ omap_writel((0x7 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* interface reg */
+ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
+ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
+ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
+ (PHY_STP_PULLUP_DISABLE),
+ EHCI_INSNREG05_ULPI);
+
+ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
+
+ /* Force PHY to HS */
+ omap_writel((0x4 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* function ctrl */
+ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
+ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
+ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
+ (0x40),
+ EHCI_INSNREG05_ULPI);
+
+ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
+
/* Configure TLL for 60Mhz clk for ULPI */
ehci_clocks->usbtll_fck_clk = clk_get(&dev->dev, USBHOST_TLL_FCLK);
if (IS_ERR(ehci_clocks->usbtll_fck_clk))
@@ -307,7 +345,9 @@ static int omap_start_ehc(struct platfor
* Hold the PHY in RESET for enough time till PHY is settled and ready
*/
udelay(EXT_PHY_RESET_DELAY);
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 1);
+#endif
gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 1);
#endif
@@ -393,7 +433,9 @@ static void omap_stop_ehc(struct platfor
#ifdef EXTERNAL_PHY_RESET
+#ifndef CONFIG_MACH_OMAP3_BEAGLE
gpio_free(EXT_PHY_RESET_GPIO_PORT1);
+#endif
gpio_free(EXT_PHY_RESET_GPIO_PORT2);
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,238 @@
On Tue, 2008-07-01 at 06:23 +0100, Dirk Behme wrote:
> Catalin Marinas wrote:
> > But, anyway, if you want a patch, Harry is updating it to a recent
> > kernel.
>
> Any news on this? I think there are some people wanting a patch ;)
See below for a preliminary patch updated to 2.6.26-rc8. Note that I
don't plan to submit it in its current form but clean it up a bit first.
Show the cache type of ARMv7 CPUs
From: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm/kernel/setup.c | 137 +++++++++++++++++++++++++++++++++++++++++++++-
include/asm-arm/system.h | 18 ++++++
2 files changed, 153 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 5ae0eb2..0cd238d 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -256,6 +256,24 @@ static const char *proc_arch[] = {
"?(17)",
};
+static const char *v7_cache_policy[4] = {
+ "reserved",
+ "AVIVT",
+ "VIPT",
+ "PIPT",
+};
+
+static const char *v7_cache_type[8] = {
+ "none",
+ "instruction only",
+ "data only",
+ "separate instruction and data",
+ "unified",
+ "unknown type",
+ "unknown type",
+ "unknown type",
+};
+
#define CACHE_TYPE(x) (((x) >> 25) & 15)
#define CACHE_S(x) ((x) & (1 << 24))
#define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */
@@ -266,6 +284,22 @@ static const char *proc_arch[] = {
#define CACHE_M(y) ((y) & (1 << 2))
#define CACHE_LINE(y) ((y) & 3)
+#define CACHE_TYPE_V7(x) (((x) >> 14) & 3)
+#define CACHE_UNIFIED(x) ((((x) >> 27) & 7)+1)
+#define CACHE_COHERENT(x) ((((x) >> 24) & 7)+1)
+
+#define CACHE_ID_LEVEL_MASK 7
+#define CACHE_ID_LEVEL_BITS 3
+
+#define CACHE_LINE_V7(v) ((1 << (((v) & 7)+4)))
+#define CACHE_ASSOC_V7(v) ((((v) >> 3) & ((1<<10)-1))+1)
+#define CACHE_SETS_V7(v) ((((v) >> 13) & ((1<<15)-1))+1)
+#define CACHE_SIZE_V7(v) (CACHE_LINE_V7(v)*CACHE_ASSOC_V7(v)*CACHE_SETS_V7(v))
+#define CACHE_WA_V7(v) (((v) & (1<<28)) != 0)
+#define CACHE_RA_V7(v) (((v) & (1<<29)) != 0)
+#define CACHE_WB_V7(v) (((v) & (1<<30)) != 0)
+#define CACHE_WT_V7(v) (((v) & (1<<31)) != 0)
+
static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
{
unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
@@ -279,11 +313,57 @@ static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
CACHE_LINE(cache)));
}
+static void dump_v7_cache(const char *type, int cpu, unsigned int level)
+{
+ unsigned int cachesize;
+
+ write_extended_cpuid(2,0,0,0,level); /* Set the cache size selection register */
+ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */
+ cachesize = read_extended_cpuid(1,0,0,0);
+
+ printk("CPU%u: %s cache: %d bytes, associativity %d, %d byte lines, %d sets,\n supports%s%s%s%s\n",
+ cpu, type,
+ CACHE_SIZE_V7(cachesize),CACHE_ASSOC_V7(cachesize),
+ CACHE_LINE_V7(cachesize),CACHE_SETS_V7(cachesize),
+ CACHE_WA_V7(cachesize) ? " WA" : "",
+ CACHE_RA_V7(cachesize) ? " RA" : "",
+ CACHE_WB_V7(cachesize) ? " WB" : "",
+ CACHE_WT_V7(cachesize) ? " WT" : "");
+}
+
static void __init dump_cpu_info(int cpu)
{
unsigned int info = read_cpuid(CPUID_CACHETYPE);
- if (info != processor_id) {
+ if (info != processor_id && (info & (1 << 31))) {
+ /* ARMv7 style of cache info register */
+ unsigned int id = read_extended_cpuid(1,0,0,1);
+ unsigned int level = 0;
+ printk("CPU%u: L1 I %s cache. Caches unified at level %u, coherent at level %u\n",
+ cpu,
+ v7_cache_policy[CACHE_TYPE_V7(info)],
+ CACHE_UNIFIED(id),
+ CACHE_COHERENT(id));
+
+ while (id & CACHE_ID_LEVEL_MASK) {
+ printk("CPU%u: Level %u cache is %s\n",
+ cpu, (level >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]);
+
+ if (id & 1) {
+ /* Dump I at this level */
+ dump_v7_cache("I", cpu, level | 1);
+ }
+
+ if (id & (4 | 2)) {
+ /* Dump D or unified at this level */
+ dump_v7_cache((id & 4) ? "unified" : "D", cpu, level);
+ }
+
+ /* Next level out */
+ level += 2;
+ id >>= CACHE_ID_LEVEL_BITS;
+ }
+ } else if (info != processor_id) {
printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
cache_types[CACHE_TYPE(info)]);
if (CACHE_S(info)) {
@@ -916,6 +996,30 @@ c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
CACHE_LINE(cache)));
}
+static void c_show_v7_cache(struct seq_file *m, const char *type, unsigned int levelselect)
+{
+ unsigned int cachesize;
+ unsigned int level = (levelselect >> 1) + 1;
+
+ write_extended_cpuid(2,0,0,0,levelselect); /* Set the cache size selection register */
+ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */
+ cachesize = read_extended_cpuid(1,0,0,0);
+
+ seq_printf(m, "L%u %s size\t\t: %d bytes\n"
+ "L%u %s assoc\t\t: %d\n"
+ "L%u %s line length\t: %d\n"
+ "L%u %s sets\t\t: %d\n"
+ "L%u %s supports\t\t:%s%s%s%s\n",
+ level, type, CACHE_SIZE_V7(cachesize),
+ level, type, CACHE_ASSOC_V7(cachesize),
+ level, type, CACHE_LINE_V7(cachesize),
+ level, type, CACHE_SETS_V7(cachesize),
+ level, type, CACHE_WA_V7(cachesize) ? " WA" : "",
+ CACHE_RA_V7(cachesize) ? " RA" : "",
+ CACHE_WB_V7(cachesize) ? " WB" : "",
+ CACHE_WT_V7(cachesize) ? " WT" : "");
+}
+
static int c_show(struct seq_file *m, void *v)
{
int i;
@@ -971,7 +1075,36 @@ static int c_show(struct seq_file *m, void *v)
{
unsigned int cache_info = read_cpuid(CPUID_CACHETYPE);
- if (cache_info != processor_id) {
+ if (cache_info != processor_id && (cache_info & (1<<31))) {
+ /* V7 style of cache info register */
+ unsigned int id = read_extended_cpuid(1,0,0,1);
+ unsigned int levelselect = 0;
+ seq_printf(m, "L1 I cache\t:%s\n"
+ "Cache unification level\t: %u\n"
+ "Cache coherency level\t: %u\n",
+ v7_cache_policy[CACHE_TYPE_V7(cache_info)],
+ CACHE_UNIFIED(id),
+ CACHE_COHERENT(id));
+
+ while (id & CACHE_ID_LEVEL_MASK) {
+ seq_printf(m, "Level %u cache\t\t: %s\n",
+ (levelselect >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]);
+
+ if (id & 1) {
+ /* Dump I at this level */
+ c_show_v7_cache(m, "I", levelselect | 1);
+ }
+
+ if (id & (4 | 2)) {
+ /* Dump D or unified at this level */
+ c_show_v7_cache(m, (id & 4) ? "cache" : "D", levelselect);
+ }
+
+ /* Next level out */
+ levelselect += 2;
+ id >>= CACHE_ID_LEVEL_BITS;
+ }
+ } else if (cache_info != processor_id) {
seq_printf(m, "Cache type\t: %s\n"
"Cache clean\t: %s\n"
"Cache lockdown\t: %s\n"
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 514af79..704738e 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -74,6 +74,24 @@
: "cc"); \
__val; \
})
+#define read_extended_cpuid(op1,op2,op3,op4) \
+ ({ \
+ unsigned int __val; \
+ asm("mrc p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \
+ : "=r" (__val) \
+ : \
+ : "cc"); \
+ __val; \
+ })
+
+#define write_extended_cpuid(op1,op2,op3,op4,v) \
+ ({ \
+ unsigned int __val = v; \
+ asm("mcr p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \
+ : \
+ : "r" (__val) \
+ : "cc"); \
+ })
#else
extern unsigned int processor_id;
#define read_cpuid(reg) (processor_id)
--
Catalin
@@ -0,0 +1,39 @@
From 26abf45ac80be4c54a63fecf1c3c1e1efb416e0a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 1 Apr 2009 18:27:09 +0300
Subject: [PATCH] Revert "gro: Fix legacy path napi_complete crash"
This reverts commit 303c6a0251852ecbdc5c15e466dcaff5971f7517.
Fixes USB network problems
---
net/core/dev.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index e3fe5c7..c1e9dc0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2588,9 +2588,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
local_irq_disable();
skb = __skb_dequeue(&queue->input_pkt_queue);
if (!skb) {
+ __napi_complete(napi);
local_irq_enable();
- napi_complete(napi);
- goto out;
+ break;
}
local_irq_enable();
@@ -2599,7 +2599,6 @@ static int process_backlog(struct napi_struct *napi, int quota)
napi_gro_flush(napi);
-out:
return work;
}
--
1.5.6.5
@@ -0,0 +1,396 @@
From 4cc0368574f587f448231ccd121266bed4bf9729 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:29:56 +0300
Subject: [PATCH] DSS2: Add panel drivers
- Generic panel
- Samsung LTE430WQ-F0C LCD Panel
- Sharp LS037V7DW01 LCD Panel
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
drivers/video/omap2/displays/Kconfig | 21 ++++
drivers/video/omap2/displays/Makefile | 3 +
drivers/video/omap2/displays/panel-generic.c | 96 +++++++++++++++++
.../omap2/displays/panel-samsung-lte430wq-f0c.c | 108 +++++++++++++++++++
.../video/omap2/displays/panel-sharp-ls037v7dw01.c | 112 ++++++++++++++++++++
5 files changed, 340 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap2/displays/Kconfig
create mode 100644 drivers/video/omap2/displays/Makefile
create mode 100644 drivers/video/omap2/displays/panel-generic.c
create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
create mode 100644 drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
new file mode 100644
index 0000000..0419ec8
--- /dev/null
+++ b/drivers/video/omap2/displays/Kconfig
@@ -0,0 +1,21 @@
+menu "OMAP2/3 Display Device Drivers"
+ depends on OMAP2_DSS
+
+config PANEL_GENERIC
+ tristate "Generic Panel"
+ help
+ Generic panel driver.
+ Used for DVI output for Beagle and OMAP3 SDP.
+
+config PANEL_SAMSUNG_LTE430WQ_F0C
+ tristate "Samsung LTE430WQ-F0C LCD Panel"
+ depends on OMAP2_DSS
+ help
+ LCD Panel used on Overo Palo43
+
+config PANEL_SHARP_LS037V7DW01
+ tristate "Sharp LS037V7DW01 LCD Panel"
+ depends on OMAP2_DSS
+ help
+ LCD Panel used in TI's SDP3430 and EVM boards
+endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
new file mode 100644
index 0000000..a26bbd2
--- /dev/null
+++ b/drivers/video/omap2/displays/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
+obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
+obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c
new file mode 100644
index 0000000..8382acb
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-generic.c
@@ -0,0 +1,96 @@
+/*
+ * Generic panel support
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ * Author: Tomi Valkeinen <tomi.valkeinen@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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+
+#include <mach/display.h>
+
+static int generic_panel_init(struct omap_display *display)
+{
+ return 0;
+}
+
+static int generic_panel_enable(struct omap_display *display)
+{
+ int r = 0;
+
+ if (display->hw_config.panel_enable)
+ r = display->hw_config.panel_enable(display);
+
+ return r;
+}
+
+static void generic_panel_disable(struct omap_display *display)
+{
+ if (display->hw_config.panel_disable)
+ display->hw_config.panel_disable(display);
+}
+
+static int generic_panel_suspend(struct omap_display *display)
+{
+ generic_panel_disable(display);
+ return 0;
+}
+
+static int generic_panel_resume(struct omap_display *display)
+{
+ return generic_panel_enable(display);
+}
+
+static struct omap_panel generic_panel = {
+ .owner = THIS_MODULE,
+ .name = "panel-generic",
+ .init = generic_panel_init,
+ .enable = generic_panel_enable,
+ .disable = generic_panel_disable,
+ .suspend = generic_panel_suspend,
+ .resume = generic_panel_resume,
+
+ .timings = {
+ /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
+ .x_res = 640,
+ .y_res = 480,
+ .pixel_clock = 23500,
+ .hfp = 48,
+ .hsw = 32,
+ .hbp = 80,
+ .vfp = 3,
+ .vsw = 4,
+ .vbp = 7,
+ },
+
+ .config = OMAP_DSS_LCD_TFT,
+};
+
+
+static int __init generic_panel_drv_init(void)
+{
+ omap_dss_register_panel(&generic_panel);
+ return 0;
+}
+
+static void __exit generic_panel_drv_exit(void)
+{
+ omap_dss_unregister_panel(&generic_panel);
+}
+
+module_init(generic_panel_drv_init);
+module_exit(generic_panel_drv_exit);
+MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
new file mode 100644
index 0000000..e4bb781
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
@@ -0,0 +1,108 @@
+/*
+ * LCD panel driver for Samsung LTE430WQ-F0C
+ *
+ * Author: Steve Sakoman <steve@sakoman.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+
+#include <mach/display.h>
+
+static int samsung_lte_panel_init(struct omap_display *display)
+{
+ return 0;
+}
+
+static void samsung_lte_panel_cleanup(struct omap_display *display)
+{
+}
+
+static int samsung_lte_panel_enable(struct omap_display *display)
+{
+ int r = 0;
+
+ /* wait couple of vsyncs until enabling the LCD */
+ msleep(50);
+
+ if (display->hw_config.panel_enable)
+ r = display->hw_config.panel_enable(display);
+
+ return r;
+}
+
+static void samsung_lte_panel_disable(struct omap_display *display)
+{
+ if (display->hw_config.panel_disable)
+ display->hw_config.panel_disable(display);
+
+ /* wait at least 5 vsyncs after disabling the LCD */
+ msleep(100);
+}
+
+static int samsung_lte_panel_suspend(struct omap_display *display)
+{
+ samsung_lte_panel_disable(display);
+ return 0;
+}
+
+static int samsung_lte_panel_resume(struct omap_display *display)
+{
+ return samsung_lte_panel_enable(display);
+}
+
+static struct omap_panel samsung_lte_panel = {
+ .owner = THIS_MODULE,
+ .name = "samsung-lte430wq-f0c",
+ .init = samsung_lte_panel_init,
+ .cleanup = samsung_lte_panel_cleanup,
+ .enable = samsung_lte_panel_enable,
+ .disable = samsung_lte_panel_disable,
+ .suspend = samsung_lte_panel_suspend,
+ .resume = samsung_lte_panel_resume,
+
+ .timings = {
+ .x_res = 480,
+ .y_res = 272,
+
+ .pixel_clock = 9200,
+
+ .hsw = 41,
+ .hfp = 8,
+ .hbp = 45-41,
+
+ .vsw = 10,
+ .vfp = 4,
+ .vbp = 12-10,
+ },
+ .recommended_bpp = 16,
+ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IVS,
+};
+
+
+static int __init samsung_lte_panel_drv_init(void)
+{
+ omap_dss_register_panel(&samsung_lte_panel);
+ return 0;
+}
+
+static void __exit samsung_lte_panel_drv_exit(void)
+{
+ omap_dss_unregister_panel(&samsung_lte_panel);
+}
+
+module_init(samsung_lte_panel_drv_init);
+module_exit(samsung_lte_panel_drv_exit);
+MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
new file mode 100644
index 0000000..1f99150
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
@@ -0,0 +1,112 @@
+/*
+ * LCD panel driver for Sharp LS037V7DW01
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ * Author: Tomi Valkeinen <tomi.valkeinen@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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+
+#include <mach/display.h>
+
+static int sharp_ls_panel_init(struct omap_display *display)
+{
+ return 0;
+}
+
+static void sharp_ls_panel_cleanup(struct omap_display *display)
+{
+}
+
+static int sharp_ls_panel_enable(struct omap_display *display)
+{
+ int r = 0;
+
+ /* wait couple of vsyncs until enabling the LCD */
+ msleep(50);
+
+ if (display->hw_config.panel_enable)
+ r = display->hw_config.panel_enable(display);
+
+ return r;
+}
+
+static void sharp_ls_panel_disable(struct omap_display *display)
+{
+ if (display->hw_config.panel_disable)
+ display->hw_config.panel_disable(display);
+
+ /* wait at least 5 vsyncs after disabling the LCD */
+
+ msleep(100);
+}
+
+static int sharp_ls_panel_suspend(struct omap_display *display)
+{
+ sharp_ls_panel_disable(display);
+ return 0;
+}
+
+static int sharp_ls_panel_resume(struct omap_display *display)
+{
+ return sharp_ls_panel_enable(display);
+}
+
+static struct omap_panel sharp_ls_panel = {
+ .owner = THIS_MODULE,
+ .name = "sharp-ls037v7dw01",
+ .init = sharp_ls_panel_init,
+ .cleanup = sharp_ls_panel_cleanup,
+ .enable = sharp_ls_panel_enable,
+ .disable = sharp_ls_panel_disable,
+ .suspend = sharp_ls_panel_suspend,
+ .resume = sharp_ls_panel_resume,
+
+ .timings = {
+ .x_res = 480,
+ .y_res = 640,
+
+ .pixel_clock = 19200,
+
+ .hsw = 2,
+ .hfp = 1,
+ .hbp = 28,
+
+ .vsw = 1,
+ .vfp = 1,
+ .vbp = 1,
+ },
+
+ .acb = 0x28,
+
+ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS,
+};
+
+
+static int __init sharp_ls_panel_drv_init(void)
+{
+ omap_dss_register_panel(&sharp_ls_panel);
+ return 0;
+}
+
+static void __exit sharp_ls_panel_drv_exit(void)
+{
+ omap_dss_unregister_panel(&sharp_ls_panel);
+}
+
+module_init(sharp_ls_panel_drv_init);
+module_exit(sharp_ls_panel_drv_exit);
+MODULE_LICENSE("GPL");
--
1.5.6.5
@@ -0,0 +1,39 @@
From 4741076cae4f4284e1fff9a03f35475b8455af54 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 1 Apr 2009 14:36:39 +0200
Subject: [PATCH] DSS2: Add function to display object to get the backlight level
This is needed by an upcoming patch that changes the backlight
initialization to use the backlight level set by the bootloader.
Also add a field for the maximum backlight level.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
arch/arm/plat-omap/include/mach/display.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
index 6288353..6b702c7 100644
--- a/arch/arm/plat-omap/include/mach/display.h
+++ b/arch/arm/plat-omap/include/mach/display.h
@@ -211,6 +211,8 @@ struct omap_dss_display_config {
int panel_reset_gpio;
int ctrl_reset_gpio;
+ int max_backlight_level;
+
const char *name; /* for debug */
const char *ctrl_name;
const char *panel_name;
@@ -225,6 +227,7 @@ struct omap_dss_display_config {
void (*ctrl_disable)(struct omap_display *display);
int (*set_backlight)(struct omap_display *display,
int level);
+ int (*get_backlight)(struct omap_display *display);
};
struct device;
--
1.5.6.5
@@ -0,0 +1,778 @@
From 66e16f86d3f4c5b34b37e965c65102b7192371de Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Thu, 2 Apr 2009 11:47:13 +0300
Subject: [PATCH] DSS2: Add acx565akm panel
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
drivers/video/omap2/displays/Kconfig | 8 +
drivers/video/omap2/displays/Makefile | 2 +
drivers/video/omap2/displays/panel-acx565akm.c | 712 ++++++++++++++++++++++++
drivers/video/omap2/displays/panel-acx565akm.h | 9 +
4 files changed, 731 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c
create mode 100644 drivers/video/omap2/displays/panel-acx565akm.h
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 356ceb1..3feecee 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -28,4 +28,12 @@ config CTRL_BLIZZARD
tristate "Blizzard Controller"
help
Blizzard Controller (hack)
+
+config PANEL_ACX565AKM
+ tristate "ACX565AKM LCD Panel"
+ depends on OMAP2_DSS_SDI
+ select BACKLIGHT_CLASS_DEVICE
+ help
+ LCD Panel used in RX51
+
endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index 1b74b7e..9bafcb6 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -4,3 +4,5 @@ obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
obj-$(CONFIG_CTRL_BLIZZARD) += ctrl-blizzard.o
obj-$(CONFIG_PANEL_N800) += panel-n800.o
+
+obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
new file mode 100644
index 0000000..2679d6c
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -0,0 +1,712 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/spi/spi.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/backlight.h>
+#include <linux/fb.h>
+
+#include <mach/display.h>
+#include <mach/dma.h>
+
+#include "panel-acx565akm.h"
+
+#define MIPID_CMD_READ_DISP_ID 0x04
+#define MIPID_CMD_READ_RED 0x06
+#define MIPID_CMD_READ_GREEN 0x07
+#define MIPID_CMD_READ_BLUE 0x08
+#define MIPID_CMD_READ_DISP_STATUS 0x09
+#define MIPID_CMD_RDDSDR 0x0F
+#define MIPID_CMD_SLEEP_IN 0x10
+#define MIPID_CMD_SLEEP_OUT 0x11
+#define MIPID_CMD_DISP_OFF 0x28
+#define MIPID_CMD_DISP_ON 0x29
+#define MIPID_CMD_WRITE_DISP_BRIGHTNESS 0x51
+#define MIPID_CMD_READ_DISP_BRIGHTNESS 0x52
+#define MIPID_CMD_WRITE_CTRL_DISP 0x53
+
+#define CTRL_DISP_BRIGHTNESS_CTRL_ON (1 << 5)
+#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON (1 << 4)
+#define CTRL_DISP_BACKLIGHT_ON (1 << 2)
+#define CTRL_DISP_AUTO_BRIGHTNESS_ON (1 << 1)
+
+#define MIPID_CMD_READ_CTRL_DISP 0x54
+#define MIPID_CMD_WRITE_CABC 0x55
+#define MIPID_CMD_READ_CABC 0x56
+
+#define MIPID_VER_LPH8923 3
+#define MIPID_VER_LS041Y3 4
+#define MIPID_VER_L4F00311 8
+#define MIPID_VER_ACX565AKM 9
+
+struct acx565akm_device {
+ struct backlight_device *bl_dev;
+ int enabled;
+ int model;
+ int revision;
+ u8 display_id[3];
+ int has_bc:1;
+ int has_cabc:1;
+ unsigned int saved_bklight_level;
+ unsigned long hw_guard_end; /* next value of jiffies
+ when we can issue the
+ next sleep in/out command */
+ unsigned long hw_guard_wait; /* max guard time in jiffies */
+
+ struct spi_device *spi;
+ struct mutex mutex;
+ struct omap_panel panel;
+ struct omap_display *display;
+};
+
+static int acx565akm_bl_update_status(struct backlight_device *dev);
+
+static void acx565akm_transfer(struct acx565akm_device *md, int cmd,
+ const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
+{
+ struct spi_message m;
+ struct spi_transfer *x, xfer[5];
+ int r;
+
+ BUG_ON(md->spi == NULL);
+
+ spi_message_init(&m);
+
+ memset(xfer, 0, sizeof(xfer));
+ x = &xfer[0];
+
+ cmd &= 0xff;
+ x->tx_buf = &cmd;
+ x->bits_per_word = 9;
+ x->len = 2;
+
+ if (rlen > 1 && wlen == 0) {
+ /*
+ * Between the command and the response data there is a
+ * dummy clock cycle. Add an extra bit after the command
+ * word to account for this.
+ */
+ x->bits_per_word = 10;
+ cmd <<= 1;
+ }
+ spi_message_add_tail(x, &m);
+
+ if (wlen) {
+ x++;
+ x->tx_buf = wbuf;
+ x->len = wlen;
+ x->bits_per_word = 9;
+ spi_message_add_tail(x, &m);
+ }
+
+ if (rlen) {
+ x++;
+ x->rx_buf = rbuf;
+ x->len = rlen;
+ spi_message_add_tail(x, &m);
+ }
+
+ r = spi_sync(md->spi, &m);
+ if (r < 0)
+ dev_dbg(&md->spi->dev, "spi_sync %d\n", r);
+}
+
+static inline void acx565akm_cmd(struct acx565akm_device *md, int cmd)
+{
+ acx565akm_transfer(md, cmd, NULL, 0, NULL, 0);
+}
+
+static inline void acx565akm_write(struct acx565akm_device *md,
+ int reg, const u8 *buf, int len)
+{
+ acx565akm_transfer(md, reg, buf, len, NULL, 0);
+}
+
+static inline void acx565akm_read(struct acx565akm_device *md,
+ int reg, u8 *buf, int len)
+{
+ acx565akm_transfer(md, reg, NULL, 0, buf, len);
+}
+
+static void hw_guard_start(struct acx565akm_device *md, int guard_msec)
+{
+ md->hw_guard_wait = msecs_to_jiffies(guard_msec);
+ md->hw_guard_end = jiffies + md->hw_guard_wait;
+}
+
+static void hw_guard_wait(struct acx565akm_device *md)
+{
+ unsigned long wait = md->hw_guard_end - jiffies;
+
+ if ((long)wait > 0 && wait <= md->hw_guard_wait) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(wait);
+ }
+}
+
+static void set_sleep_mode(struct acx565akm_device *md, int on)
+{
+ int cmd, sleep_time = 50;
+
+ if (on)
+ cmd = MIPID_CMD_SLEEP_IN;
+ else
+ cmd = MIPID_CMD_SLEEP_OUT;
+ hw_guard_wait(md);
+ acx565akm_cmd(md, cmd);
+ hw_guard_start(md, 120);
+ /*
+ * When we enable the panel, it seems we _have_ to sleep
+ * 120 ms before sending the init string. When disabling the
+ * panel we'll sleep for the duration of 2 frames, so that the
+ * controller can still provide the PCLK,HS,VS signals. */
+ if (!on)
+ sleep_time = 120;
+ msleep(sleep_time);
+}
+
+static void set_display_state(struct acx565akm_device *md, int enabled)
+{
+ int cmd = enabled ? MIPID_CMD_DISP_ON : MIPID_CMD_DISP_OFF;
+
+ acx565akm_cmd(md, cmd);
+}
+
+static int panel_enabled(struct acx565akm_device *md)
+{
+ u32 disp_status;
+ int enabled;
+
+ acx565akm_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4);
+ disp_status = __be32_to_cpu(disp_status);
+ enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
+ dev_dbg(&md->spi->dev,
+ "LCD panel %senabled by bootloader (status 0x%04x)\n",
+ enabled ? "" : "not ", disp_status);
+ return enabled;
+}
+
+static void enable_backlight_ctrl(struct acx565akm_device *md, int enable)
+{
+ u16 ctrl;
+
+ acx565akm_read(md, MIPID_CMD_READ_CTRL_DISP, (u8 *)&ctrl, 1);
+ if (enable) {
+ ctrl |= CTRL_DISP_BRIGHTNESS_CTRL_ON |
+ CTRL_DISP_BACKLIGHT_ON;
+ } else {
+ ctrl &= ~(CTRL_DISP_BRIGHTNESS_CTRL_ON |
+ CTRL_DISP_BACKLIGHT_ON);
+ }
+
+ ctrl |= 1 << 8;
+ acx565akm_write(md, MIPID_CMD_WRITE_CTRL_DISP, (u8 *)&ctrl, 2);
+}
+
+static void set_cabc_mode(struct acx565akm_device *md, int mode)
+{
+ u16 cabc_ctrl;
+
+ cabc_ctrl = 0;
+ acx565akm_read(md, MIPID_CMD_READ_CABC, (u8 *)&cabc_ctrl, 1);
+ cabc_ctrl &= ~3;
+ cabc_ctrl |= (1 << 8) | (mode & 3);
+ acx565akm_write(md, MIPID_CMD_WRITE_CABC, (u8 *)&cabc_ctrl, 2);
+}
+
+static int get_cabc_mode(struct acx565akm_device *md)
+{
+ u8 cabc_ctrl;
+
+ acx565akm_read(md, MIPID_CMD_READ_CABC, &cabc_ctrl, 1);
+ return cabc_ctrl & 3;
+}
+
+static int panel_detect(struct acx565akm_device *md)
+{
+ acx565akm_read(md, MIPID_CMD_READ_DISP_ID, md->display_id, 3);
+ dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n",
+ md->display_id[0], md->display_id[1], md->display_id[2]);
+
+ switch (md->display_id[0]) {
+ case 0x10:
+ md->model = MIPID_VER_ACX565AKM;
+ md->panel.name = "acx565akm";
+ md->has_bc = 1;
+ md->has_cabc = 1;
+ break;
+ case 0x29:
+ md->model = MIPID_VER_L4F00311;
+ md->panel.name = "l4f00311";
+ break;
+ case 0x45:
+ md->model = MIPID_VER_LPH8923;
+ md->panel.name = "lph8923";
+ break;
+ case 0x83:
+ md->model = MIPID_VER_LS041Y3;
+ md->panel.name = "ls041y3";
+ break;
+ default:
+ md->panel.name = "unknown";
+ dev_err(&md->spi->dev, "invalid display ID\n");
+ return -ENODEV;
+ }
+
+ md->revision = md->display_id[1];
+
+ pr_info("omapfb: %s rev %02x LCD detected\n",
+ md->panel.name, md->revision);
+
+ return 0;
+}
+
+static int acx565akm_panel_enable(struct omap_display *display)
+{
+ struct acx565akm_device *md =
+ (struct acx565akm_device *)display->panel->priv;
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ mutex_lock(&md->mutex);
+
+ if (display->hw_config.panel_enable)
+ display->hw_config.panel_enable(display);
+
+ md->enabled = panel_enabled(md);
+
+ if (md->enabled) {
+ dev_dbg(&md->spi->dev, "panel already enabled\n");
+ mutex_unlock(&md->mutex);
+ return 0;
+ }
+
+ set_sleep_mode(md, 0);
+ md->enabled = 1;
+ set_display_state(md, 1);
+
+ mutex_unlock(&md->mutex);
+
+ return acx565akm_bl_update_status(md->bl_dev);
+}
+
+static void acx565akm_panel_disable(struct omap_display *display)
+{
+ struct acx565akm_device *md =
+ (struct acx565akm_device *)display->panel->priv;
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ mutex_lock(&md->mutex);
+
+ if (!md->enabled) {
+ mutex_unlock(&md->mutex);
+ return;
+ }
+ set_display_state(md, 0);
+ set_sleep_mode(md, 1);
+ md->enabled = 0;
+
+ if (display->hw_config.panel_disable)
+ display->hw_config.panel_disable(display);
+
+ mutex_unlock(&md->mutex);
+}
+
+#if 0
+static void acx565akm_set_mode(struct omap_display *display,
+ int x_res, int y_res, int bpp)
+{
+ struct acx565akm_device *md =
+ (struct acx565akm_device *)display->panel->priv;
+ u16 par;
+
+ switch (bpp) {
+ case 16:
+ par = 0x150;
+ break;
+ case 18:
+ par = 0x160;
+ break;
+ case 24:
+ par = 0x170;
+ break;
+ }
+
+ acx565akm_write(md, 0x3a, (u8 *)&par, 2);
+}
+#endif
+
+static int acx565akm_panel_suspend(struct omap_display *display)
+{
+ acx565akm_panel_disable(display);
+ return 0;
+}
+
+static int acx565akm_panel_resume(struct omap_display *display)
+{
+ return acx565akm_panel_enable(display);
+}
+
+static void acx565akm_set_brightness(struct acx565akm_device *md, int level)
+{
+ int bv;
+
+ bv = level | (1 << 8);
+ acx565akm_write(md, MIPID_CMD_WRITE_DISP_BRIGHTNESS, (u8 *)&bv, 2);
+
+ if (level)
+ enable_backlight_ctrl(md, 1);
+ else
+ enable_backlight_ctrl(md, 0);
+}
+
+static int acx565akm_get_actual_brightness(struct acx565akm_device *md)
+{
+ u8 bv;
+
+ acx565akm_read(md, MIPID_CMD_READ_DISP_BRIGHTNESS, &bv, 1);
+
+ return bv;
+}
+
+static int acx565akm_bl_update_status(struct backlight_device *dev)
+{
+ struct acx565akm_device *md = dev_get_drvdata(&dev->dev);
+ struct omap_display *display = md->display;
+ int r;
+ int level;
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ if (display->hw_config.set_backlight == NULL)
+ return -ENODEV;
+
+ mutex_lock(&md->mutex);
+
+ if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
+ dev->props.power == FB_BLANK_UNBLANK)
+ level = dev->props.brightness;
+ else
+ level = 0;
+
+ r = 0;
+ if (md->has_bc)
+ acx565akm_set_brightness(md, level);
+ else
+ if (display->hw_config.set_backlight != NULL)
+ r = display->hw_config.set_backlight(display, level);
+ else
+ r = -ENODEV;
+
+ mutex_unlock(&md->mutex);
+
+ return r;
+}
+
+static int acx565akm_bl_get_intensity(struct backlight_device *dev)
+{
+ struct acx565akm_device *md = dev_get_drvdata(&dev->dev);
+ struct omap_display *display = md->display;
+
+ dev_dbg(&dev->dev, "%s\n", __func__);
+
+ if (md->has_bc && display->hw_config.set_backlight == NULL)
+ return -ENODEV;
+
+ if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
+ dev->props.power == FB_BLANK_UNBLANK) {
+ if (md->has_bc)
+ return acx565akm_get_actual_brightness(md);
+ else
+ return dev->props.brightness;
+ }
+
+ return 0;
+}
+
+static struct backlight_ops acx565akm_bl_ops = {
+ .get_brightness = acx565akm_bl_get_intensity,
+ .update_status = acx565akm_bl_update_status,
+};
+
+static const char *cabc_modes[] = {
+ "off", /* used also always when CABC is not supported */
+ "ui",
+ "still-image",
+ "moving-image",
+};
+
+static ssize_t show_cabc_mode(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct acx565akm_device *md = dev_get_drvdata(dev);
+ const char *mode_str;
+ int mode;
+ int len;
+
+ if (!md->has_cabc)
+ mode = 0;
+ else
+ mode = get_cabc_mode(md);
+ mode_str = "unknown";
+ if (mode >= 0 && mode < ARRAY_SIZE(cabc_modes))
+ mode_str = cabc_modes[mode];
+ len = snprintf(buf, PAGE_SIZE, "%s\n", mode_str);
+
+ return len < PAGE_SIZE - 1 ? len : PAGE_SIZE - 1;
+}
+
+static ssize_t store_cabc_mode(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct acx565akm_device *md = dev_get_drvdata(dev);
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cabc_modes); i++) {
+ const char *mode_str = cabc_modes[i];
+ int cmp_len = strlen(mode_str);
+
+ if (count > 0 && buf[count - 1] == '\n')
+ count--;
+ if (count != cmp_len)
+ continue;
+
+ if (strncmp(buf, mode_str, cmp_len) == 0)
+ break;
+ }
+
+ if (i == ARRAY_SIZE(cabc_modes))
+ return -EINVAL;
+
+ if (!md->has_cabc && i != 0)
+ return -EINVAL;
+
+ mutex_lock(&md->mutex);
+ set_cabc_mode(md, i);
+ mutex_unlock(&md->mutex);
+
+ return count;
+}
+
+static ssize_t show_cabc_available_modes(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct acx565akm_device *md = dev_get_drvdata(dev);
+ int len;
+ int i;
+
+ if (!md->has_cabc)
+ return snprintf(buf, PAGE_SIZE, "%s\n", cabc_modes[0]);
+
+ for (i = 0, len = 0;
+ len < PAGE_SIZE && i < ARRAY_SIZE(cabc_modes); i++)
+ len += snprintf(&buf[len], PAGE_SIZE - len, "%s%s%s",
+ i ? " " : "", cabc_modes[i],
+ i == ARRAY_SIZE(cabc_modes) - 1 ? "\n" : "");
+
+ return len < PAGE_SIZE ? len : PAGE_SIZE - 1;
+}
+
+static DEVICE_ATTR(cabc_mode, S_IRUGO | S_IWUSR,
+ show_cabc_mode, store_cabc_mode);
+static DEVICE_ATTR(cabc_available_modes, S_IRUGO,
+ show_cabc_available_modes, NULL);
+
+static struct attribute *bldev_attrs[] = {
+ &dev_attr_cabc_mode.attr,
+ &dev_attr_cabc_available_modes.attr,
+ NULL,
+};
+
+static struct attribute_group bldev_attr_group = {
+ .attrs = bldev_attrs,
+};
+
+static int acx565akm_panel_init(struct omap_display *display)
+{
+ struct omap_panel *panel = display->panel;
+ struct acx565akm_panel_data *panel_data = display->hw_config.panel_data;
+ struct acx565akm_device *md = (struct acx565akm_device *)panel->priv;
+
+ struct backlight_device *bldev;
+ int brightness;
+ int max_brightness;
+ int r;
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ if (!panel_data) {
+ dev_err(&md->spi->dev, "no panel data\n");
+ return -ENODEV;
+ }
+
+ mutex_init(&md->mutex);
+ md->display = display;
+
+ if (display->hw_config.panel_enable)
+ display->hw_config.panel_enable(display);
+
+ md->enabled = panel_enabled(md);
+
+ r = panel_detect(md);
+ if (r) {
+ if (!md->enabled && display->hw_config.panel_disable)
+ display->hw_config.panel_disable(display);
+ mutex_unlock(&md->mutex);
+ return r;
+ }
+
+ if (!panel_data->bc_connected) {
+ md->has_bc = 0;
+ md->has_cabc = 0;
+ }
+
+#if 0
+ acx565akm_set_mode(display, panel->timings.x_res, panel->timings.y_res,
+ panel->bpp);
+#endif
+
+ if (!md->enabled)
+ display->hw_config.panel_disable(display);
+
+ bldev = backlight_device_register("acx565akm", &md->spi->dev,
+ md, &acx565akm_bl_ops);
+ md->bl_dev = bldev;
+
+ if (md->has_cabc) {
+ r = sysfs_create_group(&bldev->dev.kobj, &bldev_attr_group);
+ if (r) {
+ dev_err(&bldev->dev, "failed to create sysfs files\n");
+ backlight_device_unregister(bldev);
+ return r;
+ }
+ }
+
+ bldev->props.fb_blank = FB_BLANK_UNBLANK;
+ bldev->props.power = FB_BLANK_UNBLANK;
+
+ if (md->has_bc)
+ max_brightness = 255;
+ else
+ max_brightness = display->hw_config.max_backlight_level;
+
+ if (md->has_bc)
+ brightness = acx565akm_get_actual_brightness(md);
+ else {
+ if (display->hw_config.get_backlight != NULL)
+ brightness = display->hw_config.get_backlight(display);
+ else
+ brightness = 0;
+ }
+
+ bldev->props.max_brightness = max_brightness;
+ bldev->props.brightness = brightness;
+ acx565akm_bl_update_status(bldev);
+
+ return 0;
+}
+
+static struct omap_panel acx565akm_panel = {
+ .name = "panel-acx565akm",
+ .init = acx565akm_panel_init,
+ .suspend = acx565akm_panel_suspend,
+ .resume = acx565akm_panel_resume,
+ .enable = acx565akm_panel_enable,
+ .disable = acx565akm_panel_disable,
+
+ .timings = {
+ .x_res = 800,
+ .y_res = 480,
+
+ .pixel_clock = 24000,
+
+ .hsw = 4,
+ .hfp = 16,
+ .hbp = 12,
+
+ .vsw = 3,
+ .vfp = 3,
+ .vbp = 3,
+ },
+
+ .config = OMAP_DSS_LCD_TFT,
+
+ .recommended_bpp = 16,
+
+ /*
+ * supported modes: 12bpp(444), 16bpp(565), 18bpp(666), 24bpp(888)
+ * resolutions.
+ */
+};
+
+static int acx565akm_spi_probe(struct spi_device *spi)
+{
+ struct acx565akm_device *md;
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ md = kzalloc(sizeof(*md), GFP_KERNEL);
+ if (md == NULL) {
+ dev_err(&spi->dev, "out of memory\n");
+ return -ENOMEM;
+ }
+
+ spi->mode = SPI_MODE_3;
+ md->spi = spi;
+ dev_set_drvdata(&spi->dev, md);
+ md->panel = acx565akm_panel;
+ acx565akm_panel.priv = md;
+
+ omap_dss_register_panel(&acx565akm_panel);
+
+ return 0;
+}
+
+static int acx565akm_spi_remove(struct spi_device *spi)
+{
+ struct acx565akm_device *md = dev_get_drvdata(&spi->dev);
+
+ dev_dbg(&md->spi->dev, "%s\n", __func__);
+
+ sysfs_remove_group(&md->bl_dev->dev.kobj, &bldev_attr_group);
+ backlight_device_unregister(md->bl_dev);
+ omap_dss_unregister_panel(&acx565akm_panel);
+
+ kfree(md);
+
+ return 0;
+}
+
+static struct spi_driver acx565akm_spi_driver = {
+ .driver = {
+ .name = "acx565akm",
+ .bus = &spi_bus_type,
+ .owner = THIS_MODULE,
+ },
+ .probe = acx565akm_spi_probe,
+ .remove = __devexit_p(acx565akm_spi_remove),
+};
+
+static int __init acx565akm_init(void)
+{
+ return spi_register_driver(&acx565akm_spi_driver);
+}
+
+static void __exit acx565akm_exit(void)
+{
+ spi_unregister_driver(&acx565akm_spi_driver);
+}
+
+module_init(acx565akm_init);
+module_exit(acx565akm_exit);
+
+MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
+MODULE_DESCRIPTION("acx565akm LCD Driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-acx565akm.h b/drivers/video/omap2/displays/panel-acx565akm.h
new file mode 100644
index 0000000..6d3727b
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-acx565akm.h
@@ -0,0 +1,9 @@
+#ifndef __DRIVERS_VIDEO_OMAP2_DISPLAYS_PANEL_ACX565AKM_H
+#define __DRIVERS_VIDEO_OMAP2_DISPLAYS_PANEL_ACX565AKM_H
+
+struct acx565akm_panel_data {
+ unsigned bc_connected:1;
+};
+
+#endif
+
--
1.5.6.5
@@ -0,0 +1,28 @@
From 370510e24ddbf539392ebb6a1e43280965fcb19b Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:47:32 +0530
Subject: [PATCH] DSS2: Small VRFB context allocation bug fixed
This is minor bug while requesting and mapping memory for
VRFB space.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
drivers/video/omap2/omapfb/omapfb-main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 852abe5..44febef 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1193,6 +1193,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
if(!va) {
printk(KERN_ERR "vrfb: ioremap failed\n");
+ omap_vrfb_release_ctx(&rg->vrfb);
return -ENOMEM;
}
--
1.5.6.5
@@ -0,0 +1,37 @@
From 370d1f93a32e8fcaeac5c16574417e354af21d08 Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:38:31 +0530
Subject: [PATCH] DSS2: Allocated memory for Color Look-up-table
We were not allocating memory for CMAP buffer and due to that
G_CMAP was failing, since it does check for size of CMAP buffer.
Called "fb_alloc_cmap" for llocating memory for CMAP.
We are currently not supporting 1,2,4,8 bpp, so meaning less
for us as of now. But for completeness this is required.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
drivers/video/omap2/omapfb/omapfb-main.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 44febef..afe40a9 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1525,6 +1525,11 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
goto err;
set_fb_fix(fbi);
+
+ r = fb_alloc_cmap(&fbi->cmap, 256, 0);
+ if (r)
+ dev_err(fbdev->dev, "unable to allocate color map memory\n");
+
err:
return r;
}
--
1.5.6.5
@@ -0,0 +1,65 @@
From 9c93bcab724b5935d745604773ed43825efefd87 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 13:47:11 +0300
Subject: [PATCH] DSS2: Fix DMA rotation
u16 was not a good type for offsets. First, they need to be signed,
and second, 16 bits is not enough.
---
drivers/video/omap2/dss/dispc.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ffb5648..6cea545 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -778,7 +778,7 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
dispc_write_reg(vsi_reg[plane-1], val);
}
-static void _dispc_set_pix_inc(enum omap_plane plane, u16 inc)
+static void _dispc_set_pix_inc(enum omap_plane plane, s32 inc)
{
const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
DISPC_VID_PIXEL_INC(0),
@@ -787,7 +787,7 @@ static void _dispc_set_pix_inc(enum omap_plane plane, u16 inc)
dispc_write_reg(ri_reg[plane], inc);
}
-static void _dispc_set_row_inc(enum omap_plane plane, u16 inc)
+static void _dispc_set_row_inc(enum omap_plane plane, s32 inc)
{
const struct dispc_reg ri_reg[] = { DISPC_GFX_ROW_INC,
DISPC_VID_ROW_INC(0),
@@ -1123,7 +1123,7 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
}
}
-static int pixinc(int pixels, u8 ps)
+static s32 pixinc(int pixels, u8 ps)
{
if (pixels == 1)
return 1;
@@ -1140,7 +1140,7 @@ static void calc_rotation_offset(u8 rotation, bool mirror,
u16 width, u16 height,
enum omap_color_mode color_mode, bool fieldmode,
unsigned *offset0, unsigned *offset1,
- u16 *row_inc, u16 *pix_inc)
+ s32 *row_inc, s32 *pix_inc)
{
u8 ps;
u16 fbw, fbh;
@@ -1298,8 +1298,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
bool fieldmode = 0;
int cconv = 0;
unsigned offset0, offset1;
- u16 row_inc;
- u16 pix_inc;
+ s32 row_inc;
+ s32 pix_inc;
if (plane == OMAP_DSS_GFX) {
if (width != out_width || height != out_height)
--
1.5.6.5
@@ -0,0 +1,41 @@
From 360a55ddd309e3a45b227a4a905ae7120dd16169 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 14:21:12 +0300
Subject: [PATCH] DSS2: Verify that overlay paddr != 0
---
drivers/video/omap2/dss/dispc.c | 3 +++
drivers/video/omap2/dss/overlay.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 6cea545..2480a03 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1301,6 +1301,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
s32 row_inc;
s32 pix_inc;
+ if (paddr == 0)
+ return -EINVAL;
+
if (plane == OMAP_DSS_GFX) {
if (width != out_width || height != out_height)
return -EINVAL;
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 968edbe..9209acf 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -331,6 +331,9 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
int r;
struct omap_overlay_info old_info;
+ if (info->paddr == 0)
+ return -EINVAL;
+
old_info = ovl->info;
ovl->info = *info;
--
1.5.6.5
@@ -0,0 +1,51 @@
From 832b763db235da8e62f7b6ab02bcb8ad6bcb7a01 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:48:41 +0300
Subject: [PATCH] DSS2: Add function to get DSS logic clock rate
---
drivers/video/omap2/dss/dispc.c | 15 +++++++++++++++
drivers/video/omap2/dss/dss.h | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 2480a03..1bc23f7 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1850,6 +1850,21 @@ unsigned long dispc_fclk_rate(void)
return r;
}
+unsigned long dispc_lclk_rate(void)
+{
+ int lcd;
+ unsigned long r;
+ u32 l;
+
+ l = dispc_read_reg(DISPC_DIVISOR);
+
+ lcd = FLD_GET(l, 23, 16);
+
+ r = dispc_fclk_rate();
+
+ return r / lcd;
+}
+
unsigned long dispc_pclk_rate(void)
{
int lcd, pcd;
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index bac5ece..0be42b6 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -294,6 +294,7 @@ bool dispc_trans_key_enabled(enum omap_channel ch);
void dispc_set_lcd_timings(struct omap_video_timings *timings);
unsigned long dispc_fclk_rate(void);
+unsigned long dispc_lclk_rate(void);
unsigned long dispc_pclk_rate(void);
void dispc_set_pol_freq(struct omap_panel *panel);
void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
--
1.5.6.5
@@ -0,0 +1,68 @@
From a5c235a6f0094494ae1fc1a1ba4728e0d33dfd3b Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:49:27 +0300
Subject: [PATCH] DSS2: DSI: calculate VP_CLK_RATIO properly
---
drivers/video/omap2/dss/dsi.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 4442931..aecb89d 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1104,7 +1104,10 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
enable_clocks(1);
dsi_enable_pll_clock(1);
- /* configure dispc fck and pixel clock to something sane */
+ /* XXX this should be calculated depending on the screen size,
+ * required framerate and DSI speed.
+ * For now 48MHz is enough for 864x480@60 with 360Mbps/lane
+ * with two lanes */
r = dispc_calc_clock_div(1, 48 * 1000 * 1000, &cinfo);
if (r)
goto err0;
@@ -1119,7 +1122,7 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
if (r)
goto err0;
- /* PLL does not come out of reset without this... */
+ /* XXX PLL does not come out of reset without this... */
dispc_pck_free_enable(1);
if (wait_for_bit_change(DSI_PLL_STATUS, 0, 1) != 1) {
@@ -1128,8 +1131,8 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
goto err1;
}
- /* ... but if left on, we get problems when planes do not
- * fill the whole display. No idea about this XXX */
+ /* XXX ... but if left on, we get problems when planes do not
+ * fill the whole display. No idea about this */
dispc_pck_free_enable(0);
if (enable_hsclk && enable_hsdiv)
@@ -2214,6 +2217,7 @@ static int dsi_proto_config(struct omap_display *display)
{
u32 r;
int buswidth = 0;
+ int div;
dsi_config_tx_fifo(DSI_FIFO_SIZE_128,
DSI_FIFO_SIZE_0,
@@ -2254,8 +2258,9 @@ static int dsi_proto_config(struct omap_display *display)
r = FLD_MOD(r, 1, 1, 1); /* CS_RX_EN */
r = FLD_MOD(r, 1, 2, 2); /* ECC_RX_EN */
r = FLD_MOD(r, 1, 3, 3); /* TX_FIFO_ARBITRATION */
- /* XXX what should the ratio be */
- r = FLD_MOD(r, 0, 4, 4); /* VP_CLK_RATIO, VP_PCLK = VP_CLK/2 */
+
+ div = dispc_lclk_rate() / dispc_pclk_rate();
+ r = FLD_MOD(r, div == 2 ? 0 : 1, 4, 4); /* VP_CLK_RATIO */
r = FLD_MOD(r, buswidth, 7, 6); /* VP_DATA_BUS_WIDTH */
r = FLD_MOD(r, 0, 8, 8); /* VP_CLK_POL */
r = FLD_MOD(r, 2, 13, 12); /* LINE_BUFFER, 2 lines */
--
1.5.6.5
@@ -0,0 +1,58 @@
From 6b2c9d84c7accdfe1067fcdc8a00e50674aab4bb Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 17:42:26 +0300
Subject: [PATCH] DSS2: DSI: improve packet len calculation
---
drivers/video/omap2/dss/dsi.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index aecb89d..66ac6ea 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2624,17 +2624,28 @@ static void dsi_update_screen_dispc(struct omap_display *display,
u16 x, u16 y, u16 w, u16 h)
{
int bytespp = 3;
+ int len;
int total_len;
- int line_packet_len;
+ int packet_payload;
+ int packet_len;
u32 l;
if (dsi.update_mode == OMAP_DSS_UPDATE_MANUAL)
DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
x, y, w, h);
- /* TODO: one packet could be longer, I think? Max is the line buffer */
- line_packet_len = w * bytespp + 1; /* 1 byte for DCS cmd */
- total_len = line_packet_len * h;
+ len = w * h * bytespp;
+
+ /* XXX: one packet could be longer, I think? Line buffer is
+ * 1024 x 24bits, but we have to put DCS cmd there also.
+ * 1023 * 3 should work, but causes strange color effects. */
+ packet_payload = min(w, (u16)1020) * bytespp;
+
+ packet_len = packet_payload + 1; /* 1 byte for DCS cmd */
+ total_len = (len / packet_payload) * packet_len;
+
+ if (len % packet_payload)
+ total_len += (len % packet_payload) + 1;
display->ctrl->setup_update(display, x, y, w, h);
@@ -2646,7 +2657,7 @@ static void dsi_update_screen_dispc(struct omap_display *display,
l = FLD_VAL(total_len, 23, 0); /* TE_SIZE */
dsi_write_reg(DSI_VC_TE(1), l);
- dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, line_packet_len, 0);
+ dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, packet_len, 0);
if (dsi.use_te)
l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
--
1.5.6.5
@@ -0,0 +1,103 @@
From 85848d329ca3a2d6ee6841cdc11cc5951d187931 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Fri, 3 Apr 2009 19:09:20 +0200
Subject: [PATCH] DSS2: Disable video planes on sync lost error
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
When encountering the sync lost error disable the display and all video
planes on the affected manager. Afterwards re-enable the display.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/dispc.c | 50 +++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 1bc23f7..41734f3 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2518,29 +2518,79 @@ static void dispc_error_worker(struct work_struct *work)
}
if (errors & DISPC_IRQ_SYNC_LOST) {
+ struct omap_overlay_manager *manager = NULL;
+ bool enable = false;
+
DSSERR("SYNC_LOST, disabling LCD\n");
+
for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
struct omap_overlay_manager *mgr;
mgr = omap_dss_get_overlay_manager(i);
if (mgr->id == OMAP_DSS_CHANNEL_LCD) {
+ manager = mgr;
+ enable = mgr->display->state ==
+ OMAP_DSS_DISPLAY_ACTIVE;
mgr->display->disable(mgr->display);
break;
}
}
+
+ if (manager) {
+ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
+ struct omap_overlay *ovl;
+ ovl = omap_dss_get_overlay(i);
+
+ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
+ continue;
+
+ if (ovl->id != 0 && ovl->manager == manager)
+ dispc_enable_plane(ovl->id, 0);
+ }
+
+ dispc_go(manager->id);
+ mdelay(50);
+ if (enable)
+ manager->display->enable(manager->display);
+ }
}
if (errors & DISPC_IRQ_SYNC_LOST_DIGIT) {
+ struct omap_overlay_manager *manager = NULL;
+ bool enable = false;
+
DSSERR("SYNC_LOST_DIGIT, disabling TV\n");
+
for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
struct omap_overlay_manager *mgr;
mgr = omap_dss_get_overlay_manager(i);
if (mgr->id == OMAP_DSS_CHANNEL_DIGIT) {
+ manager = mgr;
+ enable = mgr->display->state ==
+ OMAP_DSS_DISPLAY_ACTIVE;
mgr->display->disable(mgr->display);
break;
}
}
+
+ if (manager) {
+ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
+ struct omap_overlay *ovl;
+ ovl = omap_dss_get_overlay(i);
+
+ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
+ continue;
+
+ if (ovl->id != 0 && ovl->manager == manager)
+ dispc_enable_plane(ovl->id, 0);
+ }
+
+ dispc_go(manager->id);
+ mdelay(50);
+ if (enable)
+ manager->display->enable(manager->display);
+ }
}
if (errors & DISPC_IRQ_OCP_ERR) {
--
1.5.6.5
@@ -0,0 +1,40 @@
From 63e15ba8d5f95b13d3abf359da718537d769f112 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 7 Apr 2009 10:01:58 +0300
Subject: [PATCH] DSS2: check for ovl paddr only when enabling
It seems Xvideo uses SETUP_PLANE ioctl even when
the fb memory has not been allocated. Sigh.
---
drivers/video/omap2/dss/overlay.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 9209acf..c047206 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -281,6 +281,11 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_display *display)
info = &ovl->info;
+ if (info->paddr == 0) {
+ DSSDBG("check_overlay failed: paddr 0\n");
+ return -EINVAL;
+ }
+
display->get_resolution(display, &dw, &dh);
DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
@@ -331,9 +336,6 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
int r;
struct omap_overlay_info old_info;
- if (info->paddr == 0)
- return -EINVAL;
-
old_info = ovl->info;
ovl->info = *info;
--
1.5.6.5
@@ -0,0 +1,183 @@
From 67f3fc050ab4e2006d5b7ec6ec341896627181ab Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:04 +0200
Subject: [PATCH] DSS2: Check fclk limits when configuring video planes
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Check that the currect functional clock is fast enough to support
the requested scaling ratios. Also check if 5-tap filtering can be
used even though the downscaling ratio is less than 1:2 since the
functional clock rate required for 5-tap filtering can be less than
the requirement for 3-tap filtering, and 5-tap filtering should look
better.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/dispc.c | 104 ++++++++++++++++++++++++++++++++++++---
1 files changed, 97 insertions(+), 7 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 41734f3..61861d8 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1026,11 +1026,11 @@ static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
static void _dispc_set_scaling(enum omap_plane plane,
u16 orig_width, u16 orig_height,
u16 out_width, u16 out_height,
- bool ilace)
+ bool ilace, bool five_taps)
{
int fir_hinc;
int fir_vinc;
- int hscaleup, vscaleup, five_taps;
+ int hscaleup, vscaleup;
int fieldmode = 0;
int accu0 = 0;
int accu1 = 0;
@@ -1040,7 +1040,6 @@ static void _dispc_set_scaling(enum omap_plane plane,
hscaleup = orig_width <= out_width;
vscaleup = orig_height <= out_height;
- five_taps = orig_height > out_height * 2;
_dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps);
@@ -1283,6 +1282,73 @@ static void calc_rotation_offset(u8 rotation, bool mirror,
}
}
+static unsigned long calc_fclk_five_taps(u16 width, u16 height,
+ u16 out_width, u16 out_height, enum omap_color_mode color_mode)
+{
+ u32 fclk = 0;
+ /* FIXME venc pclk? */
+ u64 tmp, pclk = dispc_pclk_rate();
+
+ if (height > out_height) {
+ /* FIXME get real display PPL */
+ unsigned int ppl = 800;
+
+ tmp = pclk * height * out_width;
+ do_div(tmp, 2 * out_height * ppl);
+ fclk = tmp;
+
+ if (height > 2 * out_height) {
+ tmp = pclk * (height - 2 * out_height) * out_width;
+ do_div(tmp, 2 * out_height * (ppl - out_width));
+ fclk = max(fclk, (u32) tmp);
+ }
+ }
+
+ if (width > out_width) {
+ tmp = pclk * width;
+ do_div(tmp, out_width);
+ fclk = max(fclk, (u32) tmp);
+
+ if (color_mode == OMAP_DSS_COLOR_RGB24U)
+ fclk <<= 1;
+ }
+
+ return fclk;
+}
+
+static unsigned long calc_fclk(u16 width, u16 height,
+ u16 out_width, u16 out_height,
+ enum omap_color_mode color_mode, bool five_taps)
+{
+ unsigned int hf, vf;
+
+ if (five_taps)
+ return calc_fclk_five_taps(width, height,
+ out_width, out_height, color_mode);
+
+ /*
+ * FIXME how to determine the 'A' factor
+ * for the no downscaling case ?
+ */
+
+ if (width > 3 * out_width)
+ hf = 4;
+ else if (width > 2 * out_width)
+ hf = 3;
+ else if (width > out_width)
+ hf = 2;
+ else
+ hf = 1;
+
+ if (height > out_height)
+ vf = 2;
+ else
+ vf = 1;
+
+ /* FIXME venc pclk? */
+ return dispc_pclk_rate() * vf * hf;
+}
+
static int _dispc_setup_plane(enum omap_plane plane,
enum omap_channel channel_out,
u32 paddr, u16 screen_width,
@@ -1294,7 +1360,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
u8 rotation, int mirror)
{
const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
- bool five_taps = height > out_height * 2;
+ bool five_taps = 0;
bool fieldmode = 0;
int cconv = 0;
unsigned offset0, offset1;
@@ -1323,8 +1389,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
}
} else {
/* video plane */
- if (width > (2048 >> five_taps))
- return -EINVAL;
+
+ unsigned long fclk;
if (out_width < width / maxdownscale ||
out_width > width * 8)
@@ -1356,6 +1422,30 @@ static int _dispc_setup_plane(enum omap_plane plane,
default:
return -EINVAL;
}
+
+ /* Must use 5-tap filter? */
+ five_taps = height > out_height * 2;
+
+ /* Try to use 5-tap filter whenever possible. */
+ if (cpu_is_omap34xx() && !five_taps &&
+ height > out_height && width <= 1024) {
+ fclk = calc_fclk_five_taps(width, height,
+ out_width, out_height, color_mode);
+ if (fclk <= dispc_fclk_rate())
+ five_taps = true;
+ }
+
+ if (width > (2048 >> five_taps))
+ return -EINVAL;
+
+ fclk = calc_fclk(width, height, out_width, out_height,
+ color_mode, five_taps);
+
+ DSSDBG("required fclk rate = %lu Hz\n", fclk);
+ DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
+
+ if (fclk > dispc_fclk_rate())
+ return -EINVAL;
}
if (ilace && height >= out_height)
@@ -1399,7 +1489,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
if (plane != OMAP_DSS_GFX) {
_dispc_set_scaling(plane, width, height,
out_width, out_height,
- ilace);
+ ilace, five_taps);
_dispc_set_vid_size(plane, out_width, out_height);
_dispc_set_vid_color_conv(plane, cconv);
}
--
1.5.6.5
@@ -0,0 +1,79 @@
From 9f8f1613253656f155b3844c8255a560f86e0acd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:05 +0200
Subject: [PATCH] DSS2: Check scaling limits against proper values
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Move the ilace and fieldmode related height adjustments to be performed
before checking the scaling limits.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/dispc.c | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 61861d8..ae7be3d 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1366,10 +1366,25 @@ static int _dispc_setup_plane(enum omap_plane plane,
unsigned offset0, offset1;
s32 row_inc;
s32 pix_inc;
+ u16 frame_height = height;
if (paddr == 0)
return -EINVAL;
+ if (ilace && height >= out_height)
+ fieldmode = 1;
+
+ if (ilace) {
+ if (fieldmode)
+ height /= 2;
+ pos_y /= 2;
+ out_height /= 2;
+
+ DSSDBG("adjusting for ilace: height %d, pos_y %d, "
+ "out_height %d\n",
+ height, pos_y, out_height);
+ }
+
if (plane == OMAP_DSS_GFX) {
if (width != out_width || height != out_height)
return -EINVAL;
@@ -1448,28 +1463,14 @@ static int _dispc_setup_plane(enum omap_plane plane,
return -EINVAL;
}
- if (ilace && height >= out_height)
- fieldmode = 1;
-
calc_rotation_offset(rotation, mirror,
- screen_width, width, height, color_mode,
+ screen_width, width, frame_height, color_mode,
fieldmode,
&offset0, &offset1, &row_inc, &pix_inc);
DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n",
offset0, offset1, row_inc, pix_inc);
- if (ilace) {
- if (fieldmode)
- height /= 2;
- pos_y /= 2;
- out_height /= 2;
-
- DSSDBG("adjusting for ilace: height %d, pos_y %d, "
- "out_height %d\n",
- height, pos_y, out_height);
- }
-
_dispc_set_channel_out(plane, channel_out);
_dispc_set_color_mode(plane, color_mode);
--
1.5.6.5
@@ -0,0 +1,96 @@
From c5e71be877e71c7df329205307e830f158c403bf Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:06 +0200
Subject: [PATCH] DSS2: Add venc register dump
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Add a new file to debugfs to dump the VENC registers. The function
prototype was already there but the implementation was missing.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/venc.c | 55 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index aceed9f..b655df4 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -30,6 +30,7 @@
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/string.h>
+#include <linux/seq_file.h>
#include <mach/display.h>
#include <mach/cpu.h>
@@ -81,6 +82,7 @@
#define VENC_TVDETGP_INT_START_STOP_Y 0xB4
#define VENC_GEN_CTRL 0xB8
#define VENC_OUTPUT_CONTROL 0xC4
+#define VENC_OUTPUT_TEST 0xC8
#define VENC_DAC_B__DAC_C 0xC8
struct venc_config {
@@ -598,3 +600,56 @@ void venc_init_display(struct omap_display *display)
display->set_timings = venc_set_timings;
display->check_timings = venc_check_timings;
}
+
+void venc_dump_regs(struct seq_file *s)
+{
+#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
+
+ venc_enable_clocks(1);
+
+ DUMPREG(VENC_F_CONTROL);
+ DUMPREG(VENC_VIDOUT_CTRL);
+ DUMPREG(VENC_SYNC_CTRL);
+ DUMPREG(VENC_LLEN);
+ DUMPREG(VENC_FLENS);
+ DUMPREG(VENC_HFLTR_CTRL);
+ DUMPREG(VENC_CC_CARR_WSS_CARR);
+ DUMPREG(VENC_C_PHASE);
+ DUMPREG(VENC_GAIN_U);
+ DUMPREG(VENC_GAIN_V);
+ DUMPREG(VENC_GAIN_Y);
+ DUMPREG(VENC_BLACK_LEVEL);
+ DUMPREG(VENC_BLANK_LEVEL);
+ DUMPREG(VENC_X_COLOR);
+ DUMPREG(VENC_M_CONTROL);
+ DUMPREG(VENC_BSTAMP_WSS_DATA);
+ DUMPREG(VENC_S_CARR);
+ DUMPREG(VENC_LINE21);
+ DUMPREG(VENC_LN_SEL);
+ DUMPREG(VENC_L21__WC_CTL);
+ DUMPREG(VENC_HTRIGGER_VTRIGGER);
+ DUMPREG(VENC_SAVID__EAVID);
+ DUMPREG(VENC_FLEN__FAL);
+ DUMPREG(VENC_LAL__PHASE_RESET);
+ DUMPREG(VENC_HS_INT_START_STOP_X);
+ DUMPREG(VENC_HS_EXT_START_STOP_X);
+ DUMPREG(VENC_VS_INT_START_X);
+ DUMPREG(VENC_VS_INT_STOP_X__VS_INT_START_Y);
+ DUMPREG(VENC_VS_INT_STOP_Y__VS_EXT_START_X);
+ DUMPREG(VENC_VS_EXT_STOP_X__VS_EXT_START_Y);
+ DUMPREG(VENC_VS_EXT_STOP_Y);
+ DUMPREG(VENC_AVID_START_STOP_X);
+ DUMPREG(VENC_AVID_START_STOP_Y);
+ DUMPREG(VENC_FID_INT_START_X__FID_INT_START_Y);
+ DUMPREG(VENC_FID_INT_OFFSET_Y__FID_EXT_START_X);
+ DUMPREG(VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y);
+ DUMPREG(VENC_TVDETGP_INT_START_STOP_X);
+ DUMPREG(VENC_TVDETGP_INT_START_STOP_Y);
+ DUMPREG(VENC_GEN_CTRL);
+ DUMPREG(VENC_OUTPUT_CONTROL);
+ DUMPREG(VENC_OUTPUT_TEST);
+
+ venc_enable_clocks(0);
+
+#undef DUMPREG
+}
--
1.5.6.5
@@ -0,0 +1,27 @@
From facfd479bb6efad76eec1e74048cb7a31da7287d Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Mon, 6 Apr 2009 22:26:04 +0200
Subject: [PATCH] DSS2: FB: remove unused var warning
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
drivers/video/omap2/omapfb/omapfb-main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index afe40a9..12ce0c3 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1246,7 +1246,9 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
display->get_resolution(display, &w, &h);
if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+#ifdef DEBUG
int oldw = w, oldh = h;
+#endif
omap_vrfb_adjust_size(&w, &h, bytespp);
--
1.5.6.5
@@ -0,0 +1,214 @@
From c02b843c2732bc7b15a3e35b5dd715d68225bbd1 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 8 Apr 2009 12:51:46 +0200
Subject: [PATCH] DSS2: pass the default FB color format through board info
Add a field to the FB memory region platform data, so that board
init code can pass a default color format to the driver. Set this
format as an initial setting for the given FB.
This is needed for an upcoming patch that adds detection of the
color format set by the bootloader.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
drivers/video/omap2/omapfb/omapfb-main.c | 121 +++++++++++++++++++++++++++---
drivers/video/omap2/omapfb/omapfb.h | 2 +
include/linux/omapfb.h | 5 +
3 files changed, 117 insertions(+), 11 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 12ce0c3..67c67c2 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -370,6 +370,21 @@ static enum omap_color_mode fb_mode_to_dss_mode(struct fb_var_screeninfo *var)
return -EINVAL;
}
+static int dss_mode_to_fb_mode(enum omap_color_mode dssmode,
+ struct fb_var_screeninfo *var)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(omapfb_colormodes); ++i) {
+ struct omapfb_colormode *mode = &omapfb_colormodes[i];
+ if (dssmode == mode->dssmode) {
+ assign_colormode_to_var(var, mode);
+ return 0;
+ }
+ }
+ return -ENOENT;
+}
+
void set_fb_fix(struct fb_info *fbi)
{
struct fb_fix_screeninfo *fix = &fbi->fix;
@@ -1267,6 +1282,60 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
return omapfb_alloc_fbmem(fbi, size, paddr);
}
+static enum omap_color_mode fb_format_to_dss_mode(enum omapfb_color_format format)
+{
+ enum omap_color_mode mode;
+
+ switch (format) {
+ case OMAPFB_COLOR_RGB565:
+ mode = OMAP_DSS_COLOR_RGB16;
+ break;
+ case OMAPFB_COLOR_YUV422:
+ mode = OMAP_DSS_COLOR_YUV2;
+ break;
+ case OMAPFB_COLOR_CLUT_8BPP:
+ mode = OMAP_DSS_COLOR_CLUT8;
+ break;
+ case OMAPFB_COLOR_CLUT_4BPP:
+ mode = OMAP_DSS_COLOR_CLUT4;
+ break;
+ case OMAPFB_COLOR_CLUT_2BPP:
+ mode = OMAP_DSS_COLOR_CLUT2;
+ break;
+ case OMAPFB_COLOR_CLUT_1BPP:
+ mode = OMAP_DSS_COLOR_CLUT1;
+ break;
+ case OMAPFB_COLOR_RGB444:
+ mode = OMAP_DSS_COLOR_RGB12U;
+ break;
+ case OMAPFB_COLOR_YUY422:
+ mode = OMAP_DSS_COLOR_UYVY;
+ break;
+ case OMAPFB_COLOR_ARGB16:
+ mode = OMAP_DSS_COLOR_ARGB16;
+ break;
+ case OMAPFB_COLOR_RGB24U:
+ mode = OMAP_DSS_COLOR_RGB24U;
+ break;
+ case OMAPFB_COLOR_RGB24P:
+ mode = OMAP_DSS_COLOR_RGB24P;
+ break;
+ case OMAPFB_COLOR_ARGB32:
+ mode = OMAP_DSS_COLOR_ARGB32;
+ break;
+ case OMAPFB_COLOR_RGBA32:
+ mode = OMAP_DSS_COLOR_RGBA32;
+ break;
+ case OMAPFB_COLOR_RGBX32:
+ mode = OMAP_DSS_COLOR_RGBX32;
+ break;
+ default:
+ mode = -EINVAL;
+ }
+
+ return mode;
+}
+
static int omapfb_parse_vram_param(const char *param, int max_entries,
unsigned long *sizes, unsigned long *paddrs)
{
@@ -1483,9 +1552,36 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
}
var->nonstd = 0;
+ var->bits_per_pixel = 0;
var->rotate = ofbi->rotation;
+ /*
+ * Check if there is a default color format set in the board file,
+ * and use this format instead the default deducted from the
+ * display bpp.
+ */
+ if (fbdev->dev->platform_data) {
+ struct omapfb_platform_data *opd;
+ int id = ofbi->id;
+
+ opd = fbdev->dev->platform_data;
+ if (opd->mem_desc.region[id].format_used) {
+ enum omap_color_mode mode;
+ enum omapfb_color_format format;
+
+ format = opd->mem_desc.region[id].format;
+ mode = fb_format_to_dss_mode(format);
+ if (mode < 0) {
+ r = mode;
+ goto err;
+ }
+ r = dss_mode_to_fb_mode(mode, var);
+ if (r < 0)
+ goto err;
+ }
+ }
+
if (display) {
u16 w, h;
display->get_resolution(display, &w, &h);
@@ -1502,16 +1598,18 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
var->xres_virtual = var->xres;
var->yres_virtual = var->yres;
- switch (display->get_recommended_bpp(display)) {
- case 16:
- var->bits_per_pixel = 16;
- break;
- case 24:
- var->bits_per_pixel = 32;
- break;
- default:
- dev_err(fbdev->dev, "illegal display bpp\n");
- return -EINVAL;
+ if (!var->bits_per_pixel) {
+ switch (display->get_recommended_bpp(display)) {
+ case 16:
+ var->bits_per_pixel = 16;
+ break;
+ case 24:
+ var->bits_per_pixel = 32;
+ break;
+ default:
+ dev_err(fbdev->dev, "illegal display bpp\n");
+ return -EINVAL;
+ }
}
} else {
/* if there's no display, let's just guess some basic values */
@@ -1519,7 +1617,8 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
var->yres = 240;
var->xres_virtual = var->xres;
var->yres_virtual = var->yres;
- var->bits_per_pixel = 16;
+ if (!var->bits_per_pixel)
+ var->bits_per_pixel = 16;
}
r = check_fb_var(fbi, var);
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
index 65e9e6e..2607def 100644
--- a/drivers/video/omap2/omapfb/omapfb.h
+++ b/drivers/video/omap2/omapfb/omapfb.h
@@ -27,6 +27,8 @@
#define DEBUG
#endif
+#include <mach/display.h>
+
#ifdef DEBUG
extern unsigned int omapfb_debug;
#define DBG(format, ...) \
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
index 96190b2..7a34f22 100644
--- a/include/linux/omapfb.h
+++ b/include/linux/omapfb.h
@@ -298,6 +298,11 @@ struct omapfb_mem_region {
void __iomem *vaddr;
unsigned long size;
u8 type; /* OMAPFB_PLANE_MEM_* */
+ enum omapfb_color_format format;/* OMAPFB_COLOR_* */
+ unsigned format_used:1; /* Must be set when format is set.
+ * Needed b/c of the badly chosen 0
+ * base for OMAPFB_COLOR_* values
+ */
unsigned alloc:1; /* allocated by the driver */
unsigned map:1; /* kernel mapped by the driver */
};
--
1.5.6.5
@@ -0,0 +1,48 @@
From 2710416c43572652cb5355a5eaf68038c95659e8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 9 Apr 2009 12:10:46 +0300
Subject: [PATCH] DSS2: Beagle: Use gpio_set_value
---
arch/arm/mach-omap2/board-omap3beagle.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index b67e7a5..8c1961d 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -372,7 +372,7 @@ static struct platform_device keys_gpio = {
static int beagle_enable_dvi(struct omap_display *display)
{
if (display->hw_config.panel_reset_gpio != -1)
- gpio_direction_output(display->hw_config.panel_reset_gpio, 1);
+ gpio_set_value(display->hw_config.panel_reset_gpio, 1);
return 0;
}
@@ -380,7 +380,7 @@ static int beagle_enable_dvi(struct omap_display *display)
static void beagle_disable_dvi(struct omap_display *display)
{
if (display->hw_config.panel_reset_gpio != -1)
- gpio_direction_output(display->hw_config.panel_reset_gpio, 0);
+ gpio_set_value(display->hw_config.panel_reset_gpio, 0);
}
static struct omap_dss_display_config beagle_display_data_dvi = {
@@ -445,8 +445,12 @@ static void __init beagle_display_init(void)
int r;
r = gpio_request(beagle_display_data_dvi.panel_reset_gpio, "DVI reset");
- if (r < 0)
+ if (r < 0) {
printk(KERN_ERR "Unable to get DVI reset GPIO\n");
+ return;
+ }
+
+ gpio_direction_output(beagle_display_data_dvi.panel_reset_gpio, 0);
}
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
--
1.5.6.5
@@ -0,0 +1,28 @@
From 990f3160d33361c135ee72e91f202e05a8c378fc Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Mon, 13 Apr 2009 18:50:24 +0530
Subject: [PATCH] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
arch/arm/plat-omap/vrfb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
index 7e0f8fc..d68065f 100644
--- a/arch/arm/plat-omap/vrfb.c
+++ b/arch/arm/plat-omap/vrfb.c
@@ -16,8 +16,8 @@
#define SMS_ROT_VIRT_BASE(context, rot) \
(((context >= 4) ? 0xD0000000 : 0x70000000) \
- | 0x4000000 * (context) \
- | 0x1000000 * (rot))
+ + (0x4000000 * (context)) \
+ + (0x1000000 * (rot)))
#define OMAP_VRFB_SIZE (2048 * 2048 * 4)
--
1.5.6.5
@@ -0,0 +1,78 @@
From a1e8018c0806a1a0579eda4b93b7d6764a2ff643 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 15 Apr 2009 14:06:54 +0300
Subject: [PATCH] DSS2: DSI: sidlemode to noidle while sending frame
DISPC interrupts are not wake-up capable. Smart-idle in DISPC_SIDLEMODE
causes DSS interface to go to idle at the end of the frame, and the
FRAMEDONE interrupt is then delayed until something wakes up the DSS
interface.
So we set SIDLEMODE to no-idle when we start sending the frame, and
set it back to smart-idle after receiving FRAMEDONE.
---
drivers/video/omap2/dss/dispc.c | 10 ++++++++++
drivers/video/omap2/dss/dsi.c | 4 ++++
drivers/video/omap2/dss/dss.h | 3 +++
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ae7be3d..16c68b8 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2791,6 +2791,16 @@ static void _omap_dispc_initialize_irq(void)
omap_dispc_set_irqs();
}
+void dispc_enable_sidle(void)
+{
+ REG_FLD_MOD(DISPC_SYSCONFIG, 2, 4, 3); /* SIDLEMODE: smart idle */
+}
+
+void dispc_disable_sidle(void)
+{
+ REG_FLD_MOD(DISPC_SYSCONFIG, 1, 4, 3); /* SIDLEMODE: no idle */
+}
+
static void _omap_dispc_initial_config(void)
{
u32 l;
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 66ac6ea..50af925 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2665,6 +2665,8 @@ static void dsi_update_screen_dispc(struct omap_display *display,
l = FLD_MOD(l, 1, 31, 31); /* TE_START */
dsi_write_reg(DSI_VC_TE(1), l);
+ dispc_disable_sidle();
+
dispc_enable_lcd_out(1);
if (dsi.use_te)
@@ -2678,6 +2680,8 @@ static void framedone_callback(void *data, u32 mask)
return;
}
+ dispc_enable_sidle();
+
dsi.framedone_scheduled = 1;
/* We get FRAMEDONE when DISPC has finished sending pixels and turns
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 0be42b6..d0917a8 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -244,6 +244,9 @@ void dispc_fake_vsync_irq(void);
void dispc_save_context(void);
void dispc_restore_context(void);
+void dispc_enable_sidle(void);
+void dispc_disable_sidle(void);
+
void dispc_lcd_enable_signal_polarity(bool act_high);
void dispc_lcd_enable_signal(bool enable);
void dispc_pck_free_enable(bool enable);
--
1.5.6.5
@@ -0,0 +1,324 @@
From 77e848eeba461e9b55b09d39fd0d640caea13e19 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:09:44 +0530
Subject: [PATCH] DSS2: VRFB rotation and mirroring implemented.
DSS2 modified to accept the rotation_type input
to get the dma or VRFB rotation.
DSS2: VRFB: Changed to pass DSS mode to vrfb_setup instead of Bpp.
VRFB size registers requires the width to be halved when the
mode is YUV or UYVY. So modifed to pass the mode to omap_vrfb_setup
function.
Code added by Tim Yamin for few bug fixes
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
arch/arm/plat-omap/include/mach/display.h | 6 ++
arch/arm/plat-omap/include/mach/vrfb.h | 3 +-
arch/arm/plat-omap/vrfb.c | 36 +++++++++-
drivers/video/omap2/dss/dispc.c | 109 +++++++++++++++++++++++++++--
drivers/video/omap2/dss/dss.h | 1 +
drivers/video/omap2/dss/manager.c | 1 +
6 files changed, 144 insertions(+), 12 deletions(-)
diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
index 6b702c7..b0a6272 100644
--- a/arch/arm/plat-omap/include/mach/display.h
+++ b/arch/arm/plat-omap/include/mach/display.h
@@ -341,6 +341,11 @@ enum omap_dss_overlay_managers {
struct omap_overlay_manager;
+enum omap_dss_rotation_type {
+ OMAP_DSS_ROT_DMA = 0,
+ OMAP_DSS_ROT_VRFB = 1,
+};
+
struct omap_overlay_info {
bool enabled;
@@ -351,6 +356,7 @@ struct omap_overlay_info {
u16 height;
enum omap_color_mode color_mode;
u8 rotation;
+ enum omap_dss_rotation_type rotation_type;
bool mirror;
u16 pos_x;
diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
index 2047862..12c7fab 100644
--- a/arch/arm/plat-omap/include/mach/vrfb.h
+++ b/arch/arm/plat-omap/include/mach/vrfb.h
@@ -24,6 +24,7 @@
#ifndef __VRFB_H
#define __VRFB_H
+#include <mach/display.h>
#define OMAP_VRFB_LINE_LEN 2048
struct vrfb
@@ -42,6 +43,6 @@ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
u8 bytespp);
extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
u16 width, u16 height,
- u8 bytespp);
+ enum omap_color_mode color_mode);
#endif /* __VRFB_H */
diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
index d68065f..2f08f6d 100644
--- a/arch/arm/plat-omap/vrfb.c
+++ b/arch/arm/plat-omap/vrfb.c
@@ -5,7 +5,6 @@
#include <mach/io.h>
#include <mach/vrfb.h>
-
/*#define DEBUG*/
#ifdef DEBUG
@@ -50,19 +49,48 @@ EXPORT_SYMBOL(omap_vrfb_adjust_size);
void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
u16 width, u16 height,
- u8 bytespp)
+ enum omap_color_mode color_mode)
{
unsigned pixel_size_exp;
u16 vrfb_width;
u16 vrfb_height;
u8 ctx = vrfb->context;
+ u8 bytespp;
DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
width, height, bytespp);
- if (bytespp == 4)
+ switch (color_mode) {
+ case OMAP_DSS_COLOR_RGB16:
+ case OMAP_DSS_COLOR_ARGB16:
+ bytespp = 2;
+ break;
+
+ case OMAP_DSS_COLOR_RGB24P:
+ bytespp = 3;
+ break;
+
+ case OMAP_DSS_COLOR_RGB24U:
+ case OMAP_DSS_COLOR_ARGB32:
+ case OMAP_DSS_COLOR_RGBA32:
+ case OMAP_DSS_COLOR_RGBX32:
+ case OMAP_DSS_COLOR_YUV2:
+ case OMAP_DSS_COLOR_UYVY:
+ bytespp = 4;
+ break;
+
+ default:
+ BUG();
+ return;
+ }
+
+ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
+ color_mode == OMAP_DSS_COLOR_UYVY)
+ width >>= 1;
+
+ if (bytespp == 4) {
pixel_size_exp = 2;
- else if (bytespp == 2)
+ } else if (bytespp == 2)
pixel_size_exp = 1;
else
BUG();
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 16c68b8..23a8155 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1106,7 +1106,7 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
case 0: vidrot = 0; break;
case 1: vidrot = 1; break;
case 2: vidrot = 2; break;
- case 3: vidrot = 1; break;
+ case 3: vidrot = 3; break;
}
}
@@ -1134,7 +1134,92 @@ static s32 pixinc(int pixels, u8 ps)
BUG();
}
-static void calc_rotation_offset(u8 rotation, bool mirror,
+static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ u16 screen_width,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode, bool fieldmode,
+ unsigned *offset0, unsigned *offset1,
+ s32 *row_inc, s32 *pix_inc)
+{
+ u8 ps;
+
+ switch (color_mode) {
+ case OMAP_DSS_COLOR_RGB16:
+ case OMAP_DSS_COLOR_ARGB16:
+ ps = 2;
+ break;
+
+ case OMAP_DSS_COLOR_RGB24P:
+ ps = 3;
+ break;
+
+ case OMAP_DSS_COLOR_RGB24U:
+ case OMAP_DSS_COLOR_ARGB32:
+ case OMAP_DSS_COLOR_RGBA32:
+ case OMAP_DSS_COLOR_RGBX32:
+ case OMAP_DSS_COLOR_YUV2:
+ case OMAP_DSS_COLOR_UYVY:
+ ps = 4;
+ break;
+
+ default:
+ BUG();
+ return;
+ }
+
+ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
+ width, height);
+ switch (rotation + mirror * 4) {
+ case 0:
+ case 2:
+ /*
+ * If the pixel format is YUV or UYVY divide the width
+ * of the image by 2 for 0 and 180 degree rotation.
+ */
+ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
+ color_mode == OMAP_DSS_COLOR_UYVY)
+ width = width >> 1;
+ case 1:
+ case 3:
+ *offset0 = 0;
+ if (fieldmode)
+ *offset1 = screen_width * ps;
+ else
+ *offset1 = 0;
+
+ *row_inc = pixinc(1 + (screen_width - width) +
+ (fieldmode ? screen_width : 0),
+ ps);
+ *pix_inc = pixinc(1, ps);
+ break;
+
+ case 4:
+ case 6:
+ /* If the pixel format is YUV or UYVY divide the width
+ * of the image by 2 for 0 degree and 180 degree
+ */
+ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
+ color_mode == OMAP_DSS_COLOR_UYVY)
+ width = width >> 1;
+ case 5:
+ case 7:
+ *offset0 = 0;
+ if (fieldmode)
+ *offset1 = screen_width * ps;
+ else
+ *offset1 = 0;
+ *row_inc = pixinc(1 - (screen_width + width) -
+ (fieldmode ? screen_width : 0),
+ ps);
+ *pix_inc = pixinc(1, ps);
+ break;
+
+ default:
+ BUG();
+ }
+}
+
+static void calc_dma_rotation_offset(u8 rotation, bool mirror,
u16 screen_width,
u16 width, u16 height,
enum omap_color_mode color_mode, bool fieldmode,
@@ -1357,6 +1442,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
u16 out_width, u16 out_height,
enum omap_color_mode color_mode,
bool ilace,
+ enum omap_dss_rotation_type rotation_type,
u8 rotation, int mirror)
{
const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
@@ -1463,10 +1549,16 @@ static int _dispc_setup_plane(enum omap_plane plane,
return -EINVAL;
}
- calc_rotation_offset(rotation, mirror,
- screen_width, width, frame_height, color_mode,
- fieldmode,
- &offset0, &offset1, &row_inc, &pix_inc);
+ if (rotation_type == OMAP_DSS_ROT_DMA)
+ calc_dma_rotation_offset(rotation, mirror,
+ screen_width, width, frame_height, color_mode,
+ fieldmode,
+ &offset0, &offset1, &row_inc, &pix_inc);
+ else
+ calc_vrfb_rotation_offset(rotation, mirror,
+ screen_width, width, frame_height, color_mode,
+ fieldmode,
+ &offset0, &offset1, &row_inc, &pix_inc);
DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n",
offset0, offset1, row_inc, pix_inc);
@@ -2889,6 +2981,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
u16 out_width, u16 out_height,
enum omap_color_mode color_mode,
bool ilace,
+ enum omap_dss_rotation_type rotation_type,
u8 rotation, bool mirror)
{
int r = 0;
@@ -2909,6 +3002,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
width, height,
out_width, out_height,
color_mode, ilace,
+ rotation_type,
rotation, mirror);
enable_clocks(0);
@@ -3122,7 +3216,8 @@ void dispc_setup_partial_planes(struct omap_display *display,
pw, ph,
pow, poh,
pi->color_mode, 0,
- pi->rotation, // XXX rotation probably wrong
+ pi->rotation_type,
+ pi->rotation,
pi->mirror);
dispc_enable_plane(ovl->id, 1);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index d0917a8..584dce6 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -272,6 +272,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
u16 out_width, u16 out_height,
enum omap_color_mode color_mode,
bool ilace,
+ enum omap_dss_rotation_type rotation_type,
u8 rotation, bool mirror);
void dispc_go(enum omap_channel channel);
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index b0fee80..8ca0bbb 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -395,6 +395,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
outh,
ovl->info.color_mode,
ilace,
+ ovl->info.rotation_type,
ovl->info.rotation,
ovl->info.mirror);
--
1.5.6.5
@@ -0,0 +1,236 @@
From c09f1a0642fd58a1b081594ea36dfd1bf71aec52 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:13:07 +0530
Subject: [PATCH] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
DSS2 now requires roatation_type to be specified by driver.
Added support for that.
DSS2 OMAPFB: Modified to pass the dss mode to omap_vrfb_setup function.
VRFB size register requires the width to be halved when the
mode is YUV or UYVY. So VRFB is modifed to pass the mode to omap_vrfb_setup
function.
Few changes done by Tim Yamin
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
arch/arm/plat-omap/vrfb.c | 4 +-
drivers/video/omap2/omapfb/omapfb-main.c | 59 ++++++++++++++----------------
drivers/video/omap2/omapfb/omapfb.h | 7 +---
3 files changed, 30 insertions(+), 40 deletions(-)
diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
index 2f08f6d..2ae0d68 100644
--- a/arch/arm/plat-omap/vrfb.c
+++ b/arch/arm/plat-omap/vrfb.c
@@ -88,9 +88,9 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
color_mode == OMAP_DSS_COLOR_UYVY)
width >>= 1;
- if (bytespp == 4) {
+ if (bytespp == 4)
pixel_size_exp = 2;
- } else if (bytespp == 2)
+ else if (bytespp == 2)
pixel_size_exp = 1;
else
BUG();
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 67c67c2..57f5900 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -176,15 +176,9 @@ static unsigned omapfb_get_vrfb_offset(struct omapfb_info *ofbi, int rot)
static u32 omapfb_get_region_rot_paddr(struct omapfb_info *ofbi)
{
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
- unsigned offset;
- int rot;
-
- rot = ofbi->rotation;
-
- offset = omapfb_get_vrfb_offset(ofbi, rot);
-
- return ofbi->region.vrfb.paddr[rot] + offset;
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ return ofbi->region.vrfb.paddr[ofbi->rotation]
+ + omapfb_get_vrfb_offset(ofbi, ofbi->rotation);
} else {
return ofbi->region.paddr;
}
@@ -192,7 +186,7 @@ static u32 omapfb_get_region_rot_paddr(struct omapfb_info *ofbi)
u32 omapfb_get_region_paddr(struct omapfb_info *ofbi)
{
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
return ofbi->region.vrfb.paddr[0];
else
return ofbi->region.paddr;
@@ -200,7 +194,7 @@ u32 omapfb_get_region_paddr(struct omapfb_info *ofbi)
void __iomem *omapfb_get_region_vaddr(struct omapfb_info *ofbi)
{
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
return ofbi->region.vrfb.vaddr[0];
else
return ofbi->region.vaddr;
@@ -398,7 +392,7 @@ void set_fb_fix(struct fb_info *fbi)
fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
/* used by mmap in fbmem.c */
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
fix->line_length =
(OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
else
@@ -434,11 +428,14 @@ void set_fb_fix(struct fb_info *fbi)
fix->xpanstep = 1;
fix->ypanstep = 1;
- if (rg->size) {
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
- omap_vrfb_setup(&rg->vrfb, rg->paddr,
- var->xres_virtual, var->yres_virtual,
- var->bits_per_pixel >> 3);
+ if (rg->size && ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ enum omap_color_mode mode = 0;
+ mode = fb_mode_to_dss_mode(var);
+
+ omap_vrfb_setup(&rg->vrfb, rg->paddr,
+ var->xres_virtual,
+ var->yres_virtual,
+ mode);
}
}
@@ -527,7 +524,7 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
if (var->yres > var->yres_virtual)
var->yres = var->yres_virtual;
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
line_size = OMAP_VRFB_LINE_LEN * bytespp;
else
line_size = var->xres_virtual * bytespp;
@@ -549,7 +546,7 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
if (line_size * var->yres_virtual > max_frame_size) {
DBG("can't fit FB into memory, reducing x\n");
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
return -EINVAL;
var->xres_virtual = max_frame_size / var->yres_virtual /
@@ -672,7 +669,7 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
struct omap_overlay_info info;
int xres, yres;
int screen_width;
- int rot, mirror;
+ int mirror;
DBG("setup_overlay %d, posx %d, posy %d, outw %d, outh %d\n", ofbi->id,
posx, posy, outw, outh);
@@ -688,7 +685,7 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
offset = ((var->yoffset * var->xres_virtual +
var->xoffset) * var->bits_per_pixel) >> 3;
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
data_start_p = omapfb_get_region_rot_paddr(ofbi);
data_start_v = NULL;
} else {
@@ -711,13 +708,10 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
ovl->get_overlay_info(ovl, &info);
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
- rot = 0;
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
mirror = 0;
- } else {
- rot = ofbi->rotation;
+ else
mirror = ofbi->mirror;
- }
info.paddr = data_start_p;
info.vaddr = data_start_v;
@@ -725,7 +719,8 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
info.width = xres;
info.height = yres;
info.color_mode = mode;
- info.rotation = rot;
+ info.rotation_type = ofbi->rotation_type;
+ info.rotation = ofbi->rotation;
info.mirror = mirror;
info.pos_x = posx;
@@ -1121,7 +1116,7 @@ static void omapfb_free_fbmem(struct fb_info *fbi)
if (rg->vaddr)
iounmap(rg->vaddr);
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
/* unmap the 0 angle rotation */
if (rg->vrfb.vaddr[0]) {
iounmap(rg->vrfb.vaddr[0]);
@@ -1181,7 +1176,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
return -ENOMEM;
}
- if (ofbi->rotation_type != OMAPFB_ROT_VRFB) {
+ if (ofbi->rotation_type != OMAP_DSS_ROT_VRFB) {
vaddr = ioremap_wc(paddr, size);
if (!vaddr) {
@@ -1260,7 +1255,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
display->get_resolution(display, &w, &h);
- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
#ifdef DEBUG
int oldw = w, oldh = h;
#endif
@@ -1701,8 +1696,8 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
ofbi->id = i;
/* assign these early, so that fb alloc can use them */
- ofbi->rotation_type = def_vrfb ? OMAPFB_ROT_VRFB :
- OMAPFB_ROT_DMA;
+ ofbi->rotation_type = def_vrfb ? OMAP_DSS_ROT_VRFB :
+ OMAP_DSS_ROT_DMA;
ofbi->rotation = def_rotate;
ofbi->mirror = def_mirror;
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
index 2607def..43f6922 100644
--- a/drivers/video/omap2/omapfb/omapfb.h
+++ b/drivers/video/omap2/omapfb/omapfb.h
@@ -53,11 +53,6 @@ struct omapfb2_mem_region {
bool map; /* kernel mapped by the driver */
};
-enum omapfb_rotation_type {
- OMAPFB_ROT_DMA = 0,
- OMAPFB_ROT_VRFB = 1,
-};
-
/* appended to fb_info */
struct omapfb_info {
int id;
@@ -66,7 +61,7 @@ struct omapfb_info {
int num_overlays;
struct omap_overlay *overlays[OMAPFB_MAX_OVL_PER_FB];
struct omapfb2_device *fbdev;
- enum omapfb_rotation_type rotation_type;
+ enum omap_dss_rotation_type rotation_type;
u8 rotation;
bool mirror;
};
--
1.5.6.5
@@ -0,0 +1,61 @@
From a8a37babe4856170f4cba86c425a8f21975d9e9e Mon Sep 17 00:00:00 2001
From: Tim Yamin <plasm@roo.me.uk>
Date: Mon, 13 Apr 2009 13:57:42 -0700
Subject: [PATCH] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
---
drivers/video/omap2/omapfb/omapfb-main.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 57f5900..cd63740 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -392,10 +392,19 @@ void set_fb_fix(struct fb_info *fbi)
fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
/* used by mmap in fbmem.c */
- if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
- fix->line_length =
- (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
- else
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ switch (var->nonstd) {
+ case OMAPFB_COLOR_YUV422:
+ case OMAPFB_COLOR_YUY422:
+ fix->line_length =
+ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 2;
+ break;
+ default:
+ fix->line_length =
+ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
+ break;
+ }
+ } else
fix->line_length =
(var->xres_virtual * var->bits_per_pixel) >> 3;
fix->smem_start = omapfb_get_region_paddr(ofbi);
@@ -704,7 +713,18 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
goto err;
}
- screen_width = fix->line_length / (var->bits_per_pixel >> 3);
+ switch (var->nonstd) {
+ case OMAPFB_COLOR_YUV422:
+ case OMAPFB_COLOR_YUY422:
+ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ screen_width = fix->line_length
+ / (var->bits_per_pixel >> 2);
+ break;
+ }
+ default:
+ screen_width = fix->line_length / (var->bits_per_pixel >> 3);
+ break;
+ }
ovl->get_overlay_info(ovl, &info);
--
1.5.6.5
@@ -0,0 +1,29 @@
From bda19b9359d9dc60f8b0beb5685e173e236ee30f Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Wed, 15 Apr 2009 17:05:18 +0530
Subject: [PATCH] DSS2: dispc_get_trans_key was returning wrong key type
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
drivers/video/omap2/dss/dispc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 23a8155..076d3d4 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1826,9 +1826,9 @@ void dispc_get_trans_key(enum omap_channel ch,
enable_clocks(1);
if (type) {
if (ch == OMAP_DSS_CHANNEL_LCD)
- *type = REG_GET(DISPC_CONFIG, 11, 11) >> 11;
+ *type = REG_GET(DISPC_CONFIG, 11, 11);
else if (ch == OMAP_DSS_CHANNEL_DIGIT)
- *type = REG_GET(DISPC_CONFIG, 13, 13) >> 13;
+ *type = REG_GET(DISPC_CONFIG, 13, 13);
else
BUG();
}
--
1.5.6.5
@@ -0,0 +1,33 @@
From 30c40f5e6b1794430f678bf23d3319354321cab7 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 14 Apr 2009 14:50:11 +0200
Subject: [PATCH] DSS2: do bootmem reserve for exclusive access
BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
reserve succeeded.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
arch/arm/plat-omap/vram.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
index f24a110..520f260 100644
--- a/arch/arm/plat-omap/vram.c
+++ b/arch/arm/plat-omap/vram.c
@@ -524,7 +524,10 @@ void __init omapfb_reserve_sdram(void)
return;
}
- reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
+ if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE) < 0) {
+ pr_err("FB: failed to reserve VRAM\n");
+ return;
+ }
} else {
if (size > sdram_size) {
printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
--
1.5.6.5
@@ -0,0 +1,35 @@
From ed7a9223f6785be03951c55f3b0695b0d5635c80 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:44 +0200
Subject: [PATCH] DSS2: Fix DISPC_VID_FIR value for omap34xx
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
The msbs of the DISPC_VID_FIR fields were incorrectly masked out on
omap34xx and thus 4:1 downscale did not work correctly.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/dispc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 076d3d4..b8a3329 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -994,7 +994,10 @@ static void _dispc_set_fir(enum omap_plane plane, int hinc, int vinc)
BUG_ON(plane == OMAP_DSS_GFX);
- val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
+ if (cpu_is_omap24xx())
+ val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
+ else
+ val = FLD_VAL(vinc, 28, 16) | FLD_VAL(hinc, 12, 0);
dispc_write_reg(fir_reg[plane-1], val);
}
--
1.5.6.5
@@ -0,0 +1,82 @@
From 5390230ed12585a79683733209db34e9130b8e3b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:43 +0200
Subject: [PATCH] DSS2: Prefer 3-tap filter
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
The 5-tap filter seems rather unstable. With some scaling settings it
works and with some it doesn't even though the functional clock remains
within the TRM limits. So prefer the 3-tap filter unless the functional
clock required for it is too high.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
drivers/video/omap2/dss/dispc.c | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index b8a3329..b631dd8 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1405,15 +1405,10 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height,
}
static unsigned long calc_fclk(u16 width, u16 height,
- u16 out_width, u16 out_height,
- enum omap_color_mode color_mode, bool five_taps)
+ u16 out_width, u16 out_height)
{
unsigned int hf, vf;
- if (five_taps)
- return calc_fclk_five_taps(width, height,
- out_width, out_height, color_mode);
-
/*
* FIXME how to determine the 'A' factor
* for the no downscaling case ?
@@ -1494,7 +1489,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
} else {
/* video plane */
- unsigned long fclk;
+ unsigned long fclk = 0;
if (out_width < width / maxdownscale ||
out_width > width * 8)
@@ -1530,20 +1525,22 @@ static int _dispc_setup_plane(enum omap_plane plane,
/* Must use 5-tap filter? */
five_taps = height > out_height * 2;
- /* Try to use 5-tap filter whenever possible. */
- if (cpu_is_omap34xx() && !five_taps &&
- height > out_height && width <= 1024) {
- fclk = calc_fclk_five_taps(width, height,
- out_width, out_height, color_mode);
- if (fclk <= dispc_fclk_rate())
+ if (!five_taps) {
+ fclk = calc_fclk(width, height,
+ out_width, out_height);
+
+ /* Try 5-tap filter if 3-tap fclk is too high */
+ if (cpu_is_omap34xx() && height > out_height &&
+ fclk > dispc_fclk_rate())
five_taps = true;
}
if (width > (2048 >> five_taps))
return -EINVAL;
- fclk = calc_fclk(width, height, out_width, out_height,
- color_mode, five_taps);
+ if (five_taps)
+ fclk = calc_fclk_five_taps(width, height,
+ out_width, out_height, color_mode);
DSSDBG("required fclk rate = %lu Hz\n", fclk);
DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
--
1.5.6.5
@@ -0,0 +1,135 @@
From 946eb774e95cdc2f2fa5cdc24aa69229f82814b8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 16 Apr 2009 17:56:00 +0300
Subject: [PATCH] DSS2: VRAM: improve omap_vram_add_region()
Combine postponed and non-posponed versions of omap_vram_add_region.
Make the func non-static, so it can be called from board files.
---
arch/arm/plat-omap/include/mach/vram.h | 1 +
arch/arm/plat-omap/vram.c | 54 +++++++++++++------------------
2 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/arch/arm/plat-omap/include/mach/vram.h b/arch/arm/plat-omap/include/mach/vram.h
index f176562..8639e08 100644
--- a/arch/arm/plat-omap/include/mach/vram.h
+++ b/arch/arm/plat-omap/include/mach/vram.h
@@ -24,6 +24,7 @@
#include <asm/types.h>
+extern int omap_vram_add_region(unsigned long paddr, size_t size);
extern int omap_vram_free(unsigned long paddr, size_t size);
extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
extern int omap_vram_reserve(unsigned long paddr, size_t size);
diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
index 520f260..8e9fe77 100644
--- a/arch/arm/plat-omap/vram.c
+++ b/arch/arm/plat-omap/vram.c
@@ -60,6 +60,7 @@
* time when we cannot yet allocate the region list */
#define MAX_POSTPONED_REGIONS 10
+static bool vram_initialized;
static int postponed_cnt __initdata;
static struct {
unsigned long paddr;
@@ -145,39 +146,32 @@ static void omap_vram_free_allocation(struct vram_alloc *va)
kfree(va);
}
-static __init int omap_vram_add_region_postponed(unsigned long paddr,
- size_t size)
-{
- if (postponed_cnt == MAX_POSTPONED_REGIONS)
- return -ENOMEM;
-
- postponed_regions[postponed_cnt].paddr = paddr;
- postponed_regions[postponed_cnt].size = size;
-
- ++postponed_cnt;
-
- return 0;
-}
-
-/* add/remove_region can be exported if there's need to add/remove regions
- * runtime */
-static int omap_vram_add_region(unsigned long paddr, size_t size)
+int omap_vram_add_region(unsigned long paddr, size_t size)
{
struct vram_region *rm;
unsigned pages;
- DBG("adding region paddr %08lx size %d\n",
- paddr, size);
+ if (vram_initialized) {
+ DBG("adding region paddr %08lx size %d\n",
+ paddr, size);
- size &= PAGE_MASK;
- pages = size >> PAGE_SHIFT;
+ size &= PAGE_MASK;
+ pages = size >> PAGE_SHIFT;
- rm = omap_vram_create_region(paddr, pages);
- if (rm == NULL)
- return -ENOMEM;
+ rm = omap_vram_create_region(paddr, pages);
+ if (rm == NULL)
+ return -ENOMEM;
+
+ list_add(&rm->list, &region_list);
+ } else {
+ if (postponed_cnt == MAX_POSTPONED_REGIONS)
+ return -ENOMEM;
- list_add(&rm->list, &region_list);
+ postponed_regions[postponed_cnt].paddr = paddr;
+ postponed_regions[postponed_cnt].size = size;
+ ++postponed_cnt;
+ }
return 0;
}
@@ -438,6 +432,8 @@ static __init int omap_vram_init(void)
{
int i, r;
+ vram_initialized = 1;
+
for (i = 0; i < postponed_cnt; i++)
omap_vram_add_region(postponed_regions[i].paddr,
postponed_regions[i].size);
@@ -472,10 +468,6 @@ static void __init omapfb_early_vram(char **p)
omapfb_def_sdram_vram_size = memparse(*p, p);
if (**p == ',')
omapfb_def_sdram_vram_start = simple_strtoul((*p) + 1, p, 16);
-
- printk("omapfb_early_vram, %d, 0x%x\n",
- omapfb_def_sdram_vram_size,
- omapfb_def_sdram_vram_start);
}
__early_param("vram=", omapfb_early_vram);
@@ -538,7 +530,7 @@ void __init omapfb_reserve_sdram(void)
BUG_ON(paddr & ~PAGE_MASK);
}
- omap_vram_add_region_postponed(paddr, size);
+ omap_vram_add_region(paddr, size);
pr_info("Reserving %u bytes SDRAM for VRAM\n", size);
}
@@ -594,7 +586,7 @@ unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
reserved = pend_avail - paddr;
size_avail = pend_avail - reserved - pstart_avail;
- omap_vram_add_region_postponed(paddr, size);
+ omap_vram_add_region(paddr, size);
if (reserved)
pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
--
1.5.6.5
@@ -0,0 +1,66 @@
From f825cafd5ee5c600218740507f85594c825b0c00 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 16 Apr 2009 18:47:49 +0530
Subject: [PATCH] DSS2: Added the function pointer for getting default color.
V4L2 Framework has a CID for getting/setting default color.
So added the function pointer for doing same.
SYSFS based getting the default color will remain same
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
arch/arm/plat-omap/include/mach/display.h | 1 +
drivers/video/omap2/dss/manager.c | 11 +++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
index b0a6272..073cdda 100644
--- a/arch/arm/plat-omap/include/mach/display.h
+++ b/arch/arm/plat-omap/include/mach/display.h
@@ -414,6 +414,7 @@ struct omap_overlay_manager {
int (*apply)(struct omap_overlay_manager *mgr);
void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
+ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
void (*set_trans_key)(struct omap_overlay_manager *mgr,
enum omap_dss_color_key_type type,
u32 trans_key);
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 8ca0bbb..12cf7b0 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -98,10 +98,8 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, const cha
static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr,
char *buf)
{
- u32 default_color;
-
- default_color = dispc_get_default_color(mgr->id);
- return snprintf(buf, PAGE_SIZE, "%d", default_color);
+ return snprintf(buf, PAGE_SIZE, "%d",
+ mgr->get_default_color(mgr));
}
static ssize_t manager_default_color_store(struct omap_overlay_manager *mgr,
@@ -470,6 +468,10 @@ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
{
dispc_enable_trans_key(mgr->id, enable);
}
+static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
+{
+ return dispc_get_default_color(mgr->id);
+}
static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
{
@@ -512,6 +514,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
mgr->set_default_color = &omap_dss_mgr_set_def_color,
mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
+ mgr->get_default_color = &omap_dss_mgr_get_default_color;
mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
dss_overlay_setup_dispc_manager(mgr);
--
1.5.6.5

Some files were not shown because too many files have changed in this diff Show More