All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling
@ 2012-03-23  9:21 Russ Dill
  2012-03-23  9:21 ` [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection Russ Dill
                   ` (11 more replies)
  0 siblings, 12 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill

This patchset cleans up some problems with gpmc connected smsc911x
chips. Commit c7e963f6888816 (net/smsc911x: Add regulator support)
broke registration of gpmc connected smcs911x devices on machines with
regulator support, but without dummy regulator support by requiring
regulators.

This version fixes a rebase problem and drops the fixed-helper.c
kernel doc cleanup as Mark Brown is picking that up. There was some
discussion as whether or not to undo the ID change that happened on
several boards due to 21b42731 (omap: convert boards that use SMSC911x
to use gpmc-smsc911x), that can likely be changed in a subsequent patch
if necessary.

Commit e4b0b2cbbb (ARM: OMAP2+: gpmc-smsc911x: add required smsc911x
regulators) fixed the issue for boards with single smsc911x devices,
but attempted to register the fixed voltage regulator twice for boards
with 2 devices which fails.

bb60424af5 (ARM: OMAP2+: gpmc-smsc911x: only register regulator for
first instance) cleaned this up a little bit by only automatically
registering regulators for the first device, but still did not allow
the second device to function because it lacked regulators.

The new patchset pushes register regulation back to where it belongs,
in the board files. It eliminates a lot of boilerplate by utilizing
the new regulator_register_fixed function.

Additionally, there are 3 cleanup patches in this patch series. One is
a fix for potential stale data usage in gpmc-smsc911x, another removes
dead code, and the final one eliminates an unneeded static variable in
gpmc-smsc911x.

These patches have been compile tested on next-20120322 and have been
tested on omap3evm (am37x-evm) hardware.

Russ Dill (12):
  Remove odd gpmc_cfg/board_data redirection.
  Fix possible stale smsc911x flags.
  Remove unused rate calculation.
  Remove regulator support from gmpc-smsc911x
  Add dummy smsc911x regulators to cm-t35.
  Add dummy smsc911x regulators to igep0020.
  Add dummy smsc911x regulators to ldp.
  Add dummy smsc911x regulators to omap3evm.
  Add dummy smsc911x regulators to omap3logic.
  Add dummy smsc911x regulators to omap3stalker.
  Add dummy smsc911x regulators to overo.
  Add dummy smsc911x regulators to zoom-debugboard.

 arch/arm/mach-omap2/board-cm-t35.c          |    9 ++++
 arch/arm/mach-omap2/board-igep0020.c        |    6 +++
 arch/arm/mach-omap2/board-ldp.c             |    7 +++
 arch/arm/mach-omap2/board-omap3evm.c        |   15 +++----
 arch/arm/mach-omap2/board-omap3logic.c      |    7 +++
 arch/arm/mach-omap2/board-omap3stalker.c    |   16 +++----
 arch/arm/mach-omap2/board-overo.c           |    8 +++
 arch/arm/mach-omap2/board-zoom-debugboard.c |    9 ++++
 arch/arm/mach-omap2/gpmc-smsc911x.c         |   65 +--------------------------
 9 files changed, 61 insertions(+), 81 deletions(-)

-- 
1.7.9.1


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

* [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-27 15:45   ` Igor Grinberg
  2012-03-23  9:21 ` [PATCH 02/12] Fix possible stale smsc911x flags Russ Dill
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

This seems to be a leftover from when gpmc-smsc911x.c was copied
from gpmc-smc91x.c.

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/gpmc-smsc911x.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index 5e5880d..aa0c296 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -26,8 +26,6 @@
 #include <plat/gpmc.h>
 #include <plat/gpmc-smsc911x.h>
 
-static struct omap_smsc911x_platform_data *gpmc_cfg;
-
 static struct resource gpmc_smsc911x_resources[] = {
 	[0] = {
 		.flags		= IORESOURCE_MEM,
@@ -93,14 +91,12 @@ static struct platform_device gpmc_smsc911x_regulator = {
  * assume that pin multiplexing is done in the board-*.c file,
  * or in the bootloader.
  */
-void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
+void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
 {
 	struct platform_device *pdev;
 	unsigned long cs_mem_base;
 	int ret;
 
-	gpmc_cfg = board_data;
-
 	if (!gpmc_cfg->id) {
 		ret = platform_device_register(&gpmc_smsc911x_regulator);
 		if (ret < 0) {
-- 
1.7.9.1


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

* [PATCH 02/12] Fix possible stale smsc911x flags.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
  2012-03-23  9:21 ` [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-27 15:47   ` Igor Grinberg
  2012-03-23  9:21 ` [PATCH 03/12] Remove unused rate calculation Russ Dill
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

If this function is called the first time with flags set, and the
second time without flags set then the leftover flags from the first
called will be used rather than the desired default flags.

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/gpmc-smsc911x.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index aa0c296..f9446ea 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -39,7 +39,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
 	.phy_interface	= PHY_INTERFACE_MODE_MII,
 	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
 	.irq_type	= SMSC911X_IRQ_TYPE_OPEN_DRAIN,
-	.flags		= SMSC911X_USE_16BIT,
 };
 
 static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
@@ -135,8 +134,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
 		gpio_set_value(gpmc_cfg->gpio_reset, 1);
 	}
 
-	if (gpmc_cfg->flags)
-		gpmc_smsc911x_config.flags = gpmc_cfg->flags;
+	gpmc_smsc911x_config.flags = gpmc_cfg->flags ? : SMSC911X_USE_16BIT;
 
 	pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
 		 gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
-- 
1.7.9.1


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

* [PATCH 03/12] Remove unused rate calculation.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
  2012-03-23  9:21 ` [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection Russ Dill
  2012-03-23  9:21 ` [PATCH 02/12] Fix possible stale smsc911x flags Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 04/12] Remove regulator support from gmpc-smsc911x Russ Dill
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Looking back into git history, this code was never used and was
probably left over from a copy/paste.

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3evm.c     |    9 ---------
 arch/arm/mach-omap2/board-omap3stalker.c |    9 ---------
 2 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index a659e19..548e1ef 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -114,15 +114,6 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
 
 static inline void __init omap3evm_init_smsc911x(void)
 {
-	struct clk *l3ck;
-	unsigned int rate;
-
-	l3ck = clk_get(NULL, "l3_ck");
-	if (IS_ERR(l3ck))
-		rate = 100000000;
-	else
-		rate = clk_get_rate(l3ck);
-
 	/* Configure ethernet controller reset gpio */
 	if (cpu_is_omap3430()) {
 		if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 6410043..de95352 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -72,15 +72,6 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
 
 static inline void __init omap3stalker_init_eth(void)
 {
-	struct clk *l3ck;
-	unsigned int rate;
-
-	l3ck = clk_get(NULL, "l3_ck");
-	if (IS_ERR(l3ck))
-		rate = 100000000;
-	else
-		rate = clk_get_rate(l3ck);
-
 	omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
 	gpmc_smsc911x_init(&smsc911x_cfg);
 }
-- 
1.7.9.1


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

* [PATCH 04/12] Remove regulator support from gmpc-smsc911x
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (2 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 03/12] Remove unused rate calculation Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-27 15:46   ` Igor Grinberg
  2012-03-23  9:21 ` [PATCH 05/12] Add dummy smsc911x regulators to cm-t35 Russ Dill
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Adding in support for regulators here creates several headaches.
 - Boards that declare their own regulator cannot use this function.
 - Multiple calls to this function require special handling.
 - Boards that declare id's other than '0' need special handling.

Now that there is a simple regulator_register_fixed, we can push
this registration back into the board files.

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/gpmc-smsc911x.c |   55 -----------------------------------
 1 files changed, 0 insertions(+), 55 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index f9446ea..b6c77be 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -19,8 +19,6 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/smsc911x.h>
-#include <linux/regulator/fixed.h>
-#include <linux/regulator/machine.h>
 
 #include <plat/board.h>
 #include <plat/gpmc.h>
@@ -41,50 +39,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
 	.irq_type	= SMSC911X_IRQ_TYPE_OPEN_DRAIN,
 };
 
-static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
-	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
-	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
-/* Generic regulator definition to satisfy smsc911x */
-static struct regulator_init_data gpmc_smsc911x_reg_init_data = {
-	.constraints = {
-		.min_uV			= 3300000,
-		.max_uV			= 3300000,
-		.valid_modes_mask	= REGULATOR_MODE_NORMAL
-					| REGULATOR_MODE_STANDBY,
-		.valid_ops_mask		= REGULATOR_CHANGE_MODE
-					| REGULATOR_CHANGE_STATUS,
-	},
-	.num_consumer_supplies	= ARRAY_SIZE(gpmc_smsc911x_supply),
-	.consumer_supplies	= gpmc_smsc911x_supply,
-};
-
-static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {
-	.supply_name		= "gpmc_smsc911x",
-	.microvolts		= 3300000,
-	.gpio			= -EINVAL,
-	.startup_delay		= 0,
-	.enable_high		= 0,
-	.enabled_at_boot	= 1,
-	.init_data		= &gpmc_smsc911x_reg_init_data,
-};
-
-/*
- * Platform device id of 42 is a temporary fix to avoid conflicts
- * with other reg-fixed-voltage devices. The real fix should
- * involve the driver core providing a way of dynamically
- * assigning a unique id on registration for platform devices
- * in the same name space.
- */
-static struct platform_device gpmc_smsc911x_regulator = {
-	.name		= "reg-fixed-voltage",
-	.id		= 42,
-	.dev = {
-		.platform_data	= &gpmc_smsc911x_fixed_reg_data,
-	},
-};
-
 /*
  * Initialize smsc911x device connected to the GPMC. Note that we
  * assume that pin multiplexing is done in the board-*.c file,
@@ -96,15 +50,6 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
 	unsigned long cs_mem_base;
 	int ret;
 
-	if (!gpmc_cfg->id) {
-		ret = platform_device_register(&gpmc_smsc911x_regulator);
-		if (ret < 0) {
-			pr_err("Unable to register smsc911x regulators: %d\n",
-			       ret);
-			return;
-		}
-	}
-
 	if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
 		pr_err("Failed to request GPMC mem region\n");
 		return;
-- 
1.7.9.1


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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (3 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 04/12] Remove regulator support from gmpc-smsc911x Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-27 15:53     ` Igor Grinberg
  2012-03-23  9:21 ` [PATCH 06/12] Add dummy smsc911x regulators to igep0020 Russ Dill
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-cm-t35.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 41b0a2f..289ded3 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,6 +26,7 @@
 
 #include <linux/i2c/at24.h>
 #include <linux/i2c/twl.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/mmc/host.h>
 
@@ -630,10 +631,18 @@ static inline void cm_t3730_init_mux(void) {}
 static struct omap_board_config_kernel cm_t35_config[] __initdata = {
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init cm_t3x_common_init(void)
 {
 	omap_board_config = cm_t35_config;
 	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_serial_init();
 	omap_sdrc_init(mt46h32m32lf6_sdrc_params,
-- 
1.7.9.1


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

* [PATCH 06/12] Add dummy smsc911x regulators to igep0020.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (4 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 05/12] Add dummy smsc911x regulators to cm-t35 Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 07/12] Add dummy smsc911x regulators to ldp Russ Dill
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-igep0020.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e558800..930c0d3 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -634,8 +634,14 @@ static void __init igep_wlan_bt_init(void)
 static inline void __init igep_wlan_bt_init(void) { }
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init igep_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
 	/* Get IGEP2 hardware revision */
-- 
1.7.9.1


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

* [PATCH 07/12] Add dummy smsc911x regulators to ldp.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (5 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 06/12] Add dummy smsc911x regulators to igep0020 Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 08/12] Add dummy smsc911x regulators to omap3evm Russ Dill
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-ldp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d50a562a..1b60495 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/io.h>
@@ -410,8 +411,14 @@ static struct mtd_partition ldp_nand_partitions[] = {
 
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap_ldp_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	ldp_init_smsc911x();
 	omap_i2c_init();
-- 
1.7.9.1


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

* [PATCH 08/12] Add dummy smsc911x regulators to omap3evm.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (6 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 07/12] Add dummy smsc911x regulators to ldp Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 09/12] Add dummy smsc911x regulators to omap3logic Russ Dill
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 548e1ef..6a5e57c 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -623,9 +623,15 @@ static void __init omap3_evm_wl12xx_init(void)
 #endif
 }
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_evm_init(void)
 {
 	omap3_evm_get_revision();
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 
 	if (cpu_is_omap3630())
 		omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
-- 
1.7.9.1


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

* [PATCH 09/12] Add dummy smsc911x regulators to omap3logic.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (7 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 08/12] Add dummy smsc911x regulators to omap3evm Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 10/12] Add dummy smsc911x regulators to omap3stalker Russ Dill
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3logic.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 4a7d8c8..9b3c141 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 
 #include <linux/i2c/twl.h>
@@ -188,8 +189,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3logic_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap3torpedo_fix_pbias_voltage();
 	omap3logic_i2c_init();
-- 
1.7.9.1


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

* [PATCH 10/12] Add dummy smsc911x regulators to omap3stalker.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (8 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 09/12] Add dummy smsc911x regulators to omap3logic Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 11/12] Add dummy smsc911x regulators to overo Russ Dill
  2012-03-23  9:21 ` [PATCH 12/12] Add dummy smsc911x regulators to zoom-debugboard Russ Dill
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3stalker.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index de95352..4dffc95 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/mmc/host.h>
@@ -410,8 +411,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_stalker_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_board_config = omap3_stalker_config;
 	omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
-- 
1.7.9.1


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

* [PATCH 11/12] Add dummy smsc911x regulators to overo.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (9 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 10/12] Add dummy smsc911x regulators to omap3stalker Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  2012-03-23  9:21 ` [PATCH 12/12] Add dummy smsc911x regulators to zoom-debugboard Russ Dill
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-overo.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 668533e..33aa391 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -498,10 +498,18 @@ static struct gpio overo_bt_gpios[] __initdata = {
 	{ OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH,	"lcd bl enable" },
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init overo_init(void)
 {
 	int ret;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap_hsmmc_init(mmc);
 	overo_i2c_init();
-- 
1.7.9.1


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

* [PATCH 12/12] Add dummy smsc911x regulators to zoom-debugboard.
  2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
                   ` (10 preceding siblings ...)
  2012-03-23  9:21 ` [PATCH 11/12] Add dummy smsc911x regulators to overo Russ Dill
@ 2012-03-23  9:21 ` Russ Dill
  11 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-23  9:21 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, Russ Dill, Russ Dill

Signed-off-by: Russ Dill <russ.dill@ti.com>
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 369c2eb..f68b616 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -14,6 +14,9 @@
 #include <linux/smsc911x.h>
 #include <linux/interrupt.h>
 
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+
 #include <plat/gpmc.h>
 #include <plat/gpmc-smsc911x.h>
 
@@ -116,11 +119,17 @@ static struct platform_device *zoom_devices[] __initdata = {
 	&zoom_debugboard_serial_device,
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 int __init zoom_debugboard_init(void)
 {
 	if (!omap_zoom_debugboard_detect())
 		return 0;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	zoom_init_smsc911x();
 	zoom_init_quaduart();
 	return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
-- 
1.7.9.1


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

* Re: [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection.
  2012-03-23  9:21 ` [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection Russ Dill
@ 2012-03-27 15:45   ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-27 15:45 UTC (permalink / raw)
  To: Russ Dill
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij

Hi Russ,

Thanks for the patches.

Please, note:
* all OMAP patches that are "ready" for submission should have
  linux-arm-kernel@lists.infradead.org in Cc.
* Subject should be prefixed with: ARM: OMAP: ...

On 03/23/12 11:21, Russ Dill wrote:
> This seems to be a leftover from when gpmc-smsc911x.c was copied
> from gpmc-smc91x.c.
> 
> Signed-off-by: Russ Dill <russ.dill@ti.com>

Tested-by: Igor Grinberg <grinberg@compulab.co.il>


-- 
Regards,
Igor.

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

* Re: [PATCH 04/12] Remove regulator support from gmpc-smsc911x
  2012-03-23  9:21 ` [PATCH 04/12] Remove regulator support from gmpc-smsc911x Russ Dill
@ 2012-03-27 15:46   ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-27 15:46 UTC (permalink / raw)
  To: Russ Dill
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij

On 03/23/12 11:21, Russ Dill wrote:
> Adding in support for regulators here creates several headaches.
>  - Boards that declare their own regulator cannot use this function.
>  - Multiple calls to this function require special handling.
>  - Boards that declare id's other than '0' need special handling.
> 
> Now that there is a simple regulator_register_fixed, we can push
> this registration back into the board files.
> 
> Signed-off-by: Russ Dill <russ.dill@ti.com>

Tested-by: Igor Grinberg <grinberg@compulab.co.il>


-- 
Regards,
Igor.

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

* Re: [PATCH 02/12] Fix possible stale smsc911x flags.
  2012-03-23  9:21 ` [PATCH 02/12] Fix possible stale smsc911x flags Russ Dill
@ 2012-03-27 15:47   ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-27 15:47 UTC (permalink / raw)
  To: Russ Dill
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij

On 03/23/12 11:21, Russ Dill wrote:
> If this function is called the first time with flags set, and the
> second time without flags set then the leftover flags from the first
> called will be used rather than the desired default flags.
> 
> Signed-off-by: Russ Dill <russ.dill@ti.com>

Tested-by: Igor Grinberg <grinberg@compulab.co.il>


-- 
Regards,
Igor.

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-23  9:21 ` [PATCH 05/12] Add dummy smsc911x regulators to cm-t35 Russ Dill
@ 2012-03-27 15:53     ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-27 15:53 UTC (permalink / raw)
  To: Russ Dill
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Hi Russ,

This patch works, but can we, please use the attached patch instead?

Thanks

On 03/23/12 11:21, Russ Dill wrote:
> Signed-off-by: Russ Dill <russ.dill@ti.com>
> ---
>  arch/arm/mach-omap2/board-cm-t35.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
> index 41b0a2f..289ded3 100644
> --- a/arch/arm/mach-omap2/board-cm-t35.c
> +++ b/arch/arm/mach-omap2/board-cm-t35.c
> @@ -26,6 +26,7 @@
>  
>  #include <linux/i2c/at24.h>
>  #include <linux/i2c/twl.h>
> +#include <linux/regulator/fixed.h>
>  #include <linux/regulator/machine.h>
>  #include <linux/mmc/host.h>
>  
> @@ -630,10 +631,18 @@ static inline void cm_t3730_init_mux(void) {}
>  static struct omap_board_config_kernel cm_t35_config[] __initdata = {
>  };
>  
> +static struct regulator_consumer_supply dummy_supplies[] = {
> +	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
> +	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
> +	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
> +	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
> +};
> +
>  static void __init cm_t3x_common_init(void)
>  {
>  	omap_board_config = cm_t35_config;
>  	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
> +	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
>  	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
>  	omap_serial_init();
>  	omap_sdrc_init(mt46h32m32lf6_sdrc_params,

-- 
Regards,
Igor.

[-- Attachment #2: 0001-ARM-OMAP3-cm-t35-add-smsc911x-regulators.patch --]
[-- Type: text/x-patch, Size: 1711 bytes --]

>From 0e1bbe7634edbbb75493a7a6257db94621c1efab Mon Sep 17 00:00:00 2001
From: Igor Grinberg <grinberg@compulab.co.il>
Date: Fri, 23 Mar 2012 02:21:37 -0700
Subject: [PATCH] ARM: OMAP3: cm-t35: add smsc911x regulators

Add dummy regulators for smsc911x Ethernet controllers on both
cm-t35/cmt3730 and sb-t35 boards.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 arch/arm/mach-omap2/board-cm-t35.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index d73316e..8770be1 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,6 +26,7 @@
 
 #include <linux/i2c/at24.h>
 #include <linux/i2c/twl.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/mmc/host.h>
 
@@ -81,8 +82,23 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
 	.flags		= SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
 };
 
+static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
+static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init cm_t35_init_ethernet(void)
 {
+	regulator_register_fixed(0, cm_t35_smsc911x_supplies,
+				 ARRAY_SIZE(cm_t35_smsc911x_supplies));
+	regulator_register_fixed(1, sb_t35_smsc911x_supplies,
+				 ARRAY_SIZE(sb_t35_smsc911x_supplies));
+
 	gpmc_smsc911x_init(&cm_t35_smsc911x_cfg);
 	gpmc_smsc911x_init(&sb_t35_smsc911x_cfg);
 }
-- 
1.7.3.4


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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-27 15:53     ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-27 15:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russ,

This patch works, but can we, please use the attached patch instead?

Thanks

On 03/23/12 11:21, Russ Dill wrote:
> Signed-off-by: Russ Dill <russ.dill@ti.com>
> ---
>  arch/arm/mach-omap2/board-cm-t35.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
> index 41b0a2f..289ded3 100644
> --- a/arch/arm/mach-omap2/board-cm-t35.c
> +++ b/arch/arm/mach-omap2/board-cm-t35.c
> @@ -26,6 +26,7 @@
>  
>  #include <linux/i2c/at24.h>
>  #include <linux/i2c/twl.h>
> +#include <linux/regulator/fixed.h>
>  #include <linux/regulator/machine.h>
>  #include <linux/mmc/host.h>
>  
> @@ -630,10 +631,18 @@ static inline void cm_t3730_init_mux(void) {}
>  static struct omap_board_config_kernel cm_t35_config[] __initdata = {
>  };
>  
> +static struct regulator_consumer_supply dummy_supplies[] = {
> +	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
> +	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
> +	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
> +	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
> +};
> +
>  static void __init cm_t3x_common_init(void)
>  {
>  	omap_board_config = cm_t35_config;
>  	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
> +	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
>  	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
>  	omap_serial_init();
>  	omap_sdrc_init(mt46h32m32lf6_sdrc_params,

-- 
Regards,
Igor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-OMAP3-cm-t35-add-smsc911x-regulators.patch
Type: text/x-patch
Size: 1711 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120327/56f3e669/attachment.bin>

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-27 15:53     ` Igor Grinberg
@ 2012-03-27 17:28       ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-03-27 17:28 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
> Hi Russ,
> 
> This patch works, but can we, please use the attached patch instead?

Hmm what's the difference here? Do you have some real controllable
regulator for one of the smsc911x instances?

Anyways, I take it that you have tested that both smsc911x interfaces
work now?

Regards,

Tony

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-27 17:28       ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-03-27 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
> Hi Russ,
> 
> This patch works, but can we, please use the attached patch instead?

Hmm what's the difference here? Do you have some real controllable
regulator for one of the smsc911x instances?

Anyways, I take it that you have tested that both smsc911x interfaces
work now?

Regards,

Tony

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-27 15:53     ` Igor Grinberg
@ 2012-03-27 18:32       ` Russ Dill
  -1 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-27 18:32 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij, linux-arm-kernel

No objection.

On Tue, Mar 27, 2012 at 8:53 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
> Hi Russ,
>
> This patch works, but can we, please use the attached patch instead?
>
> Thanks
>
> On 03/23/12 11:21, Russ Dill wrote:
>> Signed-off-by: Russ Dill <russ.dill@ti.com>
>> ---
>>  arch/arm/mach-omap2/board-cm-t35.c |    9 +++++++++
>>  1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
>> index 41b0a2f..289ded3 100644
>> --- a/arch/arm/mach-omap2/board-cm-t35.c
>> +++ b/arch/arm/mach-omap2/board-cm-t35.c
>> @@ -26,6 +26,7 @@
>>
>>  #include <linux/i2c/at24.h>
>>  #include <linux/i2c/twl.h>
>> +#include <linux/regulator/fixed.h>
>>  #include <linux/regulator/machine.h>
>>  #include <linux/mmc/host.h>
>>
>> @@ -630,10 +631,18 @@ static inline void cm_t3730_init_mux(void) {}
>>  static struct omap_board_config_kernel cm_t35_config[] __initdata = {
>>  };
>>
>> +static struct regulator_consumer_supply dummy_supplies[] = {
>> +     REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
>> +     REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
>> +     REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
>> +     REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
>> +};
>> +
>>  static void __init cm_t3x_common_init(void)
>>  {
>>       omap_board_config = cm_t35_config;
>>       omap_board_config_size = ARRAY_SIZE(cm_t35_config);
>> +     regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
>>       omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
>>       omap_serial_init();
>>       omap_sdrc_init(mt46h32m32lf6_sdrc_params,
>
> --
> Regards,
> Igor.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-27 18:32       ` Russ Dill
  0 siblings, 0 replies; 36+ messages in thread
From: Russ Dill @ 2012-03-27 18:32 UTC (permalink / raw)
  To: linux-arm-kernel

No objection.

On Tue, Mar 27, 2012 at 8:53 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
> Hi Russ,
>
> This patch works, but can we, please use the attached patch instead?
>
> Thanks
>
> On 03/23/12 11:21, Russ Dill wrote:
>> Signed-off-by: Russ Dill <russ.dill@ti.com>
>> ---
>> ?arch/arm/mach-omap2/board-cm-t35.c | ? ?9 +++++++++
>> ?1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
>> index 41b0a2f..289ded3 100644
>> --- a/arch/arm/mach-omap2/board-cm-t35.c
>> +++ b/arch/arm/mach-omap2/board-cm-t35.c
>> @@ -26,6 +26,7 @@
>>
>> ?#include <linux/i2c/at24.h>
>> ?#include <linux/i2c/twl.h>
>> +#include <linux/regulator/fixed.h>
>> ?#include <linux/regulator/machine.h>
>> ?#include <linux/mmc/host.h>
>>
>> @@ -630,10 +631,18 @@ static inline void cm_t3730_init_mux(void) {}
>> ?static struct omap_board_config_kernel cm_t35_config[] __initdata = {
>> ?};
>>
>> +static struct regulator_consumer_supply dummy_supplies[] = {
>> + ? ? REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
>> + ? ? REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
>> + ? ? REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
>> + ? ? REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
>> +};
>> +
>> ?static void __init cm_t3x_common_init(void)
>> ?{
>> ? ? ? omap_board_config = cm_t35_config;
>> ? ? ? omap_board_config_size = ARRAY_SIZE(cm_t35_config);
>> + ? ? regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
>> ? ? ? omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
>> ? ? ? omap_serial_init();
>> ? ? ? omap_sdrc_init(mt46h32m32lf6_sdrc_params,
>
> --
> Regards,
> Igor.

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-27 17:28       ` Tony Lindgren
@ 2012-03-28  6:33         ` Igor Grinberg
  -1 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-28  6:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel

Hi Tony,

On 03/27/12 19:28, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
>> Hi Russ,
>>
>> This patch works, but can we, please use the attached patch instead?
> 
> Hmm what's the difference here? Do you have some real controllable
> regulator for one of the smsc911x instances?

Well, the difference here is that those regulators will only be present
if the smsc911x controllers are present and their initialization is done
along with the controllers.
Also, I want to separate the cm-t35 from sb-t35 for future easier
refactoring of the sb-t35 code so it can be reused also on cm-t3517.

Only vddvario for smsc911x.0 is controllable - connected to VIO, but
VIO will never be disabled as it also controls many other devices
(DRAM is among them), so I prefer it to be dummy and keep it together
with vdd33a.

> 
> Anyways, I take it that you have tested that both smsc911x interfaces
> work now?

Yes, both regulators are registered and found by the smsc911x driver.
There is some kind of problem with the smsc911x.1, but it looks unrelated
to the patch:

smsc911x: Driver version 2008-10-21
irq 323: nobody cared (try booting with the "irqpoll" option)
[<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
[<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
[<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
[<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
[<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
[<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
[<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
[<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
[<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
[<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
[<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
Exception stack(0xcf02de20 to 0xcf02de68)
de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
de60: 20000013 ffffffff
[<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
[<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
[<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
[<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
[<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
[<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
[<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
[<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
[<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
[<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
[<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
[<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
[<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
[<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
[<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
handlers:
[<c032ea98>] smsc911x_irqhandler
Disabling IRQ #323

I still haven't had a chance to look into this.
Does anyone have a clue?

-- 
Regards,
Igor.

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-28  6:33         ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-28  6:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

On 03/27/12 19:28, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
>> Hi Russ,
>>
>> This patch works, but can we, please use the attached patch instead?
> 
> Hmm what's the difference here? Do you have some real controllable
> regulator for one of the smsc911x instances?

Well, the difference here is that those regulators will only be present
if the smsc911x controllers are present and their initialization is done
along with the controllers.
Also, I want to separate the cm-t35 from sb-t35 for future easier
refactoring of the sb-t35 code so it can be reused also on cm-t3517.

Only vddvario for smsc911x.0 is controllable - connected to VIO, but
VIO will never be disabled as it also controls many other devices
(DRAM is among them), so I prefer it to be dummy and keep it together
with vdd33a.

> 
> Anyways, I take it that you have tested that both smsc911x interfaces
> work now?

Yes, both regulators are registered and found by the smsc911x driver.
There is some kind of problem with the smsc911x.1, but it looks unrelated
to the patch:

smsc911x: Driver version 2008-10-21
irq 323: nobody cared (try booting with the "irqpoll" option)
[<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
[<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
[<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
[<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
[<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
[<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
[<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
[<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
[<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
[<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
[<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
Exception stack(0xcf02de20 to 0xcf02de68)
de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
de60: 20000013 ffffffff
[<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
[<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
[<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
[<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
[<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
[<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
[<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
[<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
[<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
[<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
[<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
[<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
[<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
[<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
[<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
handlers:
[<c032ea98>] smsc911x_irqhandler
Disabling IRQ #323

I still haven't had a chance to look into this.
Does anyone have a clue?

-- 
Regards,
Igor.

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-27 18:32       ` Russ Dill
@ 2012-03-28  6:34         ` Igor Grinberg
  -1 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-28  6:34 UTC (permalink / raw)
  To: Russ Dill
  Cc: linux-omap, Tony Lindgren, Mark Brown, Matt Porter,
	robert.marklund, linus.walleij, linux-arm-kernel

On 03/27/12 20:32, Russ Dill wrote:
> No objection.

10x Russ.


-- 
Regards,
Igor.

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-28  6:34         ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-28  6:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/27/12 20:32, Russ Dill wrote:
> No objection.

10x Russ.


-- 
Regards,
Igor.

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-28  6:33         ` Igor Grinberg
@ 2012-03-28 17:03           ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-03-28 17:03 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 23:36]:
> Hi Tony,
> 
> On 03/27/12 19:28, Tony Lindgren wrote:
> > * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
> >> Hi Russ,
> >>
> >> This patch works, but can we, please use the attached patch instead?
> > 
> > Hmm what's the difference here? Do you have some real controllable
> > regulator for one of the smsc911x instances?
> 
> Well, the difference here is that those regulators will only be present
> if the smsc911x controllers are present and their initialization is done
> along with the controllers.
> Also, I want to separate the cm-t35 from sb-t35 for future easier
> refactoring of the sb-t35 code so it can be reused also on cm-t3517.
> 
> Only vddvario for smsc911x.0 is controllable - connected to VIO, but
> VIO will never be disabled as it also controls many other devices
> (DRAM is among them), so I prefer it to be dummy and keep it together
> with vdd33a.

OK thanks for the clarification. 

> > Anyways, I take it that you have tested that both smsc911x interfaces
> > work now?
> 
> Yes, both regulators are registered and found by the smsc911x driver.
> There is some kind of problem with the smsc911x.1, but it looks unrelated
> to the patch:

OK good to hear. Regarding the following problem..
 
> smsc911x: Driver version 2008-10-21
> irq 323: nobody cared (try booting with the "irqpoll" option)
> [<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
> [<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
> [<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
> [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
> [<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
> [<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
> [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
> [<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
> [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
> Exception stack(0xcf02de20 to 0xcf02de68)
> de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
> de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
> de60: 20000013 ffffffff
> [<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
> [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
> [<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
> [<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
> [<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
> [<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
> [<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
> [<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
> [<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
> [<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
> [<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
> [<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
> [<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
> [<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
> [<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
> handlers:
> [<c032ea98>] smsc911x_irqhandler
> Disabling IRQ #323
> 
> I still haven't had a chance to look into this.
> Does anyone have a clue?

..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
still waiting for the cleanup-fixes branch to get merged that changes
things to use gpio_to_irq() instead.

Regards,

Tony

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-28 17:03           ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-03-28 17:03 UTC (permalink / raw)
  To: linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 23:36]:
> Hi Tony,
> 
> On 03/27/12 19:28, Tony Lindgren wrote:
> > * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
> >> Hi Russ,
> >>
> >> This patch works, but can we, please use the attached patch instead?
> > 
> > Hmm what's the difference here? Do you have some real controllable
> > regulator for one of the smsc911x instances?
> 
> Well, the difference here is that those regulators will only be present
> if the smsc911x controllers are present and their initialization is done
> along with the controllers.
> Also, I want to separate the cm-t35 from sb-t35 for future easier
> refactoring of the sb-t35 code so it can be reused also on cm-t3517.
> 
> Only vddvario for smsc911x.0 is controllable - connected to VIO, but
> VIO will never be disabled as it also controls many other devices
> (DRAM is among them), so I prefer it to be dummy and keep it together
> with vdd33a.

OK thanks for the clarification. 

> > Anyways, I take it that you have tested that both smsc911x interfaces
> > work now?
> 
> Yes, both regulators are registered and found by the smsc911x driver.
> There is some kind of problem with the smsc911x.1, but it looks unrelated
> to the patch:

OK good to hear. Regarding the following problem..
 
> smsc911x: Driver version 2008-10-21
> irq 323: nobody cared (try booting with the "irqpoll" option)
> [<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
> [<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
> [<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
> [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
> [<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
> [<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
> [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
> [<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
> [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
> Exception stack(0xcf02de20 to 0xcf02de68)
> de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
> de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
> de60: 20000013 ffffffff
> [<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
> [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
> [<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
> [<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
> [<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
> [<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
> [<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
> [<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
> [<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
> [<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
> [<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
> [<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
> [<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
> [<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
> [<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
> handlers:
> [<c032ea98>] smsc911x_irqhandler
> Disabling IRQ #323
> 
> I still haven't had a chance to look into this.
> Does anyone have a clue?

..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
still waiting for the cleanup-fixes branch to get merged that changes
things to use gpio_to_irq() instead.

Regards,

Tony

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-28 17:03           ` Tony Lindgren
@ 2012-03-30 15:23             ` Igor Grinberg
  -1 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-30 15:23 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel, netdev

On 03/28/12 19:03, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 23:36]:
>> Hi Tony,
>>
>> On 03/27/12 19:28, Tony Lindgren wrote:
>>> * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
>>>> Hi Russ,
>>>>
>>>> This patch works, but can we, please use the attached patch instead?
>>>
>>> Hmm what's the difference here? Do you have some real controllable
>>> regulator for one of the smsc911x instances?
>>
>> Well, the difference here is that those regulators will only be present
>> if the smsc911x controllers are present and their initialization is done
>> along with the controllers.
>> Also, I want to separate the cm-t35 from sb-t35 for future easier
>> refactoring of the sb-t35 code so it can be reused also on cm-t3517.
>>
>> Only vddvario for smsc911x.0 is controllable - connected to VIO, but
>> VIO will never be disabled as it also controls many other devices
>> (DRAM is among them), so I prefer it to be dummy and keep it together
>> with vdd33a.
> 
> OK thanks for the clarification. 
> 
>>> Anyways, I take it that you have tested that both smsc911x interfaces
>>> work now?
>>
>> Yes, both regulators are registered and found by the smsc911x driver.
>> There is some kind of problem with the smsc911x.1, but it looks unrelated
>> to the patch:
> 
> OK good to hear. Regarding the following problem..
>  
>> smsc911x: Driver version 2008-10-21
>> irq 323: nobody cared (try booting with the "irqpoll" option)
>> [<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
>> [<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
>> [<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
>> [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
>> [<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
>> [<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
>> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
>> [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
>> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
>> [<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
>> [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
>> Exception stack(0xcf02de20 to 0xcf02de68)
>> de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
>> de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
>> de60: 20000013 ffffffff
>> [<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
>> [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
>> [<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
>> [<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
>> [<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
>> [<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
>> [<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
>> [<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
>> [<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
>> [<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
>> [<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
>> [<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
>> [<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
>> [<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
>> [<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
>> handlers:
>> [<c032ea98>] smsc911x_irqhandler
>> Disabling IRQ #323
>>
>> I still haven't had a chance to look into this.
>> Does anyone have a clue?
> 
> ..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
> still waiting for the cleanup-fixes branch to get merged that changes
> things to use gpio_to_irq() instead.

Nope, no OMAP_GPIO_IRQ in the board code.
Also, the GPIO -> IRQ mapping for the smsc911x is done in gpmc-smsc911x.c
and it uses gpio_to_irq() already.


-- 
Regards,
Igor.

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-03-30 15:23             ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-03-30 15:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/28/12 19:03, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 23:36]:
>> Hi Tony,
>>
>> On 03/27/12 19:28, Tony Lindgren wrote:
>>> * Igor Grinberg <grinberg@compulab.co.il> [120327 08:56]:
>>>> Hi Russ,
>>>>
>>>> This patch works, but can we, please use the attached patch instead?
>>>
>>> Hmm what's the difference here? Do you have some real controllable
>>> regulator for one of the smsc911x instances?
>>
>> Well, the difference here is that those regulators will only be present
>> if the smsc911x controllers are present and their initialization is done
>> along with the controllers.
>> Also, I want to separate the cm-t35 from sb-t35 for future easier
>> refactoring of the sb-t35 code so it can be reused also on cm-t3517.
>>
>> Only vddvario for smsc911x.0 is controllable - connected to VIO, but
>> VIO will never be disabled as it also controls many other devices
>> (DRAM is among them), so I prefer it to be dummy and keep it together
>> with vdd33a.
> 
> OK thanks for the clarification. 
> 
>>> Anyways, I take it that you have tested that both smsc911x interfaces
>>> work now?
>>
>> Yes, both regulators are registered and found by the smsc911x driver.
>> There is some kind of problem with the smsc911x.1, but it looks unrelated
>> to the patch:
> 
> OK good to hear. Regarding the following problem..
>  
>> smsc911x: Driver version 2008-10-21
>> irq 323: nobody cared (try booting with the "irqpoll" option)
>> [<c001ae6c>] (unwind_backtrace+0x0/0xfc) from [<c0088960>] (__report_bad_irq+0x28/0xbc)
>> [<c0088960>] (__report_bad_irq+0x28/0xbc) from [<c0088bd4>] (note_interrupt+0x1e0/0x230)
>> [<c0088bd4>] (note_interrupt+0x1e0/0x230) from [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0)
>> [<c0086e48>] (handle_irq_event_percpu+0xb0/0x1a0) from [<c0086f74>] (handle_irq_event+0x3c/0x5c)
>> [<c0086f74>] (handle_irq_event+0x3c/0x5c) from [<c00895a0>] (handle_level_irq+0x90/0xfc)
>> [<c00895a0>] (handle_level_irq+0x90/0xfc) from [<c008699c>] (generic_handle_irq+0x38/0x40)
>> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c)
>> [<c02635a0>] (gpio_irq_handler+0x1b0/0x20c) from [<c008699c>] (generic_handle_irq+0x38/0x40)
>> [<c008699c>] (generic_handle_irq+0x38/0x40) from [<c0015404>] (handle_IRQ+0x38/0x84)
>> [<c0015404>] (handle_IRQ+0x38/0x84) from [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c)
>> [<c000865c>] (omap3_intc_handle_irq+0x48/0x4c) from [<c00140c4>] (__irq_svc+0x44/0x78)
>> Exception stack(0xcf02de20 to 0xcf02de68)
>> de20: cf02c018 cf02c000 00000000 cf02de58 60000013 c06739fc 00000143 c06739fc
>> de40: 60000013 00000508 c06739dc 00000000 00022d69 cf02de68 cf02b3c0 c04890fc
>> de60: 20000013 ffffffff
>> [<c00140c4>] (__irq_svc+0x44/0x78) from [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68)
>> [<c04890fc>] (_raw_spin_unlock_irqrestore+0x64/0x68) from [<c0087d50>] (__setup_irq+0x1b4/0x3d4)
>> [<c0087d50>] (__setup_irq+0x1b4/0x3d4) from [<c00881a0>] (request_threaded_irq+0xdc/0x148)
>> [<c00881a0>] (request_threaded_irq+0xdc/0x148) from [<c0482954>] (smsc911x_drv_probe+0x350/0x528)
>> [<c0482954>] (smsc911x_drv_probe+0x350/0x528) from [<c02d5a8c>] (platform_drv_probe+0x18/0x1c)
>> [<c02d5a8c>] (platform_drv_probe+0x18/0x1c) from [<c02d4580>] (really_probe+0x64/0x160)
>> [<c02d4580>] (really_probe+0x64/0x160) from [<c02d46c4>] (driver_probe_device+0x48/0x60)
>> [<c02d46c4>] (driver_probe_device+0x48/0x60) from [<c02d4770>] (__driver_attach+0x94/0x98)
>> [<c02d4770>] (__driver_attach+0x94/0x98) from [<c02d2ffc>] (bus_for_each_dev+0x54/0x80)
>> [<c02d2ffc>] (bus_for_each_dev+0x54/0x80) from [<c02d3730>] (bus_add_driver+0xa8/0x2a4)
>> [<c02d3730>] (bus_add_driver+0xa8/0x2a4) from [<c02d4d6c>] (driver_register+0x78/0x184)
>> [<c02d4d6c>] (driver_register+0x78/0x184) from [<c0008758>] (do_one_initcall+0x34/0x184)
>> [<c0008758>] (do_one_initcall+0x34/0x184) from [<c0613248>] (do_basic_setup+0x34/0x40)
>> [<c0613248>] (do_basic_setup+0x34/0x40) from [<c06132b8>] (kernel_init+0x64/0xec)
>> [<c06132b8>] (kernel_init+0x64/0xec) from [<c00154cc>] (kernel_thread_exit+0x0/0x8)
>> handlers:
>> [<c032ea98>] smsc911x_irqhandler
>> Disabling IRQ #323
>>
>> I still haven't had a chance to look into this.
>> Does anyone have a clue?
> 
> ..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
> still waiting for the cleanup-fixes branch to get merged that changes
> things to use gpio_to_irq() instead.

Nope, no OMAP_GPIO_IRQ in the board code.
Also, the GPIO -> IRQ mapping for the smsc911x is done in gpmc-smsc911x.c
and it uses gpio_to_irq() already.


-- 
Regards,
Igor.

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-30 15:23             ` Igor Grinberg
@ 2012-04-03 17:26               ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-04-03 17:26 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel, netdev

* Igor Grinberg <grinberg@compulab.co.il> [120330 08:26]:
> On 03/28/12 19:03, Tony Lindgren wrote:
> > 
> > ..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
> > still waiting for the cleanup-fixes branch to get merged that changes
> > things to use gpio_to_irq() instead.
> 
> Nope, no OMAP_GPIO_IRQ in the board code.
> Also, the GPIO -> IRQ mapping for the smsc911x is done in gpmc-smsc911x.c
> and it uses gpio_to_irq() already.

OK, maybe it's caused by spurious interrupts? Have you
checked the GPIO interrupt edge/level setup is correct?

Regards,

Tony

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-04-03 17:26               ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-04-03 17:26 UTC (permalink / raw)
  To: linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120330 08:26]:
> On 03/28/12 19:03, Tony Lindgren wrote:
> > 
> > ..care to see if you have OMAP_GPIO_IRQ entry for your board? If so, we're
> > still waiting for the cleanup-fixes branch to get merged that changes
> > things to use gpio_to_irq() instead.
> 
> Nope, no OMAP_GPIO_IRQ in the board code.
> Also, the GPIO -> IRQ mapping for the smsc911x is done in gpmc-smsc911x.c
> and it uses gpio_to_irq() already.

OK, maybe it's caused by spurious interrupts? Have you
checked the GPIO interrupt edge/level setup is correct?

Regards,

Tony

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-03-28  6:34         ` Igor Grinberg
@ 2012-04-03 17:43           ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-04-03 17:43 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 23:37]:
> On 03/27/12 20:32, Russ Dill wrote:
> > No objection.
> 
> 10x Russ.

I've combined patches 5 - 12 into a single patch as they
pretty much do the same thing, and to cut down
the patch noise for fixes. Merging into fixes with the
updated patch below.

Regards,

Tony


From: Russ Dill <Russ.Dill@ti.com>
Date: Fri, 23 Mar 2012 02:21:37 -0700
Subject: [PATCH] ARM: OMAP2+: smsc911x: Add fixed board regulators

Initialize fixed regulators in the board files. Trying to
do this in a generic way in gpmc-smsc911x.c gets messy as
the regulator may be provided by drivers, such as twl4030,
for some boards.

Signed-off-by: Russ Dill <russ.dill@ti.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
[tony@atomide.com: combined into one patch, updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 41b0a2f..909a8b9 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,6 +26,7 @@
 
 #include <linux/i2c/at24.h>
 #include <linux/i2c/twl.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/mmc/host.h>
 
@@ -81,8 +82,23 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
 	.flags		= SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
 };
 
+static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
+static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init cm_t35_init_ethernet(void)
 {
+	regulator_register_fixed(0, cm_t35_smsc911x_supplies,
+				 ARRAY_SIZE(cm_t35_smsc911x_supplies));
+	regulator_register_fixed(1, sb_t35_smsc911x_supplies,
+				 ARRAY_SIZE(sb_t35_smsc911x_supplies));
+
 	gpmc_smsc911x_init(&cm_t35_smsc911x_cfg);
 	gpmc_smsc911x_init(&sb_t35_smsc911x_cfg);
 }
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e558800..930c0d3 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -634,8 +634,14 @@ static void __init igep_wlan_bt_init(void)
 static inline void __init igep_wlan_bt_init(void) { }
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init igep_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
 	/* Get IGEP2 hardware revision */
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d50a562..1b60495 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/io.h>
@@ -410,8 +411,14 @@ static struct mtd_partition ldp_nand_partitions[] = {
 
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap_ldp_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	ldp_init_smsc911x();
 	omap_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b90b319..49df127 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -623,9 +623,15 @@ static void __init omap3_evm_wl12xx_init(void)
 #endif
 }
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_evm_init(void)
 {
 	omap3_evm_get_revision();
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 
 	if (cpu_is_omap3630())
 		omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 4a7d8c8..9b3c141 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 
 #include <linux/i2c/twl.h>
@@ -188,8 +189,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3logic_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap3torpedo_fix_pbias_voltage();
 	omap3logic_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index de95352..4dffc95 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/mmc/host.h>
@@ -410,8 +411,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_stalker_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_board_config = omap3_stalker_config;
 	omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 668533e..33aa391 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -498,10 +498,18 @@ static struct gpio overo_bt_gpios[] __initdata = {
 	{ OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH,	"lcd bl enable" },
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init overo_init(void)
 {
 	int ret;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap_hsmmc_init(mmc);
 	overo_i2c_init();
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1e8540e..f64f441 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -14,6 +14,9 @@
 #include <linux/smsc911x.h>
 #include <linux/interrupt.h>
 
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+
 #include <plat/gpmc.h>
 #include <plat/gpmc-smsc911x.h>
 
@@ -117,11 +120,17 @@ static struct platform_device *zoom_devices[] __initdata = {
 	&zoom_debugboard_serial_device,
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 int __init zoom_debugboard_init(void)
 {
 	if (!omap_zoom_debugboard_detect())
 		return 0;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	zoom_init_smsc911x();
 	zoom_init_quaduart();
 	return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-04-03 17:43           ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2012-04-03 17:43 UTC (permalink / raw)
  To: linux-arm-kernel

* Igor Grinberg <grinberg@compulab.co.il> [120327 23:37]:
> On 03/27/12 20:32, Russ Dill wrote:
> > No objection.
> 
> 10x Russ.

I've combined patches 5 - 12 into a single patch as they
pretty much do the same thing, and to cut down
the patch noise for fixes. Merging into fixes with the
updated patch below.

Regards,

Tony


From: Russ Dill <Russ.Dill@ti.com>
Date: Fri, 23 Mar 2012 02:21:37 -0700
Subject: [PATCH] ARM: OMAP2+: smsc911x: Add fixed board regulators

Initialize fixed regulators in the board files. Trying to
do this in a generic way in gpmc-smsc911x.c gets messy as
the regulator may be provided by drivers, such as twl4030,
for some boards.

Signed-off-by: Russ Dill <russ.dill@ti.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
[tony at atomide.com: combined into one patch, updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 41b0a2f..909a8b9 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,6 +26,7 @@
 
 #include <linux/i2c/at24.h>
 #include <linux/i2c/twl.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/mmc/host.h>
 
@@ -81,8 +82,23 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
 	.flags		= SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
 };
 
+static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
+static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init cm_t35_init_ethernet(void)
 {
+	regulator_register_fixed(0, cm_t35_smsc911x_supplies,
+				 ARRAY_SIZE(cm_t35_smsc911x_supplies));
+	regulator_register_fixed(1, sb_t35_smsc911x_supplies,
+				 ARRAY_SIZE(sb_t35_smsc911x_supplies));
+
 	gpmc_smsc911x_init(&cm_t35_smsc911x_cfg);
 	gpmc_smsc911x_init(&sb_t35_smsc911x_cfg);
 }
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e558800..930c0d3 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -634,8 +634,14 @@ static void __init igep_wlan_bt_init(void)
 static inline void __init igep_wlan_bt_init(void) { }
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init igep_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
 	/* Get IGEP2 hardware revision */
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d50a562..1b60495 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/io.h>
@@ -410,8 +411,14 @@ static struct mtd_partition ldp_nand_partitions[] = {
 
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap_ldp_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	ldp_init_smsc911x();
 	omap_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b90b319..49df127 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -623,9 +623,15 @@ static void __init omap3_evm_wl12xx_init(void)
 #endif
 }
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_evm_init(void)
 {
 	omap3_evm_get_revision();
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 
 	if (cpu_is_omap3630())
 		omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 4a7d8c8..9b3c141 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 
 #include <linux/i2c/twl.h>
@@ -188,8 +189,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3logic_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap3torpedo_fix_pbias_voltage();
 	omap3logic_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index de95352..4dffc95 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c/twl.h>
 #include <linux/mmc/host.h>
@@ -410,8 +411,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 static void __init omap3_stalker_init(void)
 {
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_board_config = omap3_stalker_config;
 	omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 668533e..33aa391 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -498,10 +498,18 @@ static struct gpio overo_bt_gpios[] __initdata = {
 	{ OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH,	"lcd bl enable" },
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
+};
+
 static void __init overo_init(void)
 {
 	int ret;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap_hsmmc_init(mmc);
 	overo_i2c_init();
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1e8540e..f64f441 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -14,6 +14,9 @@
 #include <linux/smsc911x.h>
 #include <linux/interrupt.h>
 
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+
 #include <plat/gpmc.h>
 #include <plat/gpmc-smsc911x.h>
 
@@ -117,11 +120,17 @@ static struct platform_device *zoom_devices[] __initdata = {
 	&zoom_debugboard_serial_device,
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
 int __init zoom_debugboard_init(void)
 {
 	if (!omap_zoom_debugboard_detect())
 		return 0;
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 	zoom_init_smsc911x();
 	zoom_init_quaduart();
 	return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));

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

* Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
  2012-04-03 17:43           ` Tony Lindgren
@ 2012-04-05  7:34             ` Igor Grinberg
  -1 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-04-05  7:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russ Dill, linux-omap, Mark Brown, Matt Porter, robert.marklund,
	linus.walleij, linux-arm-kernel



On 04/03/12 20:43, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 23:37]:
>> On 03/27/12 20:32, Russ Dill wrote:
>>> No objection.
>>
>> 10x Russ.
> 
> I've combined patches 5 - 12 into a single patch as they
> pretty much do the same thing, and to cut down
> the patch noise for fixes. Merging into fixes with the
> updated patch below.

10x, looks good!


-- 
Regards,
Igor.

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

* [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
@ 2012-04-05  7:34             ` Igor Grinberg
  0 siblings, 0 replies; 36+ messages in thread
From: Igor Grinberg @ 2012-04-05  7:34 UTC (permalink / raw)
  To: linux-arm-kernel



On 04/03/12 20:43, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [120327 23:37]:
>> On 03/27/12 20:32, Russ Dill wrote:
>>> No objection.
>>
>> 10x Russ.
> 
> I've combined patches 5 - 12 into a single patch as they
> pretty much do the same thing, and to cut down
> the patch noise for fixes. Merging into fixes with the
> updated patch below.

10x, looks good!


-- 
Regards,
Igor.

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

end of thread, other threads:[~2012-04-05  7:34 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23  9:21 [PATCH v2 00/12] Fixup gmpc smsc911x regulator handling Russ Dill
2012-03-23  9:21 ` [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection Russ Dill
2012-03-27 15:45   ` Igor Grinberg
2012-03-23  9:21 ` [PATCH 02/12] Fix possible stale smsc911x flags Russ Dill
2012-03-27 15:47   ` Igor Grinberg
2012-03-23  9:21 ` [PATCH 03/12] Remove unused rate calculation Russ Dill
2012-03-23  9:21 ` [PATCH 04/12] Remove regulator support from gmpc-smsc911x Russ Dill
2012-03-27 15:46   ` Igor Grinberg
2012-03-23  9:21 ` [PATCH 05/12] Add dummy smsc911x regulators to cm-t35 Russ Dill
2012-03-27 15:53   ` Igor Grinberg
2012-03-27 15:53     ` Igor Grinberg
2012-03-27 17:28     ` Tony Lindgren
2012-03-27 17:28       ` Tony Lindgren
2012-03-28  6:33       ` Igor Grinberg
2012-03-28  6:33         ` Igor Grinberg
2012-03-28 17:03         ` Tony Lindgren
2012-03-28 17:03           ` Tony Lindgren
2012-03-30 15:23           ` Igor Grinberg
2012-03-30 15:23             ` Igor Grinberg
2012-04-03 17:26             ` Tony Lindgren
2012-04-03 17:26               ` Tony Lindgren
2012-03-27 18:32     ` Russ Dill
2012-03-27 18:32       ` Russ Dill
2012-03-28  6:34       ` Igor Grinberg
2012-03-28  6:34         ` Igor Grinberg
2012-04-03 17:43         ` Tony Lindgren
2012-04-03 17:43           ` Tony Lindgren
2012-04-05  7:34           ` Igor Grinberg
2012-04-05  7:34             ` Igor Grinberg
2012-03-23  9:21 ` [PATCH 06/12] Add dummy smsc911x regulators to igep0020 Russ Dill
2012-03-23  9:21 ` [PATCH 07/12] Add dummy smsc911x regulators to ldp Russ Dill
2012-03-23  9:21 ` [PATCH 08/12] Add dummy smsc911x regulators to omap3evm Russ Dill
2012-03-23  9:21 ` [PATCH 09/12] Add dummy smsc911x regulators to omap3logic Russ Dill
2012-03-23  9:21 ` [PATCH 10/12] Add dummy smsc911x regulators to omap3stalker Russ Dill
2012-03-23  9:21 ` [PATCH 11/12] Add dummy smsc911x regulators to overo Russ Dill
2012-03-23  9:21 ` [PATCH 12/12] Add dummy smsc911x regulators to zoom-debugboard Russ Dill

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