linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320
@ 2010-09-16  2:32 Marek Vasut
  2010-09-16  2:32 ` [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

PXA320 also supports PCMCIA/CF interface. This patch generalizes register access
in pxa2xx_pcmcia so the pxa320 is now supported as well.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 drivers/pcmcia/pxa2xx_base.c |   91 ++++++++++++++++++++++++++++++++----------
 1 files changed, 70 insertions(+), 21 deletions(-)

diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index ae07b4d..3eb76c8 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -84,6 +84,16 @@
 #define MCXX_ASST_SHIFT     (7)
 #define MCXX_HOLD_SHIFT     (14)
 
+#define	PXA2XX_SMC_BASE		(0x48000000)
+#define	PXA3XX_SMC_BASE		(0x4a000000)
+#define	MECR_OFFSET		(0x14)
+#define	MCMEM_OFFSET		(0x28)
+#define	MCATT_OFFSET		(0x30)
+#define	MCIO_OFFSET		(0x38)
+#define	MCIO_OFFSET		(0x38)
+
+static void __iomem *base;
+
 static inline u_int pxa2xx_mcxx_hold(u_int pcmcia_cycle_ns,
 				     u_int mem_clk_10khz)
 {
@@ -114,39 +124,57 @@ static inline u_int pxa2xx_pcmcia_cmd_time(u_int mem_clk_10khz,
 	return (300000 * (pcmcia_mcxx_asst + 1) / mem_clk_10khz);
 }
 
+static inline void pxa2xx_pcmcia_set_reg( uint32_t reg, uint32_t sock,
+					uint32_t val )
+{
+	writel(val, base + reg + (sock << 4));
+}
+
 static int pxa2xx_pcmcia_set_mcmem( int sock, int speed, int clock )
 {
-	MCMEM(sock) = ((pxa2xx_mcxx_setup(speed, clock)
+	uint32_t val;
+
+	val = ((pxa2xx_mcxx_setup(speed, clock)
 		& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
 		| ((pxa2xx_mcxx_asst(speed, clock)
 		& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
 		| ((pxa2xx_mcxx_hold(speed, clock)
 		& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
 
+	pxa2xx_pcmcia_set_reg(MCMEM_OFFSET, sock, val);
+
 	return 0;
 }
 
 static int pxa2xx_pcmcia_set_mcio( int sock, int speed, int clock )
 {
-	MCIO(sock) = ((pxa2xx_mcxx_setup(speed, clock)
+	uint32_t val;
+
+	val = ((pxa2xx_mcxx_setup(speed, clock)
 		& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
 		| ((pxa2xx_mcxx_asst(speed, clock)
 		& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
 		| ((pxa2xx_mcxx_hold(speed, clock)
 		& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
 
+	pxa2xx_pcmcia_set_reg(MCIO_OFFSET, sock, val);
+
 	return 0;
 }
 
 static int pxa2xx_pcmcia_set_mcatt( int sock, int speed, int clock )
 {
-	MCATT(sock) = ((pxa2xx_mcxx_setup(speed, clock)
+	uint32_t val;
+
+	val = ((pxa2xx_mcxx_setup(speed, clock)
 		& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
 		| ((pxa2xx_mcxx_asst(speed, clock)
 		& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
 		| ((pxa2xx_mcxx_hold(speed, clock)
 		& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
 
+	pxa2xx_pcmcia_set_reg(MCATT_OFFSET, sock, val);
+
 	return 0;
 }
 
@@ -205,19 +233,18 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
 static void pxa2xx_configure_sockets(struct device *dev)
 {
 	struct pcmcia_low_level *ops = dev->platform_data;
-
 	/*
 	 * We have at least one socket, so set MECR:CIT
 	 * (Card Is There)
 	 */
-	MECR |= MECR_CIT;
+	uint32_t mecr = MECR_CIT;
 
 	/* Set MECR:NOS (Number Of Sockets) */
 	if ((ops->first + ops->nr) > 1 ||
 	    machine_is_viper() || machine_is_arcom_zeus())
-		MECR |= MECR_NOS;
-	else
-		MECR &= ~MECR_NOS;
+		mecr |= MECR_NOS;
+
+	pxa2xx_pcmcia_set_reg(MECR_OFFSET, 0, mecr);
 }
 
 static const char *skt_names[] = {
@@ -270,16 +297,34 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
 	struct pcmcia_low_level *ops;
 	struct skt_dev_info *sinfo;
 	struct soc_pcmcia_socket *skt;
+	uint32_t smc_addr;
 
 	ops = (struct pcmcia_low_level *)dev->dev.platform_data;
-	if (!ops)
-		return -ENODEV;
+	if (!ops) {
+		ret = -ENODEV;
+		goto err0;
+	}
+
+	if (cpu_is_pxa320() && ops->nr > 1) {
+		dev_err(&dev->dev, "pxa320 supports only one pcmcia slot");
+		ret = -EINVAL;
+		goto err0;
+	}
 
 	pxa2xx_drv_pcmcia_ops(ops);
 
+	smc_addr = cpu_is_pxa320() ? PXA3XX_SMC_BASE : PXA2XX_SMC_BASE;
+	base = ioremap(smc_addr, 0x100);
+	if (!base) {
+		ret = -ENOMEM;
+		goto err0;
+	}
+
 	sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
-	if (!sinfo)
-		return -ENOMEM;
+	if (!sinfo) {
+		ret = -ENOMEM;
+		goto err1;
+	}
 
 	sinfo->nskt = ops->nr;
 
@@ -295,18 +340,21 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
 
 		ret = pxa2xx_drv_pcmcia_add_one(skt);
 		if (ret)
-			break;
+			goto err2;
 	}
 
-	if (ret) {
-		while (--i >= 0)
-			soc_pcmcia_remove_one(&sinfo->skt[i]);
-		kfree(sinfo);
-	} else {
-		pxa2xx_configure_sockets(&dev->dev);
-		dev_set_drvdata(&dev->dev, sinfo);
-	}
+	pxa2xx_configure_sockets(&dev->dev);
+	dev_set_drvdata(&dev->dev, sinfo);
+
+	return 0;
 
+err2:
+	while (--i >= 0)
+		soc_pcmcia_remove_one(&sinfo->skt[i]);
+	kfree(sinfo);
+err1:
+	iounmap(base);
+err0:
 	return ret;
 }
 
@@ -321,6 +369,7 @@ static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
 		soc_pcmcia_remove_one(&sinfo->skt[i]);
 
 	kfree(sinfo);
+	iounmap(base);
 	return 0;
 }
 
-- 
1.7.1

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

* [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:16   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files Marek Vasut
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

This driver also contains structures to eventually support PXA320. This is
planned to be added in a later patch.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   18 ++
 drivers/pcmcia/Kconfig                       |    2 +-
 drivers/pcmcia/Makefile                      |    1 +
 drivers/pcmcia/pxa2xx_colibri.c              |  214 ++++++++++++++++++++++++++
 4 files changed, 234 insertions(+), 1 deletions(-)
 create mode 100644 drivers/pcmcia/pxa2xx_colibri.c

diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
index 0f3b632..6177ff5 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
@@ -51,6 +51,24 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
 	GPIO89_USBH1_PEN,
 	GPIO119_USBH2_PWR,
 	GPIO120_USBH2_PEN,
+
+	/* PCMCIA */
+	GPIO85_nPCE_1,
+	GPIO54_nPCE_2,
+	GPIO55_nPREG,
+	GPIO50_nPIOR,
+	GPIO51_nPIOW,
+	GPIO49_nPWE,
+	GPIO48_nPOE,
+	GPIO57_nIOIS16,
+	GPIO56_nPWAIT,
+	GPIO104_PSKTSEL,
+	GPIO53_GPIO,	/* RESET */
+	GPIO83_GPIO,	/* BVD1 */
+	GPIO82_GPIO,	/* BVD2 */
+	GPIO1_GPIO,	/* READY */
+	GPIO84_GPIO,	/* DETECT */
+	GPIO107_GPIO,	/* PPEN */
 };
 
 /******************************************************************************
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index c80a7a6..e9acf03 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -215,7 +215,7 @@ config PCMCIA_PXA2XX
 	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
 		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
 		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
-		    || MACH_VPAC270 || MACH_BALLOON3)
+		    || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
 	select PCMCIA_SOC_COMMON
 	help
 	  Say Y here to include support for the PXA2xx PCMCIA controller
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 8d9386a..2fee7ef 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -70,6 +70,7 @@ pxa2xx-obj-$(CONFIG_MACH_E740)			+= pxa2xx_e740.o
 pxa2xx-obj-$(CONFIG_MACH_STARGATE2)		+= pxa2xx_stargate2.o
 pxa2xx-obj-$(CONFIG_MACH_VPAC270)		+= pxa2xx_vpac270.o
 pxa2xx-obj-$(CONFIG_MACH_BALLOON3)		+= pxa2xx_balloon3.o
+pxa2xx-obj-$(CONFIG_MACH_COLIBRI)		+= pxa2xx_colibri.o
 
 obj-$(CONFIG_PCMCIA_PXA2XX)			+= pxa2xx_base.o $(pxa2xx-obj-y)
 
diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c
new file mode 100644
index 0000000..4ed876c
--- /dev/null
+++ b/drivers/pcmcia/pxa2xx_colibri.c
@@ -0,0 +1,214 @@
+/*
+ * linux/drivers/pcmcia/pxa2xx_colibri.c
+ *
+ * Driver for Toradex Colibri PXA270 CF socket
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+
+#include "soc_common.h"
+
+#define	COLIBRI270_RESET_GPIO	53
+#define	COLIBRI270_PPEN_GPIO	107
+#define	COLIBRI270_BVD1_GPIO	83
+#define	COLIBRI270_BVD2_GPIO	82
+#define	COLIBRI270_DETECT_GPIO	84
+#define	COLIBRI270_READY_GPIO	1
+
+static struct {
+	int	reset_gpio;
+	int	ppen_gpio;
+	int	bvd1_gpio;
+	int	bvd2_gpio;
+	int	detect_gpio;
+	int	ready_gpio;
+} colibri_pcmcia_gpio;
+
+static struct pcmcia_irqs colibri_irqs[] = {
+	{
+		.sock = 0,
+		.str  = "PCMCIA CD"
+	},
+};
+
+static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+	int ret;
+
+	ret = gpio_request(colibri_pcmcia_gpio.detect_gpio, "DETECT");
+	if (ret)
+		goto err1;
+	ret = gpio_direction_input(colibri_pcmcia_gpio.detect_gpio);
+	if (ret)
+		goto err2;
+
+	ret = gpio_request(colibri_pcmcia_gpio.ready_gpio, "READY");
+	if (ret)
+		goto err2;
+	ret = gpio_direction_input(colibri_pcmcia_gpio.ready_gpio);
+	if (ret)
+		goto err3;
+
+	ret = gpio_request(colibri_pcmcia_gpio.bvd1_gpio, "BVD1");
+	if (ret)
+		goto err3;
+	ret = gpio_direction_input(colibri_pcmcia_gpio.bvd1_gpio);
+	if (ret)
+		goto err4;
+
+	ret = gpio_request(colibri_pcmcia_gpio.bvd2_gpio, "BVD2");
+	if (ret)
+		goto err4;
+	ret = gpio_direction_input(colibri_pcmcia_gpio.bvd2_gpio);
+	if (ret)
+		goto err5;
+
+	ret = gpio_request(colibri_pcmcia_gpio.ppen_gpio, "PPEN");
+	if (ret)
+		goto err5;
+	ret = gpio_direction_output(colibri_pcmcia_gpio.ppen_gpio, 0);
+	if (ret)
+		goto err6;
+
+	ret = gpio_request(colibri_pcmcia_gpio.reset_gpio, "RESET");
+	if (ret)
+		goto err6;
+	ret = gpio_direction_output(colibri_pcmcia_gpio.reset_gpio, 1);
+	if (ret)
+		goto err7;
+
+	colibri_irqs[0].irq = gpio_to_irq(colibri_pcmcia_gpio.detect_gpio);
+	skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpio.ready_gpio);
+
+	return soc_pcmcia_request_irqs(skt, colibri_irqs,
+					ARRAY_SIZE(colibri_irqs));
+
+err7:
+	gpio_free(colibri_pcmcia_gpio.detect_gpio);
+err6:
+	gpio_free(colibri_pcmcia_gpio.ready_gpio);
+err5:
+	gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
+err4:
+	gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
+err3:
+	gpio_free(colibri_pcmcia_gpio.reset_gpio);
+err2:
+	gpio_free(colibri_pcmcia_gpio.ppen_gpio);
+err1:
+	return ret;
+}
+
+static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+{
+	gpio_free(colibri_pcmcia_gpio.detect_gpio);
+	gpio_free(colibri_pcmcia_gpio.ready_gpio);
+	gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
+	gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
+	gpio_free(colibri_pcmcia_gpio.reset_gpio);
+	gpio_free(colibri_pcmcia_gpio.ppen_gpio);
+}
+
+static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+					struct pcmcia_state *state)
+{
+
+	state->detect = !!gpio_get_value(colibri_pcmcia_gpio.detect_gpio);
+	state->ready  = !!gpio_get_value(colibri_pcmcia_gpio.ready_gpio);
+	state->bvd1   = !!gpio_get_value(colibri_pcmcia_gpio.bvd1_gpio);
+	state->bvd2   = !!gpio_get_value(colibri_pcmcia_gpio.bvd2_gpio);
+	state->wrprot = 0;
+	state->vs_3v  = 1;
+	state->vs_Xv  = 0;
+}
+
+static int
+colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+				const socket_state_t *state)
+{
+	gpio_set_value(colibri_pcmcia_gpio.ppen_gpio,
+			!(state->Vcc == 33 && state->Vpp < 50));
+	gpio_set_value(colibri_pcmcia_gpio.reset_gpio, state->flags & SS_RESET);
+	return 0;
+}
+
+static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+}
+
+static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+}
+
+static struct pcmcia_low_level colibri_pcmcia_ops = {
+	.owner			= THIS_MODULE,
+
+	.first			= 0,
+	.nr			= 1,
+
+	.hw_init		= colibri_pcmcia_hw_init,
+	.hw_shutdown		= colibri_pcmcia_hw_shutdown,
+
+	.socket_state		= colibri_pcmcia_socket_state,
+	.configure_socket	= colibri_pcmcia_configure_socket,
+
+	.socket_init		= colibri_pcmcia_socket_init,
+	.socket_suspend		= colibri_pcmcia_socket_suspend,
+};
+
+static struct platform_device *colibri_pcmcia_device;
+
+static int __init colibri_pcmcia_init(void)
+{
+	int ret;
+
+	colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+	if (!colibri_pcmcia_device)
+		return -ENOMEM;
+
+	/* Colibri PXA270 */
+	if (machine_is_colibri()) {
+		colibri_pcmcia_gpio.reset_gpio	= COLIBRI270_RESET_GPIO;
+		colibri_pcmcia_gpio.ppen_gpio	= COLIBRI270_PPEN_GPIO;
+		colibri_pcmcia_gpio.bvd1_gpio	= COLIBRI270_BVD1_GPIO;
+		colibri_pcmcia_gpio.bvd2_gpio	= COLIBRI270_BVD2_GPIO;
+		colibri_pcmcia_gpio.detect_gpio	= COLIBRI270_DETECT_GPIO;
+		colibri_pcmcia_gpio.ready_gpio	= COLIBRI270_READY_GPIO;
+	}
+
+	ret = platform_device_add_data(colibri_pcmcia_device,
+		&colibri_pcmcia_ops, sizeof(colibri_pcmcia_ops));
+
+	if (!ret)
+		ret = platform_device_add(colibri_pcmcia_device);
+
+	if (ret)
+		platform_device_put(colibri_pcmcia_device);
+
+	return ret;
+}
+
+static void __exit colibri_pcmcia_exit(void)
+{
+	platform_device_unregister(colibri_pcmcia_device);
+}
+
+module_init(colibri_pcmcia_init);
+module_exit(colibri_pcmcia_exit);
+
+MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
+MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
+MODULE_ALIAS("platform:pxa2xx-pcmcia");
+MODULE_LICENSE("GPL");
-- 
1.7.1

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

* [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
  2010-09-16  2:32 ` [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:29   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard Marek Vasut
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

This change -- pushing the MFP configuration back into Module files -- is
necessary because some evalboards can be used with multiple modules, where MFP
differs from module to module. Therefore MFP isn't board-specific, but
module-specific and the module should preconfigure itself for the board.

(And there is also the C preprocesor limitation and conflicting #define-s)

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/Kconfig                    |    8 +-
 arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   61 ++++-----------
 arch/arm/mach-pxa/colibri-pxa270-income.c    |   47 -----------
 arch/arm/mach-pxa/colibri-pxa270.c           |   96 ++++++++++++++++++++++
 arch/arm/mach-pxa/colibri-pxa300.c           |   61 ++++++---------
 arch/arm/mach-pxa/colibri-pxa320.c           |  112 ++++++++++----------------
 arch/arm/mach-pxa/colibri-pxa3xx.c           |   49 -----------
 arch/arm/mach-pxa/include/mach/colibri.h     |    6 ++
 8 files changed, 188 insertions(+), 252 deletions(-)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index dd235ec..b44d613 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -232,10 +232,6 @@ config MACH_COLIBRI
 	bool "Toradex Colibri PXA270"
 	select PXA27x
 
-config MACH_COLIBRI_PXA270_EVALBOARD
-	bool "Toradex Colibri Evaluation Carrier Board support (PXA270)"
-	depends on MACH_COLIBRI
-
 config MACH_COLIBRI_PXA270_INCOME
 	bool "Income s.r.o. PXA270 SBC"
 	depends on MACH_COLIBRI
@@ -253,6 +249,10 @@ config MACH_COLIBRI320
 	select PXA3xx
 	select CPU_PXA320
 
+config MACH_COLIBRI_PXA270_EVALBOARD
+	bool "Toradex Colibri Evaluation Carrier Board support"
+	depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
+
 config MACH_VPAC270
 	bool "Voipac PXA270"
 	select PXA27x
diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
index 6177ff5..e1a2b52 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
@@ -30,61 +30,28 @@
 #include "devices.h"
 
 /******************************************************************************
- * Pin configuration
- ******************************************************************************/
-static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
-	/* MMC */
-	GPIO32_MMC_CLK,
-	GPIO92_MMC_DAT_0,
-	GPIO109_MMC_DAT_1,
-	GPIO110_MMC_DAT_2,
-	GPIO111_MMC_DAT_3,
-	GPIO112_MMC_CMD,
-	GPIO0_GPIO,	/* SD detect */
-
-	/* FFUART */
-	GPIO39_FFUART_TXD,
-	GPIO34_FFUART_RXD,
-
-	/* UHC */
-	GPIO88_USBH1_PWR,
-	GPIO89_USBH1_PEN,
-	GPIO119_USBH2_PWR,
-	GPIO120_USBH2_PEN,
-
-	/* PCMCIA */
-	GPIO85_nPCE_1,
-	GPIO54_nPCE_2,
-	GPIO55_nPREG,
-	GPIO50_nPIOR,
-	GPIO51_nPIOW,
-	GPIO49_nPWE,
-	GPIO48_nPOE,
-	GPIO57_nIOIS16,
-	GPIO56_nPWAIT,
-	GPIO104_PSKTSEL,
-	GPIO53_GPIO,	/* RESET */
-	GPIO83_GPIO,	/* BVD1 */
-	GPIO82_GPIO,	/* BVD2 */
-	GPIO1_GPIO,	/* READY */
-	GPIO84_GPIO,	/* DETECT */
-	GPIO107_GPIO,	/* PPEN */
-};
-
-/******************************************************************************
  * SD/MMC card controller
  ******************************************************************************/
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
 	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
 	.gpio_power		= -1,
-	.gpio_card_detect	= GPIO0_COLIBRI_PXA270_SD_DETECT,
 	.gpio_card_ro		= -1,
 	.detect_delay_ms	= 200,
 };
 
 static void __init colibri_pxa270_mmc_init(void)
 {
+	if (machine_is_colibri())	/* PXA270 Colibri */
+		colibri_pxa270_mci_platform_data.gpio_card_detect =
+			GPIO0_COLIBRI_PXA270_SD_DETECT;
+	if (machine_is_colibri300())	/* PXA300 Colibri */
+		colibri_pxa270_mci_platform_data.gpio_card_detect =
+			GPIO39_COLIBRI_PXA300_SD_DETECT;
+	else				/* PXA320 Colibri */
+		colibri_pxa270_mci_platform_data.gpio_card_detect =
+			GPIO28_COLIBRI_PXA320_SD_DETECT;
+
 	pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
 }
 #else
@@ -103,13 +70,17 @@ static int colibri_pxa270_ohci_init(struct device *dev)
 
 static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
 	.port_mode	= PMM_PERPORT_MODE,
-	.flags		= ENABLE_PORT1 | ENABLE_PORT2 |
+	.flags		= ENABLE_PORT1 |
 			  POWER_CONTROL_LOW | POWER_SENSE_LOW,
 	.init		= colibri_pxa270_ohci_init,
 };
 
 static void __init colibri_pxa270_uhc_init(void)
 {
+	/* Colibri PXA270 has two usb ports, TBA for 320 */
+	if (machine_is_colibri())
+		colibri_pxa270_ohci_info.flags	|= ENABLE_PORT2;
+
 	pxa_set_ohci_info(&colibri_pxa270_ohci_info);
 }
 #else
@@ -118,7 +89,6 @@ static inline void colibri_pxa270_uhc_init(void) {}
 
 void __init colibri_pxa270_evalboard_init(void)
 {
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_evalboard_pin_config));
 	pxa_set_ffuart_info(NULL);
 	pxa_set_btuart_info(NULL);
 	pxa_set_stuart_info(NULL);
@@ -126,4 +96,3 @@ void __init colibri_pxa270_evalboard_init(void)
 	colibri_pxa270_mmc_init();
 	colibri_pxa270_uhc_init();
 }
-
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c
index 37f0f3e..07b62a0 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-income.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-income.c
@@ -46,52 +46,6 @@
 #define GPIO113_INCOME_TS_IRQ   (113)
 
 /******************************************************************************
- * Pin configuration
- ******************************************************************************/
-static mfp_cfg_t income_pin_config[] __initdata = {
-	/* MMC */
-	GPIO32_MMC_CLK,
-	GPIO92_MMC_DAT_0,
-	GPIO109_MMC_DAT_1,
-	GPIO110_MMC_DAT_2,
-	GPIO111_MMC_DAT_3,
-	GPIO112_MMC_CMD,
-	GPIO0_GPIO,	/* SD detect */
-	GPIO1_GPIO,	/* SD read-only */
-
-	/* FFUART */
-	GPIO39_FFUART_TXD,
-	GPIO34_FFUART_RXD,
-
-	/* BFUART */
-	GPIO42_BTUART_RXD,
-	GPIO43_BTUART_TXD,
-	GPIO45_BTUART_RTS,
-
-	/* STUART */
-	GPIO46_STUART_RXD,
-	GPIO47_STUART_TXD,
-
-	/* UHC */
-	GPIO88_USBH1_PWR,
-	GPIO89_USBH1_PEN,
-
-	/* LCD */
-	GPIOxx_LCD_TFT_16BPP,
-
-	/* PWM */
-	GPIO16_PWM0_OUT,
-
-	/* I2C */
-	GPIO117_I2C_SCL,
-	GPIO118_I2C_SDA,
-
-	/* LED */
-	GPIO54_GPIO,	/* LED A */
-	GPIO55_GPIO,	/* LED B */
-};
-
-/******************************************************************************
  * SD/MMC card controller
  ******************************************************************************/
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
@@ -257,7 +211,6 @@ static inline void income_pwm_init(void) {}
 
 void __init colibri_pxa270_income_boardinit(void)
 {
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
 	pxa_set_ffuart_info(NULL);
 	pxa_set_btuart_info(NULL);
 	pxa_set_stuart_info(NULL);
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 98673ac..8488dfe 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -33,6 +33,99 @@
 #include "generic.h"
 
 /******************************************************************************
+ * Evaluation board MFP
+ ******************************************************************************/
+#ifdef	 CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
+	/* MMC */
+	GPIO32_MMC_CLK,
+	GPIO92_MMC_DAT_0,
+	GPIO109_MMC_DAT_1,
+	GPIO110_MMC_DAT_2,
+	GPIO111_MMC_DAT_3,
+	GPIO112_MMC_CMD,
+	GPIO0_GPIO,	/* SD detect */
+
+	/* FFUART */
+	GPIO39_FFUART_TXD,
+	GPIO34_FFUART_RXD,
+
+	/* UHC */
+	GPIO88_USBH1_PWR,
+	GPIO89_USBH1_PEN,
+	GPIO119_USBH2_PWR,
+	GPIO120_USBH2_PEN,
+
+	/* PCMCIA */
+	GPIO85_nPCE_1,
+	GPIO54_nPCE_2,
+	GPIO55_nPREG,
+	GPIO50_nPIOR,
+	GPIO51_nPIOW,
+	GPIO49_nPWE,
+	GPIO48_nPOE,
+	GPIO57_nIOIS16,
+	GPIO56_nPWAIT,
+	GPIO104_PSKTSEL,
+	GPIO53_GPIO,	/* RESET */
+	GPIO83_GPIO,	/* BVD1 */
+	GPIO82_GPIO,	/* BVD2 */
+	GPIO1_GPIO,	/* READY */
+	GPIO84_GPIO,	/* DETECT */
+	GPIO107_GPIO,	/* PPEN */
+};
+#else
+static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
+#endif
+
+#ifdef	CONFIG_MACH_COLIBRI_PXA270_INCOME
+static mfp_cfg_t income_pin_config[] __initdata = {
+	/* MMC */
+	GPIO32_MMC_CLK,
+	GPIO92_MMC_DAT_0,
+	GPIO109_MMC_DAT_1,
+	GPIO110_MMC_DAT_2,
+	GPIO111_MMC_DAT_3,
+	GPIO112_MMC_CMD,
+	GPIO0_GPIO,	/* SD detect */
+	GPIO1_GPIO,	/* SD read-only */
+
+	/* FFUART */
+	GPIO39_FFUART_TXD,
+	GPIO34_FFUART_RXD,
+
+	/* BFUART */
+	GPIO42_BTUART_RXD,
+	GPIO43_BTUART_TXD,
+	GPIO45_BTUART_RTS,
+
+	/* STUART */
+	GPIO46_STUART_RXD,
+	GPIO47_STUART_TXD,
+
+	/* UHC */
+	GPIO88_USBH1_PWR,
+	GPIO89_USBH1_PEN,
+
+	/* LCD */
+	GPIOxx_LCD_TFT_16BPP,
+
+	/* PWM */
+	GPIO16_PWM0_OUT,
+
+	/* I2C */
+	GPIO117_I2C_SCL,
+	GPIO118_I2C_SDA,
+
+	/* LED */
+	GPIO54_GPIO,	/* LED A */
+	GPIO55_GPIO,	/* LED B */
+};
+#else
+static mfp_cfg_t income_pin_config[] __initdata = {};
+#endif
+
+/******************************************************************************
  * Pin configuration
  ******************************************************************************/
 static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
@@ -185,9 +278,12 @@ static void __init colibri_pxa270_init(void)
 
 	switch (colibri_pxa270_baseboard) {
 	case COLIBRI_PXA270_EVALBOARD:
+		pxa2xx_mfp_config(ARRAY_AND_SIZE(
+			colibri_pxa270_evalboard_pin_config));
 		colibri_pxa270_evalboard_init();
 		break;
 	case COLIBRI_PXA270_INCOME:
+		pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
 		colibri_pxa270_income_boardinit();
 		break;
 	default:
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 40b6ac2..dab49ce 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -31,9 +31,28 @@
 #include "generic.h"
 #include "devices.h"
 
+
+#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
+	/* MMC */
+	GPIO7_MMC1_CLK,
+	GPIO14_MMC1_CMD,
+	GPIO3_MMC1_DAT0,
+	GPIO4_MMC1_DAT1,
+	GPIO5_MMC1_DAT2,
+	GPIO6_MMC1_DAT3,
+	GPIO39_GPIO,	/* SD detect */
+
+	/* UHC */
+	GPIO0_2_USBH_PEN,
+	GPIO1_2_USBH_PWR,
+};
+#else
+static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
+#endif
+
 #if defined(CONFIG_AX88796)
 #define COLIBRI_ETH_IRQ_GPIO	mfp_to_gpio(GPIO26_GPIO)
-
 /*
  * Asix AX88796 Ethernet
  */
@@ -80,35 +99,6 @@ static void __init colibri_pxa300_init_eth(void)
 static inline void __init colibri_pxa300_init_eth(void) {}
 #endif /* CONFIG_AX88796 */
 
-#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-static mfp_cfg_t colibri_pxa300_usb_pin_config[] __initdata = {
-	GPIO0_2_USBH_PEN,
-	GPIO1_2_USBH_PWR,
-};
-
-static struct pxaohci_platform_data colibri_pxa300_ohci_info = {
-	.port_mode	= PMM_GLOBAL_MODE,
-	.flags		= ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
-};
-
-void __init colibri_pxa300_init_ohci(void)
-{
-	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_usb_pin_config));
-	pxa_set_ohci_info(&colibri_pxa300_ohci_info);
-}
-#else
-static inline void colibri_pxa300_init_ohci(void) {}
-#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
-
-static mfp_cfg_t colibri_pxa300_mmc_pin_config[] __initdata = {
-	GPIO7_MMC1_CLK,
-	GPIO14_MMC1_CMD,
-	GPIO3_MMC1_DAT0,
-	GPIO4_MMC1_DAT1,
-	GPIO5_MMC1_DAT2,
-	GPIO6_MMC1_DAT3,
-};
-
 #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
 static mfp_cfg_t colibri_pxa300_lcd_pin_config[] __initdata = {
 	GPIO54_LCD_LDD_0,
@@ -171,18 +161,15 @@ static inline void colibri_pxa310_init_ac97(void) {}
 
 void __init colibri_pxa300_init(void)
 {
-	pxa_set_ffuart_info(NULL);
-	pxa_set_btuart_info(NULL);
-	pxa_set_stuart_info(NULL);
-
 	colibri_pxa300_init_eth();
-	colibri_pxa300_init_ohci();
 	colibri_pxa3xx_init_nand();
 	colibri_pxa300_init_lcd();
 	colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
 	colibri_pxa310_init_ac97();
-	colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa300_mmc_pin_config),
-				mfp_to_gpio(MFP_PIN_GPIO13));
+
+	/* Evalboard init */
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
+	colibri_pxa270_evalboard_init();
 }
 
 MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 99e850d..e886ab2 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -35,9 +35,47 @@
 #include "generic.h"
 #include "devices.h"
 
+#ifdef	CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
+	/* MMC */
+	GPIO22_MMC1_CLK,
+	GPIO23_MMC1_CMD,
+	GPIO18_MMC1_DAT0,
+	GPIO19_MMC1_DAT1,
+	GPIO20_MMC1_DAT2,
+	GPIO21_MMC1_DAT3,
+	GPIO28_GPIO,	/* SD detect */
+
+	/* UART 1 configuration (may be set by bootloader) */
+	GPIO99_UART1_CTS,
+	GPIO104_UART1_RTS,
+	GPIO97_UART1_RXD,
+	GPIO98_UART1_TXD,
+	GPIO101_UART1_DTR,
+	GPIO103_UART1_DSR,
+	GPIO100_UART1_DCD,
+	GPIO102_UART1_RI,
+
+	/* UART 2 configuration */
+	GPIO109_UART2_CTS,
+	GPIO112_UART2_RTS,
+	GPIO110_UART2_RXD,
+	GPIO111_UART2_TXD,
+
+	/* UART 3 configuration */
+	GPIO30_UART3_RXD,
+	GPIO31_UART3_TXD,
+
+	/* UHC */
+	GPIO2_2_USBH_PEN,
+	GPIO3_2_USBH_PWR,
+};
+#else
+static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
+#endif
+
 #if defined(CONFIG_AX88796)
 #define COLIBRI_ETH_IRQ_GPIO	mfp_to_gpio(GPIO36_GPIO)
-
 /*
  * Asix AX88796 Ethernet
  */
@@ -84,26 +122,6 @@ static void __init colibri_pxa320_init_eth(void)
 static inline void __init colibri_pxa320_init_eth(void) {}
 #endif /* CONFIG_AX88796 */
 
-#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-static mfp_cfg_t colibri_pxa320_usb_pin_config[] __initdata = {
-	GPIO2_2_USBH_PEN,
-	GPIO3_2_USBH_PWR,
-};
-
-static struct pxaohci_platform_data colibri_pxa320_ohci_info = {
-	.port_mode	= PMM_GLOBAL_MODE,
-	.flags		= ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
-};
-
-void __init colibri_pxa320_init_ohci(void)
-{
-	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_usb_pin_config));
-	pxa_set_ohci_info(&colibri_pxa320_ohci_info);
-}
-#else
-static inline void colibri_pxa320_init_ohci(void) {}
-#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
-
 #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE)
 static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = {
 	.gpio_vbus		= mfp_to_gpio(MFP_PIN_GPIO96),
@@ -140,15 +158,6 @@ static void __init colibri_pxa320_init_udc(void)
 static inline void colibri_pxa320_init_udc(void) {}
 #endif
 
-static mfp_cfg_t colibri_pxa320_mmc_pin_config[] __initdata = {
-	GPIO22_MMC1_CLK,
-	GPIO23_MMC1_CMD,
-	GPIO18_MMC1_DAT0,
-	GPIO19_MMC1_DAT1,
-	GPIO20_MMC1_DAT2,
-	GPIO21_MMC1_DAT3
-};
-
 #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
 static mfp_cfg_t colibri_pxa320_lcd_pin_config[] __initdata = {
 	GPIO6_2_LCD_LDD_0,
@@ -205,53 +214,18 @@ static inline void __init colibri_pxa320_init_ac97(void)
 static inline void colibri_pxa320_init_ac97(void) {}
 #endif
 
-/*
- * The following configuration is verified to work with the Toradex Orchid
- * carrier board
- */
-static mfp_cfg_t colibri_pxa320_uart_pin_config[] __initdata = {
-	/* UART 1 configuration (may be set by bootloader) */
-	GPIO99_UART1_CTS,
-	GPIO104_UART1_RTS,
-	GPIO97_UART1_RXD,
-	GPIO98_UART1_TXD,
-	GPIO101_UART1_DTR,
-	GPIO103_UART1_DSR,
-	GPIO100_UART1_DCD,
-	GPIO102_UART1_RI,
-
-	/* UART 2 configuration */
-	GPIO109_UART2_CTS,
-	GPIO112_UART2_RTS,
-	GPIO110_UART2_RXD,
-	GPIO111_UART2_TXD,
-
-	/* UART 3 configuration */
-	GPIO30_UART3_RXD,
-	GPIO31_UART3_TXD,
-};
-
-static void __init colibri_pxa320_init_uart(void)
-{
-	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_uart_pin_config));
-}
-
 void __init colibri_pxa320_init(void)
 {
-	pxa_set_ffuart_info(NULL);
-	pxa_set_btuart_info(NULL);
-	pxa_set_stuart_info(NULL);
-
 	colibri_pxa320_init_eth();
-	colibri_pxa320_init_ohci();
 	colibri_pxa3xx_init_nand();
 	colibri_pxa320_init_lcd();
 	colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
 	colibri_pxa320_init_ac97();
-	colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config),
-				mfp_to_gpio(MFP_PIN_GPIO28));
-	colibri_pxa320_init_uart();
 	colibri_pxa320_init_udc();
+
+	/* Evalboard init */
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
+	colibri_pxa270_evalboard_init();
 }
 
 MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index 199afa2..96b2d9f 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -64,55 +64,6 @@ void __init colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data)
 }
 #endif
 
-#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
-static int mmc_detect_pin;
-
-static int colibri_pxa3xx_mci_init(struct device *dev,
-				   irq_handler_t colibri_mmc_detect_int,
-				   void *data)
-{
-	int ret;
-
-	ret = gpio_request(mmc_detect_pin, "mmc card detect");
-	if (ret)
-		return ret;
-
-	gpio_direction_input(mmc_detect_pin);
-	ret = request_irq(gpio_to_irq(mmc_detect_pin), colibri_mmc_detect_int,
-			  IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
-			  "MMC card detect", data);
-	if (ret) {
-		gpio_free(mmc_detect_pin);
-		return ret;
-	}
-
-	return 0;
-}
-
-static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
-{
-	free_irq(mmc_detect_pin, data);
-	gpio_free(gpio_to_irq(mmc_detect_pin));
-}
-
-static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
-	.detect_delay_ms	= 200,
-	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
-	.init			= colibri_pxa3xx_mci_init,
-	.exit			= colibri_pxa3xx_mci_exit,
-	.gpio_card_detect	= -1,
-	.gpio_card_ro		= -1,
-	.gpio_power		= -1,
-};
-
-void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
-{
-	pxa3xx_mfp_config(pins, len);
-	mmc_detect_pin = detect_pin;
-	pxa_set_mci_info(&colibri_pxa3xx_mci_platform_data);
-}
-#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */
-
 #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
 static int lcd_bl_pin;
 
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index 58dada1..63a948a 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -59,5 +59,11 @@ static inline void colibri_pxa3xx_init_nand(void) {}
 #define GPIO0_COLIBRI_PXA270_SD_DETECT	0
 #define GPIO113_COLIBRI_PXA270_TS_IRQ	113
 
+/* GPIO definitions for Colibri PXA300/310 */
+#define GPIO39_COLIBRI_PXA300_SD_DETECT	39
+
+/* GPIO definitions for Colibri PXA320 */
+#define GPIO28_COLIBRI_PXA320_SD_DETECT	28
+
 #endif /* _COLIBRI_H_ */
 
-- 
1.7.1

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

* [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
  2010-09-16  2:32 ` [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
  2010-09-16  2:32 ` [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:40   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 05/11] ARM: pxa: Rename " Marek Vasut
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   23 +++++++++++++++++++++++
 arch/arm/mach-pxa/colibri-pxa270.c           |    4 ++++
 arch/arm/mach-pxa/colibri-pxa300.c           |    4 ++++
 arch/arm/mach-pxa/colibri-pxa320.c           |    4 ++++
 4 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
index e1a2b52..7f27aec 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
@@ -19,6 +19,7 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/mach/arch.h>
+#include <linux/i2c.h>
 
 #include <mach/pxa27x.h>
 #include <mach/colibri.h>
@@ -26,6 +27,8 @@
 #include <mach/ohci.h>
 #include <mach/pxa27x-udc.h>
 
+#include <plat/i2c.h>
+
 #include "generic.h"
 #include "devices.h"
 
@@ -87,6 +90,25 @@ static void __init colibri_pxa270_uhc_init(void)
 static inline void colibri_pxa270_uhc_init(void) {}
 #endif
 
+/******************************************************************************
+ * I2C RTC
+ ******************************************************************************/
+#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
+static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
+	{
+		I2C_BOARD_INFO("m41t00", 0x68),
+	},
+};
+
+static void __init colibri_pxa270_rtc_init(void)
+{
+	pxa_set_i2c_info(NULL);
+	i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
+}
+#else
+static inline void colibri_pxa270_rtc_init(void) {}
+#endif
+
 void __init colibri_pxa270_evalboard_init(void)
 {
 	pxa_set_ffuart_info(NULL);
@@ -95,4 +117,5 @@ void __init colibri_pxa270_evalboard_init(void)
 
 	colibri_pxa270_mmc_init();
 	colibri_pxa270_uhc_init();
+	colibri_pxa270_rtc_init();
 }
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 8488dfe..1024da5 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -73,6 +73,10 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
 	GPIO1_GPIO,	/* READY */
 	GPIO84_GPIO,	/* DETECT */
 	GPIO107_GPIO,	/* PPEN */
+
+	/* I2C */
+	GPIO117_I2C_SCL,
+	GPIO118_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index dab49ce..5bf8055 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -46,6 +46,10 @@ static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
 	/* UHC */
 	GPIO0_2_USBH_PEN,
 	GPIO1_2_USBH_PWR,
+
+	/* I2C */
+	GPIO21_I2C_SCL,
+	GPIO22_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index e886ab2..4257382 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -69,6 +69,10 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
 	/* UHC */
 	GPIO2_2_USBH_PEN,
 	GPIO3_2_USBH_PWR,
+
+	/* I2C */
+	GPIO32_I2C_SCL,
+	GPIO33_I2C_SDA,
 };
 #else
 static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
-- 
1.7.1

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

* [PATCH 05/11] ARM: pxa: Rename Colibri evalboard
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (2 preceding siblings ...)
  2010-09-16  2:32 ` [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:41   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver Marek Vasut
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

Rename colibri-pxa270-evalboard to colibri-evalboard as this board is used with
all Colibri modules.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/Kconfig                    |    2 +-
 arch/arm/mach-pxa/Makefile                   |    2 +-
 arch/arm/mach-pxa/colibri-evalboard.c        |  121 ++++++++++++++++++++++++++
 arch/arm/mach-pxa/colibri-pxa270-evalboard.c |  121 --------------------------
 arch/arm/mach-pxa/colibri-pxa270.c           |    6 +-
 arch/arm/mach-pxa/colibri-pxa300.c           |    4 +-
 arch/arm/mach-pxa/colibri-pxa320.c           |    4 +-
 arch/arm/mach-pxa/include/mach/colibri.h     |    8 +-
 8 files changed, 134 insertions(+), 134 deletions(-)
 create mode 100644 arch/arm/mach-pxa/colibri-evalboard.c
 delete mode 100644 arch/arm/mach-pxa/colibri-pxa270-evalboard.c

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index b44d613..e0ac5aa 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -249,7 +249,7 @@ config MACH_COLIBRI320
 	select PXA3xx
 	select CPU_PXA320
 
-config MACH_COLIBRI_PXA270_EVALBOARD
+config MACH_COLIBRI_EVALBOARD
 	bool "Toradex Colibri Evaluation Carrier Board support"
 	depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
 
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index e2f89c2..3197756 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -60,7 +60,7 @@ obj-$(CONFIG_MACH_LOGICPD_PXA270)	+= lpd270.o
 obj-$(CONFIG_MACH_PCM027)		+= pcm027.o
 obj-$(CONFIG_MACH_PCM990_BASEBOARD)	+= pcm990-baseboard.o
 obj-$(CONFIG_MACH_COLIBRI)			+= colibri-pxa270.o
-obj-$(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD)	+= colibri-pxa270-evalboard.o
+obj-$(CONFIG_MACH_COLIBRI_EVALBOARD)	+= colibri-evalboard.o
 obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME)	+= colibri-pxa270-income.o
 obj-$(CONFIG_MACH_COLIBRI300)	+= colibri-pxa3xx.o colibri-pxa300.o
 obj-$(CONFIG_MACH_COLIBRI320)	+= colibri-pxa3xx.o colibri-pxa320.o
diff --git a/arch/arm/mach-pxa/colibri-evalboard.c b/arch/arm/mach-pxa/colibri-evalboard.c
new file mode 100644
index 0000000..6b2c800
--- /dev/null
+++ b/arch/arm/mach-pxa/colibri-evalboard.c
@@ -0,0 +1,121 @@
+/*
+ *  linux/arch/arm/mach-pxa/colibri-evalboard.c
+ *
+ *  Support for Toradex Colibri Evaluation Carrier Board
+ *  Daniel Mack <daniel@caiaq.de>
+ *  Marek Vasut <marek.vasut@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/sysdev.h>
+#include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <asm/mach/arch.h>
+#include <linux/i2c.h>
+
+#include <mach/pxa27x.h>
+#include <mach/colibri.h>
+#include <mach/mmc.h>
+#include <mach/ohci.h>
+#include <mach/pxa27x-udc.h>
+
+#include <plat/i2c.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
+static struct pxamci_platform_data colibri_mci_platform_data = {
+	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
+	.gpio_power		= -1,
+	.gpio_card_ro		= -1,
+	.detect_delay_ms	= 200,
+};
+
+static void __init colibri_mmc_init(void)
+{
+	if (machine_is_colibri())	/* PXA270 Colibri */
+		colibri_mci_platform_data.gpio_card_detect =
+			GPIO0_COLIBRI_PXA270_SD_DETECT;
+	if (machine_is_colibri300())	/* PXA300 Colibri */
+		colibri_mci_platform_data.gpio_card_detect =
+			GPIO39_COLIBRI_PXA300_SD_DETECT;
+	else				/* PXA320 Colibri */
+		colibri_mci_platform_data.gpio_card_detect =
+			GPIO28_COLIBRI_PXA320_SD_DETECT;
+
+	pxa_set_mci_info(&colibri_mci_platform_data);
+}
+#else
+static inline void colibri_mmc_init(void) {}
+#endif
+
+/******************************************************************************
+ * USB Host
+ ******************************************************************************/
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static int colibri_ohci_init(struct device *dev)
+{
+	UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
+	return 0;
+}
+
+static struct pxaohci_platform_data colibri_ohci_info = {
+	.port_mode	= PMM_PERPORT_MODE,
+	.flags		= ENABLE_PORT1 |
+			  POWER_CONTROL_LOW | POWER_SENSE_LOW,
+	.init		= colibri_ohci_init,
+};
+
+static void __init colibri_uhc_init(void)
+{
+	/* Colibri PXA270 has two usb ports, TBA for 320 */
+	if (machine_is_colibri())
+		colibri_ohci_info.flags	|= ENABLE_PORT2;
+
+	pxa_set_ohci_info(&colibri_ohci_info);
+}
+#else
+static inline void colibri_uhc_init(void) {}
+#endif
+
+/******************************************************************************
+ * I2C RTC
+ ******************************************************************************/
+#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
+static struct i2c_board_info __initdata colibri_i2c_devs[] = {
+	{
+		I2C_BOARD_INFO("m41t00", 0x68),
+	},
+};
+
+static void __init colibri_rtc_init(void)
+{
+	pxa_set_i2c_info(NULL);
+	i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_i2c_devs));
+}
+#else
+static inline void colibri_rtc_init(void) {}
+#endif
+
+void __init colibri_evalboard_init(void)
+{
+	pxa_set_ffuart_info(NULL);
+	pxa_set_btuart_info(NULL);
+	pxa_set_stuart_info(NULL);
+
+	colibri_mmc_init();
+	colibri_uhc_init();
+	colibri_rtc_init();
+}
diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
deleted file mode 100644
index 7f27aec..0000000
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *  linux/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
- *
- *  Support for Toradex PXA270 based Colibri Evaluation Carrier Board
- *  Daniel Mack <daniel@caiaq.de>
- *  Marek Vasut <marek.vasut@gmail.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/sysdev.h>
-#include <linux/interrupt.h>
-#include <linux/gpio.h>
-#include <asm/mach-types.h>
-#include <mach/hardware.h>
-#include <asm/mach/arch.h>
-#include <linux/i2c.h>
-
-#include <mach/pxa27x.h>
-#include <mach/colibri.h>
-#include <mach/mmc.h>
-#include <mach/ohci.h>
-#include <mach/pxa27x-udc.h>
-
-#include <plat/i2c.h>
-
-#include "generic.h"
-#include "devices.h"
-
-/******************************************************************************
- * SD/MMC card controller
- ******************************************************************************/
-#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
-static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
-	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
-	.gpio_power		= -1,
-	.gpio_card_ro		= -1,
-	.detect_delay_ms	= 200,
-};
-
-static void __init colibri_pxa270_mmc_init(void)
-{
-	if (machine_is_colibri())	/* PXA270 Colibri */
-		colibri_pxa270_mci_platform_data.gpio_card_detect =
-			GPIO0_COLIBRI_PXA270_SD_DETECT;
-	if (machine_is_colibri300())	/* PXA300 Colibri */
-		colibri_pxa270_mci_platform_data.gpio_card_detect =
-			GPIO39_COLIBRI_PXA300_SD_DETECT;
-	else				/* PXA320 Colibri */
-		colibri_pxa270_mci_platform_data.gpio_card_detect =
-			GPIO28_COLIBRI_PXA320_SD_DETECT;
-
-	pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
-}
-#else
-static inline void colibri_pxa270_mmc_init(void) {}
-#endif
-
-/******************************************************************************
- * USB Host
- ******************************************************************************/
-#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-static int colibri_pxa270_ohci_init(struct device *dev)
-{
-	UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
-	return 0;
-}
-
-static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
-	.port_mode	= PMM_PERPORT_MODE,
-	.flags		= ENABLE_PORT1 |
-			  POWER_CONTROL_LOW | POWER_SENSE_LOW,
-	.init		= colibri_pxa270_ohci_init,
-};
-
-static void __init colibri_pxa270_uhc_init(void)
-{
-	/* Colibri PXA270 has two usb ports, TBA for 320 */
-	if (machine_is_colibri())
-		colibri_pxa270_ohci_info.flags	|= ENABLE_PORT2;
-
-	pxa_set_ohci_info(&colibri_pxa270_ohci_info);
-}
-#else
-static inline void colibri_pxa270_uhc_init(void) {}
-#endif
-
-/******************************************************************************
- * I2C RTC
- ******************************************************************************/
-#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
-static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
-	{
-		I2C_BOARD_INFO("m41t00", 0x68),
-	},
-};
-
-static void __init colibri_pxa270_rtc_init(void)
-{
-	pxa_set_i2c_info(NULL);
-	i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
-}
-#else
-static inline void colibri_pxa270_rtc_init(void) {}
-#endif
-
-void __init colibri_pxa270_evalboard_init(void)
-{
-	pxa_set_ffuart_info(NULL);
-	pxa_set_btuart_info(NULL);
-	pxa_set_stuart_info(NULL);
-
-	colibri_pxa270_mmc_init();
-	colibri_pxa270_uhc_init();
-	colibri_pxa270_rtc_init();
-}
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 1024da5..dc05af4 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -35,7 +35,7 @@
 /******************************************************************************
  * Evaluation board MFP
  ******************************************************************************/
-#ifdef	 CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+#ifdef	 CONFIG_MACH_COLIBRI_EVALBOARD
 static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
 	/* MMC */
 	GPIO32_MMC_CLK,
@@ -281,10 +281,10 @@ static void __init colibri_pxa270_init(void)
 	colibri_pxa270_tsc_init();
 
 	switch (colibri_pxa270_baseboard) {
-	case COLIBRI_PXA270_EVALBOARD:
+	case COLIBRI_EVALBOARD:
 		pxa2xx_mfp_config(ARRAY_AND_SIZE(
 			colibri_pxa270_evalboard_pin_config));
-		colibri_pxa270_evalboard_init();
+		colibri_evalboard_init();
 		break;
 	case COLIBRI_PXA270_INCOME:
 		pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 5bf8055..77e760f 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -32,7 +32,7 @@
 #include "devices.h"
 
 
-#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+#ifdef CONFIG_MACH_COLIBRI_EVALBOARD
 static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
 	/* MMC */
 	GPIO7_MMC1_CLK,
@@ -173,7 +173,7 @@ void __init colibri_pxa300_init(void)
 
 	/* Evalboard init */
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
-	colibri_pxa270_evalboard_init();
+	colibri_evalboard_init();
 }
 
 MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 4257382..7c003cd 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -35,7 +35,7 @@
 #include "generic.h"
 #include "devices.h"
 
-#ifdef	CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
+#ifdef	CONFIG_MACH_COLIBRI_EVALBOARD
 static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
 	/* MMC */
 	GPIO22_MMC1_CLK,
@@ -229,7 +229,7 @@ void __init colibri_pxa320_init(void)
 
 	/* Evalboard init */
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
-	colibri_pxa270_evalboard_init();
+	colibri_evalboard_init();
 }
 
 MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index 63a948a..388a96f 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -9,14 +9,14 @@
  */
 
 enum {
-	COLIBRI_PXA270_EVALBOARD = 0,
+	COLIBRI_EVALBOARD = 0,
 	COLIBRI_PXA270_INCOME,
 };
 
-#if defined(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD)
-extern void colibri_pxa270_evalboard_init(void);
+#if defined(CONFIG_MACH_COLIBRI_EVALBOARD)
+extern void colibri_evalboard_init(void);
 #else
-static inline void colibri_pxa270_evalboard_init(void) {}
+static inline void colibri_evalboard_init(void) {}
 #endif
 
 #if defined(CONFIG_MACH_COLIBRI_PXA270_INCOME)
-- 
1.7.1

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

* [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (3 preceding siblings ...)
  2010-09-16  2:32 ` [PATCH 05/11] ARM: pxa: Rename " Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:43   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C Marek Vasut
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/colibri-pxa320.c |   21 +++++++++++++++++++++
 drivers/pcmcia/Kconfig             |    3 ++-
 drivers/pcmcia/Makefile            |    1 +
 drivers/pcmcia/pxa2xx_colibri.c    |   17 ++++++++++++++++-
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 7c003cd..6cd83fa 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -73,6 +73,27 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
 	/* I2C */
 	GPIO32_I2C_SCL,
 	GPIO33_I2C_SDA,
+
+	/* PCMCIA */
+	MFP_CFG(GPIO59, AF7),	/* PRST ; AF7 to tristate */
+	MFP_CFG(GPIO61, AF7),	/* PCE1 ; AF7 to tristate */
+	MFP_CFG(GPIO60, AF7),	/* PCE2 ; AF7 to tristate */
+	MFP_CFG(GPIO62, AF7),	/* PCD ; AF7 to tristate */
+	MFP_CFG(GPIO56, AF7),	/* PSKTSEL ; AF7 to tristate */
+	GPIO27_GPIO,		/* RDnWR ; input/tristate */
+	GPIO50_GPIO,		/* PREG ; input/tristate */
+	GPIO2_RDY,
+	GPIO5_NPIOR,
+	GPIO6_NPIOW,
+	GPIO7_NPIOS16,
+	GPIO8_NPWAIT,
+	GPIO29_GPIO,		/* PRDY (READY GPIO) */
+	GPIO57_GPIO,		/* PPEN (POWER GPIO) */
+	GPIO81_GPIO,		/* PCD (DETECT GPIO) */
+	GPIO77_GPIO,		/* PRST (RESET GPIO) */
+	GPIO53_GPIO,		/* PBVD1 */
+	GPIO79_GPIO,		/* PBVD2 */
+	GPIO54_GPIO,		/* POE */
 };
 #else
 static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index e9acf03..de886f3 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -215,7 +215,8 @@ config PCMCIA_PXA2XX
 	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
 		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
 		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
-		    || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
+		    || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI \
+		    || MACH_COLIBRI320)
 	select PCMCIA_SOC_COMMON
 	help
 	  Say Y here to include support for the PXA2xx PCMCIA controller
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 2fee7ef..9a44a90 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -71,6 +71,7 @@ pxa2xx-obj-$(CONFIG_MACH_STARGATE2)		+= pxa2xx_stargate2.o
 pxa2xx-obj-$(CONFIG_MACH_VPAC270)		+= pxa2xx_vpac270.o
 pxa2xx-obj-$(CONFIG_MACH_BALLOON3)		+= pxa2xx_balloon3.o
 pxa2xx-obj-$(CONFIG_MACH_COLIBRI)		+= pxa2xx_colibri.o
+pxa2xx-obj-$(CONFIG_MACH_COLIBRI320)		+= pxa2xx_colibri.o
 
 obj-$(CONFIG_PCMCIA_PXA2XX)			+= pxa2xx_base.o $(pxa2xx-obj-y)
 
diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c
index 4ed876c..c3f7219 100644
--- a/drivers/pcmcia/pxa2xx_colibri.c
+++ b/drivers/pcmcia/pxa2xx_colibri.c
@@ -27,6 +27,13 @@
 #define	COLIBRI270_DETECT_GPIO	84
 #define	COLIBRI270_READY_GPIO	1
 
+#define	COLIBRI320_RESET_GPIO	77
+#define	COLIBRI320_PPEN_GPIO	57
+#define	COLIBRI320_BVD1_GPIO	53
+#define	COLIBRI320_BVD2_GPIO	79
+#define	COLIBRI320_DETECT_GPIO	81
+#define	COLIBRI320_READY_GPIO	29
+
 static struct {
 	int	reset_gpio;
 	int	ppen_gpio;
@@ -186,6 +193,14 @@ static int __init colibri_pcmcia_init(void)
 		colibri_pcmcia_gpio.bvd2_gpio	= COLIBRI270_BVD2_GPIO;
 		colibri_pcmcia_gpio.detect_gpio	= COLIBRI270_DETECT_GPIO;
 		colibri_pcmcia_gpio.ready_gpio	= COLIBRI270_READY_GPIO;
+	/* Colibri PXA320 */
+	} else if (machine_is_colibri320()) {
+		colibri_pcmcia_gpio.reset_gpio	= COLIBRI320_RESET_GPIO;
+		colibri_pcmcia_gpio.ppen_gpio	= COLIBRI320_PPEN_GPIO;
+		colibri_pcmcia_gpio.bvd1_gpio	= COLIBRI320_BVD1_GPIO;
+		colibri_pcmcia_gpio.bvd2_gpio	= COLIBRI320_BVD2_GPIO;
+		colibri_pcmcia_gpio.detect_gpio	= COLIBRI320_DETECT_GPIO;
+		colibri_pcmcia_gpio.ready_gpio	= COLIBRI320_READY_GPIO;
 	}
 
 	ret = platform_device_add_data(colibri_pcmcia_device,
@@ -209,6 +224,6 @@ module_init(colibri_pcmcia_init);
 module_exit(colibri_pcmcia_exit);
 
 MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
-MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
+MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270/PXA320");
 MODULE_ALIAS("platform:pxa2xx-pcmcia");
 MODULE_LICENSE("GPL");
-- 
1.7.1

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

* [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (4 preceding siblings ...)
  2010-09-16  2:32 ` [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:44   ` Eric Miao
  2010-09-16  2:32 ` [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/palmtc.c |  147 ++++++++++++++++++++++++++++++++++---------
 1 files changed, 116 insertions(+), 31 deletions(-)

diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index ce1104d..7f868d4 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -25,6 +25,7 @@
 #include <linux/power_supply.h>
 #include <linux/gpio_keys.h>
 #include <linux/mtd/physmap.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -116,6 +117,7 @@ static unsigned long palmtc_pin_config[] __initdata = {
 /******************************************************************************
  * SD/MMC card controller
  ******************************************************************************/
+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data palmtc_mci_platform_data = {
 	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
 	.gpio_power		= GPIO_NR_PALMTC_SD_POWER,
@@ -124,9 +126,18 @@ static struct pxamci_platform_data palmtc_mci_platform_data = {
 	.detect_delay_ms	= 200,
 };
 
+static void __init palmtc_mmc_init(void)
+{
+	pxa_set_mci_info(&palmtc_mci_platform_data);
+}
+#else
+static inline void palmtc_mmc_init(void) {}
+#endif
+
 /******************************************************************************
  * GPIO keys
  ******************************************************************************/
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
 static struct gpio_keys_button palmtc_pxa_buttons[] = {
 	{KEY_F8, GPIO_NR_PALMTC_HOTSYNC_BUTTON, 1, "HotSync Button", EV_KEY, 1},
 };
@@ -144,9 +155,18 @@ static struct platform_device palmtc_pxa_keys = {
 	},
 };
 
+static void __init palmtc_keys_init(void)
+{
+	platform_device_register(&palmtc_pxa_keys);
+}
+#else
+static inline void palmtc_keys_init(void) {}
+#endif
+
 /******************************************************************************
  * Backlight
  ******************************************************************************/
+#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
 static int palmtc_backlight_init(struct device *dev)
 {
 	int ret;
@@ -196,17 +216,35 @@ static struct platform_device palmtc_backlight = {
 	},
 };
 
+static void __init palmtc_pwm_init(void)
+{
+	platform_device_register(&palmtc_backlight);
+}
+#else
+static inline void palmtc_pwm_init(void) {}
+#endif
+
 /******************************************************************************
  * IrDA
  ******************************************************************************/
+#if defined(CONFIG_IRDA) || defined(CONFIG_IRDA_MODULE)
 static struct pxaficp_platform_data palmtc_ficp_platform_data = {
 	.gpio_pwdown		= GPIO_NR_PALMTC_IR_DISABLE,
 	.transceiver_cap	= IR_SIRMODE | IR_OFF,
 };
 
+static void __init palmtc_irda_init(void)
+{
+	pxa_set_ficp_info(&palmtc_ficp_platform_data);
+}
+#else
+static inline void palmtc_irda_init(void) {}
+#endif
+
 /******************************************************************************
  * Keyboard
  ******************************************************************************/
+#if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE)
 static const uint32_t palmtc_matrix_keys[] = {
 	KEY(0, 0, KEY_F1),
 	KEY(0, 1, KEY_X),
@@ -290,27 +328,63 @@ static struct platform_device palmtc_keyboard = {
 		.platform_data = &palmtc_keypad_platform_data,
 	},
 };
+static void __init palmtc_mkp_init(void)
+{
+	platform_device_register(&palmtc_keyboard);
+}
+#else
+static inline void palmtc_mkp_init(void) {}
+#endif
 
 /******************************************************************************
  * UDC
  ******************************************************************************/
-static struct pxa2xx_udc_mach_info palmtc_udc_info __initdata = {
+#if defined(CONFIG_USB_GADGET_PXA25X)||defined(CONFIG_USB_GADGET_PXA25X_MODULE)
+static struct gpio_vbus_mach_info palmtc_udc_info = {
 	.gpio_vbus		= GPIO_NR_PALMTC_USB_DETECT_N,
 	.gpio_vbus_inverted	= 1,
 	.gpio_pullup		= GPIO_NR_PALMTC_USB_POWER,
 };
 
+static struct platform_device palmtc_gpio_vbus = {
+	.name	= "gpio-vbus",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &palmtc_udc_info,
+	},
+};
+
+static void __init palmtc_udc_init(void)
+{
+	platform_device_register(&palmtc_gpio_vbus);
+};
+#else
+static inline void palmtc_udc_init(void) {}
+#endif
+
 /******************************************************************************
  * Touchscreen / Battery / GPIO-extender
  ******************************************************************************/
-static struct platform_device palmtc_ucb1400_core = {
+#if	defined(CONFIG_TOUCHSCREEN_UCB1400) || \
+	defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
+static struct platform_device palmtc_ucb1400_device = {
 	.name	= "ucb1400_core",
 	.id	= -1,
 };
 
+static void __init palmtc_ts_init(void)
+{
+	pxa_set_ac97_info(NULL);
+	platform_device_register(&palmtc_ucb1400_device);
+}
+#else
+static inline void palmtc_ts_init(void) {}
+#endif
+
 /******************************************************************************
  * NOR Flash
  ******************************************************************************/
+#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
 static struct resource palmtc_flash_resource = {
 	.start	= PXA_CS0_PHYS,
 	.end	= PXA_CS0_PHYS + SZ_16M - 1,
@@ -356,24 +430,33 @@ static struct platform_device palmtc_flash = {
 	},
 };
 
+static void __init palmtc_nor_init(void)
+{
+	platform_device_register(&palmtc_flash);
+}
+#else
+static inline void palmtc_nor_init(void) {}
+#endif
+
 /******************************************************************************
  * Framebuffer
  ******************************************************************************/
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
 static struct pxafb_mode_info palmtc_lcd_modes[] = {
-{
-	.pixclock	= 115384,
-	.xres		= 320,
-	.yres		= 320,
-	.bpp		= 16,
-
-	.left_margin	= 27,
-	.right_margin	= 7,
-	.upper_margin	= 7,
-	.lower_margin	= 8,
-
-	.hsync_len	= 6,
-	.vsync_len	= 1,
-},
+	{
+		.pixclock	= 115384,
+		.xres		= 320,
+		.yres		= 320,
+		.bpp		= 16,
+
+		.left_margin	= 27,
+		.right_margin	= 7,
+		.upper_margin	= 7,
+		.lower_margin	= 8,
+
+		.hsync_len	= 6,
+		.vsync_len	= 1,
+	},
 };
 
 static struct pxafb_mach_info palmtc_lcd_screen = {
@@ -382,17 +465,17 @@ static struct pxafb_mach_info palmtc_lcd_screen = {
 	.lcd_conn		= LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
 };
 
+static void __init palmtc_lcd_init(void)
+{
+	set_pxa_fb_info(&palmtc_lcd_screen);
+}
+#else
+static inline void palmtc_lcd_init(void) {}
+#endif
+
 /******************************************************************************
  * Machine init
  ******************************************************************************/
-static struct platform_device *devices[] __initdata = {
-	&palmtc_backlight,
-	&palmtc_ucb1400_core,
-	&palmtc_keyboard,
-	&palmtc_pxa_keys,
-	&palmtc_flash,
-};
-
 static void __init palmtc_init(void)
 {
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
@@ -402,13 +485,15 @@ static void __init palmtc_init(void)
 	pxa_set_stuart_info(NULL);
 	pxa_set_hwuart_info(NULL);
 
-	set_pxa_fb_info(&palmtc_lcd_screen);
-	pxa_set_mci_info(&palmtc_mci_platform_data);
-	pxa_set_udc_info(&palmtc_udc_info);
-	pxa_set_ac97_info(NULL);
-	pxa_set_ficp_info(&palmtc_ficp_platform_data);
-
-	platform_add_devices(devices, ARRAY_SIZE(devices));
+	palmtc_mmc_init();
+	palmtc_keys_init();
+	palmtc_pwm_init();
+	palmtc_irda_init();
+	palmtc_mkp_init();
+	palmtc_udc_init();
+	palmtc_ts_init();
+	palmtc_nor_init();
+	palmtc_lcd_init();
 };
 
 MACHINE_START(PALMTC, "Palm Tungsten|C")
-- 
1.7.1

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

* [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (5 preceding siblings ...)
  2010-09-16  2:32 ` [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C Marek Vasut
@ 2010-09-16  2:32 ` Marek Vasut
  2010-09-20 14:45   ` Eric Miao
  2010-09-16  2:33 ` [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270 Marek Vasut
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:32 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 drivers/gpio/ucb1400_gpio.c |   19 ++++++-------------
 drivers/mfd/ucb1400_core.c  |    5 +++++
 include/linux/ucb1400.h     |   19 ++++++-------------
 3 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/drivers/gpio/ucb1400_gpio.c b/drivers/gpio/ucb1400_gpio.c
index 50e6bd1..fba45a5 100644
--- a/drivers/gpio/ucb1400_gpio.c
+++ b/drivers/gpio/ucb1400_gpio.c
@@ -12,8 +12,6 @@
 #include <linux/module.h>
 #include <linux/ucb1400.h>
 
-struct ucb1400_gpio_data *ucbdata;
-
 static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
 {
 	struct ucb1400_gpio *gpio;
@@ -50,7 +48,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
 	struct ucb1400_gpio *ucb = dev->dev.platform_data;
 	int err = 0;
 
-	if (!(ucbdata && ucbdata->gpio_offset)) {
+	if (!(ucb && ucb->gpio_offset)) {
 		err = -EINVAL;
 		goto err;
 	}
@@ -58,7 +56,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
 	platform_set_drvdata(dev, ucb);
 
 	ucb->gc.label = "ucb1400_gpio";
-	ucb->gc.base = ucbdata->gpio_offset;
+	ucb->gc.base = ucb->gpio_offset;
 	ucb->gc.ngpio = 10;
 	ucb->gc.owner = THIS_MODULE;
 
@@ -72,8 +70,8 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
 	if (err)
 		goto err;
 
-	if (ucbdata && ucbdata->gpio_setup)
-		err = ucbdata->gpio_setup(&dev->dev, ucb->gc.ngpio);
+	if (ucb && ucb->gpio_setup)
+		err = ucb->gpio_setup(&dev->dev, ucb->gc.ngpio);
 
 err:
 	return err;
@@ -85,8 +83,8 @@ static int ucb1400_gpio_remove(struct platform_device *dev)
 	int err = 0;
 	struct ucb1400_gpio *ucb = platform_get_drvdata(dev);
 
-	if (ucbdata && ucbdata->gpio_teardown) {
-		err = ucbdata->gpio_teardown(&dev->dev, ucb->gc.ngpio);
+	if (ucb && ucb->gpio_teardown) {
+		err = ucb->gpio_teardown(&dev->dev, ucb->gc.ngpio);
 		if (err)
 			return err;
 	}
@@ -113,11 +111,6 @@ static void __exit ucb1400_gpio_exit(void)
 	platform_driver_unregister(&ucb1400_gpio_driver);
 }
 
-void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data)
-{
-	ucbdata = data;
-}
-
 module_init(ucb1400_gpio_init);
 module_exit(ucb1400_gpio_exit);
 
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
index d73f84b..63f4969 100644
--- a/drivers/mfd/ucb1400_core.c
+++ b/drivers/mfd/ucb1400_core.c
@@ -75,6 +75,11 @@ static int ucb1400_core_probe(struct device *dev)
 
 	/* GPIO */
 	ucb_gpio.ac97 = ac97;
+	if (pdata) {
+		ucb_gpio.gpio_setup = pdata->gpio_setup;
+		ucb_gpio.gpio_teardown = pdata->gpio_teardown;
+		ucb_gpio.gpio_offset = pdata->gpio_offset;
+	}
 	ucb->ucb1400_gpio = platform_device_alloc("ucb1400_gpio", -1);
 	if (!ucb->ucb1400_gpio) {
 		err = -ENOMEM;
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
index 1b47909..1a6bfdd 100644
--- a/include/linux/ucb1400.h
+++ b/include/linux/ucb1400.h
@@ -83,15 +83,12 @@
 #define UCB_ID			0x7e
 #define UCB_ID_1400             0x4304
 
-struct ucb1400_gpio_data {
-	int gpio_offset;
-	int (*gpio_setup)(struct device *dev, int ngpio);
-	int (*gpio_teardown)(struct device *dev, int ngpio);
-};
-
 struct ucb1400_gpio {
 	struct gpio_chip	gc;
 	struct snd_ac97		*ac97;
+	int			gpio_offset;
+	int (*gpio_setup)(struct device *dev, int ngpio);
+	int (*gpio_teardown)(struct device *dev, int ngpio);
 };
 
 struct ucb1400_ts {
@@ -112,6 +109,9 @@ struct ucb1400 {
 
 struct ucb1400_pdata {
 	int	irq;
+	int	gpio_offset;
+	int (*gpio_setup)(struct device *dev, int ngpio);
+	int (*gpio_teardown)(struct device *dev, int ngpio);
 };
 
 static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
@@ -163,11 +163,4 @@ static inline void ucb1400_adc_disable(struct snd_ac97 *ac97)
 
 unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
 			      int adcsync);
-
-#ifdef CONFIG_GPIO_UCB1400
-void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data);
-#else
-static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) {}
-#endif
-
 #endif
-- 
1.7.1

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

* [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (6 preceding siblings ...)
  2010-09-16  2:32 ` [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
@ 2010-09-16  2:33 ` Marek Vasut
  2010-09-20 14:46   ` Eric Miao
  2010-09-16  2:33 ` [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC Marek Vasut
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/vpac270.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index c9b747c..e851d13 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -429,20 +429,18 @@ static inline void vpac270_eth_init(void) {}
  ******************************************************************************/
 #if	defined(CONFIG_TOUCHSCREEN_UCB1400) || \
 	defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
-static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
-	.reset_gpio	= 95,
-};
-
 static struct ucb1400_pdata vpac270_ucb1400_pdata = {
 	.irq		= IRQ_GPIO(GPIO113_VPAC270_TS_IRQ),
 };
 
+static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
+	.reset_gpio	= 95,
+	.codec_pdata	= { &vpac270_ucb1400_pdata, },
+};
+
 static struct platform_device vpac270_ucb1400_device = {
 	.name		= "ucb1400_core",
 	.id		= -1,
-	.dev		= {
-		.platform_data = &vpac270_ucb1400_pdata,
-	},
 };
 
 static void __init vpac270_ts_init(void)
-- 
1.7.1

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

* [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (7 preceding siblings ...)
  2010-09-16  2:33 ` [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270 Marek Vasut
@ 2010-09-16  2:33 ` Marek Vasut
  2010-09-20 14:47   ` Eric Miao
  2010-09-16  2:33 ` [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC Marek Vasut
  2010-09-20 14:14 ` [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Eric Miao
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/palmtc.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 7f868d4..9c74ce9 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -367,6 +367,14 @@ static inline void palmtc_udc_init(void) {}
  ******************************************************************************/
 #if	defined(CONFIG_TOUCHSCREEN_UCB1400) || \
 	defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
+static struct ucb1400_pdata palmtc_ucb1400_pdata = {
+	.gpio_offset	= PALMTC_UCB1400_GPIO_OFFSET,
+};
+
+static pxa2xx_audio_ops_t palmtc_ac97_pdata = {
+	.codec_pdata	= { &palmtc_ucb1400_pdata, },
+};
+
 static struct platform_device palmtc_ucb1400_device = {
 	.name	= "ucb1400_core",
 	.id	= -1,
@@ -374,7 +382,7 @@ static struct platform_device palmtc_ucb1400_device = {
 
 static void __init palmtc_ts_init(void)
 {
-	pxa_set_ac97_info(NULL);
+	pxa_set_ac97_info(&palmtc_ac97_pdata);
 	platform_device_register(&palmtc_ucb1400_device);
 }
 #else
-- 
1.7.1

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

* [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (8 preceding siblings ...)
  2010-09-16  2:33 ` [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC Marek Vasut
@ 2010-09-16  2:33 ` Marek Vasut
  2010-09-20 14:47   ` Eric Miao
  2010-09-20 14:14 ` [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Eric Miao
  10 siblings, 1 reply; 28+ messages in thread
From: Marek Vasut @ 2010-09-16  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/palmtc.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 9c74ce9..ccefc4e 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -390,6 +390,46 @@ static inline void palmtc_ts_init(void) {}
 #endif
 
 /******************************************************************************
+ * LEDs
+ ******************************************************************************/
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+struct gpio_led palmtc_gpio_leds[] = {
+{
+	.name			= "palmtc:green:user",
+	.default_trigger	= "none",
+	.gpio			= GPIO_NR_PALMTC_LED_POWER,
+	.active_low		= 1,
+}, {
+	.name			= "palmtc:vibra:vibra",
+	.default_trigger	= "none",
+	.gpio			= GPIO_NR_PALMTC_VIBRA_POWER,
+	.active_low		= 1,
+}
+
+};
+
+static struct gpio_led_platform_data palmtc_gpio_led_info = {
+	.leds		= palmtc_gpio_leds,
+	.num_leds	= ARRAY_SIZE(palmtc_gpio_leds),
+};
+
+static struct platform_device palmtc_leds = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &palmtc_gpio_led_info,
+	}
+};
+
+static void __init palmtc_leds_init(void)
+{
+	platform_device_register(&palmtc_leds);
+}
+#else
+static inline void palmtc_leds_init(void) {}
+#endif
+
+/******************************************************************************
  * NOR Flash
  ******************************************************************************/
 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
@@ -502,6 +542,7 @@ static void __init palmtc_init(void)
 	palmtc_ts_init();
 	palmtc_nor_init();
 	palmtc_lcd_init();
+	palmtc_leds_init();
 };
 
 MACHINE_START(PALMTC, "Palm Tungsten|C")
-- 
1.7.1

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

* [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320
  2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
                   ` (9 preceding siblings ...)
  2010-09-16  2:33 ` [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC Marek Vasut
@ 2010-09-20 14:14 ` Eric Miao
  10 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> PXA320 also supports PCMCIA/CF interface. This patch generalizes register access
> in pxa2xx_pcmcia so the pxa320 is now supported as well.
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?drivers/pcmcia/pxa2xx_base.c | ? 91 ++++++++++++++++++++++++++++++++----------
> ?1 files changed, 70 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
> index ae07b4d..3eb76c8 100644
> --- a/drivers/pcmcia/pxa2xx_base.c
> +++ b/drivers/pcmcia/pxa2xx_base.c
> @@ -84,6 +84,16 @@
> ?#define MCXX_ASST_SHIFT ? ? (7)
> ?#define MCXX_HOLD_SHIFT ? ? (14)
>
> +#define ? ? ? ?PXA2XX_SMC_BASE ? ? ? ? (0x48000000)
> +#define ? ? ? ?PXA3XX_SMC_BASE ? ? ? ? (0x4a000000)
> +#define ? ? ? ?MECR_OFFSET ? ? ? ? ? ? (0x14)
> +#define ? ? ? ?MCMEM_OFFSET ? ? ? ? ? ?(0x28)
> +#define ? ? ? ?MCATT_OFFSET ? ? ? ? ? ?(0x30)
> +#define ? ? ? ?MCIO_OFFSET ? ? ? ? ? ? (0x38)
> +#define ? ? ? ?MCIO_OFFSET ? ? ? ? ? ? (0x38)
> +

Since the SMC registers could be accessed by multiple entities, not
only the PCMCIA but also other drivers/setup code, e.g. NOR flash
timing, and considering the register offsets are almost same between
PXA2xx and PXA3xx (only differs in the starting base), I'd expect the
register definitions being separated into something like regs-smc.h

#define SMC_VIRT_BASE	(xxxxx)
#define SMC_REG(x)	(SMC_VIRT_BASE + x)

#define MECR		SMC_REG(0x014)
#define MCMEM		SMC_REG(0x028)
....

And possibly separating pxa_map_io() into pxa2xx_map_io() and
pxa3xx_map_io(), where each maps their different SMC into the same
virtual address. And use MECR/MCMEM in __raw_{read,write}l() directly
instead of doing ioremap() everywhere.

See arch/arm/mach-pxa/smemc.c, there should be some common register
definitions.

> +static void __iomem *base;
> +
> ?static inline u_int pxa2xx_mcxx_hold(u_int pcmcia_cycle_ns,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? u_int mem_clk_10khz)
> ?{
> @@ -114,39 +124,57 @@ static inline u_int pxa2xx_pcmcia_cmd_time(u_int mem_clk_10khz,
> ? ? ? ?return (300000 * (pcmcia_mcxx_asst + 1) / mem_clk_10khz);
> ?}
>
> +static inline void pxa2xx_pcmcia_set_reg( uint32_t reg, uint32_t sock,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? uint32_t val )
> +{
> + ? ? ? writel(val, base + reg + (sock << 4));
> +}

I'd prefer __raw_{read,write}l() variants here since it's known that this
cannot be PCI accesses. And this function doesn't seem to be very essential,
ain't

	__raw_writel(val, MCMEM(sock));

looks simpler and cleaner?

> +
> ?static int pxa2xx_pcmcia_set_mcmem( int sock, int speed, int clock )
> ?{
> - ? ? ? MCMEM(sock) = ((pxa2xx_mcxx_setup(speed, clock)
> + ? ? ? uint32_t val;
> +
> + ? ? ? val = ((pxa2xx_mcxx_setup(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_asst(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_hold(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
>
> + ? ? ? pxa2xx_pcmcia_set_reg(MCMEM_OFFSET, sock, val);
> +
> ? ? ? ?return 0;
> ?}
>
> ?static int pxa2xx_pcmcia_set_mcio( int sock, int speed, int clock )
> ?{
> - ? ? ? MCIO(sock) = ((pxa2xx_mcxx_setup(speed, clock)
> + ? ? ? uint32_t val;
> +
> + ? ? ? val = ((pxa2xx_mcxx_setup(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_asst(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_hold(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
>
> + ? ? ? pxa2xx_pcmcia_set_reg(MCIO_OFFSET, sock, val);
> +
> ? ? ? ?return 0;
> ?}
>
> ?static int pxa2xx_pcmcia_set_mcatt( int sock, int speed, int clock )
> ?{
> - ? ? ? MCATT(sock) = ((pxa2xx_mcxx_setup(speed, clock)
> + ? ? ? uint32_t val;
> +
> + ? ? ? val = ((pxa2xx_mcxx_setup(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_SETUP_MASK) << MCXX_SETUP_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_asst(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_ASST_MASK) << MCXX_ASST_SHIFT)
> ? ? ? ? ? ? ? ?| ((pxa2xx_mcxx_hold(speed, clock)
> ? ? ? ? ? ? ? ?& MCXX_HOLD_MASK) << MCXX_HOLD_SHIFT);
>
> + ? ? ? pxa2xx_pcmcia_set_reg(MCATT_OFFSET, sock, val);
> +
> ? ? ? ?return 0;
> ?}
>
> @@ -205,19 +233,18 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
> ?static void pxa2xx_configure_sockets(struct device *dev)
> ?{
> ? ? ? ?struct pcmcia_low_level *ops = dev->platform_data;
> -
> ? ? ? ?/*
> ? ? ? ? * We have at least one socket, so set MECR:CIT
> ? ? ? ? * (Card Is There)
> ? ? ? ? */
> - ? ? ? MECR |= MECR_CIT;
> + ? ? ? uint32_t mecr = MECR_CIT;

I hope this doesn't change the original semantics.

>
> ? ? ? ?/* Set MECR:NOS (Number Of Sockets) */
> ? ? ? ?if ((ops->first + ops->nr) > 1 ||
> ? ? ? ? ? ?machine_is_viper() || machine_is_arcom_zeus())
> - ? ? ? ? ? ? ? MECR |= MECR_NOS;
> - ? ? ? else
> - ? ? ? ? ? ? ? MECR &= ~MECR_NOS;
> + ? ? ? ? ? ? ? mecr |= MECR_NOS;
> +
> + ? ? ? pxa2xx_pcmcia_set_reg(MECR_OFFSET, 0, mecr);
> ?}
>
> ?static const char *skt_names[] = {
> @@ -270,16 +297,34 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
> ? ? ? ?struct pcmcia_low_level *ops;
> ? ? ? ?struct skt_dev_info *sinfo;
> ? ? ? ?struct soc_pcmcia_socket *skt;
> + ? ? ? uint32_t smc_addr;
>
> ? ? ? ?ops = (struct pcmcia_low_level *)dev->dev.platform_data;
> - ? ? ? if (!ops)
> - ? ? ? ? ? ? ? return -ENODEV;
> + ? ? ? if (!ops) {
> + ? ? ? ? ? ? ? ret = -ENODEV;
> + ? ? ? ? ? ? ? goto err0;
> + ? ? ? }
> +
> + ? ? ? if (cpu_is_pxa320() && ops->nr > 1) {
> + ? ? ? ? ? ? ? dev_err(&dev->dev, "pxa320 supports only one pcmcia slot");
> + ? ? ? ? ? ? ? ret = -EINVAL;
> + ? ? ? ? ? ? ? goto err0;
> + ? ? ? }
>
> ? ? ? ?pxa2xx_drv_pcmcia_ops(ops);
>
> + ? ? ? smc_addr = cpu_is_pxa320() ? PXA3XX_SMC_BASE : PXA2XX_SMC_BASE;
> + ? ? ? base = ioremap(smc_addr, 0x100);
> + ? ? ? if (!base) {
> + ? ? ? ? ? ? ? ret = -ENOMEM;
> + ? ? ? ? ? ? ? goto err0;
> + ? ? ? }
> +

This isn't good.

> ? ? ? ?sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
> - ? ? ? if (!sinfo)
> - ? ? ? ? ? ? ? return -ENOMEM;
> + ? ? ? if (!sinfo) {
> + ? ? ? ? ? ? ? ret = -ENOMEM;
> + ? ? ? ? ? ? ? goto err1;
> + ? ? ? }
>
> ? ? ? ?sinfo->nskt = ops->nr;
>
> @@ -295,18 +340,21 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
>
> ? ? ? ? ? ? ? ?ret = pxa2xx_drv_pcmcia_add_one(skt);
> ? ? ? ? ? ? ? ?if (ret)
> - ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? ? ? ? ? goto err2;
> ? ? ? ?}
>
> - ? ? ? if (ret) {
> - ? ? ? ? ? ? ? while (--i >= 0)
> - ? ? ? ? ? ? ? ? ? ? ? soc_pcmcia_remove_one(&sinfo->skt[i]);
> - ? ? ? ? ? ? ? kfree(sinfo);
> - ? ? ? } else {
> - ? ? ? ? ? ? ? pxa2xx_configure_sockets(&dev->dev);
> - ? ? ? ? ? ? ? dev_set_drvdata(&dev->dev, sinfo);
> - ? ? ? }
> + ? ? ? pxa2xx_configure_sockets(&dev->dev);
> + ? ? ? dev_set_drvdata(&dev->dev, sinfo);
> +
> + ? ? ? return 0;
>
> +err2:
> + ? ? ? while (--i >= 0)
> + ? ? ? ? ? ? ? soc_pcmcia_remove_one(&sinfo->skt[i]);
> + ? ? ? kfree(sinfo);
> +err1:
> + ? ? ? iounmap(base);
> +err0:
> ? ? ? ?return ret;
> ?}
>
> @@ -321,6 +369,7 @@ static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
> ? ? ? ? ? ? ? ?soc_pcmcia_remove_one(&sinfo->skt[i]);
>
> ? ? ? ?kfree(sinfo);
> + ? ? ? iounmap(base);
> ? ? ? ?return 0;
> ?}
>
> --
> 1.7.1
>
>

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

* [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support
  2010-09-16  2:32 ` [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
@ 2010-09-20 14:16   ` Eric Miao
  2010-09-20 14:21     ` Eric Miao
  2010-09-21 21:56     ` Marek Vasut
  0 siblings, 2 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> This driver also contains structures to eventually support PXA320. This is
> planned to be added in a later patch.
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> ?arch/arm/mach-pxa/colibri-pxa270-evalboard.c | ? 18 ++
> ?drivers/pcmcia/Kconfig ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
> ?drivers/pcmcia/Makefile ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
> ?drivers/pcmcia/pxa2xx_colibri.c ? ? ? ? ? ? ?| ?214 ++++++++++++++++++++++++++
> ?4 files changed, 234 insertions(+), 1 deletions(-)
> ?create mode 100644 drivers/pcmcia/pxa2xx_colibri.c
>
> diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> index 0f3b632..6177ff5 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> @@ -51,6 +51,24 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> ? ? ? ?GPIO89_USBH1_PEN,
> ? ? ? ?GPIO119_USBH2_PWR,
> ? ? ? ?GPIO120_USBH2_PEN,
> +
> + ? ? ? /* PCMCIA */
> + ? ? ? GPIO85_nPCE_1,
> + ? ? ? GPIO54_nPCE_2,
> + ? ? ? GPIO55_nPREG,
> + ? ? ? GPIO50_nPIOR,
> + ? ? ? GPIO51_nPIOW,
> + ? ? ? GPIO49_nPWE,
> + ? ? ? GPIO48_nPOE,
> + ? ? ? GPIO57_nIOIS16,
> + ? ? ? GPIO56_nPWAIT,
> + ? ? ? GPIO104_PSKTSEL,
> + ? ? ? GPIO53_GPIO, ? ?/* RESET */
> + ? ? ? GPIO83_GPIO, ? ?/* BVD1 */
> + ? ? ? GPIO82_GPIO, ? ?/* BVD2 */
> + ? ? ? GPIO1_GPIO, ? ? /* READY */
> + ? ? ? GPIO84_GPIO, ? ?/* DETECT */
> + ? ? ? GPIO107_GPIO, ? /* PPEN */
> ?};
>
> ?/******************************************************************************
> diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> index c80a7a6..e9acf03 100644
> --- a/drivers/pcmcia/Kconfig
> +++ b/drivers/pcmcia/Kconfig
> @@ -215,7 +215,7 @@ config PCMCIA_PXA2XX
> ? ? ? ?depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
> ? ? ? ? ? ? ? ? ? ?|| MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> ? ? ? ? ? ? ? ? ? ?|| ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
> - ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3)
> + ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
> ? ? ? ?select PCMCIA_SOC_COMMON
> ? ? ? ?help
> ? ? ? ? ?Say Y here to include support for the PXA2xx PCMCIA controller
> diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> index 8d9386a..2fee7ef 100644
> --- a/drivers/pcmcia/Makefile
> +++ b/drivers/pcmcia/Makefile
> @@ -70,6 +70,7 @@ pxa2xx-obj-$(CONFIG_MACH_E740) ? ? ? ? ? ? ? ? ? ? ? ?+= pxa2xx_e740.o
> ?pxa2xx-obj-$(CONFIG_MACH_STARGATE2) ? ? ? ? ? ?+= pxa2xx_stargate2.o
> ?pxa2xx-obj-$(CONFIG_MACH_VPAC270) ? ? ? ? ? ? ?+= pxa2xx_vpac270.o
> ?pxa2xx-obj-$(CONFIG_MACH_BALLOON3) ? ? ? ? ? ? += pxa2xx_balloon3.o
> +pxa2xx-obj-$(CONFIG_MACH_COLIBRI) ? ? ? ? ? ? ?+= pxa2xx_colibri.o
>
> ?obj-$(CONFIG_PCMCIA_PXA2XX) ? ? ? ? ? ? ? ? ? ?+= pxa2xx_base.o $(pxa2xx-obj-y)
>
> diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c
> new file mode 100644
> index 0000000..4ed876c
> --- /dev/null
> +++ b/drivers/pcmcia/pxa2xx_colibri.c
> @@ -0,0 +1,214 @@
> +/*
> + * linux/drivers/pcmcia/pxa2xx_colibri.c
> + *
> + * Driver for Toradex Colibri PXA270 CF socket
> + *
> + * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/delay.h>
> +#include <linux/gpio.h>
> +
> +#include <asm/mach-types.h>
> +
> +#include "soc_common.h"
> +
> +#define ? ? ? ?COLIBRI270_RESET_GPIO ? 53
> +#define ? ? ? ?COLIBRI270_PPEN_GPIO ? ?107
> +#define ? ? ? ?COLIBRI270_BVD1_GPIO ? ?83
> +#define ? ? ? ?COLIBRI270_BVD2_GPIO ? ?82
> +#define ? ? ? ?COLIBRI270_DETECT_GPIO ?84
> +#define ? ? ? ?COLIBRI270_READY_GPIO ? 1
> +
> +static struct {
> + ? ? ? int ? ? reset_gpio;
> + ? ? ? int ? ? ppen_gpio;
> + ? ? ? int ? ? bvd1_gpio;
> + ? ? ? int ? ? bvd2_gpio;
> + ? ? ? int ? ? detect_gpio;
> + ? ? ? int ? ? ready_gpio;
> +} colibri_pcmcia_gpio;
> +
> +static struct pcmcia_irqs colibri_irqs[] = {
> + ? ? ? {
> + ? ? ? ? ? ? ? .sock = 0,
> + ? ? ? ? ? ? ? .str ?= "PCMCIA CD"
> + ? ? ? },
> +};
> +
> +static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
> +{
> + ? ? ? int ret;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.detect_gpio, "DETECT");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err1;
> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.detect_gpio);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err2;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.ready_gpio, "READY");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err2;
> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.ready_gpio);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err3;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.bvd1_gpio, "BVD1");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err3;
> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.bvd1_gpio);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err4;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.bvd2_gpio, "BVD2");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err4;
> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.bvd2_gpio);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err5;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.ppen_gpio, "PPEN");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err5;
> + ? ? ? ret = gpio_direction_output(colibri_pcmcia_gpio.ppen_gpio, 0);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err6;
> +
> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.reset_gpio, "RESET");
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err6;
> + ? ? ? ret = gpio_direction_output(colibri_pcmcia_gpio.reset_gpio, 1);
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? goto err7;
> +
> + ? ? ? colibri_irqs[0].irq = gpio_to_irq(colibri_pcmcia_gpio.detect_gpio);
> + ? ? ? skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpio.ready_gpio);
> +
> + ? ? ? return soc_pcmcia_request_irqs(skt, colibri_irqs,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(colibri_irqs));
> +
> +err7:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.detect_gpio);
> +err6:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.ready_gpio);
> +err5:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
> +err4:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
> +err3:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.reset_gpio);
> +err2:
> + ? ? ? gpio_free(colibri_pcmcia_gpio.ppen_gpio);
> +err1:
> + ? ? ? return ret;
> +}

I'd like to advocate for my newly introduced API for such usage:

gpio_request_array() in include/asm-generic/gpio.h

> +
> +static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
> +{
> + ? ? ? gpio_free(colibri_pcmcia_gpio.detect_gpio);
> + ? ? ? gpio_free(colibri_pcmcia_gpio.ready_gpio);
> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
> + ? ? ? gpio_free(colibri_pcmcia_gpio.reset_gpio);
> + ? ? ? gpio_free(colibri_pcmcia_gpio.ppen_gpio);
> +}
> +
> +static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct pcmcia_state *state)
> +{
> +
> + ? ? ? state->detect = !!gpio_get_value(colibri_pcmcia_gpio.detect_gpio);
> + ? ? ? state->ready ?= !!gpio_get_value(colibri_pcmcia_gpio.ready_gpio);
> + ? ? ? state->bvd1 ? = !!gpio_get_value(colibri_pcmcia_gpio.bvd1_gpio);
> + ? ? ? state->bvd2 ? = !!gpio_get_value(colibri_pcmcia_gpio.bvd2_gpio);

Can we make colibri_pcmcia_gpio some part of the *skt private data?

> + ? ? ? state->wrprot = 0;
> + ? ? ? state->vs_3v ?= 1;
> + ? ? ? state->vs_Xv ?= 0;
> +}
> +
> +static int
> +colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const socket_state_t *state)
> +{
> + ? ? ? gpio_set_value(colibri_pcmcia_gpio.ppen_gpio,
> + ? ? ? ? ? ? ? ? ? ? ? !(state->Vcc == 33 && state->Vpp < 50));
> + ? ? ? gpio_set_value(colibri_pcmcia_gpio.reset_gpio, state->flags & SS_RESET);
> + ? ? ? return 0;
> +}
> +
> +static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
> +{
> +}
> +
> +static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
> +{
> +}
> +
> +static struct pcmcia_low_level colibri_pcmcia_ops = {
> + ? ? ? .owner ? ? ? ? ? ? ? ? ?= THIS_MODULE,
> +
> + ? ? ? .first ? ? ? ? ? ? ? ? ?= 0,
> + ? ? ? .nr ? ? ? ? ? ? ? ? ? ? = 1,
> +
> + ? ? ? .hw_init ? ? ? ? ? ? ? ?= colibri_pcmcia_hw_init,
> + ? ? ? .hw_shutdown ? ? ? ? ? ?= colibri_pcmcia_hw_shutdown,
> +
> + ? ? ? .socket_state ? ? ? ? ? = colibri_pcmcia_socket_state,
> + ? ? ? .configure_socket ? ? ? = colibri_pcmcia_configure_socket,
> +
> + ? ? ? .socket_init ? ? ? ? ? ?= colibri_pcmcia_socket_init,
> + ? ? ? .socket_suspend ? ? ? ? = colibri_pcmcia_socket_suspend,
> +};
> +
> +static struct platform_device *colibri_pcmcia_device;
> +
> +static int __init colibri_pcmcia_init(void)
> +{
> + ? ? ? int ret;
> +
> + ? ? ? colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
> + ? ? ? if (!colibri_pcmcia_device)
> + ? ? ? ? ? ? ? return -ENOMEM;
> +
> + ? ? ? /* Colibri PXA270 */
> + ? ? ? if (machine_is_colibri()) {
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.reset_gpio ?= COLIBRI270_RESET_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ppen_gpio ? = COLIBRI270_PPEN_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd1_gpio ? = COLIBRI270_BVD1_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd2_gpio ? = COLIBRI270_BVD2_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ready_gpio ?= COLIBRI270_READY_GPIO;
> + ? ? ? }
> +
> + ? ? ? ret = platform_device_add_data(colibri_pcmcia_device,
> + ? ? ? ? ? ? ? &colibri_pcmcia_ops, sizeof(colibri_pcmcia_ops));
> +
> + ? ? ? if (!ret)
> + ? ? ? ? ? ? ? ret = platform_device_add(colibri_pcmcia_device);
> +
> + ? ? ? if (ret)
> + ? ? ? ? ? ? ? platform_device_put(colibri_pcmcia_device);
> +
> + ? ? ? return ret;
> +}
> +
> +static void __exit colibri_pcmcia_exit(void)
> +{
> + ? ? ? platform_device_unregister(colibri_pcmcia_device);
> +}
> +
> +module_init(colibri_pcmcia_init);
> +module_exit(colibri_pcmcia_exit);
> +
> +MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
> +MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
> +MODULE_ALIAS("platform:pxa2xx-pcmcia");
> +MODULE_LICENSE("GPL");
> --
> 1.7.1
>
>

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

* [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support
  2010-09-20 14:16   ` Eric Miao
@ 2010-09-20 14:21     ` Eric Miao
  2010-09-21 21:56     ` Marek Vasut
  1 sibling, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 20, 2010 at 10:16 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> This driver also contains structures to eventually support PXA320. This is
>> planned to be added in a later patch.
>>
>> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
>> Acked-by: Daniel Mack <daniel@caiaq.de>
>> ---
>> ?arch/arm/mach-pxa/colibri-pxa270-evalboard.c | ? 18 ++
>> ?drivers/pcmcia/Kconfig ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
>> ?drivers/pcmcia/Makefile ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
>> ?drivers/pcmcia/pxa2xx_colibri.c ? ? ? ? ? ? ?| ?214 ++++++++++++++++++++++++++
>> ?4 files changed, 234 insertions(+), 1 deletions(-)
>> ?create mode 100644 drivers/pcmcia/pxa2xx_colibri.c
>>
>> diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
>> index 0f3b632..6177ff5 100644
>> --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
>> +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
>> @@ -51,6 +51,24 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
>> ? ? ? ?GPIO89_USBH1_PEN,
>> ? ? ? ?GPIO119_USBH2_PWR,
>> ? ? ? ?GPIO120_USBH2_PEN,
>> +
>> + ? ? ? /* PCMCIA */
>> + ? ? ? GPIO85_nPCE_1,
>> + ? ? ? GPIO54_nPCE_2,
>> + ? ? ? GPIO55_nPREG,
>> + ? ? ? GPIO50_nPIOR,
>> + ? ? ? GPIO51_nPIOW,
>> + ? ? ? GPIO49_nPWE,
>> + ? ? ? GPIO48_nPOE,
>> + ? ? ? GPIO57_nIOIS16,
>> + ? ? ? GPIO56_nPWAIT,
>> + ? ? ? GPIO104_PSKTSEL,
>> + ? ? ? GPIO53_GPIO, ? ?/* RESET */
>> + ? ? ? GPIO83_GPIO, ? ?/* BVD1 */
>> + ? ? ? GPIO82_GPIO, ? ?/* BVD2 */
>> + ? ? ? GPIO1_GPIO, ? ? /* READY */
>> + ? ? ? GPIO84_GPIO, ? ?/* DETECT */
>> + ? ? ? GPIO107_GPIO, ? /* PPEN */
>> ?};
>>
>> ?/******************************************************************************
>> diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
>> index c80a7a6..e9acf03 100644
>> --- a/drivers/pcmcia/Kconfig
>> +++ b/drivers/pcmcia/Kconfig
>> @@ -215,7 +215,7 @@ config PCMCIA_PXA2XX
>> ? ? ? ?depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
>> ? ? ? ? ? ? ? ? ? ?|| MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
>> ? ? ? ? ? ? ? ? ? ?|| ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
>> - ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3)
>> + ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
>> ? ? ? ?select PCMCIA_SOC_COMMON
>> ? ? ? ?help
>> ? ? ? ? ?Say Y here to include support for the PXA2xx PCMCIA controller
>> diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
>> index 8d9386a..2fee7ef 100644
>> --- a/drivers/pcmcia/Makefile
>> +++ b/drivers/pcmcia/Makefile
>> @@ -70,6 +70,7 @@ pxa2xx-obj-$(CONFIG_MACH_E740) ? ? ? ? ? ? ? ? ? ? ? ?+= pxa2xx_e740.o
>> ?pxa2xx-obj-$(CONFIG_MACH_STARGATE2) ? ? ? ? ? ?+= pxa2xx_stargate2.o
>> ?pxa2xx-obj-$(CONFIG_MACH_VPAC270) ? ? ? ? ? ? ?+= pxa2xx_vpac270.o
>> ?pxa2xx-obj-$(CONFIG_MACH_BALLOON3) ? ? ? ? ? ? += pxa2xx_balloon3.o
>> +pxa2xx-obj-$(CONFIG_MACH_COLIBRI) ? ? ? ? ? ? ?+= pxa2xx_colibri.o
>>
>> ?obj-$(CONFIG_PCMCIA_PXA2XX) ? ? ? ? ? ? ? ? ? ?+= pxa2xx_base.o $(pxa2xx-obj-y)
>>
>> diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c
>> new file mode 100644
>> index 0000000..4ed876c
>> --- /dev/null
>> +++ b/drivers/pcmcia/pxa2xx_colibri.c
>> @@ -0,0 +1,214 @@
>> +/*
>> + * linux/drivers/pcmcia/pxa2xx_colibri.c
>> + *
>> + * Driver for Toradex Colibri PXA270 CF socket
>> + *
>> + * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + *
>> + */
>> +
>> +#include <linux/module.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/delay.h>
>> +#include <linux/gpio.h>
>> +
>> +#include <asm/mach-types.h>
>> +
>> +#include "soc_common.h"
>> +
>> +#define ? ? ? ?COLIBRI270_RESET_GPIO ? 53
>> +#define ? ? ? ?COLIBRI270_PPEN_GPIO ? ?107
>> +#define ? ? ? ?COLIBRI270_BVD1_GPIO ? ?83
>> +#define ? ? ? ?COLIBRI270_BVD2_GPIO ? ?82
>> +#define ? ? ? ?COLIBRI270_DETECT_GPIO ?84
>> +#define ? ? ? ?COLIBRI270_READY_GPIO ? 1
>> +
>> +static struct {
>> + ? ? ? int ? ? reset_gpio;
>> + ? ? ? int ? ? ppen_gpio;
>> + ? ? ? int ? ? bvd1_gpio;
>> + ? ? ? int ? ? bvd2_gpio;
>> + ? ? ? int ? ? detect_gpio;
>> + ? ? ? int ? ? ready_gpio;
>> +} colibri_pcmcia_gpio;
>> +
>> +static struct pcmcia_irqs colibri_irqs[] = {
>> + ? ? ? {
>> + ? ? ? ? ? ? ? .sock = 0,
>> + ? ? ? ? ? ? ? .str ?= "PCMCIA CD"
>> + ? ? ? },
>> +};
>> +
>> +static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
>> +{
>> + ? ? ? int ret;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.detect_gpio, "DETECT");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err1;
>> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.detect_gpio);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err2;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.ready_gpio, "READY");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err2;
>> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.ready_gpio);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err3;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.bvd1_gpio, "BVD1");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err3;
>> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.bvd1_gpio);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err4;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.bvd2_gpio, "BVD2");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err4;
>> + ? ? ? ret = gpio_direction_input(colibri_pcmcia_gpio.bvd2_gpio);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err5;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.ppen_gpio, "PPEN");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err5;
>> + ? ? ? ret = gpio_direction_output(colibri_pcmcia_gpio.ppen_gpio, 0);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err6;
>> +
>> + ? ? ? ret = gpio_request(colibri_pcmcia_gpio.reset_gpio, "RESET");
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err6;
>> + ? ? ? ret = gpio_direction_output(colibri_pcmcia_gpio.reset_gpio, 1);
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? goto err7;
>> +
>> + ? ? ? colibri_irqs[0].irq = gpio_to_irq(colibri_pcmcia_gpio.detect_gpio);
>> + ? ? ? skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpio.ready_gpio);
>> +
>> + ? ? ? return soc_pcmcia_request_irqs(skt, colibri_irqs,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(colibri_irqs));
>> +
>> +err7:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.detect_gpio);
>> +err6:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.ready_gpio);
>> +err5:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
>> +err4:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
>> +err3:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.reset_gpio);
>> +err2:
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.ppen_gpio);
>> +err1:
>> + ? ? ? return ret;
>> +}
>
> I'd like to advocate for my newly introduced API for such usage:
>
> gpio_request_array() in include/asm-generic/gpio.h
>

Basically, you can define an array like this:

static struct gpio colibri270_pcmcia_gpios[] = {
	{ COLIBRI270_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "RESET" },
	{ COLIBRI270_PPEN_GPIO,  GPIOF_OUT_INIT_LOW,  "PPEN" },
	...

or

	{
		.label	= "RESET",
		.gpio	= COLIBRI270_RESET_GPIO,
		.flags	= GPIOF_OUT_INIT_HIGH,
	}, {
		.label	= "PPEN",
		.gpio	= COLIBRI270_PPEN_GPIO,
		.flags	= GPIOF_OUT_INIT_LOW,
	},
	...
};

>> +
>> +static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
>> +{
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.detect_gpio);
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.ready_gpio);
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.reset_gpio);
>> + ? ? ? gpio_free(colibri_pcmcia_gpio.ppen_gpio);
>> +}
>> +
>> +static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct pcmcia_state *state)
>> +{
>> +
>> + ? ? ? state->detect = !!gpio_get_value(colibri_pcmcia_gpio.detect_gpio);
>> + ? ? ? state->ready ?= !!gpio_get_value(colibri_pcmcia_gpio.ready_gpio);
>> + ? ? ? state->bvd1 ? = !!gpio_get_value(colibri_pcmcia_gpio.bvd1_gpio);
>> + ? ? ? state->bvd2 ? = !!gpio_get_value(colibri_pcmcia_gpio.bvd2_gpio);
>
> Can we make colibri_pcmcia_gpio some part of the *skt private data?
>
>> + ? ? ? state->wrprot = 0;
>> + ? ? ? state->vs_3v ?= 1;
>> + ? ? ? state->vs_Xv ?= 0;
>> +}
>> +
>> +static int
>> +colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const socket_state_t *state)
>> +{
>> + ? ? ? gpio_set_value(colibri_pcmcia_gpio.ppen_gpio,
>> + ? ? ? ? ? ? ? ? ? ? ? !(state->Vcc == 33 && state->Vpp < 50));
>> + ? ? ? gpio_set_value(colibri_pcmcia_gpio.reset_gpio, state->flags & SS_RESET);
>> + ? ? ? return 0;
>> +}
>> +
>> +static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
>> +{
>> +}
>> +
>> +static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
>> +{
>> +}
>> +
>> +static struct pcmcia_low_level colibri_pcmcia_ops = {
>> + ? ? ? .owner ? ? ? ? ? ? ? ? ?= THIS_MODULE,
>> +
>> + ? ? ? .first ? ? ? ? ? ? ? ? ?= 0,
>> + ? ? ? .nr ? ? ? ? ? ? ? ? ? ? = 1,
>> +
>> + ? ? ? .hw_init ? ? ? ? ? ? ? ?= colibri_pcmcia_hw_init,
>> + ? ? ? .hw_shutdown ? ? ? ? ? ?= colibri_pcmcia_hw_shutdown,
>> +
>> + ? ? ? .socket_state ? ? ? ? ? = colibri_pcmcia_socket_state,
>> + ? ? ? .configure_socket ? ? ? = colibri_pcmcia_configure_socket,
>> +
>> + ? ? ? .socket_init ? ? ? ? ? ?= colibri_pcmcia_socket_init,
>> + ? ? ? .socket_suspend ? ? ? ? = colibri_pcmcia_socket_suspend,
>> +};
>> +
>> +static struct platform_device *colibri_pcmcia_device;
>> +
>> +static int __init colibri_pcmcia_init(void)
>> +{
>> + ? ? ? int ret;
>> +
>> + ? ? ? colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
>> + ? ? ? if (!colibri_pcmcia_device)
>> + ? ? ? ? ? ? ? return -ENOMEM;
>> +
>> + ? ? ? /* Colibri PXA270 */
>> + ? ? ? if (machine_is_colibri()) {
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.reset_gpio ?= COLIBRI270_RESET_GPIO;
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ppen_gpio ? = COLIBRI270_PPEN_GPIO;
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd1_gpio ? = COLIBRI270_BVD1_GPIO;
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd2_gpio ? = COLIBRI270_BVD2_GPIO;
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO;
>> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ready_gpio ?= COLIBRI270_READY_GPIO;
>> + ? ? ? }
>> +
>> + ? ? ? ret = platform_device_add_data(colibri_pcmcia_device,
>> + ? ? ? ? ? ? ? &colibri_pcmcia_ops, sizeof(colibri_pcmcia_ops));
>> +
>> + ? ? ? if (!ret)
>> + ? ? ? ? ? ? ? ret = platform_device_add(colibri_pcmcia_device);
>> +
>> + ? ? ? if (ret)
>> + ? ? ? ? ? ? ? platform_device_put(colibri_pcmcia_device);
>> +
>> + ? ? ? return ret;
>> +}
>> +
>> +static void __exit colibri_pcmcia_exit(void)
>> +{
>> + ? ? ? platform_device_unregister(colibri_pcmcia_device);
>> +}
>> +
>> +module_init(colibri_pcmcia_init);
>> +module_exit(colibri_pcmcia_exit);
>> +
>> +MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
>> +MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
>> +MODULE_ALIAS("platform:pxa2xx-pcmcia");
>> +MODULE_LICENSE("GPL");
>> --
>> 1.7.1
>>
>>
>

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

* [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files
  2010-09-16  2:32 ` [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files Marek Vasut
@ 2010-09-20 14:29   ` Eric Miao
  2010-09-21 21:55     ` Marek Vasut
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> This change -- pushing the MFP configuration back into Module files -- is
> necessary because some evalboards can be used with multiple modules, where MFP
> differs from module to module. Therefore MFP isn't board-specific, but
> module-specific and the module should preconfigure itself for the board.
>
> (And there is also the C preprocesor limitation and conflicting #define-s)
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> ?arch/arm/mach-pxa/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?8 +-
> ?arch/arm/mach-pxa/colibri-pxa270-evalboard.c | ? 61 ++++-----------
> ?arch/arm/mach-pxa/colibri-pxa270-income.c ? ?| ? 47 -----------
> ?arch/arm/mach-pxa/colibri-pxa270.c ? ? ? ? ? | ? 96 ++++++++++++++++++++++
> ?arch/arm/mach-pxa/colibri-pxa300.c ? ? ? ? ? | ? 61 ++++++---------
> ?arch/arm/mach-pxa/colibri-pxa320.c ? ? ? ? ? | ?112 ++++++++++----------------
> ?arch/arm/mach-pxa/colibri-pxa3xx.c ? ? ? ? ? | ? 49 -----------
> ?arch/arm/mach-pxa/include/mach/colibri.h ? ? | ? ?6 ++
> ?8 files changed, 188 insertions(+), 252 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> index dd235ec..b44d613 100644
> --- a/arch/arm/mach-pxa/Kconfig
> +++ b/arch/arm/mach-pxa/Kconfig
> @@ -232,10 +232,6 @@ config MACH_COLIBRI
> ? ? ? ?bool "Toradex Colibri PXA270"
> ? ? ? ?select PXA27x
>
> -config MACH_COLIBRI_PXA270_EVALBOARD
> - ? ? ? bool "Toradex Colibri Evaluation Carrier Board support (PXA270)"
> - ? ? ? depends on MACH_COLIBRI
> -
> ?config MACH_COLIBRI_PXA270_INCOME
> ? ? ? ?bool "Income s.r.o. PXA270 SBC"
> ? ? ? ?depends on MACH_COLIBRI
> @@ -253,6 +249,10 @@ config MACH_COLIBRI320
> ? ? ? ?select PXA3xx
> ? ? ? ?select CPU_PXA320
>
> +config MACH_COLIBRI_PXA270_EVALBOARD
> + ? ? ? bool "Toradex Colibri Evaluation Carrier Board support"
> + ? ? ? depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
> +
> ?config MACH_VPAC270
> ? ? ? ?bool "Voipac PXA270"
> ? ? ? ?select PXA27x
> diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> index 6177ff5..e1a2b52 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> @@ -30,61 +30,28 @@
> ?#include "devices.h"
>
> ?/******************************************************************************
> - * Pin configuration
> - ******************************************************************************/
> -static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> - ? ? ? /* MMC */
> - ? ? ? GPIO32_MMC_CLK,
> - ? ? ? GPIO92_MMC_DAT_0,
> - ? ? ? GPIO109_MMC_DAT_1,
> - ? ? ? GPIO110_MMC_DAT_2,
> - ? ? ? GPIO111_MMC_DAT_3,
> - ? ? ? GPIO112_MMC_CMD,
> - ? ? ? GPIO0_GPIO, ? ? /* SD detect */
> -
> - ? ? ? /* FFUART */
> - ? ? ? GPIO39_FFUART_TXD,
> - ? ? ? GPIO34_FFUART_RXD,
> -
> - ? ? ? /* UHC */
> - ? ? ? GPIO88_USBH1_PWR,
> - ? ? ? GPIO89_USBH1_PEN,
> - ? ? ? GPIO119_USBH2_PWR,
> - ? ? ? GPIO120_USBH2_PEN,
> -
> - ? ? ? /* PCMCIA */
> - ? ? ? GPIO85_nPCE_1,
> - ? ? ? GPIO54_nPCE_2,
> - ? ? ? GPIO55_nPREG,
> - ? ? ? GPIO50_nPIOR,
> - ? ? ? GPIO51_nPIOW,
> - ? ? ? GPIO49_nPWE,
> - ? ? ? GPIO48_nPOE,
> - ? ? ? GPIO57_nIOIS16,
> - ? ? ? GPIO56_nPWAIT,
> - ? ? ? GPIO104_PSKTSEL,
> - ? ? ? GPIO53_GPIO, ? ?/* RESET */
> - ? ? ? GPIO83_GPIO, ? ?/* BVD1 */
> - ? ? ? GPIO82_GPIO, ? ?/* BVD2 */
> - ? ? ? GPIO1_GPIO, ? ? /* READY */
> - ? ? ? GPIO84_GPIO, ? ?/* DETECT */
> - ? ? ? GPIO107_GPIO, ? /* PPEN */
> -};
> -
> -/******************************************************************************
> ?* SD/MMC card controller
> ?******************************************************************************/
> ?#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> ?static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
> ? ? ? ?.ocr_mask ? ? ? ? ? ? ? = MMC_VDD_32_33 | MMC_VDD_33_34,
> ? ? ? ?.gpio_power ? ? ? ? ? ? = -1,
> - ? ? ? .gpio_card_detect ? ? ? = GPIO0_COLIBRI_PXA270_SD_DETECT,
> ? ? ? ?.gpio_card_ro ? ? ? ? ? = -1,
> ? ? ? ?.detect_delay_ms ? ? ? ?= 200,
> ?};
>
> ?static void __init colibri_pxa270_mmc_init(void)
> ?{
> + ? ? ? if (machine_is_colibri()) ? ? ? /* PXA270 Colibri */
> + ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO0_COLIBRI_PXA270_SD_DETECT;
> + ? ? ? if (machine_is_colibri300()) ? ?/* PXA300 Colibri */
> + ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO39_COLIBRI_PXA300_SD_DETECT;
> + ? ? ? else ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* PXA320 Colibri */
> + ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO28_COLIBRI_PXA320_SD_DETECT;
> +

It's a bit confusing here in a file called colibri-pxa270-evalboard.c
but pxa300 and
pxa320 code are there. And until I looked behind and saw the rename patch I came
to know how it's working.

Wouldn't be better to rename before change?

> ? ? ? ?pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
> ?}
> ?#else
> @@ -103,13 +70,17 @@ static int colibri_pxa270_ohci_init(struct device *dev)
>
> ?static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
> ? ? ? ?.port_mode ? ? ?= PMM_PERPORT_MODE,
> - ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 | ENABLE_PORT2 |
> + ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 |
> ? ? ? ? ? ? ? ? ? ? ? ? ?POWER_CONTROL_LOW | POWER_SENSE_LOW,
> ? ? ? ?.init ? ? ? ? ? = colibri_pxa270_ohci_init,
> ?};
>
> ?static void __init colibri_pxa270_uhc_init(void)
> ?{
> + ? ? ? /* Colibri PXA270 has two usb ports, TBA for 320 */
> + ? ? ? if (machine_is_colibri())
> + ? ? ? ? ? ? ? colibri_pxa270_ohci_info.flags ?|= ENABLE_PORT2;
> +
> ? ? ? ?pxa_set_ohci_info(&colibri_pxa270_ohci_info);
> ?}
> ?#else
> @@ -118,7 +89,6 @@ static inline void colibri_pxa270_uhc_init(void) {}
>
> ?void __init colibri_pxa270_evalboard_init(void)
> ?{
> - ? ? ? pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_evalboard_pin_config));
> ? ? ? ?pxa_set_ffuart_info(NULL);
> ? ? ? ?pxa_set_btuart_info(NULL);
> ? ? ? ?pxa_set_stuart_info(NULL);
> @@ -126,4 +96,3 @@ void __init colibri_pxa270_evalboard_init(void)
> ? ? ? ?colibri_pxa270_mmc_init();
> ? ? ? ?colibri_pxa270_uhc_init();
> ?}
> -
> diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c
> index 37f0f3e..07b62a0 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270-income.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c
> @@ -46,52 +46,6 @@
> ?#define GPIO113_INCOME_TS_IRQ ? (113)
>
> ?/******************************************************************************
> - * Pin configuration
> - ******************************************************************************/
> -static mfp_cfg_t income_pin_config[] __initdata = {
> - ? ? ? /* MMC */
> - ? ? ? GPIO32_MMC_CLK,
> - ? ? ? GPIO92_MMC_DAT_0,
> - ? ? ? GPIO109_MMC_DAT_1,
> - ? ? ? GPIO110_MMC_DAT_2,
> - ? ? ? GPIO111_MMC_DAT_3,
> - ? ? ? GPIO112_MMC_CMD,
> - ? ? ? GPIO0_GPIO, ? ? /* SD detect */
> - ? ? ? GPIO1_GPIO, ? ? /* SD read-only */
> -
> - ? ? ? /* FFUART */
> - ? ? ? GPIO39_FFUART_TXD,
> - ? ? ? GPIO34_FFUART_RXD,
> -
> - ? ? ? /* BFUART */
> - ? ? ? GPIO42_BTUART_RXD,
> - ? ? ? GPIO43_BTUART_TXD,
> - ? ? ? GPIO45_BTUART_RTS,
> -
> - ? ? ? /* STUART */
> - ? ? ? GPIO46_STUART_RXD,
> - ? ? ? GPIO47_STUART_TXD,
> -
> - ? ? ? /* UHC */
> - ? ? ? GPIO88_USBH1_PWR,
> - ? ? ? GPIO89_USBH1_PEN,
> -
> - ? ? ? /* LCD */
> - ? ? ? GPIOxx_LCD_TFT_16BPP,
> -
> - ? ? ? /* PWM */
> - ? ? ? GPIO16_PWM0_OUT,
> -
> - ? ? ? /* I2C */
> - ? ? ? GPIO117_I2C_SCL,
> - ? ? ? GPIO118_I2C_SDA,
> -
> - ? ? ? /* LED */
> - ? ? ? GPIO54_GPIO, ? ?/* LED A */
> - ? ? ? GPIO55_GPIO, ? ?/* LED B */
> -};
> -
> -/******************************************************************************
> ?* SD/MMC card controller
> ?******************************************************************************/
> ?#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> @@ -257,7 +211,6 @@ static inline void income_pwm_init(void) {}
>
> ?void __init colibri_pxa270_income_boardinit(void)
> ?{
> - ? ? ? pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> ? ? ? ?pxa_set_ffuart_info(NULL);
> ? ? ? ?pxa_set_btuart_info(NULL);
> ? ? ? ?pxa_set_stuart_info(NULL);
> diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
> index 98673ac..8488dfe 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> @@ -33,6 +33,99 @@
> ?#include "generic.h"
>
> ?/******************************************************************************
> + * Evaluation board MFP
> + ******************************************************************************/
> +#ifdef ?CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> + ? ? ? /* MMC */
> + ? ? ? GPIO32_MMC_CLK,
> + ? ? ? GPIO92_MMC_DAT_0,
> + ? ? ? GPIO109_MMC_DAT_1,
> + ? ? ? GPIO110_MMC_DAT_2,
> + ? ? ? GPIO111_MMC_DAT_3,
> + ? ? ? GPIO112_MMC_CMD,
> + ? ? ? GPIO0_GPIO, ? ? /* SD detect */
> +
> + ? ? ? /* FFUART */
> + ? ? ? GPIO39_FFUART_TXD,
> + ? ? ? GPIO34_FFUART_RXD,
> +
> + ? ? ? /* UHC */
> + ? ? ? GPIO88_USBH1_PWR,
> + ? ? ? GPIO89_USBH1_PEN,
> + ? ? ? GPIO119_USBH2_PWR,
> + ? ? ? GPIO120_USBH2_PEN,
> +
> + ? ? ? /* PCMCIA */
> + ? ? ? GPIO85_nPCE_1,
> + ? ? ? GPIO54_nPCE_2,
> + ? ? ? GPIO55_nPREG,
> + ? ? ? GPIO50_nPIOR,
> + ? ? ? GPIO51_nPIOW,
> + ? ? ? GPIO49_nPWE,
> + ? ? ? GPIO48_nPOE,
> + ? ? ? GPIO57_nIOIS16,
> + ? ? ? GPIO56_nPWAIT,
> + ? ? ? GPIO104_PSKTSEL,
> + ? ? ? GPIO53_GPIO, ? ?/* RESET */
> + ? ? ? GPIO83_GPIO, ? ?/* BVD1 */
> + ? ? ? GPIO82_GPIO, ? ?/* BVD2 */
> + ? ? ? GPIO1_GPIO, ? ? /* READY */
> + ? ? ? GPIO84_GPIO, ? ?/* DETECT */
> + ? ? ? GPIO107_GPIO, ? /* PPEN */
> +};
> +#else
> +static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
> +#endif
> +
> +#ifdef CONFIG_MACH_COLIBRI_PXA270_INCOME
> +static mfp_cfg_t income_pin_config[] __initdata = {
> + ? ? ? /* MMC */
> + ? ? ? GPIO32_MMC_CLK,
> + ? ? ? GPIO92_MMC_DAT_0,
> + ? ? ? GPIO109_MMC_DAT_1,
> + ? ? ? GPIO110_MMC_DAT_2,
> + ? ? ? GPIO111_MMC_DAT_3,
> + ? ? ? GPIO112_MMC_CMD,
> + ? ? ? GPIO0_GPIO, ? ? /* SD detect */
> + ? ? ? GPIO1_GPIO, ? ? /* SD read-only */
> +
> + ? ? ? /* FFUART */
> + ? ? ? GPIO39_FFUART_TXD,
> + ? ? ? GPIO34_FFUART_RXD,
> +
> + ? ? ? /* BFUART */
> + ? ? ? GPIO42_BTUART_RXD,
> + ? ? ? GPIO43_BTUART_TXD,
> + ? ? ? GPIO45_BTUART_RTS,
> +
> + ? ? ? /* STUART */
> + ? ? ? GPIO46_STUART_RXD,
> + ? ? ? GPIO47_STUART_TXD,
> +
> + ? ? ? /* UHC */
> + ? ? ? GPIO88_USBH1_PWR,
> + ? ? ? GPIO89_USBH1_PEN,
> +
> + ? ? ? /* LCD */
> + ? ? ? GPIOxx_LCD_TFT_16BPP,
> +
> + ? ? ? /* PWM */
> + ? ? ? GPIO16_PWM0_OUT,
> +
> + ? ? ? /* I2C */
> + ? ? ? GPIO117_I2C_SCL,
> + ? ? ? GPIO118_I2C_SDA,
> +
> + ? ? ? /* LED */
> + ? ? ? GPIO54_GPIO, ? ?/* LED A */
> + ? ? ? GPIO55_GPIO, ? ?/* LED B */
> +};
> +#else
> +static mfp_cfg_t income_pin_config[] __initdata = {};
> +#endif
> +
> +/******************************************************************************
> ?* Pin configuration
> ?******************************************************************************/
> ?static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
> @@ -185,9 +278,12 @@ static void __init colibri_pxa270_init(void)
>
> ? ? ? ?switch (colibri_pxa270_baseboard) {
> ? ? ? ?case COLIBRI_PXA270_EVALBOARD:
> + ? ? ? ? ? ? ? pxa2xx_mfp_config(ARRAY_AND_SIZE(
> + ? ? ? ? ? ? ? ? ? ? ? colibri_pxa270_evalboard_pin_config));
> ? ? ? ? ? ? ? ?colibri_pxa270_evalboard_init();
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case COLIBRI_PXA270_INCOME:
> + ? ? ? ? ? ? ? pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> ? ? ? ? ? ? ? ?colibri_pxa270_income_boardinit();
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
> index 40b6ac2..dab49ce 100644
> --- a/arch/arm/mach-pxa/colibri-pxa300.c
> +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> @@ -31,9 +31,28 @@
> ?#include "generic.h"
> ?#include "devices.h"
>
> +
> +#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
> + ? ? ? /* MMC */
> + ? ? ? GPIO7_MMC1_CLK,
> + ? ? ? GPIO14_MMC1_CMD,
> + ? ? ? GPIO3_MMC1_DAT0,
> + ? ? ? GPIO4_MMC1_DAT1,
> + ? ? ? GPIO5_MMC1_DAT2,
> + ? ? ? GPIO6_MMC1_DAT3,
> + ? ? ? GPIO39_GPIO, ? ?/* SD detect */
> +
> + ? ? ? /* UHC */
> + ? ? ? GPIO0_2_USBH_PEN,
> + ? ? ? GPIO1_2_USBH_PWR,
> +};
> +#else
> +static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
> +#endif
> +
> ?#if defined(CONFIG_AX88796)
> ?#define COLIBRI_ETH_IRQ_GPIO ? mfp_to_gpio(GPIO26_GPIO)
> -
> ?/*
> ?* Asix AX88796 Ethernet
> ?*/
> @@ -80,35 +99,6 @@ static void __init colibri_pxa300_init_eth(void)
> ?static inline void __init colibri_pxa300_init_eth(void) {}
> ?#endif /* CONFIG_AX88796 */
>
> -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> -static mfp_cfg_t colibri_pxa300_usb_pin_config[] __initdata = {
> - ? ? ? GPIO0_2_USBH_PEN,
> - ? ? ? GPIO1_2_USBH_PWR,
> -};
> -
> -static struct pxaohci_platform_data colibri_pxa300_ohci_info = {
> - ? ? ? .port_mode ? ? ?= PMM_GLOBAL_MODE,
> - ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
> -};
> -
> -void __init colibri_pxa300_init_ohci(void)
> -{
> - ? ? ? pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_usb_pin_config));
> - ? ? ? pxa_set_ohci_info(&colibri_pxa300_ohci_info);
> -}
> -#else
> -static inline void colibri_pxa300_init_ohci(void) {}
> -#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
> -
> -static mfp_cfg_t colibri_pxa300_mmc_pin_config[] __initdata = {
> - ? ? ? GPIO7_MMC1_CLK,
> - ? ? ? GPIO14_MMC1_CMD,
> - ? ? ? GPIO3_MMC1_DAT0,
> - ? ? ? GPIO4_MMC1_DAT1,
> - ? ? ? GPIO5_MMC1_DAT2,
> - ? ? ? GPIO6_MMC1_DAT3,
> -};
> -
> ?#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> ?static mfp_cfg_t colibri_pxa300_lcd_pin_config[] __initdata = {
> ? ? ? ?GPIO54_LCD_LDD_0,
> @@ -171,18 +161,15 @@ static inline void colibri_pxa310_init_ac97(void) {}
>
> ?void __init colibri_pxa300_init(void)
> ?{
> - ? ? ? pxa_set_ffuart_info(NULL);
> - ? ? ? pxa_set_btuart_info(NULL);
> - ? ? ? pxa_set_stuart_info(NULL);
> -
> ? ? ? ?colibri_pxa300_init_eth();
> - ? ? ? colibri_pxa300_init_ohci();
> ? ? ? ?colibri_pxa3xx_init_nand();
> ? ? ? ?colibri_pxa300_init_lcd();
> ? ? ? ?colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
> ? ? ? ?colibri_pxa310_init_ac97();
> - ? ? ? colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa300_mmc_pin_config),
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? mfp_to_gpio(MFP_PIN_GPIO13));
> +
> + ? ? ? /* Evalboard init */
> + ? ? ? pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
> + ? ? ? colibri_pxa270_evalboard_init();
> ?}
>
> ?MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
> diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
> index 99e850d..e886ab2 100644
> --- a/arch/arm/mach-pxa/colibri-pxa320.c
> +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> @@ -35,9 +35,47 @@
> ?#include "generic.h"
> ?#include "devices.h"
>
> +#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> + ? ? ? /* MMC */
> + ? ? ? GPIO22_MMC1_CLK,
> + ? ? ? GPIO23_MMC1_CMD,
> + ? ? ? GPIO18_MMC1_DAT0,
> + ? ? ? GPIO19_MMC1_DAT1,
> + ? ? ? GPIO20_MMC1_DAT2,
> + ? ? ? GPIO21_MMC1_DAT3,
> + ? ? ? GPIO28_GPIO, ? ?/* SD detect */
> +
> + ? ? ? /* UART 1 configuration (may be set by bootloader) */
> + ? ? ? GPIO99_UART1_CTS,
> + ? ? ? GPIO104_UART1_RTS,
> + ? ? ? GPIO97_UART1_RXD,
> + ? ? ? GPIO98_UART1_TXD,
> + ? ? ? GPIO101_UART1_DTR,
> + ? ? ? GPIO103_UART1_DSR,
> + ? ? ? GPIO100_UART1_DCD,
> + ? ? ? GPIO102_UART1_RI,
> +
> + ? ? ? /* UART 2 configuration */
> + ? ? ? GPIO109_UART2_CTS,
> + ? ? ? GPIO112_UART2_RTS,
> + ? ? ? GPIO110_UART2_RXD,
> + ? ? ? GPIO111_UART2_TXD,
> +
> + ? ? ? /* UART 3 configuration */
> + ? ? ? GPIO30_UART3_RXD,
> + ? ? ? GPIO31_UART3_TXD,
> +
> + ? ? ? /* UHC */
> + ? ? ? GPIO2_2_USBH_PEN,
> + ? ? ? GPIO3_2_USBH_PWR,
> +};
> +#else
> +static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
> +#endif
> +
> ?#if defined(CONFIG_AX88796)
> ?#define COLIBRI_ETH_IRQ_GPIO ? mfp_to_gpio(GPIO36_GPIO)
> -
> ?/*
> ?* Asix AX88796 Ethernet
> ?*/
> @@ -84,26 +122,6 @@ static void __init colibri_pxa320_init_eth(void)
> ?static inline void __init colibri_pxa320_init_eth(void) {}
> ?#endif /* CONFIG_AX88796 */
>
> -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> -static mfp_cfg_t colibri_pxa320_usb_pin_config[] __initdata = {
> - ? ? ? GPIO2_2_USBH_PEN,
> - ? ? ? GPIO3_2_USBH_PWR,
> -};
> -
> -static struct pxaohci_platform_data colibri_pxa320_ohci_info = {
> - ? ? ? .port_mode ? ? ?= PMM_GLOBAL_MODE,
> - ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
> -};
> -
> -void __init colibri_pxa320_init_ohci(void)
> -{
> - ? ? ? pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_usb_pin_config));
> - ? ? ? pxa_set_ohci_info(&colibri_pxa320_ohci_info);
> -}
> -#else
> -static inline void colibri_pxa320_init_ohci(void) {}
> -#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
> -
> ?#if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE)
> ?static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = {
> ? ? ? ?.gpio_vbus ? ? ? ? ? ? ?= mfp_to_gpio(MFP_PIN_GPIO96),
> @@ -140,15 +158,6 @@ static void __init colibri_pxa320_init_udc(void)
> ?static inline void colibri_pxa320_init_udc(void) {}
> ?#endif
>
> -static mfp_cfg_t colibri_pxa320_mmc_pin_config[] __initdata = {
> - ? ? ? GPIO22_MMC1_CLK,
> - ? ? ? GPIO23_MMC1_CMD,
> - ? ? ? GPIO18_MMC1_DAT0,
> - ? ? ? GPIO19_MMC1_DAT1,
> - ? ? ? GPIO20_MMC1_DAT2,
> - ? ? ? GPIO21_MMC1_DAT3
> -};
> -
> ?#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> ?static mfp_cfg_t colibri_pxa320_lcd_pin_config[] __initdata = {
> ? ? ? ?GPIO6_2_LCD_LDD_0,
> @@ -205,53 +214,18 @@ static inline void __init colibri_pxa320_init_ac97(void)
> ?static inline void colibri_pxa320_init_ac97(void) {}
> ?#endif
>
> -/*
> - * The following configuration is verified to work with the Toradex Orchid
> - * carrier board
> - */
> -static mfp_cfg_t colibri_pxa320_uart_pin_config[] __initdata = {
> - ? ? ? /* UART 1 configuration (may be set by bootloader) */
> - ? ? ? GPIO99_UART1_CTS,
> - ? ? ? GPIO104_UART1_RTS,
> - ? ? ? GPIO97_UART1_RXD,
> - ? ? ? GPIO98_UART1_TXD,
> - ? ? ? GPIO101_UART1_DTR,
> - ? ? ? GPIO103_UART1_DSR,
> - ? ? ? GPIO100_UART1_DCD,
> - ? ? ? GPIO102_UART1_RI,
> -
> - ? ? ? /* UART 2 configuration */
> - ? ? ? GPIO109_UART2_CTS,
> - ? ? ? GPIO112_UART2_RTS,
> - ? ? ? GPIO110_UART2_RXD,
> - ? ? ? GPIO111_UART2_TXD,
> -
> - ? ? ? /* UART 3 configuration */
> - ? ? ? GPIO30_UART3_RXD,
> - ? ? ? GPIO31_UART3_TXD,
> -};
> -
> -static void __init colibri_pxa320_init_uart(void)
> -{
> - ? ? ? pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_uart_pin_config));
> -}
> -
> ?void __init colibri_pxa320_init(void)
> ?{
> - ? ? ? pxa_set_ffuart_info(NULL);
> - ? ? ? pxa_set_btuart_info(NULL);
> - ? ? ? pxa_set_stuart_info(NULL);
> -
> ? ? ? ?colibri_pxa320_init_eth();
> - ? ? ? colibri_pxa320_init_ohci();
> ? ? ? ?colibri_pxa3xx_init_nand();
> ? ? ? ?colibri_pxa320_init_lcd();
> ? ? ? ?colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
> ? ? ? ?colibri_pxa320_init_ac97();
> - ? ? ? colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config),
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? mfp_to_gpio(MFP_PIN_GPIO28));
> - ? ? ? colibri_pxa320_init_uart();
> ? ? ? ?colibri_pxa320_init_udc();
> +
> + ? ? ? /* Evalboard init */
> + ? ? ? pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
> + ? ? ? colibri_pxa270_evalboard_init();
> ?}
>
> ?MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
> diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
> index 199afa2..96b2d9f 100644
> --- a/arch/arm/mach-pxa/colibri-pxa3xx.c
> +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
> @@ -64,55 +64,6 @@ void __init colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data)
> ?}
> ?#endif
>
> -#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> -static int mmc_detect_pin;
> -
> -static int colibri_pxa3xx_mci_init(struct device *dev,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?irq_handler_t colibri_mmc_detect_int,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?void *data)
> -{
> - ? ? ? int ret;
> -
> - ? ? ? ret = gpio_request(mmc_detect_pin, "mmc card detect");
> - ? ? ? if (ret)
> - ? ? ? ? ? ? ? return ret;
> -
> - ? ? ? gpio_direction_input(mmc_detect_pin);
> - ? ? ? ret = request_irq(gpio_to_irq(mmc_detect_pin), colibri_mmc_detect_int,
> - ? ? ? ? ? ? ? ? ? ? ? ? IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> - ? ? ? ? ? ? ? ? ? ? ? ? "MMC card detect", data);
> - ? ? ? if (ret) {
> - ? ? ? ? ? ? ? gpio_free(mmc_detect_pin);
> - ? ? ? ? ? ? ? return ret;
> - ? ? ? }
> -
> - ? ? ? return 0;
> -}
> -
> -static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
> -{
> - ? ? ? free_irq(mmc_detect_pin, data);
> - ? ? ? gpio_free(gpio_to_irq(mmc_detect_pin));
> -}
> -
> -static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
> - ? ? ? .detect_delay_ms ? ? ? ?= 200,
> - ? ? ? .ocr_mask ? ? ? ? ? ? ? = MMC_VDD_32_33 | MMC_VDD_33_34,
> - ? ? ? .init ? ? ? ? ? ? ? ? ? = colibri_pxa3xx_mci_init,
> - ? ? ? .exit ? ? ? ? ? ? ? ? ? = colibri_pxa3xx_mci_exit,
> - ? ? ? .gpio_card_detect ? ? ? = -1,
> - ? ? ? .gpio_card_ro ? ? ? ? ? = -1,
> - ? ? ? .gpio_power ? ? ? ? ? ? = -1,
> -};
> -
> -void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
> -{
> - ? ? ? pxa3xx_mfp_config(pins, len);
> - ? ? ? mmc_detect_pin = detect_pin;
> - ? ? ? pxa_set_mci_info(&colibri_pxa3xx_mci_platform_data);
> -}
> -#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */
> -
> ?#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> ?static int lcd_bl_pin;
>
> diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
> index 58dada1..63a948a 100644
> --- a/arch/arm/mach-pxa/include/mach/colibri.h
> +++ b/arch/arm/mach-pxa/include/mach/colibri.h
> @@ -59,5 +59,11 @@ static inline void colibri_pxa3xx_init_nand(void) {}
> ?#define GPIO0_COLIBRI_PXA270_SD_DETECT 0
> ?#define GPIO113_COLIBRI_PXA270_TS_IRQ ?113
>
> +/* GPIO definitions for Colibri PXA300/310 */
> +#define GPIO39_COLIBRI_PXA300_SD_DETECT ? ? ? ?39
> +
> +/* GPIO definitions for Colibri PXA320 */
> +#define GPIO28_COLIBRI_PXA320_SD_DETECT ? ? ? ?28
> +
> ?#endif /* _COLIBRI_H_ */
>
> --
> 1.7.1
>
>

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

* [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard
  2010-09-16  2:32 ` [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard Marek Vasut
@ 2010-09-20 14:40   ` Eric Miao
  0 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Acked-by: Daniel Mack <daniel@caiaq.de>

OK.

> ---
> ?arch/arm/mach-pxa/colibri-pxa270-evalboard.c | ? 23 +++++++++++++++++++++++
> ?arch/arm/mach-pxa/colibri-pxa270.c ? ? ? ? ? | ? ?4 ++++
> ?arch/arm/mach-pxa/colibri-pxa300.c ? ? ? ? ? | ? ?4 ++++
> ?arch/arm/mach-pxa/colibri-pxa320.c ? ? ? ? ? | ? ?4 ++++
> ?4 files changed, 35 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> index e1a2b52..7f27aec 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> @@ -19,6 +19,7 @@
> ?#include <asm/mach-types.h>
> ?#include <mach/hardware.h>
> ?#include <asm/mach/arch.h>
> +#include <linux/i2c.h>
>
> ?#include <mach/pxa27x.h>
> ?#include <mach/colibri.h>
> @@ -26,6 +27,8 @@
> ?#include <mach/ohci.h>
> ?#include <mach/pxa27x-udc.h>
>
> +#include <plat/i2c.h>
> +
> ?#include "generic.h"
> ?#include "devices.h"
>
> @@ -87,6 +90,25 @@ static void __init colibri_pxa270_uhc_init(void)
> ?static inline void colibri_pxa270_uhc_init(void) {}
> ?#endif
>
> +/******************************************************************************
> + * I2C RTC
> + ******************************************************************************/
> +#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
> +static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
> + ? ? ? {
> + ? ? ? ? ? ? ? I2C_BOARD_INFO("m41t00", 0x68),
> + ? ? ? },
> +};
> +
> +static void __init colibri_pxa270_rtc_init(void)
> +{
> + ? ? ? pxa_set_i2c_info(NULL);
> + ? ? ? i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
> +}
> +#else
> +static inline void colibri_pxa270_rtc_init(void) {}
> +#endif
> +
> ?void __init colibri_pxa270_evalboard_init(void)
> ?{
> ? ? ? ?pxa_set_ffuart_info(NULL);
> @@ -95,4 +117,5 @@ void __init colibri_pxa270_evalboard_init(void)
>
> ? ? ? ?colibri_pxa270_mmc_init();
> ? ? ? ?colibri_pxa270_uhc_init();
> + ? ? ? colibri_pxa270_rtc_init();
> ?}
> diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
> index 8488dfe..1024da5 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> @@ -73,6 +73,10 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> ? ? ? ?GPIO1_GPIO, ? ? /* READY */
> ? ? ? ?GPIO84_GPIO, ? ?/* DETECT */
> ? ? ? ?GPIO107_GPIO, ? /* PPEN */
> +
> + ? ? ? /* I2C */
> + ? ? ? GPIO117_I2C_SCL,
> + ? ? ? GPIO118_I2C_SDA,
> ?};
> ?#else
> ?static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
> diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
> index dab49ce..5bf8055 100644
> --- a/arch/arm/mach-pxa/colibri-pxa300.c
> +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> @@ -46,6 +46,10 @@ static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* UHC */
> ? ? ? ?GPIO0_2_USBH_PEN,
> ? ? ? ?GPIO1_2_USBH_PWR,
> +
> + ? ? ? /* I2C */
> + ? ? ? GPIO21_I2C_SCL,
> + ? ? ? GPIO22_I2C_SDA,
> ?};
> ?#else
> ?static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
> diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
> index e886ab2..4257382 100644
> --- a/arch/arm/mach-pxa/colibri-pxa320.c
> +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> @@ -69,6 +69,10 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* UHC */
> ? ? ? ?GPIO2_2_USBH_PEN,
> ? ? ? ?GPIO3_2_USBH_PWR,
> +
> + ? ? ? /* I2C */
> + ? ? ? GPIO32_I2C_SCL,
> + ? ? ? GPIO33_I2C_SDA,
> ?};
> ?#else
> ?static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
> --
> 1.7.1
>
>

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

* [PATCH 05/11] ARM: pxa: Rename Colibri evalboard
  2010-09-16  2:32 ` [PATCH 05/11] ARM: pxa: Rename " Marek Vasut
@ 2010-09-20 14:41   ` Eric Miao
  2010-09-21 21:53     ` Marek Vasut
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Rename colibri-pxa270-evalboard to colibri-evalboard as this board is used with
> all Colibri modules.

As mentioned, would be more straight-forward if this rename happens
first?

>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> ?arch/arm/mach-pxa/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-pxa/Makefile ? ? ? ? ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-pxa/colibri-evalboard.c ? ? ? ?| ?121 ++++++++++++++++++++++++++
> ?arch/arm/mach-pxa/colibri-pxa270-evalboard.c | ?121 --------------------------
> ?arch/arm/mach-pxa/colibri-pxa270.c ? ? ? ? ? | ? ?6 +-
> ?arch/arm/mach-pxa/colibri-pxa300.c ? ? ? ? ? | ? ?4 +-
> ?arch/arm/mach-pxa/colibri-pxa320.c ? ? ? ? ? | ? ?4 +-
> ?arch/arm/mach-pxa/include/mach/colibri.h ? ? | ? ?8 +-
> ?8 files changed, 134 insertions(+), 134 deletions(-)
> ?create mode 100644 arch/arm/mach-pxa/colibri-evalboard.c
> ?delete mode 100644 arch/arm/mach-pxa/colibri-pxa270-evalboard.c
>
> diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> index b44d613..e0ac5aa 100644
> --- a/arch/arm/mach-pxa/Kconfig
> +++ b/arch/arm/mach-pxa/Kconfig
> @@ -249,7 +249,7 @@ config MACH_COLIBRI320
> ? ? ? ?select PXA3xx
> ? ? ? ?select CPU_PXA320
>
> -config MACH_COLIBRI_PXA270_EVALBOARD
> +config MACH_COLIBRI_EVALBOARD
> ? ? ? ?bool "Toradex Colibri Evaluation Carrier Board support"
> ? ? ? ?depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
>
> diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
> index e2f89c2..3197756 100644
> --- a/arch/arm/mach-pxa/Makefile
> +++ b/arch/arm/mach-pxa/Makefile
> @@ -60,7 +60,7 @@ obj-$(CONFIG_MACH_LOGICPD_PXA270) ? ? += lpd270.o
> ?obj-$(CONFIG_MACH_PCM027) ? ? ? ? ? ? ?+= pcm027.o
> ?obj-$(CONFIG_MACH_PCM990_BASEBOARD) ? ?+= pcm990-baseboard.o
> ?obj-$(CONFIG_MACH_COLIBRI) ? ? ? ? ? ? ? ? ? ? += colibri-pxa270.o
> -obj-$(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD) ? ?+= colibri-pxa270-evalboard.o
> +obj-$(CONFIG_MACH_COLIBRI_EVALBOARD) ? += colibri-evalboard.o
> ?obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME) ? ? ? += colibri-pxa270-income.o
> ?obj-$(CONFIG_MACH_COLIBRI300) ?+= colibri-pxa3xx.o colibri-pxa300.o
> ?obj-$(CONFIG_MACH_COLIBRI320) ?+= colibri-pxa3xx.o colibri-pxa320.o
> diff --git a/arch/arm/mach-pxa/colibri-evalboard.c b/arch/arm/mach-pxa/colibri-evalboard.c
> new file mode 100644
> index 0000000..6b2c800
> --- /dev/null
> +++ b/arch/arm/mach-pxa/colibri-evalboard.c
> @@ -0,0 +1,121 @@
> +/*
> + * ?linux/arch/arm/mach-pxa/colibri-evalboard.c
> + *
> + * ?Support for Toradex Colibri Evaluation Carrier Board
> + * ?Daniel Mack <daniel@caiaq.de>
> + * ?Marek Vasut <marek.vasut@gmail.com>
> + *
> + * ?This program is free software; you can redistribute it and/or modify
> + * ?it under the terms of the GNU General Public License version 2 as
> + * ?published by the Free Software Foundation.
> + */
> +
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/platform_device.h>
> +#include <linux/sysdev.h>
> +#include <linux/interrupt.h>
> +#include <linux/gpio.h>
> +#include <asm/mach-types.h>
> +#include <mach/hardware.h>
> +#include <asm/mach/arch.h>
> +#include <linux/i2c.h>
> +
> +#include <mach/pxa27x.h>
> +#include <mach/colibri.h>
> +#include <mach/mmc.h>
> +#include <mach/ohci.h>
> +#include <mach/pxa27x-udc.h>
> +
> +#include <plat/i2c.h>
> +
> +#include "generic.h"
> +#include "devices.h"
> +
> +/******************************************************************************
> + * SD/MMC card controller
> + ******************************************************************************/
> +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> +static struct pxamci_platform_data colibri_mci_platform_data = {
> + ? ? ? .ocr_mask ? ? ? ? ? ? ? = MMC_VDD_32_33 | MMC_VDD_33_34,
> + ? ? ? .gpio_power ? ? ? ? ? ? = -1,
> + ? ? ? .gpio_card_ro ? ? ? ? ? = -1,
> + ? ? ? .detect_delay_ms ? ? ? ?= 200,
> +};
> +
> +static void __init colibri_mmc_init(void)
> +{
> + ? ? ? if (machine_is_colibri()) ? ? ? /* PXA270 Colibri */
> + ? ? ? ? ? ? ? colibri_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO0_COLIBRI_PXA270_SD_DETECT;
> + ? ? ? if (machine_is_colibri300()) ? ?/* PXA300 Colibri */
> + ? ? ? ? ? ? ? colibri_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO39_COLIBRI_PXA300_SD_DETECT;
> + ? ? ? else ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* PXA320 Colibri */
> + ? ? ? ? ? ? ? colibri_mci_platform_data.gpio_card_detect =
> + ? ? ? ? ? ? ? ? ? ? ? GPIO28_COLIBRI_PXA320_SD_DETECT;
> +
> + ? ? ? pxa_set_mci_info(&colibri_mci_platform_data);
> +}
> +#else
> +static inline void colibri_mmc_init(void) {}
> +#endif
> +
> +/******************************************************************************
> + * USB Host
> + ******************************************************************************/
> +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> +static int colibri_ohci_init(struct device *dev)
> +{
> + ? ? ? UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
> + ? ? ? return 0;
> +}
> +
> +static struct pxaohci_platform_data colibri_ohci_info = {
> + ? ? ? .port_mode ? ? ?= PMM_PERPORT_MODE,
> + ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 |
> + ? ? ? ? ? ? ? ? ? ? ? ? POWER_CONTROL_LOW | POWER_SENSE_LOW,
> + ? ? ? .init ? ? ? ? ? = colibri_ohci_init,
> +};
> +
> +static void __init colibri_uhc_init(void)
> +{
> + ? ? ? /* Colibri PXA270 has two usb ports, TBA for 320 */
> + ? ? ? if (machine_is_colibri())
> + ? ? ? ? ? ? ? colibri_ohci_info.flags |= ENABLE_PORT2;
> +
> + ? ? ? pxa_set_ohci_info(&colibri_ohci_info);
> +}
> +#else
> +static inline void colibri_uhc_init(void) {}
> +#endif
> +
> +/******************************************************************************
> + * I2C RTC
> + ******************************************************************************/
> +#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
> +static struct i2c_board_info __initdata colibri_i2c_devs[] = {
> + ? ? ? {
> + ? ? ? ? ? ? ? I2C_BOARD_INFO("m41t00", 0x68),
> + ? ? ? },
> +};
> +
> +static void __init colibri_rtc_init(void)
> +{
> + ? ? ? pxa_set_i2c_info(NULL);
> + ? ? ? i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_i2c_devs));
> +}
> +#else
> +static inline void colibri_rtc_init(void) {}
> +#endif
> +
> +void __init colibri_evalboard_init(void)
> +{
> + ? ? ? pxa_set_ffuart_info(NULL);
> + ? ? ? pxa_set_btuart_info(NULL);
> + ? ? ? pxa_set_stuart_info(NULL);
> +
> + ? ? ? colibri_mmc_init();
> + ? ? ? colibri_uhc_init();
> + ? ? ? colibri_rtc_init();
> +}
> diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> deleted file mode 100644
> index 7f27aec..0000000
> --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> +++ /dev/null
> @@ -1,121 +0,0 @@
> -/*
> - * ?linux/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> - *
> - * ?Support for Toradex PXA270 based Colibri Evaluation Carrier Board
> - * ?Daniel Mack <daniel@caiaq.de>
> - * ?Marek Vasut <marek.vasut@gmail.com>
> - *
> - * ?This program is free software; you can redistribute it and/or modify
> - * ?it under the terms of the GNU General Public License version 2 as
> - * ?published by the Free Software Foundation.
> - */
> -
> -#include <linux/init.h>
> -#include <linux/kernel.h>
> -#include <linux/platform_device.h>
> -#include <linux/sysdev.h>
> -#include <linux/interrupt.h>
> -#include <linux/gpio.h>
> -#include <asm/mach-types.h>
> -#include <mach/hardware.h>
> -#include <asm/mach/arch.h>
> -#include <linux/i2c.h>
> -
> -#include <mach/pxa27x.h>
> -#include <mach/colibri.h>
> -#include <mach/mmc.h>
> -#include <mach/ohci.h>
> -#include <mach/pxa27x-udc.h>
> -
> -#include <plat/i2c.h>
> -
> -#include "generic.h"
> -#include "devices.h"
> -
> -/******************************************************************************
> - * SD/MMC card controller
> - ******************************************************************************/
> -#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> -static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
> - ? ? ? .ocr_mask ? ? ? ? ? ? ? = MMC_VDD_32_33 | MMC_VDD_33_34,
> - ? ? ? .gpio_power ? ? ? ? ? ? = -1,
> - ? ? ? .gpio_card_ro ? ? ? ? ? = -1,
> - ? ? ? .detect_delay_ms ? ? ? ?= 200,
> -};
> -
> -static void __init colibri_pxa270_mmc_init(void)
> -{
> - ? ? ? if (machine_is_colibri()) ? ? ? /* PXA270 Colibri */
> - ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> - ? ? ? ? ? ? ? ? ? ? ? GPIO0_COLIBRI_PXA270_SD_DETECT;
> - ? ? ? if (machine_is_colibri300()) ? ?/* PXA300 Colibri */
> - ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> - ? ? ? ? ? ? ? ? ? ? ? GPIO39_COLIBRI_PXA300_SD_DETECT;
> - ? ? ? else ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* PXA320 Colibri */
> - ? ? ? ? ? ? ? colibri_pxa270_mci_platform_data.gpio_card_detect =
> - ? ? ? ? ? ? ? ? ? ? ? GPIO28_COLIBRI_PXA320_SD_DETECT;
> -
> - ? ? ? pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
> -}
> -#else
> -static inline void colibri_pxa270_mmc_init(void) {}
> -#endif
> -
> -/******************************************************************************
> - * USB Host
> - ******************************************************************************/
> -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> -static int colibri_pxa270_ohci_init(struct device *dev)
> -{
> - ? ? ? UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
> - ? ? ? return 0;
> -}
> -
> -static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
> - ? ? ? .port_mode ? ? ?= PMM_PERPORT_MODE,
> - ? ? ? .flags ? ? ? ? ?= ENABLE_PORT1 |
> - ? ? ? ? ? ? ? ? ? ? ? ? POWER_CONTROL_LOW | POWER_SENSE_LOW,
> - ? ? ? .init ? ? ? ? ? = colibri_pxa270_ohci_init,
> -};
> -
> -static void __init colibri_pxa270_uhc_init(void)
> -{
> - ? ? ? /* Colibri PXA270 has two usb ports, TBA for 320 */
> - ? ? ? if (machine_is_colibri())
> - ? ? ? ? ? ? ? colibri_pxa270_ohci_info.flags ?|= ENABLE_PORT2;
> -
> - ? ? ? pxa_set_ohci_info(&colibri_pxa270_ohci_info);
> -}
> -#else
> -static inline void colibri_pxa270_uhc_init(void) {}
> -#endif
> -
> -/******************************************************************************
> - * I2C RTC
> - ******************************************************************************/
> -#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
> -static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
> - ? ? ? {
> - ? ? ? ? ? ? ? I2C_BOARD_INFO("m41t00", 0x68),
> - ? ? ? },
> -};
> -
> -static void __init colibri_pxa270_rtc_init(void)
> -{
> - ? ? ? pxa_set_i2c_info(NULL);
> - ? ? ? i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
> -}
> -#else
> -static inline void colibri_pxa270_rtc_init(void) {}
> -#endif
> -
> -void __init colibri_pxa270_evalboard_init(void)
> -{
> - ? ? ? pxa_set_ffuart_info(NULL);
> - ? ? ? pxa_set_btuart_info(NULL);
> - ? ? ? pxa_set_stuart_info(NULL);
> -
> - ? ? ? colibri_pxa270_mmc_init();
> - ? ? ? colibri_pxa270_uhc_init();
> - ? ? ? colibri_pxa270_rtc_init();
> -}
> diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
> index 1024da5..dc05af4 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> @@ -35,7 +35,7 @@
> ?/******************************************************************************
> ?* Evaluation board MFP
> ?******************************************************************************/
> -#ifdef ?CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +#ifdef ?CONFIG_MACH_COLIBRI_EVALBOARD
> ?static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* MMC */
> ? ? ? ?GPIO32_MMC_CLK,
> @@ -281,10 +281,10 @@ static void __init colibri_pxa270_init(void)
> ? ? ? ?colibri_pxa270_tsc_init();
>
> ? ? ? ?switch (colibri_pxa270_baseboard) {
> - ? ? ? case COLIBRI_PXA270_EVALBOARD:
> + ? ? ? case COLIBRI_EVALBOARD:
> ? ? ? ? ? ? ? ?pxa2xx_mfp_config(ARRAY_AND_SIZE(
> ? ? ? ? ? ? ? ? ? ? ? ?colibri_pxa270_evalboard_pin_config));
> - ? ? ? ? ? ? ? colibri_pxa270_evalboard_init();
> + ? ? ? ? ? ? ? colibri_evalboard_init();
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case COLIBRI_PXA270_INCOME:
> ? ? ? ? ? ? ? ?pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
> index 5bf8055..77e760f 100644
> --- a/arch/arm/mach-pxa/colibri-pxa300.c
> +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> @@ -32,7 +32,7 @@
> ?#include "devices.h"
>
>
> -#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +#ifdef CONFIG_MACH_COLIBRI_EVALBOARD
> ?static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* MMC */
> ? ? ? ?GPIO7_MMC1_CLK,
> @@ -173,7 +173,7 @@ void __init colibri_pxa300_init(void)
>
> ? ? ? ?/* Evalboard init */
> ? ? ? ?pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
> - ? ? ? colibri_pxa270_evalboard_init();
> + ? ? ? colibri_evalboard_init();
> ?}
>
> ?MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
> diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
> index 4257382..7c003cd 100644
> --- a/arch/arm/mach-pxa/colibri-pxa320.c
> +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> @@ -35,7 +35,7 @@
> ?#include "generic.h"
> ?#include "devices.h"
>
> -#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> +#ifdef CONFIG_MACH_COLIBRI_EVALBOARD
> ?static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* MMC */
> ? ? ? ?GPIO22_MMC1_CLK,
> @@ -229,7 +229,7 @@ void __init colibri_pxa320_init(void)
>
> ? ? ? ?/* Evalboard init */
> ? ? ? ?pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
> - ? ? ? colibri_pxa270_evalboard_init();
> + ? ? ? colibri_evalboard_init();
> ?}
>
> ?MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
> diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
> index 63a948a..388a96f 100644
> --- a/arch/arm/mach-pxa/include/mach/colibri.h
> +++ b/arch/arm/mach-pxa/include/mach/colibri.h
> @@ -9,14 +9,14 @@
> ?*/
>
> ?enum {
> - ? ? ? COLIBRI_PXA270_EVALBOARD = 0,
> + ? ? ? COLIBRI_EVALBOARD = 0,
> ? ? ? ?COLIBRI_PXA270_INCOME,
> ?};
>
> -#if defined(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD)
> -extern void colibri_pxa270_evalboard_init(void);
> +#if defined(CONFIG_MACH_COLIBRI_EVALBOARD)
> +extern void colibri_evalboard_init(void);
> ?#else
> -static inline void colibri_pxa270_evalboard_init(void) {}
> +static inline void colibri_evalboard_init(void) {}
> ?#endif
>
> ?#if defined(CONFIG_MACH_COLIBRI_PXA270_INCOME)
> --
> 1.7.1
>
>

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

* [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver
  2010-09-16  2:32 ` [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver Marek Vasut
@ 2010-09-20 14:43   ` Eric Miao
  2010-09-21 21:52     ` Marek Vasut
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> ?arch/arm/mach-pxa/colibri-pxa320.c | ? 21 +++++++++++++++++++++
> ?drivers/pcmcia/Kconfig ? ? ? ? ? ? | ? ?3 ++-
> ?drivers/pcmcia/Makefile ? ? ? ? ? ?| ? ?1 +
> ?drivers/pcmcia/pxa2xx_colibri.c ? ?| ? 17 ++++++++++++++++-
> ?4 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
> index 7c003cd..6cd83fa 100644
> --- a/arch/arm/mach-pxa/colibri-pxa320.c
> +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> @@ -73,6 +73,27 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> ? ? ? ?/* I2C */
> ? ? ? ?GPIO32_I2C_SCL,
> ? ? ? ?GPIO33_I2C_SDA,
> +
> + ? ? ? /* PCMCIA */
> + ? ? ? MFP_CFG(GPIO59, AF7), ? /* PRST ; AF7 to tristate */
> + ? ? ? MFP_CFG(GPIO61, AF7), ? /* PCE1 ; AF7 to tristate */
> + ? ? ? MFP_CFG(GPIO60, AF7), ? /* PCE2 ; AF7 to tristate */
> + ? ? ? MFP_CFG(GPIO62, AF7), ? /* PCD ; AF7 to tristate */
> + ? ? ? MFP_CFG(GPIO56, AF7), ? /* PSKTSEL ; AF7 to tristate */

If this is useful for other platforms, making them macros would be helpful.

And using MFP_CFG() directly is not encouraged, any specific reason
to use this?

> + ? ? ? GPIO27_GPIO, ? ? ? ? ? ?/* RDnWR ; input/tristate */
> + ? ? ? GPIO50_GPIO, ? ? ? ? ? ?/* PREG ; input/tristate */
> + ? ? ? GPIO2_RDY,
> + ? ? ? GPIO5_NPIOR,
> + ? ? ? GPIO6_NPIOW,
> + ? ? ? GPIO7_NPIOS16,
> + ? ? ? GPIO8_NPWAIT,
> + ? ? ? GPIO29_GPIO, ? ? ? ? ? ?/* PRDY (READY GPIO) */
> + ? ? ? GPIO57_GPIO, ? ? ? ? ? ?/* PPEN (POWER GPIO) */
> + ? ? ? GPIO81_GPIO, ? ? ? ? ? ?/* PCD (DETECT GPIO) */
> + ? ? ? GPIO77_GPIO, ? ? ? ? ? ?/* PRST (RESET GPIO) */
> + ? ? ? GPIO53_GPIO, ? ? ? ? ? ?/* PBVD1 */
> + ? ? ? GPIO79_GPIO, ? ? ? ? ? ?/* PBVD2 */
> + ? ? ? GPIO54_GPIO, ? ? ? ? ? ?/* POE */
> ?};
> ?#else
> ?static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
> diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> index e9acf03..de886f3 100644
> --- a/drivers/pcmcia/Kconfig
> +++ b/drivers/pcmcia/Kconfig
> @@ -215,7 +215,8 @@ config PCMCIA_PXA2XX
> ? ? ? ?depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
> ? ? ? ? ? ? ? ? ? ?|| MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> ? ? ? ? ? ? ? ? ? ?|| ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
> - ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
> + ? ? ? ? ? ? ? ? ? || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI \
> + ? ? ? ? ? ? ? ? ? || MACH_COLIBRI320)
> ? ? ? ?select PCMCIA_SOC_COMMON
> ? ? ? ?help
> ? ? ? ? ?Say Y here to include support for the PXA2xx PCMCIA controller
> diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> index 2fee7ef..9a44a90 100644
> --- a/drivers/pcmcia/Makefile
> +++ b/drivers/pcmcia/Makefile
> @@ -71,6 +71,7 @@ pxa2xx-obj-$(CONFIG_MACH_STARGATE2) ? ? ? ? ? += pxa2xx_stargate2.o
> ?pxa2xx-obj-$(CONFIG_MACH_VPAC270) ? ? ? ? ? ? ?+= pxa2xx_vpac270.o
> ?pxa2xx-obj-$(CONFIG_MACH_BALLOON3) ? ? ? ? ? ? += pxa2xx_balloon3.o
> ?pxa2xx-obj-$(CONFIG_MACH_COLIBRI) ? ? ? ? ? ? ?+= pxa2xx_colibri.o
> +pxa2xx-obj-$(CONFIG_MACH_COLIBRI320) ? ? ? ? ? += pxa2xx_colibri.o
>
> ?obj-$(CONFIG_PCMCIA_PXA2XX) ? ? ? ? ? ? ? ? ? ?+= pxa2xx_base.o $(pxa2xx-obj-y)
>
> diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c
> index 4ed876c..c3f7219 100644
> --- a/drivers/pcmcia/pxa2xx_colibri.c
> +++ b/drivers/pcmcia/pxa2xx_colibri.c
> @@ -27,6 +27,13 @@
> ?#define ? ? ? ?COLIBRI270_DETECT_GPIO ?84
> ?#define ? ? ? ?COLIBRI270_READY_GPIO ? 1
>
> +#define ? ? ? ?COLIBRI320_RESET_GPIO ? 77
> +#define ? ? ? ?COLIBRI320_PPEN_GPIO ? ?57
> +#define ? ? ? ?COLIBRI320_BVD1_GPIO ? ?53
> +#define ? ? ? ?COLIBRI320_BVD2_GPIO ? ?79
> +#define ? ? ? ?COLIBRI320_DETECT_GPIO ?81
> +#define ? ? ? ?COLIBRI320_READY_GPIO ? 29
> +
> ?static struct {
> ? ? ? ?int ? ? reset_gpio;
> ? ? ? ?int ? ? ppen_gpio;
> @@ -186,6 +193,14 @@ static int __init colibri_pcmcia_init(void)
> ? ? ? ? ? ? ? ?colibri_pcmcia_gpio.bvd2_gpio ? = COLIBRI270_BVD2_GPIO;
> ? ? ? ? ? ? ? ?colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO;
> ? ? ? ? ? ? ? ?colibri_pcmcia_gpio.ready_gpio ?= COLIBRI270_READY_GPIO;
> + ? ? ? /* Colibri PXA320 */
> + ? ? ? } else if (machine_is_colibri320()) {
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.reset_gpio ?= COLIBRI320_RESET_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ppen_gpio ? = COLIBRI320_PPEN_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd1_gpio ? = COLIBRI320_BVD1_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.bvd2_gpio ? = COLIBRI320_BVD2_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.detect_gpio = COLIBRI320_DETECT_GPIO;
> + ? ? ? ? ? ? ? colibri_pcmcia_gpio.ready_gpio ?= COLIBRI320_READY_GPIO;
> ? ? ? ?}
>
> ? ? ? ?ret = platform_device_add_data(colibri_pcmcia_device,
> @@ -209,6 +224,6 @@ module_init(colibri_pcmcia_init);
> ?module_exit(colibri_pcmcia_exit);
>
> ?MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
> -MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
> +MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270/PXA320");
> ?MODULE_ALIAS("platform:pxa2xx-pcmcia");
> ?MODULE_LICENSE("GPL");
> --
> 1.7.1
>
>

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

* [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C
  2010-09-16  2:32 ` [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C Marek Vasut
@ 2010-09-20 14:44   ` Eric Miao
  0 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:44 UTC (permalink / raw)
  To: linux-arm-kernel

Looks good.

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?arch/arm/mach-pxa/palmtc.c | ?147 ++++++++++++++++++++++++++++++++++---------
> ?1 files changed, 116 insertions(+), 31 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
> index ce1104d..7f868d4 100644
> --- a/arch/arm/mach-pxa/palmtc.c
> +++ b/arch/arm/mach-pxa/palmtc.c
> @@ -25,6 +25,7 @@
> ?#include <linux/power_supply.h>
> ?#include <linux/gpio_keys.h>
> ?#include <linux/mtd/physmap.h>
> +#include <linux/usb/gpio_vbus.h>
>
> ?#include <asm/mach-types.h>
> ?#include <asm/mach/arch.h>
> @@ -116,6 +117,7 @@ static unsigned long palmtc_pin_config[] __initdata = {
> ?/******************************************************************************
> ?* SD/MMC card controller
> ?******************************************************************************/
> +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> ?static struct pxamci_platform_data palmtc_mci_platform_data = {
> ? ? ? ?.ocr_mask ? ? ? ? ? ? ? = MMC_VDD_32_33 | MMC_VDD_33_34,
> ? ? ? ?.gpio_power ? ? ? ? ? ? = GPIO_NR_PALMTC_SD_POWER,
> @@ -124,9 +126,18 @@ static struct pxamci_platform_data palmtc_mci_platform_data = {
> ? ? ? ?.detect_delay_ms ? ? ? ?= 200,
> ?};
>
> +static void __init palmtc_mmc_init(void)
> +{
> + ? ? ? pxa_set_mci_info(&palmtc_mci_platform_data);
> +}
> +#else
> +static inline void palmtc_mmc_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* GPIO keys
> ?******************************************************************************/
> +#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
> ?static struct gpio_keys_button palmtc_pxa_buttons[] = {
> ? ? ? ?{KEY_F8, GPIO_NR_PALMTC_HOTSYNC_BUTTON, 1, "HotSync Button", EV_KEY, 1},
> ?};
> @@ -144,9 +155,18 @@ static struct platform_device palmtc_pxa_keys = {
> ? ? ? ?},
> ?};
>
> +static void __init palmtc_keys_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_pxa_keys);
> +}
> +#else
> +static inline void palmtc_keys_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* Backlight
> ?******************************************************************************/
> +#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
> ?static int palmtc_backlight_init(struct device *dev)
> ?{
> ? ? ? ?int ret;
> @@ -196,17 +216,35 @@ static struct platform_device palmtc_backlight = {
> ? ? ? ?},
> ?};
>
> +static void __init palmtc_pwm_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_backlight);
> +}
> +#else
> +static inline void palmtc_pwm_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* IrDA
> ?******************************************************************************/
> +#if defined(CONFIG_IRDA) || defined(CONFIG_IRDA_MODULE)
> ?static struct pxaficp_platform_data palmtc_ficp_platform_data = {
> ? ? ? ?.gpio_pwdown ? ? ? ? ? ?= GPIO_NR_PALMTC_IR_DISABLE,
> ? ? ? ?.transceiver_cap ? ? ? ?= IR_SIRMODE | IR_OFF,
> ?};
>
> +static void __init palmtc_irda_init(void)
> +{
> + ? ? ? pxa_set_ficp_info(&palmtc_ficp_platform_data);
> +}
> +#else
> +static inline void palmtc_irda_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* Keyboard
> ?******************************************************************************/
> +#if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE)
> ?static const uint32_t palmtc_matrix_keys[] = {
> ? ? ? ?KEY(0, 0, KEY_F1),
> ? ? ? ?KEY(0, 1, KEY_X),
> @@ -290,27 +328,63 @@ static struct platform_device palmtc_keyboard = {
> ? ? ? ? ? ? ? ?.platform_data = &palmtc_keypad_platform_data,
> ? ? ? ?},
> ?};
> +static void __init palmtc_mkp_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_keyboard);
> +}
> +#else
> +static inline void palmtc_mkp_init(void) {}
> +#endif
>
> ?/******************************************************************************
> ?* UDC
> ?******************************************************************************/
> -static struct pxa2xx_udc_mach_info palmtc_udc_info __initdata = {
> +#if defined(CONFIG_USB_GADGET_PXA25X)||defined(CONFIG_USB_GADGET_PXA25X_MODULE)
> +static struct gpio_vbus_mach_info palmtc_udc_info = {
> ? ? ? ?.gpio_vbus ? ? ? ? ? ? ?= GPIO_NR_PALMTC_USB_DETECT_N,
> ? ? ? ?.gpio_vbus_inverted ? ? = 1,
> ? ? ? ?.gpio_pullup ? ? ? ? ? ?= GPIO_NR_PALMTC_USB_POWER,
> ?};
>
> +static struct platform_device palmtc_gpio_vbus = {
> + ? ? ? .name ? = "gpio-vbus",
> + ? ? ? .id ? ? = -1,
> + ? ? ? .dev ? ?= {
> + ? ? ? ? ? ? ? .platform_data ?= &palmtc_udc_info,
> + ? ? ? },
> +};
> +
> +static void __init palmtc_udc_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_gpio_vbus);
> +};
> +#else
> +static inline void palmtc_udc_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* Touchscreen / Battery / GPIO-extender
> ?******************************************************************************/
> -static struct platform_device palmtc_ucb1400_core = {
> +#if ? ?defined(CONFIG_TOUCHSCREEN_UCB1400) || \
> + ? ? ? defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
> +static struct platform_device palmtc_ucb1400_device = {
> ? ? ? ?.name ? = "ucb1400_core",
> ? ? ? ?.id ? ? = -1,
> ?};
>
> +static void __init palmtc_ts_init(void)
> +{
> + ? ? ? pxa_set_ac97_info(NULL);
> + ? ? ? platform_device_register(&palmtc_ucb1400_device);
> +}
> +#else
> +static inline void palmtc_ts_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* NOR Flash
> ?******************************************************************************/
> +#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
> ?static struct resource palmtc_flash_resource = {
> ? ? ? ?.start ?= PXA_CS0_PHYS,
> ? ? ? ?.end ? ?= PXA_CS0_PHYS + SZ_16M - 1,
> @@ -356,24 +430,33 @@ static struct platform_device palmtc_flash = {
> ? ? ? ?},
> ?};
>
> +static void __init palmtc_nor_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_flash);
> +}
> +#else
> +static inline void palmtc_nor_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* Framebuffer
> ?******************************************************************************/
> +#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> ?static struct pxafb_mode_info palmtc_lcd_modes[] = {
> -{
> - ? ? ? .pixclock ? ? ? = 115384,
> - ? ? ? .xres ? ? ? ? ? = 320,
> - ? ? ? .yres ? ? ? ? ? = 320,
> - ? ? ? .bpp ? ? ? ? ? ?= 16,
> -
> - ? ? ? .left_margin ? ?= 27,
> - ? ? ? .right_margin ? = 7,
> - ? ? ? .upper_margin ? = 7,
> - ? ? ? .lower_margin ? = 8,
> -
> - ? ? ? .hsync_len ? ? ?= 6,
> - ? ? ? .vsync_len ? ? ?= 1,
> -},
> + ? ? ? {
> + ? ? ? ? ? ? ? .pixclock ? ? ? = 115384,
> + ? ? ? ? ? ? ? .xres ? ? ? ? ? = 320,
> + ? ? ? ? ? ? ? .yres ? ? ? ? ? = 320,
> + ? ? ? ? ? ? ? .bpp ? ? ? ? ? ?= 16,
> +
> + ? ? ? ? ? ? ? .left_margin ? ?= 27,
> + ? ? ? ? ? ? ? .right_margin ? = 7,
> + ? ? ? ? ? ? ? .upper_margin ? = 7,
> + ? ? ? ? ? ? ? .lower_margin ? = 8,
> +
> + ? ? ? ? ? ? ? .hsync_len ? ? ?= 6,
> + ? ? ? ? ? ? ? .vsync_len ? ? ?= 1,
> + ? ? ? },
> ?};
>
> ?static struct pxafb_mach_info palmtc_lcd_screen = {
> @@ -382,17 +465,17 @@ static struct pxafb_mach_info palmtc_lcd_screen = {
> ? ? ? ?.lcd_conn ? ? ? ? ? ? ? = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
> ?};
>
> +static void __init palmtc_lcd_init(void)
> +{
> + ? ? ? set_pxa_fb_info(&palmtc_lcd_screen);
> +}
> +#else
> +static inline void palmtc_lcd_init(void) {}
> +#endif
> +
> ?/******************************************************************************
> ?* Machine init
> ?******************************************************************************/
> -static struct platform_device *devices[] __initdata = {
> - ? ? ? &palmtc_backlight,
> - ? ? ? &palmtc_ucb1400_core,
> - ? ? ? &palmtc_keyboard,
> - ? ? ? &palmtc_pxa_keys,
> - ? ? ? &palmtc_flash,
> -};
> -
> ?static void __init palmtc_init(void)
> ?{
> ? ? ? ?pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
> @@ -402,13 +485,15 @@ static void __init palmtc_init(void)
> ? ? ? ?pxa_set_stuart_info(NULL);
> ? ? ? ?pxa_set_hwuart_info(NULL);
>
> - ? ? ? set_pxa_fb_info(&palmtc_lcd_screen);
> - ? ? ? pxa_set_mci_info(&palmtc_mci_platform_data);
> - ? ? ? pxa_set_udc_info(&palmtc_udc_info);
> - ? ? ? pxa_set_ac97_info(NULL);
> - ? ? ? pxa_set_ficp_info(&palmtc_ficp_platform_data);
> -
> - ? ? ? platform_add_devices(devices, ARRAY_SIZE(devices));
> + ? ? ? palmtc_mmc_init();
> + ? ? ? palmtc_keys_init();
> + ? ? ? palmtc_pwm_init();
> + ? ? ? palmtc_irda_init();
> + ? ? ? palmtc_mkp_init();
> + ? ? ? palmtc_udc_init();
> + ? ? ? palmtc_ts_init();
> + ? ? ? palmtc_nor_init();
> + ? ? ? palmtc_lcd_init();
> ?};
>
> ?MACHINE_START(PALMTC, "Palm Tungsten|C")
> --
> 1.7.1
>
>

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

* [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus
  2010-09-16  2:32 ` [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
@ 2010-09-20 14:45   ` Eric Miao
  2010-10-01  0:15     ` Marek Vasut
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:45 UTC (permalink / raw)
  To: linux-arm-kernel

Cc'ed David.

David,

Do you mind it goes through my tree as there is subsequent patches
following that have dependency? In that case, your Ack is mostly
welcome.

On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?drivers/gpio/ucb1400_gpio.c | ? 19 ++++++-------------
> ?drivers/mfd/ucb1400_core.c ?| ? ?5 +++++
> ?include/linux/ucb1400.h ? ? | ? 19 ++++++-------------
> ?3 files changed, 17 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpio/ucb1400_gpio.c b/drivers/gpio/ucb1400_gpio.c
> index 50e6bd1..fba45a5 100644
> --- a/drivers/gpio/ucb1400_gpio.c
> +++ b/drivers/gpio/ucb1400_gpio.c
> @@ -12,8 +12,6 @@
> ?#include <linux/module.h>
> ?#include <linux/ucb1400.h>
>
> -struct ucb1400_gpio_data *ucbdata;
> -
> ?static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
> ?{
> ? ? ? ?struct ucb1400_gpio *gpio;
> @@ -50,7 +48,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
> ? ? ? ?struct ucb1400_gpio *ucb = dev->dev.platform_data;
> ? ? ? ?int err = 0;
>
> - ? ? ? if (!(ucbdata && ucbdata->gpio_offset)) {
> + ? ? ? if (!(ucb && ucb->gpio_offset)) {
> ? ? ? ? ? ? ? ?err = -EINVAL;
> ? ? ? ? ? ? ? ?goto err;
> ? ? ? ?}
> @@ -58,7 +56,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
> ? ? ? ?platform_set_drvdata(dev, ucb);
>
> ? ? ? ?ucb->gc.label = "ucb1400_gpio";
> - ? ? ? ucb->gc.base = ucbdata->gpio_offset;
> + ? ? ? ucb->gc.base = ucb->gpio_offset;
> ? ? ? ?ucb->gc.ngpio = 10;
> ? ? ? ?ucb->gc.owner = THIS_MODULE;
>
> @@ -72,8 +70,8 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
> ? ? ? ?if (err)
> ? ? ? ? ? ? ? ?goto err;
>
> - ? ? ? if (ucbdata && ucbdata->gpio_setup)
> - ? ? ? ? ? ? ? err = ucbdata->gpio_setup(&dev->dev, ucb->gc.ngpio);
> + ? ? ? if (ucb && ucb->gpio_setup)
> + ? ? ? ? ? ? ? err = ucb->gpio_setup(&dev->dev, ucb->gc.ngpio);
>
> ?err:
> ? ? ? ?return err;
> @@ -85,8 +83,8 @@ static int ucb1400_gpio_remove(struct platform_device *dev)
> ? ? ? ?int err = 0;
> ? ? ? ?struct ucb1400_gpio *ucb = platform_get_drvdata(dev);
>
> - ? ? ? if (ucbdata && ucbdata->gpio_teardown) {
> - ? ? ? ? ? ? ? err = ucbdata->gpio_teardown(&dev->dev, ucb->gc.ngpio);
> + ? ? ? if (ucb && ucb->gpio_teardown) {
> + ? ? ? ? ? ? ? err = ucb->gpio_teardown(&dev->dev, ucb->gc.ngpio);
> ? ? ? ? ? ? ? ?if (err)
> ? ? ? ? ? ? ? ? ? ? ? ?return err;
> ? ? ? ?}
> @@ -113,11 +111,6 @@ static void __exit ucb1400_gpio_exit(void)
> ? ? ? ?platform_driver_unregister(&ucb1400_gpio_driver);
> ?}
>
> -void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data)
> -{
> - ? ? ? ucbdata = data;
> -}
> -
> ?module_init(ucb1400_gpio_init);
> ?module_exit(ucb1400_gpio_exit);
>
> diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
> index d73f84b..63f4969 100644
> --- a/drivers/mfd/ucb1400_core.c
> +++ b/drivers/mfd/ucb1400_core.c
> @@ -75,6 +75,11 @@ static int ucb1400_core_probe(struct device *dev)
>
> ? ? ? ?/* GPIO */
> ? ? ? ?ucb_gpio.ac97 = ac97;
> + ? ? ? if (pdata) {
> + ? ? ? ? ? ? ? ucb_gpio.gpio_setup = pdata->gpio_setup;
> + ? ? ? ? ? ? ? ucb_gpio.gpio_teardown = pdata->gpio_teardown;
> + ? ? ? ? ? ? ? ucb_gpio.gpio_offset = pdata->gpio_offset;
> + ? ? ? }
> ? ? ? ?ucb->ucb1400_gpio = platform_device_alloc("ucb1400_gpio", -1);
> ? ? ? ?if (!ucb->ucb1400_gpio) {
> ? ? ? ? ? ? ? ?err = -ENOMEM;
> diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
> index 1b47909..1a6bfdd 100644
> --- a/include/linux/ucb1400.h
> +++ b/include/linux/ucb1400.h
> @@ -83,15 +83,12 @@
> ?#define UCB_ID ? ? ? ? ? ? ? ? 0x7e
> ?#define UCB_ID_1400 ? ? ? ? ? ? 0x4304
>
> -struct ucb1400_gpio_data {
> - ? ? ? int gpio_offset;
> - ? ? ? int (*gpio_setup)(struct device *dev, int ngpio);
> - ? ? ? int (*gpio_teardown)(struct device *dev, int ngpio);
> -};
> -
> ?struct ucb1400_gpio {
> ? ? ? ?struct gpio_chip ? ? ? ?gc;
> ? ? ? ?struct snd_ac97 ? ? ? ? *ac97;
> + ? ? ? int ? ? ? ? ? ? ? ? ? ? gpio_offset;
> + ? ? ? int (*gpio_setup)(struct device *dev, int ngpio);
> + ? ? ? int (*gpio_teardown)(struct device *dev, int ngpio);
> ?};
>
> ?struct ucb1400_ts {
> @@ -112,6 +109,9 @@ struct ucb1400 {
>
> ?struct ucb1400_pdata {
> ? ? ? ?int ? ? irq;
> + ? ? ? int ? ? gpio_offset;
> + ? ? ? int (*gpio_setup)(struct device *dev, int ngpio);
> + ? ? ? int (*gpio_teardown)(struct device *dev, int ngpio);
> ?};
>
> ?static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
> @@ -163,11 +163,4 @@ static inline void ucb1400_adc_disable(struct snd_ac97 *ac97)
>
> ?unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int adcsync);
> -
> -#ifdef CONFIG_GPIO_UCB1400
> -void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data);
> -#else
> -static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) {}
> -#endif
> -
> ?#endif
> --
> 1.7.1
>
>

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

* [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270
  2010-09-16  2:33 ` [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270 Marek Vasut
@ 2010-09-20 14:46   ` Eric Miao
  0 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:33 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?arch/arm/mach-pxa/vpac270.c | ? 12 +++++-------
> ?1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
> index c9b747c..e851d13 100644
> --- a/arch/arm/mach-pxa/vpac270.c
> +++ b/arch/arm/mach-pxa/vpac270.c
> @@ -429,20 +429,18 @@ static inline void vpac270_eth_init(void) {}
> ?******************************************************************************/
> ?#if ? ?defined(CONFIG_TOUCHSCREEN_UCB1400) || \
> ? ? ? ?defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
> -static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
> - ? ? ? .reset_gpio ? ? = 95,
> -};
> -
> ?static struct ucb1400_pdata vpac270_ucb1400_pdata = {
> ? ? ? ?.irq ? ? ? ? ? ?= IRQ_GPIO(GPIO113_VPAC270_TS_IRQ),
> ?};
>
> +static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
> + ? ? ? .reset_gpio ? ? = 95,
> + ? ? ? .codec_pdata ? ?= { &vpac270_ucb1400_pdata, },
> +};
> +
> ?static struct platform_device vpac270_ucb1400_device = {
> ? ? ? ?.name ? ? ? ? ? = "ucb1400_core",
> ? ? ? ?.id ? ? ? ? ? ? = -1,
> - ? ? ? .dev ? ? ? ? ? ?= {
> - ? ? ? ? ? ? ? .platform_data = &vpac270_ucb1400_pdata,
> - ? ? ? },
> ?};
>
> ?static void __init vpac270_ts_init(void)
> --
> 1.7.1
>
>

Looks good to me.

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

* [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC
  2010-09-16  2:33 ` [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC Marek Vasut
@ 2010-09-20 14:47   ` Eric Miao
  0 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:33 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?arch/arm/mach-pxa/palmtc.c | ? 10 +++++++++-
> ?1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
> index 7f868d4..9c74ce9 100644
> --- a/arch/arm/mach-pxa/palmtc.c
> +++ b/arch/arm/mach-pxa/palmtc.c
> @@ -367,6 +367,14 @@ static inline void palmtc_udc_init(void) {}
> ?******************************************************************************/
> ?#if ? ?defined(CONFIG_TOUCHSCREEN_UCB1400) || \
> ? ? ? ?defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
> +static struct ucb1400_pdata palmtc_ucb1400_pdata = {
> + ? ? ? .gpio_offset ? ?= PALMTC_UCB1400_GPIO_OFFSET,
> +};
> +
> +static pxa2xx_audio_ops_t palmtc_ac97_pdata = {
> + ? ? ? .codec_pdata ? ?= { &palmtc_ucb1400_pdata, },
> +};
> +
> ?static struct platform_device palmtc_ucb1400_device = {
> ? ? ? ?.name ? = "ucb1400_core",
> ? ? ? ?.id ? ? = -1,
> @@ -374,7 +382,7 @@ static struct platform_device palmtc_ucb1400_device = {
>
> ?static void __init palmtc_ts_init(void)
> ?{
> - ? ? ? pxa_set_ac97_info(NULL);
> + ? ? ? pxa_set_ac97_info(&palmtc_ac97_pdata);
> ? ? ? ?platform_device_register(&palmtc_ucb1400_device);
> ?}
> ?#else
> --
> 1.7.1
>
>

OK.

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

* [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC
  2010-09-16  2:33 ` [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC Marek Vasut
@ 2010-09-20 14:47   ` Eric Miao
  0 siblings, 0 replies; 28+ messages in thread
From: Eric Miao @ 2010-09-20 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 16, 2010 at 10:33 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?arch/arm/mach-pxa/palmtc.c | ? 41 +++++++++++++++++++++++++++++++++++++++++
> ?1 files changed, 41 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
> index 9c74ce9..ccefc4e 100644
> --- a/arch/arm/mach-pxa/palmtc.c
> +++ b/arch/arm/mach-pxa/palmtc.c
> @@ -390,6 +390,46 @@ static inline void palmtc_ts_init(void) {}
> ?#endif
>
> ?/******************************************************************************
> + * LEDs
> + ******************************************************************************/
> +#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
> +struct gpio_led palmtc_gpio_leds[] = {
> +{
> + ? ? ? .name ? ? ? ? ? ? ? ? ? = "palmtc:green:user",
> + ? ? ? .default_trigger ? ? ? ?= "none",
> + ? ? ? .gpio ? ? ? ? ? ? ? ? ? = GPIO_NR_PALMTC_LED_POWER,
> + ? ? ? .active_low ? ? ? ? ? ? = 1,
> +}, {
> + ? ? ? .name ? ? ? ? ? ? ? ? ? = "palmtc:vibra:vibra",
> + ? ? ? .default_trigger ? ? ? ?= "none",
> + ? ? ? .gpio ? ? ? ? ? ? ? ? ? = GPIO_NR_PALMTC_VIBRA_POWER,
> + ? ? ? .active_low ? ? ? ? ? ? = 1,
> +}
> +
> +};
> +
> +static struct gpio_led_platform_data palmtc_gpio_led_info = {
> + ? ? ? .leds ? ? ? ? ? = palmtc_gpio_leds,
> + ? ? ? .num_leds ? ? ? = ARRAY_SIZE(palmtc_gpio_leds),
> +};
> +
> +static struct platform_device palmtc_leds = {
> + ? ? ? .name ? = "leds-gpio",
> + ? ? ? .id ? ? = -1,
> + ? ? ? .dev ? ?= {
> + ? ? ? ? ? ? ? .platform_data ?= &palmtc_gpio_led_info,
> + ? ? ? }
> +};
> +
> +static void __init palmtc_leds_init(void)
> +{
> + ? ? ? platform_device_register(&palmtc_leds);
> +}
> +#else
> +static inline void palmtc_leds_init(void) {}
> +#endif
> +
> +/******************************************************************************
> ?* NOR Flash
> ?******************************************************************************/
> ?#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
> @@ -502,6 +542,7 @@ static void __init palmtc_init(void)
> ? ? ? ?palmtc_ts_init();
> ? ? ? ?palmtc_nor_init();
> ? ? ? ?palmtc_lcd_init();
> + ? ? ? palmtc_leds_init();
> ?};
>
> ?MACHINE_START(PALMTC, "Palm Tungsten|C")
> --
> 1.7.1
>
>

OK.

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

* [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver
  2010-09-20 14:43   ` Eric Miao
@ 2010-09-21 21:52     ` Marek Vasut
  0 siblings, 0 replies; 28+ messages in thread
From: Marek Vasut @ 2010-09-21 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

Dne Po 20. z??? 2010 16:43:33 Eric Miao napsal(a):
> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Acked-by: Daniel Mack <daniel@caiaq.de>
> > ---
> >  arch/arm/mach-pxa/colibri-pxa320.c |   21 +++++++++++++++++++++
> >  drivers/pcmcia/Kconfig             |    3 ++-
> >  drivers/pcmcia/Makefile            |    1 +
> >  drivers/pcmcia/pxa2xx_colibri.c    |   17 ++++++++++++++++-
> >  4 files changed, 40 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c
> > b/arch/arm/mach-pxa/colibri-pxa320.c index 7c003cd..6cd83fa 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa320.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> > @@ -73,6 +73,27 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[]
> > __initdata = { /* I2C */
> >        GPIO32_I2C_SCL,
> >        GPIO33_I2C_SDA,
> > +
> > +       /* PCMCIA */
> > +       MFP_CFG(GPIO59, AF7),   /* PRST ; AF7 to tristate */
> > +       MFP_CFG(GPIO61, AF7),   /* PCE1 ; AF7 to tristate */
> > +       MFP_CFG(GPIO60, AF7),   /* PCE2 ; AF7 to tristate */
> > +       MFP_CFG(GPIO62, AF7),   /* PCD ; AF7 to tristate */
> > +       MFP_CFG(GPIO56, AF7),   /* PSKTSEL ; AF7 to tristate */
> 
> If this is useful for other platforms, making them macros would be helpful.
> 
> And using MFP_CFG() directly is not encouraged, any specific reason
> to use this?

Because the board is fuxed. This is really a board specific thing, that's why 
it's done in this obscure way. It's done according to my discussion with Tdex.

Cheers

> 
> > +       GPIO27_GPIO,            /* RDnWR ; input/tristate */
> > +       GPIO50_GPIO,            /* PREG ; input/tristate */
> > +       GPIO2_RDY,
> > +       GPIO5_NPIOR,
> > +       GPIO6_NPIOW,
> > +       GPIO7_NPIOS16,
> > +       GPIO8_NPWAIT,
> > +       GPIO29_GPIO,            /* PRDY (READY GPIO) */
> > +       GPIO57_GPIO,            /* PPEN (POWER GPIO) */
> > +       GPIO81_GPIO,            /* PCD (DETECT GPIO) */
> > +       GPIO77_GPIO,            /* PRST (RESET GPIO) */
> > +       GPIO53_GPIO,            /* PBVD1 */
> > +       GPIO79_GPIO,            /* PBVD2 */
> > +       GPIO54_GPIO,            /* POE */
> >  };
> >  #else
> >  static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
> > diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> > index e9acf03..de886f3 100644
> > --- a/drivers/pcmcia/Kconfig
> > +++ b/drivers/pcmcia/Kconfig
> > @@ -215,7 +215,8 @@ config PCMCIA_PXA2XX
> >        depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
> >                    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> >                    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2
> > \ -                   || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
> > +                   || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI \ +
> >                   || MACH_COLIBRI320)
> >        select PCMCIA_SOC_COMMON
> >        help
> >          Say Y here to include support for the PXA2xx PCMCIA controller
> > diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> > index 2fee7ef..9a44a90 100644
> > --- a/drivers/pcmcia/Makefile
> > +++ b/drivers/pcmcia/Makefile
> > @@ -71,6 +71,7 @@ pxa2xx-obj-$(CONFIG_MACH_STARGATE2)           +=
> > pxa2xx_stargate2.o pxa2xx-obj-$(CONFIG_MACH_VPAC270)              +=
> > pxa2xx_vpac270.o pxa2xx-obj-$(CONFIG_MACH_BALLOON3)             +=
> > pxa2xx_balloon3.o pxa2xx-obj-$(CONFIG_MACH_COLIBRI)              +=
> > pxa2xx_colibri.o +pxa2xx-obj-$(CONFIG_MACH_COLIBRI320)           +=
> > pxa2xx_colibri.o
> > 
> >  obj-$(CONFIG_PCMCIA_PXA2XX)                    += pxa2xx_base.o
> > $(pxa2xx-obj-y)
> > 
> > diff --git a/drivers/pcmcia/pxa2xx_colibri.c
> > b/drivers/pcmcia/pxa2xx_colibri.c index 4ed876c..c3f7219 100644
> > --- a/drivers/pcmcia/pxa2xx_colibri.c
> > +++ b/drivers/pcmcia/pxa2xx_colibri.c
> > @@ -27,6 +27,13 @@
> >  #define        COLIBRI270_DETECT_GPIO  84
> >  #define        COLIBRI270_READY_GPIO   1
> > 
> > +#define        COLIBRI320_RESET_GPIO   77
> > +#define        COLIBRI320_PPEN_GPIO    57
> > +#define        COLIBRI320_BVD1_GPIO    53
> > +#define        COLIBRI320_BVD2_GPIO    79
> > +#define        COLIBRI320_DETECT_GPIO  81
> > +#define        COLIBRI320_READY_GPIO   29
> > +
> >  static struct {
> >        int     reset_gpio;
> >        int     ppen_gpio;
> > @@ -186,6 +193,14 @@ static int __init colibri_pcmcia_init(void)
> >                colibri_pcmcia_gpio.bvd2_gpio   = COLIBRI270_BVD2_GPIO;
> >                colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO;
> >                colibri_pcmcia_gpio.ready_gpio  = COLIBRI270_READY_GPIO;
> > +       /* Colibri PXA320 */
> > +       } else if (machine_is_colibri320()) {
> > +               colibri_pcmcia_gpio.reset_gpio  = COLIBRI320_RESET_GPIO;
> > +               colibri_pcmcia_gpio.ppen_gpio   = COLIBRI320_PPEN_GPIO;
> > +               colibri_pcmcia_gpio.bvd1_gpio   = COLIBRI320_BVD1_GPIO;
> > +               colibri_pcmcia_gpio.bvd2_gpio   = COLIBRI320_BVD2_GPIO;
> > +               colibri_pcmcia_gpio.detect_gpio = COLIBRI320_DETECT_GPIO;
> > +               colibri_pcmcia_gpio.ready_gpio  = COLIBRI320_READY_GPIO;
> >        }
> > 
> >        ret = platform_device_add_data(colibri_pcmcia_device,
> > @@ -209,6 +224,6 @@ module_init(colibri_pcmcia_init);
> >  module_exit(colibri_pcmcia_exit);
> > 
> >  MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
> > -MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
> > +MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270/PXA320");
> >  MODULE_ALIAS("platform:pxa2xx-pcmcia");
> >  MODULE_LICENSE("GPL");
> > --
> > 1.7.1

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

* [PATCH 05/11] ARM: pxa: Rename Colibri evalboard
  2010-09-20 14:41   ` Eric Miao
@ 2010-09-21 21:53     ` Marek Vasut
  0 siblings, 0 replies; 28+ messages in thread
From: Marek Vasut @ 2010-09-21 21:53 UTC (permalink / raw)
  To: linux-arm-kernel

Dne Po 20. z??? 2010 16:41:48 Eric Miao napsal(a):
> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Rename colibri-pxa270-evalboard to colibri-evalboard as this board is
> > used with all Colibri modules.
> 
> As mentioned, would be more straight-forward if this rename happens
> first?

You might be right, but I think it's ok either way.
> 
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Acked-by: Daniel Mack <daniel@caiaq.de>
> > ---
> >  arch/arm/mach-pxa/Kconfig                    |    2 +-
> >  arch/arm/mach-pxa/Makefile                   |    2 +-
> >  arch/arm/mach-pxa/colibri-evalboard.c        |  121
> > ++++++++++++++++++++++++++ arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > |  121 -------------------------- arch/arm/mach-pxa/colibri-pxa270.c    
> >       |    6 +-
> >  arch/arm/mach-pxa/colibri-pxa300.c           |    4 +-
> >  arch/arm/mach-pxa/colibri-pxa320.c           |    4 +-
> >  arch/arm/mach-pxa/include/mach/colibri.h     |    8 +-
> >  8 files changed, 134 insertions(+), 134 deletions(-)
> >  create mode 100644 arch/arm/mach-pxa/colibri-evalboard.c
> >  delete mode 100644 arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > 
> > diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> > index b44d613..e0ac5aa 100644
> > --- a/arch/arm/mach-pxa/Kconfig
> > +++ b/arch/arm/mach-pxa/Kconfig
> > @@ -249,7 +249,7 @@ config MACH_COLIBRI320
> >        select PXA3xx
> >        select CPU_PXA320
> > 
> > -config MACH_COLIBRI_PXA270_EVALBOARD
> > +config MACH_COLIBRI_EVALBOARD
> >        bool "Toradex Colibri Evaluation Carrier Board support"
> >        depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
> > 
> > diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
> > index e2f89c2..3197756 100644
> > --- a/arch/arm/mach-pxa/Makefile
> > +++ b/arch/arm/mach-pxa/Makefile
> > @@ -60,7 +60,7 @@ obj-$(CONFIG_MACH_LOGICPD_PXA270)     += lpd270.o
> >  obj-$(CONFIG_MACH_PCM027)              += pcm027.o
> >  obj-$(CONFIG_MACH_PCM990_BASEBOARD)    += pcm990-baseboard.o
> >  obj-$(CONFIG_MACH_COLIBRI)                     += colibri-pxa270.o
> > -obj-$(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD)    +=
> > colibri-pxa270-evalboard.o +obj-$(CONFIG_MACH_COLIBRI_EVALBOARD)   +=
> > colibri-evalboard.o
> >  obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME)       +=
> > colibri-pxa270-income.o obj-$(CONFIG_MACH_COLIBRI300)  +=
> > colibri-pxa3xx.o colibri-pxa300.o obj-$(CONFIG_MACH_COLIBRI320)  +=
> > colibri-pxa3xx.o colibri-pxa320.o diff --git
> > a/arch/arm/mach-pxa/colibri-evalboard.c
> > b/arch/arm/mach-pxa/colibri-evalboard.c new file mode 100644
> > index 0000000..6b2c800
> > --- /dev/null
> > +++ b/arch/arm/mach-pxa/colibri-evalboard.c
> > @@ -0,0 +1,121 @@
> > +/*
> > + *  linux/arch/arm/mach-pxa/colibri-evalboard.c
> > + *
> > + *  Support for Toradex Colibri Evaluation Carrier Board
> > + *  Daniel Mack <daniel@caiaq.de>
> > + *  Marek Vasut <marek.vasut@gmail.com>
> > + *
> > + *  This program is free software; you can redistribute it and/or modify
> > + *  it under the terms of the GNU General Public License version 2 as
> > + *  published by the Free Software Foundation.
> > + */
> > +
> > +#include <linux/init.h>
> > +#include <linux/kernel.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/sysdev.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/gpio.h>
> > +#include <asm/mach-types.h>
> > +#include <mach/hardware.h>
> > +#include <asm/mach/arch.h>
> > +#include <linux/i2c.h>
> > +
> > +#include <mach/pxa27x.h>
> > +#include <mach/colibri.h>
> > +#include <mach/mmc.h>
> > +#include <mach/ohci.h>
> > +#include <mach/pxa27x-udc.h>
> > +
> > +#include <plat/i2c.h>
> > +
> > +#include "generic.h"
> > +#include "devices.h"
> > +
> > +/***********************************************************************
> > ******* + * SD/MMC card controller
> > +
> > ************************************************************************
> > ******/ +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> > +static struct pxamci_platform_data colibri_mci_platform_data = {
> > +       .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
> > +       .gpio_power             = -1,
> > +       .gpio_card_ro           = -1,
> > +       .detect_delay_ms        = 200,
> > +};
> > +
> > +static void __init colibri_mmc_init(void)
> > +{
> > +       if (machine_is_colibri())       /* PXA270 Colibri */
> > +               colibri_mci_platform_data.gpio_card_detect =
> > +                       GPIO0_COLIBRI_PXA270_SD_DETECT;
> > +       if (machine_is_colibri300())    /* PXA300 Colibri */
> > +               colibri_mci_platform_data.gpio_card_detect =
> > +                       GPIO39_COLIBRI_PXA300_SD_DETECT;
> > +       else                            /* PXA320 Colibri */
> > +               colibri_mci_platform_data.gpio_card_detect =
> > +                       GPIO28_COLIBRI_PXA320_SD_DETECT;
> > +
> > +       pxa_set_mci_info(&colibri_mci_platform_data);
> > +}
> > +#else
> > +static inline void colibri_mmc_init(void) {}
> > +#endif
> > +
> > +/***********************************************************************
> > ******* + * USB Host
> > +
> > ************************************************************************
> > ******/ +#if defined(CONFIG_USB_OHCI_HCD) ||
> > defined(CONFIG_USB_OHCI_HCD_MODULE) +static int colibri_ohci_init(struct
> > device *dev)
> > +{
> > +       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
> > +       return 0;
> > +}
> > +
> > +static struct pxaohci_platform_data colibri_ohci_info = {
> > +       .port_mode      = PMM_PERPORT_MODE,
> > +       .flags          = ENABLE_PORT1 |
> > +                         POWER_CONTROL_LOW | POWER_SENSE_LOW,
> > +       .init           = colibri_ohci_init,
> > +};
> > +
> > +static void __init colibri_uhc_init(void)
> > +{
> > +       /* Colibri PXA270 has two usb ports, TBA for 320 */
> > +       if (machine_is_colibri())
> > +               colibri_ohci_info.flags |= ENABLE_PORT2;
> > +
> > +       pxa_set_ohci_info(&colibri_ohci_info);
> > +}
> > +#else
> > +static inline void colibri_uhc_init(void) {}
> > +#endif
> > +
> > +/***********************************************************************
> > ******* + * I2C RTC
> > +
> > ************************************************************************
> > ******/ +#if defined(CONFIG_RTC_DRV_DS1307) ||
> > defined(CONFIG_RTC_DRV_DS1307_MODULE) +static struct i2c_board_info
> > __initdata colibri_i2c_devs[] = {
> > +       {
> > +               I2C_BOARD_INFO("m41t00", 0x68),
> > +       },
> > +};
> > +
> > +static void __init colibri_rtc_init(void)
> > +{
> > +       pxa_set_i2c_info(NULL);
> > +       i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_i2c_devs));
> > +}
> > +#else
> > +static inline void colibri_rtc_init(void) {}
> > +#endif
> > +
> > +void __init colibri_evalboard_init(void)
> > +{
> > +       pxa_set_ffuart_info(NULL);
> > +       pxa_set_btuart_info(NULL);
> > +       pxa_set_stuart_info(NULL);
> > +
> > +       colibri_mmc_init();
> > +       colibri_uhc_init();
> > +       colibri_rtc_init();
> > +}
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c deleted file mode 100644
> > index 7f27aec..0000000
> > --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > +++ /dev/null
> > @@ -1,121 +0,0 @@
> > -/*
> > - *  linux/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > - *
> > - *  Support for Toradex PXA270 based Colibri Evaluation Carrier Board
> > - *  Daniel Mack <daniel@caiaq.de>
> > - *  Marek Vasut <marek.vasut@gmail.com>
> > - *
> > - *  This program is free software; you can redistribute it and/or modify
> > - *  it under the terms of the GNU General Public License version 2 as
> > - *  published by the Free Software Foundation.
> > - */
> > -
> > -#include <linux/init.h>
> > -#include <linux/kernel.h>
> > -#include <linux/platform_device.h>
> > -#include <linux/sysdev.h>
> > -#include <linux/interrupt.h>
> > -#include <linux/gpio.h>
> > -#include <asm/mach-types.h>
> > -#include <mach/hardware.h>
> > -#include <asm/mach/arch.h>
> > -#include <linux/i2c.h>
> > -
> > -#include <mach/pxa27x.h>
> > -#include <mach/colibri.h>
> > -#include <mach/mmc.h>
> > -#include <mach/ohci.h>
> > -#include <mach/pxa27x-udc.h>
> > -
> > -#include <plat/i2c.h>
> > -
> > -#include "generic.h"
> > -#include "devices.h"
> > -
> > -/***********************************************************************
> > ******* - * SD/MMC card controller
> > -
> > ************************************************************************
> > ******/ -#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> > -static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
> > -       .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
> > -       .gpio_power             = -1,
> > -       .gpio_card_ro           = -1,
> > -       .detect_delay_ms        = 200,
> > -};
> > -
> > -static void __init colibri_pxa270_mmc_init(void)
> > -{
> > -       if (machine_is_colibri())       /* PXA270 Colibri */
> > -               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > -                       GPIO0_COLIBRI_PXA270_SD_DETECT;
> > -       if (machine_is_colibri300())    /* PXA300 Colibri */
> > -               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > -                       GPIO39_COLIBRI_PXA300_SD_DETECT;
> > -       else                            /* PXA320 Colibri */
> > -               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > -                       GPIO28_COLIBRI_PXA320_SD_DETECT;
> > -
> > -       pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
> > -}
> > -#else
> > -static inline void colibri_pxa270_mmc_init(void) {}
> > -#endif
> > -
> > -/***********************************************************************
> > ******* - * USB Host
> > -
> > ************************************************************************
> > ******/ -#if defined(CONFIG_USB_OHCI_HCD) ||
> > defined(CONFIG_USB_OHCI_HCD_MODULE) -static int
> > colibri_pxa270_ohci_init(struct device *dev)
> > -{
> > -       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
> > -       return 0;
> > -}
> > -
> > -static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
> > -       .port_mode      = PMM_PERPORT_MODE,
> > -       .flags          = ENABLE_PORT1 |
> > -                         POWER_CONTROL_LOW | POWER_SENSE_LOW,
> > -       .init           = colibri_pxa270_ohci_init,
> > -};
> > -
> > -static void __init colibri_pxa270_uhc_init(void)
> > -{
> > -       /* Colibri PXA270 has two usb ports, TBA for 320 */
> > -       if (machine_is_colibri())
> > -               colibri_pxa270_ohci_info.flags  |= ENABLE_PORT2;
> > -
> > -       pxa_set_ohci_info(&colibri_pxa270_ohci_info);
> > -}
> > -#else
> > -static inline void colibri_pxa270_uhc_init(void) {}
> > -#endif
> > -
> > -/***********************************************************************
> > ******* - * I2C RTC
> > -
> > ************************************************************************
> > ******/ -#if defined(CONFIG_RTC_DRV_DS1307) ||
> > defined(CONFIG_RTC_DRV_DS1307_MODULE) -static struct i2c_board_info
> > __initdata colibri_pxa270_i2c_devs[] = { -       {
> > -               I2C_BOARD_INFO("m41t00", 0x68),
> > -       },
> > -};
> > -
> > -static void __init colibri_pxa270_rtc_init(void)
> > -{
> > -       pxa_set_i2c_info(NULL);
> > -       i2c_register_board_info(0,
> > ARRAY_AND_SIZE(colibri_pxa270_i2c_devs)); -}
> > -#else
> > -static inline void colibri_pxa270_rtc_init(void) {}
> > -#endif
> > -
> > -void __init colibri_pxa270_evalboard_init(void)
> > -{
> > -       pxa_set_ffuart_info(NULL);
> > -       pxa_set_btuart_info(NULL);
> > -       pxa_set_stuart_info(NULL);
> > -
> > -       colibri_pxa270_mmc_init();
> > -       colibri_pxa270_uhc_init();
> > -       colibri_pxa270_rtc_init();
> > -}
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270.c
> > b/arch/arm/mach-pxa/colibri-pxa270.c index 1024da5..dc05af4 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa270.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> > @@ -35,7 +35,7 @@
> >  /***********************************************************************
> > ******* * Evaluation board MFP
> >  ************************************************************************
> > ******/ -#ifdef  CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +#ifdef  CONFIG_MACH_COLIBRI_EVALBOARD
> >  static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> >        /* MMC */
> >        GPIO32_MMC_CLK,
> > @@ -281,10 +281,10 @@ static void __init colibri_pxa270_init(void)
> >        colibri_pxa270_tsc_init();
> > 
> >        switch (colibri_pxa270_baseboard) {
> > -       case COLIBRI_PXA270_EVALBOARD:
> > +       case COLIBRI_EVALBOARD:
> >                pxa2xx_mfp_config(ARRAY_AND_SIZE(
> >                        colibri_pxa270_evalboard_pin_config));
> > -               colibri_pxa270_evalboard_init();
> > +               colibri_evalboard_init();
> >                break;
> >        case COLIBRI_PXA270_INCOME:
> >                pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c
> > b/arch/arm/mach-pxa/colibri-pxa300.c index 5bf8055..77e760f 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa300.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> > @@ -32,7 +32,7 @@
> >  #include "devices.h"
> > 
> > 
> > -#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +#ifdef CONFIG_MACH_COLIBRI_EVALBOARD
> >  static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
> >        /* MMC */
> >        GPIO7_MMC1_CLK,
> > @@ -173,7 +173,7 @@ void __init colibri_pxa300_init(void)
> > 
> >        /* Evalboard init */
> >      
> >  pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
> > -       colibri_pxa270_evalboard_init();
> > +       colibri_evalboard_init();
> >  }
> > 
> >  MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
> > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c
> > b/arch/arm/mach-pxa/colibri-pxa320.c index 4257382..7c003cd 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa320.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> > @@ -35,7 +35,7 @@
> >  #include "generic.h"
> >  #include "devices.h"
> > 
> > -#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +#ifdef CONFIG_MACH_COLIBRI_EVALBOARD
> >  static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> >        /* MMC */
> >        GPIO22_MMC1_CLK,
> > @@ -229,7 +229,7 @@ void __init colibri_pxa320_init(void)
> > 
> >        /* Evalboard init */
> >      
> >  pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
> > -       colibri_pxa270_evalboard_init();
> > +       colibri_evalboard_init();
> >  }
> > 
> >  MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
> > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h
> > b/arch/arm/mach-pxa/include/mach/colibri.h index 63a948a..388a96f 100644
> > --- a/arch/arm/mach-pxa/include/mach/colibri.h
> > +++ b/arch/arm/mach-pxa/include/mach/colibri.h
> > @@ -9,14 +9,14 @@
> >  */
> > 
> >  enum {
> > -       COLIBRI_PXA270_EVALBOARD = 0,
> > +       COLIBRI_EVALBOARD = 0,
> >        COLIBRI_PXA270_INCOME,
> >  };
> > 
> > -#if defined(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD)
> > -extern void colibri_pxa270_evalboard_init(void);
> > +#if defined(CONFIG_MACH_COLIBRI_EVALBOARD)
> > +extern void colibri_evalboard_init(void);
> >  #else
> > -static inline void colibri_pxa270_evalboard_init(void) {}
> > +static inline void colibri_evalboard_init(void) {}
> >  #endif
> > 
> >  #if defined(CONFIG_MACH_COLIBRI_PXA270_INCOME)
> > --
> > 1.7.1

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

* [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files
  2010-09-20 14:29   ` Eric Miao
@ 2010-09-21 21:55     ` Marek Vasut
  0 siblings, 0 replies; 28+ messages in thread
From: Marek Vasut @ 2010-09-21 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

Dne Po 20. z??? 2010 16:29:39 Eric Miao napsal(a):
> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > This change -- pushing the MFP configuration back into Module files -- is
> > necessary because some evalboards can be used with multiple modules,
> > where MFP differs from module to module. Therefore MFP isn't
> > board-specific, but module-specific and the module should preconfigure
> > itself for the board.
> > 
> > (And there is also the C preprocesor limitation and conflicting
> > #define-s)
> > 
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Acked-by: Daniel Mack <daniel@caiaq.de>
> > ---
> >  arch/arm/mach-pxa/Kconfig                    |    8 +-
> >  arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   61 ++++-----------
> >  arch/arm/mach-pxa/colibri-pxa270-income.c    |   47 -----------
> >  arch/arm/mach-pxa/colibri-pxa270.c           |   96
> > ++++++++++++++++++++++ arch/arm/mach-pxa/colibri-pxa300.c           |  
> > 61 ++++++--------- arch/arm/mach-pxa/colibri-pxa320.c           |  112
> > ++++++++++---------------- arch/arm/mach-pxa/colibri-pxa3xx.c          
> > |   49 ----------- arch/arm/mach-pxa/include/mach/colibri.h     |    6
> > ++
> >  8 files changed, 188 insertions(+), 252 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> > index dd235ec..b44d613 100644
> > --- a/arch/arm/mach-pxa/Kconfig
> > +++ b/arch/arm/mach-pxa/Kconfig
> > @@ -232,10 +232,6 @@ config MACH_COLIBRI
> >        bool "Toradex Colibri PXA270"
> >        select PXA27x
> > 
> > -config MACH_COLIBRI_PXA270_EVALBOARD
> > -       bool "Toradex Colibri Evaluation Carrier Board support (PXA270)"
> > -       depends on MACH_COLIBRI
> > -
> >  config MACH_COLIBRI_PXA270_INCOME
> >        bool "Income s.r.o. PXA270 SBC"
> >        depends on MACH_COLIBRI
> > @@ -253,6 +249,10 @@ config MACH_COLIBRI320
> >        select PXA3xx
> >        select CPU_PXA320
> > 
> > +config MACH_COLIBRI_PXA270_EVALBOARD
> > +       bool "Toradex Colibri Evaluation Carrier Board support"
> > +       depends on MACH_COLIBRI || MACH_COLIBRI300 || MACH_COLIBRI320
> > +
> >  config MACH_VPAC270
> >        bool "Voipac PXA270"
> >        select PXA27x
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c index 6177ff5..e1a2b52
> > 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > @@ -30,61 +30,28 @@
> >  #include "devices.h"
> > 
> >  /***********************************************************************
> > ******* - * Pin configuration
> > -
> > ************************************************************************
> > ******/ -static mfp_cfg_t colibri_pxa270_evalboard_pin_config[]
> > __initdata = { -       /* MMC */
> > -       GPIO32_MMC_CLK,
> > -       GPIO92_MMC_DAT_0,
> > -       GPIO109_MMC_DAT_1,
> > -       GPIO110_MMC_DAT_2,
> > -       GPIO111_MMC_DAT_3,
> > -       GPIO112_MMC_CMD,
> > -       GPIO0_GPIO,     /* SD detect */
> > -
> > -       /* FFUART */
> > -       GPIO39_FFUART_TXD,
> > -       GPIO34_FFUART_RXD,
> > -
> > -       /* UHC */
> > -       GPIO88_USBH1_PWR,
> > -       GPIO89_USBH1_PEN,
> > -       GPIO119_USBH2_PWR,
> > -       GPIO120_USBH2_PEN,
> > -
> > -       /* PCMCIA */
> > -       GPIO85_nPCE_1,
> > -       GPIO54_nPCE_2,
> > -       GPIO55_nPREG,
> > -       GPIO50_nPIOR,
> > -       GPIO51_nPIOW,
> > -       GPIO49_nPWE,
> > -       GPIO48_nPOE,
> > -       GPIO57_nIOIS16,
> > -       GPIO56_nPWAIT,
> > -       GPIO104_PSKTSEL,
> > -       GPIO53_GPIO,    /* RESET */
> > -       GPIO83_GPIO,    /* BVD1 */
> > -       GPIO82_GPIO,    /* BVD2 */
> > -       GPIO1_GPIO,     /* READY */
> > -       GPIO84_GPIO,    /* DETECT */
> > -       GPIO107_GPIO,   /* PPEN */
> > -};
> > -
> > -/***********************************************************************
> > ******* * SD/MMC card controller
> >  ************************************************************************
> > ******/ #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> >  static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
> >        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
> >        .gpio_power             = -1,
> > -       .gpio_card_detect       = GPIO0_COLIBRI_PXA270_SD_DETECT,
> >        .gpio_card_ro           = -1,
> >        .detect_delay_ms        = 200,
> >  };
> > 
> >  static void __init colibri_pxa270_mmc_init(void)
> >  {
> > +       if (machine_is_colibri())       /* PXA270 Colibri */
> > +               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > +                       GPIO0_COLIBRI_PXA270_SD_DETECT;
> > +       if (machine_is_colibri300())    /* PXA300 Colibri */
> > +               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > +                       GPIO39_COLIBRI_PXA300_SD_DETECT;
> > +       else                            /* PXA320 Colibri */
> > +               colibri_pxa270_mci_platform_data.gpio_card_detect =
> > +                       GPIO28_COLIBRI_PXA320_SD_DETECT;
> > +
> 
> It's a bit confusing here in a file called colibri-pxa270-evalboard.c
> but pxa300 and
> pxa320 code are there. And until I looked behind and saw the rename patch I
> came to know how it's working.

Yes, but I don't feel like reordering to patches. The gain is minimal and it's 
very error-prone.
> 
> Wouldn't be better to rename before change?
> 
> >        pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
> >  }
> >  #else
> > @@ -103,13 +70,17 @@ static int colibri_pxa270_ohci_init(struct device
> > *dev)
> > 
> >  static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
> >        .port_mode      = PMM_PERPORT_MODE,
> > -       .flags          = ENABLE_PORT1 | ENABLE_PORT2 |
> > +       .flags          = ENABLE_PORT1 |
> >                          POWER_CONTROL_LOW | POWER_SENSE_LOW,
> >        .init           = colibri_pxa270_ohci_init,
> >  };
> > 
> >  static void __init colibri_pxa270_uhc_init(void)
> >  {
> > +       /* Colibri PXA270 has two usb ports, TBA for 320 */
> > +       if (machine_is_colibri())
> > +               colibri_pxa270_ohci_info.flags  |= ENABLE_PORT2;
> > +
> >        pxa_set_ohci_info(&colibri_pxa270_ohci_info);
> >  }
> >  #else
> > @@ -118,7 +89,6 @@ static inline void colibri_pxa270_uhc_init(void) {}
> > 
> >  void __init colibri_pxa270_evalboard_init(void)
> >  {
> > -      
> > pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_evalboard_pin_config));
> > pxa_set_ffuart_info(NULL);
> >        pxa_set_btuart_info(NULL);
> >        pxa_set_stuart_info(NULL);
> > @@ -126,4 +96,3 @@ void __init colibri_pxa270_evalboard_init(void)
> >        colibri_pxa270_mmc_init();
> >        colibri_pxa270_uhc_init();
> >  }
> > -
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c
> > b/arch/arm/mach-pxa/colibri-pxa270-income.c index 37f0f3e..07b62a0
> > 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa270-income.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c
> > @@ -46,52 +46,6 @@
> >  #define GPIO113_INCOME_TS_IRQ   (113)
> > 
> >  /***********************************************************************
> > ******* - * Pin configuration
> > -
> > ************************************************************************
> > ******/ -static mfp_cfg_t income_pin_config[] __initdata = {
> > -       /* MMC */
> > -       GPIO32_MMC_CLK,
> > -       GPIO92_MMC_DAT_0,
> > -       GPIO109_MMC_DAT_1,
> > -       GPIO110_MMC_DAT_2,
> > -       GPIO111_MMC_DAT_3,
> > -       GPIO112_MMC_CMD,
> > -       GPIO0_GPIO,     /* SD detect */
> > -       GPIO1_GPIO,     /* SD read-only */
> > -
> > -       /* FFUART */
> > -       GPIO39_FFUART_TXD,
> > -       GPIO34_FFUART_RXD,
> > -
> > -       /* BFUART */
> > -       GPIO42_BTUART_RXD,
> > -       GPIO43_BTUART_TXD,
> > -       GPIO45_BTUART_RTS,
> > -
> > -       /* STUART */
> > -       GPIO46_STUART_RXD,
> > -       GPIO47_STUART_TXD,
> > -
> > -       /* UHC */
> > -       GPIO88_USBH1_PWR,
> > -       GPIO89_USBH1_PEN,
> > -
> > -       /* LCD */
> > -       GPIOxx_LCD_TFT_16BPP,
> > -
> > -       /* PWM */
> > -       GPIO16_PWM0_OUT,
> > -
> > -       /* I2C */
> > -       GPIO117_I2C_SCL,
> > -       GPIO118_I2C_SDA,
> > -
> > -       /* LED */
> > -       GPIO54_GPIO,    /* LED A */
> > -       GPIO55_GPIO,    /* LED B */
> > -};
> > -
> > -/***********************************************************************
> > ******* * SD/MMC card controller
> >  ************************************************************************
> > ******/ #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> > @@ -257,7 +211,6 @@ static inline void income_pwm_init(void) {}
> > 
> >  void __init colibri_pxa270_income_boardinit(void)
> >  {
> > -       pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> >        pxa_set_ffuart_info(NULL);
> >        pxa_set_btuart_info(NULL);
> >        pxa_set_stuart_info(NULL);
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270.c
> > b/arch/arm/mach-pxa/colibri-pxa270.c index 98673ac..8488dfe 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa270.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> > @@ -33,6 +33,99 @@
> >  #include "generic.h"
> > 
> >  /***********************************************************************
> > ******* + * Evaluation board MFP
> > +
> > ************************************************************************
> > ******/ +#ifdef  CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
> > +       /* MMC */
> > +       GPIO32_MMC_CLK,
> > +       GPIO92_MMC_DAT_0,
> > +       GPIO109_MMC_DAT_1,
> > +       GPIO110_MMC_DAT_2,
> > +       GPIO111_MMC_DAT_3,
> > +       GPIO112_MMC_CMD,
> > +       GPIO0_GPIO,     /* SD detect */
> > +
> > +       /* FFUART */
> > +       GPIO39_FFUART_TXD,
> > +       GPIO34_FFUART_RXD,
> > +
> > +       /* UHC */
> > +       GPIO88_USBH1_PWR,
> > +       GPIO89_USBH1_PEN,
> > +       GPIO119_USBH2_PWR,
> > +       GPIO120_USBH2_PEN,
> > +
> > +       /* PCMCIA */
> > +       GPIO85_nPCE_1,
> > +       GPIO54_nPCE_2,
> > +       GPIO55_nPREG,
> > +       GPIO50_nPIOR,
> > +       GPIO51_nPIOW,
> > +       GPIO49_nPWE,
> > +       GPIO48_nPOE,
> > +       GPIO57_nIOIS16,
> > +       GPIO56_nPWAIT,
> > +       GPIO104_PSKTSEL,
> > +       GPIO53_GPIO,    /* RESET */
> > +       GPIO83_GPIO,    /* BVD1 */
> > +       GPIO82_GPIO,    /* BVD2 */
> > +       GPIO1_GPIO,     /* READY */
> > +       GPIO84_GPIO,    /* DETECT */
> > +       GPIO107_GPIO,   /* PPEN */
> > +};
> > +#else
> > +static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
> > +#endif
> > +
> > +#ifdef CONFIG_MACH_COLIBRI_PXA270_INCOME
> > +static mfp_cfg_t income_pin_config[] __initdata = {
> > +       /* MMC */
> > +       GPIO32_MMC_CLK,
> > +       GPIO92_MMC_DAT_0,
> > +       GPIO109_MMC_DAT_1,
> > +       GPIO110_MMC_DAT_2,
> > +       GPIO111_MMC_DAT_3,
> > +       GPIO112_MMC_CMD,
> > +       GPIO0_GPIO,     /* SD detect */
> > +       GPIO1_GPIO,     /* SD read-only */
> > +
> > +       /* FFUART */
> > +       GPIO39_FFUART_TXD,
> > +       GPIO34_FFUART_RXD,
> > +
> > +       /* BFUART */
> > +       GPIO42_BTUART_RXD,
> > +       GPIO43_BTUART_TXD,
> > +       GPIO45_BTUART_RTS,
> > +
> > +       /* STUART */
> > +       GPIO46_STUART_RXD,
> > +       GPIO47_STUART_TXD,
> > +
> > +       /* UHC */
> > +       GPIO88_USBH1_PWR,
> > +       GPIO89_USBH1_PEN,
> > +
> > +       /* LCD */
> > +       GPIOxx_LCD_TFT_16BPP,
> > +
> > +       /* PWM */
> > +       GPIO16_PWM0_OUT,
> > +
> > +       /* I2C */
> > +       GPIO117_I2C_SCL,
> > +       GPIO118_I2C_SDA,
> > +
> > +       /* LED */
> > +       GPIO54_GPIO,    /* LED A */
> > +       GPIO55_GPIO,    /* LED B */
> > +};
> > +#else
> > +static mfp_cfg_t income_pin_config[] __initdata = {};
> > +#endif
> > +
> > +/***********************************************************************
> > ******* * Pin configuration
> >  ************************************************************************
> > ******/ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
> > @@ -185,9 +278,12 @@ static void __init colibri_pxa270_init(void)
> > 
> >        switch (colibri_pxa270_baseboard) {
> >        case COLIBRI_PXA270_EVALBOARD:
> > +               pxa2xx_mfp_config(ARRAY_AND_SIZE(
> > +                       colibri_pxa270_evalboard_pin_config));
> >                colibri_pxa270_evalboard_init();
> >                break;
> >        case COLIBRI_PXA270_INCOME:
> > +               pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
> >                colibri_pxa270_income_boardinit();
> >                break;
> >        default:
> > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c
> > b/arch/arm/mach-pxa/colibri-pxa300.c index 40b6ac2..dab49ce 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa300.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> > @@ -31,9 +31,28 @@
> >  #include "generic.h"
> >  #include "devices.h"
> > 
> > +
> > +#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {
> > +       /* MMC */
> > +       GPIO7_MMC1_CLK,
> > +       GPIO14_MMC1_CMD,
> > +       GPIO3_MMC1_DAT0,
> > +       GPIO4_MMC1_DAT1,
> > +       GPIO5_MMC1_DAT2,
> > +       GPIO6_MMC1_DAT3,
> > +       GPIO39_GPIO,    /* SD detect */
> > +
> > +       /* UHC */
> > +       GPIO0_2_USBH_PEN,
> > +       GPIO1_2_USBH_PWR,
> > +};
> > +#else
> > +static mfp_cfg_t colibri_pxa300_evalboard_pin_config[] __initdata = {};
> > +#endif
> > +
> >  #if defined(CONFIG_AX88796)
> >  #define COLIBRI_ETH_IRQ_GPIO   mfp_to_gpio(GPIO26_GPIO)
> > -
> >  /*
> >  * Asix AX88796 Ethernet
> >  */
> > @@ -80,35 +99,6 @@ static void __init colibri_pxa300_init_eth(void)
> >  static inline void __init colibri_pxa300_init_eth(void) {}
> >  #endif /* CONFIG_AX88796 */
> > 
> > -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> > -static mfp_cfg_t colibri_pxa300_usb_pin_config[] __initdata = {
> > -       GPIO0_2_USBH_PEN,
> > -       GPIO1_2_USBH_PWR,
> > -};
> > -
> > -static struct pxaohci_platform_data colibri_pxa300_ohci_info = {
> > -       .port_mode      = PMM_GLOBAL_MODE,
> > -       .flags          = ENABLE_PORT1 | POWER_CONTROL_LOW |
> > POWER_SENSE_LOW, -};
> > -
> > -void __init colibri_pxa300_init_ohci(void)
> > -{
> > -       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_usb_pin_config));
> > -       pxa_set_ohci_info(&colibri_pxa300_ohci_info);
> > -}
> > -#else
> > -static inline void colibri_pxa300_init_ohci(void) {}
> > -#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
> > -
> > -static mfp_cfg_t colibri_pxa300_mmc_pin_config[] __initdata = {
> > -       GPIO7_MMC1_CLK,
> > -       GPIO14_MMC1_CMD,
> > -       GPIO3_MMC1_DAT0,
> > -       GPIO4_MMC1_DAT1,
> > -       GPIO5_MMC1_DAT2,
> > -       GPIO6_MMC1_DAT3,
> > -};
> > -
> >  #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> >  static mfp_cfg_t colibri_pxa300_lcd_pin_config[] __initdata = {
> >        GPIO54_LCD_LDD_0,
> > @@ -171,18 +161,15 @@ static inline void colibri_pxa310_init_ac97(void)
> > {}
> > 
> >  void __init colibri_pxa300_init(void)
> >  {
> > -       pxa_set_ffuart_info(NULL);
> > -       pxa_set_btuart_info(NULL);
> > -       pxa_set_stuart_info(NULL);
> > -
> >        colibri_pxa300_init_eth();
> > -       colibri_pxa300_init_ohci();
> >        colibri_pxa3xx_init_nand();
> >        colibri_pxa300_init_lcd();
> >        colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
> >        colibri_pxa310_init_ac97();
> > -      
> > colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa300_mmc_pin_config), -
> >                               mfp_to_gpio(MFP_PIN_GPIO13));
> > +
> > +       /* Evalboard init */
> > +      
> > pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_evalboard_pin_config));
> > +       colibri_pxa270_evalboard_init();
> >  }
> > 
> >  MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
> > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c
> > b/arch/arm/mach-pxa/colibri-pxa320.c index 99e850d..e886ab2 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa320.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> > @@ -35,9 +35,47 @@
> >  #include "generic.h"
> >  #include "devices.h"
> > 
> > +#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
> > +static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {
> > +       /* MMC */
> > +       GPIO22_MMC1_CLK,
> > +       GPIO23_MMC1_CMD,
> > +       GPIO18_MMC1_DAT0,
> > +       GPIO19_MMC1_DAT1,
> > +       GPIO20_MMC1_DAT2,
> > +       GPIO21_MMC1_DAT3,
> > +       GPIO28_GPIO,    /* SD detect */
> > +
> > +       /* UART 1 configuration (may be set by bootloader) */
> > +       GPIO99_UART1_CTS,
> > +       GPIO104_UART1_RTS,
> > +       GPIO97_UART1_RXD,
> > +       GPIO98_UART1_TXD,
> > +       GPIO101_UART1_DTR,
> > +       GPIO103_UART1_DSR,
> > +       GPIO100_UART1_DCD,
> > +       GPIO102_UART1_RI,
> > +
> > +       /* UART 2 configuration */
> > +       GPIO109_UART2_CTS,
> > +       GPIO112_UART2_RTS,
> > +       GPIO110_UART2_RXD,
> > +       GPIO111_UART2_TXD,
> > +
> > +       /* UART 3 configuration */
> > +       GPIO30_UART3_RXD,
> > +       GPIO31_UART3_TXD,
> > +
> > +       /* UHC */
> > +       GPIO2_2_USBH_PEN,
> > +       GPIO3_2_USBH_PWR,
> > +};
> > +#else
> > +static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {};
> > +#endif
> > +
> >  #if defined(CONFIG_AX88796)
> >  #define COLIBRI_ETH_IRQ_GPIO   mfp_to_gpio(GPIO36_GPIO)
> > -
> >  /*
> >  * Asix AX88796 Ethernet
> >  */
> > @@ -84,26 +122,6 @@ static void __init colibri_pxa320_init_eth(void)
> >  static inline void __init colibri_pxa320_init_eth(void) {}
> >  #endif /* CONFIG_AX88796 */
> > 
> > -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> > -static mfp_cfg_t colibri_pxa320_usb_pin_config[] __initdata = {
> > -       GPIO2_2_USBH_PEN,
> > -       GPIO3_2_USBH_PWR,
> > -};
> > -
> > -static struct pxaohci_platform_data colibri_pxa320_ohci_info = {
> > -       .port_mode      = PMM_GLOBAL_MODE,
> > -       .flags          = ENABLE_PORT1 | POWER_CONTROL_LOW |
> > POWER_SENSE_LOW, -};
> > -
> > -void __init colibri_pxa320_init_ohci(void)
> > -{
> > -       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_usb_pin_config));
> > -       pxa_set_ohci_info(&colibri_pxa320_ohci_info);
> > -}
> > -#else
> > -static inline void colibri_pxa320_init_ohci(void) {}
> > -#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
> > -
> >  #if
> > defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODU
> > LE) static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = {
> > .gpio_vbus              = mfp_to_gpio(MFP_PIN_GPIO96),
> > @@ -140,15 +158,6 @@ static void __init colibri_pxa320_init_udc(void)
> >  static inline void colibri_pxa320_init_udc(void) {}
> >  #endif
> > 
> > -static mfp_cfg_t colibri_pxa320_mmc_pin_config[] __initdata = {
> > -       GPIO22_MMC1_CLK,
> > -       GPIO23_MMC1_CMD,
> > -       GPIO18_MMC1_DAT0,
> > -       GPIO19_MMC1_DAT1,
> > -       GPIO20_MMC1_DAT2,
> > -       GPIO21_MMC1_DAT3
> > -};
> > -
> >  #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> >  static mfp_cfg_t colibri_pxa320_lcd_pin_config[] __initdata = {
> >        GPIO6_2_LCD_LDD_0,
> > @@ -205,53 +214,18 @@ static inline void __init
> > colibri_pxa320_init_ac97(void) static inline void
> > colibri_pxa320_init_ac97(void) {}
> >  #endif
> > 
> > -/*
> > - * The following configuration is verified to work with the Toradex
> > Orchid - * carrier board
> > - */
> > -static mfp_cfg_t colibri_pxa320_uart_pin_config[] __initdata = {
> > -       /* UART 1 configuration (may be set by bootloader) */
> > -       GPIO99_UART1_CTS,
> > -       GPIO104_UART1_RTS,
> > -       GPIO97_UART1_RXD,
> > -       GPIO98_UART1_TXD,
> > -       GPIO101_UART1_DTR,
> > -       GPIO103_UART1_DSR,
> > -       GPIO100_UART1_DCD,
> > -       GPIO102_UART1_RI,
> > -
> > -       /* UART 2 configuration */
> > -       GPIO109_UART2_CTS,
> > -       GPIO112_UART2_RTS,
> > -       GPIO110_UART2_RXD,
> > -       GPIO111_UART2_TXD,
> > -
> > -       /* UART 3 configuration */
> > -       GPIO30_UART3_RXD,
> > -       GPIO31_UART3_TXD,
> > -};
> > -
> > -static void __init colibri_pxa320_init_uart(void)
> > -{
> > -      
> > pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_uart_pin_config)); -}
> > -
> >  void __init colibri_pxa320_init(void)
> >  {
> > -       pxa_set_ffuart_info(NULL);
> > -       pxa_set_btuart_info(NULL);
> > -       pxa_set_stuart_info(NULL);
> > -
> >        colibri_pxa320_init_eth();
> > -       colibri_pxa320_init_ohci();
> >        colibri_pxa3xx_init_nand();
> >        colibri_pxa320_init_lcd();
> >        colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
> >        colibri_pxa320_init_ac97();
> > -      
> > colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config), -
> >                               mfp_to_gpio(MFP_PIN_GPIO28));
> > -       colibri_pxa320_init_uart();
> >        colibri_pxa320_init_udc();
> > +
> > +       /* Evalboard init */
> > +      
> > pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_evalboard_pin_config));
> > +       colibri_pxa270_evalboard_init();
> >  }
> > 
> >  MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
> > diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c
> > b/arch/arm/mach-pxa/colibri-pxa3xx.c index 199afa2..96b2d9f 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa3xx.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
> > @@ -64,55 +64,6 @@ void __init colibri_pxa3xx_init_eth(struct
> > ax_plat_data *plat_data) }
> >  #endif
> > 
> > -#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
> > -static int mmc_detect_pin;
> > -
> > -static int colibri_pxa3xx_mci_init(struct device *dev,
> > -                                  irq_handler_t colibri_mmc_detect_int,
> > -                                  void *data)
> > -{
> > -       int ret;
> > -
> > -       ret = gpio_request(mmc_detect_pin, "mmc card detect");
> > -       if (ret)
> > -               return ret;
> > -
> > -       gpio_direction_input(mmc_detect_pin);
> > -       ret = request_irq(gpio_to_irq(mmc_detect_pin),
> > colibri_mmc_detect_int, -                         IRQF_TRIGGER_RISING |
> > IRQF_TRIGGER_FALLING, -                         "MMC card detect",
> > data);
> > -       if (ret) {
> > -               gpio_free(mmc_detect_pin);
> > -               return ret;
> > -       }
> > -
> > -       return 0;
> > -}
> > -
> > -static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
> > -{
> > -       free_irq(mmc_detect_pin, data);
> > -       gpio_free(gpio_to_irq(mmc_detect_pin));
> > -}
> > -
> > -static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
> > -       .detect_delay_ms        = 200,
> > -       .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
> > -       .init                   = colibri_pxa3xx_mci_init,
> > -       .exit                   = colibri_pxa3xx_mci_exit,
> > -       .gpio_card_detect       = -1,
> > -       .gpio_card_ro           = -1,
> > -       .gpio_power             = -1,
> > -};
> > -
> > -void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int
> > detect_pin) -{
> > -       pxa3xx_mfp_config(pins, len);
> > -       mmc_detect_pin = detect_pin;
> > -       pxa_set_mci_info(&colibri_pxa3xx_mci_platform_data);
> > -}
> > -#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */
> > -
> >  #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
> >  static int lcd_bl_pin;
> > 
> > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h
> > b/arch/arm/mach-pxa/include/mach/colibri.h index 58dada1..63a948a 100644
> > --- a/arch/arm/mach-pxa/include/mach/colibri.h
> > +++ b/arch/arm/mach-pxa/include/mach/colibri.h
> > @@ -59,5 +59,11 @@ static inline void colibri_pxa3xx_init_nand(void) {}
> >  #define GPIO0_COLIBRI_PXA270_SD_DETECT 0
> >  #define GPIO113_COLIBRI_PXA270_TS_IRQ  113
> > 
> > +/* GPIO definitions for Colibri PXA300/310 */
> > +#define GPIO39_COLIBRI_PXA300_SD_DETECT        39
> > +
> > +/* GPIO definitions for Colibri PXA320 */
> > +#define GPIO28_COLIBRI_PXA320_SD_DETECT        28
> > +
> >  #endif /* _COLIBRI_H_ */
> > 
> > --
> > 1.7.1

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

* [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support
  2010-09-20 14:16   ` Eric Miao
  2010-09-20 14:21     ` Eric Miao
@ 2010-09-21 21:56     ` Marek Vasut
  1 sibling, 0 replies; 28+ messages in thread
From: Marek Vasut @ 2010-09-21 21:56 UTC (permalink / raw)
  To: linux-arm-kernel

Dne Po 20. z??? 2010 16:16:54 Eric Miao napsal(a):
> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > This driver also contains structures to eventually support PXA320. This
> > is planned to be added in a later patch.
> > 
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Acked-by: Daniel Mack <daniel@caiaq.de>
> > ---
> >  arch/arm/mach-pxa/colibri-pxa270-evalboard.c |   18 ++
> >  drivers/pcmcia/Kconfig                       |    2 +-
> >  drivers/pcmcia/Makefile                      |    1 +
> >  drivers/pcmcia/pxa2xx_colibri.c              |  214
> > ++++++++++++++++++++++++++ 4 files changed, 234 insertions(+), 1
> > deletions(-)
> >  create mode 100644 drivers/pcmcia/pxa2xx_colibri.c
> > 
> > diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c index 0f3b632..6177ff5
> > 100644
> > --- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > +++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
> > @@ -51,6 +51,24 @@ static mfp_cfg_t colibri_pxa270_evalboard_pin_config[]
> > __initdata = { GPIO89_USBH1_PEN,
> >        GPIO119_USBH2_PWR,
> >        GPIO120_USBH2_PEN,
> > +
> > +       /* PCMCIA */
> > +       GPIO85_nPCE_1,
> > +       GPIO54_nPCE_2,
> > +       GPIO55_nPREG,
> > +       GPIO50_nPIOR,
> > +       GPIO51_nPIOW,
> > +       GPIO49_nPWE,
> > +       GPIO48_nPOE,
> > +       GPIO57_nIOIS16,
> > +       GPIO56_nPWAIT,
> > +       GPIO104_PSKTSEL,
> > +       GPIO53_GPIO,    /* RESET */
> > +       GPIO83_GPIO,    /* BVD1 */
> > +       GPIO82_GPIO,    /* BVD2 */
> > +       GPIO1_GPIO,     /* READY */
> > +       GPIO84_GPIO,    /* DETECT */
> > +       GPIO107_GPIO,   /* PPEN */
> >  };
> > 
> >  /***********************************************************************
> > ******* diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> > index c80a7a6..e9acf03 100644
> > --- a/drivers/pcmcia/Kconfig
> > +++ b/drivers/pcmcia/Kconfig
> > @@ -215,7 +215,7 @@ config PCMCIA_PXA2XX
> >        depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
> >                    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> >                    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2
> > \ -                   || MACH_VPAC270 || MACH_BALLOON3)
> > +                   || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI)
> >        select PCMCIA_SOC_COMMON
> >        help
> >          Say Y here to include support for the PXA2xx PCMCIA controller
> > diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> > index 8d9386a..2fee7ef 100644
> > --- a/drivers/pcmcia/Makefile
> > +++ b/drivers/pcmcia/Makefile
> > @@ -70,6 +70,7 @@ pxa2xx-obj-$(CONFIG_MACH_E740)                      
> >  += pxa2xx_e740.o pxa2xx-obj-$(CONFIG_MACH_STARGATE2)            +=
> > pxa2xx_stargate2.o pxa2xx-obj-$(CONFIG_MACH_VPAC270)              +=
> > pxa2xx_vpac270.o pxa2xx-obj-$(CONFIG_MACH_BALLOON3)             +=
> > pxa2xx_balloon3.o +pxa2xx-obj-$(CONFIG_MACH_COLIBRI)              +=
> > pxa2xx_colibri.o
> > 
> >  obj-$(CONFIG_PCMCIA_PXA2XX)                    += pxa2xx_base.o
> > $(pxa2xx-obj-y)
> > 
> > diff --git a/drivers/pcmcia/pxa2xx_colibri.c
> > b/drivers/pcmcia/pxa2xx_colibri.c new file mode 100644
> > index 0000000..4ed876c
> > --- /dev/null
> > +++ b/drivers/pcmcia/pxa2xx_colibri.c
> > @@ -0,0 +1,214 @@
> > +/*
> > + * linux/drivers/pcmcia/pxa2xx_colibri.c
> > + *
> > + * Driver for Toradex Colibri PXA270 CF socket
> > + *
> > + * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + */
> > +
> > +#include <linux/module.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/delay.h>
> > +#include <linux/gpio.h>
> > +
> > +#include <asm/mach-types.h>
> > +
> > +#include "soc_common.h"
> > +
> > +#define        COLIBRI270_RESET_GPIO   53
> > +#define        COLIBRI270_PPEN_GPIO    107
> > +#define        COLIBRI270_BVD1_GPIO    83
> > +#define        COLIBRI270_BVD2_GPIO    82
> > +#define        COLIBRI270_DETECT_GPIO  84
> > +#define        COLIBRI270_READY_GPIO   1
> > +
> > +static struct {
> > +       int     reset_gpio;
> > +       int     ppen_gpio;
> > +       int     bvd1_gpio;
> > +       int     bvd2_gpio;
> > +       int     detect_gpio;
> > +       int     ready_gpio;
> > +} colibri_pcmcia_gpio;
> > +
> > +static struct pcmcia_irqs colibri_irqs[] = {
> > +       {
> > +               .sock = 0,
> > +               .str  = "PCMCIA CD"
> > +       },
> > +};
> > +
> > +static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
> > +{
> > +       int ret;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.detect_gpio, "DETECT");
> > +       if (ret)
> > +               goto err1;
> > +       ret = gpio_direction_input(colibri_pcmcia_gpio.detect_gpio);
> > +       if (ret)
> > +               goto err2;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.ready_gpio, "READY");
> > +       if (ret)
> > +               goto err2;
> > +       ret = gpio_direction_input(colibri_pcmcia_gpio.ready_gpio);
> > +       if (ret)
> > +               goto err3;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.bvd1_gpio, "BVD1");
> > +       if (ret)
> > +               goto err3;
> > +       ret = gpio_direction_input(colibri_pcmcia_gpio.bvd1_gpio);
> > +       if (ret)
> > +               goto err4;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.bvd2_gpio, "BVD2");
> > +       if (ret)
> > +               goto err4;
> > +       ret = gpio_direction_input(colibri_pcmcia_gpio.bvd2_gpio);
> > +       if (ret)
> > +               goto err5;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.ppen_gpio, "PPEN");
> > +       if (ret)
> > +               goto err5;
> > +       ret = gpio_direction_output(colibri_pcmcia_gpio.ppen_gpio, 0);
> > +       if (ret)
> > +               goto err6;
> > +
> > +       ret = gpio_request(colibri_pcmcia_gpio.reset_gpio, "RESET");
> > +       if (ret)
> > +               goto err6;
> > +       ret = gpio_direction_output(colibri_pcmcia_gpio.reset_gpio, 1);
> > +       if (ret)
> > +               goto err7;
> > +
> > +       colibri_irqs[0].irq =
> > gpio_to_irq(colibri_pcmcia_gpio.detect_gpio); +      
> > skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpio.ready_gpio); +
> > +       return soc_pcmcia_request_irqs(skt, colibri_irqs,
> > +                                       ARRAY_SIZE(colibri_irqs));
> > +
> > +err7:
> > +       gpio_free(colibri_pcmcia_gpio.detect_gpio);
> > +err6:
> > +       gpio_free(colibri_pcmcia_gpio.ready_gpio);
> > +err5:
> > +       gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
> > +err4:
> > +       gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
> > +err3:
> > +       gpio_free(colibri_pcmcia_gpio.reset_gpio);
> > +err2:
> > +       gpio_free(colibri_pcmcia_gpio.ppen_gpio);
> > +err1:
> > +       return ret;
> > +}
> 
> I'd like to advocate for my newly introduced API for such usage:
> 
> gpio_request_array() in include/asm-generic/gpio.h

Can we do this in a separate patch?
> 
> > +
> > +static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
> > +{
> > +       gpio_free(colibri_pcmcia_gpio.detect_gpio);
> > +       gpio_free(colibri_pcmcia_gpio.ready_gpio);
> > +       gpio_free(colibri_pcmcia_gpio.bvd1_gpio);
> > +       gpio_free(colibri_pcmcia_gpio.bvd2_gpio);
> > +       gpio_free(colibri_pcmcia_gpio.reset_gpio);
> > +       gpio_free(colibri_pcmcia_gpio.ppen_gpio);
> > +}
> > +
> > +static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
> > +                                       struct pcmcia_state *state)
> > +{
> > +
> > +       state->detect =
> > !!gpio_get_value(colibri_pcmcia_gpio.detect_gpio); +       state->ready
> >  = !!gpio_get_value(colibri_pcmcia_gpio.ready_gpio); +       state->bvd1
> >   = !!gpio_get_value(colibri_pcmcia_gpio.bvd1_gpio); +       state->bvd2
> >   = !!gpio_get_value(colibri_pcmcia_gpio.bvd2_gpio);
> 
> Can we make colibri_pcmcia_gpio some part of the *skt private data?

I looked and didn't see anything, if you have anything specific in mind, can you 
point me to it ?
> 
> > +       state->wrprot = 0;
> > +       state->vs_3v  = 1;
> > +       state->vs_Xv  = 0;
> > +}
> > +
> > +static int
> > +colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
> > +                               const socket_state_t *state)
> > +{
> > +       gpio_set_value(colibri_pcmcia_gpio.ppen_gpio,
> > +                       !(state->Vcc == 33 && state->Vpp < 50));
> > +       gpio_set_value(colibri_pcmcia_gpio.reset_gpio, state->flags &
> > SS_RESET); +       return 0;
> > +}
> > +
> > +static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
> > +{
> > +}
> > +
> > +static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
> > +{
> > +}
> > +
> > +static struct pcmcia_low_level colibri_pcmcia_ops = {
> > +       .owner                  = THIS_MODULE,
> > +
> > +       .first                  = 0,
> > +       .nr                     = 1,
> > +
> > +       .hw_init                = colibri_pcmcia_hw_init,
> > +       .hw_shutdown            = colibri_pcmcia_hw_shutdown,
> > +
> > +       .socket_state           = colibri_pcmcia_socket_state,
> > +       .configure_socket       = colibri_pcmcia_configure_socket,
> > +
> > +       .socket_init            = colibri_pcmcia_socket_init,
> > +       .socket_suspend         = colibri_pcmcia_socket_suspend,
> > +};
> > +
> > +static struct platform_device *colibri_pcmcia_device;
> > +
> > +static int __init colibri_pcmcia_init(void)
> > +{
> > +       int ret;
> > +
> > +       colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia",
> > -1); +       if (!colibri_pcmcia_device)
> > +               return -ENOMEM;
> > +
> > +       /* Colibri PXA270 */
> > +       if (machine_is_colibri()) {
> > +               colibri_pcmcia_gpio.reset_gpio  = COLIBRI270_RESET_GPIO;
> > +               colibri_pcmcia_gpio.ppen_gpio   = COLIBRI270_PPEN_GPIO;
> > +               colibri_pcmcia_gpio.bvd1_gpio   = COLIBRI270_BVD1_GPIO;
> > +               colibri_pcmcia_gpio.bvd2_gpio   = COLIBRI270_BVD2_GPIO;
> > +               colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO;
> > +               colibri_pcmcia_gpio.ready_gpio  = COLIBRI270_READY_GPIO;
> > +       }
> > +
> > +       ret = platform_device_add_data(colibri_pcmcia_device,
> > +               &colibri_pcmcia_ops, sizeof(colibri_pcmcia_ops));
> > +
> > +       if (!ret)
> > +               ret = platform_device_add(colibri_pcmcia_device);
> > +
> > +       if (ret)
> > +               platform_device_put(colibri_pcmcia_device);
> > +
> > +       return ret;
> > +}
> > +
> > +static void __exit colibri_pcmcia_exit(void)
> > +{
> > +       platform_device_unregister(colibri_pcmcia_device);
> > +}
> > +
> > +module_init(colibri_pcmcia_init);
> > +module_exit(colibri_pcmcia_exit);
> > +
> > +MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
> > +MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270");
> > +MODULE_ALIAS("platform:pxa2xx-pcmcia");
> > +MODULE_LICENSE("GPL");
> > --
> > 1.7.1

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

* [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus
  2010-09-20 14:45   ` Eric Miao
@ 2010-10-01  0:15     ` Marek Vasut
  0 siblings, 0 replies; 28+ messages in thread
From: Marek Vasut @ 2010-10-01  0:15 UTC (permalink / raw)
  To: linux-arm-kernel

Dne Po 20. z??? 2010 16:45:59 Eric Miao napsal(a):
> Cc'ed David.
> 
> David,
> 
> Do you mind it goes through my tree as there is subsequent patches
> following that have dependency? In that case, your Ack is mostly
> welcome.
> 
Any updates?

> On Thu, Sep 16, 2010 at 10:32 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> >  drivers/gpio/ucb1400_gpio.c |   19 ++++++-------------
> >  drivers/mfd/ucb1400_core.c  |    5 +++++
> >  include/linux/ucb1400.h     |   19 ++++++-------------
> >  3 files changed, 17 insertions(+), 26 deletions(-)
> > 
> > diff --git a/drivers/gpio/ucb1400_gpio.c b/drivers/gpio/ucb1400_gpio.c
> > index 50e6bd1..fba45a5 100644
> > --- a/drivers/gpio/ucb1400_gpio.c
> > +++ b/drivers/gpio/ucb1400_gpio.c
> > @@ -12,8 +12,6 @@
> >  #include <linux/module.h>
> >  #include <linux/ucb1400.h>
> > 
> > -struct ucb1400_gpio_data *ucbdata;
> > -
> >  static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
> >  {
> >        struct ucb1400_gpio *gpio;
> > @@ -50,7 +48,7 @@ static int ucb1400_gpio_probe(struct platform_device
> > *dev) struct ucb1400_gpio *ucb = dev->dev.platform_data;
> >        int err = 0;
> > 
> > -       if (!(ucbdata && ucbdata->gpio_offset)) {
> > +       if (!(ucb && ucb->gpio_offset)) {
> >                err = -EINVAL;
> >                goto err;
> >        }
> > @@ -58,7 +56,7 @@ static int ucb1400_gpio_probe(struct platform_device
> > *dev) platform_set_drvdata(dev, ucb);
> > 
> >        ucb->gc.label = "ucb1400_gpio";
> > -       ucb->gc.base = ucbdata->gpio_offset;
> > +       ucb->gc.base = ucb->gpio_offset;
> >        ucb->gc.ngpio = 10;
> >        ucb->gc.owner = THIS_MODULE;
> > 
> > @@ -72,8 +70,8 @@ static int ucb1400_gpio_probe(struct platform_device
> > *dev) if (err)
> >                goto err;
> > 
> > -       if (ucbdata && ucbdata->gpio_setup)
> > -               err = ucbdata->gpio_setup(&dev->dev, ucb->gc.ngpio);
> > +       if (ucb && ucb->gpio_setup)
> > +               err = ucb->gpio_setup(&dev->dev, ucb->gc.ngpio);
> > 
> >  err:
> >        return err;
> > @@ -85,8 +83,8 @@ static int ucb1400_gpio_remove(struct platform_device
> > *dev) int err = 0;
> >        struct ucb1400_gpio *ucb = platform_get_drvdata(dev);
> > 
> > -       if (ucbdata && ucbdata->gpio_teardown) {
> > -               err = ucbdata->gpio_teardown(&dev->dev, ucb->gc.ngpio);
> > +       if (ucb && ucb->gpio_teardown) {
> > +               err = ucb->gpio_teardown(&dev->dev, ucb->gc.ngpio);
> >                if (err)
> >                        return err;
> >        }
> > @@ -113,11 +111,6 @@ static void __exit ucb1400_gpio_exit(void)
> >        platform_driver_unregister(&ucb1400_gpio_driver);
> >  }
> > 
> > -void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data)
> > -{
> > -       ucbdata = data;
> > -}
> > -
> >  module_init(ucb1400_gpio_init);
> >  module_exit(ucb1400_gpio_exit);
> > 
> > diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
> > index d73f84b..63f4969 100644
> > --- a/drivers/mfd/ucb1400_core.c
> > +++ b/drivers/mfd/ucb1400_core.c
> > @@ -75,6 +75,11 @@ static int ucb1400_core_probe(struct device *dev)
> > 
> >        /* GPIO */
> >        ucb_gpio.ac97 = ac97;
> > +       if (pdata) {
> > +               ucb_gpio.gpio_setup = pdata->gpio_setup;
> > +               ucb_gpio.gpio_teardown = pdata->gpio_teardown;
> > +               ucb_gpio.gpio_offset = pdata->gpio_offset;
> > +       }
> >        ucb->ucb1400_gpio = platform_device_alloc("ucb1400_gpio", -1);
> >        if (!ucb->ucb1400_gpio) {
> >                err = -ENOMEM;
> > diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
> > index 1b47909..1a6bfdd 100644
> > --- a/include/linux/ucb1400.h
> > +++ b/include/linux/ucb1400.h
> > @@ -83,15 +83,12 @@
> >  #define UCB_ID                 0x7e
> >  #define UCB_ID_1400             0x4304
> > 
> > -struct ucb1400_gpio_data {
> > -       int gpio_offset;
> > -       int (*gpio_setup)(struct device *dev, int ngpio);
> > -       int (*gpio_teardown)(struct device *dev, int ngpio);
> > -};
> > -
> >  struct ucb1400_gpio {
> >        struct gpio_chip        gc;
> >        struct snd_ac97         *ac97;
> > +       int                     gpio_offset;
> > +       int (*gpio_setup)(struct device *dev, int ngpio);
> > +       int (*gpio_teardown)(struct device *dev, int ngpio);
> >  };
> > 
> >  struct ucb1400_ts {
> > @@ -112,6 +109,9 @@ struct ucb1400 {
> > 
> >  struct ucb1400_pdata {
> >        int     irq;
> > +       int     gpio_offset;
> > +       int (*gpio_setup)(struct device *dev, int ngpio);
> > +       int (*gpio_teardown)(struct device *dev, int ngpio);
> >  };
> > 
> >  static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
> > @@ -163,11 +163,4 @@ static inline void ucb1400_adc_disable(struct
> > snd_ac97 *ac97)
> > 
> >  unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
> >                              int adcsync);
> > -
> > -#ifdef CONFIG_GPIO_UCB1400
> > -void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data);
> > -#else
> > -static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data)
> > {} -#endif
> > -
> >  #endif
> > --
> > 1.7.1

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

end of thread, other threads:[~2010-10-01  0:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-16  2:32 [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Marek Vasut
2010-09-16  2:32 ` [PATCH 02/11] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
2010-09-20 14:16   ` Eric Miao
2010-09-20 14:21     ` Eric Miao
2010-09-21 21:56     ` Marek Vasut
2010-09-16  2:32 ` [PATCH 03/11] ARM: pxa: Push Colibri evalboard MFP into module files Marek Vasut
2010-09-20 14:29   ` Eric Miao
2010-09-21 21:55     ` Marek Vasut
2010-09-16  2:32 ` [PATCH 04/11] ARM: pxa: Add M41T00 RTC support into Colibri evalboard Marek Vasut
2010-09-20 14:40   ` Eric Miao
2010-09-16  2:32 ` [PATCH 05/11] ARM: pxa: Rename " Marek Vasut
2010-09-20 14:41   ` Eric Miao
2010-09-21 21:53     ` Marek Vasut
2010-09-16  2:32 ` [PATCH 06/11] ARM: pxa: Colibri PXA320 PCMCIA driver Marek Vasut
2010-09-20 14:43   ` Eric Miao
2010-09-21 21:52     ` Marek Vasut
2010-09-16  2:32 ` [PATCH 07/11] ARM: pxa: Modularize Palm Tungsten|C Marek Vasut
2010-09-20 14:44   ` Eric Miao
2010-09-16  2:32 ` [PATCH 08/11] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
2010-09-20 14:45   ` Eric Miao
2010-10-01  0:15     ` Marek Vasut
2010-09-16  2:33 ` [PATCH 09/11] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270 Marek Vasut
2010-09-20 14:46   ` Eric Miao
2010-09-16  2:33 ` [PATCH 10/11] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC Marek Vasut
2010-09-20 14:47   ` Eric Miao
2010-09-16  2:33 ` [PATCH 11/11] ARM: pxa: Add gpio-leds and vibrator support to PalmTC Marek Vasut
2010-09-20 14:47   ` Eric Miao
2010-09-20 14:14 ` [PATCH 01/11] ARM: pxa: Prepare pxa2xx pcmcia for pxa320 Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).