[RESUBMIT][PATCH 1/7] OMAP4: Create architecture macros and config entries.

2009-05-07 Thread Santosh Shilimkar
This patch creates the architectural macros for OMAP4. The MULTI_OMAP
build is not yet supported by OMAP4.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/mach-omap2/Kconfig   |6 +-
 arch/arm/plat-omap/Kconfig|   11 ---
 arch/arm/plat-omap/include/mach/cpu.h |   21 +++--
 3 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 64ab386..81bbc1e 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -25,7 +25,7 @@ config ARCH_OMAP3430
select ARCH_OMAP_OTG
 
 comment OMAP Board Type
-   depends on ARCH_OMAP2 || ARCH_OMAP3
+   depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4
 
 config MACH_OMAP_GENERIC
bool Generic OMAP board
@@ -67,3 +67,7 @@ config MACH_OMAP_3430SDP
 config MACH_NOKIA_RX51
bool Nokia RX-51 board
depends on ARCH_OMAP3  ARCH_OMAP34XX
+
+config MACH_OMAP_4430SDP
+   bool OMAP 4430 SDP board
+   depends on ARCH_OMAP4
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 9dd68fa..89499e6 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -23,6 +23,11 @@ config ARCH_OMAP3
select CPU_V7
select COMMON_CLKDEV
 
+config ARCH_OMAP4
+   bool TI OMAP4
+   select CPU_V7
+   select ARM_GIC
+
 endchoice
 
 comment OMAP Feature Selections
@@ -128,13 +133,13 @@ config OMAP_MPU_TIMER
 
 config OMAP_32K_TIMER
bool Use 32KHz timer
-   depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX
+   depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX || ARCH_OMAP4
help
  Select this option if you want to enable the OMAP 32KHz timer.
  This timer saves power compared to the OMAP_MPU_TIMER, and has
  support for no tick during idle. The 32KHz timer provides less
  intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
- currently only available for OMAP16XX, 24XX and 34XX.
+ currently only available for OMAP16XX, 24XX, 34XX and OMAP4.
 
 endchoice
 
@@ -149,7 +154,7 @@ config OMAP_32K_TIMER_HZ
 
 config OMAP_DM_TIMER
bool Use dual-mode timer
-   depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX
+   depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX || ARCH_OMAP4
help
 Select this option if you want to use OMAP Dual-Mode timers.
 
diff --git a/arch/arm/plat-omap/include/mach/cpu.h 
b/arch/arm/plat-omap/include/mach/cpu.h
index 98b1442..fc60c4e 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -5,8 +5,12 @@
  *
  * Copyright (C) 2004, 2008 Nokia Corporation
  *
+ * Copyright (C) 2009 Texas Instruments.
+ *
  * Written by Tony Lindgren tony.lindg...@nokia.com
  *
+ * Added OMAP4 specific defines - Santosh Shilimkarsantosh.shilim...@ti.com
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -155,6 +159,8 @@ IS_OMAP_SUBCLASS(343x, 0x343)
 #define cpu_is_omap243x()  0
 #define cpu_is_omap34xx()  0
 #define cpu_is_omap343x()  0
+#define cpu_is_omap44xx()  0
+#define cpu_is_omap443x()  0
 
 #if defined(MULTI_OMAP1)
 # if defined(CONFIG_ARCH_OMAP730)
@@ -348,12 +354,21 @@ IS_OMAP_TYPE(3430, 0x3430)
 # define cpu_is_omap3430() is_omap3430()
 #endif
 
+# if defined(CONFIG_ARCH_OMAP4)
+# undef cpu_is_omap44xx
+# undef cpu_is_omap443x
+# define cpu_is_omap44xx() 1
+# define cpu_is_omap443x() 1
+# endif
+
 /* Macros to detect if we have OMAP1 or OMAP2 */
 #define cpu_class_is_omap1()   (cpu_is_omap7xx() || cpu_is_omap15xx() || \
cpu_is_omap16xx())
-#define cpu_class_is_omap2()   (cpu_is_omap24xx() || cpu_is_omap34xx())
+#define cpu_class_is_omap2()   (cpu_is_omap24xx() || cpu_is_omap34xx() || \
+   cpu_is_omap44xx())
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+   defined(CONFIG_ARCH_OMAP4)
 
 /* Various silicon revisions for omap2 */
 #define OMAP242X_CLASS 0x24200024
@@ -370,6 +385,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES3_0 0x34303034
 #define OMAP3430_REV_ES3_1 0x34304034
 
+#define OMAP443X_CLASS 0x44300034
+
 /*
  * omap_chip bits
  *
-- 
1.5.4.7

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


[RESUBMIT][PATCH 4/7] OMAP4: Update common omap platform common sources.

2009-05-07 Thread Santosh Shilimkar
This patch updates the common platform source  files for OMAP4430.
Few OMAP4 peripherals are common with OMAP3 architecture.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/plat-omap/common.c  |   29 +-
 arch/arm/plat-omap/devices.c |2 +
 arch/arm/plat-omap/dma.c |   21 +--
 arch/arm/plat-omap/dmtimer.c |   59 +-
 arch/arm/plat-omap/gpio.c|  134 +++---
 arch/arm/plat-omap/io.c  |   30 +-
 arch/arm/plat-omap/mux.c |3 +
 arch/arm/plat-omap/sram.c|   23 +++
 8 files changed, 257 insertions(+), 44 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index d179714..06cb281 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -3,6 +3,9 @@
  *
  * Code common to all OMAP machines.
  *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -177,7 +180,8 @@ console_initcall(omap_add_serial_console);
 
 #if defined(CONFIG_ARCH_OMAP16XX)
 #define TIMER_32K_SYNCHRONIZED 0xfffbc410
-#elif defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
+#elif defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \
+   defined(CONFIG_ARCH_OMAP4)
 #define TIMER_32K_SYNCHRONIZED (OMAP2_32KSYNCT_BASE + 0x10)
 #endif
 
@@ -309,3 +313,26 @@ void __init omap2_set_globals_343x(void)
 }
 #endif
 
+#if defined(CONFIG_ARCH_OMAP4)
+static struct omap_globals *omap4_globals;
+
+static void __init __omap4_set_globals(void)
+{
+   omap2_set_globals_tap(omap4_globals);
+   omap2_set_globals_control(omap4_globals);
+}
+static struct omap_globals omap443x_globals = {
+   .class  = OMAP443X_CLASS,
+   .tap= OMAP2_IO_ADDRESS(0x4830A000),
+   .ctrl   = OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
+   .prm= OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
+   .cm = OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
+};
+
+void __init omap2_set_globals_443x(void)
+{
+   omap4_globals = omap443x_globals;
+   __omap4_set_globals();
+}
+#endif
+
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 87fb7ff..a016c6c 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -311,6 +311,8 @@ static void omap_init_wdt(void)
wdt_resources[0].start = 0x49016000; /* WDT2 */
else if (cpu_is_omap343x())
wdt_resources[0].start = 0x48314000; /* WDT2 */
+   else if (cpu_is_omap44xx())
+   wdt_resources[0].start = 0x4A314000;
else
return;
 
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 21cc014..24f8d35 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -10,6 +10,9 @@
  * Merged to support both OMAP1 and OMAP2 by Tony Lindgren t...@atomide.com
  * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
  *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com
+ *
  * Support functions for the OMAP internal DMA channels.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -852,7 +855,7 @@ omap_dma_set_prio_lch(int lch, unsigned char read_prio,
}
l = dma_read(CCR(lch));
l = ~((1  6) | (1  26));
-   if (cpu_is_omap2430() || cpu_is_omap34xx())
+   if (cpu_is_omap2430() || cpu_is_omap34xx() ||  cpu_is_omap44xx())
l |= ((read_prio  0x1)  6) | ((write_prio  0x1)  26);
else
l |= ((read_prio  0x1)  6);
@@ -1824,7 +1827,8 @@ static irqreturn_t omap1_dma_irq_handler(int irq, void 
*dev_id)
 #define omap1_dma_irq_handler  NULL
 #endif
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+   defined(CONFIG_ARCH_OMAP4)
 
 static int omap2_dma_handle_ch(int ch)
 {
@@ -2319,6 +2323,9 @@ static int __init omap_init_dma(void)
} else if (cpu_is_omap34xx()) {
omap_dma_base = IO_ADDRESS(OMAP34XX_DMA4_BASE);
dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
+   } else if (cpu_is_omap44xx()) {
+   omap_dma_base = IO_ADDRESS(OMAP44XX_DMA4_BASE);
+   dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
} else {
pr_err(DMA init failed for unsupported omap\n);
return -ENODEV;
@@ -2417,12 +2424,16 @@ static int __init omap_init_dma(void)
}
}
 
-   if (cpu_is_omap2430() || cpu_is_omap34xx())
+   if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx())
omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE,
 

[RESUBMIT][PATCH 2/7] OMAP4: Create board support for OMAP_4430SDP.

2009-05-07 Thread Santosh Shilimkar
This patch creates the bare minimal board files  to support
OMAP_4430SDP. Additinaly new omap44xx.h is created which contains
the base addresses for OMAP4430.File omap34xx.h is adapted to avoid
multiple definitions of common omap base address definitions.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/mach-omap2/board-4430sdp.c|   91 
 arch/arm/plat-omap/include/mach/hardware.h |1 +
 arch/arm/plat-omap/include/mach/omap34xx.h |   10 ++--
 arch/arm/plat-omap/include/mach/omap44xx.h |   61 +++
 4 files changed, 158 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-4430sdp.c
 create mode 100644 arch/arm/plat-omap/include/mach/omap44xx.h

diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
new file mode 100644
index 000..157e9e4
--- /dev/null
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -0,0 +1,91 @@
+/*
+ * Board support file for OMAP4430 SDP.
+ *
+ * Copyright (C) 2009 Texas Instruments
+ *
+ * Author: Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * Based on mach-omap2/board-3430sdp.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/io.h
+
+#include mach/hardware.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include mach/gpio.h
+#include mach/board.h
+#include mach/common.h
+#include mach/control.h
+#include asm/hardware/gic.h
+
+static struct platform_device sdp4430_lcd_device = {
+   .name   = sdp4430_lcd,
+   .id = -1,
+};
+
+static struct platform_device *sdp4430_devices[] __initdata = {
+   sdp4430_lcd_device,
+};
+
+static struct omap_uart_config sdp4430_uart_config __initdata = {
+   .enabled_uarts  = ((1  0) | (1  1) | (1  2)),
+};
+
+static struct omap_lcd_config sdp4430_lcd_config __initdata = {
+   .ctrl_name  = internal,
+};
+
+static struct omap_board_config_kernel sdp4430_config[] __initdata = {
+   { OMAP_TAG_UART,sdp4430_uart_config },
+   { OMAP_TAG_LCD, sdp4430_lcd_config },
+};
+
+static void __init gic_init_irq(void)
+{
+   gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
+   gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
+}
+
+static void __init omap_4430sdp_init_irq(void)
+{
+   omap2_init_common_hw(NULL);
+   gic_init_irq();
+   omap_gpio_init();
+}
+
+
+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();
+
+}
+
+static void __init omap_4430sdp_map_io(void)
+{
+   omap2_set_globals_443x();
+   omap2_map_common_io();
+}
+
+MACHINE_START(OMAP_4430SDP, OMAP4430 4430SDP board)
+   /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xd800)  18)  0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_4430sdp_map_io,
+   .init_irq   = omap_4430sdp_init_irq,
+   .init_machine   = omap_4430sdp_init,
+   .timer  = omap_timer,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 3dc423e..26c1fbf 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -285,5 +285,6 @@
 #include omap16xx.h
 #include omap24xx.h
 #include omap34xx.h
+#include omap44xx.h
 
 #endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/arch/arm/plat-omap/include/mach/omap34xx.h 
b/arch/arm/plat-omap/include/mach/omap34xx.h
index ab64015..4cf9859 100644
--- a/arch/arm/plat-omap/include/mach/omap34xx.h
+++ b/arch/arm/plat-omap/include/mach/omap34xx.h
@@ -3,7 +3,7 @@
  *
  * This file contains the processor specific definitions of the TI OMAP34XX.
  *
- * Copyright (C) 2007 Texas Instruments.
+ * Copyright (C) 2007-2009 Texas Instruments.
  * Copyright (C) 2007 Nokia Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -31,13 +31,9 @@
 
 #define L4_34XX_BASE   0x4800
 #define L4_WK_34XX_BASE0x4830
-#define L4_WK_OMAP_BASEL4_WK_34XX_BASE
 #define L4_PER_34XX_BASE   0x4900
-#define L4_PER_OMAP_BASE   L4_PER_34XX_BASE
 #define L4_EMU_34XX_BASE   0x5400
-#define L4_EMU_BASEL4_EMU_34XX_BASE
 #define L3_34XX_BASE   0x6800
-#define L3_OMAP_BASE   L3_34XX_BASE
 
 #define OMAP3430_32KSYNCT_BASE 0x4832
 #define OMAP3430_CM_BASE   0x48004800
@@ -85,6 +81,10 @@
 
 #if defined(CONFIG_ARCH_OMAP3430)
 
+#define 

[RESUBMIT][PATCH 5/7] OMAP4: Update common omap machine specific sources.

2009-05-07 Thread Santosh Shilimkar
This patch updates the common machine spcific source files for OMAP4430.
Few OMAP4 peripherals are common with OMAP3 architecture. Lot of code
gets re-used because of this.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/mach-omap2/clockdomain.c |2 +
 arch/arm/mach-omap2/gpmc.c|6 
 arch/arm/mach-omap2/id.c  |8 +-
 arch/arm/mach-omap2/io.c  |   51 -
 arch/arm/mach-omap2/powerdomain.c |2 +
 arch/arm/mach-omap2/sdrc.c|2 +
 arch/arm/mach-omap2/serial.c  |7 +
 arch/arm/mach-omap2/timer-gp.c|9 +-
 8 files changed, 83 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomain.c 
b/arch/arm/mach-omap2/clockdomain.c
index 0e7d501..1497d18 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -177,6 +177,8 @@ void clkdm_init(struct clockdomain **clkdms,
struct clockdomain **c = NULL;
struct clkdm_pwrdm_autodep *autodep = NULL;
 
+   if (cpu_is_omap44xx())
+   return ; /* FIXME: Not yet support */
if (clkdms)
for (c = clkdms; *c; c++)
clkdm_register(*c);
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 2249049..f91934b 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -5,6 +5,9 @@
  *
  * Author: Juha Yrjola
  *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -424,6 +427,9 @@ void __init gpmc_init(void)
} else if (cpu_is_omap34xx()) {
ck = gpmc_fck;
l = OMAP34XX_GPMC_BASE;
+   } else if (cpu_is_omap44xx()) {
+   ck = gpmc_fck;
+   l = OMAP44XX_GPMC_BASE;
}
 
gpmc_l3_clk = clk_get(NULL, ck);
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 34b5914..40e0e4b 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -6,6 +6,9 @@
  * Copyright (C) 2005 Nokia Corporation
  * Written by Tony Lindgren t...@atomide.com
  *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -196,7 +199,10 @@ void __init omap2_check_revision(void)
 * At this point we have an idea about the processor revision set
 * earlier with omap2_set_globals_tap().
 */
-   if (cpu_is_omap24xx())
+   if (cpu_is_omap44xx()) {
+   printk(KERN_INFO FIXME: CPU revision = OMAP4430\n);
+   return;
+   } else if (cpu_is_omap24xx())
omap24xx_check_revision();
else if (cpu_is_omap34xx())
omap34xx_check_revision();
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 916fcd3..6db7791 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -4,12 +4,14 @@
  * OMAP2 I/O mapping code
  *
  * Copyright (C) 2005 Nokia Corporation
- * Copyright (C) 2007 Texas Instruments
+ * Copyright (C) 2007-2009 Texas Instruments
  *
  * Author:
  * Juha Yrjola juha.yrj...@nokia.com
  * Syed Khasim x0kha...@ti.com
  *
+ * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -30,7 +32,9 @@
 #include mach/sdrc.h
 #include mach/gpmc.h
 
+#ifndef CONFIG_ARCH_OMAP4  /* FIXME: Remove this once clkdev is ready */
 #include clock.h
+#endif
 
 #include mach/powerdomain.h
 
@@ -166,6 +170,46 @@ static struct map_desc omap34xx_io_desc[] __initdata = {
},
 };
 #endif
+#ifdef CONFIG_ARCH_OMAP4
+static struct map_desc omap44xx_io_desc[] __initdata = {
+   {
+   .virtual= L3_44XX_VIRT,
+   .pfn= __phys_to_pfn(L3_44XX_PHYS),
+   .length = L3_44XX_SIZE,
+   .type   = MT_DEVICE,
+   },
+   {
+   .virtual= L4_44XX_VIRT,
+   .pfn= __phys_to_pfn(L4_44XX_PHYS),
+   .length = L4_44XX_SIZE,
+   .type   = MT_DEVICE,
+   },
+   {
+   .virtual= L4_WK_44XX_VIRT,
+   .pfn= __phys_to_pfn(L4_WK_44XX_PHYS),
+   .length = L4_WK_44XX_SIZE,
+   .type   = MT_DEVICE,
+   },
+   {
+   .virtual= OMAP44XX_GPMC_VIRT,
+  

[RESUBMIT][PATCH 3/7] OMAP4: Update common omap platform headers.

2009-05-07 Thread Santosh Shilimkar
This patch updates the common platform headers files for OMAP4430.
On OMAP4, GIC is used instead of INTC, hence all the private peripheral
interrupts are shifted by an offset of 32. So if the hardcoding is not
done for IRQ lines in drivers, then this change won't impact any driver.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/plat-omap/include/mach/clock.h   |8 ++-
 arch/arm/plat-omap/include/mach/common.h  |1 +
 arch/arm/plat-omap/include/mach/control.h |7 +-
 arch/arm/plat-omap/include/mach/debug-macro.S |2 +-
 arch/arm/plat-omap/include/mach/dma.h |1 +
 arch/arm/plat-omap/include/mach/entry-macro.S |   46 -
 arch/arm/plat-omap/include/mach/io.h  |   37 ++
 arch/arm/plat-omap/include/mach/irqs.h|   89 +
 arch/arm/plat-omap/include/mach/memory.h  |3 +-
 arch/arm/plat-omap/include/mach/serial.h  |   16 -
 10 files changed, 198 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/clock.h 
b/arch/arm/plat-omap/include/mach/clock.h
index 073a2c5..058a808 100644
--- a/arch/arm/plat-omap/include/mach/clock.h
+++ b/arch/arm/plat-omap/include/mach/clock.h
@@ -22,7 +22,8 @@ struct clkops {
void(*disable)(struct clk *);
 };
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+   defined(CONFIG_ARCH_OMAP4)
 
 struct clksel_rate {
u32 val;
@@ -51,7 +52,7 @@ struct dpll_data {
u8  max_divider;
u32 max_tolerance;
u16 max_multiplier;
-#  if defined(CONFIG_ARCH_OMAP3)
+#  if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
u8  modes;
void __iomem*autoidle_reg;
void __iomem*idlest_reg;
@@ -83,7 +84,8 @@ struct clk {
void(*init)(struct clk *);
__u8enable_bit;
__s8usecount;
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+   defined(CONFIG_ARCH_OMAP4)
u8  fixed_div;
void __iomem*clksel_reg;
u32 clksel_mask;
diff --git a/arch/arm/plat-omap/include/mach/common.h 
b/arch/arm/plat-omap/include/mach/common.h
index 0ecf36d..4b18833 100644
--- a/arch/arm/plat-omap/include/mach/common.h
+++ b/arch/arm/plat-omap/include/mach/common.h
@@ -62,6 +62,7 @@ struct omap_globals {
 void omap2_set_globals_242x(void);
 void omap2_set_globals_243x(void);
 void omap2_set_globals_343x(void);
+void omap2_set_globals_443x(void);
 
 /* These get called from omap2_set_globals_(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
diff --git a/arch/arm/plat-omap/include/mach/control.h 
b/arch/arm/plat-omap/include/mach/control.h
index 269147f..f45ec62 100644
--- a/arch/arm/plat-omap/include/mach/control.h
+++ b/arch/arm/plat-omap/include/mach/control.h
@@ -1,9 +1,9 @@
 /*
  * arch/arm/plat-omap/include/mach/control.h
  *
- * OMAP2/3 System Control Module definitions
+ * OMAP2/3/4 System Control Module definitions
  *
- * Copyright (C) 2007-2008 Texas Instruments, Inc.
+ * Copyright (C) 2007-2009 Texas Instruments, Inc.
  * Copyright (C) 2007-2008 Nokia Corporation
  *
  * Written by Paul Walmsley
@@ -190,7 +190,8 @@
 #define OMAP2_PBIASLITEVMODE0  (1  0)
 
 #ifndef __ASSEMBLY__
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+   defined(CONFIG_ARCH_OMAP4)
 extern void __iomem *omap_ctrl_base_get(void);
 extern u8 omap_ctrl_readb(u16 offset);
 extern u16 omap_ctrl_readw(u16 offset);
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S 
b/arch/arm/plat-omap/include/mach/debug-macro.S
index 1b11f5c..ac24050 100644
--- a/arch/arm/plat-omap/include/mach/debug-macro.S
+++ b/arch/arm/plat-omap/include/mach/debug-macro.S
@@ -36,7 +36,7 @@
add \rx, \rx, #0x4000   @ UART 3
 #endif
 
-#elif  CONFIG_ARCH_OMAP3
+#elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
moveq   \rx, #0x4800@ physical base address
movne   \rx, #0xd800@ virtual base
orr \rx, \rx, #0x0006a000
diff --git a/arch/arm/plat-omap/include/mach/dma.h 
b/arch/arm/plat-omap/include/mach/dma.h
index 54fe966..8e05b6a 100644
--- a/arch/arm/plat-omap/include/mach/dma.h
+++ b/arch/arm/plat-omap/include/mach/dma.h
@@ -48,6 +48,7 @@
 /* Hardware registers for omap2 and omap3 */
 #define OMAP24XX_DMA4_BASE (L4_24XX_BASE + 0x56000)
 #define OMAP34XX_DMA4_BASE (L4_34XX_BASE + 0x56000)
+#define OMAP44XX_DMA4_BASE 

[RESUBMIT][PATCH 6/7] OMAP4: Clock stubs since clock management framework not in.

2009-05-07 Thread Santosh Shilimkar
This patch update the cooomon clock.c file for OMAP4. The clk_get() and
clk_put() sunctions are moved to  common place in arch/arm/common/clkdev.c
Since on current OMAP4 platform clk management is still not supported, the
platform file is stubbed with those functions.

Once the framework is ready, this WILL be replaced with a full
clkdev implementation.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/plat-omap/clock.c |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 2e06145..f7c3b0a 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -36,10 +36,34 @@ static struct clk_functions *arch_clock;
  * Standard clock functions defined in include/linux/clk.h
  *-*/
 
+/* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since
+ * clock framework is not up , it is defined here to avoid rework in
+ * every driver */
+
+/* Dummy hooks only for OMAP4.For rest OMAPs, common clkdev is used */
+#if defined(CONFIG_ARCH_OMAP4)
+struct clk *clk_get(struct device *dev, const char *id)
+{
+   return NULL;
+}
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_put);
+void omap2_clk_prepare_for_reboot(void)
+{
+}
+EXPORT_SYMBOL(omap2_clk_prepare_for_reboot);
+#endif
 int clk_enable(struct clk *clk)
 {
unsigned long flags;
int ret = 0;
+   if (cpu_is_omap44xx())
+   /* OMAP4 clk framework not supported yet */
+   return 0;
 
if (clk == NULL || IS_ERR(clk))
return -EINVAL;
@@ -56,6 +80,9 @@ EXPORT_SYMBOL(clk_enable);
 void clk_disable(struct clk *clk)
 {
unsigned long flags;
+   if (cpu_is_omap44xx())
+   /* OMAP4 clk framework not supported yet */
+   return ;
 
if (clk == NULL || IS_ERR(clk))
return;
@@ -80,6 +107,9 @@ unsigned long clk_get_rate(struct clk *clk)
 {
unsigned long flags;
unsigned long ret = 0;
+   if (cpu_is_omap44xx())
+   /* OMAP4 clk framework not supported yet */
+   return 0;
 
if (clk == NULL || IS_ERR(clk))
return 0;
-- 
1.5.4.7

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


[RESUBMIT][PATCH 7/7] Enable build for OMAP4.

2009-05-07 Thread Santosh Shilimkar
This patch updates the Makefile and defconfig for OMAP4. Minimal set of
drivers are enabled fot the kernel bootup.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/Makefile   |1 +
 arch/arm/configs/omap_4430sdp_defconfig |  807 +++
 arch/arm/mach-omap2/Makefile|   13 +-
 3 files changed, 817 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/configs/omap_4430sdp_defconfig

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e84729b..676d10d 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -127,6 +127,7 @@ endif
  machine-$(CONFIG_ARCH_OMAP1) := omap1
  machine-$(CONFIG_ARCH_OMAP2) := omap2
  machine-$(CONFIG_ARCH_OMAP3) := omap2
+ machine-$(CONFIG_ARCH_OMAP4) := omap2
 plat-$(CONFIG_ARCH_OMAP)  := omap
  machine-$(CONFIG_ARCH_S3C2410)   := s3c2410 s3c2400 s3c2412 s3c2440 
s3c2442 s3c2443
  machine-$(CONFIG_ARCH_S3C24A0)   := s3c24a0
diff --git a/arch/arm/configs/omap_4430sdp_defconfig 
b/arch/arm/configs/omap_4430sdp_defconfig
new file mode 100644
index 000..43532bc
--- /dev/null
+++ b/arch/arm/configs/omap_4430sdp_defconfig
@@ -0,0 +1,807 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29
+# Fri April 19 19:58:24 20089
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# 

[PATCH] OMAP: RX51: Add log partition

2009-05-07 Thread Adrian Hunter

From 22d5b418dd2535f326d7f3ee5661db8159b9845d Mon Sep 17 00:00:00 2001

From: Adrian Hunter adrian.hun...@nokia.com
Date: Thu, 7 May 2009 09:45:32 +0300
Subject: [PATCH] OMAP: RX51: Add log partition

Signed-off-by: Adrian Hunter adrian.hun...@nokia.com
---
arch/arm/configs/rx51_defconfig  |2 +-
arch/arm/mach-omap2/board-rx51-peripherals.c |5 +
2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index 2672a70..7ee4b6a 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -288,7 +288,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE=init=/sbin/preinit ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs rw 
console=ttyMTD5
+CONFIG_CMDLINE=init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs 
rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 55e8568..4d10f5c 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -494,6 +494,11 @@ static struct mtd_partition onenand_partitions[] = {
.size   = 0x6,
},
{
+   .name   = log,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 0x4,
+   },
+   {
.name   = kernel,
.offset = MTDPART_OFS_APPEND,
.size   = 0x20,
--
1.5.6.3

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


[PATCH 0/3] OMAP4: SMP: Patch series

2009-05-07 Thread Shilimkar, Santosh
This patch series enables SMP support for OMAP4430 development platform. This 
series depends on the earlier patch series sent on the mailing list. [1]

The patches are generated against mainline version 2.6.30 -rc2. The kernel is 
validated on the OMAP4430 software simulator platform. SMP kernel is functional 
with debug UART. No additional drivers are supported yet.

The series contains:

[PATCH 1/3]OMAP4: SMP: Add OMAP4430 SMP board files
[PATCH 2/3]OMAP4: SMP: Add mpu timer support for OMAP4430
[PATCH 3/3]OMAP4: SMP: Enable SMP support for OMAP4430

Regards,
Santosh

[1]:[PATCH 0/7] OMAP4: Basic board support patch series

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


[PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Santosh Shilimkar
This patch adds SMP platform files support for OMAP4430SDP. TI's OMAP4430
SOC is based on ARM Cortex-A9 SMP architecture. It's a dual core SOC
with GIC used for interrupt handling and SCU for cache coherency.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/mach-omap2/omap-headsmp.S|   49 +++
 arch/arm/mach-omap2/omap-smp.c|  238 +
 arch/arm/plat-omap/include/mach/scu.h |   28 
 arch/arm/plat-omap/include/mach/smp.h |   56 
 4 files changed, 371 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/omap-headsmp.S
 create mode 100644 arch/arm/mach-omap2/omap-smp.c
 create mode 100644 arch/arm/plat-omap/include/mach/scu.h
 create mode 100644 arch/arm/plat-omap/include/mach/smp.h

diff --git a/arch/arm/mach-omap2/omap-headsmp.S 
b/arch/arm/mach-omap2/omap-headsmp.S
new file mode 100644
index 000..0afe039
--- /dev/null
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -0,0 +1,49 @@
+/*
+ * Secondary CPU startup routine source file.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * Author:
+ *  Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * Interface functions needed for the SMP. This file is based on arm
+ * realview smp platform.
+ * Copyright (c) 2003 ARM Limited.
+ *
+ * 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/linkage.h
+#include linux/init.h
+
+   __INIT
+
+/*
+ * OMAP4 specific entry point for secondary CPU to jump from ROM
+ * code.  This routine also provides a holding flag into which
+ * secondary core is held until we're ready for it to initialise.
+ * The primary core will update the this flag using a hardware
+ * register AuxCoreBoot1.
+ */
+ENTRY(omap_secondary_startup)
+   mrc p15, 0, r0, c0, c0, 5
+   and r0, r0, #15
+   adr r4, 1f
+   ldmia   r4, {r5, r6}
+   sub r4, r4, r5
+   add r6, r6, r4
+hold:  ldr r7, [r6] @ read from AuxCoreBoot1
+   cmp r7, r0
+   bne hold
+
+   /*
+* we've been released from the holding pen: secondary_stack
+* should now contain the SVC stack for this core
+*/
+   b   secondary_startup
+
+1: .long   .
+   .long   cpu_release
+
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
new file mode 100644
index 000..1d18acb
--- /dev/null
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -0,0 +1,238 @@
+/*
+ * OMAP4 SMP source file. It contains platform specific fucntions
+ * needed for the linux smp kernel.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * Author:
+ *  Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * Platform file needed for the OMAP4 SMP. This file is based on arm
+ * realview smp platform.
+ * * Copyright (c) 2002 ARM Limited.
+ *
+ * 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/init.h
+#include linux/errno.h
+#include linux/delay.h
+#include linux/device.h
+#include linux/jiffies.h
+#include linux/smp.h
+#include linux/io.h
+
+#include asm/cacheflush.h
+#include mach/scu.h
+#include mach/hardware.h
+#include asm/mach-types.h
+
+/* Registers used for communicating startup information */
+#define OMAP4_AUXCOREBOOT_REG0 (OMAP44XX_VA_WKUPGEN_BASE + 0x800)
+#define OMAP4_AUXCOREBOOT_REG1 (OMAP44XX_VA_WKUPGEN_BASE + 0x804)
+
+/* FIXME: Move to a common header file */
+extern void omap_secondary_startup(void);
+
+/*
+ * Control for which core is the next to come out of the secondary
+ * boot Auxcontrol_register
+ */
+int __cpuinitdata cpu_release = -1;
+
+/*
+ * Setup the SCU
+ */
+static void scu_enable(void)
+{
+   u32 scu_ctrl;
+   void __iomem *scu_base = OMAP44XX_VA_SCU_BASE;
+
+   scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
+   scu_ctrl |= 1;
+   __raw_writel(scu_ctrl, scu_base + SCU_CTRL);
+}
+
+/*
+ * Use SCU config register to count number of cores
+ */
+static unsigned int __init get_core_count(void)
+{
+   unsigned int ncores;
+   void __iomem *scu_base = OMAP44XX_VA_SCU_BASE;
+
+   if (scu_base) {
+   ncores = __raw_readl(scu_base + SCU_CONFIG);
+   ncores = (ncores  0x03) + 1;
+   } else {
+   ncores = 1;
+   }
+
+   return ncores;
+}
+
+static DEFINE_SPINLOCK(boot_lock);
+
+void __cpuinit platform_secondary_init(unsigned int cpu)
+{
+   trace_hardirqs_off();
+
+   /*
+* If any interrupts are already enabled for the primary
+* core (e.g. timer irq), then they will not have been enabled
+* for us: do so
+*/
+
+   gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
+
+   /*
+* Let the primary processor 

[PATCH 2/3] OMAP4: SMP: Add mpu timer support for OMAP4430

2009-05-07 Thread Santosh Shilimkar
This patch adds SMP platform specific parts for local(mpu) timer support
for OMAP4430 platform. Each Cortex-a9 core has it's own local timer in the
MPU domain. These timers are not in wakeup domain.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/mach-omap2/timer-gp.c|   11 ++
 arch/arm/mach-omap2/timer-mpu.c   |  214 +
 arch/arm/plat-omap/include/mach/common.h  |3 +
 arch/arm/plat-omap/include/mach/entry-macro.S |   28 
 arch/arm/plat-omap/include/mach/irqs.h|2 +
 5 files changed, 258 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/timer-mpu.c

diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 080868d..08c6ded 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -36,6 +36,7 @@
 
 #include asm/mach/time.h
 #include mach/dmtimer.h
+#include mach/common.h
 
 static struct omap_dm_timer *gptimer;
 static struct clock_event_device clockevent_gpt;
@@ -187,6 +188,16 @@ static void __init omap2_gp_clocksource_init(void)
 
 static void __init omap2_gp_timer_init(void)
 {
+#ifdef CONFIG_LOCAL_TIMERS
+   twd_base = IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE);
+#endif
+#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
+   /*
+* The dummy clock device has to be registered before the main device
+* so that the latter will broadcast the clock events
+*/
+   local_timer_setup();
+#endif
omap_dm_timer_init();
 
omap2_gp_clockevent_init();
diff --git a/arch/arm/mach-omap2/timer-mpu.c b/arch/arm/mach-omap2/timer-mpu.c
new file mode 100644
index 000..bb91b24
--- /dev/null
+++ b/arch/arm/mach-omap2/timer-mpu.c
@@ -0,0 +1,214 @@
+/*
+ * The MPU local timer source file. In OMAP4, both cortex-a9 cores have
+ * own timer in it's MPU domain. These timers will be driving the
+ * linux kernel SMP tick framework when active. These timers are not
+ * part of the wake up domain.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * Author:
+ *  Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * This file is based on arm realview smp platform file.
+ * Copyright (C) 2002 ARM Ltd.
+ *
+ * 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/init.h
+#include linux/kernel.h
+#include linux/delay.h
+#include linux/device.h
+#include linux/smp.h
+#include linux/jiffies.h
+#include linux/percpu.h
+#include linux/clockchips.h
+#include linux/irq.h
+
+#include asm/hardware/arm_twd.h
+#include asm/hardware/gic.h
+#include asm/irq.h
+
+#include mach/hardware.h
+#include mach/common.h
+
+static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
+
+/*
+ * Used on SMP for either the local timer or IPI_TIMER
+ */
+void local_timer_interrupt(void)
+{
+   struct clock_event_device *clk = __get_cpu_var(local_clockevent);
+
+   clk-event_handler(clk);
+}
+
+#ifdef CONFIG_LOCAL_TIMERS
+
+/* set up by the platform code */
+void __iomem *twd_base;
+
+static unsigned long mpcore_timer_rate;
+
+static void local_timer_set_mode(enum clock_event_mode mode,
+struct clock_event_device *clk)
+{
+   unsigned long ctrl;
+
+   switch (mode) {
+   case CLOCK_EVT_MODE_PERIODIC:
+   /* timer load already set up */
+   ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE
+   | TWD_TIMER_CONTROL_PERIODIC;
+   break;
+   case CLOCK_EVT_MODE_ONESHOT:
+   /* period set, and timer enabled in 'next_event' hook */
+   ctrl = TWD_TIMER_CONTROL_IT_ENABLE | TWD_TIMER_CONTROL_ONESHOT;
+   break;
+   case CLOCK_EVT_MODE_UNUSED:
+   case CLOCK_EVT_MODE_SHUTDOWN:
+   default:
+   ctrl = 0;
+   }
+
+   __raw_writel(ctrl, twd_base + TWD_TIMER_CONTROL);
+}
+
+static int local_timer_set_next_event(unsigned long evt,
+ struct clock_event_device *unused)
+{
+   unsigned long ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL);
+
+   __raw_writel(evt, twd_base + TWD_TIMER_COUNTER);
+   __raw_writel(ctrl | TWD_TIMER_CONTROL_ENABLE,
+   twd_base + TWD_TIMER_CONTROL);
+
+   return 0;
+}
+
+/*
+ * local_timer_ack: checks for a local timer interrupt.
+ *
+ * If a local timer interrupt has occurred, acknowledge and return 1.
+ * Otherwise, return 0.
+ */
+int local_timer_ack(void)
+{
+   if (__raw_readl(twd_base + TWD_TIMER_INTSTAT)) {
+   __raw_writel(1, twd_base + TWD_TIMER_INTSTAT);
+   return 1;
+   }
+
+   return 0;
+}
+
+static void __cpuinit twd_calibrate_rate(void)
+{
+   unsigned long load, count;
+   u64 waitjiffies;
+
+   /*
+* If this is the first time round, we need to work 

[PATCH 3/3] OMAP4: SMP: Enable SMP support for OMAP4430

2009-05-07 Thread Santosh Shilimkar
This patch enables SMP on OMAP4430 SDP platform.

Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/Kconfig|4 ++--
 arch/arm/configs/omap_4430sdp_defconfig |7 ++-
 arch/arm/mach-omap2/Makefile|3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e02b893..dc9f9fd 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -807,7 +807,7 @@ source kernel/time/Kconfig
 
 config SMP
bool Symmetric Multi-Processing (EXPERIMENTAL)
-   depends on EXPERIMENTAL  (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP)
+   depends on EXPERIMENTAL  (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP 
|| ARCH_OMAP4)
select USE_GENERIC_SMP_HELPERS
help
  This enables support for systems with more than one CPU. If you have
@@ -864,7 +864,7 @@ config HOTPLUG_CPU
 
 config LOCAL_TIMERS
bool Use local timer interrupts
-   depends on SMP  (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || 
REALVIEW_EB_A9MP)
+   depends on SMP  (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || 
REALVIEW_EB_A9MP || ARCH_OMAP4)
default y
help
  Enable support for local timers on SMP platforms, rather then the
diff --git a/arch/arm/configs/omap_4430sdp_defconfig 
b/arch/arm/configs/omap_4430sdp_defconfig
index 43532bc..fe2690e 100644
--- a/arch/arm/configs/omap_4430sdp_defconfig
+++ b/arch/arm/configs/omap_4430sdp_defconfig
@@ -30,7 +30,7 @@ CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
 # General setup
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=
 CONFIG_LOCALVERSION_AUTO=y
@@ -104,6 +104,7 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
@@ -244,6 +245,9 @@ CONFIG_VMSPLIT_3G=y
 # CONFIG_VMSPLIT_2G is not set
 # CONFIG_VMSPLIT_1G is not set
 CONFIG_PAGE_OFFSET=0xC000
+CONFIG_SMP=y
+CONFIG_NR_CPUS=2
+CONFIG_LOCAL_TIMERS=y
 # CONFIG_PREEMPT is not set
 CONFIG_HZ=128
 CONFIG_AEABI=y
@@ -695,6 +699,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
+# CONFIG_ARM_UNWIND is not set
 # CONFIG_DEBUG_USER is not set
 # CONFIG_DEBUG_ERRORS is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c5d7efa..e01dd75 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -14,6 +14,9 @@ obj-$(CONFIG_ARCH_OMAP3)  += $(omap-2-3-common)
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 
+# SMP support ONLY available for OMAP4
+obj-$(CONFIG_SMP)  += omap-smp.o omap-headsmp.o \
+  timer-mpu.o
 # Functions loaded to SRAM
 obj-$(CONFIG_ARCH_OMAP2420)+= sram242x.o
 obj-$(CONFIG_ARCH_OMAP2430)+= sram243x.o
-- 
1.5.4.7

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


Re: PM: 4 Problems in OMAP3430 DVFS (SmartReflex, Cpufreq)

2009-05-07 Thread Kim Kyuwon
Hi Kevin, Tony, Paul and other experts.

Woodruff, Richard wrote:
 From: Paul Walmsley [mailto:p...@pwsan.com] Sent: Thursday, April
 23, 2009 3:53 AM To: Woodruff, Richard
 
 4. Current PM code didn't enable the maximum clock (i.e. CPU:
 600Mhz) according to the comment as below:
 
 /* Avoid registering the 120% Overdrive with CPUFreq */ prcm =
 mpu_opps + MAX_VDD1_OPP - 1;
 
 But in some cases, we should use 600Mhz for multimedia
 application. And, even thought we enable the maximum clock, CPU
 frequency seldom goes into maximum clock. I think we don't have
 to avoid registering the max OPP.
 Do you know if this restriction can be lifted now, i.e., can the
 silicon run at VDD1 OPP1 100% of the time and meet the device
 lifespan targets?
 
 So, there have been some characterization changes which give more
 leeway for software usage off overdrive.
 
 What you found before was guarantees against typical mobile usage for
 a few classes of devices. This was done using a mix of OPPs with the
 majority of active time in lower OPPs and inactive time in low idles
 (optimal usage for mix of typical operations, this is the way you
 would want to run ideally). Against this and many more variables,
 reliability data was validated and published.
 
 Recently there was some change to also measure active time at max
 overdrive for same usage mix. This resulted in still meeting lifetime
 goals for typical usage.
 
 This can translate to a smart phone maker of being able to use
 overdrive as they see fit and still have long life (assuming they can
 supply adequate power and still dissipate what ever additional heat
 there is). This is still not 100% of the time in active mode.

What do you think of enabling to register the 120% Overdrive with CPUFreq
in l-o tree?.

Regard,
Kyuwon

 I suspect TI will continue to create parts for certain markets when
 the need is there. The part might be nearly identical but the way
 it's rated (with chip binning and other tricks) will allow different
 guarantees. This fits well with mobile business customer needs.
 
 As an open source individual owner of a device, you might do things
 in a non-typical way. You are free to do this. Depending on which
 base chip variant you are using, its life may have some impact (or
 not). Your chip likely will still last many years. The phone or other
 device might die first.
 
 All that said, today personally, I feel much more comfortable
 exposing overdrives in the reference code. Mobile users and their
 devices which actually sleep at night should be pretty safe.
 
 Watch data sheets for details :)
 
 Regards, Richard W.
 

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


[PATCH] onenand_init: Fix missing comma

2009-05-07 Thread Jarkko Nikula
Signed-off-by: Jarkko Nikula jhnik...@gmail.com
---
 arch/arm/mach-omap2/gpmc-onenand.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-onenand.c 
b/arch/arm/mach-omap2/gpmc-onenand.c
index 71fc05a..712af59 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -123,7 +123,7 @@ static int omap2_onenand_set_sync_mode(struct 
omap_onenand_platform_data *cfg,
const int t_wph  = 30;
int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
-   int first_time = 0, hf = 0 sync_read = 0, sync_write = 0;
+   int first_time = 0, hf = 0, sync_read = 0, sync_write = 0;
int err, ticks_cez;
int cs = cfg-cs;
u32 reg;
-- 
1.6.2.4

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


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Mark Brown
On Thu, May 07, 2009 at 03:05:08PM +0530, Arun KS wrote:

 Since we are not going with the generic driver, are you going to push
 this patch:

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

I can't see anything wrong with it looking in the web archive but somene
should send a copy tested against current ASoC.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Arun KS
On Wed, May 6, 2009 at 7:37 PM, Mark Brown broo...@sirena.org.uk wrote:
 On Wed, May 06, 2009 at 07:30:03PM +0530, Aggarwal, Anuj wrote:

  After a quick look I can not pin point the soc board file used with the
  omap3evm board. Is it in the tree?

 [Aggarwal, Anuj] No, it is not. Reason being we already have beagle 
 sdp3430 there, which are both similar to omap3evm, which I pushed.
 So mine got rejected. We had some discussions on how to handle this
 scenario but nothing got finalized.

 Not from the ALSA side it didn't...

Mark,

Since we are not going with the generic driver, are you going to push
this patch:

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

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

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


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Peter Ujfalusi
On Thursday 07 May 2009 08:48:25 Ujfalusi Peter (Nokia-D/Tampere) wrote:
 On Wednesday 06 May 2009 17:19:49 ext Todd Fischer wrote:
  Hi,
 
  FWIW: while developing a GSTreamer presentation using a BegleBoard (rev
  C), I noticed the same tuck sound.  It also occurs a second or two
  after the GST application exits.  I assumed it was some power management
  code that was disabling the audio codec after it had gone idle, but never
  looked into it.  BeagleBoard also uses TWL4030.
 
  GST command: gst-launch audiotestsrc freq=1000 num-buffers=100 ! alsasink
 
  /proc/version: Linux version 2.6.28-omap1 (ddo...@aleph) (gcc version
  4.3.1 (GCC) ) #2 Thu Mar 5 08:55:58 CST 2009

 The tuck is coming from the codec, when it is powered down (in the old
 twl4030 codec found in omap-2.6.28 branch of linux-omap).
 But, it still happens with the latest version, when the codec is muted
 only. I can observe the tuck on Headset output, but not on the
 PreDrive... The Headset enable and disable is implemented according to the
 TRM, but it seams that additional tweaking is needed..

I need to revisit this...
After more testing and debugging, it seams that I can not confirm the 
existence of the tuck (with the latest twl4030  codec code).
As soon as I receive my Beagle board I will test it again (can anyone test 
this with latest ASoC code on Beagle?)...

[Anuj]: What kernel are you using where you have the beep?

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


RE: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Aggarwal, Anuj
 -Original Message-
 From: Peter Ujfalusi [mailto:peter.ujfal...@nokia.com]
 Sent: Thursday, May 07, 2009 4:38 PM
 To: alsa-de...@alsa-project.org
 Cc: todd.fisc...@ridgerun.com; Aggarwal, Anuj; linux-omap@vger.kernel.org
 Subject: Re: [alsa-devel] Beep sound in the end of audio file
 
 On Thursday 07 May 2009 08:48:25 Ujfalusi Peter (Nokia-D/Tampere) wrote:
  On Wednesday 06 May 2009 17:19:49 ext Todd Fischer wrote:
   Hi,
  
   FWIW: while developing a GSTreamer presentation using a BegleBoard
 (rev
   C), I noticed the same tuck sound.  It also occurs a second or two
   after the GST application exits.  I assumed it was some power
 management
   code that was disabling the audio codec after it had gone idle, but never
   looked into it.  BeagleBoard also uses TWL4030.
  
   GST command: gst-launch audiotestsrc freq=1000 num-buffers=100 !
 alsasink
  
   /proc/version: Linux version 2.6.28-omap1 (ddo...@aleph) (gcc version
   4.3.1 (GCC) ) #2 Thu Mar 5 08:55:58 CST 2009
 
  The tuck is coming from the codec, when it is powered down (in the old
  twl4030 codec found in omap-2.6.28 branch of linux-omap).
  But, it still happens with the latest version, when the codec is muted
  only. I can observe the tuck on Headset output, but not on the
  PreDrive... The Headset enable and disable is implemented according to the
  TRM, but it seams that additional tweaking is needed..
 
 I need to revisit this...
 After more testing and debugging, it seams that I can not confirm the
 existence of the tuck (with the latest twl4030  codec code).
 As soon as I receive my Beagle board I will test it again (can anyone test
 this with latest ASoC code on Beagle?)...
 
 [Anuj]: What kernel are you using where you have the beep?
[Aggarwal, Anuj] 2.6.29-rc3
 
 --
 Péter

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


Re: Beagleboard rev C memory timings suspend/resume

2009-05-07 Thread Jean Pihet
Hi Paul,

On Thursday 07 May 2009 01:39:02 Paul Walmsley wrote:
 Hello Jean,

 sorry about the delay,
Thanks for replying!

 On Wed, 29 Apr 2009, Jean Pihet wrote:
  The suspend/resume on Beagleboard has some problem due to bad memory
  timings. Suspending for more than 5 to 10 seconds shows memory
  corruption.
 
  The new chips on rev Cx boards are using 2 DDR chip selects and it looks
  like the 2nd memory part is not correctly put into self refresh. As an
  experimentation I tried the same kernel with 'mem=128M' and it resumes
  correctly after 1 min in suspend.

 Nice work, this seems likely to be the cause.

  I could not find the latest DDR detailed specs from Micron. The part
  number is MT29C2G48MAKLCJI-6 IT. Are those available? Is this part
  identical to 2 1Gb parts?

 The combined part's web page is:

 http://www.micron.com/products/partdetail?part=MT29C2G48MAKLCJI-6%20IT

 The SDRAM datasheet is the same that is used for all the other Micron
 parts that we've run across so far:

 http://download.micron.com/pdf/datasheets/dram/mobile/1gb_ddr_mobile_sdram_
t48m.pdf
Ok so we have 2 DDRs combined.
That does not explain why the self-refresh is ok with only 1 part while it 
fails with the 2 parts.
Could it be that the timings are too tight? Is there something special for the 
SDRC to support the 2 CSes correctly?

We already have used the self refresh with 2 parts hooked on a 3430, not 
Micron parts though, so the code looks correct.

I think we need help from the HW vendors here to identify the root cause: 
SDRC, DDR parts, connections?
 
  Now for the code in the kernel, there are some changes needed to support
  2 CS'es:
  - the SDRC parameters need to be updated for the new memory part
  - the SDRC parameters need to include the ACTIM_CTRL_A_0, ACTIM_CTRL_A_1,
  ACTIM_CTRL_B_0, ACTIM_CTRL_B_1, RFR_CTRL_0 and RFR_CTRL_1 registers.
  Since the parameters for the 2nd CS are the same, this can be avoided by
  writing the same values to the 2 sets of registers
  - is there a need to differentiate between 1Gb and 2Gb chips, or can we
  just write the same params for both CS'es even if only one is being used?
  - the 'configure_sdrc' function in arch/arm/mach-omap2/sram34xx.S needs
  to program the 2 sets of registers. Here is a patch excerpt below. This
  patch only does not help the suspend/resume though.
 
  Any idea or suggestion?

 Looks like a good start.  Since the two SDRC chip-selects can technically
 address parts with different timings, we should not assume that the two
 chip selects will be the same.  Admittedly this seems like an unlikely
 situation, but it's not impossible for non-POP OMAPs.
Makes sense. It is better to have correct and generic code.

 Re: suspend/resume, if you're talking about the code in sleep34xx.S, it
 looks like this is already in good shape.

 Re: board  SDRC changes: would suggest modifying omap2_sdrc_init() to
 take either two struct omap_sdrc_params pointers, or one struct with two
 pointers.  omap2_init_common_hw() will also need to be updated for that,
 and all of the board-*.c files also.

 Sound reasonable?
Sure. I can write the new code, but I prefer to have the self refresh working 
first.

  ldr r11, omap3_sdrc_mr_0
  str r6, [r11]
  ldr r6, [r11]   @ posted-write barrier for SDRC
  +   ldr r11, omap3_sdrc_mr_1
  +   str r6, [r11]
  +   ldr r6, [r11]   @ posted-write barrier for SDRC
  bx  lr

 By the way, there's no need to duplicate the posted-write barrier.  There
 should only be one, appearing right before the 'bx lr'.
Ok I will take it into account.


 regards,

 - Paul

Regards,
Jean

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


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Peter Ujfalusi
On Thursday 07 May 2009 14:16:12 ext Aggarwal, Anuj wrote:
  [Anuj]: What kernel are you using where you have the beep?

 [Aggarwal, Anuj] 2.6.29-rc3

That version still has the old power up/down code. Since than there were 23 
patches for the twl4030 codec.
The Headset enable/disable mantra could be still wrong in the latest 
version...

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


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Arun KS
On Thu, May 7, 2009 at 4:54 PM, Peter Ujfalusi peter.ujfal...@nokia.com wrote:
 On Thursday 07 May 2009 14:16:12 ext Aggarwal, Anuj wrote:
  [Anuj]: What kernel are you using where you have the beep?

 [Aggarwal, Anuj] 2.6.29-rc3

 That version still has the old power up/down code. Since than there were 23
 patches for the twl4030 codec.
 The Headset enable/disable mantra could be still wrong in the latest
 version...

But i tried with latest linux-omap tree(2.6.30-rc4) copying twl4030.*
files from latest linux sound tree.
I can still hear the tuck noise of DAPM on omap3evm board.

Arun

 --
 Péter
 ___
 Alsa-devel mailing list
 alsa-de...@alsa-project.org
 http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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


Re: [alsa-devel] Beep sound in the end of audio file

2009-05-07 Thread Jarkko Nikula
On Thu, 7 May 2009 14:08:14 +0300
Peter Ujfalusi peter.ujfal...@nokia.com wrote:

 I need to revisit this...
 After more testing and debugging, it seams that I can not confirm the 
 existence of the tuck (with the latest twl4030  codec code).
 As soon as I receive my Beagle board I will test it again (can anyone
 test this with latest ASoC code on Beagle?)...
 
I can hear somewhat audible (stetson guessed -20 db
from /dev/urandom level) power-up/-down pop with aplay -f
dat /dev/zero but no any other beeps or noises.

I cannot hear any difference in pop level am I using head of linux-omap
or when merging sound-2.6/asoc on top of it.

Of cource this pop noise can be codec output  load dependent and also
possible on-board amplifier with proper power sequencing can mask the
noise. For reference, output jack of the Beagle is connected directly
into HSOL and HSOR pins.


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


Re: [PATCH] PM: suspend_device_irqs(): don't disable wakeup IRQs

2009-05-07 Thread Kevin Hilman
Kim Kyuwon chamm...@gmail.com writes:

 2009/5/7 Arve Hjønnevåg a...@android.com:
 2009/5/6 Kim Kyuwon chamm...@gmail.com:
 2009/5/7 Arve Hjønnevåg a...@android.com:
 On Wed, May 6, 2009 at 5:16 PM, Kevin Hilman
 khil...@deeprootsystems.com wrote:
 Rafael J. Wysocki r...@sisk.pl writes:

 On Wednesday 06 May 2009, Kevin Hilman wrote:
 Kevin Hilman khil...@deeprootsystems.com writes:

 There is at least one problem with that which is why Kyuwon Kim added
 the -disable hook to OMAP's irq_chip.  The problem is with drivers
 that call disable_irq() in their suspend hook, usually done to prevent
 the device from waking the system since on OMAP, any IRQ can be
 configured to wake the system.


 This does not sound correct. disable_irq_wake should be used for this.
 A driver may need to mask its interrupt before suspending but this
 should not also disable it as a wakeup source.

 I wish I could use disable_irq_wake(), but it doesn't work in OMAP.

 This does not sound like a hardware problem.

 We may need advices of TI engineers.
 However, as far as I know, It is impossible to disable 'interrupt
 wake-up' with interrupt enabled. Because an interrupt itself generate
 a system wake-up event in OMAP3430 (Hardware level).

Interrupt wakeups can be disabled at the PRCM level.  Or more simply
we can keep a mask of wakeup-enable interrupts and use that.

I will experiment with getting disable_irq_wake() working.

Kevin

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


RE: [PATCH 2/6] omap iommu: omap2 architecture specific functions

2009-05-07 Thread Kanigeri, Hari
Hi,

 +static irqreturn_t iommu_fault_handler(int irq, void *data)
 +{
 +   u32 stat, da;
 +   u32 *iopgd, *iopte;
 +   int err = -EIO;
 +   struct iommu *obj = data;
 +
 +   if (!obj-refcount)
 +   return IRQ_NONE;
 +
 +   /* Dynamic loading TLB or PTE */
 +   if (obj-isr)
 +   err = obj-isr(obj);
 ^^
 
 If the above isr function sets a new tlb or pte entry, then
 further iommu fault won't happen anymore.


-- I think adding the new tlb entry or any other error recovery mechanism 
should be deferred to the registered callback function. 

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


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread stanley.miao

Tony Lindgren wrote:

* Tony Lindgren t...@atomide.com [090505 21:00]:
  

* Russell King - ARM Linux li...@arm.linux.org.uk [090505 12:52]:


On Tue, Apr 28, 2009 at 03:42:37PM -0700, Tony Lindgren wrote:
  

* Russell King - ARM Linux li...@arm.linux.org.uk [090428 15:07]:


Tony, et.al.,

Any ideas when more LDP support will be pushed into mainline (such as
the framebuffer support)?
  

I'll be looking at the board-*.c patches for the next merge window
hopefully this week or next week.

Looks like LDP keyboard, touchscreen  RTC are pretty much ready
to go. Then the MMC has some regulator updates, but AFAIK the MMC
should work OK already.

For the framebuffer, Imre and Tomi know the status the best, so
I've added them to Cc.

Imre has been meaning to send a bunch of drivers/video/omap changes
to the fbdev list for a while now and LDP framebuffer may depend on
those. Imre, any news on the status of sending the fb patches
upstream?

Then there are the upcoming DSS patches from Tomi, but those still
need some work before they're ready to go.


Is there any news on this?  Will we see more functional OMAP3 / LDP
support queued for the next merge window?
  

Yes fro the stuff listed above, but still no news on the framebuffer
patches. Imre?



Added Stanley Miao to Cc. Here's an updated version of Stanley's patch to
add fb support for LDP.

I don't have an LDP, maybe you guys can give it a try against the mainline
kernel and see if it works! There might be some changes needed to 
drivers/video/omap/dispc.c too.. And those should be handled by Imre.


But if this works, at least we can then add support for few more boards
easily while waiting for Imre to send his updates.
  

Hi, Tony,

Now the kernel can't boot on LDP. The attached file is the boot log.

I will check it when I have  time.

Stanley.


Cheers,

Tony 
  


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


[APPLIED] [PATCH] OMAP: RX51: Add log partition

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

Initial commit ID (Likely to change): 86822cc055878b6750a8a3e8c42702e3ac2fe255

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

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


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


[PATCH 0/1] ASoC: Added OMAP3 EVM Support

2009-05-07 Thread Anuj Aggarwal
With refernce to the discussion at:

http://marc.info/?l=linux-omapm=124169330310075w=2

I am resending the patch to add OMAP3 EVM support in ASoC. It
has been built/checked against the tip.

Anuj Aggarwal (1):
  ASoC: Added OMAP3 EVM support in ASoC.

 sound/soc/omap/Kconfig|8 +++
 sound/soc/omap/Makefile   |2 +
 sound/soc/omap/omap3evm.c |  147 +
 3 files changed, 157 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3evm.c

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


[PATCH 1/1] ASoC: Added OMAP3 EVM support in ASoC.

2009-05-07 Thread Anuj Aggarwal

Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com
---
 sound/soc/omap/Kconfig|8 +++
 sound/soc/omap/Makefile   |2 +
 sound/soc/omap/omap3evm.c |  147 +
 3 files changed, 157 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3evm.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 675732e..b771238 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -39,6 +39,14 @@ config SND_OMAP_SOC_OMAP2EVM
help
  Say Y if you want to add support for SoC audio on the omap2evm board.
 
+config SND_OMAP_SOC_OMAP3EVM
+   tristate SoC Audio support for OMAP3EVM board
+   depends on TWL4030_CORE  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_SDP3430
tristate SoC Audio support for Texas Instruments SDP3430
depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP_3430SDP
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 0c9e4ac..a37f498 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -10,6 +10,7 @@ snd-soc-n810-objs := n810.o
 snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
 snd-soc-omap2evm-objs := omap2evm.o
+snd-soc-omap3evm-objs := omap3evm.o
 snd-soc-sdp3430-objs := sdp3430.o
 snd-soc-omap3pandora-objs := omap3pandora.o
 snd-soc-omap3beagle-objs := omap3beagle.o
@@ -18,6 +19,7 @@ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
 obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
+obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.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
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
new file mode 100644
index 000..2af5d93
--- /dev/null
+++ b/sound/soc/omap/omap3evm.c
@@ -0,0 +1,147 @@
+/*
+ * omap3evm.c  -- ALSA SoC support for OMAP3 EVM
+ *
+ * Author: Anuj Aggarwal anuj.aggar...@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, 2600,
+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,
+};
+
+/* 

Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Russell King - ARM Linux
On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
 Hi, Tony,

 Now the kernel can't boot on LDP. The attached file is the boot log.

No boot log found.

My master branch, based upon 2.6.29-rc3 boots fine on the LDP.

Uncompressing Linux.
 done, booting the kernel.
Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version 4.3.2 
(GCC)) #125 Mon Feb 2 22:22:54 GMT 2009
CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP LDP board
Memory policy: ECC disabled, Data cache writeback
OMAP3430 ES2.1
SRAM: Mapped pa 0x4020 to va 0xd700 size: 0x10
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS2,115200n8 noinitrd mem=128M 
root=/dev/mmcblk0p2 rw ip=none rootdelay=2 video=omap24xxfb:rotation=270
Clocking rate (Crystal/DPLL/ARM core): 26.0/266/500 MHz
GPMC revision 5.0
IRQ: Found an INTC at 0xd820 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP34xx GPIO hardware version 2.5
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 126292KB available (2964K code, 372K data, 120K init)
Calibrating delay loop... 498.87 BogoMIPS (lpj=1945600)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
OMAP DMA hardware revision 4.0
USB: No board-specific platform config found
bio: create slab bio-0 at 0
SCSI subsystem initialized
i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz
twl4030: PIH (irq 7) chaining IRQs 368..375
twl4030: power (irq 373) chaining IRQs 376..383
twl4030: gpio (irq 368) chaining IRQs 384..401
i2c_omap i2c_omap.2: bus 2 rev3.12 at 400 kHz
i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
msgmni has been set to 246
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
omapfb: configured for panel ldp
omapfb: DISPC version 3.0 initialized
omapfb: Framebuffer initialized. Total vram 614400 planes 1
omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.0: ttyS2 at MMIO 0x4902 (irq = 74) is a ST16654
console [ttyS2] enabled
brd: module loaded
loop: module loaded
smsc911x: Driver version 2008-10-21.
smsc911x-mdio: probed
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=:01, irq=-1)
net eth0: MAC Address: 00:08:ee:02:24:b2
Driver 'sd' needs updating - please use bus_type methods
twl4030_rtc twl4030_rtc: rtc core: registered twl4030_rtc as rtc0
twl4030_rtc twl4030_rtc: Power up reset detected.
twl4030_rtc twl4030_rtc: Enabling TWL4030-RTC.
i2c /dev entries driver
Driver for 1-wire Dallas network protocol.
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI AD73311
No device for DAI AK4535
No device for DAI CS4270
No device for DAI PCM3008 HiFi
No device for DAI SSM2602
No device for DAI tlv320aic23
No device for DAI tlv320aic3x
No device for DAI twl4030
No device for DAI UDA134X
No device for DAI UDA1380
No device for DAI UDA1380
No device for DAI UDA1380
No device for DAI WM8510 HiFi
No device for DAI WM8580 PAIFRX
No device for DAI WM8580 PAIFTX
No device for DAI WM8728
No device for DAI WM8731
No device for DAI WM8750
No device for DAI WM8971
No device for DAI WM8990 ADC/DAC Primary
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:00:00 UTC 
(946684800)
Waiting 2sec before mounting root device...
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address 0002
mmcblk0: mmc0:0002 0 971 MiB 
 mmcblk0: p1 p2
kjournald 

Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Tony Lindgren
* Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:
 On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
  Hi, Tony,
 
  Now the kernel can't boot on LDP. The attached file is the boot log.
 
 No boot log found.
 
 My master branch, based upon 2.6.29-rc3 boots fine on the LDP.
 
 Uncompressing 
 Linux.
  done, booting the kernel.
 Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version 4.3.2 
 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009

snip snip

 omapfb: configured for panel ldp
 omapfb: DISPC version 3.0 initialized
 omapfb: Framebuffer initialized. Total vram 614400 planes 1
 omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz

Can you see the penguin?

Tony

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


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Russell King - ARM Linux
On Thu, May 07, 2009 at 09:28:34AM -0700, Tony Lindgren wrote:
 * Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:
  On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
   Hi, Tony,
  
   Now the kernel can't boot on LDP. The attached file is the boot log.
  
  No boot log found.
  
  My master branch, based upon 2.6.29-rc3 boots fine on the LDP.
  
  Uncompressing 
  Linux.
   done, booting the kernel.
  Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version 4.3.2 
  (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009
 
 snip snip
 
  omapfb: configured for panel ldp
  omapfb: DISPC version 3.0 initialized
  omapfb: Framebuffer initialized. Total vram 614400 planes 1
  omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz
 
 Can you see the penguin?

Interestingly, CONFIG_FB is not set, so I'm not sure why we have a
framebuffer driver.

Ah, hmm.  Oh sod it, what kernel am I booting.  Oh, it's an ages
old one.  Fucking $#^$#^%$^#^^%#%^5268903284769065983 UBOOT.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Russell King - ARM Linux
On Thu, May 07, 2009 at 05:34:05PM +0100, Russell King - ARM Linux wrote:
 On Thu, May 07, 2009 at 09:28:34AM -0700, Tony Lindgren wrote:
  * Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:
   On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
Hi, Tony,
   
Now the kernel can't boot on LDP. The attached file is the boot log.
   
   No boot log found.
   
   My master branch, based upon 2.6.29-rc3 boots fine on the LDP.
   
   Uncompressing 
   Linux.
    done, booting the kernel.
   Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version 
   4.3.2 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009
  
  snip snip
  
   omapfb: configured for panel ldp
   omapfb: DISPC version 3.0 initialized
   omapfb: Framebuffer initialized. Total vram 614400 planes 1
   omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz
  
  Can you see the penguin?
 
 Interestingly, CONFIG_FB is not set, so I'm not sure why we have a
 framebuffer driver.
 
 Ah, hmm.  Oh sod it, what kernel am I booting.  Oh, it's an ages
 old one.  Fucking $#^$#^%$^#^^%#%^5268903284769065983 UBOOT.

Sod it, I'm not going to bother with this crap with its stupidly long
build times because of bloated gcc4 requirements this side of my holiday.
I've better things to be doing like washing the car.

So you're on your own with LDP support for the next 9 days.  So this
email marks the end of my pre-holiday Linux involvement.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Tony Lindgren
* Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:37]:
 On Thu, May 07, 2009 at 05:34:05PM +0100, Russell King - ARM Linux wrote:
  On Thu, May 07, 2009 at 09:28:34AM -0700, Tony Lindgren wrote:
   * Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:
On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
 Hi, Tony,

 Now the kernel can't boot on LDP. The attached file is the boot log.

No boot log found.

My master branch, based upon 2.6.29-rc3 boots fine on the LDP.

Uncompressing 
Linux.
 done, booting the kernel.
Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version 
4.3.2 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009
   
   snip snip
   
omapfb: configured for panel ldp
omapfb: DISPC version 3.0 initialized
omapfb: Framebuffer initialized. Total vram 614400 planes 1
omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz
   
   Can you see the penguin?
  
  Interestingly, CONFIG_FB is not set, so I'm not sure why we have a
  framebuffer driver.
  
  Ah, hmm.  Oh sod it, what kernel am I booting.  Oh, it's an ages
  old one.  Fucking $#^$#^%$^#^^%#%^5268903284769065983 UBOOT.
 
 Sod it, I'm not going to bother with this crap with its stupidly long
 build times because of bloated gcc4 requirements this side of my holiday.
 I've better things to be doing like washing the car.
 
 So you're on your own with LDP support for the next 9 days.  So this
 email marks the end of my pre-holiday Linux involvement.

Happy holidays :) We'll get the LDP patches ready by the time you're back.

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


Re: Beagleboard rev C memory timings suspend/resume

2009-05-07 Thread Jean Pihet
Hi,

FYI I tried to relax the DDR timings (mainly tRC, tWTR, tXP, tXSR, ARCV) but 
that did not help.

From the OMAP datasheet it looks like the ARCV setting is off: shouldn't it be 
(tREFI/tCK)+50=(7800/6)+50=0x546?

Is there a way to know if the self refresh works on both parts?

Regards,
Jean

On Thursday 07 May 2009 13:18:30 Jean Pihet wrote:
 Hi Paul,

 On Thursday 07 May 2009 01:39:02 Paul Walmsley wrote:
  Hello Jean,
 
  sorry about the delay,

 Thanks for replying!

  On Wed, 29 Apr 2009, Jean Pihet wrote:
   The suspend/resume on Beagleboard has some problem due to bad memory
   timings. Suspending for more than 5 to 10 seconds shows memory
   corruption.
  
   The new chips on rev Cx boards are using 2 DDR chip selects and it
   looks like the 2nd memory part is not correctly put into self refresh.
   As an experimentation I tried the same kernel with 'mem=128M' and it
   resumes correctly after 1 min in suspend.
 
  Nice work, this seems likely to be the cause.
 
   I could not find the latest DDR detailed specs from Micron. The part
   number is MT29C2G48MAKLCJI-6 IT. Are those available? Is this part
   identical to 2 1Gb parts?
 
  The combined part's web page is:
 
  http://www.micron.com/products/partdetail?part=MT29C2G48MAKLCJI-6%20IT
 
  The SDRAM datasheet is the same that is used for all the other Micron
  parts that we've run across so far:
 
  http://download.micron.com/pdf/datasheets/dram/mobile/1gb_ddr_mobile_sdra
 m_ t48m.pdf

 Ok so we have 2 DDRs combined.
 That does not explain why the self-refresh is ok with only 1 part while it
 fails with the 2 parts.
 Could it be that the timings are too tight? Is there something special for
 the SDRC to support the 2 CSes correctly?

 We already have used the self refresh with 2 parts hooked on a 3430, not
 Micron parts though, so the code looks correct.

 I think we need help from the HW vendors here to identify the root cause:
 SDRC, DDR parts, connections?

   Now for the code in the kernel, there are some changes needed to
   support 2 CS'es:
   - the SDRC parameters need to be updated for the new memory part
   - the SDRC parameters need to include the ACTIM_CTRL_A_0,
   ACTIM_CTRL_A_1, ACTIM_CTRL_B_0, ACTIM_CTRL_B_1, RFR_CTRL_0 and
   RFR_CTRL_1 registers. Since the parameters for the 2nd CS are the same,
   this can be avoided by writing the same values to the 2 sets of
   registers
   - is there a need to differentiate between 1Gb and 2Gb chips, or can we
   just write the same params for both CS'es even if only one is being
   used? - the 'configure_sdrc' function in arch/arm/mach-omap2/sram34xx.S
   needs to program the 2 sets of registers. Here is a patch excerpt
   below. This patch only does not help the suspend/resume though.
  
   Any idea or suggestion?
 
  Looks like a good start.  Since the two SDRC chip-selects can technically
  address parts with different timings, we should not assume that the two
  chip selects will be the same.  Admittedly this seems like an unlikely
  situation, but it's not impossible for non-POP OMAPs.

 Makes sense. It is better to have correct and generic code.

  Re: suspend/resume, if you're talking about the code in sleep34xx.S, it
  looks like this is already in good shape.
 
  Re: board  SDRC changes: would suggest modifying omap2_sdrc_init() to
  take either two struct omap_sdrc_params pointers, or one struct with two
  pointers.  omap2_init_common_hw() will also need to be updated for that,
  and all of the board-*.c files also.
 
  Sound reasonable?

 Sure. I can write the new code, but I prefer to have the self refresh
 working first.

   ldr r11, omap3_sdrc_mr_0
   str r6, [r11]
   ldr r6, [r11]   @ posted-write barrier for SDRC
   +   ldr r11, omap3_sdrc_mr_1
   +   str r6, [r11]
   +   ldr r6, [r11]   @ posted-write barrier for SDRC
   bx  lr
 
  By the way, there's no need to duplicate the posted-write barrier.  There
  should only be one, appearing right before the 'bx lr'.

 Ok I will take it into account.

  regards,
 
  - Paul

 Regards,
 Jean

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


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


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Koen Kooi


Op 7 mei 2009, om 18:28 heeft Tony Lindgren het volgende geschreven:


* Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:

On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:

Hi, Tony,

Now the kernel can't boot on LDP. The attached file is the boot log.


No boot log found.

My master branch, based upon 2.6.29-rc3 boots fine on the LDP.

Uncompressing  
Linux.
 done, booting the  
kernel.
Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version  
4.3.2 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009


snip snip


omapfb: configured for panel ldp
omapfb: DISPC version 3.0 initialized
omapfb: Framebuffer initialized. Total vram 614400 planes 1
omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz


Can you see the penguin?


2.6.29 does this on my zoom:

http://www.flickr.com/photos/koenkooi/3406819626/

Boots into X and all :) That's with DSS1, not Tomi's DSS2. As I said  
earlier, the touchscreen is unusable.


regards,

Koen




PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Tony Lindgren
* Koen Kooi k...@dominion.thruhere.net [090507 09:57]:

 Op 7 mei 2009, om 18:28 heeft Tony Lindgren het volgende geschreven:

 * Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:
 On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:
 Hi, Tony,

 Now the kernel can't boot on LDP. The attached file is the boot log.

 No boot log found.

 My master branch, based upon 2.6.29-rc3 boots fine on the LDP.

 Uncompressing  
 Linux.
  done, booting the  
 kernel.
 Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version  
 4.3.2 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009

 snip snip

 omapfb: configured for panel ldp
 omapfb: DISPC version 3.0 initialized
 omapfb: Framebuffer initialized. Total vram 614400 planes 1
 omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz

 Can you see the penguin?

 2.6.29 does this on my zoom:

 http://www.flickr.com/photos/koenkooi/3406819626/

 Boots into X and all :) That's with DSS1, not Tomi's DSS2. As I said  
 earlier, the touchscreen is unusable.

Good to hear. What patches do you have applied?

What exactly is wrong with the touchscreen? Got any patches for that?

Regards,

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


McBSP in Multi Channel mode

2009-05-07 Thread Fernando Governatore
Hello,

I'm new to kernel development and so I'm a bit confused on how to do
things here. I need to use the McBSP with Multi-Channel enabled and
using DMA to transfer the data.

The data will be PCM sound and I will have 4 cards attached to this
McBSP. I'm using OMAP35xx.

From what I've seen, I have to change the files:
 - arch/arm/plat-omap/mcbsp.c
 - arch/arm/mach-omap2/mcbsp.c
to support multi channel. Is that it? or I would need more changes?

Is there something that I would need to change in DMA implementation?
Do you know where I can get an example or documentation?

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


Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Koen Kooi


Op 7 mei 2009, om 19:18 heeft Tony Lindgren het volgende geschreven:


* Koen Kooi k...@dominion.thruhere.net [090507 09:57]:


Op 7 mei 2009, om 18:28 heeft Tony Lindgren het volgende geschreven:


* Russell King - ARM Linux li...@arm.linux.org.uk [090507 09:19]:

On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:

Hi, Tony,

Now the kernel can't boot on LDP. The attached file is the boot  
log.


No boot log found.

My master branch, based upon 2.6.29-rc3 boots fine on the LDP.

Uncompressing
Linux.
 done, booting the
kernel.
Linux version 2.6.29-rc3 (r...@dyn-67.arm.linux.org.uk) (gcc version
4.3.2 (GCC)) #125 Mon Feb 2 22:22:54 GMT 2009


snip snip


omapfb: configured for panel ldp
omapfb: DISPC version 3.0 initialized
omapfb: Framebuffer initialized. Total vram 614400 planes 1
omapfb: Pixclock 32000 kHz hfreq 60.3 kHz vfreq 93.7 Hz


Can you see the penguin?


2.6.29 does this on my zoom:

http://www.flickr.com/photos/koenkooi/3406819626/

Boots into X and all :) That's with DSS1, not Tomi's DSS2. As I said
earlier, the touchscreen is unusable.


Good to hear. What patches do you have applied?


None relating to DSS1, the rest are DSS2 patches (not enabled in  
defconfig), musb patches, etc.



What exactly is wrong with the touchscreen?


It seems to have a reduced resolution with lots of noise, tslib is  
unable to calibrate it to a usable state. It might be the mcspi  
problem the evm had (has?) all over again, haven't looked into that.



Got any patches for that?


none, sorry.

regards,

Koen



Regards,

Tony




PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


Re: Beagleboard rev C memory timings suspend/resume

2009-05-07 Thread Paul Walmsley
Hello Jean

On Thu, 7 May 2009, Jean Pihet wrote:

 From the OMAP datasheet it looks like the ARCV setting is off: shouldn't it 
 be 
 (tREFI/tCK)+50=(7800/6)+50=0x546?

Could you elaborate further what you're seeing?  It would help to 
see the register value that you're using to come to this conclusion.

- Paul

 
 Is there a way to know if the self refresh works on both parts?
 
 Regards,
 Jean
 
 On Thursday 07 May 2009 13:18:30 Jean Pihet wrote:
  Hi Paul,
 
  On Thursday 07 May 2009 01:39:02 Paul Walmsley wrote:
   Hello Jean,
  
   sorry about the delay,
 
  Thanks for replying!
 
   On Wed, 29 Apr 2009, Jean Pihet wrote:
The suspend/resume on Beagleboard has some problem due to bad memory
timings. Suspending for more than 5 to 10 seconds shows memory
corruption.
   
The new chips on rev Cx boards are using 2 DDR chip selects and it
looks like the 2nd memory part is not correctly put into self refresh.
As an experimentation I tried the same kernel with 'mem=128M' and it
resumes correctly after 1 min in suspend.
  
   Nice work, this seems likely to be the cause.
  
I could not find the latest DDR detailed specs from Micron. The part
number is MT29C2G48MAKLCJI-6 IT. Are those available? Is this part
identical to 2 1Gb parts?
  
   The combined part's web page is:
  
   http://www.micron.com/products/partdetail?part=MT29C2G48MAKLCJI-6%20IT
  
   The SDRAM datasheet is the same that is used for all the other Micron
   parts that we've run across so far:
  
   http://download.micron.com/pdf/datasheets/dram/mobile/1gb_ddr_mobile_sdra
  m_ t48m.pdf
 
  Ok so we have 2 DDRs combined.
  That does not explain why the self-refresh is ok with only 1 part while it
  fails with the 2 parts.
  Could it be that the timings are too tight? Is there something special for
  the SDRC to support the 2 CSes correctly?
 
  We already have used the self refresh with 2 parts hooked on a 3430, not
  Micron parts though, so the code looks correct.
 
  I think we need help from the HW vendors here to identify the root cause:
  SDRC, DDR parts, connections?
 
Now for the code in the kernel, there are some changes needed to
support 2 CS'es:
- the SDRC parameters need to be updated for the new memory part
- the SDRC parameters need to include the ACTIM_CTRL_A_0,
ACTIM_CTRL_A_1, ACTIM_CTRL_B_0, ACTIM_CTRL_B_1, RFR_CTRL_0 and
RFR_CTRL_1 registers. Since the parameters for the 2nd CS are the same,
this can be avoided by writing the same values to the 2 sets of
registers
- is there a need to differentiate between 1Gb and 2Gb chips, or can we
just write the same params for both CS'es even if only one is being
used? - the 'configure_sdrc' function in arch/arm/mach-omap2/sram34xx.S
needs to program the 2 sets of registers. Here is a patch excerpt
below. This patch only does not help the suspend/resume though.
   
Any idea or suggestion?
  
   Looks like a good start.  Since the two SDRC chip-selects can technically
   address parts with different timings, we should not assume that the two
   chip selects will be the same.  Admittedly this seems like an unlikely
   situation, but it's not impossible for non-POP OMAPs.
 
  Makes sense. It is better to have correct and generic code.
 
   Re: suspend/resume, if you're talking about the code in sleep34xx.S, it
   looks like this is already in good shape.
  
   Re: board  SDRC changes: would suggest modifying omap2_sdrc_init() to
   take either two struct omap_sdrc_params pointers, or one struct with two
   pointers.  omap2_init_common_hw() will also need to be updated for that,
   and all of the board-*.c files also.
  
   Sound reasonable?
 
  Sure. I can write the new code, but I prefer to have the self refresh
  working first.
 
ldr r11, omap3_sdrc_mr_0
str r6, [r11]
ldr r6, [r11]   @ posted-write barrier for SDRC
+   ldr r11, omap3_sdrc_mr_1
+   str r6, [r11]
+   ldr r6, [r11]   @ posted-write barrier for SDRC
bx  lr
  
   By the way, there's no need to duplicate the posted-write barrier.  There
   should only be one, appearing right before the 'bx lr'.
 
  Ok I will take it into account.
 
   regards,
  
   - Paul
 
  Regards,
  Jean
 
  --
  To unsubscribe from this list: send the line unsubscribe linux-omap in
  the body of a message to majord...@vger.kernel.org
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 


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


Re: Beagleboard rev C memory timings suspend/resume

2009-05-07 Thread Paul Walmsley

Hello Jean,

one other suggestion.  You mentioned that you had self-refresh working on 
another OMAP3430 board with two SDRAM chip-selects.  You might consider 
dumping the SDRC registers from that board, and dumping the SDRC registers 
on Beagle rev C, and comparing.  It could be that the bootloader on your 
other board is setting some important bit.


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


Re: [PATCH 3/6] omap iommu: omap3 iommu device registration

2009-05-07 Thread Felipe Contreras
On Wed, May 6, 2009 at 9:00 AM, Hiroshi DOYU hiroshi.d...@nokia.com wrote:
 From: ext Felipe Contreras felipe.contre...@gmail.com
 Subject: Re: [PATCH 3/6] omap iommu: omap3 iommu device registration
 Date: Tue, 5 May 2009 21:32:34 +0200

 On Tue, May 5, 2009 at 3:47 PM, Hiroshi DOYU hiroshi.d...@nokia.com wrote:
  Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com
  ---
 
   arch/arm/mach-omap2/omap3-iommu.c |  105 
  +
   1 files changed, 105 insertions(+), 0 deletions(-)
   create mode 100644 arch/arm/mach-omap2/omap3-iommu.c
 
  diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
  b/arch/arm/mach-omap2/omap3-iommu.c
  new file mode 100644
  index 000..367f36a
  --- /dev/null
  +++ b/arch/arm/mach-omap2/omap3-iommu.c
  @@ -0,0 +1,105 @@
  +/*
  + * omap iommu: omap3 device registration
  + *
  + * Copyright (C) 2008-2009 Nokia Corporation
  + *
  + * Written by Hiroshi DOYU hiroshi.d...@nokia.com
  + *
  + * This program is free software; you can redistribute it and/or modify
  + * it under the terms of the GNU General Public License version 2 as
  + * published by the Free Software Foundation.
  + */
  +
  +#include linux/platform_device.h
  +
  +#include mach/iommu.h
  +
  +#define OMAP3_MMU1_BASE        0x480bd400
  +#define OMAP3_MMU2_BASE        0x5d00
  +#define OMAP3_MMU1_IRQ 24
  +#define OMAP3_MMU2_IRQ 28
  +
  +static struct resource omap3_iommu_res[] = {
  +       { /* Camera ISP MMU */
  +               .start          = OMAP3_MMU1_BASE,
  +               .end            = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
  +               .flags          = IORESOURCE_MEM,
  +       },
  +       {
  +               .start          = OMAP3_MMU1_IRQ,
  +               .flags          = IORESOURCE_IRQ,
  +       },
  +       { /* IVA2.2 MMU */
  +               .start          = OMAP3_MMU2_BASE,
  +               .end            = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
  +               .flags          = IORESOURCE_MEM,
  +       },
  +       {
  +               .start          = OMAP3_MMU2_IRQ,
  +               .flags          = IORESOURCE_IRQ,
  +       },
  +};

 This will break TI's bridgedriver, right?

 Working around is easy, but let's go forward, correcting TI's bridgedriver;-)

 http://marc.info/?l=linux-omapm=124148814309478w=2

*sigh*

I can't recall how many times I've asked for this, I'm sending a patch
series (RFC) that allows exactly what I want.

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


Re: [PATCH 3/6] omap iommu: omap3 iommu device registration

2009-05-07 Thread Felipe Contreras
On Tue, May 5, 2009 at 3:47 PM, Hiroshi DOYU hiroshi.d...@nokia.com wrote:
 Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com
 ---

  arch/arm/mach-omap2/omap3-iommu.c |  105 
 +
  1 files changed, 105 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/mach-omap2/omap3-iommu.c

 diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
 b/arch/arm/mach-omap2/omap3-iommu.c
 new file mode 100644
 index 000..367f36a
 --- /dev/null
 +++ b/arch/arm/mach-omap2/omap3-iommu.c
 @@ -0,0 +1,105 @@
 +/*
 + * omap iommu: omap3 device registration
 + *
 + * Copyright (C) 2008-2009 Nokia Corporation
 + *
 + * Written by Hiroshi DOYU hiroshi.d...@nokia.com
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + */
 +
 +#include linux/platform_device.h
 +
 +#include mach/iommu.h
 +
 +#define OMAP3_MMU1_BASE        0x480bd400
 +#define OMAP3_MMU2_BASE        0x5d00
 +#define OMAP3_MMU1_IRQ 24
 +#define OMAP3_MMU2_IRQ 28
 +
 +static struct resource omap3_iommu_res[] = {
 +       { /* Camera ISP MMU */
 +               .start          = OMAP3_MMU1_BASE,
 +               .end            = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
 +               .flags          = IORESOURCE_MEM,
 +       },
 +       {
 +               .start          = OMAP3_MMU1_IRQ,
 +               .flags          = IORESOURCE_IRQ,
 +       },
 +       { /* IVA2.2 MMU */
 +               .start          = OMAP3_MMU2_BASE,
 +               .end            = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
 +               .flags          = IORESOURCE_MEM,
 +       },
 +       {
 +               .start          = OMAP3_MMU2_IRQ,
 +               .flags          = IORESOURCE_IRQ,
 +       },
 +};
 +#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)

snip/

 +               err = platform_device_add_resources(pdev,
 +                                   omap3_iommu_res[2 * i], NR_IOMMU_RES);

This is wrong. In this particular case NR_IOMMU_RES is 2, but not
because there's 2 resources: MEM and IRQ, but because there's 2 iommu
devices: isp and iva2.

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


[RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration

2009-05-07 Thread Felipe Contreras
This patch series cleanups up a bit the opap3-iommu device registration and
then allows registration from other parts of the code.

Currently the iva2 code (tidspbridge) is not using iommu, therefore it can't be
used as-is with the current omap iommu. By allowing devies to be registered
externaly (either isp, or iva2) this problem goes away.

Felipe Contreras (3):
  omap3-iommu: reorganize
  omap3-iommu: split init function into omap_iommu_add
  omap3-iommu: remote registration

 arch/arm/mach-omap2/omap3-iommu.c   |  130 ++-
 arch/arm/plat-omap/include/mach/iommu.h |2 +
 2 files changed, 62 insertions(+), 70 deletions(-)

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


[RFC/PATCH 1/3] omap3-iommu: reorganize

2009-05-07 Thread Felipe Contreras
No functional changes.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 arch/arm/mach-omap2/omap3-iommu.c |   72 ++--
 1 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
b/arch/arm/mach-omap2/omap3-iommu.c
index 367f36a..f4232ec 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -14,43 +14,31 @@
 
 #include mach/iommu.h
 
-#define OMAP3_MMU1_BASE0x480bd400
-#define OMAP3_MMU2_BASE0x5d00
-#define OMAP3_MMU1_IRQ 24
-#define OMAP3_MMU2_IRQ 28
-
-static struct resource omap3_iommu_res[] = {
-   { /* Camera ISP MMU */
-   .start  = OMAP3_MMU1_BASE,
-   .end= OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   {
-   .start  = OMAP3_MMU1_IRQ,
-   .flags  = IORESOURCE_IRQ,
-   },
-   { /* IVA2.2 MMU */
-   .start  = OMAP3_MMU2_BASE,
-   .end= OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   {
-   .start  = OMAP3_MMU2_IRQ,
-   .flags  = IORESOURCE_IRQ,
-   },
+struct iommu_device {
+   resource_size_t base;
+   resource_size_t irq;
+   struct iommu_platform_data pdata;
+   struct resource res[2];
 };
-#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)
 
-static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
+static struct iommu_device devices[] = {
{
-   .name = isp,
-   .nr_tlb_entries = 8,
-   .clk_name = cam_ick,
+   .base = 0x480bd400,
+   .irq = 24,
+   .pdata = {
+   .name = isp,
+   .nr_tlb_entries = 8,
+   .clk_name = cam_ick,
+   },
},
{
-   .name = iva2,
-   .nr_tlb_entries = 32,
-   .clk_name = iva2_ck,
+   .base = 0x5d00,
+   .irq = 28,
+   .pdata = {
+   .name = iva2,
+   .nr_tlb_entries = 32,
+   .clk_name = iva2_ck,
+   },
},
 };
 #define NR_IOMMU_DEVICES ARRAY_SIZE(omap3_iommu_pdata)
@@ -63,23 +51,35 @@ static int __init omap3_iommu_init(void)
 
for (i = 0; i  NR_IOMMU_DEVICES; i++) {
struct platform_device *pdev;
+   const struct iommu_device *d = devices[i];
+   struct resource res[] = {
+   { .flags = IORESOURCE_MEM },
+   { .flags = IORESOURCE_IRQ },
+   };
 
pdev = platform_device_alloc(omap-iommu, i + 1);
if (!pdev) {
err = -ENOMEM;
goto err_out;
}
-   err = platform_device_add_resources(pdev,
-   omap3_iommu_res[2 * i], NR_IOMMU_RES);
+
+   res[0].start = d-base;
+   res[0].end = d-base + MMU_REG_SIZE - 1;
+
+   res[1].start = d-irq;
+
+   err = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
if (err)
goto err_out;
-   err = platform_device_add_data(pdev, omap3_iommu_pdata[i],
-  sizeof(omap3_iommu_pdata[0]));
+
+   err = platform_device_add_data(pdev, d-pdata, 
sizeof(d-pdata));
if (err)
goto err_out;
+
err = platform_device_add(pdev);
if (err)
goto err_out;
+
omap3_iommu_pdev[i] = pdev;
}
return 0;
-- 
1.6.3.GIT

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


[RFC/PATCH 2/3] omap3-iommu: split init function into omap_iommu_add

2009-05-07 Thread Felipe Contreras
In preparation for external registration.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 arch/arm/mach-omap2/omap3-iommu.c |   76 -
 1 files changed, 49 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
b/arch/arm/mach-omap2/omap3-iommu.c
index f4232ec..149c624 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -45,43 +45,65 @@ static struct iommu_device devices[] = {
 
 static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES];
 
-static int __init omap3_iommu_init(void)
+static struct platform_device *omap_iommu_add(const char *name)
 {
-   int i, err;
-
-   for (i = 0; i  NR_IOMMU_DEVICES; i++) {
-   struct platform_device *pdev;
-   const struct iommu_device *d = devices[i];
-   struct resource res[] = {
-   { .flags = IORESOURCE_MEM },
-   { .flags = IORESOURCE_IRQ },
-   };
-
-   pdev = platform_device_alloc(omap-iommu, i + 1);
-   if (!pdev) {
-   err = -ENOMEM;
-   goto err_out;
+   struct platform_device *pdev;
+   const struct iommu_device *d = NULL;
+   struct resource res[] = {
+   { .flags = IORESOURCE_MEM },
+   { .flags = IORESOURCE_IRQ },
+   };
+   int err, i;
+
+   for (i = 0; i  ARRAY_SIZE(devices); i++)
+   if (strcmp(devices[i].pdata.name, name) == 0) {
+   d = devices[i];
+   break;
}
 
-   res[0].start = d-base;
-   res[0].end = d-base + MMU_REG_SIZE - 1;
+   if (!d)
+   return NULL;
 
-   res[1].start = d-irq;
+   pdev = platform_device_alloc(omap-iommu, i + 1);
+   if (!pdev)
+   return NULL;
 
-   err = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
-   if (err)
-   goto err_out;
+   res[0].start = d-base;
+   res[0].end = d-base + MMU_REG_SIZE - 1;
 
-   err = platform_device_add_data(pdev, d-pdata, 
sizeof(d-pdata));
-   if (err)
-   goto err_out;
+   res[1].start = d-irq;
 
-   err = platform_device_add(pdev);
-   if (err)
-   goto err_out;
+   err = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
+   if (err)
+   goto err_out;
+
+   err = platform_device_add_data(pdev, d-pdata, sizeof(d-pdata));
+   if (err)
+   goto err_out;
+
+   err = platform_device_add(pdev);
+   if (err)
+   goto err_out;
+
+   return pdev;
 
+err_out:
+   platform_device_put(pdev);
+   return NULL;
+}
+
+static int __init omap3_iommu_init(void)
+{
+   struct platform_device *pdev;
+   int i, err;
+
+   for (i = 0; i  ARRAY_SIZE(devices); i++) {
+   pdev = omap_iommu_add(devices[i].pdata.name);
+   if (!pdev)
+   goto err_out;
omap3_iommu_pdev[i] = pdev;
}
+
return 0;
 
 err_out:
-- 
1.6.3.GIT

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


[RFC/PATCH 3/3] omap3-iommu: remote registration

2009-05-07 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 arch/arm/mach-omap2/omap3-iommu.c   |   36 +-
 arch/arm/plat-omap/include/mach/iommu.h |2 +
 2 files changed, 4 insertions(+), 34 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
b/arch/arm/mach-omap2/omap3-iommu.c
index 149c624..8380cd5 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -41,11 +41,8 @@ static struct iommu_device devices[] = {
},
},
 };
-#define NR_IOMMU_DEVICES ARRAY_SIZE(omap3_iommu_pdata)
 
-static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES];
-
-static struct platform_device *omap_iommu_add(const char *name)
+struct platform_device *omap_iommu_add(const char *name)
 {
struct platform_device *pdev;
const struct iommu_device *d = NULL;
@@ -91,36 +88,7 @@ err_out:
platform_device_put(pdev);
return NULL;
 }
-
-static int __init omap3_iommu_init(void)
-{
-   struct platform_device *pdev;
-   int i, err;
-
-   for (i = 0; i  ARRAY_SIZE(devices); i++) {
-   pdev = omap_iommu_add(devices[i].pdata.name);
-   if (!pdev)
-   goto err_out;
-   omap3_iommu_pdev[i] = pdev;
-   }
-
-   return 0;
-
-err_out:
-   while (i--)
-   platform_device_put(omap3_iommu_pdev[i]);
-   return err;
-}
-module_init(omap3_iommu_init);
-
-static void __exit omap3_iommu_exit(void)
-{
-   int i;
-
-   for (i = 0; i  NR_IOMMU_DEVICES; i++)
-   platform_device_unregister(omap3_iommu_pdev[i]);
-}
-module_exit(omap3_iommu_exit);
+EXPORT_SYMBOL_GPL(omap_iommu_add);
 
 MODULE_AUTHOR(Hiroshi DOYU);
 MODULE_DESCRIPTION(omap iommu: omap3 device registration);
diff --git a/arch/arm/plat-omap/include/mach/iommu.h 
b/arch/arm/plat-omap/include/mach/iommu.h
index 769b00b..e22a4a4 100644
--- a/arch/arm/plat-omap/include/mach/iommu.h
+++ b/arch/arm/plat-omap/include/mach/iommu.h
@@ -165,4 +165,6 @@ extern int foreach_iommu_device(void *data,
 extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf);
 extern size_t dump_tlb_entries(struct iommu *obj, char *buf);
 
+struct platform_device *omap_iommu_add(const char *name);
+
 #endif /* __MACH_IOMMU_H */
-- 
1.6.3.GIT

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


RE: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration

2009-05-07 Thread Kanigeri, Hari
 Currently the iva2 code (tidspbridge) is not using iommu, therefore it
 can't be
 used as-is with the current omap iommu. 

Bridge can use IOMMU module that Hiroshi has sent by calling below 2 lines of 
code. 

struct iommu *iva_iommu_ptr;
iva_iommu_ptr = iommu_get(iva2);


Thank you,
Best regards,
Hari

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Felipe Contreras
 Sent: Thursday, May 07, 2009 3:11 PM
 To: linux-omap@vger.kernel.org
 Cc: Hiroshi DOYU; Felipe Contreras; Tony Lindgren; Felipe Contreras
 Subject: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration
 
 This patch series cleanups up a bit the opap3-iommu device registration
 and
 then allows registration from other parts of the code.
 
 Currently the iva2 code (tidspbridge) is not using iommu, therefore it
 can't be
 used as-is with the current omap iommu. By allowing devies to be
 registered
 externaly (either isp, or iva2) this problem goes away.
 
 Felipe Contreras (3):
   omap3-iommu: reorganize
   omap3-iommu: split init function into omap_iommu_add
   omap3-iommu: remote registration
 
  arch/arm/mach-omap2/omap3-iommu.c   |  130 ++
 -
  arch/arm/plat-omap/include/mach/iommu.h |2 +
  2 files changed, 62 insertions(+), 70 deletions(-)
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

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


Re: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration

2009-05-07 Thread Felipe Contreras
On Thu, May 7, 2009 at 11:28 PM, Kanigeri, Hari h-kanige...@ti.com wrote:
 Currently the iva2 code (tidspbridge) is not using iommu, therefore it
 can't be
 used as-is with the current omap iommu.

 Bridge can use IOMMU module that Hiroshi has sent by calling below 2 lines of 
 code.

 struct iommu *iva_iommu_ptr;
 iva_iommu_ptr = iommu_get(iva2);

From where? Care to send an actual patch?

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


[PATCH 0/5] More header clean-up

2009-05-07 Thread Tony Lindgren
Hi all,

This series cleans up the conflicting defines a bit more.
Now the biggest problem is till in clock24xx.h, but at least the
conflict is local. Now changing the processors should not cause
everything to be rebuilt..

The first patch also fixes the CONFIG_SPINLOCK_DEBUG problem where
sched_clock was called before we have things initialized.

This series causes some updates to the other pending patch series,
like the PM series. But it would be nice to get in before we add
more code.

Kevin, the 2/5 is improved version of what I sent you earlier,
the earlier version had issues between 2420 vs 2430. Let me
know if the other patches cause big headaches for your PM
series.

Regards,

Tony

---

Tony Lindgren (5):
  ARM: OMAP2/3: Remove OMAP_CM_REGADDR
  ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
  ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S
  ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
  ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE


 arch/arm/mach-omap2/clock24xx.c   |   21 ++--
 arch/arm/mach-omap2/clock24xx.h   |   11 ++
 arch/arm/mach-omap2/clock34xx.h   |2 
 arch/arm/mach-omap2/cm.h  |5 -
 arch/arm/mach-omap2/prm.h |  136 +
 arch/arm/mach-omap2/sdrc2xxx.c|5 +
 arch/arm/mach-omap2/sram242x.S|4 -
 arch/arm/mach-omap2/sram243x.S|4 -
 arch/arm/plat-omap/common.c   |   69 +++--
 arch/arm/plat-omap/include/mach/entry-macro.S |9 +-
 arch/arm/plat-omap/include/mach/omap24xx.h|   18 ---
 arch/arm/plat-omap/include/mach/omap34xx.h|9 --
 12 files changed, 170 insertions(+), 123 deletions(-)

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


[PATCH 1/5] ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

2009-05-07 Thread Tony Lindgren
Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK
calling sched_clock before we have things initialized:

http://patchwork.kernel.org/patch/15810/

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/sram242x.S |4 +-
 arch/arm/mach-omap2/sram243x.S |4 +-
 arch/arm/plat-omap/common.c|   69 
 arch/arm/plat-omap/include/mach/omap24xx.h |2 -
 arch/arm/plat-omap/include/mach/omap34xx.h |1 
 5 files changed, 62 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
index af4bd34..cbb8930 100644
--- a/arch/arm/mach-omap2/sram242x.S
+++ b/arch/arm/mach-omap2/sram242x.S
@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl:
 prcm_mask_val:
.word 0x3FFC
 omap242x_sdi_timer_32ksynct_cr:
-   .word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+   .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
 ENTRY(omap242x_sram_ddr_init_sz)
.word   . - omap242x_sram_ddr_init
 
@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl:
 ddr_prcm_mask_val:
.word 0x3FFC
 omap242x_srs_timer_32ksynct:
-   .word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+   .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
 
 ENTRY(omap242x_sram_reprogram_sdrc_sz)
.word   . - omap242x_sram_reprogram_sdrc
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
index 84363e2..054b0f3 100644
--- a/arch/arm/mach-omap2/sram243x.S
+++ b/arch/arm/mach-omap2/sram243x.S
@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl:
 prcm_mask_val:
.word 0x3FFC
 omap243x_sdi_timer_32ksynct_cr:
-   .word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+   .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
 ENTRY(omap243x_sram_ddr_init_sz)
.word   . - omap243x_sram_ddr_init
 
@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl:
 ddr_prcm_mask_val:
.word 0x3FFC
 omap243x_srs_timer_32ksynct:
-   .word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+   .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
 
 ENTRY(omap243x_sram_reprogram_sdrc_sz)
.word   . - omap243x_sram_reprogram_sdrc
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 433021f..e1add78 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -175,25 +175,61 @@ console_initcall(omap_add_serial_console);
  * but systems won't necessarily want to spend resources that way.
  */
 
-#if defined(CONFIG_ARCH_OMAP16XX)
-#define TIMER_32K_SYNCHRONIZED 0xfffbc410
-#elif defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
-#define TIMER_32K_SYNCHRONIZED (OMAP2_32KSYNCT_BASE + 0x10)
-#endif
+#define OMAP16XX_TIMER_32K_SYNCHRONIZED0xfffbc410
 
-#ifdef TIMER_32K_SYNCHRONIZED
+#if !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX))
 
 #include linux/clocksource.h
 
-static cycle_t omap_32k_read(struct clocksource *cs)
+#ifdef CONFIG_ARCH_OMAP16XX
+static cycle_t omap16xx_32k_read(struct clocksource *cs)
+{
+   return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED);
+}
+#else
+#define omap16xx_32k_read  NULL
+#endif
+
+#ifdef CONFIG_ARCH_OMAP2420
+static cycle_t omap2420_32k_read(struct clocksource *cs)
+{
+   return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10);
+}
+#else
+#define omap2420_32k_read  NULL
+#endif
+
+#ifdef CONFIG_ARCH_OMAP2430
+static cycle_t omap2430_32k_read(struct clocksource *cs)
+{
+   return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10);
+}
+#else
+#define omap2430_32k_read  NULL
+#endif
+
+#ifdef CONFIG_ARCH_OMAP34XX
+static cycle_t omap34xx_32k_read(struct clocksource *cs)
 {
-   return omap_readl(TIMER_32K_SYNCHRONIZED);
+   return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10);
+}
+#else
+#define omap34xx_32k_read  NULL
+#endif
+
+/*
+ * Kernel assumes that sched_clock can be called early but may not have
+ * things ready yet.
+ */
+static cycle_t omap_32k_read_dummy(struct clocksource *cs)
+{
+   return 0;
 }
 
 static struct clocksource clocksource_32k = {
.name   = 32k_counter,
.rating = 250,
-   .read   = omap_32k_read,
+   .read   = omap_32k_read_dummy,
.mask   = CLOCKSOURCE_MASK(32),
.shift  = 10,
.flags  = CLOCK_SOURCE_IS_CONTINUOUS,
@@ -207,7 +243,7 @@ unsigned long long sched_clock(void)
 {
unsigned long long ret;
 
-   ret = (unsigned long long)omap_32k_read(clocksource_32k);
+   ret = (unsigned long long)clocksource_32k.read(clocksource_32k);
ret = (ret * clocksource_32k.mult_orig)  clocksource_32k.shift;
return ret;
 }
@@ -220,6 +256,17 @@ static int __init omap_init_clocksource_32k(void)
if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
struct clk *sync_32k_ick;
 
+   if (cpu_is_omap16xx())
+   

[PATCH 2/5] ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE

2009-05-07 Thread Tony Lindgren
Remove OMAP_PRM_REGADDR and use processor specific defines instead.
Also remove now unused OMAP2_PRM_BASE.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/clock24xx.c|   21 ++--
 arch/arm/mach-omap2/clock24xx.h|9 ++
 arch/arm/mach-omap2/prm.h  |  136 +++-
 arch/arm/mach-omap2/sdrc2xxx.c |5 +
 arch/arm/plat-omap/include/mach/omap24xx.h |2 
 arch/arm/plat-omap/include/mach/omap34xx.h |1 
 6 files changed, 98 insertions(+), 76 deletions(-)

diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index efc59c4..54b8671 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -233,6 +233,8 @@ static struct prcm_config *curr_prcm_set;
 static struct clk *vclk;
 static struct clk *sclk;
 
+static void __iomem *prcm_clksrc_ctrl;
+
 /*-
  * Omap24xx specific clock functions
  *-*/
@@ -269,10 +271,9 @@ static int omap2_enable_osc_ck(struct clk *clk)
 {
u32 pcc;
 
-   pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+   pcc = __raw_readl(prcm_clksrc_ctrl);
 
-   __raw_writel(pcc  ~OMAP_AUTOEXTCLKMODE_MASK,
- OMAP24XX_PRCM_CLKSRC_CTRL);
+   __raw_writel(pcc  ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
 
return 0;
 }
@@ -281,10 +282,9 @@ static void omap2_disable_osc_ck(struct clk *clk)
 {
u32 pcc;
 
-   pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+   pcc = __raw_readl(prcm_clksrc_ctrl);
 
-   __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK,
- OMAP24XX_PRCM_CLKSRC_CTRL);
+   __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
 }
 
 static const struct clkops clkops_oscck = {
@@ -654,7 +654,7 @@ static u32 omap2_get_sysclkdiv(void)
 {
u32 div;
 
-   div = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+   div = __raw_readl(prcm_clksrc_ctrl);
div = OMAP_SYSCLKDIV_MASK;
div = OMAP_SYSCLKDIV_SHIFT;
 
@@ -714,10 +714,13 @@ int __init omap2_clk_init(void)
struct omap_clk *c;
u32 clkrate;
 
-   if (cpu_is_omap242x())
+   if (cpu_is_omap242x()) {
+   prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
cpu_mask = RATE_IN_242X;
-   else if (cpu_is_omap2430())
+   } else if (cpu_is_omap2430()) {
+   prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
cpu_mask = RATE_IN_243X;
+   }
 
clk_init(omap2_clk_functions);
 
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
index 88c5acb..f0e4480 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -24,6 +24,15 @@
 #include cm-regbits-24xx.h
 #include sdrc.h
 
+/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
+#ifdef CONFIG_ARCH_OMAP2420
+#define OMAP24XX_PRCM_CLKOUT_CTRL  OMAP2420_PRCM_CLKOUT_CTRL
+#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
+#else
+#define OMAP24XX_PRCM_CLKOUT_CTRL  OMAP2430_PRCM_CLKOUT_CTRL
+#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
+#endif
+
 static unsigned long omap2_table_mpu_recalc(struct clk *clk);
 static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
 static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index 826d326..2eb8399 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -16,17 +16,12 @@
 
 #include prcm-common.h
 
-#ifndef __ASSEMBLER__
-#define OMAP_PRM_REGADDR(module, reg)  \
-   IO_ADDRESS(OMAP2_PRM_BASE + (module) + (reg))
-#else
 #define OMAP2420_PRM_REGADDR(module, reg)  \
IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
 #define OMAP2430_PRM_REGADDR(module, reg)  \
IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
 #define OMAP34XX_PRM_REGADDR(module, reg)  \
IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))
-#endif
 
 /*
  * Architecture-specific global PRM registers
@@ -54,64 +49,79 @@
 #define OMAP243X_PRCM_CLKCFG_CTRL  OMAP2430_PRM_REGADDR(OMAP24XX_GR_MOD,   
\

OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET)
 
-/* These will disappear */
-#define OMAP24XX_PRCM_REVISION OMAP_PRM_REGADDR(OCP_MOD, 0x)
-#define OMAP24XX_PRCM_SYSCONFIGOMAP_PRM_REGADDR(OCP_MOD, 
0x0010)
-
-#define OMAP24XX_PRCM_IRQSTATUS_MPUOMAP_PRM_REGADDR(OCP_MOD, 0x0018)
-#define OMAP24XX_PRCM_IRQENABLE_MPUOMAP_PRM_REGADDR(OCP_MOD, 0x001c)
-
-#define OMAP24XX_PRCM_VOLTST   OMAP_PRM_REGADDR(OCP_MOD, 0x0054)

[PATCH 3/5] ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

2009-05-07 Thread Tony Lindgren
Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/include/mach/entry-macro.S |9 ++---
 arch/arm/plat-omap/include/mach/omap24xx.h|2 --
 arch/arm/plat-omap/include/mach/omap34xx.h|1 -
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S 
b/arch/arm/plat-omap/include/mach/entry-macro.S
index 2276f89..33256a0 100644
--- a/arch/arm/plat-omap/include/mach/entry-macro.S
+++ b/arch/arm/plat-omap/include/mach/entry-macro.S
@@ -58,11 +58,14 @@
 #endif
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
 
-#if defined(CONFIG_ARCH_OMAP24XX)
 #include mach/omap24xx.h
-#endif
-#if defined(CONFIG_ARCH_OMAP34XX)
 #include mach/omap34xx.h
+
+/* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */
+#if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430)
+#define OMAP2_VA_IC_BASE   IO_ADDRESS(OMAP24XX_IC_BASE)
+#elif defined(CONFIG_ARCH_OMAP34XX)
+#define OMAP2_VA_IC_BASE   IO_ADDRESS(OMAP34XX_IC_BASE)
 #endif
 
 #define INTCPS_SIR_IRQ_OFFSET  0x0040  /* Active interrupt offset */
diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h 
b/arch/arm/plat-omap/include/mach/omap24xx.h
index 10a6413..4ce9b6a 100644
--- a/arch/arm/plat-omap/include/mach/omap24xx.h
+++ b/arch/arm/plat-omap/include/mach/omap24xx.h
@@ -89,13 +89,11 @@
 
 #define OMAP2_PRCM_BASEOMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE  OMAP2420_CM_BASE
-#define OMAP2_VA_IC_BASE   IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
 #define OMAP2_PRCM_BASEOMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE  OMAP2430_CM_BASE
-#define OMAP2_VA_IC_BASE   IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #endif
 
diff --git a/arch/arm/plat-omap/include/mach/omap34xx.h 
b/arch/arm/plat-omap/include/mach/omap34xx.h
index 4233064..36c99ca 100644
--- a/arch/arm/plat-omap/include/mach/omap34xx.h
+++ b/arch/arm/plat-omap/include/mach/omap34xx.h
@@ -86,7 +86,6 @@
 #if defined(CONFIG_ARCH_OMAP3430)
 
 #define OMAP2_CM_BASE  OMAP3430_CM_BASE
-#define OMAP2_VA_IC_BASE   IO_ADDRESS(OMAP34XX_IC_BASE)
 
 #endif
 

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


[PATCH 4/5] ARM: OMAP2/3: Remove OMAP2_PRCM_BASE

2009-05-07 Thread Tony Lindgren
It's currently unused, and processor specific defines should
be used instead.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/include/mach/omap24xx.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h 
b/arch/arm/plat-omap/include/mach/omap24xx.h
index 4ce9b6a..60f8324 100644
--- a/arch/arm/plat-omap/include/mach/omap24xx.h
+++ b/arch/arm/plat-omap/include/mach/omap24xx.h
@@ -87,12 +87,10 @@
 
 #if defined(CONFIG_ARCH_OMAP2420)
 
-#define OMAP2_PRCM_BASEOMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE  OMAP2420_CM_BASE
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
-#define OMAP2_PRCM_BASEOMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE  OMAP2430_CM_BASE
 
 #endif

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


[PATCH 5/5] ARM: OMAP2/3: Remove OMAP_CM_REGADDR

2009-05-07 Thread Tony Lindgren
Processor specific macros should be used instead.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/clock24xx.h|2 ++
 arch/arm/mach-omap2/clock34xx.h|2 ++
 arch/arm/mach-omap2/cm.h   |5 -
 arch/arm/plat-omap/include/mach/omap24xx.h |   10 --
 arch/arm/plat-omap/include/mach/omap34xx.h |6 --
 5 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
index f0e4480..458f00c 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -26,9 +26,11 @@
 
 /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
 #ifdef CONFIG_ARCH_OMAP2420
+#define OMAP_CM_REGADDROMAP2420_CM_REGADDR
 #define OMAP24XX_PRCM_CLKOUT_CTRL  OMAP2420_PRCM_CLKOUT_CTRL
 #define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
 #else
+#define OMAP_CM_REGADDROMAP2430_CM_REGADDR
 #define OMAP24XX_PRCM_CLKOUT_CTRL  OMAP2430_PRCM_CLKOUT_CTRL
 #define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
 #endif
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 017a30e..496f0e9 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -27,6 +27,8 @@
 #include prm.h
 #include prm-regbits-34xx.h
 
+#define OMAP_CM_REGADDROMAP34XX_CM_REGADDR
+
 static unsigned long omap3_dpll_recalc(struct clk *clk);
 static unsigned long omap3_clkoutx2_recalc(struct clk *clk);
 static void omap3_dpll_allow_idle(struct clk *clk);
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index 65fdf78..04c5fc5 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -16,17 +16,12 @@
 
 #include prcm-common.h
 
-#ifndef __ASSEMBLER__
-#define OMAP_CM_REGADDR(module, reg)   \
-   IO_ADDRESS(OMAP2_CM_BASE + (module) + (reg))
-#else
 #define OMAP2420_CM_REGADDR(module, reg)   \
IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
 #define OMAP2430_CM_REGADDR(module, reg)   \
IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
 #define OMAP34XX_CM_REGADDR(module, reg)   \
IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
-#endif
 
 /*
  * Architecture-specific global CM registers
diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h 
b/arch/arm/plat-omap/include/mach/omap24xx.h
index 60f8324..696edfc 100644
--- a/arch/arm/plat-omap/include/mach/omap24xx.h
+++ b/arch/arm/plat-omap/include/mach/omap24xx.h
@@ -85,15 +85,5 @@
 #define OMAP24XX_SEC_AES_BASE  (OMAP24XX_SEC_BASE + 0x6000)
 #define OMAP24XX_SEC_PKA_BASE  (OMAP24XX_SEC_BASE + 0x8000)
 
-#if defined(CONFIG_ARCH_OMAP2420)
-
-#define OMAP2_CM_BASE  OMAP2420_CM_BASE
-
-#elif defined(CONFIG_ARCH_OMAP2430)
-
-#define OMAP2_CM_BASE  OMAP2430_CM_BASE
-
-#endif
-
 #endif /* __ASM_ARCH_OMAP24XX_H */
 
diff --git a/arch/arm/plat-omap/include/mach/omap34xx.h 
b/arch/arm/plat-omap/include/mach/omap34xx.h
index 36c99ca..cc25733 100644
--- a/arch/arm/plat-omap/include/mach/omap34xx.h
+++ b/arch/arm/plat-omap/include/mach/omap34xx.h
@@ -83,12 +83,6 @@
 
 #define OMAP34XX_MAILBOX_BASE  (L4_34XX_BASE + 0x94000)
 
-#if defined(CONFIG_ARCH_OMAP3430)
-
-#define OMAP2_CM_BASE  OMAP3430_CM_BASE
-
-#endif
-
 #define OMAP34XX_DSP_BASE  0x5800
 #define OMAP34XX_DSP_MEM_BASE  (OMAP34XX_DSP_BASE + 0x0)
 #define OMAP34XX_DSP_IPI_BASE  (OMAP34XX_DSP_BASE + 0x100)

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


Re: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Tony Lindgren
* Santosh Shilimkar santosh.shilim...@ti.com [090507 00:29]:
 This patch adds SMP platform files support for OMAP4430SDP. TI's OMAP4430
 SOC is based on ARM Cortex-A9 SMP architecture. It's a dual core SOC
 with GIC used for interrupt handling and SCU for cache coherency.
 
 Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
 ---
  arch/arm/mach-omap2/omap-headsmp.S|   49 +++
  arch/arm/mach-omap2/omap-smp.c|  238 
 +
  arch/arm/plat-omap/include/mach/scu.h |   28 
  arch/arm/plat-omap/include/mach/smp.h |   56 
  4 files changed, 371 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/mach-omap2/omap-headsmp.S
  create mode 100644 arch/arm/mach-omap2/omap-smp.c
  create mode 100644 arch/arm/plat-omap/include/mach/scu.h
  create mode 100644 arch/arm/plat-omap/include/mach/smp.h

snip snip
 
 --- /dev/null
 +++ b/arch/arm/mach-omap2/omap-smp.c
 @@ -0,0 +1,238 @@
 +/*
 + * OMAP4 SMP source file. It contains platform specific fucntions
 + * needed for the linux smp kernel.
 + *
 + * Copyright (C) 2009 Texas Instruments, Inc.
 + *
 + * Author:
 + *  Santosh Shilimkar santosh.shilim...@ti.com
 + *
 + * Platform file needed for the OMAP4 SMP. This file is based on arm
 + * realview smp platform.
 + * * Copyright (c) 2002 ARM Limited.
 + *
 + * 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/init.h
 +#include linux/errno.h
 +#include linux/delay.h
 +#include linux/device.h
 +#include linux/jiffies.h
 +#include linux/smp.h
 +#include linux/io.h
 +
 +#include asm/cacheflush.h
 +#include mach/scu.h
 +#include mach/hardware.h
 +#include asm/mach-types.h
 +
 +/* Registers used for communicating startup information */
 +#define OMAP4_AUXCOREBOOT_REG0   (OMAP44XX_VA_WKUPGEN_BASE + 
 0x800)
 +#define OMAP4_AUXCOREBOOT_REG1   (OMAP44XX_VA_WKUPGEN_BASE + 
 0x804)
 +
 +/* FIXME: Move to a common header file */
 +extern void omap_secondary_startup(void);

How about move this to cpu.h?

Regards,

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


Re: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Tony Lindgren
One more comment on this patch below.

* Santosh Shilimkar santosh.shilim...@ti.com [090507 00:29]:
 This patch adds SMP platform files support for OMAP4430SDP. TI's OMAP4430
 SOC is based on ARM Cortex-A9 SMP architecture. It's a dual core SOC
 with GIC used for interrupt handling and SCU for cache coherency.
 
 Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
 ---
  arch/arm/mach-omap2/omap-headsmp.S|   49 +++
  arch/arm/mach-omap2/omap-smp.c|  238 
 +
  arch/arm/plat-omap/include/mach/scu.h |   28 
  arch/arm/plat-omap/include/mach/smp.h |   56 
  4 files changed, 371 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/mach-omap2/omap-headsmp.S
  create mode 100644 arch/arm/mach-omap2/omap-smp.c
  create mode 100644 arch/arm/plat-omap/include/mach/scu.h
  create mode 100644 arch/arm/plat-omap/include/mach/smp.h
 

 diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
 new file mode 100644
 index 000..1d18acb
 --- /dev/null
 +++ b/arch/arm/mach-omap2/omap-smp.c

snip snip

 +int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 +{
 + unsigned long timeout;
 +
 + /*
 +  * Set synchronisation state between this boot processor
 +  * and the secondary one
 +  */
 + spin_lock(boot_lock);
 +
 + /*
 +  * The secondary processor is waiting for an event to come out of
 +  * wfe. Release it, then wait for it to flag that it has been
 +  * released by resetting cpu_release.
 +  *
 +  * Singal the ROM code that the secondary core can be released
 +  */
 + cpu_release = cpu;
 + __raw_writel(cpu, OMAP4_AUXCOREBOOT_REG1);
 + flush_cache_all();
 + /*
 +  * Send a 'sev' to wake the secondary core again because
 +  * ROM code will put core in WFE till the cpu_release
 +  * flag is set.
 +  */
 + set_event();
 + mb();
 +
 + timeout = jiffies + (1 * HZ);
 + while (time_before(jiffies, timeout)) {
 + smp_rmb();
 + if (cpu_release == -1)
 + break;
 +
 + udelay(10);
 + }
 +
 + /*
 +  * Now the secondary core is starting up let it run its
 +  * calibrations, then wait for it to finish
 +  */
 + spin_unlock(boot_lock);
 +
 + return cpu_release != -1 ? -ENOSYS : 0;
 +}

The Singal should be Signal above :)

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


RE: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration

2009-05-07 Thread Kanigeri, Hari
 -Original Message-
 From: Felipe Contreras [mailto:felipe.contre...@gmail.com]
 Sent: Thursday, May 07, 2009 3:40 PM
 To: Kanigeri, Hari
 Cc: linux-omap@vger.kernel.org; Hiroshi DOYU; Felipe Contreras; Tony
 Lindgren
 Subject: Re: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration
 
 On Thu, May 7, 2009 at 11:28 PM, Kanigeri, Hari h-kanige...@ti.com
 wrote:
  Currently the iva2 code (tidspbridge) is not using iommu, therefore it
  can't be
  used as-is with the current omap iommu.
 
  Bridge can use IOMMU module that Hiroshi has sent by calling below 2
 lines of code.
 
  struct iommu *iva_iommu_ptr;
  iva_iommu_ptr = iommu_get(iva2);
 
 From where? Care to send an actual patch?
 

I think it is in the initial set of patches that Hiroshi has sent some time ago.

He provided the link to it in this first email [patch 0/6].
http://marc.info/?l=linux-omapm=122087083712670w=2


Thank you,
Best regards,
Hari


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


Re: [RFC/PATCH 1/3] omap3-iommu: reorganize

2009-05-07 Thread Felipe Balbi
On Thu, May 07, 2009 at 10:11:07PM +0200, ext Felipe Contreras wrote:
 -static struct resource omap3_iommu_res[] = {
 - { /* Camera ISP MMU */
 - .start  = OMAP3_MMU1_BASE,
 - .end= OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
 - .flags  = IORESOURCE_MEM,
 - },
 - {
 - .start  = OMAP3_MMU1_IRQ,
 - .flags  = IORESOURCE_IRQ,
 - },
 - { /* IVA2.2 MMU */
 - .start  = OMAP3_MMU2_BASE,
 - .end= OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
 - .flags  = IORESOURCE_MEM,
 - },
 - {
 - .start  = OMAP3_MMU2_IRQ,
 - .flags  = IORESOURCE_IRQ,
 - },

i find this one much more readable :-s

 +struct iommu_device {
 + resource_size_t base;
 + resource_size_t irq;
 + struct iommu_platform_data pdata;

generally, platform_data is a void *. Don't know if it matters here.

 + struct resource res[2];
  };
 -#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)
  
 -static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
 +static struct iommu_device devices[] = {
   {
 - .name = isp,
 - .nr_tlb_entries = 8,
 - .clk_name = cam_ick,
 + .base = 0x480bd400,
 + .irq = 24,
 + .pdata = {
 + .name = isp,
 + .nr_tlb_entries = 8,
 + .clk_name = cam_ick,

still passing clk names ? what about clkdev ?

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


[PATCH 0/3] Support for OMAP3 Zoom2 board

2009-05-07 Thread Mikkel Christensen
The following patch series adds support for Zoom2 board.

The board has:
 - Modem attached to UART1
 - WLAN attached to UART2
 - GPS attached to UART3

An external debug board is included for console and LAN.

For details refer to this site:
http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp

Future work:
 - SMSC911x NFS mount problem
 - Low level debug uart need to use debug board
 - Dynamic detection of debug board presence

TI wiki with FAQs on getting this board booting:
https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=GettingStartedWithZoomII_AKA_OMAP34XII_MDP
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] OMAP3:zoom2: Makefile and Kconfig for Zoom2 board

2009-05-07 Thread Mikkel Christensen
This patch adds OMAP3 Zoom2 board to the Makefile and Kconfig.

Signed-off-by: Mikkel Christensen m...@ti.com
Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/mach-omap2/Kconfig  |4 
 arch/arm/mach-omap2/Makefile |4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 64ab386..0b16255 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -67,3 +67,7 @@ config MACH_OMAP_3430SDP
 config MACH_NOKIA_RX51
bool Nokia RX-51 board
depends on ARCH_OMAP3  ARCH_OMAP34XX
+
+config MACH_OMAP_ZOOM2
+   bool OMAP3 Zoom2 board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
\ No newline at end of file
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c49d9bf..fe4485f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -48,7 +48,9 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)   += 
board-3430sdp.o \
 obj-$(CONFIG_MACH_NOKIA_RX51)  += board-rx51.o \
   board-rx51-peripherals.o \
   mmc-twl4030.o
-
+obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2.o \
+  mmc-twl4030.o \
+  board-zoom2-debugboard.o
 # Platform specific device init code
 ifeq ($(CONFIG_USB_MUSB_SOC),y)
 obj-y  += usb-musb.o
-- 
1.5.4.3

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


[PATCH 1/3] OMAP3:zoom2: Add support for OMAP3 Zoom2 board

2009-05-07 Thread Mikkel Christensen
This patch creates the minimal OMAP3 Zoom2 board support.

Signed-off-by: Mikkel Christensen m...@ti.com
Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 arch/arm/mach-omap2/board-zoom2-debugboard.c |  150 ++
 arch/arm/mach-omap2/board-zoom2.c|  126 +
 2 files changed, 276 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom2-debugboard.c
 create mode 100644 arch/arm/mach-omap2/board-zoom2.c

diff --git a/arch/arm/mach-omap2/board-zoom2-debugboard.c 
b/arch/arm/mach-omap2/board-zoom2-debugboard.c
new file mode 100644
index 000..ae90f2b
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom2-debugboard.c
@@ -0,0 +1,150 @@
+/*
+ * arch/arm/mach-omap2/board-zoom2-debugboard.c
+ *
+ * OMAP3 Zoom2 debug board support.
+ *
+ * Copyright (C) 2009 Texas Instruments Inc.
+ * Mikkel Christensen m...@ti.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include linux/kernel.h
+#include linux/init.h
+#include linux/delay.h
+#include linux/serial_8250.h
+#include linux/serial_reg.h
+#include linux/smsc911x.h
+#include linux/io.h
+
+#include mach/common.h
+#include mach/board.h
+#include mach/gpio.h
+#include mach/gpmc.h
+
+#define ZOOM2_SMSC911X_CS  7
+#define ZOOM2_SMSC911X_GPIO158
+#define ZOOM2_QUADUART_CS  3
+#define ZOOM2_QUADUART_GPIO102
+#define QUART_CLK  1843200
+#define DEBUG_BASE 0x0800
+#define ZOOM2_ETHR_START   DEBUG_BASE
+
+static struct resource zoom2_smsc911x_resources[] = {
+   [0] = {
+   .start  = ZOOM2_ETHR_START,
+   .end= ZOOM2_ETHR_START + SZ_4K,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = 0,
+   .end= 0,
+   .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
+   },
+};
+
+static struct smsc911x_platform_config zoom2_smsc911x_config = {
+   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+   .flags  = SMSC911X_USE_32BIT,
+   .phy_interface  = PHY_INTERFACE_MODE_MII,
+};
+
+static struct platform_device zoom2_smsc911x_device = {
+   .name   = smsc911x,
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(zoom2_smsc911x_resources),
+   .resource   = zoom2_smsc911x_resources,
+   .dev= {
+   .platform_data = zoom2_smsc911x_config,
+   },
+};
+
+static inline void __init zoom2_init_smsc911x(void)
+{
+   int eth_cs;
+   unsigned long cs_mem_base;
+   int eth_gpio = 0;
+
+   eth_cs = ZOOM2_SMSC911X_CS;
+
+   if (gpmc_cs_request(eth_cs, SZ_16M, cs_mem_base)  0) {
+   printk(KERN_ERR Failed to request GPMC mem for smsc911x\n);
+   return;
+   }
+
+   zoom2_smsc911x_resources[0].start = cs_mem_base + 0x0;
+   zoom2_smsc911x_resources[0].end   = cs_mem_base + 0xff;
+   udelay(100);
+
+   eth_gpio = ZOOM2_SMSC911X_GPIO;
+
+   zoom2_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
+
+   if (gpio_request(eth_gpio, smsc911x irq)  0) {
+   printk(KERN_ERR Failed to request GPIO%d for smsc911x IRQ\n,
+   eth_gpio);
+   return;
+   }
+   gpio_direction_input(eth_gpio);
+}
+
+static struct plat_serial8250_port serial_platform_data[] = {
+   {
+   .membase= 0,
+   .mapbase= 0x1000,
+   .irq= OMAP_GPIO_IRQ(102),
+   .flags  = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+   .iotype = UPIO_MEM,
+   .regshift   = 1,
+   .uartclk= QUART_CLK,
+   }, {
+   .flags  = 0
+   }
+};
+
+static struct platform_device zoom2_debugboard_serial_device = {
+   .name   = serial8250,
+   .id = PLAT8250_DEV_PLATFORM1,
+   .dev= {
+   .platform_data  = serial_platform_data,
+   },
+};
+
+static inline void __init zoom2_init_quaduart(void)
+{
+   int quart_cs;
+   unsigned long cs_mem_base;
+   int quart_gpio = 0;
+
+   quart_cs = ZOOM2_QUADUART_CS;
+
+   if (gpmc_cs_request(quart_cs, SZ_1M, cs_mem_base)  0) {
+   printk(KERN_ERR Failed to request GPMC mem
+   for Quad UART(TL16CP754C)\n);
+   return;
+   }
+
+   quart_gpio = ZOOM2_QUADUART_GPIO;
+
+   if (gpio_request(quart_gpio, TL16CP754C GPIO)  0) {
+   printk(KERN_ERR Failed to request GPIO%d for TL16CP754C\n,
+   quart_gpio);
+   return;
+   }
+   

[PATCH 2/3] OMAP3:zoom2: Defconfig for Zoom2 board

2009-05-07 Thread Mikkel Christensen
This patch adds OMAP3 Zoom2 board defconfig.

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

diff --git a/arch/arm/configs/omap3_zoom2_defconfig 
b/arch/arm/configs/omap3_zoom2_defconfig
new file mode 100644
index 000..213fe9c
--- /dev/null
+++ b/arch/arm/configs/omap3_zoom2_defconfig
@@ -0,0 +1,1211 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc5
+# Fri Oct 10 11:49:41 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# 

Re: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Tony Lindgren
* stanley.miao stanley.m...@windriver.com [090507 07:59]:
 Tony Lindgren wrote:
 * Tony Lindgren t...@atomide.com [090505 21:00]:
   
 * Russell King - ARM Linux li...@arm.linux.org.uk [090505 12:52]:
 
 On Tue, Apr 28, 2009 at 03:42:37PM -0700, Tony Lindgren wrote:
   
 * Russell King - ARM Linux li...@arm.linux.org.uk [090428 15:07]:
 
 Tony, et.al.,

 Any ideas when more LDP support will be pushed into mainline (such as
 the framebuffer support)?
   
 I'll be looking at the board-*.c patches for the next merge window
 hopefully this week or next week.

 Looks like LDP keyboard, touchscreen  RTC are pretty much ready
 to go. Then the MMC has some regulator updates, but AFAIK the MMC
 should work OK already.

 For the framebuffer, Imre and Tomi know the status the best, so
 I've added them to Cc.

 Imre has been meaning to send a bunch of drivers/video/omap changes
 to the fbdev list for a while now and LDP framebuffer may depend on
 those. Imre, any news on the status of sending the fb patches
 upstream?

 Then there are the upcoming DSS patches from Tomi, but those still
 need some work before they're ready to go.
 
 Is there any news on this?  Will we see more functional OMAP3 / LDP
 support queued for the next merge window?
   
 Yes fro the stuff listed above, but still no news on the framebuffer
 patches. Imre?
 

 Added Stanley Miao to Cc. Here's an updated version of Stanley's patch to
 add fb support for LDP.

 I don't have an LDP, maybe you guys can give it a try against the mainline
 kernel and see if it works! There might be some changes needed to  
 drivers/video/omap/dispc.c too.. And those should be handled by Imre.

 But if this works, at least we can then add support for few more boards
 easily while waiting for Imre to send his updates.
   
 Hi, Tony,

 Now the kernel can't boot on LDP. The attached file is the boot log.

 I will check it when I have  time.

Looks like the get_dss_clocks() in dispc.c at least needs updating for
omap3. It should use clkdev too now btw.

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


Re: [RFC/PATCH 1/3] omap3-iommu: reorganize

2009-05-07 Thread Felipe Contreras
On Fri, May 8, 2009 at 12:14 AM, Felipe Balbi felipe.ba...@nokia.com wrote:
 On Thu, May 07, 2009 at 10:11:07PM +0200, ext Felipe Contreras wrote:
 -static struct resource omap3_iommu_res[] = {
 -     { /* Camera ISP MMU */
 -             .start          = OMAP3_MMU1_BASE,
 -             .end            = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
 -             .flags          = IORESOURCE_MEM,
 -     },
 -     {
 -             .start          = OMAP3_MMU1_IRQ,
 -             .flags          = IORESOURCE_IRQ,
 -     },
 -     { /* IVA2.2 MMU */
 -             .start          = OMAP3_MMU2_BASE,
 -             .end            = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
 -             .flags          = IORESOURCE_MEM,
 -     },
 -     {
 -             .start          = OMAP3_MMU2_IRQ,
 -             .flags          = IORESOURCE_IRQ,
 -     },

 i find this one much more readable :-s

You find an array of 'struct resource' more readable than this?

+   .base = 0x480bd400,
+   .irq = 24,

+   .base = 0x5d00,
+   .irq = 28,

+   res[0].start = d-base;
+   res[0].end = d-base + MMU_REG_SIZE - 1;
+
+   res[1].start = d-irq;

How would you calculate the number of resources per iommu device?

How about these?

-   err = platform_device_add_resources(pdev,
-   omap3_iommu_res[2 * i], NR_IOMMU_RES);
+   err = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
   if (err)
   goto err_out;
-   err = platform_device_add_data(pdev, omap3_iommu_pdata[i],
-  sizeof(omap3_iommu_pdata[0]));
+   err = platform_device_add_data(pdev, d-pdata,
sizeof(d-pdata));
   if (err)
   goto err_out;

Do you find the original version easier to read?

 +struct iommu_device {
 +     resource_size_t base;
 +     resource_size_t irq;
 +     struct iommu_platform_data pdata;

 generally, platform_data is a void *. Don't know if it matters here.

Yes but we need to set the actual contents for platform_device_add_data.

 +     struct resource res[2];
  };
 -#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)

 -static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
 +static struct iommu_device devices[] = {
       {
 -             .name = isp,
 -             .nr_tlb_entries = 8,
 -             .clk_name = cam_ick,
 +             .base = 0x480bd400,
 +             .irq = 24,
 +             .pdata = {
 +                     .name = isp,
 +                     .nr_tlb_entries = 8,
 +                     .clk_name = cam_ick,

 still passing clk names ? what about clkdev ?

That's for iommu to fix. I'm simply interested on decoupling iommu and
a hypothetical tidspbridge that doesn't exists yet.

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


RE: [PATCH] OMAP_LDP: Support LCD display as a FB device on ZOOM MDK (Re: LDP support)

2009-05-07 Thread Gadiyar, Anand
Stanley.miao wrote:
 Russell King - ARM Linux wrote:
  On Thu, May 07, 2009 at 11:01:35PM +0800, stanley.miao wrote:

  Hi, Tony,
 
  Now the kernel can't boot on LDP. The attached file is the boot log.
  
 
  No boot log found.
 
 

 Sorry, forgot to attach the boot log.
 
 It is linux-omap master branch.
 
 Stanley.

Looks like you used the CodeSourcery 2007q3 toolchain. This had been
reported earlier. Switching to 2008q3 works.

- Anand


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


Re: [PATCH 3/6] omap iommu: omap3 iommu device registration

2009-05-07 Thread Hiroshi DOYU
Hi Felipe,

From: ext Felipe Contreras felipe.contre...@gmail.com
Subject: Re: [PATCH 3/6] omap iommu: omap3 iommu device registration
Date: Thu, 7 May 2009 22:05:00 +0200

 On Tue, May 5, 2009 at 3:47 PM, Hiroshi DOYU hiroshi.d...@nokia.com wrote:
  Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com
  ---
 
   arch/arm/mach-omap2/omap3-iommu.c |  105 
  +
   1 files changed, 105 insertions(+), 0 deletions(-)
   create mode 100644 arch/arm/mach-omap2/omap3-iommu.c
 
  diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
  b/arch/arm/mach-omap2/omap3-iommu.c
  new file mode 100644
  index 000..367f36a
  --- /dev/null
  +++ b/arch/arm/mach-omap2/omap3-iommu.c
  @@ -0,0 +1,105 @@
  +/*
  + * omap iommu: omap3 device registration
  + *
  + * Copyright (C) 2008-2009 Nokia Corporation
  + *
  + * Written by Hiroshi DOYU hiroshi.d...@nokia.com
  + *
  + * This program is free software; you can redistribute it and/or modify
  + * it under the terms of the GNU General Public License version 2 as
  + * published by the Free Software Foundation.
  + */
  +
  +#include linux/platform_device.h
  +
  +#include mach/iommu.h
  +
  +#define OMAP3_MMU1_BASE        0x480bd400
  +#define OMAP3_MMU2_BASE        0x5d00
  +#define OMAP3_MMU1_IRQ 24
  +#define OMAP3_MMU2_IRQ 28
  +
  +static struct resource omap3_iommu_res[] = {
  +       { /* Camera ISP MMU */
  +               .start          = OMAP3_MMU1_BASE,
  +               .end            = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
  +               .flags          = IORESOURCE_MEM,
  +       },
  +       {
  +               .start          = OMAP3_MMU1_IRQ,
  +               .flags          = IORESOURCE_IRQ,
  +       },
  +       { /* IVA2.2 MMU */
  +               .start          = OMAP3_MMU2_BASE,
  +               .end            = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
  +               .flags          = IORESOURCE_MEM,
  +       },
  +       {
  +               .start          = OMAP3_MMU2_IRQ,
  +               .flags          = IORESOURCE_IRQ,
  +       },
  +};
  +#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)
 
 snip/
 
  +               err = platform_device_add_resources(pdev,
  +                                   omap3_iommu_res[2 * i], NR_IOMMU_RES);
 
 This is wrong. In this particular case NR_IOMMU_RES is 2, but not
 because there's 2 resources: MEM and IRQ, but because there's 2 iommu
 devices: isp and iva2.

Does the following make sense?

+#define NR_IOMMU_RES 2



+               err = platform_device_add_resources(pdev,
+                                   omap3_iommu_res +  i * NR_IOMMU_RES, 
NR_IOMMU_RES);
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration

2009-05-07 Thread Hiroshi DOYU
Hi Felipe,

From: ext Felipe Contreras felipe.contre...@gmail.com
Subject: [RFC/PATCH 0/3] omap3-iommu: cleanups and remote registration
Date: Thu, 7 May 2009 22:11:06 +0200

 This patch series cleanups up a bit the opap3-iommu device registration and
 then allows registration from other parts of the code.

I think that this part of code is just a simple conventional
platform_device registration and there may be no need to add more
complexicity by introducing a new special structure/function just for
a workaround of a client module(tidspbridge). Also having these
device registrations here and there doesn't look so nice, looking at
other ones around kernel.

 Currently the iva2 code (tidspbridge) is not using iommu, therefore it can't 
 be
 used as-is with the current omap iommu. By allowing devies to be registered
 externaly (either isp, or iva2) this problem goes away.

Fixing tidspbridge itself is the way to go, and it seems that Hari has
already verified this iommu with tidspbridge and he's pointed out some
of missing features(*1). I hope that tidspbridge will start to use
iommu soon.

*1: http://marc.info/?l=linux-omapm=124148814309478w=2




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


Re: [RFC/PATCH 1/3] omap3-iommu: reorganize

2009-05-07 Thread Hiroshi DOYU
From: Balbi Felipe (Nokia-D/Helsinki) felipe.ba...@nokia.com
Subject: Re: [RFC/PATCH 1/3] omap3-iommu: reorganize
Date: Thu, 7 May 2009 23:14:47 +0200

 On Thu, May 07, 2009 at 10:11:07PM +0200, ext Felipe Contreras wrote:
  -static struct resource omap3_iommu_res[] = {
  -   { /* Camera ISP MMU */
  -   .start  = OMAP3_MMU1_BASE,
  -   .end= OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
  -   .flags  = IORESOURCE_MEM,
  -   },
  -   {
  -   .start  = OMAP3_MMU1_IRQ,
  -   .flags  = IORESOURCE_IRQ,
  -   },
  -   { /* IVA2.2 MMU */
  -   .start  = OMAP3_MMU2_BASE,
  -   .end= OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
  -   .flags  = IORESOURCE_MEM,
  -   },
  -   {
  -   .start  = OMAP3_MMU2_IRQ,
  -   .flags  = IORESOURCE_IRQ,
  -   },
 
 i find this one much more readable :-s
 
  +struct iommu_device {
  +   resource_size_t base;
  +   resource_size_t irq;
  +   struct iommu_platform_data pdata;
 
 generally, platform_data is a void *. Don't know if it matters here.
 
  +   struct resource res[2];
   };
  -#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)
   
  -static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
  +static struct iommu_device devices[] = {
  {
  -   .name = isp,
  -   .nr_tlb_entries = 8,
  -   .clk_name = cam_ick,
  +   .base = 0x480bd400,
  +   .irq = 24,
  +   .pdata = {
  +   .name = isp,
  +   .nr_tlb_entries = 8,
  +   .clk_name = cam_ick,
 
 still passing clk names ? what about clkdev ?

Useful comment, I'll update mine;) thanks
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] ASoC: Added OMAP3 EVM support in ASoC.

2009-05-07 Thread Arun KS
On Thu, May 7, 2009 at 9:38 PM, Anuj Aggarwal anuj.aggar...@ti.com wrote:

 Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com
 ---
  sound/soc/omap/Kconfig    |    8 +++
  sound/soc/omap/Makefile   |    2 +
  sound/soc/omap/omap3evm.c |  147 
 +
  3 files changed, 157 insertions(+), 0 deletions(-)
  create mode 100644 sound/soc/omap/omap3evm.c

 diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
 index 675732e..b771238 100644
 --- a/sound/soc/omap/Kconfig
 +++ b/sound/soc/omap/Kconfig
 @@ -39,6 +39,14 @@ config SND_OMAP_SOC_OMAP2EVM
        help
          Say Y if you want to add support for SoC audio on the omap2evm board.

 +config SND_OMAP_SOC_OMAP3EVM
 +       tristate SoC Audio support for OMAP3EVM board
 +       depends on TWL4030_CORE  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_SDP3430
        tristate SoC Audio support for Texas Instruments SDP3430
        depends on TWL4030_CORE  SND_OMAP_SOC  MACH_OMAP_3430SDP
 diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
 index 0c9e4ac..a37f498 100644
 --- a/sound/soc/omap/Makefile
 +++ b/sound/soc/omap/Makefile
 @@ -10,6 +10,7 @@ snd-soc-n810-objs := n810.o
  snd-soc-osk5912-objs := osk5912.o
  snd-soc-overo-objs := overo.o
  snd-soc-omap2evm-objs := omap2evm.o
 +snd-soc-omap3evm-objs := omap3evm.o
  snd-soc-sdp3430-objs := sdp3430.o
  snd-soc-omap3pandora-objs := omap3pandora.o
  snd-soc-omap3beagle-objs := omap3beagle.o
 @@ -18,6 +19,7 @@ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
  obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
  obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
  obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
 +obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.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
 diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
 new file mode 100644
 index 000..2af5d93
 --- /dev/null
 +++ b/sound/soc/omap/omap3evm.c
 @@ -0,0 +1,147 @@
 +/*
 + * omap3evm.c  -- ALSA SoC support for OMAP3 EVM
 + *
 + * Author: Anuj Aggarwal anuj.aggar...@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, 2600,
 +                                    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 = {
 + 

RE: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Shilimkar, Santosh
 -Original Message-
 From: Tony Lindgren [mailto:t...@atomide.com] 
 Sent: Friday, May 08, 2009 2:17 AM
 To: Shilimkar, Santosh
 Cc: linux-arm-ker...@lists.arm.linux.org.uk; 
 linux-omap@vger.kernel.org
 Subject: Re: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files
 
 * Santosh Shilimkar santosh.shilim...@ti.com [090507 00:29]:
  This patch adds SMP platform files support for OMAP4430SDP. 
 TI's OMAP4430
  SOC is based on ARM Cortex-A9 SMP architecture. It's a dual core SOC
  with GIC used for interrupt handling and SCU for cache coherency.
  
  Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
  ---
   arch/arm/mach-omap2/omap-headsmp.S|   49 +++
   arch/arm/mach-omap2/omap-smp.c|  238 
 +
   arch/arm/plat-omap/include/mach/scu.h |   28 
   arch/arm/plat-omap/include/mach/smp.h |   56 
   4 files changed, 371 insertions(+), 0 deletions(-)
   create mode 100644 arch/arm/mach-omap2/omap-headsmp.S
   create mode 100644 arch/arm/mach-omap2/omap-smp.c
   create mode 100644 arch/arm/plat-omap/include/mach/scu.h
   create mode 100644 arch/arm/plat-omap/include/mach/smp.h
 
 snip snip
  
  --- /dev/null
  +++ b/arch/arm/mach-omap2/omap-smp.c
  @@ -0,0 +1,238 @@
  +/*
  + * OMAP4 SMP source file. It contains platform specific fucntions
  + * needed for the linux smp kernel.
  + *
  + * Copyright (C) 2009 Texas Instruments, Inc.
  + *
  + * Author:
  + *  Santosh Shilimkar santosh.shilim...@ti.com
  + *
  + * Platform file needed for the OMAP4 SMP. This file is 
 based on arm
  + * realview smp platform.
  + * * Copyright (c) 2002 ARM Limited.
  + *
  + * 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/init.h
  +#include linux/errno.h
  +#include linux/delay.h
  +#include linux/device.h
  +#include linux/jiffies.h
  +#include linux/smp.h
  +#include linux/io.h
  +
  +#include asm/cacheflush.h
  +#include mach/scu.h
  +#include mach/hardware.h
  +#include asm/mach-types.h
  +
  +/* Registers used for communicating startup information */
  +#define OMAP4_AUXCOREBOOT_REG0 
 (OMAP44XX_VA_WKUPGEN_BASE + 0x800)
  +#define OMAP4_AUXCOREBOOT_REG1 
 (OMAP44XX_VA_WKUPGEN_BASE + 0x804)
  +
  +/* FIXME: Move to a common header file */
  +extern void omap_secondary_startup(void);
 
 How about move this to cpu.h?
 
Possible. The thing is this functions should be available only for OMAP4 SMP. 
We may need #ifdef ARCH_OMAP4. Is that ok ? --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 0/5] More header clean-up

2009-05-07 Thread Shilimkar, Santosh
If this series is planned for this window then OMAP4 series also needs few 
changes. Is it ?

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Tony Lindgren
 Sent: Friday, May 08, 2009 2:12 AM
 To: linux-omap@vger.kernel.org
 Subject: [PATCH 0/5] More header clean-up
 
 Hi all,
 
 This series cleans up the conflicting defines a bit more.
 Now the biggest problem is till in clock24xx.h, but at least the
 conflict is local. Now changing the processors should not cause
 everything to be rebuilt..
 
 The first patch also fixes the CONFIG_SPINLOCK_DEBUG problem where
 sched_clock was called before we have things initialized.
 
 This series causes some updates to the other pending patch series,
 like the PM series. But it would be nice to get in before we add
 more code.
 
 Kevin, the 2/5 is improved version of what I sent you earlier,
 the earlier version had issues between 2420 vs 2430. Let me
 know if the other patches cause big headaches for your PM
 series.
 
 Regards,
 
 Tony
 
 ---
 
 Tony Lindgren (5):
   ARM: OMAP2/3: Remove OMAP_CM_REGADDR
   ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
   ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be 
 local to entry-macro.S
   ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
   ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE
 
 
  arch/arm/mach-omap2/clock24xx.c   |   21 ++--
  arch/arm/mach-omap2/clock24xx.h   |   11 ++
  arch/arm/mach-omap2/clock34xx.h   |2 
  arch/arm/mach-omap2/cm.h  |5 -
  arch/arm/mach-omap2/prm.h |  136 
 +
  arch/arm/mach-omap2/sdrc2xxx.c|5 +
  arch/arm/mach-omap2/sram242x.S|4 -
  arch/arm/mach-omap2/sram243x.S|4 -
  arch/arm/plat-omap/common.c   |   69 +++--
  arch/arm/plat-omap/include/mach/entry-macro.S |9 +-
  arch/arm/plat-omap/include/mach/omap24xx.h|   18 ---
  arch/arm/plat-omap/include/mach/omap34xx.h|9 --
  12 files changed, 170 insertions(+), 123 deletions(-)
 
 -- 
 Signature
 --
 To unsubscribe from this list: send the line unsubscribe 
 linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 N�r��yb�X��ǧv�^�)޺{.n�+{��f��{ay�ʇڙ�,j��f���h���z��w���
 ���j:+v���w�j�mzZ+�ݢj��!�i

Re: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Hemanth V
 Original Message - 
From: Santosh Shilimkar santosh.shilim...@ti.com

Subject: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files


diff --git a/arch/arm/mach-omap2/omap-headsmp.S 
b/arch/arm/mach-omap2/omap-headsmp.S

new file mode 100644
index 000..0afe039
--- /dev/null
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -0,0 +1,49 @@
+/*
+ * Secondary CPU startup routine source file.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * Author:
+ *  Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * Interface functions needed for the SMP. This file is based on arm
+ * realview smp platform.
+ * Copyright (c) 2003 ARM Limited.
+ *
+ * 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/linkage.h
+#include linux/init.h
+
+ __INIT
+
+/*
+ * OMAP4 specific entry point for secondary CPU to jump from ROM
+ * code.  This routine also provides a holding flag into which
+ * secondary core is held until we're ready for it to initialise.
+ * The primary core will update the this flag using a hardware
+ * register AuxCoreBoot1.
+ */


Is initialization done by u-boot like icache_enable taken care somewhere
for the secondary cpu.



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


RE: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files

2009-05-07 Thread Shilimkar, Santosh
 -Original Message-
 From: V, Hemanth 
 Sent: Friday, May 08, 2009 11:16 AM
 To: Shilimkar, Santosh; linux-arm-ker...@lists.arm.linux.org.uk
 Cc: linux-omap@vger.kernel.org
 Subject: Re: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files
 
  Original Message - 
 From: Santosh Shilimkar santosh.shilim...@ti.com
 Subject: [PATCH 1/3] OMAP4: SMP: Add OMAP4430 SMP board files
 
 
  diff --git a/arch/arm/mach-omap2/omap-headsmp.S 
  b/arch/arm/mach-omap2/omap-headsmp.S
  new file mode 100644
  index 000..0afe039
  --- /dev/null
  +++ b/arch/arm/mach-omap2/omap-headsmp.S
  @@ -0,0 +1,49 @@
  +/*
  + * Secondary CPU startup routine source file.
  + *
  + * Copyright (C) 2009 Texas Instruments, Inc.
  + *
  + * Author:
  + *  Santosh Shilimkar santosh.shilim...@ti.com
  + *
  + * Interface functions needed for the SMP. This file is 
 based on arm
  + * realview smp platform.
  + * Copyright (c) 2003 ARM Limited.
  + *
  + * 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/linkage.h
  +#include linux/init.h
  +
  + __INIT
  +
  +/*
  + * OMAP4 specific entry point for secondary CPU to jump from ROM
  + * code.  This routine also provides a holding flag into which
  + * secondary core is held until we're ready for it to initialise.
  + * The primary core will update the this flag using a hardware
  + * register AuxCoreBoot1.
  + */
 
 Is initialization done by u-boot like icache_enable taken 
 care somewhere
 for the secondary cpu.

U-boot has no knowledge of secondary CPUs. Kernel takes care of it with help of 
ROM code.--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html