All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
@ 2009-10-24 20:03 Dmitry Artamonow
  2009-10-24 20:03 ` [PATCH 01/20] SA1100: h3100/h3600: mark *_mach_init functions as __init Dmitry Artamonow
  2009-10-24 21:10 ` [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Russell King - ARM Linux
  0 siblings, 2 replies; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:03 UTC (permalink / raw)
  To: linux-arm-kernel

Main features: lots of cleanup, finished conversion to gpiolib,
machine specific platform code separated, added support for
gpio-keys, and reused h3600 pcmcia driver on h3100

Patchset is based on top of RMK's sa1100 branch
(commit "ARM: iPAQ: no need to set PWER_RTC")
If anybody wants to test it, full patchset against 2.6.32-rc5
(including Russell's patches) can be found here:
http://mad.is-a-geek.org/h3600/2.6.32-h3600-patches-20091024.tar.bz2

Other than that patches doesn't depend on anything else. Although
I should note that assign_h3600_egpio conversion doesn't touch broken
mtd/maps/ipaq.c driver, making it's even more broken. Patch for its
removal has already been posted.

Compile and run tested on iPAQs h3150 and h3635 with CF jacket.
Patches are mostly checkpatch clean - there's some comments
exceeding 80-line limit, but otherwise all code should be ok.

Also, please note, that patches are generated with "-C" flag
of git-format-patch for easier review. If there's problems with
applying, use patches from URL above - they're generated without "-C".

Dmitry Artamonow (20):
  SA1100: h3100/h3600: mark *_mach_init functions as __init
  SA1100: h3100/h3600: remove dead links from Kconfig help text
  SA1100: h3600: remove IRDA bits from serial PM callback
  SA1100: h3600: remove unused cruft from h3600.h
  SA1100: h3600: stop setting direction for LCD pins
  pcmcia: convert sa1100_h3600 driver to gpiolib
  SA1100: h3100/h3600: separate machine-specific LCD helpers
  SA1100: h3100/h3600: add htc-egpio driver
  SA1100: h3100/h3600: convert all users of assign_h3600_egpio to
    gpiolib
  SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
  SA1100: h3600: remove IRQ_GPIO_* definitions
  SA1100: h3100/h3600: configure all unused gpios as inputs
  SA1100: h3100/h3600: drop old GPIO definitions
  SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
  SA1100: h3100/h3600: split h3600.c
  SA1100: h3100/h3600: revise copyright boilerplates
  SA1100: h3100/h3600: clean up #includes
  SA1100: h3100/h3600: add support for gpio-keys
  SA1100: reuse h3600 PCMCIA driver on h3100
  SA1100: h3600: update defconfig

 arch/arm/configs/h3600_defconfig                   |  976 ++++++++++++--------
 arch/arm/mach-sa1100/Kconfig                       |    2 -
 arch/arm/mach-sa1100/Makefile                      |    4 +-
 arch/arm/mach-sa1100/h3100.c                       |   93 ++
 arch/arm/mach-sa1100/h3600.c                       |  505 ++---------
 arch/arm/mach-sa1100/{h3600.c => h3xxx.c}          |  458 +++-------
 arch/arm/mach-sa1100/include/mach/h3600.h          |  100 --
 .../include/mach/{h3600_gpio.h => h3xxx.h}         |  120 ++--
 drivers/pcmcia/sa1100_generic.c                    |    2 +-
 drivers/pcmcia/sa1100_h3600.c                      |  140 +++-
 10 files changed, 1059 insertions(+), 1341 deletions(-)
 create mode 100644 arch/arm/mach-sa1100/h3100.c
 copy arch/arm/mach-sa1100/{h3600.c => h3xxx.c} (31%)
 delete mode 100644 arch/arm/mach-sa1100/include/mach/h3600.h
 rename arch/arm/mach-sa1100/include/mach/{h3600_gpio.h => h3xxx.h} (17%)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 01/20] SA1100: h3100/h3600: mark *_mach_init functions as __init
  2009-10-24 20:03 [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Dmitry Artamonow
@ 2009-10-24 20:03 ` Dmitry Artamonow
  2009-10-24 20:04   ` [PATCH 02/20] SA1100: h3100/h3600: remove dead links from Kconfig help text Dmitry Artamonow
  2009-10-24 21:10 ` [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Russell King - ARM Linux
  1 sibling, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:03 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 2f6ea17..ebb3b8d 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -188,7 +188,7 @@ static struct sa1100_port_fns h3xxx_port_fns __initdata = {
 };
 
 
-static void h3xxx_mach_init(void)
+static void __init h3xxx_mach_init(void)
 {
 	sa1100_register_uart_fns(&h3xxx_port_fns);
 	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
@@ -371,7 +371,7 @@ static struct gpio_default_state h3100_default_gpio[] = {
 	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
 };
 
-static void h3100_mach_init(void)
+static void __init h3100_mach_init(void)
 {
 	h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio));
 	h3xxx_mach_init();
@@ -500,7 +500,7 @@ static struct gpio_default_state h3600_default_gpio[] = {
 	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
 };
 
-static void h3600_mach_init(void)
+static void __init h3600_mach_init(void)
 {
 	h3xxx_init_gpio(h3600_default_gpio, ARRAY_SIZE(h3600_default_gpio));
 	h3xxx_mach_init();
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 02/20] SA1100: h3100/h3600: remove dead links from Kconfig help text
  2009-10-24 20:03 ` [PATCH 01/20] SA1100: h3100/h3600: mark *_mach_init functions as __init Dmitry Artamonow
@ 2009-10-24 20:04   ` Dmitry Artamonow
  2009-10-24 20:04     ` [PATCH 03/20] SA1100: h3600: remove IRDA bits from serial PM callback Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/Kconfig |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 4e5c07f..854768f 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -59,7 +59,6 @@ config SA1100_H3100
 	  Linux port to this machine can be found at:
 
 	  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
-	  <http://www.compaq.com/products/handhelds/pocketpc/>
 
 config SA1100_H3600
 	bool "Compaq iPAQ H3600/H3700"
@@ -69,7 +68,6 @@ config SA1100_H3600
 	  Linux port to this machine can be found at:
 
 	  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
-	  <http://www.compaq.com/products/handhelds/pocketpc/>
 
 config SA1100_BADGE4
 	bool "HP Labs BadgePAD 4"
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 03/20] SA1100: h3600: remove IRDA bits from serial PM callback
  2009-10-24 20:04   ` [PATCH 02/20] SA1100: h3100/h3600: remove dead links from Kconfig help text Dmitry Artamonow
@ 2009-10-24 20:04     ` Dmitry Artamonow
  2009-10-24 20:04       ` [PATCH 04/20] SA1100: h3600: remove unused cruft from h3600.h Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

IRDA is handled by separate sa1100-ir driver and has
nothing to do with sa1100_serial

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index ebb3b8d..5033c03 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -155,11 +155,8 @@ static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
 
 static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
 {
-	if (port->mapbase == _Ser2UTCR0) { /* TODO: REMOVE THIS */
-		assign_h3600_egpio(IPAQ_EGPIO_IR_ON, !state);
-	} else if (port->mapbase == _Ser3UTCR0) {
+	if (port->mapbase == _Ser3UTCR0)
 		assign_h3600_egpio(IPAQ_EGPIO_RS232_ON, !state);
-	}
 }
 
 /*
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 04/20] SA1100: h3600: remove unused cruft from h3600.h
  2009-10-24 20:04     ` [PATCH 03/20] SA1100: h3600: remove IRDA bits from serial PM callback Dmitry Artamonow
@ 2009-10-24 20:04       ` Dmitry Artamonow
  2009-10-24 20:04         ` [PATCH 05/20] SA1100: h3600: stop setting direction for LCD pins Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

PM_SUSPEND, PM_RESUME and machine_is_h3xxx() are not used anywhere in
kernel (checked with git grep), so it's safe to remove them.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/include/mach/h3600.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index 2827faa..69f138c 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -23,14 +23,6 @@
 #ifndef _INCLUDE_H3600_H_
 #define _INCLUDE_H3600_H_
 
-typedef int __bitwise pm_request_t;
-
-#define PM_SUSPEND	((__force pm_request_t) 1)	/* enter D1-D3 */
-#define PM_RESUME	((__force pm_request_t) 2)	/* enter D0 */
-
-/* generalized support for H3xxx series Compaq Pocket PC's */
-#define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600())
-
 /* Physical memory regions corresponding to chip selects */
 #define H3600_EGPIO_PHYS	(SA1100_CS5_PHYS + 0x01000000)
 #define H3600_BANK_2_PHYS	SA1100_CS2_PHYS
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 05/20] SA1100: h3600: stop setting direction for LCD pins
  2009-10-24 20:04       ` [PATCH 04/20] SA1100: h3600: remove unused cruft from h3600.h Dmitry Artamonow
@ 2009-10-24 20:04         ` Dmitry Artamonow
  2009-10-24 20:04           ` [PATCH 06/20] pcmcia: convert sa1100_h3600 driver to gpiolib Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

sa1100_fb driver handles this

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 5033c03..021cecb 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -464,9 +464,7 @@ static void __init h3600_map_io(void)
 	GPCR = 0x0fffffff;	 /* All outputs are set low by default */
 	GPDR = GPIO_H3600_L3_CLOCK |
 	       GPIO_H3600_L3_MODE  | GPIO_H3600_L3_DATA  |
-	       GPIO_H3600_CLK_SET1 | GPIO_H3600_CLK_SET0 |
-	       GPIO_LDD15 | GPIO_LDD14 | GPIO_LDD13 | GPIO_LDD12 |
-	       GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9  | GPIO_LDD8;
+	       GPIO_H3600_CLK_SET1 | GPIO_H3600_CLK_SET0;
 
 	H3600_EGPIO = h3600_egpio;	   /* Maintains across sleep? */
 	assign_h3600_egpio = h3600_control_egpio;
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 06/20] pcmcia: convert sa1100_h3600 driver to gpiolib
  2009-10-24 20:04         ` [PATCH 05/20] SA1100: h3600: stop setting direction for LCD pins Dmitry Artamonow
@ 2009-10-24 20:04           ` Dmitry Artamonow
  2009-10-24 20:08             ` [PATCH 07/20] SA1100: h3100/h3600: separate machine-specific LCD helpers Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

Convert all operations with GPLR/GPCR/GPSR to gpiolibs calls.
Also change all IRQ_GPIO* to gpio_to_irq(*GPIO*)

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 drivers/pcmcia/sa1100_h3600.c |   82 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 71 insertions(+), 11 deletions(-)

diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 0cc3748..6d92a49 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -10,26 +10,78 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/gpio.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/h3600.h>
+#include <mach/h3600_gpio.h>
 
 #include "sa1100_generic.h"
 
 static struct pcmcia_irqs irqs[] = {
-	{ 0, IRQ_GPIO_H3600_PCMCIA_CD0, "PCMCIA CD0" },
-	{ 1, IRQ_GPIO_H3600_PCMCIA_CD1, "PCMCIA CD1" }
+	{ .sock = 0, .str = "PCMCIA CD0" }, /* .irq will be filled later */
+	{ .sock = 1, .str = "PCMCIA CD1" }
 };
 
 static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 {
-	skt->irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
-			   : IRQ_GPIO_H3600_PCMCIA_IRQ0;
+	int err;
 
+	switch (skt->nr) {
+	case 0:
+		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ0, "PCMCIA IRQ0");
+		if (err)
+			goto err00;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ0);
+		if (err)
+			goto err01;
+		skt->irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ0);
+
+		err = gpio_request(H3XXX_GPIO_PCMCIA_CD0, "PCMCIA CD0");
+		if (err)
+			goto err01;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD0);
+		if (err)
+			goto err02;
+		irqs[0].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD0);
+
+		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		if (err)
+			goto err02;
+		break;
+	case 1:
+		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ1, "PCMCIA IRQ1");
+		if (err)
+			goto err10;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ1);
+		if (err)
+			goto err11;
+		skt->irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ1);
+
+		err = gpio_request(H3XXX_GPIO_PCMCIA_CD1, "PCMCIA CD1");
+		if (err)
+			goto err11;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD1);
+		if (err)
+			goto err12;
+		irqs[1].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD1);
+
+		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		if (err)
+			goto err12;
+		break;
+	}
+	return 0;
+
+err02:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+err01:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+err00:	return err;
 
-	return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+err12:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+err11:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+err10:	return err;
 }
 
 static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
@@ -40,17 +92,25 @@ static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
+	switch (skt->nr) {
+	case 0:
+		gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+		gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+		break;
+	case 1:
+		gpio_free(H3XXX_GPIO_PCMCIA_CD1);
+		gpio_free(H3XXX_GPIO_PCMCIA_IRQ1);
+		break;
+	}
 }
 
 static void
 h3600_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
 {
-	unsigned long levels = GPLR;
-
 	switch (skt->nr) {
 	case 0:
-		state->detect = levels & GPIO_H3600_PCMCIA_CD0 ? 0 : 1;
-		state->ready = levels & GPIO_H3600_PCMCIA_IRQ0 ? 1 : 0;
+		state->detect = !gpio_get_value(H3XXX_GPIO_PCMCIA_CD0);
+		state->ready = !!gpio_get_value(H3XXX_GPIO_PCMCIA_IRQ0);
 		state->bvd1 = 0;
 		state->bvd2 = 0;
 		state->wrprot = 0; /* Not available on H3600. */
@@ -59,8 +119,8 @@ h3600_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *st
 		break;
 
 	case 1:
-		state->detect = levels & GPIO_H3600_PCMCIA_CD1 ? 0 : 1;
-		state->ready = levels & GPIO_H3600_PCMCIA_IRQ1 ? 1 : 0;
+		state->detect = !gpio_get_value(H3XXX_GPIO_PCMCIA_CD1);
+		state->ready = !!gpio_get_value(H3XXX_GPIO_PCMCIA_IRQ1);
 		state->bvd1 = 0;
 		state->bvd2 = 0;
 		state->wrprot = 0; /* Not available on H3600. */
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 07/20] SA1100: h3100/h3600: separate machine-specific LCD helpers
  2009-10-24 20:04           ` [PATCH 06/20] pcmcia: convert sa1100_h3600 driver to gpiolib Dmitry Artamonow
@ 2009-10-24 20:08             ` Dmitry Artamonow
  2009-10-24 20:08               ` [PATCH 08/20] SA1100: h3100/h3600: add htc-egpio driver Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:08 UTC (permalink / raw)
  To: linux-arm-kernel

h3100 and h3600 have different sets of LCD-controlling gpios,
which mapped to the same "abstracted" EGPIO.
As we plan to get rid of those abstracted egpios completely, we
need to separate these helper functions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 021cecb..1297c11 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -191,14 +191,6 @@ static void __init h3xxx_mach_init(void)
 	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
 }
 
-/*
- * helper for sa1100fb
- */
-static void h3xxx_lcd_power(int enable)
-{
-	assign_h3600_egpio(IPAQ_EGPIO_LCD_POWER, enable);
-}
-
 static struct map_desc h3600_io_desc[] __initdata = {
   	{	/* static memory bank 2  CS#2 */
 		.virtual	=  H3600_BANK_2_VIRT,
@@ -240,7 +232,6 @@ static void __init h3xxx_map_io(void)
 	PCFR = PCFR_OPDE;
 	PSDR = 0;
 
-	sa1100fb_lcd_power = h3xxx_lcd_power;
 }
 
 /************************* H3100 *************************/
@@ -321,11 +312,21 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
 			  | GPIO_H3100_AUD_PWR_ON \
 			  | GPIO_H3100_IR_ON	  \
 			  | GPIO_H3100_IR_FSEL)
+/*
+ * helper for sa1100fb
+ */
+static void h3100_lcd_power(int enable)
+{
+	assign_h3600_egpio(IPAQ_EGPIO_LCD_POWER, enable);
+}
+
 
 static void __init h3100_map_io(void)
 {
 	h3xxx_map_io();
 
+	sa1100fb_lcd_power = h3100_lcd_power;
+
 	/* Initialize h3100-specific values here */
 	GPCR = 0x0fffffff;	 /* All outputs are set low by default */
 	GPDR = GPIO_H3600_L3_CLOCK |
@@ -455,10 +456,20 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
 	}
 }
 
+/*
+ * helper for sa1100fb
+ */
+static void h3600_lcd_power(int enable)
+{
+	assign_h3600_egpio(IPAQ_EGPIO_LCD_POWER, enable);
+}
+
 static void __init h3600_map_io(void)
 {
 	h3xxx_map_io();
 
+	sa1100fb_lcd_power = h3600_lcd_power;
+
 	/* Initialize h3600-specific values here */
 
 	GPCR = 0x0fffffff;	 /* All outputs are set low by default */
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 08/20] SA1100: h3100/h3600: add htc-egpio driver
  2009-10-24 20:08             ` [PATCH 07/20] SA1100: h3100/h3600: separate machine-specific LCD helpers Dmitry Artamonow
@ 2009-10-24 20:08               ` Dmitry Artamonow
  2009-10-24 20:12                 ` [PATCH 09/20] SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:08 UTC (permalink / raw)
  To: linux-arm-kernel

It will be used for future conversion of assign_h3600_egpio calls to
gpiolib.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c                   |   45 ++++++++++++++++++++++++
 arch/arm/mach-sa1100/include/mach/h3600_gpio.h |   24 +++++++++++++
 2 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 1297c11..429fdb0 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -25,10 +25,12 @@
 #include <linux/tty.h>
 #include <linux/pm.h>
 #include <linux/device.h>
+#include <linux/mfd/htc-egpio.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/serial_core.h>
 #include <linux/gpio.h>
+#include <linux/platform_device.h>
 
 #include <asm/irq.h>
 #include <mach/hardware.h>
@@ -184,11 +186,54 @@ static struct sa1100_port_fns h3xxx_port_fns __initdata = {
 	.set_wake	= h3xxx_uart_set_wake,
 };
 
+/*
+ * EGPIO
+ */
+
+static struct resource egpio_resources[] = {
+	[0] = {
+		.start	= H3600_EGPIO_PHYS,
+		.end	= H3600_EGPIO_PHYS + 0x4 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct htc_egpio_chip egpio_chips[] = {
+	[0] = {
+		.reg_start	= 0,
+		.gpio_base	= H3XXX_EGPIO_BASE,
+		.num_gpios	= 16,
+		.direction	= HTC_EGPIO_OUTPUT,
+		.initial_values	= 0x0080, /* H3XXX_EGPIO_RS232_ON */
+	},
+};
+
+static struct htc_egpio_platform_data egpio_info = {
+	.reg_width	= 16,
+	.bus_width	= 16,
+	.chip		= egpio_chips,
+	.num_chips	= ARRAY_SIZE(egpio_chips),
+};
+
+static struct platform_device h3xxx_egpio = {
+	.name		= "htc-egpio",
+	.id		= -1,
+	.resource	= egpio_resources,
+	.num_resources	= ARRAY_SIZE(egpio_resources),
+	.dev		= {
+		.platform_data = &egpio_info,
+	},
+};
+
+static struct platform_device *h3xxx_devices[] = {
+	&h3xxx_egpio,
+};
 
 static void __init h3xxx_mach_init(void)
 {
 	sa1100_register_uart_fns(&h3xxx_port_fns);
 	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
+	platform_add_devices(h3xxx_devices, ARRAY_SIZE(h3xxx_devices));
 }
 
 static struct map_desc h3600_io_desc[] __initdata = {
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
index 18de674..ce80f1a 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
@@ -97,4 +97,28 @@
 #define EGPIO_H3600_LVDD_ON		(1 << 15)  /* enable 9V and -6.5V to LCD. */
 
 
+/* gpiolib versions of EGPIOs */
+
+/* H3100 / 3600 EGPIO pins */
+#define H3XXX_EGPIO_BASE		(GPIO_MAX + 1)
+
+#define H3XXX_EGPIO_VPP_ON		(H3XXX_EGPIO_BASE + 0)
+#define H3XXX_EGPIO_CARD_RESET		(H3XXX_EGPIO_BASE + 1) /* reset the attached pcmcia/compactflash card.  active high. */
+#define H3XXX_EGPIO_OPT_RESET		(H3XXX_EGPIO_BASE + 2) /* reset the attached option pack.  active high. */
+#define H3XXX_EGPIO_CODEC_NRESET	(H3XXX_EGPIO_BASE + 3) /* reset the onboard UDA1341.  active low. */
+#define H3XXX_EGPIO_OPT_NVRAM_ON	(H3XXX_EGPIO_BASE + 4) /* apply power to optionpack nvram, active high. */
+#define H3XXX_EGPIO_OPT_ON		(H3XXX_EGPIO_BASE + 5) /* full power to option pack.  active high. */
+#define H3XXX_EGPIO_LCD_ON		(H3XXX_EGPIO_BASE + 6) /* enable 3.3V to LCD.  active high. */
+#define H3XXX_EGPIO_RS232_ON		(H3XXX_EGPIO_BASE + 7) /* UART3 transceiver force on.  Active high. */
+
+/* H3600 only EGPIO pins */
+#define H3600_EGPIO_LCD_PCI		(H3XXX_EGPIO_BASE + 8) /* LCD control IC enable.  active high. */
+#define H3600_EGPIO_IR_ON		(H3XXX_EGPIO_BASE + 9) /* apply power to IR module.  active high. */
+#define H3600_EGPIO_AUD_AMP_ON		(H3XXX_EGPIO_BASE + 10) /* apply power to audio power amp.  active high. */
+#define H3600_EGPIO_AUD_PWR_ON		(H3XXX_EGPIO_BASE + 11) /* apply power to reset of audio circuit.  active high. */
+#define H3600_EGPIO_QMUTE		(H3XXX_EGPIO_BASE + 12) /* mute control for onboard UDA1341.  active high. */
+#define H3600_EGPIO_IR_FSEL		(H3XXX_EGPIO_BASE + 13) /* IR speed select: 1->fast, 0->slow */
+#define H3600_EGPIO_LCD_5V_ON		(H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */
+#define H3600_EGPIO_LVDD_ON		(H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */
+
 #endif /* _INCLUDE_H3600_GPIO_H_ */
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 09/20] SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
  2009-10-24 20:08               ` [PATCH 08/20] SA1100: h3100/h3600: add htc-egpio driver Dmitry Artamonow
@ 2009-10-24 20:12                 ` Dmitry Artamonow
  2009-10-24 20:14                   ` [PATCH 10/20] SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:12 UTC (permalink / raw)
  To: linux-arm-kernel

Use of gpio_request/gpio_free in some callbacks may look ugly, but
corresponding drivers (sa1100_serial and sa1100_fb) don't provide (yet)
init/exit hooks and registering these gpios in *_mach_init is also
not possible, because htc-gpio driver starts a bit later...

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c  |   87 ++++++++++++++++++++++++++++++++++++++---
 drivers/pcmcia/sa1100_h3600.c |   57 +++++++++++++++++++++------
 2 files changed, 126 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 429fdb0..5e6011c 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -111,12 +111,32 @@ static struct mtd_partition h3xxx_partitions[] = {
 
 static void h3xxx_set_vpp(int vpp)
 {
-	assign_h3600_egpio(IPAQ_EGPIO_VPP_ON, vpp);
+	gpio_set_value(H3XXX_EGPIO_VPP_ON, vpp);
+}
+
+static int h3xxx_flash_init(void)
+{
+	int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp");
+	if (err)
+		return err;
+
+	err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0);
+	if (err)
+		gpio_free(H3XXX_EGPIO_VPP_ON);
+
+	return err;
+}
+
+static void h3xxx_flash_exit(void)
+{
+	gpio_free(H3XXX_EGPIO_VPP_ON);
 }
 
 static struct flash_platform_data h3xxx_flash_data = {
 	.map_name	= "cfi_probe",
 	.set_vpp	= h3xxx_set_vpp,
+	.init		= h3xxx_flash_init,
+	.exit		= h3xxx_flash_exit,
 	.parts		= h3xxx_partitions,
 	.nr_parts	= ARRAY_SIZE(h3xxx_partitions),
 };
@@ -158,7 +178,10 @@ static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
 static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
 {
 	if (port->mapbase == _Ser3UTCR0)
-		assign_h3600_egpio(IPAQ_EGPIO_RS232_ON, !state);
+		if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) {
+			gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state);
+			gpio_free(H3XXX_EGPIO_RS232_ON);
+		}
 }
 
 /*
@@ -362,7 +385,11 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
  */
 static void h3100_lcd_power(int enable)
 {
-	assign_h3600_egpio(IPAQ_EGPIO_LCD_POWER, enable);
+	if (!gpio_request(H3XXX_EGPIO_LCD_ON, "LCD ON")) {
+		gpio_set_value(H3100_GPIO_LCD_3V_ON, enable);
+		gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
+		gpio_free(H3XXX_EGPIO_LCD_ON);
+	}
 }
 
 
@@ -412,6 +439,7 @@ static struct gpio_default_state h3100_default_gpio[] = {
 	{ H3XXX_GPIO_COM_DCD,	GPIO_MODE_IN,	"COM DCD" },
 	{ H3XXX_GPIO_COM_CTS,	GPIO_MODE_IN,	"COM CTS" },
 	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
+	{ H3100_GPIO_LCD_3V_ON,	GPIO_MODE_OUT0,	"LCD 3v" },
 };
 
 static void __init h3100_mach_init(void)
@@ -506,7 +534,25 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
  */
 static void h3600_lcd_power(int enable)
 {
-	assign_h3600_egpio(IPAQ_EGPIO_LCD_POWER, enable);
+	if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power"))
+		goto err1;
+	if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control"))
+		goto err2;
+	if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v"))
+		goto err3;
+	if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v"))
+		goto err4;
+
+	gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
+	gpio_direction_output(H3600_EGPIO_LCD_PCI, enable);
+	gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable);
+	gpio_direction_output(H3600_EGPIO_LVDD_ON, enable);
+
+	gpio_free(H3600_EGPIO_LVDD_ON);
+err4:	gpio_free(H3600_EGPIO_LCD_5V_ON);
+err3:	gpio_free(H3600_EGPIO_LCD_PCI);
+err2:	gpio_free(H3XXX_EGPIO_LCD_ON);
+err1:	return;
 }
 
 static void __init h3600_map_io(void)
@@ -531,18 +577,47 @@ static void __init h3600_map_io(void)
  */
 static int h3600_irda_set_power(struct device *dev, unsigned int state)
 {
-	assign_h3600_egpio(IPAQ_EGPIO_IR_ON, state);
+	gpio_set_value(H3600_EGPIO_IR_ON, state);
 	return 0;
 }
 
 static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
 {
-	assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000));
+	gpio_set_value(H3600_EGPIO_IR_FSEL, !(speed < 4000000));
+}
+
+static int h3600_irda_startup(struct device *dev)
+{
+	int err = gpio_request(H3600_EGPIO_IR_ON, "IrDA power");
+	if (err)
+		goto err1;
+	err = gpio_direction_output(H3600_EGPIO_IR_ON, 0);
+	if (err)
+		goto err2;
+	err = gpio_request(H3600_EGPIO_IR_FSEL, "IrDA fsel");
+	if (err)
+		goto err2;
+	err = gpio_direction_output(H3600_EGPIO_IR_FSEL, 0);
+	if (err)
+		goto err3;
+	return 0;
+
+err3:	gpio_free(H3600_EGPIO_IR_FSEL);
+err2:	gpio_free(H3600_EGPIO_IR_ON);
+err1:	return err;
+}
+
+static void h3600_irda_shutdown(struct device *dev)
+{
+	gpio_free(H3600_EGPIO_IR_ON);
+	gpio_free(H3600_EGPIO_IR_FSEL);
 }
 
 static struct irda_platform_data h3600_irda_data = {
 	.set_power	= h3600_irda_set_power,
 	.set_speed	= h3600_irda_set_speed,
+	.startup	= h3600_irda_startup,
+	.shutdown	= h3600_irda_shutdown,
 };
 
 static struct gpio_default_state h3600_default_gpio[] = {
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 6d92a49..4afd348 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -47,9 +47,33 @@ static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 			goto err02;
 		irqs[0].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD0);
 
-		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		err = gpio_request(H3XXX_EGPIO_OPT_NVRAM_ON, "OPT NVRAM ON");
 		if (err)
 			goto err02;
+		err = gpio_direction_output(H3XXX_EGPIO_OPT_NVRAM_ON, 0);
+		if (err)
+			goto err03;
+		err = gpio_request(H3XXX_EGPIO_OPT_ON, "OPT ON");
+		if (err)
+			goto err03;
+		err = gpio_direction_output(H3XXX_EGPIO_OPT_ON, 0);
+		if (err)
+			goto err04;
+		err = gpio_request(H3XXX_EGPIO_OPT_RESET, "OPT RESET");
+		if (err)
+			goto err04;
+		err = gpio_direction_output(H3XXX_EGPIO_OPT_RESET, 0);
+		if (err)
+			goto err05;
+		err = gpio_request(H3XXX_EGPIO_CARD_RESET, "PCMCIA CARD RESET");
+		if (err)
+			goto err05;
+		err = gpio_direction_output(H3XXX_EGPIO_CARD_RESET, 0);
+		if (err)
+			goto err06;
+		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		if (err)
+			goto err06;
 		break;
 	case 1:
 		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ1, "PCMCIA IRQ1");
@@ -75,6 +99,10 @@ static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 	}
 	return 0;
 
+err06:	gpio_free(H3XXX_EGPIO_CARD_RESET);
+err05:	gpio_free(H3XXX_EGPIO_OPT_RESET);
+err04:	gpio_free(H3XXX_EGPIO_OPT_ON);
+err03:	gpio_free(H3XXX_EGPIO_OPT_NVRAM_ON);
 err02:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
 err01:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
 err00:	return err;
@@ -88,12 +116,17 @@ static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
 {
 	soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
   
-	/* Disable CF bus: */
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
 	switch (skt->nr) {
 	case 0:
+		/* Disable CF bus: */
+		gpio_set_value(H3XXX_EGPIO_OPT_NVRAM_ON, 0);
+		gpio_set_value(H3XXX_EGPIO_OPT_ON, 0);
+		gpio_set_value(H3XXX_EGPIO_OPT_RESET, 1);
+
+		gpio_free(H3XXX_EGPIO_CARD_RESET);
+		gpio_free(H3XXX_EGPIO_OPT_RESET);
+		gpio_free(H3XXX_EGPIO_OPT_ON);
+		gpio_free(H3XXX_EGPIO_OPT_NVRAM_ON);
 		gpio_free(H3XXX_GPIO_PCMCIA_CD0);
 		gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
 		break;
@@ -139,7 +172,7 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
 		return -1;
 	}
 
-	assign_h3600_egpio(IPAQ_EGPIO_CARD_RESET, !!(state->flags & SS_RESET));
+	gpio_set_value(H3XXX_EGPIO_CARD_RESET, !!(state->flags & SS_RESET));
 
 	/* Silently ignore Vpp, output enable, speaker enable. */
 
@@ -149,9 +182,9 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
 static void h3600_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
 {
 	/* Enable CF bus: */
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 1);
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 1);
-	assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 0);
+	gpio_set_value(H3XXX_EGPIO_OPT_NVRAM_ON, 1);
+	gpio_set_value(H3XXX_EGPIO_OPT_ON, 1);
+	gpio_set_value(H3XXX_EGPIO_OPT_RESET, 0);
 
 	msleep(10);
 
@@ -169,10 +202,10 @@ static void h3600_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
 	 * socket 0 then socket 1.
 	 */
 	if (skt->nr == 1) {
-		assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
-		assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
+		gpio_set_value(H3XXX_EGPIO_OPT_ON, 0);
+		gpio_set_value(H3XXX_EGPIO_OPT_NVRAM_ON, 0);
 		/* hmm, does this suck power? */
-		assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
+		gpio_set_value(H3XXX_EGPIO_OPT_RESET, 1);
 	}
 }
 
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 10/20] SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
  2009-10-24 20:12                 ` [PATCH 09/20] SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib Dmitry Artamonow
@ 2009-10-24 20:14                   ` Dmitry Artamonow
  2009-10-24 20:14                     ` [PATCH 11/20] SA1100: h3600: remove IRQ_GPIO_* definitions Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

As all users of assign_h3600_egpio now converted to gpiolib, we
can safely remove all assign_h3600_egpio handling code and
definitions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c                   |  139 ------------------------
 arch/arm/mach-sa1100/include/mach/h3600.h      |   23 ----
 arch/arm/mach-sa1100/include/mach/h3600_gpio.h |   22 ----
 3 files changed, 0 insertions(+), 184 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 5e6011c..6792dd1 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -49,9 +49,6 @@
 
 #include "generic.h"
 
-void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
-EXPORT_SYMBOL(assign_h3600_egpio);
-
 struct gpio_default_state {
 	int gpio;
 	int mode;
@@ -306,72 +303,6 @@ static void __init h3xxx_map_io(void)
 
 #ifdef CONFIG_SA1100_H3100
 
-#define H3100_EGPIO	(*(volatile unsigned int *)H3600_EGPIO_VIRT)
-static unsigned int h3100_egpio = 0;
-
-static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
-{
-	unsigned int egpio = 0;
-	long	     gpio = 0;
-	unsigned long flags;
-
-	switch (x) {
-	case IPAQ_EGPIO_LCD_POWER:
-		egpio |= EGPIO_H3600_LCD_ON;
-		gpio  |= GPIO_H3100_LCD_3V_ON;
-		break;
-	case IPAQ_EGPIO_LCD_ENABLE:
-		break;
-	case IPAQ_EGPIO_CODEC_NRESET:
-		egpio |= EGPIO_H3600_CODEC_NRESET;
-		break;
-	case IPAQ_EGPIO_AUDIO_ON:
-		gpio |= GPIO_H3100_AUD_PWR_ON
-			| GPIO_H3100_AUD_ON;
-		break;
-	case IPAQ_EGPIO_QMUTE:
-		gpio |= GPIO_H3100_QMUTE;
-		break;
-	case IPAQ_EGPIO_OPT_NVRAM_ON:
-		egpio |= EGPIO_H3600_OPT_NVRAM_ON;
-		break;
-	case IPAQ_EGPIO_OPT_ON:
-		egpio |= EGPIO_H3600_OPT_ON;
-		break;
-	case IPAQ_EGPIO_CARD_RESET:
-		egpio |= EGPIO_H3600_CARD_RESET;
-		break;
-	case IPAQ_EGPIO_OPT_RESET:
-		egpio |= EGPIO_H3600_OPT_RESET;
-		break;
-	case IPAQ_EGPIO_IR_ON:
-		gpio |= GPIO_H3100_IR_ON;
-		break;
-	case IPAQ_EGPIO_IR_FSEL:
-		gpio |= GPIO_H3100_IR_FSEL;
-		break;
-	case IPAQ_EGPIO_RS232_ON:
-		egpio |= EGPIO_H3600_RS232_ON;
-		break;
-	case IPAQ_EGPIO_VPP_ON:
-		egpio |= EGPIO_H3600_VPP_ON;
-		break;
-	}
-
-	if (egpio || gpio) {
-		local_irq_save(flags);
-		if (setp) {
-			h3100_egpio |= egpio;
-			GPSR = gpio;
-		} else {
-			h3100_egpio &= ~egpio;
-			GPCR = gpio;
-		}
-		H3100_EGPIO = h3100_egpio;
-		local_irq_restore(flags);
-	}
-}
-
 #define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON	  \
 			  | GPIO_H3100_GPIO3	  \
 			  | GPIO_H3100_QMUTE	  \
@@ -409,9 +340,6 @@ static void __init h3100_map_io(void)
 	/* Older bootldrs put GPIO2-9 in alternate mode on the
 	   assumption that they are used for video */
 	GAFR &= ~H3100_DIRECT_EGPIO;
-
-	H3100_EGPIO = h3100_egpio;
-	assign_h3600_egpio = h3100_control_egpio;
 }
 
 /*
@@ -465,70 +393,6 @@ MACHINE_END
 
 #ifdef CONFIG_SA1100_H3600
 
-#define H3600_EGPIO	(*(volatile unsigned int *)H3600_EGPIO_VIRT)
-static unsigned int h3600_egpio = EGPIO_H3600_RS232_ON;
-
-static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
-{
-	unsigned int egpio = 0;
-	unsigned long flags;
-
-	switch (x) {
-	case IPAQ_EGPIO_LCD_POWER:
-		egpio |= EGPIO_H3600_LCD_ON |
-			 EGPIO_H3600_LCD_PCI |
-			 EGPIO_H3600_LCD_5V_ON |
-			 EGPIO_H3600_LVDD_ON;
-		break;
-	case IPAQ_EGPIO_LCD_ENABLE:
-		break;
-	case IPAQ_EGPIO_CODEC_NRESET:
-		egpio |= EGPIO_H3600_CODEC_NRESET;
-		break;
-	case IPAQ_EGPIO_AUDIO_ON:
-		egpio |= EGPIO_H3600_AUD_AMP_ON |
-			 EGPIO_H3600_AUD_PWR_ON;
-		break;
-	case IPAQ_EGPIO_QMUTE:
-		egpio |= EGPIO_H3600_QMUTE;
-		break;
-	case IPAQ_EGPIO_OPT_NVRAM_ON:
-		egpio |= EGPIO_H3600_OPT_NVRAM_ON;
-		break;
-	case IPAQ_EGPIO_OPT_ON:
-		egpio |= EGPIO_H3600_OPT_ON;
-		break;
-	case IPAQ_EGPIO_CARD_RESET:
-		egpio |= EGPIO_H3600_CARD_RESET;
-		break;
-	case IPAQ_EGPIO_OPT_RESET:
-		egpio |= EGPIO_H3600_OPT_RESET;
-		break;
-	case IPAQ_EGPIO_IR_ON:
-		egpio |= EGPIO_H3600_IR_ON;
-		break;
-	case IPAQ_EGPIO_IR_FSEL:
-		egpio |= EGPIO_H3600_IR_FSEL;
-		break;
-	case IPAQ_EGPIO_RS232_ON:
-		egpio |= EGPIO_H3600_RS232_ON;
-		break;
-	case IPAQ_EGPIO_VPP_ON:
-		egpio |= EGPIO_H3600_VPP_ON;
-		break;
-	}
-
-	if (egpio) {
-		local_irq_save(flags);
-		if (setp)
-			h3600_egpio |= egpio;
-		else
-			h3600_egpio &= ~egpio;
-		H3600_EGPIO = h3600_egpio;
-		local_irq_restore(flags);
-	}
-}
-
 /*
  * helper for sa1100fb
  */
@@ -567,9 +431,6 @@ static void __init h3600_map_io(void)
 	GPDR = GPIO_H3600_L3_CLOCK |
 	       GPIO_H3600_L3_MODE  | GPIO_H3600_L3_DATA  |
 	       GPIO_H3600_CLK_SET1 | GPIO_H3600_CLK_SET0;
-
-	H3600_EGPIO = h3600_egpio;	   /* Maintains across sleep? */
-	assign_h3600_egpio = h3600_control_egpio;
 }
 
 /*
diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index 69f138c..19d7fe1 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -66,27 +66,4 @@
 #define IRQ_GPIO_H3600_OPT_IRQ		IRQ_GPIO24
 #define IRQ_GPIO_H3600_COM_CTS		IRQ_GPIO25
 
-
-#ifndef __ASSEMBLY__
-
-enum ipaq_egpio_type {
-	IPAQ_EGPIO_LCD_POWER,	  /* Power to the LCD panel */
-	IPAQ_EGPIO_CODEC_NRESET,  /* Clear to reset the audio codec (remember to return high) */
-	IPAQ_EGPIO_AUDIO_ON,	  /* Audio power */
-	IPAQ_EGPIO_QMUTE,	  /* Audio muting */
-	IPAQ_EGPIO_OPT_NVRAM_ON,  /* Non-volatile RAM on extension sleeves (SPI interface) */
-	IPAQ_EGPIO_OPT_ON,	  /* Power to extension sleeves */
-	IPAQ_EGPIO_CARD_RESET,	  /* Reset PCMCIA cards on extension sleeve (???) */
-	IPAQ_EGPIO_OPT_RESET,	  /* Reset option pack (???) */
-	IPAQ_EGPIO_IR_ON,	  /* IR sensor/emitter power */
-	IPAQ_EGPIO_IR_FSEL,	  /* IR speed selection 1->fast, 0->slow */
-	IPAQ_EGPIO_RS232_ON,	  /* Maxim RS232 chip power */
-	IPAQ_EGPIO_VPP_ON,	  /* Turn on power to flash programming */
-	IPAQ_EGPIO_LCD_ENABLE,	  /* Enable/disable LCD controller */
-};
-
-extern void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
-
-#endif /* ASSEMBLY */
-
 #endif /* _INCLUDE_H3600_H_ */
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
index ce80f1a..6cfbc64 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
@@ -76,28 +76,6 @@
 #define IRQ_GPIO_H3600_ACTION_BUTTON    IRQ_GPIO18
 #define IRQ_GPIO_H3600_OPT_DET		IRQ_GPIO27
 
-/* H3100 / 3600 EGPIO pins */
-#define EGPIO_H3600_VPP_ON		(1 << 0)
-#define EGPIO_H3600_CARD_RESET		(1 << 1)   /* reset the attached pcmcia/compactflash card.  active high. */
-#define EGPIO_H3600_OPT_RESET		(1 << 2)   /* reset the attached option pack.  active high. */
-#define EGPIO_H3600_CODEC_NRESET	(1 << 3)   /* reset the onboard UDA1341.  active low. */
-#define EGPIO_H3600_OPT_NVRAM_ON	(1 << 4)   /* apply power to optionpack nvram, active high. */
-#define EGPIO_H3600_OPT_ON		(1 << 5)   /* full power to option pack.  active high. */
-#define EGPIO_H3600_LCD_ON		(1 << 6)   /* enable 3.3V to LCD.  active high. */
-#define EGPIO_H3600_RS232_ON		(1 << 7)   /* UART3 transceiver force on.  Active high. */
-
-/* H3600 only EGPIO pins */
-#define EGPIO_H3600_LCD_PCI		(1 << 8)   /* LCD control IC enable.  active high. */
-#define EGPIO_H3600_IR_ON		(1 << 9)   /* apply power to IR module.  active high. */
-#define EGPIO_H3600_AUD_AMP_ON		(1 << 10)  /* apply power to audio power amp.  active high. */
-#define EGPIO_H3600_AUD_PWR_ON		(1 << 11)  /* apply power to reset of audio circuit.  active high. */
-#define EGPIO_H3600_QMUTE		(1 << 12)  /* mute control for onboard UDA1341.  active high. */
-#define EGPIO_H3600_IR_FSEL		(1 << 13)  /* IR speed select: 1->fast, 0->slow */
-#define EGPIO_H3600_LCD_5V_ON		(1 << 14)  /* enable 5V to LCD. active high. */
-#define EGPIO_H3600_LVDD_ON		(1 << 15)  /* enable 9V and -6.5V to LCD. */
-
-
-/* gpiolib versions of EGPIOs */
 
 /* H3100 / 3600 EGPIO pins */
 #define H3XXX_EGPIO_BASE		(GPIO_MAX + 1)
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 11/20] SA1100: h3600: remove IRQ_GPIO_* definitions
  2009-10-24 20:14                   ` [PATCH 10/20] SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers Dmitry Artamonow
@ 2009-10-24 20:14                     ` Dmitry Artamonow
  2009-10-24 20:16                       ` [PATCH 12/20] SA1100: h3100/h3600: configure all unused gpios as inputs Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

As all the remaining users of these definitions
(in pcmcia/sa1100_h3600 driver) were converted to gpio_to_irq(),
they can be safely removed.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/include/mach/h3600.h      |    9 ---------
 arch/arm/mach-sa1100/include/mach/h3600_gpio.h |    5 -----
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index 19d7fe1..f4911db 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -57,13 +57,4 @@
 #define GPIO_H3600_COM_CTS		GPIO_GPIO (25)
 #define GPIO_H3600_COM_RTS		GPIO_GPIO (26)
 
-#define IRQ_GPIO_H3600_NPOWER_BUTTON	IRQ_GPIO0
-#define IRQ_GPIO_H3600_PCMCIA_CD1	IRQ_GPIO10
-#define IRQ_GPIO_H3600_PCMCIA_IRQ1	IRQ_GPIO11
-#define IRQ_GPIO_H3600_PCMCIA_CD0	IRQ_GPIO17
-#define IRQ_GPIO_H3600_PCMCIA_IRQ0	IRQ_GPIO21
-#define IRQ_GPIO_H3600_COM_DCD		IRQ_GPIO23
-#define IRQ_GPIO_H3600_OPT_IRQ		IRQ_GPIO24
-#define IRQ_GPIO_H3600_COM_CTS		IRQ_GPIO25
-
 #endif /* _INCLUDE_H3600_H_ */
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
index 6cfbc64..0c0bfa5 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
@@ -71,11 +71,6 @@
 #define GPIO_H3600_OPT_LOCK		GPIO_GPIO (22)
 #define GPIO_H3600_OPT_DET		GPIO_GPIO (27)
 
-/****************************************************/
-
-#define IRQ_GPIO_H3600_ACTION_BUTTON    IRQ_GPIO18
-#define IRQ_GPIO_H3600_OPT_DET		IRQ_GPIO27
-
 
 /* H3100 / 3600 EGPIO pins */
 #define H3XXX_EGPIO_BASE		(GPIO_MAX + 1)
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 12/20] SA1100: h3100/h3600: configure all unused gpios as inputs
  2009-10-24 20:14                     ` [PATCH 11/20] SA1100: h3600: remove IRQ_GPIO_* definitions Dmitry Artamonow
@ 2009-10-24 20:16                       ` Dmitry Artamonow
  2009-10-24 20:20                         ` [PATCH 13/20] SA1100: h3100/h3600: drop old GPIO definitions Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

After conversion to gpiolib there's still some GPIOs left, that get
configured in *_mach_init() as outputs (using direct operations
on GPCR/GPDR registers), but otherwise unused. These GPIOs are mainly
sound related and should be configured by corresponding driver once
it is written.

Drop this initialisation and configure all GPIOs as input.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c |   26 +++-----------------------
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 6792dd1..3d52190 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -297,20 +297,14 @@ static void __init h3xxx_map_io(void)
 	PCFR = PCFR_OPDE;
 	PSDR = 0;
 
+	GPCR = 0x0fffffff;	/* All outputs are set low by default */
+	GPDR = 0;		/* Configure all GPIOs as input */
 }
 
 /************************* H3100 *************************/
 
 #ifdef CONFIG_SA1100_H3100
 
-#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON	  \
-			  | GPIO_H3100_GPIO3	  \
-			  | GPIO_H3100_QMUTE	  \
-			  | GPIO_H3100_LCD_3V_ON  \
-			  | GPIO_H3100_AUD_ON	  \
-			  | GPIO_H3100_AUD_PWR_ON \
-			  | GPIO_H3100_IR_ON	  \
-			  | GPIO_H3100_IR_FSEL)
 /*
  * helper for sa1100fb
  */
@@ -330,16 +324,9 @@ static void __init h3100_map_io(void)
 
 	sa1100fb_lcd_power = h3100_lcd_power;
 
-	/* Initialize h3100-specific values here */
-	GPCR = 0x0fffffff;	 /* All outputs are set low by default */
-	GPDR = GPIO_H3600_L3_CLOCK |
-	       GPIO_H3600_L3_MODE  | GPIO_H3600_L3_DATA  |
-	       GPIO_H3600_CLK_SET1 | GPIO_H3600_CLK_SET0 |
-	       H3100_DIRECT_EGPIO;
-
 	/* Older bootldrs put GPIO2-9 in alternate mode on the
 	   assumption that they are used for video */
-	GAFR &= ~H3100_DIRECT_EGPIO;
+	GAFR &= ~0x000001fb;
 }
 
 /*
@@ -424,13 +411,6 @@ static void __init h3600_map_io(void)
 	h3xxx_map_io();
 
 	sa1100fb_lcd_power = h3600_lcd_power;
-
-	/* Initialize h3600-specific values here */
-
-	GPCR = 0x0fffffff;	 /* All outputs are set low by default */
-	GPDR = GPIO_H3600_L3_CLOCK |
-	       GPIO_H3600_L3_MODE  | GPIO_H3600_L3_DATA  |
-	       GPIO_H3600_CLK_SET1 | GPIO_H3600_CLK_SET0;
 }
 
 /*
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 13/20] SA1100: h3100/h3600: drop old GPIO definitions
  2009-10-24 20:16                       ` [PATCH 12/20] SA1100: h3100/h3600: configure all unused gpios as inputs Dmitry Artamonow
@ 2009-10-24 20:20                         ` Dmitry Artamonow
  2009-10-24 20:20                           ` [PATCH 14/20] SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

As all existing code was converted to gpiolib, drop no more
used pre-gpiolib (bit-shifted) GPIO definintions.
Supply new gpiolib-friendly definitions for GPIOs which
don't have them yet.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/include/mach/h3600.h      |   24 ------------------
 arch/arm/mach-sa1100/include/mach/h3600_gpio.h |   31 +++++------------------
 2 files changed, 7 insertions(+), 48 deletions(-)

diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index f4911db..e420422 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -33,28 +33,4 @@
 #define H3600_BANK_2_VIRT	0xf1000000
 #define H3600_BANK_4_VIRT	0xf3800000
 
-/*
-   Machine-independent GPIO definitions
-   --- these are common across all current iPAQ platforms
-*/
-
-#define GPIO_H3600_NPOWER_BUTTON	GPIO_GPIO (0)	/* Also known as the "off button"  */
-
-#define GPIO_H3600_PCMCIA_CD1		GPIO_GPIO (10)
-#define GPIO_H3600_PCMCIA_IRQ1		GPIO_GPIO (11)
-
-/* UDA1341 L3 Interface */
-#define GPIO_H3600_L3_DATA		GPIO_GPIO (14)
-#define GPIO_H3600_L3_MODE		GPIO_GPIO (15)
-#define GPIO_H3600_L3_CLOCK		GPIO_GPIO (16)
-
-#define GPIO_H3600_PCMCIA_CD0		GPIO_GPIO (17)
-#define GPIO_H3600_SYS_CLK		GPIO_GPIO (19)
-#define GPIO_H3600_PCMCIA_IRQ0		GPIO_GPIO (21)
-
-#define GPIO_H3600_COM_DCD		GPIO_GPIO (23)
-#define GPIO_H3600_OPT_IRQ		GPIO_GPIO (24)
-#define GPIO_H3600_COM_CTS		GPIO_GPIO (25)
-#define GPIO_H3600_COM_RTS		GPIO_GPIO (26)
-
 #endif /* _INCLUDE_H3600_H_ */
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
index 0c0bfa5..2537f35 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
@@ -30,6 +30,7 @@
 #define H3XXX_GPIO_PCMCIA_CD1		10
 #define H3XXX_GPIO_PCMCIA_IRQ1		11
 #define H3XXX_GPIO_PCMCIA_CD0		17
+#define H3XXX_GPIO_ACTION_BUTTON	18
 #define H3XXX_GPIO_SYS_CLK		19
 #define H3XXX_GPIO_PCMCIA_IRQ0		21
 #define H3XXX_GPIO_COM_DCD		23
@@ -37,23 +38,8 @@
 #define H3XXX_GPIO_COM_CTS		25
 #define H3XXX_GPIO_COM_RTS		26
 
-/*
- * GPIO lines that are common across ALL iPAQ models are in "h3600.h"
- * This file contains machine-specific definitions
- */
+/* machine-specific gpios */
 
-#define GPIO_H3600_SUSPEND              GPIO_GPIO (0)
-/* GPIO[2:9] used by LCD on H3600/3800, used as GPIO on H3100 */
-#define GPIO_H3100_BT_ON		GPIO_GPIO (2)
-#define GPIO_H3100_GPIO3		GPIO_GPIO (3)
-#define GPIO_H3100_QMUTE		GPIO_GPIO (4)
-#define GPIO_H3100_LCD_3V_ON		GPIO_GPIO (5)
-#define GPIO_H3100_AUD_ON		GPIO_GPIO (6)
-#define GPIO_H3100_AUD_PWR_ON		GPIO_GPIO (7)
-#define GPIO_H3100_IR_ON		GPIO_GPIO (8)
-#define GPIO_H3100_IR_FSEL		GPIO_GPIO (9)
-
-/* gpiolib versions of the above */
 #define H3100_GPIO_BT_ON		2
 #define H3100_GPIO_QMUTE		4
 #define H3100_GPIO_LCD_3V_ON		5
@@ -62,14 +48,11 @@
 #define H3100_GPIO_IR_ON		8
 #define H3100_GPIO_IR_FSEL		9
 
-/* for H3600, audio sample rate clock generator */
-#define GPIO_H3600_CLK_SET0		GPIO_GPIO (12)
-#define GPIO_H3600_CLK_SET1		GPIO_GPIO (13)
-
-#define GPIO_H3600_ACTION_BUTTON	GPIO_GPIO (18)
-#define GPIO_H3600_SOFT_RESET           GPIO_GPIO (20)   /* Also known as BATT_FAULT */
-#define GPIO_H3600_OPT_LOCK		GPIO_GPIO (22)
-#define GPIO_H3600_OPT_DET		GPIO_GPIO (27)
+#define H3600_GPIO_CLK_SET0		12	/* audio sample rate clock generator */
+#define H3600_GPIO_CLK_SET1		13
+#define H3600_GPIO_SOFT_RESET		20	/* also known as BATT_FAULT */
+#define H3600_GPIO_OPT_LOCK		22
+#define H3600_GPIO_OPT_DET		27
 
 
 /* H3100 / 3600 EGPIO pins */
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 14/20] SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
  2009-10-24 20:20                         ` [PATCH 13/20] SA1100: h3100/h3600: drop old GPIO definitions Dmitry Artamonow
@ 2009-10-24 20:20                           ` Dmitry Artamonow
  2009-10-24 20:23                             ` [PATCH 15/20] SA1100: h3100/h3600: split h3600.c Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

Combine both headers into one, rename to h3xxx.h and change all
users accordingly.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3600.c                       |    3 +-
 arch/arm/mach-sa1100/include/mach/h3600.h          |   36 --------------------
 .../include/mach/{h3600_gpio.h => h3xxx.h}         |   16 +++++++--
 drivers/pcmcia/sa1100_h3600.c                      |    3 +-
 4 files changed, 15 insertions(+), 43 deletions(-)
 delete mode 100644 arch/arm/mach-sa1100/include/mach/h3600.h
 rename arch/arm/mach-sa1100/include/mach/{h3600_gpio.h => h3xxx.h} (86%)

diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 3d52190..dd39f90 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -44,8 +44,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
 
-#include <mach/h3600.h>
-#include <mach/h3600_gpio.h>
+#include <mach/h3xxx.h>
 
 #include "generic.h"
 
diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
deleted file mode 100644
index e420422..0000000
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * Definitions for H3600 Handheld Computer
- *
- * Copyright 2000 Compaq Computer Corporation.
- *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2001-10-??	Andrew Christian   Added support for iPAQ H3800
- *
- */
-
-#ifndef _INCLUDE_H3600_H_
-#define _INCLUDE_H3600_H_
-
-/* Physical memory regions corresponding to chip selects */
-#define H3600_EGPIO_PHYS	(SA1100_CS5_PHYS + 0x01000000)
-#define H3600_BANK_2_PHYS	SA1100_CS2_PHYS
-#define H3600_BANK_4_PHYS	SA1100_CS4_PHYS
-
-/* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */
-#define H3600_EGPIO_VIRT	0xf0000000
-#define H3600_BANK_2_VIRT	0xf1000000
-#define H3600_BANK_4_VIRT	0xf3800000
-
-#endif /* _INCLUDE_H3600_H_ */
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3xxx.h
similarity index 86%
rename from arch/arm/mach-sa1100/include/mach/h3600_gpio.h
rename to arch/arm/mach-sa1100/include/mach/h3xxx.h
index 2537f35..7f1e130 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3xxx.h
@@ -20,8 +20,18 @@
  *
  */
 
-#ifndef _INCLUDE_H3600_GPIO_H_
-#define _INCLUDE_H3600_GPIO_H_
+#ifndef _INCLUDE_H3XXX_H_
+#define _INCLUDE_H3XXX_H_
+
+/* Physical memory regions corresponding to chip selects */
+#define H3600_EGPIO_PHYS	(SA1100_CS5_PHYS + 0x01000000)
+#define H3600_BANK_2_PHYS	SA1100_CS2_PHYS
+#define H3600_BANK_4_PHYS	SA1100_CS4_PHYS
+
+/* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */
+#define H3600_EGPIO_VIRT	0xf0000000
+#define H3600_BANK_2_VIRT	0xf1000000
+#define H3600_BANK_4_VIRT	0xf3800000
 
 /*
  * gpiolib numbers for all iPAQs
@@ -77,4 +87,4 @@
 #define H3600_EGPIO_LCD_5V_ON		(H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */
 #define H3600_EGPIO_LVDD_ON		(H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */
 
-#endif /* _INCLUDE_H3600_GPIO_H_ */
+#endif /* _INCLUDE_H3XXX_H_ */
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 4afd348..4717aca 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -15,8 +15,7 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
-#include <mach/h3600.h>
-#include <mach/h3600_gpio.h>
+#include <mach/h3xxx.h>
 
 #include "sa1100_generic.h"
 
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 15/20] SA1100: h3100/h3600: split h3600.c
  2009-10-24 20:20                           ` [PATCH 14/20] SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h Dmitry Artamonow
@ 2009-10-24 20:23                             ` Dmitry Artamonow
  2009-10-24 20:26                               ` [PATCH 16/20] SA1100: h3100/h3600: revise copyright boilerplates Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Split common h3600.c into three separate files: h3100.c, h3600.c and
h3xxx.c (the latter contains common code for h3100/h3600)
Copyright boilerplates and #includes are copied intact and will be
cleaned up later.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/Makefile             |    4 +-
 arch/arm/mach-sa1100/{h3600.c => h3100.c} |  368 -----------------------------
 arch/arm/mach-sa1100/h3600.c              |  333 --------------------------
 arch/arm/mach-sa1100/{h3600.c => h3xxx.c} |  201 +----------------
 arch/arm/mach-sa1100/include/mach/h3xxx.h |   14 +
 5 files changed, 19 insertions(+), 901 deletions(-)
 copy arch/arm/mach-sa1100/{h3600.c => h3100.c} (26%)
 copy arch/arm/mach-sa1100/{h3600.c => h3xxx.c} (56%)

diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
index bb7b819..89349c1 100644
--- a/arch/arm/mach-sa1100/Makefile
+++ b/arch/arm/mach-sa1100/Makefile
@@ -25,8 +25,8 @@ led-$(CONFIG_SA1100_CERF)		+= leds-cerf.o
 
 obj-$(CONFIG_SA1100_COLLIE)		+= collie.o
 
-obj-$(CONFIG_SA1100_H3100)		+= h3600.o
-obj-$(CONFIG_SA1100_H3600)		+= h3600.o
+obj-$(CONFIG_SA1100_H3100)		+= h3100.o h3xxx.o
+obj-$(CONFIG_SA1100_H3600)		+= h3600.o h3xxx.o
 
 obj-$(CONFIG_SA1100_HACKKIT)		+= hackkit.o
 led-$(CONFIG_SA1100_HACKKIT)		+= leds-hackkit.o
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3100.c
similarity index 26%
copy from arch/arm/mach-sa1100/h3600.c
copy to arch/arm/mach-sa1100/h3100.c
index dd39f90..4c7778e 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -48,262 +48,6 @@
 
 #include "generic.h"
 
-struct gpio_default_state {
-	int gpio;
-	int mode;
-	const char *name;
-};
-
-#define GPIO_MODE_IN	-1
-#define GPIO_MODE_OUT0	0
-#define GPIO_MODE_OUT1	1
-
-static void h3xxx_init_gpio(struct gpio_default_state *s, size_t n)
-{
-	while (n--) {
-		const char *name = s->name;
-		int err;
-
-		if (!name)
-			name = "[init]";
-		err = gpio_request(s->gpio, name);
-		if (err) {
-			printk(KERN_ERR "gpio%u: unable to request: %d\n",
-				s->gpio, err);
-			continue;
-		}
-		if (s->mode >= 0) {
-			err = gpio_direction_output(s->gpio, s->mode);
-		} else {
-			err = gpio_direction_input(s->gpio);
-		}
-		if (err) {
-			printk(KERN_ERR "gpio%u: unable to set direction: %d\n",
-				s->gpio, err);
-			continue;
-		}
-		if (!s->name)
-			gpio_free(s->gpio);
-		s++;
-	}
-}
-
-
-/*
- * H3xxx flash support
- */
-static struct mtd_partition h3xxx_partitions[] = {
-	{
-		.name		= "H3XXX boot firmware",
-		.size		= 0x00040000,
-		.offset		= 0,
-		.mask_flags	= MTD_WRITEABLE,  /* force read-only */
-	}, {
-		.name		= "H3XXX rootfs",
-		.size		= MTDPART_SIZ_FULL,
-		.offset		= 0x00040000,
-	}
-};
-
-static void h3xxx_set_vpp(int vpp)
-{
-	gpio_set_value(H3XXX_EGPIO_VPP_ON, vpp);
-}
-
-static int h3xxx_flash_init(void)
-{
-	int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp");
-	if (err)
-		return err;
-
-	err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0);
-	if (err)
-		gpio_free(H3XXX_EGPIO_VPP_ON);
-
-	return err;
-}
-
-static void h3xxx_flash_exit(void)
-{
-	gpio_free(H3XXX_EGPIO_VPP_ON);
-}
-
-static struct flash_platform_data h3xxx_flash_data = {
-	.map_name	= "cfi_probe",
-	.set_vpp	= h3xxx_set_vpp,
-	.init		= h3xxx_flash_init,
-	.exit		= h3xxx_flash_exit,
-	.parts		= h3xxx_partitions,
-	.nr_parts	= ARRAY_SIZE(h3xxx_partitions),
-};
-
-static struct resource h3xxx_flash_resource = {
-	.start		= SA1100_CS0_PHYS,
-	.end		= SA1100_CS0_PHYS + SZ_32M - 1,
-	.flags		= IORESOURCE_MEM,
-};
-
-
-/*
- * H3xxx uart support
- */
-static void h3xxx_uart_set_mctrl(struct uart_port *port, u_int mctrl)
-{
-	if (port->mapbase == _Ser3UTCR0) {
-		gpio_set_value(H3XXX_GPIO_COM_RTS, !(mctrl & TIOCM_RTS));
-	}
-}
-
-static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
-{
-	u_int ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR;
-
-	if (port->mapbase == _Ser3UTCR0) {
-		/*
-		 * DCD and CTS bits are inverted in GPLR by RS232 transceiver
-		 */
-		if (gpio_get_value(H3XXX_GPIO_COM_DCD))
-			ret &= ~TIOCM_CD;
-		if (gpio_get_value(H3XXX_GPIO_COM_CTS))
-			ret &= ~TIOCM_CTS;
-	}
-
-	return ret;
-}
-
-static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
-{
-	if (port->mapbase == _Ser3UTCR0)
-		if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) {
-			gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state);
-			gpio_free(H3XXX_EGPIO_RS232_ON);
-		}
-}
-
-/*
- * Enable/Disable wake up events for this serial port.
- * Obviously, we only support this on the normal COM port.
- */
-static int h3xxx_uart_set_wake(struct uart_port *port, u_int enable)
-{
-	int err = -EINVAL;
-
-	if (port->mapbase == _Ser3UTCR0) {
-		if (enable)
-			PWER |= PWER_GPIO23 | PWER_GPIO25; /* DCD and CTS */
-		else
-			PWER &= ~(PWER_GPIO23 | PWER_GPIO25); /* DCD and CTS */
-		err = 0;
-	}
-	return err;
-}
-
-static struct sa1100_port_fns h3xxx_port_fns __initdata = {
-	.set_mctrl	= h3xxx_uart_set_mctrl,
-	.get_mctrl	= h3xxx_uart_get_mctrl,
-	.pm		= h3xxx_uart_pm,
-	.set_wake	= h3xxx_uart_set_wake,
-};
-
-/*
- * EGPIO
- */
-
-static struct resource egpio_resources[] = {
-	[0] = {
-		.start	= H3600_EGPIO_PHYS,
-		.end	= H3600_EGPIO_PHYS + 0x4 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct htc_egpio_chip egpio_chips[] = {
-	[0] = {
-		.reg_start	= 0,
-		.gpio_base	= H3XXX_EGPIO_BASE,
-		.num_gpios	= 16,
-		.direction	= HTC_EGPIO_OUTPUT,
-		.initial_values	= 0x0080, /* H3XXX_EGPIO_RS232_ON */
-	},
-};
-
-static struct htc_egpio_platform_data egpio_info = {
-	.reg_width	= 16,
-	.bus_width	= 16,
-	.chip		= egpio_chips,
-	.num_chips	= ARRAY_SIZE(egpio_chips),
-};
-
-static struct platform_device h3xxx_egpio = {
-	.name		= "htc-egpio",
-	.id		= -1,
-	.resource	= egpio_resources,
-	.num_resources	= ARRAY_SIZE(egpio_resources),
-	.dev		= {
-		.platform_data = &egpio_info,
-	},
-};
-
-static struct platform_device *h3xxx_devices[] = {
-	&h3xxx_egpio,
-};
-
-static void __init h3xxx_mach_init(void)
-{
-	sa1100_register_uart_fns(&h3xxx_port_fns);
-	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
-	platform_add_devices(h3xxx_devices, ARRAY_SIZE(h3xxx_devices));
-}
-
-static struct map_desc h3600_io_desc[] __initdata = {
-  	{	/* static memory bank 2  CS#2 */
-		.virtual	=  H3600_BANK_2_VIRT,
-		.pfn		= __phys_to_pfn(SA1100_CS2_PHYS),
-		.length		= 0x02800000,
-		.type		= MT_DEVICE
-	}, {	/* static memory bank 4  CS#4 */
-		.virtual	=  H3600_BANK_4_VIRT,
-		.pfn		= __phys_to_pfn(SA1100_CS4_PHYS),
-		.length		= 0x00800000,
-		.type		= MT_DEVICE
-	}, {	/* EGPIO 0		CS#5 */
-		.virtual	=  H3600_EGPIO_VIRT,
-		.pfn		= __phys_to_pfn(H3600_EGPIO_PHYS),
-		.length		= 0x01000000,
-		.type		= MT_DEVICE
-	}
-};
-
-/*
- * Common map_io initialization
- */
-
-static void __init h3xxx_map_io(void)
-{
-	sa1100_map_io();
-	iotable_init(h3600_io_desc, ARRAY_SIZE(h3600_io_desc));
-
-	sa1100_register_uart(0, 3); /* Common serial port */
-//	sa1100_register_uart(1, 1); /* Microcontroller on 3100/3600 */
-
-	/* Ensure those pins are outputs and driving low  */
-	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
-	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
-
-	/* Configure suspend conditions */
-	PGSR = 0;
-	PWER = PWER_GPIO0;
-	PCFR = PCFR_OPDE;
-	PSDR = 0;
-
-	GPCR = 0x0fffffff;	/* All outputs are set low by default */
-	GPDR = 0;		/* Configure all GPIOs as input */
-}
-
-/************************* H3100 *************************/
-
-#ifdef CONFIG_SA1100_H3100
-
 /*
  * helper for sa1100fb
  */
@@ -373,115 +117,3 @@ MACHINE_START(H3100, "Compaq iPAQ H3100")
 	.init_machine	= h3100_mach_init,
 MACHINE_END
 
-#endif /* CONFIG_SA1100_H3100 */
-
-/************************* H3600 *************************/
-
-#ifdef CONFIG_SA1100_H3600
-
-/*
- * helper for sa1100fb
- */
-static void h3600_lcd_power(int enable)
-{
-	if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power"))
-		goto err1;
-	if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control"))
-		goto err2;
-	if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v"))
-		goto err3;
-	if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v"))
-		goto err4;
-
-	gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
-	gpio_direction_output(H3600_EGPIO_LCD_PCI, enable);
-	gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable);
-	gpio_direction_output(H3600_EGPIO_LVDD_ON, enable);
-
-	gpio_free(H3600_EGPIO_LVDD_ON);
-err4:	gpio_free(H3600_EGPIO_LCD_5V_ON);
-err3:	gpio_free(H3600_EGPIO_LCD_PCI);
-err2:	gpio_free(H3XXX_EGPIO_LCD_ON);
-err1:	return;
-}
-
-static void __init h3600_map_io(void)
-{
-	h3xxx_map_io();
-
-	sa1100fb_lcd_power = h3600_lcd_power;
-}
-
-/*
- * This turns the IRDA power on or off on the Compaq H3600
- */
-static int h3600_irda_set_power(struct device *dev, unsigned int state)
-{
-	gpio_set_value(H3600_EGPIO_IR_ON, state);
-	return 0;
-}
-
-static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
-{
-	gpio_set_value(H3600_EGPIO_IR_FSEL, !(speed < 4000000));
-}
-
-static int h3600_irda_startup(struct device *dev)
-{
-	int err = gpio_request(H3600_EGPIO_IR_ON, "IrDA power");
-	if (err)
-		goto err1;
-	err = gpio_direction_output(H3600_EGPIO_IR_ON, 0);
-	if (err)
-		goto err2;
-	err = gpio_request(H3600_EGPIO_IR_FSEL, "IrDA fsel");
-	if (err)
-		goto err2;
-	err = gpio_direction_output(H3600_EGPIO_IR_FSEL, 0);
-	if (err)
-		goto err3;
-	return 0;
-
-err3:	gpio_free(H3600_EGPIO_IR_FSEL);
-err2:	gpio_free(H3600_EGPIO_IR_ON);
-err1:	return err;
-}
-
-static void h3600_irda_shutdown(struct device *dev)
-{
-	gpio_free(H3600_EGPIO_IR_ON);
-	gpio_free(H3600_EGPIO_IR_FSEL);
-}
-
-static struct irda_platform_data h3600_irda_data = {
-	.set_power	= h3600_irda_set_power,
-	.set_speed	= h3600_irda_set_speed,
-	.startup	= h3600_irda_startup,
-	.shutdown	= h3600_irda_shutdown,
-};
-
-static struct gpio_default_state h3600_default_gpio[] = {
-	{ H3XXX_GPIO_COM_DCD,	GPIO_MODE_IN,	"COM DCD" },
-	{ H3XXX_GPIO_COM_CTS,	GPIO_MODE_IN,	"COM CTS" },
-	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
-};
-
-static void __init h3600_mach_init(void)
-{
-	h3xxx_init_gpio(h3600_default_gpio, ARRAY_SIZE(h3600_default_gpio));
-	h3xxx_mach_init();
-	sa11x0_register_irda(&h3600_irda_data);
-}
-
-MACHINE_START(H3600, "Compaq iPAQ H3600")
-	.phys_io	= 0x80000000,
-	.io_pg_offst	= ((0xf8000000) >> 18) & 0xfffc,
-	.boot_params	= 0xc0000100,
-	.map_io		= h3600_map_io,
-	.init_irq	= sa1100_init_irq,
-	.timer		= &sa1100_timer,
-	.init_machine	= h3600_mach_init,
-MACHINE_END
-
-#endif /* CONFIG_SA1100_H3600 */
-
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index dd39f90..65ab286 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -48,337 +48,6 @@
 
 #include "generic.h"
 
-struct gpio_default_state {
-	int gpio;
-	int mode;
-	const char *name;
-};
-
-#define GPIO_MODE_IN	-1
-#define GPIO_MODE_OUT0	0
-#define GPIO_MODE_OUT1	1
-
-static void h3xxx_init_gpio(struct gpio_default_state *s, size_t n)
-{
-	while (n--) {
-		const char *name = s->name;
-		int err;
-
-		if (!name)
-			name = "[init]";
-		err = gpio_request(s->gpio, name);
-		if (err) {
-			printk(KERN_ERR "gpio%u: unable to request: %d\n",
-				s->gpio, err);
-			continue;
-		}
-		if (s->mode >= 0) {
-			err = gpio_direction_output(s->gpio, s->mode);
-		} else {
-			err = gpio_direction_input(s->gpio);
-		}
-		if (err) {
-			printk(KERN_ERR "gpio%u: unable to set direction: %d\n",
-				s->gpio, err);
-			continue;
-		}
-		if (!s->name)
-			gpio_free(s->gpio);
-		s++;
-	}
-}
-
-
-/*
- * H3xxx flash support
- */
-static struct mtd_partition h3xxx_partitions[] = {
-	{
-		.name		= "H3XXX boot firmware",
-		.size		= 0x00040000,
-		.offset		= 0,
-		.mask_flags	= MTD_WRITEABLE,  /* force read-only */
-	}, {
-		.name		= "H3XXX rootfs",
-		.size		= MTDPART_SIZ_FULL,
-		.offset		= 0x00040000,
-	}
-};
-
-static void h3xxx_set_vpp(int vpp)
-{
-	gpio_set_value(H3XXX_EGPIO_VPP_ON, vpp);
-}
-
-static int h3xxx_flash_init(void)
-{
-	int err = gpio_request(H3XXX_EGPIO_VPP_ON, "Flash Vpp");
-	if (err)
-		return err;
-
-	err = gpio_direction_output(H3XXX_EGPIO_VPP_ON, 0);
-	if (err)
-		gpio_free(H3XXX_EGPIO_VPP_ON);
-
-	return err;
-}
-
-static void h3xxx_flash_exit(void)
-{
-	gpio_free(H3XXX_EGPIO_VPP_ON);
-}
-
-static struct flash_platform_data h3xxx_flash_data = {
-	.map_name	= "cfi_probe",
-	.set_vpp	= h3xxx_set_vpp,
-	.init		= h3xxx_flash_init,
-	.exit		= h3xxx_flash_exit,
-	.parts		= h3xxx_partitions,
-	.nr_parts	= ARRAY_SIZE(h3xxx_partitions),
-};
-
-static struct resource h3xxx_flash_resource = {
-	.start		= SA1100_CS0_PHYS,
-	.end		= SA1100_CS0_PHYS + SZ_32M - 1,
-	.flags		= IORESOURCE_MEM,
-};
-
-
-/*
- * H3xxx uart support
- */
-static void h3xxx_uart_set_mctrl(struct uart_port *port, u_int mctrl)
-{
-	if (port->mapbase == _Ser3UTCR0) {
-		gpio_set_value(H3XXX_GPIO_COM_RTS, !(mctrl & TIOCM_RTS));
-	}
-}
-
-static u_int h3xxx_uart_get_mctrl(struct uart_port *port)
-{
-	u_int ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR;
-
-	if (port->mapbase == _Ser3UTCR0) {
-		/*
-		 * DCD and CTS bits are inverted in GPLR by RS232 transceiver
-		 */
-		if (gpio_get_value(H3XXX_GPIO_COM_DCD))
-			ret &= ~TIOCM_CD;
-		if (gpio_get_value(H3XXX_GPIO_COM_CTS))
-			ret &= ~TIOCM_CTS;
-	}
-
-	return ret;
-}
-
-static void h3xxx_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
-{
-	if (port->mapbase == _Ser3UTCR0)
-		if (!gpio_request(H3XXX_EGPIO_RS232_ON, "RS232 transceiver")) {
-			gpio_direction_output(H3XXX_EGPIO_RS232_ON, !state);
-			gpio_free(H3XXX_EGPIO_RS232_ON);
-		}
-}
-
-/*
- * Enable/Disable wake up events for this serial port.
- * Obviously, we only support this on the normal COM port.
- */
-static int h3xxx_uart_set_wake(struct uart_port *port, u_int enable)
-{
-	int err = -EINVAL;
-
-	if (port->mapbase == _Ser3UTCR0) {
-		if (enable)
-			PWER |= PWER_GPIO23 | PWER_GPIO25; /* DCD and CTS */
-		else
-			PWER &= ~(PWER_GPIO23 | PWER_GPIO25); /* DCD and CTS */
-		err = 0;
-	}
-	return err;
-}
-
-static struct sa1100_port_fns h3xxx_port_fns __initdata = {
-	.set_mctrl	= h3xxx_uart_set_mctrl,
-	.get_mctrl	= h3xxx_uart_get_mctrl,
-	.pm		= h3xxx_uart_pm,
-	.set_wake	= h3xxx_uart_set_wake,
-};
-
-/*
- * EGPIO
- */
-
-static struct resource egpio_resources[] = {
-	[0] = {
-		.start	= H3600_EGPIO_PHYS,
-		.end	= H3600_EGPIO_PHYS + 0x4 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct htc_egpio_chip egpio_chips[] = {
-	[0] = {
-		.reg_start	= 0,
-		.gpio_base	= H3XXX_EGPIO_BASE,
-		.num_gpios	= 16,
-		.direction	= HTC_EGPIO_OUTPUT,
-		.initial_values	= 0x0080, /* H3XXX_EGPIO_RS232_ON */
-	},
-};
-
-static struct htc_egpio_platform_data egpio_info = {
-	.reg_width	= 16,
-	.bus_width	= 16,
-	.chip		= egpio_chips,
-	.num_chips	= ARRAY_SIZE(egpio_chips),
-};
-
-static struct platform_device h3xxx_egpio = {
-	.name		= "htc-egpio",
-	.id		= -1,
-	.resource	= egpio_resources,
-	.num_resources	= ARRAY_SIZE(egpio_resources),
-	.dev		= {
-		.platform_data = &egpio_info,
-	},
-};
-
-static struct platform_device *h3xxx_devices[] = {
-	&h3xxx_egpio,
-};
-
-static void __init h3xxx_mach_init(void)
-{
-	sa1100_register_uart_fns(&h3xxx_port_fns);
-	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
-	platform_add_devices(h3xxx_devices, ARRAY_SIZE(h3xxx_devices));
-}
-
-static struct map_desc h3600_io_desc[] __initdata = {
-  	{	/* static memory bank 2  CS#2 */
-		.virtual	=  H3600_BANK_2_VIRT,
-		.pfn		= __phys_to_pfn(SA1100_CS2_PHYS),
-		.length		= 0x02800000,
-		.type		= MT_DEVICE
-	}, {	/* static memory bank 4  CS#4 */
-		.virtual	=  H3600_BANK_4_VIRT,
-		.pfn		= __phys_to_pfn(SA1100_CS4_PHYS),
-		.length		= 0x00800000,
-		.type		= MT_DEVICE
-	}, {	/* EGPIO 0		CS#5 */
-		.virtual	=  H3600_EGPIO_VIRT,
-		.pfn		= __phys_to_pfn(H3600_EGPIO_PHYS),
-		.length		= 0x01000000,
-		.type		= MT_DEVICE
-	}
-};
-
-/*
- * Common map_io initialization
- */
-
-static void __init h3xxx_map_io(void)
-{
-	sa1100_map_io();
-	iotable_init(h3600_io_desc, ARRAY_SIZE(h3600_io_desc));
-
-	sa1100_register_uart(0, 3); /* Common serial port */
-//	sa1100_register_uart(1, 1); /* Microcontroller on 3100/3600 */
-
-	/* Ensure those pins are outputs and driving low  */
-	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
-	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
-
-	/* Configure suspend conditions */
-	PGSR = 0;
-	PWER = PWER_GPIO0;
-	PCFR = PCFR_OPDE;
-	PSDR = 0;
-
-	GPCR = 0x0fffffff;	/* All outputs are set low by default */
-	GPDR = 0;		/* Configure all GPIOs as input */
-}
-
-/************************* H3100 *************************/
-
-#ifdef CONFIG_SA1100_H3100
-
-/*
- * helper for sa1100fb
- */
-static void h3100_lcd_power(int enable)
-{
-	if (!gpio_request(H3XXX_EGPIO_LCD_ON, "LCD ON")) {
-		gpio_set_value(H3100_GPIO_LCD_3V_ON, enable);
-		gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
-		gpio_free(H3XXX_EGPIO_LCD_ON);
-	}
-}
-
-
-static void __init h3100_map_io(void)
-{
-	h3xxx_map_io();
-
-	sa1100fb_lcd_power = h3100_lcd_power;
-
-	/* Older bootldrs put GPIO2-9 in alternate mode on the
-	   assumption that they are used for video */
-	GAFR &= ~0x000001fb;
-}
-
-/*
- * This turns the IRDA power on or off on the Compaq H3100
- */
-static int h3100_irda_set_power(struct device *dev, unsigned int state)
-{
-	gpio_set_value(H3100_GPIO_IR_ON, state);
-	return 0;
-}
-
-static void h3100_irda_set_speed(struct device *dev, unsigned int speed)
-{
-	gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000));
-}
-
-static struct irda_platform_data h3100_irda_data = {
-	.set_power	= h3100_irda_set_power,
-	.set_speed	= h3100_irda_set_speed,
-};
-
-static struct gpio_default_state h3100_default_gpio[] = {
-	{ H3100_GPIO_IR_ON,	GPIO_MODE_OUT0, "IrDA power" },
-	{ H3100_GPIO_IR_FSEL,	GPIO_MODE_OUT0, "IrDA fsel" },
-	{ H3XXX_GPIO_COM_DCD,	GPIO_MODE_IN,	"COM DCD" },
-	{ H3XXX_GPIO_COM_CTS,	GPIO_MODE_IN,	"COM CTS" },
-	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
-	{ H3100_GPIO_LCD_3V_ON,	GPIO_MODE_OUT0,	"LCD 3v" },
-};
-
-static void __init h3100_mach_init(void)
-{
-	h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio));
-	h3xxx_mach_init();
-	sa11x0_register_irda(&h3100_irda_data);
-}
-
-MACHINE_START(H3100, "Compaq iPAQ H3100")
-	.phys_io	= 0x80000000,
-	.io_pg_offst	= ((0xf8000000) >> 18) & 0xfffc,
-	.boot_params	= 0xc0000100,
-	.map_io		= h3100_map_io,
-	.init_irq	= sa1100_init_irq,
-	.timer		= &sa1100_timer,
-	.init_machine	= h3100_mach_init,
-MACHINE_END
-
-#endif /* CONFIG_SA1100_H3100 */
-
-/************************* H3600 *************************/
-
-#ifdef CONFIG_SA1100_H3600
-
 /*
  * helper for sa1100fb
  */
@@ -483,5 +152,3 @@ MACHINE_START(H3600, "Compaq iPAQ H3600")
 	.init_machine	= h3600_mach_init,
 MACHINE_END
 
-#endif /* CONFIG_SA1100_H3600 */
-
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3xxx.c
similarity index 56%
copy from arch/arm/mach-sa1100/h3600.c
copy to arch/arm/mach-sa1100/h3xxx.c
index dd39f90..cf6563c 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -48,17 +48,7 @@
 
 #include "generic.h"
 
-struct gpio_default_state {
-	int gpio;
-	int mode;
-	const char *name;
-};
-
-#define GPIO_MODE_IN	-1
-#define GPIO_MODE_OUT0	0
-#define GPIO_MODE_OUT1	1
-
-static void h3xxx_init_gpio(struct gpio_default_state *s, size_t n)
+void h3xxx_init_gpio(struct gpio_default_state *s, size_t n)
 {
 	while (n--) {
 		const char *name = s->name;
@@ -248,7 +238,7 @@ static struct platform_device *h3xxx_devices[] = {
 	&h3xxx_egpio,
 };
 
-static void __init h3xxx_mach_init(void)
+void __init h3xxx_mach_init(void)
 {
 	sa1100_register_uart_fns(&h3xxx_port_fns);
 	sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1);
@@ -278,7 +268,7 @@ static struct map_desc h3600_io_desc[] __initdata = {
  * Common map_io initialization
  */
 
-static void __init h3xxx_map_io(void)
+void __init h3xxx_map_io(void)
 {
 	sa1100_map_io();
 	iotable_init(h3600_io_desc, ARRAY_SIZE(h3600_io_desc));
@@ -300,188 +290,3 @@ static void __init h3xxx_map_io(void)
 	GPDR = 0;		/* Configure all GPIOs as input */
 }
 
-/************************* H3100 *************************/
-
-#ifdef CONFIG_SA1100_H3100
-
-/*
- * helper for sa1100fb
- */
-static void h3100_lcd_power(int enable)
-{
-	if (!gpio_request(H3XXX_EGPIO_LCD_ON, "LCD ON")) {
-		gpio_set_value(H3100_GPIO_LCD_3V_ON, enable);
-		gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
-		gpio_free(H3XXX_EGPIO_LCD_ON);
-	}
-}
-
-
-static void __init h3100_map_io(void)
-{
-	h3xxx_map_io();
-
-	sa1100fb_lcd_power = h3100_lcd_power;
-
-	/* Older bootldrs put GPIO2-9 in alternate mode on the
-	   assumption that they are used for video */
-	GAFR &= ~0x000001fb;
-}
-
-/*
- * This turns the IRDA power on or off on the Compaq H3100
- */
-static int h3100_irda_set_power(struct device *dev, unsigned int state)
-{
-	gpio_set_value(H3100_GPIO_IR_ON, state);
-	return 0;
-}
-
-static void h3100_irda_set_speed(struct device *dev, unsigned int speed)
-{
-	gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000));
-}
-
-static struct irda_platform_data h3100_irda_data = {
-	.set_power	= h3100_irda_set_power,
-	.set_speed	= h3100_irda_set_speed,
-};
-
-static struct gpio_default_state h3100_default_gpio[] = {
-	{ H3100_GPIO_IR_ON,	GPIO_MODE_OUT0, "IrDA power" },
-	{ H3100_GPIO_IR_FSEL,	GPIO_MODE_OUT0, "IrDA fsel" },
-	{ H3XXX_GPIO_COM_DCD,	GPIO_MODE_IN,	"COM DCD" },
-	{ H3XXX_GPIO_COM_CTS,	GPIO_MODE_IN,	"COM CTS" },
-	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
-	{ H3100_GPIO_LCD_3V_ON,	GPIO_MODE_OUT0,	"LCD 3v" },
-};
-
-static void __init h3100_mach_init(void)
-{
-	h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio));
-	h3xxx_mach_init();
-	sa11x0_register_irda(&h3100_irda_data);
-}
-
-MACHINE_START(H3100, "Compaq iPAQ H3100")
-	.phys_io	= 0x80000000,
-	.io_pg_offst	= ((0xf8000000) >> 18) & 0xfffc,
-	.boot_params	= 0xc0000100,
-	.map_io		= h3100_map_io,
-	.init_irq	= sa1100_init_irq,
-	.timer		= &sa1100_timer,
-	.init_machine	= h3100_mach_init,
-MACHINE_END
-
-#endif /* CONFIG_SA1100_H3100 */
-
-/************************* H3600 *************************/
-
-#ifdef CONFIG_SA1100_H3600
-
-/*
- * helper for sa1100fb
- */
-static void h3600_lcd_power(int enable)
-{
-	if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power"))
-		goto err1;
-	if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control"))
-		goto err2;
-	if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v"))
-		goto err3;
-	if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v"))
-		goto err4;
-
-	gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
-	gpio_direction_output(H3600_EGPIO_LCD_PCI, enable);
-	gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable);
-	gpio_direction_output(H3600_EGPIO_LVDD_ON, enable);
-
-	gpio_free(H3600_EGPIO_LVDD_ON);
-err4:	gpio_free(H3600_EGPIO_LCD_5V_ON);
-err3:	gpio_free(H3600_EGPIO_LCD_PCI);
-err2:	gpio_free(H3XXX_EGPIO_LCD_ON);
-err1:	return;
-}
-
-static void __init h3600_map_io(void)
-{
-	h3xxx_map_io();
-
-	sa1100fb_lcd_power = h3600_lcd_power;
-}
-
-/*
- * This turns the IRDA power on or off on the Compaq H3600
- */
-static int h3600_irda_set_power(struct device *dev, unsigned int state)
-{
-	gpio_set_value(H3600_EGPIO_IR_ON, state);
-	return 0;
-}
-
-static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
-{
-	gpio_set_value(H3600_EGPIO_IR_FSEL, !(speed < 4000000));
-}
-
-static int h3600_irda_startup(struct device *dev)
-{
-	int err = gpio_request(H3600_EGPIO_IR_ON, "IrDA power");
-	if (err)
-		goto err1;
-	err = gpio_direction_output(H3600_EGPIO_IR_ON, 0);
-	if (err)
-		goto err2;
-	err = gpio_request(H3600_EGPIO_IR_FSEL, "IrDA fsel");
-	if (err)
-		goto err2;
-	err = gpio_direction_output(H3600_EGPIO_IR_FSEL, 0);
-	if (err)
-		goto err3;
-	return 0;
-
-err3:	gpio_free(H3600_EGPIO_IR_FSEL);
-err2:	gpio_free(H3600_EGPIO_IR_ON);
-err1:	return err;
-}
-
-static void h3600_irda_shutdown(struct device *dev)
-{
-	gpio_free(H3600_EGPIO_IR_ON);
-	gpio_free(H3600_EGPIO_IR_FSEL);
-}
-
-static struct irda_platform_data h3600_irda_data = {
-	.set_power	= h3600_irda_set_power,
-	.set_speed	= h3600_irda_set_speed,
-	.startup	= h3600_irda_startup,
-	.shutdown	= h3600_irda_shutdown,
-};
-
-static struct gpio_default_state h3600_default_gpio[] = {
-	{ H3XXX_GPIO_COM_DCD,	GPIO_MODE_IN,	"COM DCD" },
-	{ H3XXX_GPIO_COM_CTS,	GPIO_MODE_IN,	"COM CTS" },
-	{ H3XXX_GPIO_COM_RTS,	GPIO_MODE_OUT0,	"COM RTS" },
-};
-
-static void __init h3600_mach_init(void)
-{
-	h3xxx_init_gpio(h3600_default_gpio, ARRAY_SIZE(h3600_default_gpio));
-	h3xxx_mach_init();
-	sa11x0_register_irda(&h3600_irda_data);
-}
-
-MACHINE_START(H3600, "Compaq iPAQ H3600")
-	.phys_io	= 0x80000000,
-	.io_pg_offst	= ((0xf8000000) >> 18) & 0xfffc,
-	.boot_params	= 0xc0000100,
-	.map_io		= h3600_map_io,
-	.init_irq	= sa1100_init_irq,
-	.timer		= &sa1100_timer,
-	.init_machine	= h3600_mach_init,
-MACHINE_END
-
-#endif /* CONFIG_SA1100_H3600 */
-
diff --git a/arch/arm/mach-sa1100/include/mach/h3xxx.h b/arch/arm/mach-sa1100/include/mach/h3xxx.h
index 7f1e130..d8a6e7c 100644
--- a/arch/arm/mach-sa1100/include/mach/h3xxx.h
+++ b/arch/arm/mach-sa1100/include/mach/h3xxx.h
@@ -87,4 +87,18 @@
 #define H3600_EGPIO_LCD_5V_ON		(H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */
 #define H3600_EGPIO_LVDD_ON		(H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */
 
+struct gpio_default_state {
+	int gpio;
+	int mode;
+	const char *name;
+};
+
+#define GPIO_MODE_IN	-1
+#define GPIO_MODE_OUT0	0
+#define GPIO_MODE_OUT1	1
+
+void h3xxx_init_gpio(struct gpio_default_state *s, size_t n);
+void __init h3xxx_map_io(void);
+void __init h3xxx_mach_init(void);
+
 #endif /* _INCLUDE_H3XXX_H_ */
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 16/20] SA1100: h3100/h3600: revise copyright boilerplates
  2009-10-24 20:23                             ` [PATCH 15/20] SA1100: h3100/h3600: split h3600.c Dmitry Artamonow
@ 2009-10-24 20:26                               ` Dmitry Artamonow
  2009-10-24 20:30                                 ` [PATCH 17/20] SA1100: h3100/h3600: clean up #includes Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:26 UTC (permalink / raw)
  To: linux-arm-kernel

Correct boilerplates after files split. Also shorten them a bit - use
standart GPL wording (as per http://lkml.org/lkml/2007/5/1/220) and
drop changelog, which only entry about h3800 support and abstracted
EGPIOs is just confusing now, as both of these features are gone.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3100.c              |   23 +++++++----------------
 arch/arm/mach-sa1100/h3600.c              |   23 +++++++----------------
 arch/arm/mach-sa1100/h3xxx.c              |   23 +++++++----------------
 arch/arm/mach-sa1100/include/mach/h3xxx.h |   22 ++++++----------------
 4 files changed, 27 insertions(+), 64 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c
index 4c7778e..303bcd1 100644
--- a/arch/arm/mach-sa1100/h3100.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -1,24 +1,15 @@
 /*
- * Hardware definitions for Compaq iPAQ H3xxx Handheld Computers
+ * Support for Compaq iPAQ H3100 handheld computer
  *
- * Copyright 2000,1 Compaq Computer Corporation.
+ * Copyright (c) 2000,1 Compaq Computer Corporation. (Author: Jamey Hicks)
+ * Copyright (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
  *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2001-10-??	Andrew Christian   Added support for iPAQ H3800
- *				   and abstracted EGPIO interface.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  *
  */
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 65ab286..25f189b 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -1,24 +1,15 @@
 /*
- * Hardware definitions for Compaq iPAQ H3xxx Handheld Computers
+ * Support for Compaq iPAQ H3600 handheld computer
  *
- * Copyright 2000,1 Compaq Computer Corporation.
+ * Copyright (c) 2000,1 Compaq Computer Corporation. (Author: Jamey Hicks)
+ * Copyright (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
  *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2001-10-??	Andrew Christian   Added support for iPAQ H3800
- *				   and abstracted EGPIO interface.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  *
  */
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index cf6563c..c9ef056 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -1,24 +1,15 @@
 /*
- * Hardware definitions for Compaq iPAQ H3xxx Handheld Computers
+ * Support for Compaq iPAQ H3100 and H3600 handheld computers (common code)
  *
- * Copyright 2000,1 Compaq Computer Corporation.
+ * Copyright (c) 2000,1 Compaq Computer Corporation. (Author: Jamey Hicks)
+ * Copyright (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
  *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2001-10-??	Andrew Christian   Added support for iPAQ H3800
- *				   and abstracted EGPIO interface.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  *
  */
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-sa1100/include/mach/h3xxx.h b/arch/arm/mach-sa1100/include/mach/h3xxx.h
index d8a6e7c..7d9df16 100644
--- a/arch/arm/mach-sa1100/include/mach/h3xxx.h
+++ b/arch/arm/mach-sa1100/include/mach/h3xxx.h
@@ -1,22 +1,12 @@
 /*
+ * Definitions for Compaq iPAQ H3100 and H3600 handheld computers
  *
- * Definitions for H3600 Handheld Computer
+ * (c) 2000 Compaq Computer Corporation. (Author: Jamey Hicks)
+ * (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
  *
- * Copyright 2000 Compaq Computer Corporation.
- *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2001-10-??   Andrew Christian   Added support for iPAQ H3800
+ * 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.
  *
  */
 
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 17/20] SA1100: h3100/h3600: clean up #includes
  2009-10-24 20:26                               ` [PATCH 16/20] SA1100: h3100/h3600: revise copyright boilerplates Dmitry Artamonow
@ 2009-10-24 20:30                                 ` Dmitry Artamonow
  2009-10-24 20:30                                   ` [PATCH 18/20] SA1100: h3100/h3600: add support for gpio-keys Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:30 UTC (permalink / raw)
  To: linux-arm-kernel

After a code reorganization and following split, there's some #includes
now unused. Clean them up and sort remaining alphabetticaly where possible.

Compile tested.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3100.c |   17 -----------------
 arch/arm/mach-sa1100/h3600.c |   17 -----------------
 arch/arm/mach-sa1100/h3xxx.c |   17 ++---------------
 3 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c
index 303bcd1..793e68c 100644
--- a/arch/arm/mach-sa1100/h3100.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -10,30 +10,13 @@
  *
  */
 
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/pm.h>
-#include <linux/device.h>
-#include <linux/mfd/htc-egpio.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/serial_core.h>
 #include <linux/gpio.h>
-#include <linux/platform_device.h>
 
-#include <asm/irq.h>
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/setup.h>
-
-#include <asm/mach/irq.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/flash.h>
 #include <asm/mach/irda.h>
-#include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/h3xxx.h>
 
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 25f189b..47587cc 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -10,30 +10,13 @@
  *
  */
 
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/pm.h>
-#include <linux/device.h>
-#include <linux/mfd/htc-egpio.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/serial_core.h>
 #include <linux/gpio.h>
-#include <linux/platform_device.h>
 
-#include <asm/irq.h>
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/setup.h>
-
-#include <asm/mach/irq.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/flash.h>
 #include <asm/mach/irda.h>
-#include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/h3xxx.h>
 
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index c9ef056..2f85d1d 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -10,28 +10,15 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/pm.h>
-#include <linux/device.h>
+#include <linux/gpio.h>
 #include <linux/mfd/htc-egpio.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
-#include <linux/serial_core.h>
-#include <linux/gpio.h>
 #include <linux/platform_device.h>
+#include <linux/serial_core.h>
 
-#include <asm/irq.h>
-#include <mach/hardware.h>
-#include <asm/mach-types.h>
-#include <asm/setup.h>
-
-#include <asm/mach/irq.h>
-#include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/mach/irda.h>
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
 
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 18/20] SA1100: h3100/h3600: add support for gpio-keys
  2009-10-24 20:30                                 ` [PATCH 17/20] SA1100: h3100/h3600: clean up #includes Dmitry Artamonow
@ 2009-10-24 20:30                                   ` Dmitry Artamonow
  2009-10-24 20:37                                     ` [PATCH 19/20] SA1100: reuse h3600 PCMCIA driver on h3100 Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:30 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for "Power" and "Action" (joystick center) buttons -
the only buttons on iPaq h3100/h3600 connected to GPIOs
(other buttons are controlled by microcontroller)
Also remove setting PWER for wakeup on Power button press -
gpio-keys driver will handle it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/mach-sa1100/h3xxx.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index 2f85d1d..ec9d9db 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -12,6 +12,8 @@
 
 #include <linux/kernel.h>
 #include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
 #include <linux/mfd/htc-egpio.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -212,8 +214,44 @@ static struct platform_device h3xxx_egpio = {
 	},
 };
 
+/*
+ * GPIO keys
+ */
+
+static struct gpio_keys_button h3xxx_button_table[] = {
+	{
+		.code		= KEY_POWER,
+		.gpio		= H3XXX_GPIO_PWR_BUTTON,
+		.desc		= "Power Button",
+		.active_low	= 1,
+		.type		= EV_KEY,
+		.wakeup		= 1,
+	}, {
+		.code		= KEY_ENTER,
+		.gpio		= H3XXX_GPIO_ACTION_BUTTON,
+		.active_low	= 1,
+		.desc		= "Action button",
+		.type		= EV_KEY,
+		.wakeup		= 0,
+	},
+};
+
+static struct gpio_keys_platform_data h3xxx_keys_data = {
+	.buttons  = h3xxx_button_table,
+	.nbuttons = ARRAY_SIZE(h3xxx_button_table),
+};
+
+static struct platform_device h3xxx_keys = {
+	.name	= "gpio-keys",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &h3xxx_keys_data,
+	},
+};
+
 static struct platform_device *h3xxx_devices[] = {
 	&h3xxx_egpio,
+	&h3xxx_keys,
 };
 
 void __init h3xxx_mach_init(void)
@@ -260,7 +298,6 @@ void __init h3xxx_map_io(void)
 
 	/* Configure suspend conditions */
 	PGSR = 0;
-	PWER = PWER_GPIO0;
 	PCFR = PCFR_OPDE;
 	PSDR = 0;
 
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 19/20] SA1100: reuse h3600 PCMCIA driver on h3100
  2009-10-24 20:30                                   ` [PATCH 18/20] SA1100: h3100/h3600: add support for gpio-keys Dmitry Artamonow
@ 2009-10-24 20:37                                     ` Dmitry Artamonow
  2009-10-24 20:37                                       ` [PATCH 20/20] SA1100: h3600: update defconfig Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Both iPAQs h3600 and h3100 share the same control
GPIOs for PCMCIA, so driver can be reused.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 drivers/pcmcia/sa1100_generic.c |    2 +-
 drivers/pcmcia/sa1100_h3600.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c
index 2d0e997..9e5679f 100644
--- a/drivers/pcmcia/sa1100_generic.c
+++ b/drivers/pcmcia/sa1100_generic.c
@@ -51,7 +51,7 @@ static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = {
 #ifdef CONFIG_SA1100_CERF
 	pcmcia_cerf_init,
 #endif
-#ifdef CONFIG_SA1100_H3600
+#if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600)
 	pcmcia_h3600_init,
 #endif
 #ifdef CONFIG_SA1100_SHANNON
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 4717aca..b763cea 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -223,7 +223,7 @@ int __init pcmcia_h3600_init(struct device *dev)
 {
 	int ret = -ENODEV;
 
-	if (machine_is_h3600())
+	if (machine_is_h3600() || machine_is_h3100())
 		ret = sa11xx_drv_pcmcia_probe(dev, &h3600_pcmcia_ops, 0, 2);
 
 	return ret;
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 20/20] SA1100: h3600: update defconfig
  2009-10-24 20:37                                     ` [PATCH 19/20] SA1100: reuse h3600 PCMCIA driver on h3100 Dmitry Artamonow
@ 2009-10-24 20:37                                       ` Dmitry Artamonow
  0 siblings, 0 replies; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-24 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Update defconfig to current kernel, enable support for iPAQ H3100
and following drivers: gpio-keys, htc-egpio, ide_cs.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/configs/h3600_defconfig |  976 ++++++++++++++++++++++++--------------
 1 files changed, 612 insertions(+), 364 deletions(-)

diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig
index f6aed77..efa78e1 100644
--- a/arch/arm/configs/h3600_defconfig
+++ b/arch/arm/configs/h3600_defconfig
@@ -1,86 +1,189 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc4
-# Thu Jun  9 01:59:03 2005
+# Linux kernel version: 2.6.32-rc5
+# Sat Oct 24 00:09:30 2009
 #
 CONFIG_ARM=y
-CONFIG_MMU=y
-CONFIG_UID16=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_IOMAP=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# 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_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
 
 #
-# Loadable module support
+# GCOV-based kernel profiling
 #
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 # CONFIG_MODULE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_FREEZER=y
 
 #
 # System Type
 #
-# CONFIG_ARCH_CLPS7500 is not set
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_GEMINI is not set
 # CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
 # CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
 # CONFIG_ARCH_RPC is not set
 CONFIG_ARCH_SA1100=y
 # CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_BCMRING is not set
 
 #
 # SA11x0 Implementations
@@ -106,27 +209,31 @@ CONFIG_CPU_32=y
 CONFIG_CPU_SA1100=y
 CONFIG_CPU_32v4=y
 CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_CACHE_V4WB=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WB=y
-CONFIG_CPU_MINICACHE=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
 
 #
 # Bus support
 #
 CONFIG_ISA=y
-CONFIG_ISA_DMA_API=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
@@ -138,11 +245,41 @@ CONFIG_PCMCIA_SA1100=y
 #
 # Kernel Features
 #
-# CONFIG_SMP is not set
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
-CONFIG_DISCONTIGMEM=y
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 # CONFIG_LEDS is not set
 CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
 
 #
 # Boot options
@@ -151,22 +288,26 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
 
 #
-# CPU Frequency scaling
+# CPU Power Management
 #
 CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
 # CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=y
-# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+# CONFIG_CPU_FREQ_STAT is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
 CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
 # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
 # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
 CONFIG_CPU_FREQ_SA1100=y
+# CONFIG_CPU_IDLE is not set
 
 #
 # Floating point emulation
@@ -183,6 +324,8 @@ CONFIG_FPE_NWFPE=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_ARTHUR is not set
@@ -191,8 +334,120 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_APM is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET 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 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 is not set
+# 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=y
+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_RDS is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA 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_PHONET is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_SA1100_FIR=m
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -201,15 +456,17 @@ CONFIG_PM=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
 CONFIG_MTD=y
 # CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_TESTS is not set
 # CONFIG_MTD_CONCAT is not set
 CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_REDBOOT_PARTS=y
@@ -218,15 +475,20 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
 # CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
 
 #
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -249,6 +511,7 @@ CONFIG_MTD_MAP_BANK_WIDTH_4=y
 CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
 CONFIG_MTD_CFI_INTELEXT=y
 # CONFIG_MTD_CFI_AMDSTD is not set
 # CONFIG_MTD_CFI_STAA is not set
@@ -265,7 +528,7 @@ CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_PHYSMAP is not set
 # CONFIG_MTD_ARM_INTEGRATOR is not set
 CONFIG_MTD_SA1100=y
-# CONFIG_MTD_EDB7312 is not set
+# CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
@@ -273,7 +536,6 @@ CONFIG_MTD_SA1100=y
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
 # CONFIG_MTD_BLOCK2MTD is not set
 
 #
@@ -282,26 +544,21 @@ CONFIG_MTD_SA1100=y
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
 # CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
 # CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
 
 #
-# Parallel port support
+# LPDDR flash memory drivers
 #
-# CONFIG_PARPORT is not set
+# CONFIG_MTD_LPDDR is not set
 
 #
-# Plug and Play support
+# UBI - Unsorted block images
 #
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
 # CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_XD is not set
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=m
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -309,212 +566,58 @@ CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
 
 #
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=m
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-CONFIG_BLK_DEV_IDECD=m
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
 
 #
 # IDE chipset support/bugfixes
 #
-CONFIG_IDE_GENERIC=m
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-
-#
-# IEEE 1394 (FireWire) support
-#
-
-#
-# I2O device support
-#
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# 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_TUNNEL is not set
-# CONFIG_IP_TCPDIAG is not set
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP 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_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-# CONFIG_IRDA_ULTRA is not set
-
-#
-# IrDA options
-#
-# CONFIG_IRDA_CACHE_LAST_LSAP is not set
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-# CONFIG_IRTTY_SIR is not set
-
-#
-# Dongle support
-#
-
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-# CONFIG_NSC_FIR is not set
-# CONFIG_WINBOND_FIR is not set
-# CONFIG_SMC_IRCC_FIR is not set
-# CONFIG_ALI_FIR is not set
-CONFIG_SA1100_FIR=m
-# CONFIG_VIA_FIR is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # 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
-
-#
-# ARCnet devices
-#
+# CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
 # CONFIG_NET_ETHERNET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-
-#
-# Token Ring devices
-#
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
+# CONFIG_WLAN is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# PCMCIA network device support
+# Enable WiMAX (Networking options) to see the WiMAX drivers
 #
 CONFIG_NET_PCMCIA=y
 # CONFIG_PCMCIA_3C589 is not set
@@ -525,10 +628,6 @@ CONFIG_PCMCIA_PCNET=y
 # CONFIG_PCMCIA_SMC91C92 is not set
 # CONFIG_PCMCIA_XIRC2PS is not set
 # CONFIG_PCMCIA_AXNET is not set
-
-#
-# Wan interfaces
-#
 # CONFIG_WAN is not set
 CONFIG_PPP=m
 # CONFIG_PPP_MULTILINK is not set
@@ -537,20 +636,23 @@ CONFIG_PPP_ASYNC=m
 # CONFIG_PPP_SYNC_TTY is not set
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
 # CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
 # CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
+CONFIG_SLHC=m
 # CONFIG_NETCONSOLE is not set
-
-#
-# ISDN subsystem
-#
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 # CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
 
 #
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -560,7 +662,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -568,47 +669,42 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Input Device Drivers
 #
 CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_ATKBD is not set
 # CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_MATRIX is not set
 # CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-# CONFIG_MOUSE_LOGIBM is not set
-# CONFIG_MOUSE_PC110PAD is not set
-# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
 #
 # Hardware I/O ports
 #
-CONFIG_SERIO=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
 # Serial drivers
 #
-CONFIG_SERIAL_8250=m
-# CONFIG_SERIAL_8250_CS is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SERIAL_8250 is not set
 
 #
 # Non-8250 serial port support
@@ -618,71 +714,125 @@ CONFIG_SERIAL_SA1100_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
 
 #
-# IPMI
+# PCMCIA character devices
 #
-# CONFIG_IPMI_HANDLER is not set
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
 
 #
-# Watchdog Cards
+# PPS support
 #
-# CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
 
 #
-# Ftape, the floppy tape device driver
+# Memory mapped GPIO expanders:
 #
-# CONFIG_DRM is not set
 
 #
-# PCMCIA character devices
+# I2C GPIO expanders:
 #
-# CONFIG_SYNCLINK_CS is not set
-# CONFIG_RAW_DRIVER is not set
 
 #
-# TPM devices
+# PCI GPIO expanders:
 #
 
 #
-# I2C support
+# SPI GPIO expanders:
 #
-# CONFIG_I2C is not set
 
 #
-# Misc devices
+# AC97 GPIO expanders:
 #
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# Multimedia devices
+# Sonics Silicon Backplane
 #
-# CONFIG_VIDEO_DEV is not set
+# CONFIG_SSB is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multifunction device drivers
 #
-# CONFIG_DVB is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+CONFIG_HTC_EGPIO=y
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT is not set
 
 #
 # Graphics support
 #
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
 CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_SOFT_CURSOR=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
 CONFIG_FB_SA1100=y
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
 # Console display driver support
@@ -691,65 +841,54 @@ CONFIG_FB_SA1100=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 # CONFIG_FRAMEBUFFER_CONSOLE is not set
-
-#
-# Logo configuration
-#
 # CONFIG_LOGO is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-CONFIG_SOUND=y
-
-#
-# Advanced Linux Sound Architecture
-#
-# CONFIG_SND is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-# CONFIG_USB_ARCH_HAS_OHCI is not set
-# CONFIG_USB is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
 
 #
-# USB Gadget Support
+# TI VLYNQ
 #
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
+# CONFIG_STAGING is not set
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+# CONFIG_EXT4_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
 CONFIG_DNOTIFY=y
+# CONFIG_INOTIFY is not set
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -771,16 +910,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
@@ -788,34 +924,37 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
 CONFIG_JFFS2_RTIME=y
 # CONFIG_JFFS2_RUBIN is not set
 CONFIG_CRAMFS=m
+# CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=m
 # CONFIG_NFSD_V3 is not set
-CONFIG_NFSD_TCP=y
+# CONFIG_NFSD_V4 is not set
 CONFIG_LOCKD=y
 CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -831,10 +970,6 @@ CONFIG_SMB_FS=m
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NLS_CODEPAGE_437 is not set
@@ -875,20 +1010,34 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
 CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_MEMORY_INIT=y
 CONFIG_FRAME_POINTER=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_DEBUG_USER is not set
 
 #
@@ -896,21 +1045,120 @@ CONFIG_FRAME_POINTER=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=m
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
 
 #
-# Cryptographic options
+# Compression
 #
-# CONFIG_CRYPTO is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
 
 #
-# Hardware crypto devices
+# Random Number Generation
 #
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+# CONFIG_BINARY_PRINTF is not set
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
 CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
-- 
1.6.5.1.63.ga9d7.dirty

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-10-24 20:03 [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Dmitry Artamonow
  2009-10-24 20:03 ` [PATCH 01/20] SA1100: h3100/h3600: mark *_mach_init functions as __init Dmitry Artamonow
@ 2009-10-24 21:10 ` Russell King - ARM Linux
  2009-10-25 15:36   ` Dmitry Artamonow
  1 sibling, 1 reply; 32+ messages in thread
From: Russell King - ARM Linux @ 2009-10-24 21:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 25, 2009 at 12:03:58AM +0400, Dmitry Artamonow wrote:
> Compile and run tested on iPAQs h3150 and h3635 with CF jacket.
> Patches are mostly checkpatch clean - there's some comments
> exceeding 80-line limit, but otherwise all code should be ok.

I don't really care about the 80 character line limit in two circumstances:
1. if a printk format string needs to go over the limit, so be it.
2. comments against #defines when it's reasonable for them to be there
   provided its not excessive.

Looking at these patches, it seems sane.

> Also, please note, that patches are generated with "-C" flag
> of git-format-patch for easier review. If there's problems with
> applying, use patches from URL above - they're generated without "-C".

That's fine, and the patches to me at least look fine as well.  The only
thing which gives me slight concern is the:

	if (!gpio_request()) {
		gpio_direction_output();
		gpio_free();
	}

stuff, but I guess you can't get around that easily, especially if those
GPIOs only become available at some time later.  It is something that
eventually needs to be addressed though - consider that this can lead
to unexpected (and silent) failures if the GPIOs aren't available when
another driver initializes, and can't (eg) turn on the IrDA tranceiver.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-10-24 21:10 ` [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Russell King - ARM Linux
@ 2009-10-25 15:36   ` Dmitry Artamonow
  2009-11-15 17:30     ` Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-10-25 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 22:10 Sat 24 Oct     , Russell King - ARM Linux wrote:
> 
> That's fine, and the patches to me at least look fine as well.  The only
> thing which gives me slight concern is the:
> 
> 	if (!gpio_request()) {
> 		gpio_direction_output();
> 		gpio_free();
> 	}
> 
> stuff, but I guess you can't get around that easily, especially if those
> GPIOs only become available at some time later.  It is something that
> eventually needs to be addressed though - consider that this can lead
> to unexpected (and silent) failures if the GPIOs aren't available when
> another driver initializes, and can't (eg) turn on the IrDA tranceiver.

Yes, you right here about silent failures. I think they could be made less
silent by inserting some pr_err()-s , though it would bloat code a
bit (I'd like to see request_gpio() itself emitting error message,
but currectly it does that only when CONFIG_DEBUG_GPIO is set).
Ok, here's incremental patch adding pr_err-s in attachment - if you're
OK with it I will roll it into [09/20] and rebase all following patches.

Also perhaps it's a good idea to always built-in htc-egpio driver
(by adding "select HTC_EGPIO" to h3100/h3600 Kconfig options) - that should
decrease probability of gpio_request failures a lot. Patch also
attached.

Anyway these gpio_requests in callbacks is temporary solution.
In a long term I'd really like to see proper init/exit hooks in
corresponding drivers, but it's hard to say how much work it will
require.

-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-10-25 15:36   ` Dmitry Artamonow
@ 2009-11-15 17:30     ` Dmitry Artamonow
  2009-11-23 20:39       ` Russell King - ARM Linux
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-11-15 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 18:36 Sun 25 Oct     , Dmitry Artamonow wrote:
> On 22:10 Sat 24 Oct     , Russell King - ARM Linux wrote:
> > 
> > That's fine, and the patches to me at least look fine as well.  The only
> > thing which gives me slight concern is the:
> > 
> > 	if (!gpio_request()) {
> > 		gpio_direction_output();
> > 		gpio_free();
> > 	}
> > 
> > stuff, but I guess you can't get around that easily, especially if those
> > GPIOs only become available at some time later.  It is something that
> > eventually needs to be addressed though - consider that this can lead
> > to unexpected (and silent) failures if the GPIOs aren't available when
> > another driver initializes, and can't (eg) turn on the IrDA tranceiver.
> 
> Yes, you right here about silent failures. I think they could be made less
> silent by inserting some pr_err()-s , though it would bloat code a
> bit (I'd like to see request_gpio() itself emitting error message,
> but currectly it does that only when CONFIG_DEBUG_GPIO is set).
> Ok, here's incremental patch adding pr_err-s in attachment - if you're
> OK with it I will roll it into [09/20] and rebase all following patches.
> 
> Also perhaps it's a good idea to always built-in htc-egpio driver
> (by adding "select HTC_EGPIO" to h3100/h3600 Kconfig options) - that should
> decrease probability of gpio_request failures a lot. Patch also
> attached.

So, Russell, what's your opinion on these proposed additional changes?
(btw, I found some minor flaws in "emit messages on failed gpio_request"
patch, new version attached here).

I'm thinking about submitting full patchset into you patchsystem soon,
but I'd like to know that everything is ok before doing that.

-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-15 17:30     ` Dmitry Artamonow
@ 2009-11-23 20:39       ` Russell King - ARM Linux
  2009-11-24 21:25         ` Dmitry Artamonow
  0 siblings, 1 reply; 32+ messages in thread
From: Russell King - ARM Linux @ 2009-11-23 20:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 15, 2009 at 08:30:48PM +0300, Dmitry Artamonow wrote:
> On 18:36 Sun 25 Oct     , Dmitry Artamonow wrote:
> > On 22:10 Sat 24 Oct     , Russell King - ARM Linux wrote:
> > > 
> > > That's fine, and the patches to me at least look fine as well.  The only
> > > thing which gives me slight concern is the:
> > > 
> > > 	if (!gpio_request()) {
> > > 		gpio_direction_output();
> > > 		gpio_free();
> > > 	}
> > > 
> > > stuff, but I guess you can't get around that easily, especially if those
> > > GPIOs only become available at some time later.  It is something that
> > > eventually needs to be addressed though - consider that this can lead
> > > to unexpected (and silent) failures if the GPIOs aren't available when
> > > another driver initializes, and can't (eg) turn on the IrDA tranceiver.
> > 
> > Yes, you right here about silent failures. I think they could be made less
> > silent by inserting some pr_err()-s , though it would bloat code a
> > bit (I'd like to see request_gpio() itself emitting error message,
> > but currectly it does that only when CONFIG_DEBUG_GPIO is set).
> > Ok, here's incremental patch adding pr_err-s in attachment - if you're
> > OK with it I will roll it into [09/20] and rebase all following patches.
> > 
> > Also perhaps it's a good idea to always built-in htc-egpio driver
> > (by adding "select HTC_EGPIO" to h3100/h3600 Kconfig options) - that should
> > decrease probability of gpio_request failures a lot. Patch also
> > attached.
> 
> So, Russell, what's your opinion on these proposed additional changes?
> (btw, I found some minor flaws in "emit messages on failed gpio_request"
> patch, new version attached here).
> 
> I'm thinking about submitting full patchset into you patchsystem soon,
> but I'd like to know that everything is ok before doing that.

Well, I'm not sure what Thomas Kunze is doing, I've not heard from him in
a while.

How do your patches affect his?  Are your patches a superset of Thomas's
patches?  If not, should Thomas's be merged first?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-23 20:39       ` Russell King - ARM Linux
@ 2009-11-24 21:25         ` Dmitry Artamonow
  2009-11-25 16:53           ` Russell King - ARM Linux
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry Artamonow @ 2009-11-24 21:25 UTC (permalink / raw)
  To: linux-arm-kernel

On 20:39 Mon 23 Nov     , Russell King - ARM Linux wrote:
> > I'm thinking about submitting full patchset into you patchsystem soon,
> > but I'd like to know that everything is ok before doing that.
> 
> Well, I'm not sure what Thomas Kunze is doing, I've not heard from him in
> a while.
> 
> How do your patches affect his?  Are your patches a superset of Thomas's
> patches?  If not, should Thomas's be merged first?

Mine and Thomas patchsets are pretty independent - not even a file in
common, and they don't depend on each other even indirectly.

But mine depends on changes in your 'sa1100' branch, and I've been slightly
worrying about this commit:  "ARM: sa11x0: convert set_xxx_data() to
register_xxx()", which touches collie.c. Though, looks like it doesn't
conflict with Thomas's patches in fact (I've made a test 'git merge' just
to be sure).

Oh, and forgot to mention - your 'sa1100' branch is currently based on
2.6.32-rc3, you'll need to rebase it on more current -rc before applying
my patches, because of 4918a0139 (ARM: 5752/1: SA1100: fix building of
h3100), which went in -rc4.

-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-24 21:25         ` Dmitry Artamonow
@ 2009-11-25 16:53           ` Russell King - ARM Linux
  2009-11-25 17:48             ` Thomas Kunze
  0 siblings, 1 reply; 32+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 16:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 12:25:41AM +0300, Dmitry Artamonow wrote:
> Oh, and forgot to mention - your 'sa1100' branch is currently based on
> 2.6.32-rc3, you'll need to rebase it on more current -rc before applying
> my patches, because of 4918a0139 (ARM: 5752/1: SA1100: fix building of
> h3100), which went in -rc4.

Ok, sa1100 rebased; please submit your patch series to the patch system,
or alternatively if you have a git tree, base it off my sa1100 branch
and I'll pull that instead.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-25 16:53           ` Russell King - ARM Linux
@ 2009-11-25 17:48             ` Thomas Kunze
  2009-11-25 22:11               ` Russell King - ARM Linux
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Kunze @ 2009-11-25 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux schrieb:
> On Wed, Nov 25, 2009 at 12:25:41AM +0300, Dmitry Artamonow wrote:
>   
>> Oh, and forgot to mention - your 'sa1100' branch is currently based on
>> 2.6.32-rc3, you'll need to rebase it on more current -rc before applying
>> my patches, because of 4918a0139 (ARM: 5752/1: SA1100: fix building of
>> h3100), which went in -rc4.
>>     
>
> Ok, sa1100 rebased; please submit your patch series to the patch system,
> or alternatively if you have a git tree, base it off my sa1100 branch
> and I'll pull that instead.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>   
What about the collie patches? Should I do the same?

Regards,
Thomas

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-25 17:48             ` Thomas Kunze
@ 2009-11-25 22:11               ` Russell King - ARM Linux
  2009-11-27 20:44                 ` Thomas Kunze
  0 siblings, 1 reply; 32+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 22:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 06:48:05PM +0100, Thomas Kunze wrote:
> Russell King - ARM Linux schrieb:
>> On Wed, Nov 25, 2009 at 12:25:41AM +0300, Dmitry Artamonow wrote:
>>   
>>> Oh, and forgot to mention - your 'sa1100' branch is currently based on
>>> 2.6.32-rc3, you'll need to rebase it on more current -rc before applying
>>> my patches, because of 4918a0139 (ARM: 5752/1: SA1100: fix building of
>>> h3100), which went in -rc4.
>>>     
>>
>> Ok, sa1100 rebased; please submit your patch series to the patch system,
>> or alternatively if you have a git tree, base it off my sa1100 branch
>> and I'll pull that instead.
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>   
> What about the collie patches? Should I do the same?

Yes please.  I'd like to get all my outstanding branches sorted and
merged into the 'devel' stuff so it can sit in linux-next for a while
before the merge window.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-25 22:11               ` Russell King - ARM Linux
@ 2009-11-27 20:44                 ` Thomas Kunze
  2009-11-27 22:04                   ` Russell King - ARM Linux
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Kunze @ 2009-11-27 20:44 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux schrieb:
> On Wed, Nov 25, 2009 at 06:48:05PM +0100, Thomas Kunze wrote:
>   
>> Russell King - ARM Linux schrieb:
>>     
>>> On Wed, Nov 25, 2009 at 12:25:41AM +0300, Dmitry Artamonow wrote:
>>>   
>>>       
>>>> Oh, and forgot to mention - your 'sa1100' branch is currently based on
>>>> 2.6.32-rc3, you'll need to rebase it on more current -rc before applying
>>>> my patches, because of 4918a0139 (ARM: 5752/1: SA1100: fix building of
>>>> h3100), which went in -rc4.
>>>>     
>>>>         
>>> Ok, sa1100 rebased; please submit your patch series to the patch system,
>>> or alternatively if you have a git tree, base it off my sa1100 branch
>>> and I'll pull that instead.
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>>   
>>>       
>> What about the collie patches? Should I do the same?
>>     
>
> Yes please.  I'd like to get all my outstanding branches sorted and
> merged into the 'devel' stuff so it can sit in linux-next for a while
> before the merge window.
>
>   
Please pull the for-lak branch at 
git://git.linuxtogo.org/home/thesing/collie.git
It contains the collie patches on top of 2.6.32-rc8 (see 
http://git.linuxtogo.org/?p=thesing/collie.git;a=shortlog;h=refs/heads/for-lak)

Regards,
Thomas

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-27 20:44                 ` Thomas Kunze
@ 2009-11-27 22:04                   ` Russell King - ARM Linux
  2009-11-28 12:02                     ` Thomas Kunze
  0 siblings, 1 reply; 32+ messages in thread
From: Russell King - ARM Linux @ 2009-11-27 22:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 27, 2009 at 09:44:36PM +0100, Thomas Kunze wrote:
> Russell King - ARM Linux schrieb:
>> On Wed, Nov 25, 2009 at 06:48:05PM +0100, Thomas Kunze wrote:
>> Yes please.  I'd like to get all my outstanding branches sorted and
>> merged into the 'devel' stuff so it can sit in linux-next for a while
>> before the merge window.
>>   
> Please pull the for-lak branch at  
> git://git.linuxtogo.org/home/thesing/collie.git
> It contains the collie patches on top of 2.6.32-rc8 (see  
> http://git.linuxtogo.org/?p=thesing/collie.git;a=shortlog;h=refs/heads/for-lak)

In order to pull, I'd like to see at least a diffstat - you can get
this by:

git diff --stat origin...

assuming that you have an 'origin' branch which relates to Linus'
pristine kernel source.  This is so that I can confirm that I have
what you intended me to pull.

Even better would be to use something like git request-pull or something
which generates a substantially similar output.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33
  2009-11-27 22:04                   ` Russell King - ARM Linux
@ 2009-11-28 12:02                     ` Thomas Kunze
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Kunze @ 2009-11-28 12:02 UTC (permalink / raw)
  To: linux-arm-kernel

The following changes since commit 648f4e3e50c4793d9dbf9a09afa193631f76fa26:
  Linus Torvalds (1):
        Linux 2.6.32-rc8

are available in the git repository at:

  git://git.linuxtogo.org/home/thesing/collie.git for-lak

Thomas Kunze (9):
      collie: fix scoop convesion to new api
      collie: prepare for gpiolib use
      move drivers/mfd/*.h to include/linux/mfd
      collie: locomo-led change default trigger
      SA1100: make gpio_to_irq and reverse a macro
      add gpiolib support to ucb1x00
      collie: convert to gpiolib for ucb1x00
      collie: add battery driver
      collie: support pda_power driver

 arch/arm/mach-sa1100/collie.c              |   79 +++++-
 arch/arm/mach-sa1100/include/mach/collie.h |   77 +++---
 arch/arm/mach-sa1100/include/mach/gpio.h   |   19 +-
 arch/arm/mach-sa1100/include/mach/mcp.h    |    1 +
 drivers/leds/leds-locomo.c                 |    2 +-
 drivers/mfd/mcp-core.c                     |    2 +-
 drivers/mfd/mcp-sa11x0.c                   |    3 +-
 drivers/mfd/ucb1x00-assabet.c              |    2 +-
 drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
 drivers/mfd/ucb1x00-ts.c                   |    2 +-
 drivers/power/Kconfig                      |    7 +
 drivers/power/Makefile                     |    1 +
 drivers/power/collie_battery.c             |  418 
++++++++++++++++++++++++++++
 {drivers => include/linux}/mfd/mcp.h       |    3 +
 {drivers => include/linux}/mfd/ucb1x00.h   |    7 +-
 15 files changed, 649 insertions(+), 63 deletions(-)
 create mode 100644 drivers/power/collie_battery.c
 rename {drivers => include/linux}/mfd/mcp.h (97%)
 rename {drivers => include/linux}/mfd/ucb1x00.h (98%)

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2009-11-28 12:02 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-24 20:03 [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Dmitry Artamonow
2009-10-24 20:03 ` [PATCH 01/20] SA1100: h3100/h3600: mark *_mach_init functions as __init Dmitry Artamonow
2009-10-24 20:04   ` [PATCH 02/20] SA1100: h3100/h3600: remove dead links from Kconfig help text Dmitry Artamonow
2009-10-24 20:04     ` [PATCH 03/20] SA1100: h3600: remove IRDA bits from serial PM callback Dmitry Artamonow
2009-10-24 20:04       ` [PATCH 04/20] SA1100: h3600: remove unused cruft from h3600.h Dmitry Artamonow
2009-10-24 20:04         ` [PATCH 05/20] SA1100: h3600: stop setting direction for LCD pins Dmitry Artamonow
2009-10-24 20:04           ` [PATCH 06/20] pcmcia: convert sa1100_h3600 driver to gpiolib Dmitry Artamonow
2009-10-24 20:08             ` [PATCH 07/20] SA1100: h3100/h3600: separate machine-specific LCD helpers Dmitry Artamonow
2009-10-24 20:08               ` [PATCH 08/20] SA1100: h3100/h3600: add htc-egpio driver Dmitry Artamonow
2009-10-24 20:12                 ` [PATCH 09/20] SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib Dmitry Artamonow
2009-10-24 20:14                   ` [PATCH 10/20] SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers Dmitry Artamonow
2009-10-24 20:14                     ` [PATCH 11/20] SA1100: h3600: remove IRQ_GPIO_* definitions Dmitry Artamonow
2009-10-24 20:16                       ` [PATCH 12/20] SA1100: h3100/h3600: configure all unused gpios as inputs Dmitry Artamonow
2009-10-24 20:20                         ` [PATCH 13/20] SA1100: h3100/h3600: drop old GPIO definitions Dmitry Artamonow
2009-10-24 20:20                           ` [PATCH 14/20] SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h Dmitry Artamonow
2009-10-24 20:23                             ` [PATCH 15/20] SA1100: h3100/h3600: split h3600.c Dmitry Artamonow
2009-10-24 20:26                               ` [PATCH 16/20] SA1100: h3100/h3600: revise copyright boilerplates Dmitry Artamonow
2009-10-24 20:30                                 ` [PATCH 17/20] SA1100: h3100/h3600: clean up #includes Dmitry Artamonow
2009-10-24 20:30                                   ` [PATCH 18/20] SA1100: h3100/h3600: add support for gpio-keys Dmitry Artamonow
2009-10-24 20:37                                     ` [PATCH 19/20] SA1100: reuse h3600 PCMCIA driver on h3100 Dmitry Artamonow
2009-10-24 20:37                                       ` [PATCH 20/20] SA1100: h3600: update defconfig Dmitry Artamonow
2009-10-24 21:10 ` [PATCH 00/20] iPAQ h3100/h3600 work for 2.6.33 Russell King - ARM Linux
2009-10-25 15:36   ` Dmitry Artamonow
2009-11-15 17:30     ` Dmitry Artamonow
2009-11-23 20:39       ` Russell King - ARM Linux
2009-11-24 21:25         ` Dmitry Artamonow
2009-11-25 16:53           ` Russell King - ARM Linux
2009-11-25 17:48             ` Thomas Kunze
2009-11-25 22:11               ` Russell King - ARM Linux
2009-11-27 20:44                 ` Thomas Kunze
2009-11-27 22:04                   ` Russell King - ARM Linux
2009-11-28 12:02                     ` Thomas Kunze

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.