* [PATCH 01/12] omap: Fix compile for arch/arm/mach-omap2
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
@ 2009-09-24 23:32 ` Tony Lindgren
2009-09-24 23:34 ` [PATCH 02/12] omap: Fix mcspi compile for 2420 Tony Lindgren
` (11 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:32 UTC (permalink / raw)
To: linux-arm-kernel
Patch 941132606c7611246d2034cb7b01f9270c2d1ede split IO_ADDRESS
into OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS except for the omap4
code to avoid merge conflicts with the omap4 code that was queued
earlier.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/serial.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 3a529c7..faada9f 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -110,7 +110,7 @@ static struct plat_serial8250_port serial_platform_data2[] = {
.uartclk = OMAP24XX_BASE_BAUD * 16,
}, {
#ifdef CONFIG_ARCH_OMAP4
- .membase = IO_ADDRESS(OMAP_UART4_BASE),
+ .membase = OMAP2_IO_ADDRESS(OMAP_UART4_BASE),
.mapbase = OMAP_UART4_BASE,
.irq = 70,
.flags = UPF_BOOT_AUTOCONF,
@@ -126,7 +126,7 @@ static struct plat_serial8250_port serial_platform_data2[] = {
#ifdef CONFIG_ARCH_OMAP4
static struct plat_serial8250_port serial_platform_data3[] = {
{
- .membase = IO_ADDRESS(OMAP_UART4_BASE),
+ .membase = OMAP2_IO_ADDRESS(OMAP_UART4_BASE),
.mapbase = OMAP_UART4_BASE,
.irq = 70,
.flags = UPF_BOOT_AUTOCONF,
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 02/12] omap: Fix mcspi compile for 2420
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
2009-09-24 23:32 ` [PATCH 01/12] omap: Fix compile for arch/arm/mach-omap2 Tony Lindgren
@ 2009-09-24 23:34 ` Tony Lindgren
2009-09-24 23:35 ` [PATCH 03/12] omap: Fix 44xx compile Tony Lindgren
` (10 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:34 UTC (permalink / raw)
To: linux-arm-kernel
Commit 7869c0b9ed44404bbc675ef76f8ccb3be5496f39 added support for
additional McSPI ports. Unfortunately that broke compile for 2420.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/devices.c | 65 ++++++++++++++++++++++++++++++-----------
1 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index bcfcfc7..faf7a1e 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -355,29 +355,60 @@ static struct platform_device omap2_mcspi4 = {
};
#endif
-static void omap_init_mcspi(void)
+#ifdef CONFIG_ARCH_OMAP4
+static inline void omap4_mcspi_fixup(void)
{
- if (cpu_is_omap44xx()) {
- omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
- omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
- omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
- omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
- omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
- omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
- omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
- omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
- }
- platform_device_register(&omap2_mcspi1);
- platform_device_register(&omap2_mcspi2);
+ omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
+ omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
+ omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
+ omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
+ omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
+ omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
+ omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
+ omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
+}
+#else
+static inline void omap4_mcspi_fixup(void)
+{
+}
+#endif
+
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
defined(CONFIG_ARCH_OMAP4)
- if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx())
- platform_device_register(&omap2_mcspi3);
+static inline void omap2_mcspi3_init(void)
+{
+ platform_device_register(&omap2_mcspi3);
+}
+#else
+static inline void omap2_mcspi3_init(void)
+{
+}
#endif
+
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
- if (cpu_is_omap343x() || cpu_is_omap44xx())
- platform_device_register(&omap2_mcspi4);
+static inline void omap2_mcspi4_init(void)
+{
+ platform_device_register(&omap2_mcspi4);
+}
+#else
+static inline void omap2_mcspi4_init(void)
+{
+}
#endif
+
+static void omap_init_mcspi(void)
+{
+ if (cpu_is_omap44xx())
+ omap4_mcspi_fixup();
+
+ platform_device_register(&omap2_mcspi1);
+ platform_device_register(&omap2_mcspi2);
+
+ if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx())
+ omap2_mcspi3_init();
+
+ if (cpu_is_omap343x() || cpu_is_omap44xx())
+ omap2_mcspi4_init();
}
#else
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 03/12] omap: Fix 44xx compile
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
2009-09-24 23:32 ` [PATCH 01/12] omap: Fix compile for arch/arm/mach-omap2 Tony Lindgren
2009-09-24 23:34 ` [PATCH 02/12] omap: Fix mcspi compile for 2420 Tony Lindgren
@ 2009-09-24 23:35 ` Tony Lindgren
2009-09-24 23:36 ` [PATCH 04/12] omap: Add missing mux pin for EHCI phy reset line Tony Lindgren
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:35 UTC (permalink / raw)
To: linux-arm-kernel
Looks like these patches were not tested that well..
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/cm4xxx.c | 17 ++---------------
arch/arm/mach-omap2/io.c | 4 ++--
arch/arm/mach-omap2/serial.c | 2 +-
3 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c
index e4ebd6d..4af76bb 100644
--- a/arch/arm/mach-omap2/cm4xxx.c
+++ b/arch/arm/mach-omap2/cm4xxx.c
@@ -22,7 +22,6 @@
#include <asm/atomic.h>
#include "cm.h"
-#include "cm-regbits-4xxx.h"
/* XXX move this to cm.h */
/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
@@ -50,19 +49,7 @@
*/
int omap4_cm_wait_idlest_ready(u32 prcm_mod, u8 prcm_dev_offs)
{
- int i = 0;
- u8 cm_id;
- u16 prcm_mod_offs;
- u32 mask = OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK;
-
- cm_id = prcm_mod >> OMAP4_PRCM_MOD_CM_ID_SHIFT;
- prcm_mod_offs = prcm_mod & OMAP4_PRCM_MOD_OFFS_MASK;
-
- while (((omap4_cm_read_mod_reg(cm_id, prcm_mod_offs, prcm_dev_offs,
- OMAP4_CM_CLKCTRL_DREG) & mask) != 0) &&
- (i++ < MAX_MODULE_READY_TIME))
- udelay(1);
-
- return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
+ /* FIXME: Add clock manager related code */
+ return 0;
}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 7574b6f..e3a3bad 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -294,10 +294,10 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
else if (cpu_is_omap34xx())
hwmods = omap34xx_hwmods;
- omap_hwmod_init(hwmods);
- omap2_mux_init();
#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */
/* The OPP tables have to be registered before a clk init */
+ omap_hwmod_init(hwmods);
+ omap2_mux_init();
omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
pwrdm_init(powerdomains_omap);
clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index faada9f..ae21868 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -579,7 +579,7 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
{
.pdev = {
.name = "serial8250",
- .id = 3
+ .id = 3,
.dev = {
.platform_data = serial_platform_data3,
},
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 04/12] omap: Add missing mux pin for EHCI phy reset line
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (2 preceding siblings ...)
2009-09-24 23:35 ` [PATCH 03/12] omap: Fix 44xx compile Tony Lindgren
@ 2009-09-24 23:36 ` Tony Lindgren
2009-09-24 23:38 ` [PATCH 05/12] omap: mailbox: Execute softreset at startup Tony Lindgren
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:36 UTC (permalink / raw)
To: linux-arm-kernel
From: Ajay Kumar Gupta <ajay.gupta@ti.com>
GPIO135 is used as EHCI (port2) phy reset pin on Multi Media Daughter card
connected to OMAP3EVM.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/mux.c | 2 ++
arch/arm/plat-omap/include/mach/mux.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 2daa595..339ba80 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -472,6 +472,8 @@ MUX_CFG_34XX("G25_34XX_GPIO86_OUT", 0x0fc,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
+MUX_CFG_34XX("AF4_34XX_GPIO135_OUT", 0x162,
+ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c,
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 98dfab6..4bcf8a5 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -846,6 +846,7 @@ enum omap34xx_index {
L8_34XX_GPIO63,
G25_34XX_GPIO86_OUT,
AG4_34XX_GPIO134_OUT,
+ AF4_34XX_GPIO135_OUT,
AE4_34XX_GPIO136_OUT,
AF6_34XX_GPIO140_UP,
AE6_34XX_GPIO141,
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 05/12] omap: mailbox: Execute softreset at startup
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (3 preceding siblings ...)
2009-09-24 23:36 ` [PATCH 04/12] omap: Add missing mux pin for EHCI phy reset line Tony Lindgren
@ 2009-09-24 23:38 ` Tony Lindgren
2009-09-24 23:39 ` [PATCH 06/12] omap: mailbox: Flush posted write when acking mailbox irq Tony Lindgren
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:38 UTC (permalink / raw)
To: linux-arm-kernel
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
The softreset at startup is introduced as TRM describes and also some
register bit definitions are added instead of magic number.
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/mailbox.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 6f71f37..5bf9a2f 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -30,6 +30,14 @@
#define MAILBOX_IRQ_NEWMSG(u) (1 << (2 * (u)))
#define MAILBOX_IRQ_NOTFULL(u) (1 << (2 * (u) + 1))
+/* SYSCONFIG: register bit definition */
+#define AUTOIDLE (1 << 0)
+#define SOFTRESET (1 << 1)
+#define SMARTIDLE (2 << 3)
+
+/* SYSSTATUS: register bit definition */
+#define RESETDONE (1 << 0)
+
#define MBOX_REG_SIZE 0x120
#define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32))
@@ -69,21 +77,33 @@ static inline void mbox_write_reg(u32 val, size_t ofs)
/* Mailbox H/W preparations */
static int omap2_mbox_startup(struct omap_mbox *mbox)
{
- unsigned int l;
+ u32 l;
+ unsigned long timeout;
mbox_ick_handle = clk_get(NULL, "mailboxes_ick");
if (IS_ERR(mbox_ick_handle)) {
- printk("Could not get mailboxes_ick\n");
+ pr_err("Can't get mailboxes_ick\n");
return -ENODEV;
}
clk_enable(mbox_ick_handle);
+ mbox_write_reg(SOFTRESET, MAILBOX_SYSCONFIG);
+ timeout = jiffies + msecs_to_jiffies(20);
+ do {
+ l = mbox_read_reg(MAILBOX_SYSSTATUS);
+ if (l & RESETDONE)
+ break;
+ } while (time_after(jiffies, timeout));
+
+ if (!(l & RESETDONE)) {
+ pr_err("Can't take mmu out of reset\n");
+ return -ENODEV;
+ }
+
l = mbox_read_reg(MAILBOX_REVISION);
pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f));
- /* set smart-idle & autoidle */
- l = mbox_read_reg(MAILBOX_SYSCONFIG);
- l |= 0x00000011;
+ l = SMARTIDLE | AUTOIDLE;
mbox_write_reg(l, MAILBOX_SYSCONFIG);
omap2_mbox_enable_irq(mbox, IRQ_RX);
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 06/12] omap: mailbox: Flush posted write when acking mailbox irq
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (4 preceding siblings ...)
2009-09-24 23:38 ` [PATCH 05/12] omap: mailbox: Execute softreset at startup Tony Lindgren
@ 2009-09-24 23:39 ` Tony Lindgren
2009-09-25 7:12 ` Artem Bityutskiy
2009-09-24 23:40 ` [PATCH 07/12] omap: iovmm: Fix compiler warning Tony Lindgren
` (6 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:39 UTC (permalink / raw)
To: linux-arm-kernel
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
The only way to flush posted write to L4 bus is to do a read back
of the same register right after the write.
This seems to be mostly needed in interrupt handlers to avoid
causing spurious interrupts.
The earlier fix has been to mark the L4 bus as strongly ordered
memory, which solves the problem, but causes performance penalties.
Similar to the fix, 03803a71041e3bc3c077f4e7b92f6ceaa9426df3
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/mailbox.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 5bf9a2f..f3fefca 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -176,6 +176,9 @@ static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
mbox_write_reg(bit, p->irqstatus);
+
+ /* Flush posted write for irq status to avoid spurious interrupts */
+ mbox_read_reg(p->irqstatus);
}
static int omap2_mbox_is_irq(struct omap_mbox *mbox,
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 07/12] omap: iovmm: Fix compiler warning
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (5 preceding siblings ...)
2009-09-24 23:39 ` [PATCH 06/12] omap: mailbox: Flush posted write when acking mailbox irq Tony Lindgren
@ 2009-09-24 23:40 ` Tony Lindgren
2009-09-24 23:41 ` [PATCH 08/12] omap: Fix wrong jtag_id for 850 Tony Lindgren
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:40 UTC (permalink / raw)
To: linux-arm-kernel
From: Sanjeev Premi <premi@ti.com>
This patch fixes these compiler warnings:
arch/arm/plat-omap/iovmm.c: In function 'vmap_sg':
arch/arm/plat-omap/iovmm.c:202: warning: passing argument 1 of
'flush_cache_vmap' makes integer from pointer without a cast
arch/arm/plat-omap/iovmm.c:202: warning: passing argument 2 of
'flush_cache_vmap' makes integer from pointer without a cast
arch/arm/plat-omap/iovmm.c: In function 'sgtable_fill_vmalloc':
arch/arm/plat-omap/iovmm.c:393: warning: passing argument 1 of
'flush_cache_vmap' makes integer from pointer without a cast
arch/arm/plat-omap/iovmm.c:393: warning: passing argument 2 of
'flush_cache_vmap' makes integer from pointer without a cast
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/iovmm.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 6fc52fc..57f7122 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -199,7 +199,8 @@ static void *vmap_sg(const struct sg_table *sgt)
va += bytes;
}
- flush_cache_vmap(new->addr, new->addr + total);
+ flush_cache_vmap((unsigned long)new->addr,
+ (unsigned long)(new->addr + total));
return new->addr;
err_out:
@@ -390,7 +391,7 @@ static void sgtable_fill_vmalloc(struct sg_table *sgt, void *_va)
}
va_end = _va + PAGE_SIZE * i;
- flush_cache_vmap(_va, va_end);
+ flush_cache_vmap((unsigned long)_va, (unsigned long)va_end);
}
static inline void sgtable_drain_vmalloc(struct sg_table *sgt)
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 08/12] omap: Fix wrong jtag_id for 850
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (6 preceding siblings ...)
2009-09-24 23:40 ` [PATCH 07/12] omap: iovmm: Fix compiler warning Tony Lindgren
@ 2009-09-24 23:41 ` Tony Lindgren
2009-09-24 23:43 ` [PATCH 09/12] omap: Fix a OMAP_MPUIO_VBASE typo " Tony Lindgren
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Angelo Arrifano <miknix@gmail.com>
Original message:
The previous value of the jtag_id was set for the omap730. For the
omap850, this value is different, and this was causing
autodetection to fail.
Reported-by:
Cory Maccarrone <darkstar6262@gmail.com>
Angelo Arrifano <miknix@gmail.com>
Alistair Buxton <a.j.buxton@gmail.com>
Signed-off-by: Angelo Arrifano <miknix@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/id.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 4ef26fa..e5dcdf7 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -38,7 +38,7 @@ static struct omap_id omap_ids[] __initdata = {
{ .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000},
{ .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
{ .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
- { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320500, .type = 0x08500000},
+ { .jtag_id = 0xb62c, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x08500000},
{ .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
{ .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
{ .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 09/12] omap: Fix a OMAP_MPUIO_VBASE typo for 850
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (7 preceding siblings ...)
2009-09-24 23:41 ` [PATCH 08/12] omap: Fix wrong jtag_id for 850 Tony Lindgren
@ 2009-09-24 23:43 ` Tony Lindgren
2009-09-24 23:44 ` [PATCH 10/12] omap: Fix matrix_keymap_data usage Tony Lindgren
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:43 UTC (permalink / raw)
To: linux-arm-kernel
From: Angelo Arrifano <miknix@gmail.com>
This was crashing omap850 devices.
Reported-by:
Alistair Buxton <a.j.buxton@gmail.com>
Signed-off-by: Angelo Arrifano <miknix@gmail.com>
Signed-obb-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 693839c..71ebd7f 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -250,7 +250,7 @@ static struct gpio_bank gpio_bank_730[7] = {
#ifdef CONFIG_ARCH_OMAP850
static struct gpio_bank gpio_bank_850[7] = {
- { OMAP1_MPUIO_BASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO },
+ { OMAP1_MPUIO_VBASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO },
{ OMAP850_GPIO1_BASE, INT_850_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_850 },
{ OMAP850_GPIO2_BASE, INT_850_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_850 },
{ OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 },
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 10/12] omap: Fix matrix_keymap_data usage
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (8 preceding siblings ...)
2009-09-24 23:43 ` [PATCH 09/12] omap: Fix a OMAP_MPUIO_VBASE typo " Tony Lindgren
@ 2009-09-24 23:44 ` Tony Lindgren
2009-09-24 23:45 ` [PATCH 11/12] omap: Fix MMC gpio_wp for BeagleBoard C2 and above Tony Lindgren
` (2 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:44 UTC (permalink / raw)
To: linux-arm-kernel
Otherwise we'll get compile errors like:
arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined
...
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-3430sdp.c | 10 +++++++---
arch/arm/mach-omap2/board-ldp.c | 10 +++++++---
arch/arm/mach-omap2/board-omap3evm.c | 10 +++++++---
arch/arm/mach-omap2/board-omap3pandora.c | 10 +++++++---
arch/arm/mach-omap2/board-rx51-peripherals.c | 10 +++++++---
arch/arm/mach-omap2/board-zoom2.c | 10 +++++++---
arch/arm/plat-omap/include/mach/keypad.h | 5 ++---
7 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bd57ec7..efaf053 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -54,7 +54,7 @@
#define TWL4030_MSECURE_GPIO 22
-static int sdp3430_keymap[] = {
+static int board_keymap[] = {
KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT),
KEY(0, 2, KEY_A),
@@ -88,11 +88,15 @@ static int sdp3430_keymap[] = {
0
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data sdp3430_kp_data = {
+ .keymap_data = &board_map_data,
.rows = 5,
.cols = 6,
- .keymap = sdp3430_keymap,
- .keymapsize = ARRAY_SIZE(sdp3430_keymap),
.rep = 1,
};
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ec6854c..d110a7f 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -80,7 +80,7 @@ static struct platform_device ldp_smsc911x_device = {
},
};
-static int ldp_twl4030_keymap[] = {
+static int board_keymap[] = {
KEY(0, 0, KEY_1),
KEY(1, 0, KEY_2),
KEY(2, 0, KEY_3),
@@ -101,11 +101,15 @@ static int ldp_twl4030_keymap[] = {
0
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data ldp_kp_twl4030_data = {
+ .keymap_data = &board_map_data,
.rows = 6,
.cols = 6,
- .keymap = ldp_twl4030_keymap,
- .keymapsize = ARRAY_SIZE(ldp_twl4030_keymap),
.rep = 1,
};
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index d50b9be..e4ec0c5 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -159,7 +159,7 @@ static struct twl4030_usb_data omap3evm_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
-static int omap3evm_keymap[] = {
+static int board_keymap[] = {
KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT),
KEY(0, 2, KEY_A),
@@ -178,11 +178,15 @@ static int omap3evm_keymap[] = {
KEY(3, 3, KEY_P)
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data omap3evm_kp_data = {
+ .keymap_data = &board_map_data,
.rows = 4,
.cols = 4,
- .keymap = omap3evm_keymap,
- .keymapsize = ARRAY_SIZE(omap3evm_keymap),
.rep = 1,
};
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index b43f6e3..7f6bf87 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -133,7 +133,7 @@ static void __init pandora_keys_gpio_init(void)
omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME);
}
-static int pandora_keypad_map[] = {
+static int board_keymap[] = {
/* col, row, code */
KEY(0, 0, KEY_9),
KEY(0, 1, KEY_0),
@@ -180,11 +180,15 @@ static int pandora_keypad_map[] = {
KEY(5, 2, KEY_FN),
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data pandora_kp_data = {
+ .keymap_data = &board_map_data,
.rows = 8,
.cols = 6,
- .keymap = pandora_keypad_map,
- .keymapsize = ARRAY_SIZE(pandora_keypad_map),
.rep = 1,
};
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index e6e8290..b45ad31 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -36,7 +36,7 @@
#define SYSTEM_REV_B_USES_VAUX3 0x1699
#define SYSTEM_REV_S_USES_VAUX3 0x8
-static int rx51_keymap[] = {
+static int board_keymap[] = {
KEY(0, 0, KEY_Q),
KEY(0, 1, KEY_W),
KEY(0, 2, KEY_E),
@@ -83,11 +83,15 @@ static int rx51_keymap[] = {
KEY(0xff, 5, KEY_F10),
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data rx51_kp_data = {
+ .keymap_data = &board_map_data,
.rows = 8,
.cols = 8,
- .keymap = rx51_keymap,
- .keymapsize = ARRAY_SIZE(rx51_keymap),
.rep = 1,
};
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 324009e..b7b3220 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -27,7 +27,7 @@
#include "mmc-twl4030.h"
/* Zoom2 has Qwerty keyboard*/
-static int zoom2_twl4030_keymap[] = {
+static int board_keymap[] = {
KEY(0, 0, KEY_E),
KEY(1, 0, KEY_R),
KEY(2, 0, KEY_T),
@@ -82,11 +82,15 @@ static int zoom2_twl4030_keymap[] = {
0
};
+static struct matrix_keymap_data board_map_data = {
+ .keymap = board_keymap,
+ .keymap_size = ARRAY_SIZE(board_keymap),
+};
+
static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
+ .keymap_data = &board_map_data,
.rows = 8,
.cols = 8,
- .keymap = zoom2_twl4030_keymap,
- .keymapsize = ARRAY_SIZE(zoom2_twl4030_keymap),
.rep = 1,
};
diff --git a/arch/arm/plat-omap/include/mach/keypad.h b/arch/arm/plat-omap/include/mach/keypad.h
index 45ea3ae..d91b9be 100644
--- a/arch/arm/plat-omap/include/mach/keypad.h
+++ b/arch/arm/plat-omap/include/mach/keypad.h
@@ -10,6 +10,8 @@
#ifndef ASMARM_ARCH_KEYPAD_H
#define ASMARM_ARCH_KEYPAD_H
+#include <linux/input/matrix_keypad.h>
+
struct omap_kp_platform_data {
int rows;
int cols;
@@ -35,9 +37,6 @@ struct omap_kp_platform_data {
#define KEY_PERSISTENT 0x00800000
#define KEYNUM_MASK 0x00EFFFFF
-#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
-#define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \
- KEY_PERSISTENT)
#endif
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 11/12] omap: Fix MMC gpio_wp for BeagleBoard C2 and above
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (9 preceding siblings ...)
2009-09-24 23:44 ` [PATCH 10/12] omap: Fix matrix_keymap_data usage Tony Lindgren
@ 2009-09-24 23:45 ` Tony Lindgren
2009-09-24 23:47 ` [PATCH 12/12] omap: rng: Use resource_size instead of manual calculation Tony Lindgren
2009-09-28 16:26 ` [PATCH 13/12] omap: mailbox: Fix wrong condition check in while loop Tony Lindgren
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Jarkko Nikula <jhnikula@gmail.com>
Earlier BeagleBoards were using pad AH8 muxed to GPIO29 for MMC write-protect.
However, this signal has been changed to pad AG9 in board revision C2.
Fix this by adding mux configuration for pad AG9, runtime check for board
revisions and set the gpio number and pad muxing accordingly.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 7 ++++++-
arch/arm/mach-omap2/mux.c | 2 ++
arch/arm/plat-omap/include/mach/mux.h | 1 +
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 500c995..70df6b4 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -139,8 +139,13 @@ static struct gpio_led gpio_leds[];
static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
+ if (system_rev >= 0x20 && system_rev <= 0x34301000) {
+ omap_cfg_reg(AG9_34XX_GPIO23);
+ mmc[0].gpio_wp = 23;
+ } else {
+ omap_cfg_reg(AH8_34XX_GPIO29);
+ }
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
- omap_cfg_reg(AH8_34XX_GPIO29);
mmc[0].gpio_cd = gpio + 0;
twl4030_mmc_init(mmc);
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 339ba80..b5fac32 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -460,6 +460,8 @@ MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
+MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee,
+ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa,
OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4,
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 4bcf8a5..0f49d2d 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -840,6 +840,7 @@ enum omap34xx_index {
*/
AF26_34XX_GPIO0,
AF22_34XX_GPIO9,
+ AG9_34XX_GPIO23,
AH8_34XX_GPIO29,
U8_34XX_GPIO54_OUT,
U8_34XX_GPIO54_DOWN,
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 12/12] omap: rng: Use resource_size instead of manual calculation
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (10 preceding siblings ...)
2009-09-24 23:45 ` [PATCH 11/12] omap: Fix MMC gpio_wp for BeagleBoard C2 and above Tony Lindgren
@ 2009-09-24 23:47 ` Tony Lindgren
2009-09-28 16:26 ` [PATCH 13/12] omap: mailbox: Fix wrong condition check in while loop Tony Lindgren
12 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2009-09-24 23:47 UTC (permalink / raw)
To: linux-arm-kernel
From: Tobias Klauser <tklauser@distanz.ch>
Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one-errors.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/char/hw_random/omap-rng.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 00dd3de..06aad08 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -116,7 +116,7 @@ static int __devinit omap_rng_probe(struct platform_device *pdev)
if (!res)
return -ENOENT;
- mem = request_mem_region(res->start, res->end - res->start + 1,
+ mem = request_mem_region(res->start, resource_size(res),
pdev->name);
if (mem == NULL) {
ret = -EBUSY;
@@ -124,7 +124,7 @@ static int __devinit omap_rng_probe(struct platform_device *pdev)
}
dev_set_drvdata(&pdev->dev, mem);
- rng_base = ioremap(res->start, res->end - res->start + 1);
+ rng_base = ioremap(res->start, resource_size(res));
if (!rng_base) {
ret = -ENOMEM;
goto err_ioremap;
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 13/12] omap: mailbox: Fix wrong condition check in while loop
2009-09-24 23:31 [PATCH 00/12] Omap fixes for 2.6.32-rc1 Tony Lindgren
` (11 preceding siblings ...)
2009-09-24 23:47 ` [PATCH 12/12] omap: rng: Use resource_size instead of manual calculation Tony Lindgren
@ 2009-09-28 16:26 ` Tony Lindgren
2009-09-28 16:39 ` [PATCH 13/12] omap: Fix wrong condition check in while loop for mailbox and iommu2 Tony Lindgren
12 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2009-09-28 16:26 UTC (permalink / raw)
To: linux-arm-kernel
Here's one more fix for this series.
Regards,
Tony
^ permalink raw reply [flat|nested] 17+ messages in thread