Skip to contentSkip to conversation

omap fixes for v2.6.32-rc5

PATCH In review Tony Lindgren 3 participants 14 messages Oct 22, 2009 – Oct 23, 2009

Subsystems (5)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover omap fixes for v2.6.32-rc5

Hi all,

Here are some omap fixes for review.

Regards,

Tony

---

Hiroshi DOYU (1):
omap: iommu: fix wrong condition check for SUPERSECTION

Janusz Krzysztofik (3):
omap1: Fix DSP public peripherals support for ams-delta
omap1: Fix redundant UARTs pin muxing that can break other hardware support
omap: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad

Kevin Hilman (1):
omap3: PM: enable UART3 module wakeups

Santosh Shilimkar (3):
omap4: Fix UART4 platform data on omap4
omap4: Allow omap_serial_early_init() for OMAP4430 board
omap: SDMA: Fix omap_stop_dma() API for channel linking

Tony Lindgren (2):
omap2: Fix console serial port number for n8x0
omap: Fix detection of n8x0

 arch/arm/configs/n8x0_defconfig              |    2 +-
 arch/arm/mach-omap1/board-ams-delta.c        |    6 ++++++
 arch/arm/mach-omap1/board-generic.c          |    8 ++++++++
 arch/arm/mach-omap1/board-innovator.c        |   20 ++++++++++++++++++++
 arch/arm/mach-omap1/board-palmte.c           |    8 ++++++++
 arch/arm/mach-omap1/board-palmtt.c           |    8 ++++++++
 arch/arm/mach-omap1/board-palmz71.c          |    8 ++++++++
 arch/arm/mach-omap1/board-sx1.c              |    8 ++++++++
 arch/arm/mach-omap1/board-voiceblue.c        |    8 ++++++++
 arch/arm/mach-omap1/serial.c                 |   26 --------------------------
 arch/arm/mach-omap2/Kconfig                  |   12 ++++++++++++
 arch/arm/mach-omap2/board-3430sdp.c          |    2 +-
 arch/arm/mach-omap2/board-4430sdp.c          |    4 ++--
 arch/arm/mach-omap2/board-ldp.c              |    2 +-
 arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
 arch/arm/mach-omap2/board-omap3pandora.c     |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 arch/arm/mach-omap2/board-rx51.c             |    1 -
 arch/arm/mach-omap2/board-zoom2.c            |    2 +-
 arch/arm/mach-omap2/io.c                     |    2 ++
 arch/arm/mach-omap2/pm34xx.c                 |    7 ++++---
 arch/arm/mach-omap2/serial.c                 |   10 ----------
 arch/arm/plat-omap/dma.c                     |   18 ++++++++----------
 arch/arm/plat-omap/include/mach/keypad.h     |    5 ++++-
 arch/arm/plat-omap/iommu.c                   |    2 +-
 25 files changed, 114 insertions(+), 61 deletions(-)
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/10 omap: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad

From: Janusz Krzysztofik <[email protected]>

Only mach-omap2 boards are currently using matrix_keypad. Allow mach-omap1 boards to use the old style keypad.h without breaking.

Created against linux-2.6.32-rc5.
Compile tested with omap_3430sdp_defconfig and rx51_defconfig.

---
 arch/arm/mach-omap2/board-3430sdp.c          |    2 +-
 arch/arm/mach-omap2/board-ldp.c              |    2 +-
 arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
 arch/arm/mach-omap2/board-omap3pandora.c     |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 arch/arm/mach-omap2/board-rx51.c             |    1 -
 arch/arm/mach-omap2/board-zoom2.c            |    2 +-
 arch/arm/plat-omap/include/mach/keypad.h     |    5 ++++-
 8 files changed, 10 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -1
index efaf053..0acb556 100644
@@ -17,6 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
@@ -38,7 +39,6 @@
 #include <mach/gpmc.h>
 
 #include <mach/control.h>
-#include <mach/keypad.h>
 #include <mach/gpmc-smc91x.h>
 
 #include "sdram-qimonda-hyb18m512160af-6.h"
arch/arm/mach-omap2/board-ldp.c +1 -1
index d110a7f..d57ec2f 100644
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/gpio_keys.h>
 #include <linux/workqueue.h>
 #include <linux/err.h>
@@ -41,7 +42,6 @@
 #include <asm/delay.h>
 #include <mach/control.h>
 #include <mach/usb.h>
-#include <mach/keypad.h>
 
 #include "mmc-twl4030.h"
 
arch/arm/mach-omap2/board-omap3evm.c +1 -1
index e4ec0c5..4c4d7f8 100644
@@ -20,6 +20,7 @@
 #include <linux/clk.h>
 #include <linux/gpio.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/leds.h>
 
 #include <linux/spi/spi.h>
@@ -37,7 +38,6 @@
 #include <mach/usb.h>
 #include <mach/common.h>
 #include <mach/mcspi.h>
-#include <mach/keypad.h>
 
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "mmc-twl4030.h"
arch/arm/mach-omap2/board-omap3pandora.c +1 -1
index 7f6bf87..5326e0d 100644
@@ -27,6 +27,7 @@
 #include <linux/i2c/twl4030.h>
 #include <linux/leds.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/gpio_keys.h>
 
 #include <asm/mach-types.h>
@@ -39,7 +40,6 @@
 #include <mach/hardware.h>
 #include <mach/mcspi.h>
 #include <mach/usb.h>
-#include <mach/keypad.h>
 #include <mach/mux.h>
 
 #include "sdram-micron-mt46h32m32lf-6.h"
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -1
index 2b0eb1b..e34d96a 100644
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/spi/spi.h>
 #include <linux/i2c.h>
 #include <linux/i2c/twl4030.h>
@@ -27,7 +28,6 @@
 #include <mach/common.h>
 #include <mach/dma.h>
 #include <mach/gpmc.h>
-#include <mach/keypad.h>
 #include <mach/onenand.h>
 #include <mach/gpmc-smc91x.h>
 
arch/arm/mach-omap2/board-rx51.c +0 -1
index f9196c3..78869a9 100644
@@ -26,7 +26,6 @@
 #include <mach/mux.h>
 #include <mach/board.h>
 #include <mach/common.h>
-#include <mach/keypad.h>
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 #include <mach/usb.h>
arch/arm/mach-omap2/board-zoom2.c +1 -1
index fd3369d..ea00486 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/gpio.h>
 #include <linux/i2c/twl4030.h>
 #include <linux/regulator/machine.h>
@@ -22,7 +23,6 @@
 
 #include <mach/common.h>
 #include <mach/usb.h>
-#include <mach/keypad.h>
 
 #include "mmc-twl4030.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
arch/arm/plat-omap/include/mach/keypad.h +4 -1
index d91b9be..3ae52cc 100644
@@ -10,7 +10,7 @@
 #ifndef ASMARM_ARCH_KEYPAD_H
 #define ASMARM_ARCH_KEYPAD_H
 
-#include <linux/input/matrix_keypad.h>
+#warning: Please update the board to use matrix_keypad.h instead
 
 struct omap_kp_platform_data {
 	int rows;
@@ -37,6 +37,9 @@ 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
 
author maintainer
#2 lore raw

PATCH 2/10 omap: SDMA: Fix omap_stop_dma() API for channel linking

In reply to Tony Lindgren

From: Santosh Shilimkar <[email protected]>

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used in linking scenario.

The DMA channel needs to be disabled before resetting the chain. Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.

---
 arch/arm/plat-omap/dma.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
arch/arm/plat-omap/dma.c +8 -10
index 0eb676d..b53125f 100644
@@ -978,6 +978,14 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable all interrupts on the channel */
+	if (cpu_class_is_omap1())
+		dma_write(0, CICR(lch));
+
+	l = dma_read(CCR(lch));
+	l &= ~OMAP_DMA_CCR_EN;
+	dma_write(l, CCR(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch = lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -995,18 +1003,8 @@ void omap_stop_dma(int lch)
 			next_lch = dma_chan[cur_lch].next_lch;
 			cur_lch = next_lch;
 		} while (next_lch != -1);
-
-		return;
 	}
 
-	/* Disable all interrupts on the channel */
-	if (cpu_class_is_omap1())
-		dma_write(0, CICR(lch));
-
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);
author maintainer
#3 lore raw

PATCH 3/10 omap: iommu: fix wrong condition check for SUPERSECTION

In reply to Tony Lindgren

From: Hiroshi DOYU <[email protected]>

A bit (2 << 0) is set both on SECTION and SUPERSECTION. To identify SUPERSECTION correctly, other bits should be compared too.

---
 arch/arm/plat-omap/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/iommu.c +1 -1
index 4b60127..94584f1 100644
@@ -664,7 +664,7 @@ static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da)
 		nent = 1; /* for the next L1 entry */
 	} else {
 		bytes = IOPGD_SIZE;
-		if (*iopgd & IOPGD_SUPER) {
+		if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) {
 			nent *= 16;
 			/* rewind to the 1st entry */
 			iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);
author maintainer
#4 lore raw

PATCH 4/10 omap1: Fix redundant UARTs pin muxing that can break other hardware support

In reply to Tony Lindgren

From: Janusz Krzysztofik <[email protected]>

Commit 15ac408ee5a509053a765b816e9179515329369f removed enabled_uart and OMAP_TAG_UART. This works for mach-omap2, but causes issues on mach-omap1 for some boards as the mach-omap1 serial.c was muxing pins based on the enabled_uart flag for 15xx.

Fix this by muxing pins in board-*.c files for the 15xx boards for the uart ports that had enabled_uart flag set before the commit above.

Tested on Amsdtrad Delta only.

Note that in the future we should add support for powering down the uarts with a timer like mach-omap2/serial.c does. Otherwise the enabled uarts will be blocking retention-while-idle.

---
 arch/arm/mach-omap1/board-ams-delta.c |    4 ++++
 arch/arm/mach-omap1/board-generic.c   |    8 ++++++++
 arch/arm/mach-omap1/board-innovator.c |   20 ++++++++++++++++++++
 arch/arm/mach-omap1/board-palmte.c    |    8 ++++++++
 arch/arm/mach-omap1/board-palmtt.c    |    8 ++++++++
 arch/arm/mach-omap1/board-palmz71.c   |    8 ++++++++
 arch/arm/mach-omap1/board-sx1.c       |    8 ++++++++
 arch/arm/mach-omap1/board-voiceblue.c |    8 ++++++++
 arch/arm/mach-omap1/serial.c          |   26 --------------------------
 9 files changed, 72 insertions(+), 26 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +4 -0
index 42920f9..972499e 100644
@@ -219,6 +219,10 @@ static struct platform_device *ams_delta_devices[] __initdata = {
 
 static void __init ams_delta_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+
 	iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
 
 	omap_board_config = ams_delta_config;
arch/arm/mach-omap1/board-generic.c +8 -0
index fb47239..6c8a41f 100644
@@ -64,6 +64,14 @@ static void __init omap_generic_init(void)
 {
 #ifdef CONFIG_ARCH_OMAP15XX
 	if (cpu_is_omap15xx()) {
+		/* mux pins for uarts */
+		omap_cfg_reg(UART1_TX);
+		omap_cfg_reg(UART1_RTS);
+		omap_cfg_reg(UART2_TX);
+		omap_cfg_reg(UART2_RTS);
+		omap_cfg_reg(UART3_TX);
+		omap_cfg_reg(UART3_RX);
+
 		omap_usb_init(&generic1510_usb_config);
 	}
 #endif
arch/arm/mach-omap1/board-innovator.c +20 -0
index cc2abbb..cd6c395 100644
@@ -376,6 +376,26 @@ static void __init innovator_init(void)
 {
 #ifdef CONFIG_ARCH_OMAP15XX
 	if (cpu_is_omap1510()) {
+		unsigned char reg;
+
+		/* mux pins for uarts */
+		omap_cfg_reg(UART1_TX);
+		omap_cfg_reg(UART1_RTS);
+		omap_cfg_reg(UART2_TX);
+		omap_cfg_reg(UART2_RTS);
+		omap_cfg_reg(UART3_TX);
+		omap_cfg_reg(UART3_RX);
+
+		reg = fpga_read(OMAP1510_FPGA_POWER);
+		reg |= OMAP1510_FPGA_PCR_COM1_EN;
+		fpga_write(reg, OMAP1510_FPGA_POWER);
+		udelay(10);
+
+		reg = fpga_read(OMAP1510_FPGA_POWER);
+		reg |= OMAP1510_FPGA_PCR_COM2_EN;
+		fpga_write(reg, OMAP1510_FPGA_POWER);
+		udelay(10);
+
 		platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
 		spi_register_board_info(innovator1510_boardinfo,
 				ARRAY_SIZE(innovator1510_boardinfo));
arch/arm/mach-omap1/board-palmte.c +8 -0
index 90dd043..4de2584 100644
@@ -342,6 +342,14 @@ static void __init palmte_misc_gpio_setup(void)
 
 static void __init omap_palmte_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+	omap_cfg_reg(UART2_TX);
+	omap_cfg_reg(UART2_RTS);
+	omap_cfg_reg(UART3_TX);
+	omap_cfg_reg(UART3_RX);
+
 	omap_board_config = palmte_config;
 	omap_board_config_size = ARRAY_SIZE(palmte_config);
 
arch/arm/mach-omap1/board-palmtt.c +8 -0
index 8256139..d972cf9 100644
@@ -289,6 +289,14 @@ static void __init omap_mpu_wdt_mode(int mode) {
 
 static void __init omap_palmtt_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+	omap_cfg_reg(UART2_TX);
+	omap_cfg_reg(UART2_RTS);
+	omap_cfg_reg(UART3_TX);
+	omap_cfg_reg(UART3_RX);
+
 	omap_mpu_wdt_mode(0);
 
 	omap_board_config = palmtt_config;
arch/arm/mach-omap1/board-palmz71.c +8 -0
index 81b6bde..986bd4d 100644
@@ -307,6 +307,14 @@ palmz71_gpio_setup(int early)
 static void __init
 omap_palmz71_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+	omap_cfg_reg(UART2_TX);
+	omap_cfg_reg(UART2_RTS);
+	omap_cfg_reg(UART3_TX);
+	omap_cfg_reg(UART3_RX);
+
 	palmz71_gpio_setup(1);
 	omap_mpu_wdt_mode(0);
 
arch/arm/mach-omap1/board-sx1.c +8 -0
index 02c85ca..056ae64 100644
@@ -377,6 +377,14 @@ static struct omap_board_config_kernel sx1_config[] __initdata = {
 
 static void __init omap_sx1_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+	omap_cfg_reg(UART2_TX);
+	omap_cfg_reg(UART2_RTS);
+	omap_cfg_reg(UART3_TX);
+	omap_cfg_reg(UART3_RX);
+
 	platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices));
 
 	omap_board_config = sx1_config;
arch/arm/mach-omap1/board-voiceblue.c +8 -0
index c06e7a5..07b0752 100644
@@ -152,6 +152,14 @@ static void __init voiceblue_init_irq(void)
 
 static void __init voiceblue_init(void)
 {
+	/* mux pins for uarts */
+	omap_cfg_reg(UART1_TX);
+	omap_cfg_reg(UART1_RTS);
+	omap_cfg_reg(UART2_TX);
+	omap_cfg_reg(UART2_RTS);
+	omap_cfg_reg(UART3_TX);
+	omap_cfg_reg(UART3_RX);
+
 	/* Watchdog */
 	gpio_request(0, "Watchdog");
 	/* smc91x reset */
arch/arm/mach-omap1/serial.c +0 -26
index d496e50..d23979b 100644
@@ -131,8 +131,6 @@ void __init omap_serial_init(void)
 	}
 
 	for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
-		unsigned char reg;
-
 		switch (i) {
 		case 0:
 			uart1_ck = clk_get(NULL, "uart1_ck");
@@ -143,16 +141,6 @@ void __init omap_serial_init(void)
 				if (cpu_is_omap15xx())
 					clk_set_rate(uart1_ck, 12000000);
 			}
-			if (cpu_is_omap15xx()) {
-				omap_cfg_reg(UART1_TX);
-				omap_cfg_reg(UART1_RTS);
-				if (machine_is_omap_innovator()) {
-					reg = fpga_read(OMAP1510_FPGA_POWER);
-					reg |= OMAP1510_FPGA_PCR_COM1_EN;
-					fpga_write(reg, OMAP1510_FPGA_POWER);
-					udelay(10);
-				}
-			}
 			break;
 		case 1:
 			uart2_ck = clk_get(NULL, "uart2_ck");
@@ -165,16 +153,6 @@ void __init omap_serial_init(void)
 				else
 					clk_set_rate(uart2_ck, 48000000);
 			}
-			if (cpu_is_omap15xx()) {
-				omap_cfg_reg(UART2_TX);
-				omap_cfg_reg(UART2_RTS);
-				if (machine_is_omap_innovator()) {
-					reg = fpga_read(OMAP1510_FPGA_POWER);
-					reg |= OMAP1510_FPGA_PCR_COM2_EN;
-					fpga_write(reg, OMAP1510_FPGA_POWER);
-					udelay(10);
-				}
-			}
 			break;
 		case 2:
 			uart3_ck = clk_get(NULL, "uart3_ck");
@@ -185,10 +163,6 @@ void __init omap_serial_init(void)
 				if (cpu_is_omap15xx())
 					clk_set_rate(uart3_ck, 12000000);
 			}
-			if (cpu_is_omap15xx()) {
-				omap_cfg_reg(UART3_TX);
-				omap_cfg_reg(UART3_RX);
-			}
 			break;
 		}
 		omap_serial_reset(&serial_platform_data[i]);
author maintainer
#5 lore raw

PATCH 5/10 omap1: Fix DSP public peripherals support for ams-delta

In reply to Tony Lindgren

From: Janusz Krzysztofik <[email protected]>

DSP public peripherals used to work on OMAP1510 based (or all OMAP1 class?) machines as long as old dspgateway code were present in the l-o tree. For several months it is no longer included, breaking support for McBSP1 based audio on Amstrad Delta, for example.

This patch, derived from the old dspgateway code, corrects the problem for the board by simply taking the DSP out of reset state, I guess. That way, things should not break when a new dsp code is added to the tree, and the change can be reverted then.

If there are any reports on McBSP1 or other DSP public peripherals not working for other OMAP1 machines (I've not heard of any for now), I can prepare a more general patch providing an extra include file with a helper function defined.

Created and tested against linux-2.6.32-rc5

---
 arch/arm/mach-omap1/board-ams-delta.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +2 -0
index 972499e..8ad5cc3 100644
@@ -235,6 +235,8 @@ static void __init ams_delta_init(void)
 
 	omap_usb_init(&ams_delta_usb_config);
 	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
+
+	omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);
 }
 
 static struct plat_serial8250_port ams_delta_modem_ports[] = {
#6 lore raw

Re: [PATCH 05/10] omap1: Fix DSP public peripherals support for ams-delta

Quoted 11 lines · Tony Lindgren

From: Janusz Krzysztofik <[email protected]>

DSP public peripherals used to work on OMAP1510 based (or all OMAP1 class?) machines as long as old dspgateway code were present in the l-o tree. For several months it is no longer included, breaking support for McBSP1 based audio on Amstrad Delta, for example.

This patch, derived from the old dspgateway code, corrects the problem for the board by simply taking the DSP out of reset state, I guess. That way, things should not break when a new dsp code is added to the tree, and the change can be reverted then.

A minor comment/correction here. Although this bit is called "DSP_RST" this does not actually release the DSP from reset. This bit actually releases the reset for the "priority registers (TIPB module), EMIF configuration registers, and the MPUI control logic (partially) in the DSP", thus allowing you to access the DSP peripherals via the MPUI. Bit 1 of the same register, called "DSP_EN", actually releases the DSP reset.

Quoted 3 lines

If there are any reports on McBSP1 or other DSP public peripherals not working for other OMAP1 machines (I've not heard of any for now), I can prepare a more general patch providing an extra include file with a helper function defined.

This would be necessary for all OMAP15xx based devices that use McBSP1 (or McBSP3 for that matter). However, I am not sure if it is common for other boards to use McBSP1 for audio.

Jon

author maintainer
#7 lore raw

Re: [PATCH 05/10] omap1: Fix DSP public peripherals support for ams-delta

Quoted 14 lines · Jon Hunter
Quoted 11 lines · Tony Lindgren

From: Janusz Krzysztofik <[email protected]>

DSP public peripherals used to work on OMAP1510 based (or all OMAP1 class?) machines as long as old dspgateway code were present in the l-o tree. For several months it is no longer included, breaking support for McBSP1 based audio on Amstrad Delta, for example.

This patch, derived from the old dspgateway code, corrects the problem for the board by simply taking the DSP out of reset state, I guess. That way, things should not break when a new dsp code is added to the tree, and the change can be reverted then.

Quoted 6 lines

A minor comment/correction here. Although this bit is called "DSP_RST" this does not actually release the DSP from reset. This bit actually releases the reset for the "priority registers (TIPB module), EMIF configuration registers, and the MPUI control logic (partially) in the DSP", thus allowing you to access the DSP peripherals via the MPUI. Bit 1 of the same register, called "DSP_EN", actually releases the DSP reset.

Thanks for clarifying that.

Quoted 7 lines
Quoted 3 lines

If there are any reports on McBSP1 or other DSP public peripherals not working for other OMAP1 machines (I've not heard of any for now), I can prepare a more general patch providing an extra include file with a helper function defined.

This would be necessary for all OMAP15xx based devices that use McBSP1 (or McBSP3 for that matter). However, I am not sure if it is common for other boards to use McBSP1 for audio.

Yeah, I guess currently only board-ams-delta.c needs this for audio. But that could of course change once there are more 15xx boards using ASoC.

Regards,

Tony

#8 lore raw

Re: [PATCH 05/10] omap1: Fix DSP public peripherals support for ams-delta

Friday 23 October 2009 21:19:40 Tony Lindgren napisa?(a):

Quoted 15 lines · Jon Hunter
Quoted 14 lines
Quoted 11 lines · Tony Lindgren

From: Janusz Krzysztofik <[email protected]>

DSP public peripherals used to work on OMAP1510 based (or all OMAP1 class?) machines as long as old dspgateway code were present in the l-o tree. For several months it is no longer included, breaking support for McBSP1 based audio on Amstrad Delta, for example.

This patch, derived from the old dspgateway code, corrects the problem for the board by simply taking the DSP out of reset state, I guess. That way, things should not break when a new dsp code is added to the tree, and the change can be reverted then.

Quoted 8 lines
Quoted 6 lines

A minor comment/correction here. Although this bit is called "DSP_RST" this does not actually release the DSP from reset. This bit actually releases the reset for the "priority registers (TIPB module), EMIF configuration registers, and the MPUI control logic (partially) in the DSP", thus allowing you to access the DSP peripherals via the MPUI. Bit 1 of the same register, called "DSP_EN", actually releases the DSP reset.

Thanks for clarifying that.

Forgive me my ignorance: do you think that there is still an option of putting any related piece of hardware in an idle state, as you, Tony, has suggested before for the DSP itslef?

Thanks,
Janusz

author maintainer
#9 lore raw

PATCH 6/10 omap: Fix detection of n8x0

In reply to Tony Lindgren

Otherwise the machine_is_nokia_n8*() does not work.

---
 arch/arm/mach-omap2/Kconfig |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +12 -0
index 75b1c7e..aad194f 100644
@@ -73,9 +73,21 @@ config MACH_OMAP_3430SDP
 	bool "OMAP 3430 SDP board"
 	depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_NOKIA_N800
+       bool
+
+config MACH_NOKIA_N810
+       bool
+
+config MACH_NOKIA_N810_WIMAX
+       bool
+
 config MACH_NOKIA_N8X0
 	bool "Nokia N800/N810"
 	depends on ARCH_OMAP2420
+	select MACH_NOKIA_N800
+	select MACH_NOKIA_N810
+	select MACH_NOKIA_N810_WIMAX
 
 config MACH_NOKIA_RX51
 	bool "Nokia RX-51 board"
author maintainer
#10 lore raw

PATCH 7/10 omap2: Fix console serial port number for n8x0

In reply to Tony Lindgren

With the recent changes omap serial ports match the physical numbering like they should. Fix the kernel CMDLINE accordingly so console works.

---
 arch/arm/configs/n8x0_defconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/configs/n8x0_defconfig +1 -1
index 8da75de..264f52b 100644
@@ -304,7 +304,7 @@ CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ZBOOT_ROM_TEXT=0x10C08000
 CONFIG_ZBOOT_ROM_BSS=0x10200000
 # CONFIG_ZBOOT_ROM is not set
-CONFIG_CMDLINE="root=1f03 rootfstype=jffs2 console=ttyS0,115200n8"
+CONFIG_CMDLINE="root=1f03 rootfstype=jffs2 console=ttyS2,115200n8"
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
 
author maintainer
#11 lore raw

PATCH 8/10 omap3: PM: enable UART3 module wakeups

In reply to Tony Lindgren

From: Kevin Hilman <[email protected]>

UART3 is in the PER powerdomain. If PER goes idle/inactive independently of CORE, for UART3 to wakeup it must have its wakeup enable bits setup in PM_WKEN_PER. This patch enables these bits.

The reason it works when PER and CORE work together is because when CORE goes inactive/retention, the IOPAD wakeups are enabled and trigger UART3 wakeup.

Without this patch, when the UART inactivity timer fires for UART3, its clocks are disabled and it's unable to wakeup so will be unusable until PER is awoken by another source.

Another way of testing is by keeping CORE on during suspend but allowing PER to hit retention

  # echo 3 > /debug/pm_debug/core_pwrdm/suspend

then enter suspend

  # echo mem > /sys/power/state

Without this patch, UART3 will be unable to wakeup the system.

---
 arch/arm/mach-omap2/pm34xx.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm34xx.c +4 -3
index 378c2f6..8946319 100644
@@ -639,14 +639,15 @@ static void __init prcm_setup_regs(void)
 	prm_write_mod_reg(OMAP3430_IO_EN | OMAP3430_WKUP_EN,
 			  OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET);
 
-	/* Enable GPIO wakeups in PER */
+	/* Enable wakeups in PER */
 	prm_write_mod_reg(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_EN_GPIO6, OMAP3430_PER_MOD, PM_WKEN);
+			  OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3,
+			  OMAP3430_PER_MOD, PM_WKEN);
 	/* and allow them to wake up MPU */
 	prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_GRPSEL_GPIO6,
+			  OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3,
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
author maintainer
#12 lore raw

PATCH 9/10 omap4: Allow omap_serial_early_init() for OMAP4430 board

In reply to Tony Lindgren

From: Santosh Shilimkar <[email protected]>

This patch enables omap_serial_early_init() function for OMAP4430 SDP. Without this the bootup would throw oops in omap_serial_init().

Note that the ifndef CONFIG_ARCH_OMAP4 is split into two sections to enable omap_serial_early_init(). This ifndef cannot be removed until omap4 clock framework is implemented.

---
 arch/arm/mach-omap2/board-4430sdp.c |    4 ++--
 arch/arm/mach-omap2/io.c            |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +2 -2
index eb37c40..609a5a4 100644
@@ -58,6 +58,8 @@ static void __init gic_init_irq(void)
 
 static void __init omap_4430sdp_init_irq(void)
 {
+	omap_board_config = sdp4430_config;
+	omap_board_config_size = ARRAY_SIZE(sdp4430_config);
 	omap2_init_common_hw(NULL, NULL);
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(1);
@@ -70,8 +72,6 @@ static void __init omap_4430sdp_init_irq(void)
 static void __init omap_4430sdp_init(void)
 {
 	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
-	omap_board_config = sdp4430_config;
-	omap_board_config_size = ARRAY_SIZE(sdp4430_config);
 	omap_serial_init();
 }
 
arch/arm/mach-omap2/io.c +2 -0
index e3a3bad..56be87d 100644
@@ -302,7 +302,9 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 	pwrdm_init(powerdomains_omap);
 	clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
 	omap2_clk_init();
+#endif
 	omap_serial_early_init();
+#ifndef CONFIG_ARCH_OMAP4
 	omap_hwmod_late_init();
 	omap_pm_if_init();
 	omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
author maintainer
#13 lore raw

PATCH 10/10 omap4: Fix UART4 platform data on omap4

In reply to Tony Lindgren

From: Santosh Shilimkar <[email protected]>

This patch removes the unnecessary UART4 platform which is under data is wrong because of this

There is a separate platform structure for UART4

---
 arch/arm/mach-omap2/serial.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/serial.c +0 -10
index ae21868..54dfeb5 100644
@@ -109,16 +109,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
 		.regshift	= 2,
 		.uartclk	= OMAP24XX_BASE_BAUD * 16,
 	}, {
-#ifdef CONFIG_ARCH_OMAP4
-		.membase	= OMAP2_IO_ADDRESS(OMAP_UART4_BASE),
-		.mapbase	= OMAP_UART4_BASE,
-		.irq		= 70,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.iotype		= UPIO_MEM,
-		.regshift	= 2,
-		.uartclk	= OMAP24XX_BASE_BAUD * 16,
-	}, {
-#endif
 		.flags		= 0
 	}
 };