Re: [PATCH 2/3] N810: Don't export camera orientation

2008-05-15 Thread andrzej zaborowski
On 15/05/2008, Felipe Balbi [EMAIL PROTECTED] wrote:
 On Wed, May 14, 2008 at 03:04:37PM +0300, Sakari Ailus wrote:
   ext Felipe Balbi wrote:
  
   Hello Felipe, and thanks for reviewing the patch! :)
  
   On Tue, 13 May 2008 19:04:22 +0300, Sakari Ailus [EMAIL PROTECTED]
   wrote:
   @@ -298,12 +340,21 @@ static int tcm825x_ifparm(struct v4l2_ifparm *p)
   return 0;
}
  
   +static int tcm825x_is_upside_down(void)
   +{
   +   if (machine_is_nokia_n810())
   +   return 1;
   +
   +   return 0;
   +}
   +
const struct tcm825x_platform_data n800_tcm825x_platform_data = {
   -   .is_okay  = tcm825x_is_okay,
   -   .power_set= tcm825x_power_set,
   -   .default_regs = tcm825x_default_regs,
   -   .needs_reset  = tcm825x_needs_reset,
   -   .ifparm   = tcm825x_ifparm,
   +   .is_okay= tcm825x_is_okay,
   +   .power_set  = tcm825x_power_set,
   +   .default_regs   = tcm825x_default_regs,
   +   .needs_reset= tcm825x_needs_reset,
   +   .ifparm = tcm825x_ifparm,
   +   .is_upside_down = tcm825x_is_upside_down,
  
   ok, now i got your point but this could be:
   .is_upside_down = machine_is_nokia_n810() ? 1 : 0,
  
   This doesn't work because machine_is_nokia_n810() is not constant.
  
   Anyway, tcm825x_is_upside_down can be made more simple as it could just
   return machine_is_nokia_n810().
  
   I'll send new patches.

  Didn't quite get, machine_is_nokia_n810() will always be true when
  running in n810. Could you clarify a bit :-p

It'll *return* true, but C initialisers must be constants.  It simply
wouldn't compile.

Cheers
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: board-omap3beagle: fix merge-damage in RTC code

2008-05-15 Thread Koen Kooi
This patch fixes the merge-damage in the beagleboard RTC code

Signed-off-by: Koen Kooi [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/board-omap3beagle.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 0c15ca0..0c0cbfc 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -76,6 +76,7 @@ static struct platform_device *omap3_beagle_devices[] 
__initdata = {
 
 static void __init omap3_beagle_init(void)
 {
+   platform_add_devices(omap3_beagle_devices, 
ARRAY_SIZE(omap3_beagle_devices));
omap_board_config = omap3_beagle_config;
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
@@ -88,8 +89,6 @@ arch_initcall(omap3_beagle_i2c_init);
 
 static void __init omap3_beagle_map_io(void)
 {
-   platform_add_devices(omap3_beagle_devices,
-   ARRAY_SIZE(omap3_beagle_devices));
omap2_set_globals_343x();
omap2_map_common_io();
 }
-- 
1.5.4.3

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


Re: [PATCH 1/2] Input: Fix lm8323 probe and module unloading

2008-05-15 Thread Felipe Balbi
On Wed, May 14, 2008 at 09:01:18PM -0700, Tony Lindgren wrote:
 Make module unloading and reloading behave:
 
 - Driver probe could fail if input_register_device fails as
   no error was returned from probe
 
 - Driver interrupt was using unused platform_data field,
   change to use i2c platform data interrupt instead
 
 - Free resources on unloading module
 
 - Mark platform data as __init_or_module
 
 Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
 ---
  arch/arm/mach-omap2/board-n800.c |2 +-
  drivers/input/keyboard/lm8323.c  |   18 +-
  include/linux/i2c/lm8323.h   |2 --
  3 files changed, 14 insertions(+), 8 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-n800.c 
 b/arch/arm/mach-omap2/board-n800.c
 index efcb25d..ae85c2c 100644
 --- a/arch/arm/mach-omap2/board-n800.c
 +++ b/arch/arm/mach-omap2/board-n800.c
 @@ -642,7 +642,7 @@ static struct i2c_board_info __initdata 
 n800_i2c_board_info_1[] = {
  
  extern struct tcm825x_platform_data n800_tcm825x_platform_data;
  
 -static struct i2c_board_info __initdata n800_i2c_board_info_2[] = {
 +static struct i2c_board_info __initdata_or_module n800_i2c_board_info_2[] = {
  #if defined (CONFIG_VIDEO_TCM825X) || defined (CONFIG_VIDEO_TCM825X_MODULE)
   {
   I2C_BOARD_INFO(TCM825X_NAME, TCM825X_I2C_ADDR),
 diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
 index e793ae7..d472da0 100644
 --- a/drivers/input/keyboard/lm8323.c
 +++ b/drivers/input/keyboard/lm8323.c
 @@ -755,13 +755,11 @@ static int lm8323_probe(struct i2c_client *client,
   if (init_pwm(lm, 3, client-dev, lm8323_pdata-pwm3_name)  0)
   goto fail5;
  
 - lm-irq = lm8323_pdata-irq_gpio;
 - debug(c-dev, IRQ: %d\n, lm-irq);
 -
 + lm-irq = client-irq;
   mutex_init(lm-lock);
   INIT_WORK(lm-work, lm8323_work);
  
 - err = request_irq(client-irq, lm8323_irq,
 + err = request_irq(lm-irq, lm8323_irq,

instead, you could just remove lm-irq field from structure and keep
using client-irq.

 IRQF_TRIGGER_FALLING | IRQF_DISABLED |
 IRQF_SAMPLE_RANDOM, DRIVER_NAME, lm);
   if (err) {
 @@ -802,7 +800,8 @@ static int lm8323_probe(struct i2c_client *client,
   set_bit(EV_REP, idev-evbit);
  
   lm-idev = idev;
 - if (input_register_device(idev)) {
 + err = input_register_device(idev);
 + if (err) {
   dev_dbg(client-dev, error registering input device\n);
   goto fail8;
   }
 @@ -833,7 +832,16 @@ static int lm8323_remove(struct i2c_client *client)
   struct lm8323_chip *lm = i2c_get_clientdata(client);
  
   free_irq(lm-irq, lm);
 + cancel_work_sync(lm-work);
 + input_unregister_device(lm-idev);
   device_remove_file(lm-client-dev, dev_attr_disable_kp);
 + if (lm-pwm3.enabled)
 + led_classdev_unregister(lm-pwm3.cdev);
 + if (lm-pwm2.enabled)
 + led_classdev_unregister(lm-pwm2.cdev);
 + if (lm-pwm1.enabled)
 + led_classdev_unregister(lm-pwm1.cdev);
 + kfree(lm);
  
   return 0;
  }
 diff --git a/include/linux/i2c/lm8323.h b/include/linux/i2c/lm8323.h
 index 5cb09ab..17d6b33 100644
 --- a/include/linux/i2c/lm8323.h
 +++ b/include/linux/i2c/lm8323.h
 @@ -17,8 +17,6 @@
  #define LM8323_KEYMAP_SIZE (0x7f + 1)
  
  struct lm8323_platform_data {
 - u16 irq_gpio;
 -
   int debounce_time; /* Time to watch for key bouncing, in ms. */
   int active_time; /* Idle time until sleep, in ms. */
  
 -- 
 1.5.3.6
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] N810: Don't export camera orientation

2008-05-15 Thread andrzej zaborowski
On 15/05/2008, Felipe Balbi [EMAIL PROTECTED] wrote:
 On Thu, May 15, 2008 at 08:54:34AM +0200, andrzej zaborowski wrote:
   On 15/05/2008, Felipe Balbi [EMAIL PROTECTED] wrote:
On Wed, May 14, 2008 at 03:04:37PM +0300, Sakari Ailus wrote:
  ext Felipe Balbi wrote:
 
  Hello Felipe, and thanks for reviewing the patch! :)
 
  On Tue, 13 May 2008 19:04:22 +0300, Sakari Ailus [EMAIL PROTECTED]
  wrote:
  @@ -298,12 +340,21 @@ static int tcm825x_ifparm(struct v4l2_ifparm 
 *p)
  return 0;
   }
 
  +static int tcm825x_is_upside_down(void)
  +{
  +   if (machine_is_nokia_n810())
  +   return 1;
  +
  +   return 0;
  +}
  +
   const struct tcm825x_platform_data n800_tcm825x_platform_data = {
  -   .is_okay  = tcm825x_is_okay,
  -   .power_set= tcm825x_power_set,
  -   .default_regs = tcm825x_default_regs,
  -   .needs_reset  = tcm825x_needs_reset,
  -   .ifparm   = tcm825x_ifparm,
  +   .is_okay= tcm825x_is_okay,
  +   .power_set  = tcm825x_power_set,
  +   .default_regs   = tcm825x_default_regs,
  +   .needs_reset= tcm825x_needs_reset,
  +   .ifparm = tcm825x_ifparm,
  +   .is_upside_down = tcm825x_is_upside_down,
 
  ok, now i got your point but this could be:
  .is_upside_down = machine_is_nokia_n810() ? 1 : 0,
 
  This doesn't work because machine_is_nokia_n810() is not constant.
 
  Anyway, tcm825x_is_upside_down can be made more simple as it could 
 just
  return machine_is_nokia_n810().
 
  I'll send new patches.
   
 Didn't quite get, machine_is_nokia_n810() will always be true when
 running in n810. Could you clarify a bit :-p
  
   It'll *return* true, but C initialisers must be constants.  It simply
   wouldn't compile.


 and that's why i was using ?:


  machine_is_nokia_n810 ? 1 : 0

This doesn't change anything - since machine_is_... is not constant,
the whole expression is not constant and is a syntax error.  The
compiler needs to know at compile time whether to store a 0 or a 1 in
the initialiser.
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Input: Make lm8323 sticky key to work with console

2008-05-15 Thread andrzej zaborowski
On 15/05/2008, Felipe Balbi [EMAIL PROTECTED] wrote:
 On Wed, May 14, 2008 at 09:01:19PM -0700, Tony Lindgren wrote:
   This allows using N810 keyboard from console by adding optional
   Fn and shift sticky key handling by passing them from platform_data.
  
   Currently some not so obvious mappings are:
  
   - Pipe is Fn + Enter
   - Delete is Fn + Backspace
   - Escape is Fn + Ctrl

  no tab? :-(

  Fn + space maybe?? :-p

Fn + Right is assigned in the patch (I check too :) ).  But I'm not
sure whther that should be done in the lm8323 driver or elsewhere. The
existence of keys like Fn and Shift is N810-specific and lm8323 is
just a gpio matrix keypad chip.

Regards
-- 
Please do not print this email unless absolutely necessary. Spread
environmental awareness.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] N810: Don't export camera orientation

2008-05-15 Thread Felipe Balbi
On Thu, May 15, 2008 at 10:11:59AM +0200, andrzej zaborowski wrote:
 This doesn't change anything - since machine_is_... is not constant,
 the whole expression is not constant and is a syntax error.  The
 compiler needs to know at compile time whether to store a 0 or a 1 in
 the initialiser.

ugh, that's true :-p
forget about it.

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Input: Make lm8323 sticky key to work with console

2008-05-15 Thread Felipe Balbi
On Thu, May 15, 2008 at 10:14:24AM +0200, andrzej zaborowski wrote:
 On 15/05/2008, Felipe Balbi [EMAIL PROTECTED] wrote:
  On Wed, May 14, 2008 at 09:01:19PM -0700, Tony Lindgren wrote:
This allows using N810 keyboard from console by adding optional
Fn and shift sticky key handling by passing them from platform_data.
   
Currently some not so obvious mappings are:
   
- Pipe is Fn + Enter
- Delete is Fn + Backspace
- Escape is Fn + Ctrl
 
   no tab? :-(
 
   Fn + space maybe?? :-p
 
 Fn + Right is assigned in the patch (I check too :) ).  But I'm not
 sure whther that should be done in the lm8323 driver or elsewhere. The
 existence of keys like Fn and Shift is N810-specific and lm8323 is
 just a gpio matrix keypad chip.

but that's coming from board file. It should be ok.

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] Make N810 keyboard work with console

2008-05-15 Thread Daniel Stone
On Wed, May 14, 2008 at 09:01:17PM -0700, ext Tony Lindgren wrote:
 Here are few fun patches for N810 hackers to make the integrated
 keyboard work with console :) This should be done in a generic way
 and the old behaviour is preserved if optional sticky keys are not
 passed from platform_data.

Uhm.  If you're going to implement latching/locking keys, surely it'd be
better to do this in the generic input layer than the keyboard driver?

NAK from myself (for what little that means) simply due to the sheer
horror of seeing what should, by all rights, be a tiny driver, explode
into non-triviality. :)

Cheers,
Daniel


signature.asc
Description: Digital signature


[RESENDING PATCH 2/4] ARM: OMAP: Add basic board support for OMAP LDP.

2008-05-15 Thread Nishant Kamat
This adds basic board support for the OMAP3430 LDP development platform.
It adds support for the touchscreen, RTC, UART, USB and MMC - all of which
work with little or no changes w.r.t. the OMAP3430 SDP.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/Kconfig   |4 +
 arch/arm/mach-omap2/Makefile  |3 +
 arch/arm/mach-omap2/board-ldp.c   |  253 +
 include/asm-arm/arch-omap/board-ldp.h |   34 +
 include/asm-arm/arch-omap/hardware.h  |4 +
 5 files changed, 298 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-ldp.c
 create mode 100644 include/asm-arm/arch-omap/board-ldp.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 5c229cc..d38f8ca 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -98,6 +98,10 @@ config MACH_OMAP_2430SDP
bool OMAP 2430 SDP board
depends on ARCH_OMAP2  ARCH_OMAP2430
 
+config MACH_OMAP_LDP
+   bool OMAP 3 LDP board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP_2430OSK
bool OMAP 2430 OSK board
depends on ARCH_OMAP2  ARCH_OMAP24XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 552664c..b6eea89 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -44,6 +44,9 @@ obj-$(CONFIG_MACH_OMAP3EVM)   += board-omap3evm.o \
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
   hsmmc.o
+obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
+  hsmmc.o \
+  usb-musb.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
   board-apollon-keys.o
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
new file mode 100644
index 000..2ac4c9b
--- /dev/null
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -0,0 +1,253 @@
+/*
+ * linux/arch/arm/mach-omap2/board-ldp.c
+ *
+ * Copyright (C) 2008 Texas Instruments Inc.
+ * Nishant Kamat [EMAIL PROTECTED]
+ *
+ * Modified from 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/delay.h
+#include linux/input.h
+#include linux/workqueue.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/spi/spi.h
+#include linux/spi/ads7846.h
+#include linux/i2c/twl4030.h
+#include linux/i2c/twl4030-rtc.h
+
+#include asm/hardware.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include asm/arch/mcspi.h
+#include asm/arch/gpio.h
+#include asm/arch/board.h
+#include asm/arch/common.h
+#include asm/arch/gpmc.h
+#include asm/arch/hsmmc.h
+#include asm/arch/usb-musb.h
+
+#include asm/io.h
+#include asm/delay.h
+#include asm/arch/control.h
+
+#define ENABLE_VAUX1_DEDICATED 0x03
+#define ENABLE_VAUX1_DEV_GRP   0x20
+
+#define TWL4030_MSECURE_GPIO   22
+
+static int ts_gpio;
+
+#ifdef CONFIG_RTC_DRV_TWL4030
+static int twl4030_rtc_init(void)
+{
+   int ret = 0;
+
+   /* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
+   if (is_device_type_gp()  is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
+   u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
+   int mux_mask = 0x04;
+   u16 tmp;
+
+   ret = omap_request_gpio(TWL4030_MSECURE_GPIO);
+   if (ret  0) {
+   printk(KERN_ERR twl4030_rtc_init: can't
+   reserve GPIO:%d !\n, TWL4030_MSECURE_GPIO);
+   goto out;
+   }
+   /*
+* TWL4030 will be in secure mode if msecure line from OMAP
+* is low. Make msecure line high in order to change the
+* TWL4030 RTC time and calender registers.
+*/
+   omap_set_gpio_direction(TWL4030_MSECURE_GPIO, 0);
+
+   tmp = omap_readw(msecure_pad_config_reg);
+   tmp = 0xF8;/* To enable mux mode 03/04 = GPIO_RTC */
+   tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
+   omap_writew(tmp, msecure_pad_config_reg);
+
+   omap_set_gpio_dataout(TWL4030_MSECURE_GPIO, 1);
+   }
+out:
+   return ret;
+}
+
+static void twl4030_rtc_exit(void)
+{
+   omap_free_gpio(TWL4030_MSECURE_GPIO);
+}
+
+static struct twl4030rtc_platform_data ldp_twl4030rtc_data = {
+   .init = twl4030_rtc_init,
+   .exit = twl4030_rtc_exit,
+};
+
+static struct 

[RESENDING PATCH 4/4] ARM: OMAP: Add ethernet support for OMAP LDP

2008-05-15 Thread Nishant Kamat
This patch adds ethernet support (smc911x) for OMAP LDP platform.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 arch/arm/configs/omap_ldp_defconfig   |  164 -
 arch/arm/mach-omap2/board-ldp.c   |   51 ++
 include/asm-arm/arch-omap/board-ldp.h |6 +
 3 files changed, 218 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/omap_ldp_defconfig 
b/arch/arm/configs/omap_ldp_defconfig
index 9a90975..fb2880b 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.26-rc2-omap1
-# Thu May 15 19:08:39 2008
+# Thu May 15 19:09:22 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -37,8 +37,11 @@ CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
@@ -319,7 +322,86 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 #
 # Networking
 #
-# CONFIG_NET is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG=cubic
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -335,18 +417,21 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_OMAP_STI is not set
@@ -388,12 +473,61 @@ CONFIG_SCSI_WAIT_SCAN=m
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+CONFIG_SMC911X=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set

[RESENDING PATCH 3/4] ARM: OMAP: Add default kernel config for OMAP LDP

2008-05-15 Thread Nishant Kamat
This patch adds a default config for the OMAP LDP platform. It supports
UART, touchscreen, RTC, Mentor USB and MMC drivers.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 arch/arm/configs/omap_ldp_defconfig | 1196 +++
 1 files changed, 1196 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_ldp_defconfig

diff --git a/arch/arm/configs/omap_ldp_defconfig 
b/arch/arm/configs/omap_ldp_defconfig
new file mode 100644
index 000..9a90975
--- /dev/null
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -0,0 +1,1196 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26-rc2-omap1
+# Thu May 15 19:08:39 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_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_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_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=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
+
+#
+# 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_CO285 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_KS8695 is not set
+# CONFIG_ARCH_NS9XXX 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
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+# CONFIG_ARCH_OMAP1 is not set
+# CONFIG_ARCH_OMAP2 is not set
+CONFIG_ARCH_OMAP3=y
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_DEBUG_SRAM_PATCH=y
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+# 

RE: [RESENDING PATCH 0/4] Support for omap3430 LDP (zoom)

2008-05-15 Thread Kamat, Nishant
Steve, 

 -Original Message-
 From: Steve Sakoman [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 15, 2008 8:12 PM
 To: Kamat, Nishant
 Cc: linux-omap@vger.kernel.org
 Subject: Re: [RESENDING PATCH 0/4] Support for omap3430 LDP (zoom)
 
 Nishant,
 
 It's not clear what order the patches should be applied.
 
 I assume:
 
 1. twl4030 defines
 2. basic board support
 3. ethernet support
 4. default kernel config
 
 Correct?
 

Sorry, resending with the right order mentioned in the subject line.

Thanks,
Nishant
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: Add basic board support for OMAP LDP.

2008-05-15 Thread Nishant Kamat
This adds basic board support for the OMAP3430 LDP development platform.
It adds support for the touchscreen, RTC, UART, USB and MMC - all of which
work with little or no changes w.r.t. the OMAP3430 SDP.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/Kconfig   |4 +
 arch/arm/mach-omap2/Makefile  |3 +
 arch/arm/mach-omap2/board-ldp.c   |  253 +
 include/asm-arm/arch-omap/board-ldp.h |   34 +
 include/asm-arm/arch-omap/hardware.h  |4 +
 5 files changed, 298 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-ldp.c
 create mode 100644 include/asm-arm/arch-omap/board-ldp.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 5c229cc..d38f8ca 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -98,6 +98,10 @@ config MACH_OMAP_2430SDP
bool OMAP 2430 SDP board
depends on ARCH_OMAP2  ARCH_OMAP2430
 
+config MACH_OMAP_LDP
+   bool OMAP 3 LDP board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP_2430OSK
bool OMAP 2430 OSK board
depends on ARCH_OMAP2  ARCH_OMAP24XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 552664c..b6eea89 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -44,6 +44,9 @@ obj-$(CONFIG_MACH_OMAP3EVM)   += board-omap3evm.o \
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
   hsmmc.o
+obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
+  hsmmc.o \
+  usb-musb.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
   board-apollon-keys.o
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
new file mode 100644
index 000..2ac4c9b
--- /dev/null
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -0,0 +1,253 @@
+/*
+ * linux/arch/arm/mach-omap2/board-ldp.c
+ *
+ * Copyright (C) 2008 Texas Instruments Inc.
+ * Nishant Kamat [EMAIL PROTECTED]
+ *
+ * Modified from 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/delay.h
+#include linux/input.h
+#include linux/workqueue.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/spi/spi.h
+#include linux/spi/ads7846.h
+#include linux/i2c/twl4030.h
+#include linux/i2c/twl4030-rtc.h
+
+#include asm/hardware.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include asm/arch/mcspi.h
+#include asm/arch/gpio.h
+#include asm/arch/board.h
+#include asm/arch/common.h
+#include asm/arch/gpmc.h
+#include asm/arch/hsmmc.h
+#include asm/arch/usb-musb.h
+
+#include asm/io.h
+#include asm/delay.h
+#include asm/arch/control.h
+
+#define ENABLE_VAUX1_DEDICATED 0x03
+#define ENABLE_VAUX1_DEV_GRP   0x20
+
+#define TWL4030_MSECURE_GPIO   22
+
+static int ts_gpio;
+
+#ifdef CONFIG_RTC_DRV_TWL4030
+static int twl4030_rtc_init(void)
+{
+   int ret = 0;
+
+   /* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
+   if (is_device_type_gp()  is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
+   u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
+   int mux_mask = 0x04;
+   u16 tmp;
+
+   ret = omap_request_gpio(TWL4030_MSECURE_GPIO);
+   if (ret  0) {
+   printk(KERN_ERR twl4030_rtc_init: can't
+   reserve GPIO:%d !\n, TWL4030_MSECURE_GPIO);
+   goto out;
+   }
+   /*
+* TWL4030 will be in secure mode if msecure line from OMAP
+* is low. Make msecure line high in order to change the
+* TWL4030 RTC time and calender registers.
+*/
+   omap_set_gpio_direction(TWL4030_MSECURE_GPIO, 0);
+
+   tmp = omap_readw(msecure_pad_config_reg);
+   tmp = 0xF8;/* To enable mux mode 03/04 = GPIO_RTC */
+   tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
+   omap_writew(tmp, msecure_pad_config_reg);
+
+   omap_set_gpio_dataout(TWL4030_MSECURE_GPIO, 1);
+   }
+out:
+   return ret;
+}
+
+static void twl4030_rtc_exit(void)
+{
+   omap_free_gpio(TWL4030_MSECURE_GPIO);
+}
+
+static struct twl4030rtc_platform_data ldp_twl4030rtc_data = {
+   .init = twl4030_rtc_init,
+   .exit = twl4030_rtc_exit,
+};
+
+static struct 

[PATCH] ARM: OMAP: Add ethernet support for OMAP LDP

2008-05-15 Thread Nishant Kamat
This patch adds ethernet support (smc911x) for OMAP LDP platform.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 arch/arm/configs/omap_ldp_defconfig   |  164 -
 arch/arm/mach-omap2/board-ldp.c   |   51 ++
 include/asm-arm/arch-omap/board-ldp.h |6 +
 3 files changed, 218 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/omap_ldp_defconfig 
b/arch/arm/configs/omap_ldp_defconfig
index 9a90975..fb2880b 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.26-rc2-omap1
-# Thu May 15 19:08:39 2008
+# Thu May 15 19:09:22 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -37,8 +37,11 @@ CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
@@ -319,7 +322,86 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 #
 # Networking
 #
-# CONFIG_NET is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG=cubic
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -335,18 +417,21 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_OMAP_STI is not set
@@ -388,12 +473,61 @@ CONFIG_SCSI_WAIT_SCAN=m
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+CONFIG_SMC911X=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set

[PATCH] ARM: OMAP: Add register defines for TWL4030 vaux1

2008-05-15 Thread Nishant Kamat
This patch adds the register defines for TWL4030 VAUX1.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
---
 include/linux/i2c/twl4030.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index 05d07f9..40af46e 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -77,6 +77,8 @@
 /* Offsets to Power Registers */
 #define TWL4030_VDAC_DEV_GRP   0x3B
 #define TWL4030_VDAC_DEDICATED 0x3E
+#define TWL4030_VAUX1_DEV_GRP  0x17
+#define TWL4030_VAUX1_DEDICATED0x1A
 #define TWL4030_VAUX2_DEV_GRP  0x1B
 #define TWL4030_VAUX2_DEDICATED0x1E
 #define TWL4030_VAUX3_DEV_GRP  0x1F
-- 
1.5.3.2

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


N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread green
Hello, I am trying to run Debian Sid on a Nokia N810.  I have tried several 
different kernel sources and lots of different configs without seeing anything 
but the NOKIA splash screen.  Therefore, my current goal has been reduced to 
simply booting a kernel and seeing some text output from it so I know it is at 
least attempting to boot.  Once I've succeeded in that I'll continue toward my 
ultimate goal of running Debian Sid.

I have built a Debian Sid armel chroot on the N810 and have compiled many 
kernels in the chroot.  I send the kernels to the N810 using the flasher (-f 
-k $IMAGE -R).

I have used these three different kernel sources with two results.
 maemo 2008 kernel
  http://repository.maemo.org/pool/maemo4.0.1/free/k/kernel-source-rx-34/
 2.6.25-omap1
  http://www.muru.com/linux/omap/patches/patch-2.6.25-omap1.bz2
 2.6.26-rc2-omap1 with muru.com N810 patches
  http://source.mvista.com/git/?p=linux-omap-2.6.git
  http://www.muru.com/linux/n8x0/n8x0-2008-05-12.tar.gz

Always, one of these two happens after I flash the compiled zImage:
 - The NOKIA splash screen is displayed for about 20 seconds and then the N810 
powers off.
 - The splash screen is shown for 1 second and the device resets (loop); I 
have to remove the battery.

I have enabled CONFIG_FRAMEBUFFER_CONSOLE and disabled 
CONFIG_FB_OMAP_MANUAL_UPDATE.  The last config I've tried (with 
linux-2.6.26-rc2-omap1 +N810) is attached.

I'm using gcc 4.3.0-4 and binutils 2.18.1~cvs20080103-4 in Debian Sid.

I have enable RD mode on the N810 and disabled the lifeguard-reset flag.

One of the N810 patches from muru.com changes the N810 machine number to ; 
I've tried both that and the 1548, on the assumption that perhaps a bootloader 
update has fixed the machine number.

I've used 'make n800_defconfig' (2.6.26-rc2-omap1 +N810) and changed only the 
default cmdline without success.  Also I've used 'make nokia_2420_defconfig' 
with the maemo kernel.

Note that the initfs, X-Loader, NOLO secondary bootloader, and NOLO cold 
flasher (2nd) images are all from the 
RX-44_2008SE_2.2007.51-3_PR_COMBINED_MR0_ARM.bin maemo FIASCO (I guess) image.  
The rootfs is probably from an older one (I never updated it) but I'm assuming 
that the rootfs doesn't matter anyway.

Please ask for any more information that might be helpful.

Oh, and one more question that I ought to know the answer to by now:
Is it okay to do 'make zImage', then change the config, then 'make zImage' 
again without doing a 'make clean', so long as nothing in the source has been 
changed?  That saves a lot of time.

Thanks!
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26-rc2-omap1
# Wed May 14 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_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_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_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=18
# 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=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
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=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_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
# 

Re: OMAP3530 EVM Sources are on linux.omap.com

2008-05-15 Thread Remith Ravi
Khasim,

After running the power management command ' echo mem 
/sys/power/state '  the OMAP3430EVM entered into suspend state.

Now what I have to do to make the system resume the normal state? I
tried pressing some keys but it didn't help.

Regards,
Remith
Mistral Solutions.


On Mon, May 12, 2008 at 4:29 PM, Syed Mohammed, Khasim [EMAIL PROTECTED] 
wrote:
 Hello all:

 We have uploaded OMAP3530 EVM sources on linux.omap.com

 x-loader   : http://linux.omap.com/pub/xloader/3530evm/
 u-boot-1.1.4   : http://linux.omap.com/pub/bootloader/3530evm/
 Linux Kernel 2.6.22-18 : http://linux.omap.com/pub/kernel/3530evm/
 Tool Chain used: Code Sourcery arm-2007q3

 Few important features supported in kernel are listed below:

 *   ALSA Audio Driver.
 *   Power Management
 *   Supports for NFS file system.
 *   Ethernet.
 *   Frame buffer (FBDEV).
 *   Debug UART port.
 *   DMA framework.
 *   TWL4030 (T2) RTC.
 *   Watchdog driver.
 *   Support T2 Core GPIO.
 *   GPIO.
 *   V4L2 Based Video driver.
 *   Keypad.
 *   HS-I2C.
 *   McBSP.
 *   McSPI.
 *   TouchScreen.
 *   UART library.
 *   High-speed MMC
 *   NAND
 *   USB OTG
 *   TV out.
 *   Clock framework with device driver adaptation

 Platform description can be found here,
 http://focus.ti.com/general/docs/wtbu/wtbusplashcontent.tsp?templateId=6123contentId=4750#omap3530

 Regards,
 Khasim
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Chip message format is either 8-bit cmd or 8-bit cmd + 16-bit data.

2008-05-15 Thread Roman Tereshonkov
Fix the touchscreen input device name.

No need in msg.spi = ts-spi assignments. It is done in
spi_async called from spi_sync.

No need in driver bus assignment. It is done in spi_driver_register.


Signed-off-by: Roman Tereshonkov [EMAIL PROTECTED]
---
 drivers/input/touchscreen/tsc2005.c |   36 --
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/drivers/input/touchscreen/tsc2005.c 
b/drivers/input/touchscreen/tsc2005.c
index 035d209..fa01799 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -54,7 +54,13 @@
  * during the last 20ms which means the pen has been lifted.
  */
 
-#define TSC2005_HZ (1400)
+#define TSC2005_VDD_LOWER_27
+
+#ifdef TSC2005_VDD_LOWER_27
+#define TSC2005_HZ (1000)
+#else
+#define TSC2005_HZ (2500)
+#endif
 
 #define TSC2005_CMD(0x80)
 #define TSC2005_REG(0x00)
@@ -226,13 +232,12 @@ static void tsc2005_cmd(struct tsc2005 *ts, u8 cmd)
struct spi_message msg;
struct spi_transfer xfer = { 0 };
 
-   spi_message_init(msg);
-   msg.spi = ts-spi;
xfer.tx_buf = data;
xfer.rx_buf = NULL;
-   xfer.len = 2;
+   xfer.len = 1;
xfer.bits_per_word = 8;
 
+   spi_message_init(msg);
spi_message_add_tail(xfer, msg);
spi_sync(ts-spi, msg);
 }
@@ -244,16 +249,15 @@ static void tsc2005_write(struct tsc2005 *ts, u8 reg, u16 
value)
struct spi_transfer xfer = { 0 };
 
tx = (TSC2005_REG | reg | TSC2005_REG_PND0 |
-  TSC2005_REG_WRITE)  (2 * 8);
+  TSC2005_REG_WRITE)  16;
tx |= value;
 
-   spi_message_init(msg);
-   msg.spi = ts-spi;
xfer.tx_buf = tx;
xfer.rx_buf = NULL;
xfer.len = 4;
-   xfer.bits_per_word = 3 * 8;
+   xfer.bits_per_word = 24;
 
+   spi_message_init(msg);
spi_message_add_tail(xfer, msg);
spi_sync(ts-spi, msg);
 }
@@ -271,10 +275,10 @@ static void tsc2005_ts_update_pen_state(struct tsc2005 
*ts,
}
} else {
input_report_abs(ts-idev, ABS_PRESSURE, 0);
-   if (ts-pen_down)
+   if (ts-pen_down) {
input_report_key(ts-idev, BTN_TOUCH, 0);
-
-   ts-pen_down = 0;
+   ts-pen_down = 0;
+   }
}
 
input_sync(ts-idev);
@@ -377,7 +381,7 @@ static void tsc2005_ts_penup_timer_handler(unsigned long 
data)
 
 /*
  * This interrupt is called when pen is down and coordinates are
- * available. That is indicated by a falling edge on DEV line.
+ * available. That is indicated by a falling edge on DAV line.
  */
 static irqreturn_t tsc2005_ts_irq_handler(int irq, void *dev_id)
 {
@@ -406,7 +410,6 @@ static void tsc2005_ts_setup_spi_xfer(struct tsc2005 *ts)
int i;
 
spi_message_init(m);
-   m-spi = ts-spi;
 
for (i = 0; i  NUM_READ_REGS; i++, x++) {
x-tx_buf = tsc2005_read_reg[i];
@@ -565,11 +568,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
goto err2;
}
 
-   /*
-* TODO: should be TSC2005 touchscreen, but X has hardcoded these
-* strings and doesn't accept TSC2005 yet...
-*/
-   idev-name = TSC2301 touchscreen;
+   idev-name = TSC2005 touchscreen;
snprintf(ts-phys, sizeof(ts-phys), %s/input-ts,
 ts-spi-dev.bus_id);
idev-phys = ts-phys;
@@ -709,7 +708,6 @@ static int tsc2005_resume(struct spi_device *spi)
 static struct spi_driver tsc2005_driver = {
.driver = {
.name = tsc2005,
-   .bus = spi_bus_type,
.owner = THIS_MODULE,
},
 #ifdef CONFIG_PM
-- 
1.5.3.7

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


Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread Felipe Balbi


On Thu, 15 May 2008 09:09:14 -0500, green [EMAIL PROTECTED] wrote:
 Hello, I am trying to run Debian Sid on a Nokia N810.  I have tried
several
 
 different kernel sources and lots of different configs without seeing
 anything 
 but the NOKIA splash screen.  Therefore, my current goal has been reduced
 to 
 simply booting a kernel and seeing some text output from it so I know it
 is at 
 least attempting to boot.  Once I've succeeded in that I'll continue
 toward my 
 ultimate goal of running Debian Sid.
 
 I have built a Debian Sid armel chroot on the N810 and have compiled many

 kernels in the chroot.  I send the kernels to the N810 using the flasher
 (-f 
 -k $IMAGE -R).
 
 I have used these three different kernel sources with two results.
  maemo 2008 kernel
   http://repository.maemo.org/pool/maemo4.0.1/free/k/kernel-source-rx-34/
  2.6.25-omap1
   http://www.muru.com/linux/omap/patches/patch-2.6.25-omap1.bz2
  2.6.26-rc2-omap1 with muru.com N810 patches
   http://source.mvista.com/git/?p=linux-omap-2.6.git
   http://www.muru.com/linux/n8x0/n8x0-2008-05-12.tar.gz
 
 Always, one of these two happens after I flash the compiled zImage:
  - The NOKIA splash screen is displayed for about 20 seconds and then the
 N810 
 powers off.
  - The splash screen is shown for 1 second and the device resets (loop);
 I 
 have to remove the battery.

flasher --enable-rd-mode --set-rd-flags=serial-console,no-lifeguard-reset
-f

 
 I have enabled CONFIG_FRAMEBUFFER_CONSOLE and disabled 
 CONFIG_FB_OMAP_MANUAL_UPDATE.  The last config I've tried (with 
 linux-2.6.26-rc2-omap1 +N810) is attached.
 
 I'm using gcc 4.3.0-4 and binutils 2.18.1~cvs20080103-4 in Debian Sid.
 
 I have enable RD mode on the N810 and disabled the lifeguard-reset flag.
 
 One of the N810 patches from muru.com changes the N810 machine number to
 ; 
 I've tried both that and the 1548, on the assumption that perhaps a
 bootloader 
 update has fixed the machine number.
 
 I've used 'make n800_defconfig' (2.6.26-rc2-omap1 +N810) and changed only
 the 
 default cmdline without success.  Also I've used 'make
 nokia_2420_defconfig' 
 with the maemo kernel.

try also
flasher --set-root-device mmc

 
 Note that the initfs, X-Loader, NOLO secondary bootloader, and NOLO cold 
 flasher (2nd) images are all from the 
 RX-44_2008SE_2.2007.51-3_PR_COMBINED_MR0_ARM.bin maemo FIASCO (I guess)
 image.  
 The rootfs is probably from an older one (I never updated it) but I'm
 assuming 
 that the rootfs doesn't matter anyway.
 
 Please ask for any more information that might be helpful.
 
 Oh, and one more question that I ought to know the answer to by now:
 Is it okay to do 'make zImage', then change the config, then 'make
zImage'
 
 again without doing a 'make clean', so long as nothing in the source has
 been 
 changed?  That saves a lot of time.

Yes, it's ok. ;-)

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

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


Re: [PATCH] mach-omap2/powerdomain.c: convert rwsem to rwlock

2008-05-15 Thread Dirk Behme

Paul Walmsley wrote:

The generic rwsem implementation of down_read() and down_write() does not
save and restore interrupt state.  This causes powerdomain code to
inadvertently enable interrupts early in the boot process, causing
init/main.c to complain.   This patch converts powerdomain locking to
r-w spinlocks instead.

I'm also curious to know if this fixes the BeagleBoard boot problem.


Yes! :)

Git head is now working on Beagle again.

Many thanks

Dirk



Signed-off-by: Paul Walmsley [EMAIL PROTECTED]
---

 arch/arm/mach-omap2/powerdomain.c |   46 ++---
 1 files changed, 27 insertions(+), 19 deletions(-)


diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
index 939efe4..0a6caaf 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -18,7 +18,7 @@
 #include linux/module.h
 #include linux/types.h
 #include linux/delay.h
-#include linux/rwsem.h
+#include linux/spinlock.h
 #include linux/list.h
 #include linux/errno.h
 #include linux/err.h
@@ -38,10 +38,10 @@
 static LIST_HEAD(pwrdm_list);
 
 /*

- * pwrdm_rwsem protects pwrdm_list add and del ops - also reused to
+ * pwrdm_rwlock protects pwrdm_list add and del ops - also reused to
  * protect pwrdm_clkdms[] during clkdm add/del ops
  */
-static DECLARE_RWSEM(pwrdm_rwsem);
+static DEFINE_RWLOCK(pwrdm_rwlock);
 
 
 /* Private functions */

@@ -131,6 +131,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list)
  */
 int pwrdm_register(struct powerdomain *pwrdm)
 {
+   unsigned long flags;
int ret = -EINVAL;
 
 	if (!pwrdm)

@@ -139,7 +140,7 @@ int pwrdm_register(struct powerdomain *pwrdm)
if (!omap_chip_is(pwrdm-omap_chip))
return -EINVAL;
 
-	down_write(pwrdm_rwsem);

+   write_lock_irqsave(pwrdm_rwlock, flags);
if (_pwrdm_lookup(pwrdm-name)) {
ret = -EEXIST;
goto pr_unlock;
@@ -151,7 +152,7 @@ int pwrdm_register(struct powerdomain *pwrdm)
ret = 0;
 
 pr_unlock:

-   up_write(pwrdm_rwsem);
+   write_unlock_irqrestore(pwrdm_rwlock, flags);
 
 	return ret;

 }
@@ -165,12 +166,14 @@ pr_unlock:
  */
 int pwrdm_unregister(struct powerdomain *pwrdm)
 {
+   unsigned long flags;
+
if (!pwrdm)
return -EINVAL;
 
-	down_write(pwrdm_rwsem);

+   write_lock_irqsave(pwrdm_rwlock, flags);
list_del(pwrdm-node);
-   up_write(pwrdm_rwsem);
+   write_unlock_irqrestore(pwrdm_rwlock, flags);
 
 	pr_debug(powerdomain: unregistered %s\n, pwrdm-name);
 
@@ -187,13 +190,14 @@ int pwrdm_unregister(struct powerdomain *pwrdm)

 struct powerdomain *pwrdm_lookup(const char *name)
 {
struct powerdomain *pwrdm;
+   unsigned long flags;
 
 	if (!name)

return NULL;
 
-	down_read(pwrdm_rwsem);

+   read_lock_irqsave(pwrdm_rwlock, flags);
pwrdm = _pwrdm_lookup(name);
-   up_read(pwrdm_rwsem);
+   read_unlock_irqrestore(pwrdm_rwlock, flags);
 
 	return pwrdm;

 }
@@ -204,7 +208,7 @@ struct powerdomain *pwrdm_lookup(const char *name)
  *
  * Call the supplied function for each registered powerdomain.  The
  * callback function can return anything but 0 to bail out early from
- * the iterator.  The callback function is called with the pwrdm_rwsem
+ * the iterator.  The callback function is called with the pwrdm_rwlock
  * held for reading, so no powerdomain structure manipulation
  * functions should be called from the callback, although hardware
  * powerdomain control functions are fine.  Returns the last return
@@ -215,18 +219,19 @@ struct powerdomain *pwrdm_lookup(const char *name)
 int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm))
 {
struct powerdomain *temp_pwrdm;
+   unsigned long flags;
int ret = 0;
 
 	if (!fn)

return -EINVAL;
 
-	down_read(pwrdm_rwsem);

+   read_lock_irqsave(pwrdm_rwlock, flags);
list_for_each_entry(temp_pwrdm, pwrdm_list, node) {
ret = (*fn)(temp_pwrdm);
if (ret)
break;
}
-   up_read(pwrdm_rwsem);
+   read_unlock_irqrestore(pwrdm_rwlock, flags);
 
 	return ret;

 }
@@ -243,6 +248,7 @@ int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm))
  */
 int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
 {
+   unsigned long flags;
int i;
int ret = -EINVAL;
 
@@ -252,7 +258,7 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)

pr_debug(powerdomain: associating clockdomain %s with powerdomain 
 %s\n, clkdm-name, pwrdm-name);
 
-	down_write(pwrdm_rwsem);

+   write_lock_irqsave(pwrdm_rwlock, flags);
 
 	for (i = 0; i  PWRDM_MAX_CLKDMS; i++) {

if (!pwrdm-pwrdm_clkdms[i])
@@ -278,7 +284,7 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct 
clockdomain *clkdm)
ret = 0;
 
 pac_exit:

-   up_write(pwrdm_rwsem);
+   

Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread green
On Thu, 2008.05.15, 136, green wrote:
 I have built a Debian Sid armel chroot on the N810 and have compiled many 
 kernels in the chroot.  I send the kernels to the N810 using the flasher (-f 
 -k $IMAGE -R).

I've also built 2.6.26-rc2-omap1 (with muru.com N810 patches) on my amd64 
system using the gnueabi tools from emdebian.org.

gcc 4.3.0-4
binutils 2.18.1~cvs20080103-4

Same results.
  - The NOKIA splash screen is displayed for about 20 seconds and then the 
 N810 
 powers off.


signature.asc
Description: Digital signature


Re: [PATCH 0/2] Make N810 keyboard work with console

2008-05-15 Thread Tony Lindgren
* Daniel Stone [EMAIL PROTECTED] [080515 01:57]:
 On Wed, May 14, 2008 at 09:01:17PM -0700, ext Tony Lindgren wrote:
  Here are few fun patches for N810 hackers to make the integrated
  keyboard work with console :) This should be done in a generic way
  and the old behaviour is preserved if optional sticky keys are not
  passed from platform_data.
 
 Uhm.  If you're going to implement latching/locking keys, surely it'd be
 better to do this in the generic input layer than the keyboard driver?

Yeah I agree it would be best to have the sticky keys handled in the
input layer in generic way in the long run. Doing it in a generic ways
would just require passing the flags with selected keys to input layer.

 NAK from myself (for what little that means) simply due to the sheer
 horror of seeing what should, by all rights, be a tiny driver, explode
 into non-triviality. :)

Well I'll take a look at some point how to move the is_sticky handling
to input layer. Meanwhile people can use this patch to have something
usable.

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


Re: Query ISP1301 with OMAP

2008-05-15 Thread David Brownell
On Thursday 15 May 2008, Pandita, Vikram wrote:
 Another observation:
 There is a comment in isp1301_omap.c file:
 
 static void power_up(struct isp1301 *isp)
         /* do this only when cpu is driving transceiver,
          * so host won't see a low speed device...
          */
 
 Could anyone give more details as to what this means?

The this was putting the transceiver into DAT_SEO mode,
so evidently there were problems observed doing that
earlier in the setup sequence -- before the immediately
preceding line which took it out of USB suspend mode.

The comment before those functions is relevant to your
general question (how to set it up for 3-pin host-only
mode):  some of the details presumed setup like an H2
board needed, and the DAT_SEO bit was one of them.

The H2 board certainly supported both host and peripheral
modes, and as I recall from the dusty mists of time it
didn't use three wire signaling.  So I suspect that you
won't be able to reuse much of that init code.  You'll
need to dig through the chip docs to figure out how it
needs to be set up.

- Dave

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


Re: [PATCH 1/2] Input: Fix lm8323 probe and module unloading, take #2

2008-05-15 Thread Tony Lindgren
* Felipe Balbi [EMAIL PROTECTED] [080515 01:00]:
 On Wed, May 14, 2008 at 09:01:18PM -0700, Tony Lindgren wrote:
  Make module unloading and reloading behave:
  
  - Driver probe could fail if input_register_device fails as
no error was returned from probe
  
  - Driver interrupt was using unused platform_data field,
change to use i2c platform data interrupt instead
  
  - Free resources on unloading module
  
  - Mark platform data as __init_or_module
  
  Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
  ---
   arch/arm/mach-omap2/board-n800.c |2 +-
   drivers/input/keyboard/lm8323.c  |   18 +-
   include/linux/i2c/lm8323.h   |2 --
   3 files changed, 14 insertions(+), 8 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/board-n800.c 
  b/arch/arm/mach-omap2/board-n800.c
  index efcb25d..ae85c2c 100644
  --- a/arch/arm/mach-omap2/board-n800.c
  +++ b/arch/arm/mach-omap2/board-n800.c
  @@ -642,7 +642,7 @@ static struct i2c_board_info __initdata 
  n800_i2c_board_info_1[] = {
   
   extern struct tcm825x_platform_data n800_tcm825x_platform_data;
   
  -static struct i2c_board_info __initdata n800_i2c_board_info_2[] = {
  +static struct i2c_board_info __initdata_or_module n800_i2c_board_info_2[] 
  = {
   #if defined (CONFIG_VIDEO_TCM825X) || defined (CONFIG_VIDEO_TCM825X_MODULE)
  {
  I2C_BOARD_INFO(TCM825X_NAME, TCM825X_I2C_ADDR),
  diff --git a/drivers/input/keyboard/lm8323.c 
  b/drivers/input/keyboard/lm8323.c
  index e793ae7..d472da0 100644
  --- a/drivers/input/keyboard/lm8323.c
  +++ b/drivers/input/keyboard/lm8323.c
  @@ -755,13 +755,11 @@ static int lm8323_probe(struct i2c_client *client,
  if (init_pwm(lm, 3, client-dev, lm8323_pdata-pwm3_name)  0)
  goto fail5;
   
  -   lm-irq = lm8323_pdata-irq_gpio;
  -   debug(c-dev, IRQ: %d\n, lm-irq);
  -
  +   lm-irq = client-irq;
  mutex_init(lm-lock);
  INIT_WORK(lm-work, lm8323_work);
   
  -   err = request_irq(client-irq, lm8323_irq,
  +   err = request_irq(lm-irq, lm8323_irq,
 
 instead, you could just remove lm-irq field from structure and keep
 using client-irq.

Good idea, here's an updated patch.

Tony

From aa1c7706df6f99df31322d297e7142267e237819 Mon Sep 17 00:00:00 2001
From: Tony Lindgren [EMAIL PROTECTED]
Date: Mon, 12 May 2008 22:53:07 -0700
Subject: [PATCH] Input: Fix lm8323 probe and module unloading

Make module unloading and reloading behave:

- Driver probe could fail if input_register_device fails as
  no error was returned from probe

- Driver interrupt was using unused platform_data field,
  change to use i2c platform data interrupt instead

- Free resources on unloading module

- Mark platform data as __init_or_module

Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/board-n800.c |2 +-
 drivers/input/keyboard/lm8323.c  |   32 +++-
 include/linux/i2c/lm8323.h   |2 --
 3 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index efcb25d..ae85c2c 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -642,7 +642,7 @@ static struct i2c_board_info __initdata n800_i2c_board_info_1[] = {
 
 extern struct tcm825x_platform_data n800_tcm825x_platform_data;
 
-static struct i2c_board_info __initdata n800_i2c_board_info_2[] = {
+static struct i2c_board_info __initdata_or_module n800_i2c_board_info_2[] = {
 #if defined (CONFIG_VIDEO_TCM825X) || defined (CONFIG_VIDEO_TCM825X_MODULE)
 	{
 		I2C_BOARD_INFO(TCM825X_NAME, TCM825X_I2C_ADDR),
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index e793ae7..72bb587 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
@@ -150,7 +150,6 @@ struct lm8323_chip {
 	struct i2c_client	*client;
 	struct work_struct	work;
 	struct input_dev	*idev;
-	int			irq;
 	unsigned		kp_enabled : 1;
 	unsigned		pm_suspend : 1;
 	unsigned		keys_down;
@@ -755,9 +754,6 @@ static int lm8323_probe(struct i2c_client *client,
 	if (init_pwm(lm, 3, client-dev, lm8323_pdata-pwm3_name)  0)
 		goto fail5;
 
-	lm-irq = lm8323_pdata-irq_gpio;
-	debug(c-dev, IRQ: %d\n, lm-irq);
-
 	mutex_init(lm-lock);
 	INIT_WORK(lm-work, lm8323_work);
 
@@ -765,11 +761,11 @@ static int lm8323_probe(struct i2c_client *client,
 			  IRQF_TRIGGER_FALLING | IRQF_DISABLED |
 			  IRQF_SAMPLE_RANDOM, DRIVER_NAME, lm);
 	if (err) {
-		dev_err(client-dev, could not get IRQ %d\n, lm-irq);
+		dev_err(client-dev, could not get IRQ %d\n, client-irq);
 		goto fail6;
 	}
 
-	set_irq_wake(lm-irq, 1);
+	set_irq_wake(client-irq, 1);
 
 	lm-kp_enabled = 1;
 	err = device_create_file(client-dev, dev_attr_disable_kp);
@@ -802,7 +798,8 @@ static int lm8323_probe(struct i2c_client *client,
 		set_bit(EV_REP, idev-evbit);
 
 	lm-idev = idev;
-	if (input_register_device(idev)) {
+	err = input_register_device(idev);
+	if (err) {
 		dev_dbg(client-dev, error registering 

Re: [PATCH 0/2] Make N810 keyboard work with console, take #2

2008-05-15 Thread Tony Lindgren
* Tony Lindgren [EMAIL PROTECTED] [080515 10:22]:
 * Daniel Stone [EMAIL PROTECTED] [080515 01:57]:
  On Wed, May 14, 2008 at 09:01:17PM -0700, ext Tony Lindgren wrote:
   Here are few fun patches for N810 hackers to make the integrated
   keyboard work with console :) This should be done in a generic way
   and the old behaviour is preserved if optional sticky keys are not
   passed from platform_data.
  
  Uhm.  If you're going to implement latching/locking keys, surely it'd be
  better to do this in the generic input layer than the keyboard driver?
 
 Yeah I agree it would be best to have the sticky keys handled in the
 input layer in generic way in the long run. Doing it in a generic ways
 would just require passing the flags with selected keys to input layer.
 
  NAK from myself (for what little that means) simply due to the sheer
  horror of seeing what should, by all rights, be a tiny driver, explode
  into non-triviality. :)
 
 Well I'll take a look at some point how to move the is_sticky handling
 to input layer. Meanwhile people can use this patch to have something
 usable.

Here's slightly updated version with Fn + space for tab key. Also added
some comments on handling stuff in the input layer.

Tony
From f30e4dc44b563eb3b1dc1207c2099cb345f0752d Mon Sep 17 00:00:00 2001
From: Tony Lindgren [EMAIL PROTECTED]
Date: Wed, 14 May 2008 20:41:44 -0700
Subject: [PATCH] Input: Make lm8323 sticky key to work with console

This allows using N810 keyboard from console by adding optional
Fn and shift sticky key handling by passing them from platform_data.

Currently some not so obvious mappings are:

- Pipe is Fn + Enter
- Delete is Fn + Backspace
- Escape is Fn + Ctrl and Fn + Left
- Tab is Fn + Space and Fn + Right

Works also with xserver-xorg-video-fbdev.

Note that the sticky key handling should be moved to the input
layer.

Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/board-n800.c |   87 +---
 drivers/input/keyboard/lm8323.c  |   89 ++
 include/linux/i2c/lm8323.h   |   12 ++---
 3 files changed, 163 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index ae85c2c..0d73c29 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -51,7 +51,16 @@
 #define N800_TSC2301_RESET_GPIO		118
 
 #ifdef CONFIG_MACH_NOKIA_N810
-static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
+
+/*
+ * Largest keycode that the chip can send, plus one,
+ * so keys can be mapped directly at the index of the
+ * LM8323 keycode instead of subtracting one.
+ */
+#define N810_HWKEY_SZ			(0x7f + 1)
+
+/* Keymap for lm8323. Negative value means Shift + KEY */
+static s16 rx44_keymap[N810_HWKEY_SZ * 2] = {
 	[0x01] = KEY_Q,
 	[0x02] = KEY_K,
 	[0x03] = KEY_O,
@@ -81,7 +90,7 @@ static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
 	[0x21] = KEY_E,
 	[0x22] = KEY_SEMICOLON,
 	[0x23] = KEY_MINUS,
-	[0x24] = KEY_EQUAL,
+	[0x24] = -KEY_EQUAL,
 	[0x2b] = KEY_FN,
 	[0x2c] = KEY_M,
 	[0x2f] = KEY_F8,
@@ -108,15 +117,77 @@ static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
 
 	[0x71] = KEY_I,
 	[0x75] = KEY_KPENTER,
+
+	/* End of hardware key map, Fn + key values below */
+
+	[0x01 + N810_HWKEY_SZ] = KEY_1,			/* Fn + KEY_Q */
+	[0x02 + N810_HWKEY_SZ] = -KEY_0,		/* Fn + KEY_K */
+	[0x03 + N810_HWKEY_SZ] = KEY_9,			/* Fn + KEY_O */
+	[0x04 + N810_HWKEY_SZ] = KEY_0,			/* Fn + KEY_P */
+	[0x05 + N810_HWKEY_SZ] = KEY_DELETE,		/* Fn + KEY_BACKSPACE */
+	[0x06 + N810_HWKEY_SZ] = -KEY_1,		/* Fn + KEY_A */
+	[0x07 + N810_HWKEY_SZ] = -KEY_APOSTROPHE,	/* Fn + KEY_S */
+	[0x08 + N810_HWKEY_SZ] = -KEY_2,		/* Fn + KEY_D */
+	[0x09 + N810_HWKEY_SZ] = -KEY_3,		/* Fn + KEY_F */
+	[0x0a + N810_HWKEY_SZ] = KEY_BACKSLASH,		/* Fn + KEY_G */
+	[0x0b + N810_HWKEY_SZ] = KEY_SLASH,		/* Fn + KEY_H */
+	[0x0c + N810_HWKEY_SZ] = -KEY_9,		/* Fn + KEY_J */
+
+	[0x11 + N810_HWKEY_SZ] = KEY_2,			/* Fn + KEY_W */
+	[0x12 + N810_HWKEY_SZ] = KEY_RESERVED,		/* Fn + KEY_F4 */
+	[0x13 + N810_HWKEY_SZ] = -KEY_8,		/* Fn + KEY_L */
+	[0x14 + N810_HWKEY_SZ] = -KEY_SLASH,		/* Fn + KEY_APOSTROPHE */
+	[0x16 + N810_HWKEY_SZ] = KEY_YEN,		/* Fn + KEY_Z */
+	[0x17 + N810_HWKEY_SZ] = -KEY_6,		/* Fn + KEY_X */
+	[0x18 + N810_HWKEY_SZ] = -KEY_GRAVE,		/* Fn + KEY_C */
+	[0x19 + N810_HWKEY_SZ] = -KEY_5,		/* Fn + KEY_V */
+	[0x1a + N810_HWKEY_SZ] = -KEY_7,		/* Fn + KEY_B */
+	[0x1b + N810_HWKEY_SZ] = -KEY_4,		/* Fn + KEY_N */
+	[0x1c + N810_HWKEY_SZ] = KEY_RESERVED,		/* Fn + KEY_LEFTSHIFT */
+	[0x1f + N810_HWKEY_SZ] = KEY_RESERVED,		/* Fn + KEY_F7 */
+
+	[0x21 + N810_HWKEY_SZ] = KEY_3,			/* Fn + KEY_E */
+	[0x22 + N810_HWKEY_SZ] = KEY_RESERVED,		/* Fn + KEY_SEMICOLON */
+	[0x23 + N810_HWKEY_SZ] = -KEY_MINUS,		/* Fn + KEY_MINUS */
+	[0x24 + N810_HWKEY_SZ] = KEY_EQUAL,		/* Fn + -KEY_EQUAL */
+	[0x2b + N810_HWKEY_SZ] = KEY_RESERVED,		/* Fn + KEY_FN */
+	[0x2c + N810_HWKEY_SZ] = KEY_EURO,		/* Fn + KEY_M */
+	[0x2f + 

Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread green
On Thu, 2008.05.15, 136, Felipe Balbi wrote:
  Always, one of these two happens after I flash the compiled zImage:
   - The NOKIA splash screen is displayed for about 20 seconds and then the
  N810 
  powers off.
   - The splash screen is shown for 1 second and the device resets (loop);
  I 
  have to remove the battery.
 
 flasher --enable-rd-mode --set-rd-flags=serial-console,no-lifeguard-reset
 -f

I had already done that, though not the serial-console one; I don't have any 
way to use it:

  I have enable RD mode on the N810 and disabled the lifeguard-reset flag.

  I've used 'make n800_defconfig' (2.6.26-rc2-omap1 +N810) and changed only
  the 
  default cmdline without success.  Also I've used 'make
  nokia_2420_defconfig' 
  with the maemo kernel.
 
 try also
 flasher --set-root-device mmc

I've tried this before, but can it really make any difference to whether the 
custom kernel boots?  The root device doesn't matter until after I have 
successfully booted a kernel.

  Oh, and one more question that I ought to know the answer to by now:
  Is it okay to do 'make zImage', then change the config, then 'make
 zImage'
  
  again without doing a 'make clean', so long as nothing in the source has
  been 
  changed?  That saves a lot of time.
 
 Yes, it's ok. ;-)

Great, thanks!


signature.asc
Description: Digital signature


Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread green
On Thu, 2008.05.15, 136, Tony Lindgren wrote:
 * green [EMAIL PROTECTED] [080515 10:03]:
  On Thu, 2008.05.15, 136, green wrote:
   I have built a Debian Sid armel chroot on the N810 and have compiled many 
   kernels in the chroot.  I send the kernels to the N810 using the flasher 
   (-f 
   -k $IMAGE -R).
  
  I've also built 2.6.26-rc2-omap1 (with muru.com N810 patches) on my amd64 
  system using the gnueabi tools from emdebian.org.
  
  gcc 4.3.0-4
  binutils 2.18.1~cvs20080103-4
  
  Same results.
- The NOKIA splash screen is displayed for about 20 seconds and then the 
   N810 
   powers off.
 
 Hmm, the patches I've posted should work fine to mount root from
 internal MMC card (assuming you have both cards inserted right now...)
 
 You should see the white Nokia splash screen for few seconds, then
 the black framebuffer console with penguin.
 
 I tarred up my n810 hacks to http://muru.com/linux/n8x0/ with the
 keyboard patches included.
 
 Here's also a temporary test zImage:
 
 http://muru.com/linux/n8x0/zImage-n8x0-2008-05-15
 
 You can test that with:
 
 $ flasher -k zImage-n8x0-2008-05-15 -l -b
 
 I'll remove that zImage at some point soon because of my limited
 server bandwidth.. This zImage works with n810, and seemed to boot
 on n800 too.

Okay, I've got the zImage and updated patches; thanks.  This zImage does work, 
but fails to mount root device (maybe something I did wrong; I'll worry about 
that later).  Could you send the config you used?  Or maybe I'm doing 
something wrong when compiling.

I'm compiling on an amd64 system with the following packages (and their 
dependencies) from emdebian.org:
binutils-arm-linux-gnueabi 2.18.1~cvs20080103-4
cpp-4.3-arm-linux-gnueabi 4.3.0-4
g++-4.3-arm-linux-gnueabi 4.3.0-4
gcc-4.3-arm-linux-gnueabi 4.3.0-4

and in the Makefile:
CROSS_COMPILE   ?= arm-linux-gnueabi-

For now I'll try with the latest from linux-omap-2.6 with your patches.

 BTW, you need to disable rd mode with flasher --disable-rd-mode with
 the serial clock hack applied. Otherwise the boot won't complete. Or
 at least you should not have --set-rd-flags=serial-console set.

I don't have the serial-console flag set.


Thanks!


signature.asc
Description: Digital signature


Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches

2008-05-15 Thread Tony Lindgren
* green [EMAIL PROTECTED] [080515 12:45]:
 On Thu, 2008.05.15, 136, Tony Lindgren wrote:
  * green [EMAIL PROTECTED] [080515 10:03]:
   On Thu, 2008.05.15, 136, green wrote:
I have built a Debian Sid armel chroot on the N810 and have compiled 
many 
kernels in the chroot.  I send the kernels to the N810 using the 
flasher (-f 
-k $IMAGE -R).
   
   I've also built 2.6.26-rc2-omap1 (with muru.com N810 patches) on my amd64 
   system using the gnueabi tools from emdebian.org.
   
   gcc 4.3.0-4
   binutils 2.18.1~cvs20080103-4
   
   Same results.
 - The NOKIA splash screen is displayed for about 20 seconds and then 
the N810 
powers off.
  
  Hmm, the patches I've posted should work fine to mount root from
  internal MMC card (assuming you have both cards inserted right now...)
  
  You should see the white Nokia splash screen for few seconds, then
  the black framebuffer console with penguin.
  
  I tarred up my n810 hacks to http://muru.com/linux/n8x0/ with the
  keyboard patches included.
  
  Here's also a temporary test zImage:
  
  http://muru.com/linux/n8x0/zImage-n8x0-2008-05-15
  
  You can test that with:
  
  $ flasher -k zImage-n8x0-2008-05-15 -l -b
  
  I'll remove that zImage at some point soon because of my limited
  server bandwidth.. This zImage works with n810, and seemed to boot
  on n800 too.
 
 Okay, I've got the zImage and updated patches; thanks.  This zImage does 
 work, 
 but fails to mount root device (maybe something I did wrong; I'll worry about 
 that later).  Could you send the config you used?  Or maybe I'm doing 
 something wrong when compiling.

The last patch in the series contains the changes to n800_defconfig.
Also attached as .config.

 I'm compiling on an amd64 system with the following packages (and their 
 dependencies) from emdebian.org:
 binutils-arm-linux-gnueabi 2.18.1~cvs20080103-4
 cpp-4.3-arm-linux-gnueabi 4.3.0-4
 g++-4.3-arm-linux-gnueabi 4.3.0-4
 gcc-4.3-arm-linux-gnueabi 4.3.0-4
 
 and in the Makefile:
 CROSS_COMPILE   ?= arm-linux-gnueabi-
 
 For now I'll try with the latest from linux-omap-2.6 with your patches.

Yeah that should work. Just dor ARCH=arm 
CROSS_COMPILE=gcc-4.3-arm-linux-gnueabi-
If in doubt, you can also try the codesourcery toolchain, but sounds
like your compiler is just fine.

  BTW, you need to disable rd mode with flasher --disable-rd-mode with
  the serial clock hack applied. Otherwise the boot won't complete. Or
  at least you should not have --set-rd-flags=serial-console set.
 
 I don't have the serial-console flag set.

OK

Tony



#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26-rc2-omap1
# Thu May 15 10:35:40 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_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_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 is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=18
# 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=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
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=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_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

[PATCH] clock34xx.c: fix spinlock reentry in omap3_noncore_dpll_enable()

2008-05-15 Thread Paul Walmsley

omap3_noncore_dpll_enable() calls clk_get_rate(), which causes an attempt 
to re-enter the clockfw_lock spinlock.  Fix by calling 
omap2_get_dpll_rate() instead.

Signed-off-by: Paul Walmsley [EMAIL PROTECTED]
---

 arch/arm/mach-omap2/clock34xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 670c945..71357db 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -273,7 +273,7 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
if (clk == dpll3_ck)
return -EINVAL;
 
-   if (clk-parent-rate == clk_get_rate(clk))
+   if (clk-parent-rate == omap2_get_dpll_rate(clk))
r = _omap3_noncore_dpll_bypass(clk);
else
r = _omap3_noncore_dpll_lock(clk);
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] Add sram34xx.S

2008-05-15 Thread Tony Lindgren
* Tony Lindgren [EMAIL PROTECTED] [080328 04:46]:
 Hi all,
 
 Following two patches add sram34xx.S based on Karthik's patch and what's
 at [1]. Looks like the sram code in [1] is newer so I've used that.
 Let me know if that's not the case.
 
 Karthik, can you please check and ack? I've only compile tested them.
 
 Regards,
 
 Tony
 
 [1] http://linux.omap.com/pub/kernel/3430zoom/linux-ldp-v1.0b.tar.gz

I'll push these two patches today meged into single patch below.

Tony
From 8d00571b0ecb2fb21b35e5d13b2959a71142abfa Mon Sep 17 00:00:00 2001
From: Karthik Dasu [EMAIL PROTECTED]
Date: Thu, 15 May 2008 14:27:08 -0700
Subject: [PATCH] ARM: OMAP3: Add sram34xx.S

This patch adds sram34xx.S for programming the core DPLL.

It is based on Karthik's earlier patch and TI's sram-fn_34xxS from:

http://linux.omap.com/pub/kernel/3430zoom/linux-ldp-v1.0b.tar.gz

Patch modified by Tony for the new register access.

Signed-off-by: Karthik Dasu[EMAIL PROTECTED]
Signed-off-by: Tony Lindgren [EMAIL PROTECTED]

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 552664c..ea0cf43 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -9,6 +9,7 @@ obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o 
mux.o \
 
 # Functions loaded to SRAM
 obj-$(CONFIG_ARCH_OMAP2)   += sram24xx.o
+obj-$(CONFIG_ARCH_OMAP3)   += sram34xx.o
 
 # Power Management
 obj-$(CONFIG_PM) += pm.o sleep.o
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
new file mode 100644
index 000..74873df
--- /dev/null
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -0,0 +1,209 @@
+/*
+ * linux/arch/arm/mach-omap3/sram.S
+ *
+ * Omap3 specific functions that need to be run in internal SRAM
+ *
+ * (C) Copyright 2007
+ * Texas Instruments Inc.
+ * Rajendra Nayak [EMAIL PROTECTED]
+ *
+ * (C) Copyright 2004
+ * Texas Instruments, www.ti.com
+ * Richard Woodruff [EMAIL PROTECTED]
+ *
+ * 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 (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include linux/linkage.h
+#include asm/assembler.h
+#include asm/hardware.h
+
+#include asm/arch/io.h
+
+#include sdrc.h
+#include cm.h
+
+   .text
+
+ENTRY(omap34xx_sram_ddr_init)
+   stmfd   sp!, {r0 - r12, lr} @ save registers on stack
+   ldmfd   sp!, {r0 - r12, pc} @ restore regs and return
+ENTRY(omap34xx_sram_ddr_init_sz)
+   .word   . - omap34xx_sram_ddr_init
+
+ENTRY(omap34xx_sram_reprogram_sdrc)
+   stmfd   sp!, {r0 - r10, lr} @ save registers on stack
+   ldmfd   sp!, {r0 - r10, pc} @ restore regs and return
+ENTRY(omap34xx_sram_reprogram_sdrc_sz)
+   .word   . - omap34xx_sram_reprogram_sdrc
+
+/*
+ * Set dividers and pll. Also recalculate DLL value for DDR and unlock mode.
+ */
+ENTRY(omap34xx_sram_set_prcm)
+   stmfd   sp!, {r0-r12, lr}   @ regs to stack
+ENTRY(omap34xx_sram_set_prcm_sz)
+   .word   . - omap34xx_sram_set_prcm
+
+/*
+ * Change frequency of core dpll
+ * r0 = sdrc_rfr_ctrl r1 = sdrc_actim_ctrla r2 = sdrc_actim_ctrlb r3 = M2
+ */
+ENTRY(omap34xx_sram_configure_core_dpll)
+   stmfd   sp!, {r1-r12, lr}   @ store regs to stack
+   cmp r3, #0x2
+   blneconfigure_sdrc
+   cmp r3, #0x2
+   blnelock_dll
+   cmp r3, #0x1
+   blneunlock_dll
+   bl  sdram_in_selfrefresh@ put the SDRAM in self refresh
+   bl  configure_core_dpll
+   bl  enable_sdrc
+   cmp r3, #0x1
+   blnewait_dll_unlock
+   cmp r3, #0x2
+   blnewait_dll_lock
+   cmp r3, #0x1
+   blneconfigure_sdrc
+   mov r0, #0  @ return value
+   ldmfd   sp!, {r1-r12, pc}   @ restore regs and return
+unlock_dll:
+   ldr r4, omap34xx_sdrc_dlla_ctrl
+   ldr r5, [r4]
+   orr r5, r5, #0x4
+   str r5, [r4]
+   bx  lr
+lock_dll:
+   ldr r4, omap34xx_sdrc_dlla_ctrl
+   ldr r5, [r4]
+   bic r5, r5, #0x4
+   str r5, [r4]
+   bx  lr
+sdram_in_selfrefresh:
+   mov r5, #0x0@ Move 0 to R5
+   mcr p15, 0, r5, c7, c10, 5  @ memory barrier
+   ldr r4, omap34xx_sdrc_power @ read the SDRC_POWER register
+   ldr r5, [r4]@ read the contents of SDRC_POWER
+  

Re: [PATCH 3/3] CBUS: Make retu watchdog behave like a standard Linux watchdog

2008-05-15 Thread Tony Lindgren
* Tony Lindgren [EMAIL PROTECTED] [080512 18:17]:
 * Igor Stoppa [EMAIL PROTECTED] [080512 17:56]:
  Hi Tony,
  On Mon, 2008-05-12 at 17:35 -0700, ext Tony Lindgren wrote:
   Make retu watchdog behave like a standard Linux watchdog.
   
   Let the kernel do the kicking until the watchdog device is opened.
  
  This is not always the desidered behavior: the powerdown wd is used to
  ensure that the whole sw stack is healty: doing the kicking in
  kernelspace for free introduces the case where userspace can get stuck
  and the device does not powerdown.
 
 That's why there's CONFIG_WATCHDOG_NOWAYOUT where the ping timer is
 not enabled at all, and the watchdog is just set to max until userspace
 watchdog software kicking starts.
 
  Also the unconditional loading of the maximum value during probe is not
  aligned with the original reset logic, which was to have the powerdown
  wd to allow for 2 boot attempts:
  
  -cold boot - load max value in retu wd (63s)
 - load 30s in omap wd
  -try to kick both wds
 
 Well you can set those values via /dev/watchdog too, right?
 And then use CONFIG_WATCHDOG_NOWAYOUT.
 
 And ff CONFIG_WATCHDOG_NOWAYOUT is not set, the kernel ping timer only
 happens when /dev/watchdog is not open.
 
  if fail, then omap reboots, but retu keeps counting down
  
  -warm boot - let the retu wd untouched
 - load 30s in omap wd
  -try to kick both wds
  
  if fail, retu powers down
  
  That was the original idea in 770 times and i still like it.
  
  To conclude, i'd see inkernel kicking more as a debugging feature while
  one is hacking at the kernel than a desirable quality of a stable
  kernel.
 
 Considering that the /dev/watchdog interface is the standard, I see this
 patch as the only way we can get this code ever merged upstream. And it's
 easy to patch back the non-standard if you want to.

I'll push the first two patches today, third one still needs to be
checked.

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


Re: N810: linux-2.6.26-rc2-omap1 with muru.com N810 patches (success)

2008-05-15 Thread green
On Thu, 2008.05.15, 136, Tony Lindgren wrote:
 * green [EMAIL PROTECTED] [080515 12:45]:
  Okay, I've got the zImage and updated patches; thanks.  This zImage does 
  work, 
  but fails to mount root device (maybe something I did wrong; I'll worry 
  about 
  that later).  Could you send the config you used?  Or maybe I'm doing 
  something wrong when compiling.
 
 The last patch in the series contains the changes to n800_defconfig.
 Also attached as .config.

I don't understand, then, why there are differences between the config 
generated by 'make n800_defconfig' and the config you attached.  Like 
CONFIG_FRAMEBUFFER_CONSOLE is Y in the attached config but N in the generated 
config (and others).

  I'm compiling on an amd64 system with the following packages (and their 
  dependencies) from emdebian.org:
  binutils-arm-linux-gnueabi 2.18.1~cvs20080103-4
  cpp-4.3-arm-linux-gnueabi 4.3.0-4
  g++-4.3-arm-linux-gnueabi 4.3.0-4
  gcc-4.3-arm-linux-gnueabi 4.3.0-4
  
  and in the Makefile:
  CROSS_COMPILE   ?= arm-linux-gnueabi-
  
  For now I'll try with the latest from linux-omap-2.6 with your patches.
 
 Yeah that should work. Just dor ARCH=arm 
 CROSS_COMPILE=gcc-4.3-arm-linux-gnueabi-
 If in doubt, you can also try the codesourcery toolchain, but sounds
 like your compiler is just fine.

I have been using the Makefile instead, just changing this:
CROSS_COMPILE ?= arm-linux-gnueabi-

But that still doesn't work so:

I installed 4.2.3-5 of cpp, g++, and gcc and tried it again and finally it 
works.  So I guess I can blame the 4.3 packages, because I have been using them 
all this time in some form, both in the chroot and on the amd64 system.  I 
should have tried 4.2 earlier.

Thanks for your help.


signature.asc
Description: Digital signature


wear-leveling necessary on N810 internal/removable cards?

2008-05-15 Thread green
Okay, I guess this a somewhat off-topic question for this list, but I'm not 
sure where else to ask it, so please forgive me.

Simply: do the controllers for the internal and removeable Flash cards of the 
Nokia N810 do wear-leveling automatically or should I use something like JFFS2 
to handle that?  I suppose that the location of the kernel, initfs, and rootfs 
does not do wear-leveling because the maemo OS does use JFFS2 for the rootfs, 
but I'm not sure about the two Flash cards.

Thanks.


signature.asc
Description: Digital signature


Re: wear-leveling necessary on N810 internal/removable cards?

2008-05-15 Thread Kyungmin Park
Hi,

On Fri, May 16, 2008 at 8:11 AM, green [EMAIL PROTECTED] wrote:
 Okay, I guess this a somewhat off-topic question for this list, but I'm not
 sure where else to ask it, so please forgive me.

 Simply: do the controllers for the internal and removeable Flash cards of the
 Nokia N810 do wear-leveling automatically or should I use something like JFFS2
 to handle that?  I suppose that the location of the kernel, initfs, and rootfs
 does not do wear-leveling because the maemo OS does use JFFS2 for the rootfs,
 but I'm not sure about the two Flash cards.


It's MMC cards which means it does its own wear-leveling internally.
So you don't need to worry it.

Thank you,
Kyungmin Park
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Performance enhancement for MMCSD when feature CONFIG_MMC_BLOCK_BOUNCE is enabled in the MMC core

2008-05-15 Thread Kyungmin Park
Hi,

On Thu, May 15, 2008 at 10:30 PM, Felipe Balbi
[EMAIL PROTECTED] wrote:
 Hi,

 this list moved to linux-omap@vger.kernel.org ;-)

 On Thu, May 15, 2008 at 4:25 PM, Kumar, Purushotam [EMAIL PROTECTED] wrote:
 This patch will increase performance significantly. In my testing with a SD 
 Extreme III high speed 2GB SD card using FAT file system on OMAP35X TI EVM, 
 write speed has improved by 2x whereas read speed has improved by 3 times 
 for MMCSD when CONFIG_MMC_BLOCK_BOUNCE is enabled.  It is supposed that 
 larger/bounce buffers will be used by mmc core if CONFIG_MMC_BLOCK_BOUNCE is 
 defined. But, in the mmc core, size of buffer is set to mmc-max_req_size if 
 mmc-max_req_size is smaller than MMC_QUEUE_BOUNCESZ i.e. bounce buffer size 
 (which is 64KB). By default, mmc-max_req_size is set to 4K. So, buffers of 
 4K will be used instead of 64K even if CONFIG_MMC_BLOCK_BOUNCE is defined 
 without this patch. This patches forces mmc core to use bounce buffer of 
 size MMC_QUEUE_BOUNCESZ and so performance is increased.

 Signed-off-by: Purushotam Kumar [EMAIL PROTECTED]
 ---
 Index: linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c
 ===
 --- linux-omap-2.6.orig/drivers/mmc/host/omap_hsmmc.c
 +++ linux-omap-2.6/drivers/mmc/host/omap_hsmmc.c
 @@ -782,6 +782,15 @@ static int __init omap_mmc_probe(struct
else
host-dbclk_enabled = 1;

 +#ifdef CONFIG_MMC_BLOCK_BOUNCE
 +   mmc-max_phys_segs = 1;
 +   mmc-max_hw_segs = 1;
 +#endif
 +   mmc-max_blk_size = 512;   /* Block Length at max can be 1024 */
 +   mmc-max_blk_count = 0x;/* No. of Blocks is 16 bits */
 +   mmc-max_req_size = mmc-max_blk_size * mmc-max_blk_count;
 +   mmc-max_seg_size = mmc-max_req_size;
 +
mmc-ocr_avail = mmc_slot(host).ocr_mask;
mmc-caps |= MMC_CAP_MULTIWRITE | MMC_CAP_MMC_HIGHSPEED |
MMC_CAP_SD_HIGHSPEED;

 Do you have any measurements results to share :-p


similar ways omap.c does, but it's almost same or degraded.
It was tested on apollon (OMAP2420)

Thank you,
Kyungmin Park

# iozone -A -s 128m -q 256k -U /mmc -f /mmc/test -e

% before
131072   430142317 6577 6575
131072   829182702 6577 6568
131072  1628952287 6560 6556
131072  3228392430 6567 6551
131072  6429292688 6548 6545
131072 128   29562534 6572 6565
131072 25628612356 6571 6569

% after
131072   429172784 6383 6379
131072   828062615 6377 6397
131072  1628342953 6383 6379
131072  3228442492 6376 6375
131072  6429762625 6395 6379

Here's patch

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 549517c..a0c0d38 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1332,12 +1335,17 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host
mmc-f_max = min(host-pdata-max_freq, mmc-f_max);
mmc-ocr_avail = slot-pdata-ocr_mask;

+#ifdef CONFIG_MMC_BLOCK_BOUNCE
+   mmc-max_phys_segs = 1;
+   mmc-max_hw_segs = 1;
+#else
/* Use scatterlist DMA to reduce per-transfer costs.
 * NOTE max_seg_size assumption that small blocks aren't
 * normally used (except e.g. for reading SD registers).
 */
mmc-max_phys_segs = 32;
mmc-max_hw_segs = 32;
+#endif
mmc-max_blk_size = 2048;   /* BLEN is 11 bits (+1) */
mmc-max_blk_count = 2048;  /* NBLK is 11 bits (+1) */
mmc-max_req_size = mmc-max_blk_size * mmc-max_blk_count;
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: wear-leveling necessary on N810 internal/removable cards?

2008-05-15 Thread green
On Fri, 2008.05.16, 137, Kyungmin Park wrote:
 On Fri, May 16, 2008 at 8:11 AM, green [EMAIL PROTECTED] wrote:
  Simply: do the controllers for the internal and removeable Flash cards of 
  the
  Nokia N810 do wear-leveling automatically or should I use something like 
  JFFS2
  to handle that?  I suppose that the location of the kernel, initfs, and 
  rootfs
  does not do wear-leveling because the maemo OS does use JFFS2 for the 
  rootfs,
  but I'm not sure about the two Flash cards.
 
 It's MMC cards which means it does its own wear-leveling internally.
 So you don't need to worry it.

Okay, thanks!


signature.asc
Description: Digital signature


Re: ALSA SoC for TWL4030

2008-05-15 Thread Jarkko Nikula
On Thu, 15 May 2008 17:39:32 +0200
ext Koen Kooi [EMAIL PROTECTED] wrote:

 Op 15 mei 2008, om 17:18 heeft Steve Sakoman het volgende geschreven:
  I'm thinking of tackling audio support for the OMAP3 EVM next.
 
  I'd like to make sure that I'm not duplicating work :-)
 
  Is anyone aware of any existing efforts to support the TWL4030 audio
  functionality?  I've seen the TI work in the 2.6.22 kernel, but it
  is not an SoC driver and seems to use a different mcbsp
  implementation than is in the current linux-omap tree.
 
It would be great to get ASoC driver for TWL4030 since it's the biggest
task to get ASoC audio on OMAP3 EVM. AFAIK TWL4030 is used also in
other EVMs as well so those boards can be supported also by just adding
own ASoC machine drivers for them.

Currently ASoC for OMAP doesn't support yet OMAP3 but it's not very big
issue to add it after low-level McBSP driver supports it. Eduardo
Valentin is currently updating it.

 There does seem to be an ASoC driver for the McBSP2 I2S side, but
 the KConfig entry:
 
 - --
 
 config SND_OMAP_SOC_MCBSP
  tristate
  select OMAP_MCBSP
 
 - --
 
 doesn't show up in menuconfig :(
 
Convention in ASoC is that only machines are shown and their entries
will then select the codec and link drivers. E.g

config SND_OMAP_SOC_N810
tristate SoC Audio support for Nokia N810
depends on SND_OMAP_SOC  MACH_NOKIA_N810
select SND_OMAP_SOC_MCBSP
select SND_SOC_TLV320AIC3X
help
  Say Y if you want to add support for SoC audio on Nokia N810.


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