linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  6:33 ` [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
@ 2010-04-20  6:30   ` Felipe Balbi
  2010-04-20  7:10     ` Hiremath, Vaibhav
  2010-04-20  7:14     ` stanley.miao
  2010-04-20  7:07   ` Hiremath, Vaibhav
  1 sibling, 2 replies; 23+ messages in thread
From: Felipe Balbi @ 2010-04-20  6:30 UTC (permalink / raw)
  To: ext Stanley.Miao
  Cc: linux-omap@vger.kernel.org, tony@atomide.com, hvaibhav@ti.com,
	srk@ti.com, anuj.aggarwal@ti.com

Hi,

On Tue, Apr 20, 2010 at 08:33:28AM +0200, ext Stanley.Miao wrote:
>@@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
> 	/* RTC - S35390A */
> 	am3517_evm_rtc_init();
>
>-	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
>-				ARRAY_SIZE(am3517evm_i2c_boardinfo));
>+	i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
>+				ARRAY_SIZE(am3517evm_i2c1_boardinfo));

I'm curious why isn't this together with the other busses ??

-- 
balbi

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

* [PATCH 0/7] Some am3517 related patches [V3]
@ 2010-04-20  6:33 Stanley.Miao
  2010-04-20  6:33 ` [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

Changes from V2:
1, Again, removed the controversial patches.

Some am3517 related patches. The detaild changelog is below:

Stanley.Miao (7):
      omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled
      omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
      AM3517: rename the i2c boardinfo to make it more readable
      AM3517: initialize i2c subsystem after mux subsystem
      OMAP: fix a gpmc nand problem
      omap: init the gpio pinmux for mmc
      omap hsmmc: fix the hsmmc driver for am3517.

 arch/arm/mach-omap2/board-am3517evm.c  |   24 ++++++++++++------------
 arch/arm/mach-omap2/devices.c          |    7 +++++++
 arch/arm/mach-omap2/gpmc-nand.c        |    3 +++
 arch/arm/mach-omap2/hsmmc.c            |   32 ++++++++++++++++++++++++--------
 arch/arm/plat-omap/include/plat/irqs.h |    2 --
 arch/arm/plat-omap/include/plat/nand.h |    7 +++++++
 6 files changed, 53 insertions(+), 22 deletions(-)


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

* [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-04-22 22:59   ` [APPLIED] [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is Tony Lindgren
  2010-04-20  6:33 ` [PATCH 2/7] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

If CONFIG_MTD_NAND_OMAP2 is not enabled, there will be a compile error,
"gpmc_nand_init() is not defined". Add a inline noop function to fix it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/plat-omap/include/plat/nand.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 6ba88d2..f8efd54 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -29,4 +29,11 @@ struct omap_nand_platform_data {
 /* size (4 KiB) for IO mapping */
 #define	NAND_IO_SIZE	SZ_4K
 
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
 extern int gpmc_nand_init(struct omap_nand_platform_data *d);
+#else
+static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
+{
+	return 0;
+}
+#endif
-- 
1.5.4.3


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

* [PATCH 2/7] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
  2010-04-20  6:33 ` [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-04-22 22:59   ` [APPLIED] [PATCH 2/7] omap: remove one of the define of Tony Lindgren
  2010-04-20  6:33 ` [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

INT_34XX_BENCH_MPU_EMUL was defined twice, another is at Line 312.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/plat-omap/include/plat/irqs.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index b65088a..4017019 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -345,8 +345,6 @@
 #define INT_34XX_MMC3_IRQ	94
 #define INT_34XX_GPT12_IRQ	95
 
-#define	INT_34XX_BENCH_MPU_EMUL	3
-
 #define INT_35XX_HECC0_IRQ		24
 #define INT_35XX_HECC1_IRQ		28
 #define INT_35XX_EMAC_C0_RXTHRESH_IRQ	67
-- 
1.5.4.3


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

* [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
  2010-04-20  6:33 ` [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
  2010-04-20  6:33 ` [PATCH 2/7] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-04-20  6:30   ` Felipe Balbi
  2010-04-20  7:07   ` Hiremath, Vaibhav
  2010-04-20  6:33 ` [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

There are three i2c buses on am3517, now rename these three boardinfo
structure name to am3517evm_i2c1_boardinfo, am3517evm_i2c2_boardinfo,
and am3517evm_i2c3_boardinfo, to make it more readable.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 6ae8805..3acfcae 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -39,7 +39,7 @@
 #define LCD_PANEL_BKLIGHT_PWR	182
 #define LCD_PANEL_PWM		181
 
-static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("s35390a", 0x30),
 		.type		= "s35390a",
@@ -69,7 +69,7 @@ static void __init am3517_evm_rtc_init(void)
 		gpio_free(GPIO_RTCS35390A_IRQ);
 		return;
 	}
-	am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
+	am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
 }
 
 /*
@@ -80,7 +80,7 @@ static void __init am3517_evm_rtc_init(void)
 static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 };
-static struct i2c_board_info __initdata am3517evm_tca6416_info_0[] = {
+static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("tca6416", 0x21),
 		.platform_data = &am3517evm_gpio_expander_info_0,
@@ -94,7 +94,7 @@ static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
 static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES + 32,
 };
-static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
+static struct i2c_board_info __initdata am3517evm_i2c3_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("tca6416", 0x20),
 		.platform_data = &am3517evm_ui_gpio_expander_info_1,
@@ -108,10 +108,10 @@ static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
 static int __init am3517_evm_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 400, NULL, 0);
-	omap_register_i2c_bus(2, 400, am3517evm_tca6416_info_0,
-			ARRAY_SIZE(am3517evm_tca6416_info_0));
-	omap_register_i2c_bus(3, 400, am3517evm_ui_tca6416_info,
-			ARRAY_SIZE(am3517evm_ui_tca6416_info));
+	omap_register_i2c_bus(2, 400, am3517evm_i2c2_boardinfo,
+			ARRAY_SIZE(am3517evm_i2c2_boardinfo));
+	omap_register_i2c_bus(3, 400, am3517evm_i2c3_boardinfo,
+			ARRAY_SIZE(am3517evm_i2c3_boardinfo));
 
 	return 0;
 }
@@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
 	/* RTC - S35390A */
 	am3517_evm_rtc_init();
 
-	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
-				ARRAY_SIZE(am3517evm_i2c_boardinfo));
+	i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
+				ARRAY_SIZE(am3517evm_i2c1_boardinfo));
 }
 
 static void __init am3517_evm_map_io(void)
-- 
1.5.4.3


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

* [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
                   ` (2 preceding siblings ...)
  2010-04-20  6:33 ` [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-04-22 23:01   ` [APPLIED] " Tony Lindgren
  2010-04-20  6:33 ` [PATCH 5/7] OMAP: fix a gpmc nand problem Stanley.Miao
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

The initialize of i2c subsystem will set pinmux, so it should be done
after the initialize of mux subsystem initialization.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 3acfcae..cd031c9 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -294,9 +294,9 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 static void __init am3517_evm_init(void)
 {
-	am3517_evm_i2c_init();
-
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+	am3517_evm_i2c_init();
 	platform_add_devices(am3517_evm_devices,
 				ARRAY_SIZE(am3517_evm_devices));
 
-- 
1.5.4.3


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

* [PATCH 5/7] OMAP: fix a gpmc nand problem
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
                   ` (3 preceding siblings ...)
  2010-04-20  6:33 ` [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-04-22 23:01   ` [APPLIED] " Tony Lindgren
  2010-04-20  6:33 ` [PATCH 6/7] omap: init the gpio pinmux for mmc Stanley.Miao
  2010-04-20  6:33 ` [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause
a Oops.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/gpmc-nand.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 64d74f0..e57fb29 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void)
 	struct gpmc_timings t;
 	int err;
 
+	if (!gpmc_nand_data->gpmc_t)
+		return 0;
+
 	memset(&t, 0, sizeof(t));
 	t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk);
 	t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on);
-- 
1.5.4.3


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

* [PATCH 6/7] omap: init the gpio pinmux for mmc
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
                   ` (4 preceding siblings ...)
  2010-04-20  6:33 ` [PATCH 5/7] OMAP: fix a gpmc nand problem Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-05-11 23:13   ` Tony Lindgren
  2010-04-20  6:33 ` [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

There is two gpio for mmc use, one is for card detecting, another is
used for checking write protect. Intialize its pinmux in case the bootloader
doesn't set it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/devices.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 23e4d77..df9c62a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -591,6 +591,13 @@ static inline void omap_hsmmc_reset(void) {}
 static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			int controller_nr)
 {
+	if (mmc_controller->slots[0].switch_pin > 0)
+		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
+					OMAP_PIN_INPUT_PULLUP);
+	if (mmc_controller->slots[0].gpio_wp > 0)
+		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
+					OMAP_PIN_INPUT_PULLUP);
+
 	if (cpu_is_omap2420() && controller_nr == 0) {
 		omap_cfg_reg(H18_24XX_MMC_CMD);
 		omap_cfg_reg(H15_24XX_MMC_CLKI);
-- 
1.5.4.3


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

* [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517.
  2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
                   ` (5 preceding siblings ...)
  2010-04-20  6:33 ` [PATCH 6/7] omap: init the gpio pinmux for mmc Stanley.Miao
@ 2010-04-20  6:33 ` Stanley.Miao
  2010-05-11 23:26   ` Tony Lindgren
  6 siblings, 1 reply; 23+ messages in thread
From: Stanley.Miao @ 2010-04-20  6:33 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk, anuj.aggarwal

AM3517 don't have the register OMAP343X_CONTROL_PBIAS_LITE and the regulators
like "vmmc", so we set a noop "set_power" function for it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/hsmmc.c |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 9ad2295..5f46797 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -139,6 +139,12 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot,
 	}
 }
 
+static int am3517_mmc_set_power(struct device *dev, int slot, int power_on,
+								int vdd)
+{
+	return 0;
+}
+
 static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
 
 void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
@@ -150,7 +156,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 	if (cpu_is_omap2430()) {
 		control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
 		control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
-	} else {
+	} else if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
 		control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
 		control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
 	}
@@ -216,12 +222,25 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 		 */
 		mmc->slots[0].ocr_mask = c->ocr_mask;
 
+		if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
+			switch (c->mmc) {
+			case 1:
+				/* on-chip level shifting via PBIAS0/PBIAS1 */
+				mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
+				mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
+				break;
+			case 2:
+			case 3:
+				/* off-chip level shifting, or none */
+				mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
+				mmc->slots[0].after_set_reg = NULL;
+				break;
+			}
+		} else /* cpu_is_omap3517() || cpu_is_omap3505() */
+			mmc->slots[0].set_power = am3517_mmc_set_power;
+
 		switch (c->mmc) {
 		case 1:
-			/* on-chip level shifting via PBIAS0/PBIAS1 */
-			mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
-			mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
-
 			/* Omap3630 HSMMC1 supports only 4-bit */
 			if (cpu_is_omap3630() && c->wires > 4) {
 				c->wires = 4;
@@ -235,9 +254,6 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 				c->wires = 4;
 			/* FALLTHROUGH */
 		case 3:
-			/* off-chip level shifting, or none */
-			mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
-			mmc->slots[0].after_set_reg = NULL;
 			break;
 		default:
 			pr_err("MMC%d configuration not supported!\n", c->mmc);
-- 
1.5.4.3


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

* RE: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  6:33 ` [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
  2010-04-20  6:30   ` Felipe Balbi
@ 2010-04-20  7:07   ` Hiremath, Vaibhav
  2010-05-11 23:19     ` Tony Lindgren
  1 sibling, 1 reply; 23+ messages in thread
From: Hiremath, Vaibhav @ 2010-04-20  7:07 UTC (permalink / raw)
  To: Stanley.Miao, linux-omap@vger.kernel.org
  Cc: tony@atomide.com, Govindarajan, Sriramakrishnan, Aggarwal, Anuj

\

> -----Original Message-----
> From: Stanley.Miao [mailto:stanley.miao@windriver.com]
> Sent: Tuesday, April 20, 2010 12:03 PM
> To: linux-omap@vger.kernel.org
> Cc: tony@atomide.com; Hiremath, Vaibhav; Govindarajan, Sriramakrishnan;
> Aggarwal, Anuj
> Subject: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more
> readable
> 
> There are three i2c buses on am3517, now rename these three boardinfo
> structure name to am3517evm_i2c1_boardinfo, am3517evm_i2c2_boardinfo,
> and am3517evm_i2c3_boardinfo, to make it more readable.
> 
[Hiremath, Vaibhav] Since we haven't had any objection/suggestion to follow naming convention based on i2C indexes, I think we can merge this patch.

Acked-By: Vaibhav Hiremath <hvaibhav@ti.com>

Thanks,
Vaibhav

> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/board-am3517evm.c |   20 ++++++++++----------
>  1 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-
> omap2/board-am3517evm.c
> index 6ae8805..3acfcae 100644
> --- a/arch/arm/mach-omap2/board-am3517evm.c
> +++ b/arch/arm/mach-omap2/board-am3517evm.c
> @@ -39,7 +39,7 @@
>  #define LCD_PANEL_BKLIGHT_PWR	182
>  #define LCD_PANEL_PWM		181
> 
> -static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = {
> +static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
>  	{
>  		I2C_BOARD_INFO("s35390a", 0x30),
>  		.type		= "s35390a",
> @@ -69,7 +69,7 @@ static void __init am3517_evm_rtc_init(void)
>  		gpio_free(GPIO_RTCS35390A_IRQ);
>  		return;
>  	}
> -	am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
> +	am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
>  }
> 
>  /*
> @@ -80,7 +80,7 @@ static void __init am3517_evm_rtc_init(void)
>  static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
>  	.gpio_base	= OMAP_MAX_GPIO_LINES,
>  };
> -static struct i2c_board_info __initdata am3517evm_tca6416_info_0[] = {
> +static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
>  	{
>  		I2C_BOARD_INFO("tca6416", 0x21),
>  		.platform_data = &am3517evm_gpio_expander_info_0,
> @@ -94,7 +94,7 @@ static struct pca953x_platform_data
> am3517evm_ui_gpio_expander_info_1 = {
>  static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
>  	.gpio_base	= OMAP_MAX_GPIO_LINES + 32,
>  };
> -static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
> +static struct i2c_board_info __initdata am3517evm_i2c3_boardinfo[] = {
>  	{
>  		I2C_BOARD_INFO("tca6416", 0x20),
>  		.platform_data = &am3517evm_ui_gpio_expander_info_1,
> @@ -108,10 +108,10 @@ static struct i2c_board_info __initdata
> am3517evm_ui_tca6416_info[] = {
>  static int __init am3517_evm_i2c_init(void)
>  {
>  	omap_register_i2c_bus(1, 400, NULL, 0);
> -	omap_register_i2c_bus(2, 400, am3517evm_tca6416_info_0,
> -			ARRAY_SIZE(am3517evm_tca6416_info_0));
> -	omap_register_i2c_bus(3, 400, am3517evm_ui_tca6416_info,
> -			ARRAY_SIZE(am3517evm_ui_tca6416_info));
> +	omap_register_i2c_bus(2, 400, am3517evm_i2c2_boardinfo,
> +			ARRAY_SIZE(am3517evm_i2c2_boardinfo));
> +	omap_register_i2c_bus(3, 400, am3517evm_i2c3_boardinfo,
> +			ARRAY_SIZE(am3517evm_i2c3_boardinfo));
> 
>  	return 0;
>  }
> @@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
>  	/* RTC - S35390A */
>  	am3517_evm_rtc_init();
> 
> -	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
> -				ARRAY_SIZE(am3517evm_i2c_boardinfo));
> +	i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
> +				ARRAY_SIZE(am3517evm_i2c1_boardinfo));
>  }
> 
>  static void __init am3517_evm_map_io(void)
> --
> 1.5.4.3


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

* RE: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  6:30   ` Felipe Balbi
@ 2010-04-20  7:10     ` Hiremath, Vaibhav
  2010-04-20  7:14     ` stanley.miao
  1 sibling, 0 replies; 23+ messages in thread
From: Hiremath, Vaibhav @ 2010-04-20  7:10 UTC (permalink / raw)
  To: felipe.balbi@nokia.com, ext Stanley.Miao
  Cc: linux-omap@vger.kernel.org, tony@atomide.com,
	Govindarajan, Sriramakrishnan, Aggarwal, Anuj


> -----Original Message-----
> From: Felipe Balbi [mailto:felipe.balbi@nokia.com]
> Sent: Tuesday, April 20, 2010 12:01 PM
> To: ext Stanley.Miao
> Cc: linux-omap@vger.kernel.org; tony@atomide.com; Hiremath, Vaibhav;
> Govindarajan, Sriramakrishnan; Aggarwal, Anuj
> Subject: Re: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more
> readable
> 
> Hi,
> 
> On Tue, Apr 20, 2010 at 08:33:28AM +0200, ext Stanley.Miao wrote:
> >@@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
> > 	/* RTC - S35390A */
> > 	am3517_evm_rtc_init();
> >
> >-	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
> >-				ARRAY_SIZE(am3517evm_i2c_boardinfo));
> >+	i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
> >+				ARRAY_SIZE(am3517evm_i2c1_boardinfo));
> 
> I'm curious why isn't this together with the other busses ??
> 
[Hiremath, Vaibhav] Filipe,

This is because we need to assign IRQ number of GPIO 55 for RTC.

Thanks,
Vaibhav

> --
> balbi

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

* Re: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  6:30   ` Felipe Balbi
  2010-04-20  7:10     ` Hiremath, Vaibhav
@ 2010-04-20  7:14     ` stanley.miao
  1 sibling, 0 replies; 23+ messages in thread
From: stanley.miao @ 2010-04-20  7:14 UTC (permalink / raw)
  To: felipe.balbi
  Cc: linux-omap@vger.kernel.org, tony@atomide.com, hvaibhav@ti.com,
	srk@ti.com, anuj.aggarwal@ti.com

Felipe Balbi wrote:
> Hi,
>
> On Tue, Apr 20, 2010 at 08:33:28AM +0200, ext Stanley.Miao wrote:
>> @@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
>> /* RTC - S35390A */
>> am3517_evm_rtc_init();
>>
>> - i2c_register_board_info(1, am3517evm_i2c_boardinfo,
>> - ARRAY_SIZE(am3517evm_i2c_boardinfo));
>> + i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
>> + ARRAY_SIZE(am3517evm_i2c1_boardinfo));
>
> I'm curious why isn't this together with the other busses ??
>
rtc s35390a is on i2c1 bus. am3517_evm_rtc_init() will initialize the 
IRQ(a gpio pin).
So i2c_register_board_info have to be put after am3517_evm_rtc_init.

Stanley.


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

* [APPLIED] [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is
  2010-04-20  6:33 ` [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
@ 2010-04-22 22:59   ` Tony Lindgren
  0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2010-04-22 22:59 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): b25b5176cd0fc3880c4f79fe16721a209a19dc2c

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

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



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

* [APPLIED] [PATCH 2/7] omap: remove one of the define of
  2010-04-20  6:33 ` [PATCH 2/7] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
@ 2010-04-22 22:59   ` Tony Lindgren
  0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2010-04-22 22:59 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): ff1b3f874262c46ee4b7178b2246c8d205b4469f

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

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



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

* [APPLIED] [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem
  2010-04-20  6:33 ` [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
@ 2010-04-22 23:01   ` Tony Lindgren
  0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2010-04-22 23:01 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): c48bdf43609d0dd3f25918b0870029c47bb0e699

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

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



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

* [APPLIED] [PATCH 5/7] OMAP: fix a gpmc nand problem
  2010-04-20  6:33 ` [PATCH 5/7] OMAP: fix a gpmc nand problem Stanley.Miao
@ 2010-04-22 23:01   ` Tony Lindgren
  0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2010-04-22 23:01 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): 3449f462b56f7d3d3328cf2ed0948c3e5f022666

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

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



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

* Re: [PATCH 6/7] omap: init the gpio pinmux for mmc
  2010-04-20  6:33 ` [PATCH 6/7] omap: init the gpio pinmux for mmc Stanley.Miao
@ 2010-05-11 23:13   ` Tony Lindgren
  2010-05-13  6:02     ` stanley.miao
  0 siblings, 1 reply; 23+ messages in thread
From: Tony Lindgren @ 2010-05-11 23:13 UTC (permalink / raw)
  To: Stanley.Miao; +Cc: linux-omap, hvaibhav, srk, anuj.aggarwal

* Stanley.Miao <stanley.miao@windriver.com> [100419 23:20]:
> There is two gpio for mmc use, one is for card detecting, another is
> used for checking write protect. Intialize its pinmux in case the bootloader
> doesn't set it.
> 
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/devices.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 23e4d77..df9c62a 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -591,6 +591,13 @@ static inline void omap_hsmmc_reset(void) {}
>  static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
>  			int controller_nr)
>  {
> +	if (mmc_controller->slots[0].switch_pin > 0)
> +		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
> +					OMAP_PIN_INPUT_PULLUP);
> +	if (mmc_controller->slots[0].gpio_wp > 0)
> +		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
> +					OMAP_PIN_INPUT_PULLUP);
> +
>  	if (cpu_is_omap2420() && controller_nr == 0) {
>  		omap_cfg_reg(H18_24XX_MMC_CMD);
>  		omap_cfg_reg(H15_24XX_MMC_CLKI);

The problem I see with this patch is that it attempts to mux
even for the GPIO pins on the companion chips, such as twl4030.

Got any ideas on how to prevent that?

Tony

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

* Re: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-20  7:07   ` Hiremath, Vaibhav
@ 2010-05-11 23:19     ` Tony Lindgren
  2010-05-13  6:05       ` stanley.miao
  0 siblings, 1 reply; 23+ messages in thread
From: Tony Lindgren @ 2010-05-11 23:19 UTC (permalink / raw)
  To: Hiremath, Vaibhav
  Cc: Stanley.Miao, linux-omap@vger.kernel.org,
	Govindarajan, Sriramakrishnan, Aggarwal, Anuj

* Hiremath, Vaibhav <hvaibhav@ti.com> [100420 00:03]:
> \
> 
> > -----Original Message-----
> > From: Stanley.Miao [mailto:stanley.miao@windriver.com]
> > Sent: Tuesday, April 20, 2010 12:03 PM
> > To: linux-omap@vger.kernel.org
> > Cc: tony@atomide.com; Hiremath, Vaibhav; Govindarajan, Sriramakrishnan;
> > Aggarwal, Anuj
> > Subject: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more
> > readable
> > 
> > There are three i2c buses on am3517, now rename these three boardinfo
> > structure name to am3517evm_i2c1_boardinfo, am3517evm_i2c2_boardinfo,
> > and am3517evm_i2c3_boardinfo, to make it more readable.
> > 
> [Hiremath, Vaibhav] Since we haven't had any objection/suggestion to follow naming convention based on i2C indexes, I think we can merge this patch.
> 
> Acked-By: Vaibhav Hiremath <hvaibhav@ti.com>

Looks like this needs to be refreshed against the current
omap-for-linus branch to apply.

Regards,

Tony

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

* Re: [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517.
  2010-04-20  6:33 ` [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
@ 2010-05-11 23:26   ` Tony Lindgren
  2010-05-13 11:53     ` stanley.miao
  0 siblings, 1 reply; 23+ messages in thread
From: Tony Lindgren @ 2010-05-11 23:26 UTC (permalink / raw)
  To: Stanley.Miao; +Cc: linux-omap, hvaibhav, srk, anuj.aggarwal

Hi,

Some requests to make this more future proof.

* Stanley.Miao <stanley.miao@windriver.com> [100419 23:20]:
> AM3517 don't have the register OMAP343X_CONTROL_PBIAS_LITE and the regulators
> like "vmmc", so we set a noop "set_power" function for it.
> 
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/hsmmc.c |   32 ++++++++++++++++++++++++--------
>  1 files changed, 24 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 9ad2295..5f46797 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -139,6 +139,12 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot,
>  	}
>  }
>  
> +static int am3517_mmc_set_power(struct device *dev, int slot, int power_on,
> +								int vdd)
> +{
> +	return 0;
> +}
> +

Please rename this to nop_mmc_set_power or similar. Other omaps may
need it too.

>  static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
>  
>  void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
> @@ -150,7 +156,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
>  	if (cpu_is_omap2430()) {
>  		control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
>  		control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
> -	} else {
> +	} else if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
>  		control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
>  		control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
>  	}

Let's get rid of multiple cpu_is_omapxxxx tests please. Could you please
update this along the lines of something like this:

#define HSMMC_HAS_PBIAS		(1 << 0)
#define HSMMC_HAS_WHATEVER	(1 << 1)
...

	if (!(cpu_is_omap3517() || cpu_is_omap3505())
		mmc->slots[i].features |= HSMMC_HAS_PBIAS;

> @@ -216,12 +222,25 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
>  		 */
>  		mmc->slots[0].ocr_mask = c->ocr_mask;
>  
> +		if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
> +			switch (c->mmc) {
> +			case 1:
> +				/* on-chip level shifting via PBIAS0/PBIAS1 */
> +				mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
> +				mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
> +				break;
> +			case 2:
> +			case 3:
> +				/* off-chip level shifting, or none */
> +				mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
> +				mmc->slots[0].after_set_reg = NULL;
> +				break;
> +			}
> +		} else /* cpu_is_omap3517() || cpu_is_omap3505() */
> +			mmc->slots[0].set_power = am3517_mmc_set_power;
> +

Then you can test for that flag here too. When new omaps get added, it
just a question of setting the features flags right.

Regards,

Tony

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

* Re: [PATCH 6/7] omap: init the gpio pinmux for mmc
  2010-05-11 23:13   ` Tony Lindgren
@ 2010-05-13  6:02     ` stanley.miao
  0 siblings, 0 replies; 23+ messages in thread
From: stanley.miao @ 2010-05-13  6:02 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, hvaibhav, srk, anuj.aggarwal

Tony Lindgren wrote:
> * Stanley.Miao <stanley.miao@windriver.com> [100419 23:20]:
>   
>> There is two gpio for mmc use, one is for card detecting, another is
>> used for checking write protect. Intialize its pinmux in case the bootloader
>> doesn't set it.
>>
>> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
>> ---
>>  arch/arm/mach-omap2/devices.c |    7 +++++++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
>> index 23e4d77..df9c62a 100644
>> --- a/arch/arm/mach-omap2/devices.c
>> +++ b/arch/arm/mach-omap2/devices.c
>> @@ -591,6 +591,13 @@ static inline void omap_hsmmc_reset(void) {}
>>  static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
>>  			int controller_nr)
>>  {
>> +	if (mmc_controller->slots[0].switch_pin > 0)
>> +		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>> +					OMAP_PIN_INPUT_PULLUP);
>> +	if (mmc_controller->slots[0].gpio_wp > 0)
>> +		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>> +					OMAP_PIN_INPUT_PULLUP);
>> +
>>  	if (cpu_is_omap2420() && controller_nr == 0) {
>>  		omap_cfg_reg(H18_24XX_MMC_CMD);
>>  		omap_cfg_reg(H15_24XX_MMC_CLKI);
>>     
>
> The problem I see with this patch is that it attempts to mux
> even for the GPIO pins on the companion chips, such as twl4030.
>
> Got any ideas on how to prevent that?
>   

Hi, Tony,

The gpios on companion chips are greater than OMAP_MAX_GPIO_LINES, they 
are not defined
in mux34xx.c, so omap_mux_init_gpio will do nothing.

However, I will add "if(gpio_wp < OMAP_MAX_GPIO_LINES)" to prevent from 
invoking omap_mux_init_gpio().

Stanley.

> Tony
>
>   


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

* Re: [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable
  2010-05-11 23:19     ` Tony Lindgren
@ 2010-05-13  6:05       ` stanley.miao
  0 siblings, 0 replies; 23+ messages in thread
From: stanley.miao @ 2010-05-13  6:05 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Hiremath, Vaibhav, linux-omap@vger.kernel.org,
	Govindarajan, Sriramakrishnan, Aggarwal, Anuj

Tony Lindgren wrote:
> * Hiremath, Vaibhav <hvaibhav@ti.com> [100420 00:03]:
>   
>> <snip>
>>>
>>> There are three i2c buses on am3517, now rename these three boardinfo
>>> structure name to am3517evm_i2c1_boardinfo, am3517evm_i2c2_boardinfo,
>>> and am3517evm_i2c3_boardinfo, to make it more readable.
>>>
>>>       
>> [Hiremath, Vaibhav] Since we haven't had any objection/suggestion to follow naming convention based on i2C indexes, I think we can merge this patch.
>>
>> Acked-By: Vaibhav Hiremath <hvaibhav@ti.com>
>>     
>
> Looks like this needs to be refreshed against the current
> omap-for-linus branch to apply.
>   

OK, I will re-send it soon.

Stanley.

> Regards,
>
> Tony
>
>   


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

* Re: [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517.
  2010-05-11 23:26   ` Tony Lindgren
@ 2010-05-13 11:53     ` stanley.miao
  2010-05-13 15:58       ` Tony Lindgren
  0 siblings, 1 reply; 23+ messages in thread
From: stanley.miao @ 2010-05-13 11:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, hvaibhav, srk, anuj.aggarwal

Tony Lindgren wrote:
> Hi,
>
> Some requests to make this more future proof.
>
> * Stanley.Miao <stanley.miao@windriver.com> [100419 23:20]:
>   
>> AM3517 don't have the register OMAP343X_CONTROL_PBIAS_LITE and the regulators
>> like "vmmc", so we set a noop "set_power" function for it.
>>
>> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
>> ---
>>  arch/arm/mach-omap2/hsmmc.c |   32 ++++++++++++++++++++++++--------
>>  1 files changed, 24 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
>> index 9ad2295..5f46797 100644
>> --- a/arch/arm/mach-omap2/hsmmc.c
>> +++ b/arch/arm/mach-omap2/hsmmc.c
>> @@ -139,6 +139,12 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot,
>>  	}
>>  }
>>  
>> +static int am3517_mmc_set_power(struct device *dev, int slot, int power_on,
>> +								int vdd)
>> +{
>> +	return 0;
>> +}
>> +
>>     
>
> Please rename this to nop_mmc_set_power or similar. Other omaps may
> need it too.
>   

Accepted.

>   
>>  static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
>>  
>>  void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
>> @@ -150,7 +156,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
>>  	if (cpu_is_omap2430()) {
>>  		control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
>>  		control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
>> -	} else {
>> +	} else if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
>>  		control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
>>  		control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
>>  	}
>>     
>
> Let's get rid of multiple cpu_is_omapxxxx tests please. Could you please
> update this along the lines of something like this:
>
> #define HSMMC_HAS_PBIAS		(1 << 0)
> #define HSMMC_HAS_WHATEVER	(1 << 1)
> ...
>
> 	if (!(cpu_is_omap3517() || cpu_is_omap3505())
> 		mmc->slots[i].features |= HSMMC_HAS_PBIAS;
>   

Accepted.

We can move other features into the variable "features", such as 
"nonremovable", "power_saving".

Stanley.

>   
>> @@ -216,12 +222,25 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
>>  		 */
>>  		mmc->slots[0].ocr_mask = c->ocr_mask;
>>  
>> +		if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
>> +			switch (c->mmc) {
>> +			case 1:
>> +				/* on-chip level shifting via PBIAS0/PBIAS1 */
>> +				mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
>> +				mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
>> +				break;
>> +			case 2:
>> +			case 3:
>> +				/* off-chip level shifting, or none */
>> +				mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
>> +				mmc->slots[0].after_set_reg = NULL;
>> +				break;
>> +			}
>> +		} else /* cpu_is_omap3517() || cpu_is_omap3505() */
>> +			mmc->slots[0].set_power = am3517_mmc_set_power;
>> +
>>     
>
> Then you can test for that flag here too. When new omaps get added, it
> just a question of setting the features flags right.
>
> Regards,
>
> Tony
>
>   


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

* Re: [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517.
  2010-05-13 11:53     ` stanley.miao
@ 2010-05-13 15:58       ` Tony Lindgren
  0 siblings, 0 replies; 23+ messages in thread
From: Tony Lindgren @ 2010-05-13 15:58 UTC (permalink / raw)
  To: stanley.miao; +Cc: linux-omap, hvaibhav, srk, anuj.aggarwal

* stanley.miao <stanley.miao@windriver.com> [100513 04:38]:
> We can move other features into the variable "features", such as
> "nonremovable", "power_saving".

Great, that sounds good to me. Might help with the mmc init issues
for omap4 also.

Regards,

Tony

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

end of thread, other threads:[~2010-05-13 15:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  6:33 [PATCH 0/7] Some am3517 related patches [V3] Stanley.Miao
2010-04-20  6:33 ` [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
2010-04-22 22:59   ` [APPLIED] [PATCH 1/7] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is Tony Lindgren
2010-04-20  6:33 ` [PATCH 2/7] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
2010-04-22 22:59   ` [APPLIED] [PATCH 2/7] omap: remove one of the define of Tony Lindgren
2010-04-20  6:33 ` [PATCH 3/7] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
2010-04-20  6:30   ` Felipe Balbi
2010-04-20  7:10     ` Hiremath, Vaibhav
2010-04-20  7:14     ` stanley.miao
2010-04-20  7:07   ` Hiremath, Vaibhav
2010-05-11 23:19     ` Tony Lindgren
2010-05-13  6:05       ` stanley.miao
2010-04-20  6:33 ` [PATCH 4/7] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
2010-04-22 23:01   ` [APPLIED] " Tony Lindgren
2010-04-20  6:33 ` [PATCH 5/7] OMAP: fix a gpmc nand problem Stanley.Miao
2010-04-22 23:01   ` [APPLIED] " Tony Lindgren
2010-04-20  6:33 ` [PATCH 6/7] omap: init the gpio pinmux for mmc Stanley.Miao
2010-05-11 23:13   ` Tony Lindgren
2010-05-13  6:02     ` stanley.miao
2010-04-20  6:33 ` [PATCH 7/7] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
2010-05-11 23:26   ` Tony Lindgren
2010-05-13 11:53     ` stanley.miao
2010-05-13 15:58       ` Tony Lindgren

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).