diff options
author | Tony Lindgren <tony@atomide.com> | 2012-04-03 14:20:27 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-04-03 14:20:27 -0400 |
commit | 3916043576ecefe01818684b38c73695322fd29f (patch) | |
tree | 3ae90b1a1de9550e17870e1b32272c223c121c63 /arch/arm | |
parent | 1512f0dbfb9e355bc451fc6ded815a79d00bc6f3 (diff) | |
parent | 5b3689f4c16bc692a2e2b9808e5efc457aeae371 (diff) |
Merge branch 'fixes-smsc911x' into fixes
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3logic.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-smsc911x.c | 65 |
9 files changed, 68 insertions, 81 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 41b0a2fe0b04..909a8b91b564 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/i2c/at24.h> | 27 | #include <linux/i2c/at24.h> |
28 | #include <linux/i2c/twl.h> | 28 | #include <linux/i2c/twl.h> |
29 | #include <linux/regulator/fixed.h> | ||
29 | #include <linux/regulator/machine.h> | 30 | #include <linux/regulator/machine.h> |
30 | #include <linux/mmc/host.h> | 31 | #include <linux/mmc/host.h> |
31 | 32 | ||
@@ -81,8 +82,23 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = { | |||
81 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | 82 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, |
82 | }; | 83 | }; |
83 | 84 | ||
85 | static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = { | ||
86 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
87 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
88 | }; | ||
89 | |||
90 | static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = { | ||
91 | REGULATOR_SUPPLY("vddvario", "smsc911x.1"), | ||
92 | REGULATOR_SUPPLY("vdd33a", "smsc911x.1"), | ||
93 | }; | ||
94 | |||
84 | static void __init cm_t35_init_ethernet(void) | 95 | static void __init cm_t35_init_ethernet(void) |
85 | { | 96 | { |
97 | regulator_register_fixed(0, cm_t35_smsc911x_supplies, | ||
98 | ARRAY_SIZE(cm_t35_smsc911x_supplies)); | ||
99 | regulator_register_fixed(1, sb_t35_smsc911x_supplies, | ||
100 | ARRAY_SIZE(sb_t35_smsc911x_supplies)); | ||
101 | |||
86 | gpmc_smsc911x_init(&cm_t35_smsc911x_cfg); | 102 | gpmc_smsc911x_init(&cm_t35_smsc911x_cfg); |
87 | gpmc_smsc911x_init(&sb_t35_smsc911x_cfg); | 103 | gpmc_smsc911x_init(&sb_t35_smsc911x_cfg); |
88 | } | 104 | } |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index e558800adfdf..930c0d380435 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) | |||
634 | static inline void __init igep_wlan_bt_init(void) { } | 634 | static inline void __init igep_wlan_bt_init(void) { } |
635 | #endif | 635 | #endif |
636 | 636 | ||
637 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
638 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
639 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
640 | }; | ||
641 | |||
637 | static void __init igep_init(void) | 642 | static void __init igep_init(void) |
638 | { | 643 | { |
644 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
639 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
640 | 646 | ||
641 | /* Get IGEP2 hardware revision */ | 647 | /* Get IGEP2 hardware revision */ |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index d50a562adfa0..1b6049567ab4 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
25 | #include <linux/regulator/fixed.h> | ||
25 | #include <linux/regulator/machine.h> | 26 | #include <linux/regulator/machine.h> |
26 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -410,8 +411,14 @@ static struct mtd_partition ldp_nand_partitions[] = { | |||
410 | 411 | ||
411 | }; | 412 | }; |
412 | 413 | ||
414 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
415 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
416 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
417 | }; | ||
418 | |||
413 | static void __init omap_ldp_init(void) | 419 | static void __init omap_ldp_init(void) |
414 | { | 420 | { |
421 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
415 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 422 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
416 | ldp_init_smsc911x(); | 423 | ldp_init_smsc911x(); |
417 | omap_i2c_init(); | 424 | omap_i2c_init(); |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 4c90f078abe1..49df12735b41 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 = { | |||
114 | 114 | ||
115 | static inline void __init omap3evm_init_smsc911x(void) | 115 | static inline void __init omap3evm_init_smsc911x(void) |
116 | { | 116 | { |
117 | struct clk *l3ck; | ||
118 | unsigned int rate; | ||
119 | |||
120 | l3ck = clk_get(NULL, "l3_ck"); | ||
121 | if (IS_ERR(l3ck)) | ||
122 | rate = 100000000; | ||
123 | else | ||
124 | rate = clk_get_rate(l3ck); | ||
125 | |||
126 | /* Configure ethernet controller reset gpio */ | 117 | /* Configure ethernet controller reset gpio */ |
127 | if (cpu_is_omap3430()) { | 118 | if (cpu_is_omap3430()) { |
128 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) | 119 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) |
@@ -632,9 +623,15 @@ static void __init omap3_evm_wl12xx_init(void) | |||
632 | #endif | 623 | #endif |
633 | } | 624 | } |
634 | 625 | ||
626 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
627 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
628 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
629 | }; | ||
630 | |||
635 | static void __init omap3_evm_init(void) | 631 | static void __init omap3_evm_init(void) |
636 | { | 632 | { |
637 | omap3_evm_get_revision(); | 633 | omap3_evm_get_revision(); |
634 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
638 | 635 | ||
639 | if (cpu_is_omap3630()) | 636 | if (cpu_is_omap3630()) |
640 | omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); | 637 | 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 4a7d8c8a75da..9b3c141ff51b 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | 25 | ||
26 | #include <linux/regulator/fixed.h> | ||
26 | #include <linux/regulator/machine.h> | 27 | #include <linux/regulator/machine.h> |
27 | 28 | ||
28 | #include <linux/i2c/twl.h> | 29 | #include <linux/i2c/twl.h> |
@@ -188,8 +189,14 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
188 | }; | 189 | }; |
189 | #endif | 190 | #endif |
190 | 191 | ||
192 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
193 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
194 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
195 | }; | ||
196 | |||
191 | static void __init omap3logic_init(void) | 197 | static void __init omap3logic_init(void) |
192 | { | 198 | { |
199 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
193 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 200 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
194 | omap3torpedo_fix_pbias_voltage(); | 201 | omap3torpedo_fix_pbias_voltage(); |
195 | omap3logic_i2c_init(); | 202 | omap3logic_i2c_init(); |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 641004380795..4dffc95bddd2 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | 26 | ||
27 | #include <linux/regulator/fixed.h> | ||
27 | #include <linux/regulator/machine.h> | 28 | #include <linux/regulator/machine.h> |
28 | #include <linux/i2c/twl.h> | 29 | #include <linux/i2c/twl.h> |
29 | #include <linux/mmc/host.h> | 30 | #include <linux/mmc/host.h> |
@@ -72,15 +73,6 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = { | |||
72 | 73 | ||
73 | static inline void __init omap3stalker_init_eth(void) | 74 | static inline void __init omap3stalker_init_eth(void) |
74 | { | 75 | { |
75 | struct clk *l3ck; | ||
76 | unsigned int rate; | ||
77 | |||
78 | l3ck = clk_get(NULL, "l3_ck"); | ||
79 | if (IS_ERR(l3ck)) | ||
80 | rate = 100000000; | ||
81 | else | ||
82 | rate = clk_get_rate(l3ck); | ||
83 | |||
84 | omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP); | 76 | omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP); |
85 | gpmc_smsc911x_init(&smsc911x_cfg); | 77 | gpmc_smsc911x_init(&smsc911x_cfg); |
86 | } | 78 | } |
@@ -419,8 +411,14 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
419 | }; | 411 | }; |
420 | #endif | 412 | #endif |
421 | 413 | ||
414 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
415 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
416 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
417 | }; | ||
418 | |||
422 | static void __init omap3_stalker_init(void) | 419 | static void __init omap3_stalker_init(void) |
423 | { | 420 | { |
421 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
424 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); | 422 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); |
425 | omap_board_config = omap3_stalker_config; | 423 | omap_board_config = omap3_stalker_config; |
426 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); | 424 | 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 668533e2a379..33aa3910b09e 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 = { | |||
498 | { OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" }, | 498 | { OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" }, |
499 | }; | 499 | }; |
500 | 500 | ||
501 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
502 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
503 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
504 | REGULATOR_SUPPLY("vddvario", "smsc911x.1"), | ||
505 | REGULATOR_SUPPLY("vdd33a", "smsc911x.1"), | ||
506 | }; | ||
507 | |||
501 | static void __init overo_init(void) | 508 | static void __init overo_init(void) |
502 | { | 509 | { |
503 | int ret; | 510 | int ret; |
504 | 511 | ||
512 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
505 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 513 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
506 | omap_hsmmc_init(mmc); | 514 | omap_hsmmc_init(mmc); |
507 | overo_i2c_init(); | 515 | overo_i2c_init(); |
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 1e8540eabde9..f64f44173061 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/smsc911x.h> | 14 | #include <linux/smsc911x.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | 16 | ||
17 | #include <linux/regulator/fixed.h> | ||
18 | #include <linux/regulator/machine.h> | ||
19 | |||
17 | #include <plat/gpmc.h> | 20 | #include <plat/gpmc.h> |
18 | #include <plat/gpmc-smsc911x.h> | 21 | #include <plat/gpmc-smsc911x.h> |
19 | 22 | ||
@@ -117,11 +120,17 @@ static struct platform_device *zoom_devices[] __initdata = { | |||
117 | &zoom_debugboard_serial_device, | 120 | &zoom_debugboard_serial_device, |
118 | }; | 121 | }; |
119 | 122 | ||
123 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
124 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
125 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
126 | }; | ||
127 | |||
120 | int __init zoom_debugboard_init(void) | 128 | int __init zoom_debugboard_init(void) |
121 | { | 129 | { |
122 | if (!omap_zoom_debugboard_detect()) | 130 | if (!omap_zoom_debugboard_detect()) |
123 | return 0; | 131 | return 0; |
124 | 132 | ||
133 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
125 | zoom_init_smsc911x(); | 134 | zoom_init_smsc911x(); |
126 | zoom_init_quaduart(); | 135 | zoom_init_quaduart(); |
127 | return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); | 136 | return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); |
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 5e5880d6d099..b6c77be3e8f7 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
@@ -19,15 +19,11 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/regulator/machine.h> | ||
24 | 22 | ||
25 | #include <plat/board.h> | 23 | #include <plat/board.h> |
26 | #include <plat/gpmc.h> | 24 | #include <plat/gpmc.h> |
27 | #include <plat/gpmc-smsc911x.h> | 25 | #include <plat/gpmc-smsc911x.h> |
28 | 26 | ||
29 | static struct omap_smsc911x_platform_data *gpmc_cfg; | ||
30 | |||
31 | static struct resource gpmc_smsc911x_resources[] = { | 27 | static struct resource gpmc_smsc911x_resources[] = { |
32 | [0] = { | 28 | [0] = { |
33 | .flags = IORESOURCE_MEM, | 29 | .flags = IORESOURCE_MEM, |
@@ -41,51 +37,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = { | |||
41 | .phy_interface = PHY_INTERFACE_MODE_MII, | 37 | .phy_interface = PHY_INTERFACE_MODE_MII, |
42 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 38 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
43 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | 39 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, |
44 | .flags = SMSC911X_USE_16BIT, | ||
45 | }; | ||
46 | |||
47 | static struct regulator_consumer_supply gpmc_smsc911x_supply[] = { | ||
48 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
49 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
50 | }; | ||
51 | |||
52 | /* Generic regulator definition to satisfy smsc911x */ | ||
53 | static struct regulator_init_data gpmc_smsc911x_reg_init_data = { | ||
54 | .constraints = { | ||
55 | .min_uV = 3300000, | ||
56 | .max_uV = 3300000, | ||
57 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
58 | | REGULATOR_MODE_STANDBY, | ||
59 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
60 | | REGULATOR_CHANGE_STATUS, | ||
61 | }, | ||
62 | .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply), | ||
63 | .consumer_supplies = gpmc_smsc911x_supply, | ||
64 | }; | ||
65 | |||
66 | static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = { | ||
67 | .supply_name = "gpmc_smsc911x", | ||
68 | .microvolts = 3300000, | ||
69 | .gpio = -EINVAL, | ||
70 | .startup_delay = 0, | ||
71 | .enable_high = 0, | ||
72 | .enabled_at_boot = 1, | ||
73 | .init_data = &gpmc_smsc911x_reg_init_data, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * Platform device id of 42 is a temporary fix to avoid conflicts | ||
78 | * with other reg-fixed-voltage devices. The real fix should | ||
79 | * involve the driver core providing a way of dynamically | ||
80 | * assigning a unique id on registration for platform devices | ||
81 | * in the same name space. | ||
82 | */ | ||
83 | static struct platform_device gpmc_smsc911x_regulator = { | ||
84 | .name = "reg-fixed-voltage", | ||
85 | .id = 42, | ||
86 | .dev = { | ||
87 | .platform_data = &gpmc_smsc911x_fixed_reg_data, | ||
88 | }, | ||
89 | }; | 40 | }; |
90 | 41 | ||
91 | /* | 42 | /* |
@@ -93,23 +44,12 @@ static struct platform_device gpmc_smsc911x_regulator = { | |||
93 | * assume that pin multiplexing is done in the board-*.c file, | 44 | * assume that pin multiplexing is done in the board-*.c file, |
94 | * or in the bootloader. | 45 | * or in the bootloader. |
95 | */ | 46 | */ |
96 | void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | 47 | void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg) |
97 | { | 48 | { |
98 | struct platform_device *pdev; | 49 | struct platform_device *pdev; |
99 | unsigned long cs_mem_base; | 50 | unsigned long cs_mem_base; |
100 | int ret; | 51 | int ret; |
101 | 52 | ||
102 | gpmc_cfg = board_data; | ||
103 | |||
104 | if (!gpmc_cfg->id) { | ||
105 | ret = platform_device_register(&gpmc_smsc911x_regulator); | ||
106 | if (ret < 0) { | ||
107 | pr_err("Unable to register smsc911x regulators: %d\n", | ||
108 | ret); | ||
109 | return; | ||
110 | } | ||
111 | } | ||
112 | |||
113 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | 53 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { |
114 | pr_err("Failed to request GPMC mem region\n"); | 54 | pr_err("Failed to request GPMC mem region\n"); |
115 | return; | 55 | return; |
@@ -139,8 +79,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | |||
139 | gpio_set_value(gpmc_cfg->gpio_reset, 1); | 79 | gpio_set_value(gpmc_cfg->gpio_reset, 1); |
140 | } | 80 | } |
141 | 81 | ||
142 | if (gpmc_cfg->flags) | 82 | gpmc_smsc911x_config.flags = gpmc_cfg->flags ? : SMSC911X_USE_16BIT; |
143 | gpmc_smsc911x_config.flags = gpmc_cfg->flags; | ||
144 | 83 | ||
145 | pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id, | 84 | pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id, |
146 | gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), | 85 | gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), |