Fixup gmpc smsc911x regulator handling
Subsystems (7)
v2 cover Fixup gmpc smsc911x regulator handling
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(-)
Signature · 1 line
1.7.9.1
PATCH v2 1/12 Remove odd gpmc_cfg/board_data redirection.
This seems to be a leftover from when gpmc-smsc911x.c was copied from gpmc-smc91x.c.
--- arch/arm/mach-omap2/gpmc-smsc911x.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/gpmc-smsc911x.c +1 -5
@@ -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 ) {
Signature · 1 line
1.7.9.1
Re: [PATCH 01/12] Remove odd gpmc_cfg/board_data redirection.
Hi Russ,
Thanks for the patches.
Please, note:
* all OMAP patches that are "ready" for submission should have [email protected] in Cc.
* Subject should be prefixed with: ARM: OMAP: ...
Quoted 4 lines · Russ Dill
This seems to be a leftover from when
gpmc-smsc911x.cwas copied fromgpmc-smc91x.c.Signed-off-by Russ Dill <[email protected]>
Signature · 2 lines
Regards, Igor.
PATCH v2 2/12 Fix possible stale smsc911x flags.
In reply to Russ DillIf 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.
--- arch/arm/mach-omap2/gpmc-smsc911x.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/gpmc-smsc911x.c +1 -3
@@ -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),
Signature · 1 line
1.7.9.1
Re: [PATCH 02/12] Fix possible stale smsc911x flags.
Quoted 5 lines · 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 <[email protected]>
Signature · 2 lines
Regards, Igor.
PATCH v2 3/12 Remove unused rate calculation.
In reply to Russ DillLooking back into git history, this code was never used and was probably left over from a copy/paste.
--- arch/arm/mach-omap2/board-omap3evm.c | 9 --------- arch/arm/mach-omap2/board-omap3stalker.c | 9 --------- 2 files changed, 0 insertions(+), 18 deletions(-)
arch/arm/mach-omap2/board-omap3evm.c +0 -9
@@ -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 )
arch/arm/mach-omap2/board-omap3stalker.c +0 -9
@@ -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); }
Signature · 1 line
1.7.9.1
PATCH v2 4/12 Remove regulator support from gmpc-smsc911x
In reply to Russ DillAdding 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.
--- arch/arm/mach-omap2/gpmc-smsc911x.c | 55 ----------------------------------- 1 files changed, 0 insertions(+), 55 deletions(-)
arch/arm/mach-omap2/gpmc-smsc911x.c +0 -55
@@ -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 ;
Signature · 1 line
1.7.9.1
Re: [PATCH 04/12] Remove regulator support from gmpc-smsc911x
Quoted 9 lines · 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 <[email protected]>
Signature · 2 lines
Regards, Igor.
PATCH v2 5/12 Add dummy smsc911x regulators to cm-t35.
In reply to Russ Dill--- arch/arm/mach-omap2/board-cm-t35.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +9 -0
@@ -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,
Signature · 1 line
1.7.9.1
PATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Hi Russ,
This patch works, but can we, please use the attached patch instead?
Thanks
Quoted 36 lines · Russ Dill
Signed-off-by Russ Dill <[email protected]>--- arch/arm/mach-omap2/board-cm-t35.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)arch/arm/mach-omap2/board-cm-t35.c +9
-0@@ -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,
Signature · 9 lines
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>
Tony Lindgren
maintainerPATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Quoted 3 lines · Igor Grinberg
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
PATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Hi Tony,
Quoted 7 lines · Tony Lindgren
Quoted 3 lines · Igor Grinberg
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.
Quoted 3 lines
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?
Signature · 2 lines
Regards, Igor.
Tony Lindgren
maintainerPATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Quoted 17 lines · Igor Grinberg
Hi Tony,
Quoted 7 lines · Tony Lindgren
Quoted 3 lines · Igor Grinberg
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.
Quoted 4 lines
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.
Quoted 6 lines
Quoted 2 lines
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..
Quoted 36 lines
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:
cf02c018cf02c00000000000cf02de5860000013c06739fc00000143c06739fc
de40: 60000013 00000508c06739dc0000000000022d69cf02de68cf02b3c0c04890fc
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
Quoted 2 lines
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
Re: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
Quoted 70 lines · Tony Lindgren
Quoted 17 lines · Igor Grinberg
Hi Tony,
Quoted 7 lines · Tony Lindgren
Quoted 3 lines · Igor Grinberg
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.Quoted 4 lines
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.
Quoted 6 lines
Quoted 2 lines
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..
Quoted 36 lines
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:
cf02c018cf02c00000000000cf02de5860000013c06739fc00000143c06739fc
de40: 60000013 00000508c06739dc0000000000022d69cf02de68cf02b3c0c04890fc
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
Quoted 6 lines
Quoted 2 lines
I still haven't had a chance to look into this.
Does anyone have a clue?..care to see if you have
OMAP_GPIO_IRQentry for your board? If so, we're still waiting for the cleanup-fixes branch to get merged that changes things to usegpio_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.
Signature · 2 lines
Regards, Igor.
Tony Lindgren
maintainerRe: [PATCH 05/12] Add dummy smsc911x regulators to cm-t35.
Quoted 9 lines · Igor Grinberg
Quoted 4 lines · Tony Lindgren
..care to see if you have
OMAP_GPIO_IRQentry for your board? If so, we're still waiting for the cleanup-fixes branch to get merged that changes things to usegpio_to_irq()instead.Nope, no
OMAP_GPIO_IRQin the board code.
Also, the GPIO -> IRQ mapping for the smsc911x is done ingpmc-smsc911x.cand it usesgpio_to_irq()already.
OK, maybe it's caused by spurious interrupts? Have you checked the GPIO interrupt edge/level setup is correct?
Regards,
Tony
PATCH v2 5/12 Add dummy smsc911x regulators to cm-t35.
In reply to Igor GrinbergNo objection.
Quoted 47 lines · Igor Grinberg
Hi Russ,
This patch works, but can we, please use the attached patch instead?
Thanks
Quoted 26 lines · Russ Dill
Signed-off-by Russ Dill <[email protected]>---
?arch/arm/mach-omap2/board-cm-t35.c | ? ?9 +++++++++ ?1 files changed, 9 insertions(+), 0 deletions(-)arch/arm/mach-omap2/board-cm-t35.c +0
-0@@ -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>arch/arm/mach-omap2/board-cm-t35.c +5
-0@@ -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"),arch/arm/mach-omap2/board-cm-t35.c static inline void cm_t3730_init_mux(void) {} · line 648
Quoted 10 lines
arch/arm/mach-omap2/board-cm-t35.c +3
-0+}; + ?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.
PATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Quoted 1 line · Russ Dill
No objection.
10x Russ.
Signature · 2 lines
Regards, Igor.
Tony Lindgren
maintainerPATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Quoted 4 lines · Igor Grinberg
Quoted 1 line · Russ Dill
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 <[email protected]>
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.
arch/arm/mach-omap2/board-cm-t35.c +16 -0
@@ -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); }
arch/arm/mach-omap2/board-igep0020.c +6 -0
@@ -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 */
arch/arm/mach-omap2/board-ldp.c +7 -0
@@ -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 ();
arch/arm/mach-omap2/board-omap3evm.c +6 -0
@@ -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 );
arch/arm/mach-omap2/board-omap3logic.c +7 -0
@@ -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 ();
arch/arm/mach-omap2/board-omap3stalker.c +7 -0
@@ -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);
arch/arm/mach-omap2/board-overo.c +8 -0
@@ -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 ();
arch/arm/mach-omap2/board-zoom-debugboard.c +9 -0
@@ -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));
PATCH 5/12 Add dummy smsc911x regulators to cm-t35.
Quoted 10 lines · Tony Lindgren
Quoted 4 lines · Igor Grinberg
Quoted 1 line · Russ Dill
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!
Signature · 2 lines
Regards, Igor.
PATCH v2 6/12 Add dummy smsc911x regulators to igep0020.
In reply to Russ Dill--- arch/arm/mach-omap2/board-igep0020.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-igep0020.c +6 -0
@@ -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 */
Signature · 1 line
1.7.9.1
PATCH v2 7/12 Add dummy smsc911x regulators to ldp.
In reply to Russ Dill--- arch/arm/mach-omap2/board-ldp.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-ldp.c +7 -0
@@ -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 ();
Signature · 1 line
1.7.9.1
PATCH v2 8/12 Add dummy smsc911x regulators to omap3evm.
In reply to Russ Dill--- arch/arm/mach-omap2/board-omap3evm.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3evm.c +6 -0
@@ -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 );
Signature · 1 line
1.7.9.1
PATCH v2 9/12 Add dummy smsc911x regulators to omap3logic.
In reply to Russ Dill--- arch/arm/mach-omap2/board-omap3logic.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3logic.c +7 -0
@@ -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 ();
Signature · 1 line
1.7.9.1
PATCH v2 10/12 Add dummy smsc911x regulators to omap3stalker.
In reply to Russ Dill--- arch/arm/mach-omap2/board-omap3stalker.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3stalker.c +7 -0
@@ -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);
Signature · 1 line
1.7.9.1
PATCH v2 11/12 Add dummy smsc911x regulators to overo.
In reply to Russ Dill--- arch/arm/mach-omap2/board-overo.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-overo.c +8 -0
@@ -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 ();
Signature · 1 line
1.7.9.1
PATCH v2 12/12 Add dummy smsc911x regulators to zoom-debugboard.
In reply to Russ Dill--- arch/arm/mach-omap2/board-zoom-debugboard.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-zoom-debugboard.c +9 -0
@@ -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));
Signature · 1 line
1.7.9.1