diff options
author | Rudolf Marek <r.marek@assembler.cz> | 2011-02-19 14:51:31 +0000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2011-02-19 14:51:31 +0000 |
commit | 0c8e664713d4dc726bedb5ba0b2e356eed9ae14c (patch) | |
tree | a81752632b470dfcb252e15865c3f2aa7de9bfe0 /src | |
parent | b8cdd9b4506309ced1529862d7598131a5cb4ea7 (diff) |
It turns out that the code which enables specific LDN is somewhat buggy.
Instead of enable the device the device gets disabled. However after some time the serial line gets back, most likely some "enable resources" might fix it.
I'm attaching patch which somewhat fixes the problem and changes the function to look same in all superio code. Some boards even did not convert the dev->enabled to 0,1 values.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6373 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/superio/fintek/f71805f/superio.c | 2 | ||||
-rwxr-xr-x | src/superio/fintek/f71859/superio.c | 2 | ||||
-rw-r--r-- | src/superio/fintek/f71863fg/superio.c | 2 | ||||
-rw-r--r-- | src/superio/fintek/f71872/superio.c | 2 | ||||
-rw-r--r-- | src/superio/fintek/f71889/superio.c | 2 | ||||
-rw-r--r-- | src/superio/intel/i3100/superio.c | 2 | ||||
-rw-r--r-- | src/superio/ite/it8712f/superio.c | 2 | ||||
-rw-r--r-- | src/superio/ite/it8716f/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47b272/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47b397/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47m10x/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47m15x/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47n217/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/lpc47n227/superio.c | 2 | ||||
-rw-r--r-- | src/superio/smsc/smscsuperio/superio.c | 2 | ||||
-rw-r--r-- | src/superio/via/vt1211/vt1211.c | 5 | ||||
-rw-r--r-- | src/superio/winbond/w83627dhg/superio.c | 5 | ||||
-rw-r--r-- | src/superio/winbond/w83627ehg/superio.c | 5 | ||||
-rw-r--r-- | src/superio/winbond/w83627hf/superio.c | 5 | ||||
-rw-r--r-- | src/superio/winbond/w83697hf/superio.c | 5 |
20 files changed, 20 insertions, 35 deletions
diff --git a/src/superio/fintek/f71805f/superio.c b/src/superio/fintek/f71805f/superio.c index e1012bae51..6b2b9c2df6 100644 --- a/src/superio/fintek/f71805f/superio.c +++ b/src/superio/fintek/f71805f/superio.c @@ -77,7 +77,7 @@ static void f71805f_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/fintek/f71859/superio.c b/src/superio/fintek/f71859/superio.c index d7d71c6ec8..6c74d81516 100755 --- a/src/superio/fintek/f71859/superio.c +++ b/src/superio/fintek/f71859/superio.c @@ -74,7 +74,7 @@ static void f71859_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/fintek/f71863fg/superio.c b/src/superio/fintek/f71863fg/superio.c index 92e317b02c..3c7ebd277a 100644 --- a/src/superio/fintek/f71863fg/superio.c +++ b/src/superio/fintek/f71863fg/superio.c @@ -81,7 +81,7 @@ static void f71863fg_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/fintek/f71872/superio.c b/src/superio/fintek/f71872/superio.c index f1a27e470d..0e1f4d0169 100644 --- a/src/superio/fintek/f71872/superio.c +++ b/src/superio/fintek/f71872/superio.c @@ -79,7 +79,7 @@ static void f71872_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/fintek/f71889/superio.c b/src/superio/fintek/f71889/superio.c index b26b41133d..5f4ca3fc23 100644 --- a/src/superio/fintek/f71889/superio.c +++ b/src/superio/fintek/f71889/superio.c @@ -80,7 +80,7 @@ static void f71889_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/intel/i3100/superio.c b/src/superio/intel/i3100/superio.c index 120790a194..143e649ed7 100644 --- a/src/superio/intel/i3100/superio.c +++ b/src/superio/intel/i3100/superio.c @@ -78,7 +78,7 @@ static void i3100_pnp_enable(device_t dev) { pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, dev->enabled); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/ite/it8712f/superio.c b/src/superio/ite/it8712f/superio.c index 67bbac4403..c84a92916f 100644 --- a/src/superio/ite/it8712f/superio.c +++ b/src/superio/ite/it8712f/superio.c @@ -99,7 +99,7 @@ static void it8712f_pnp_enable(device_t dev) { pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, dev->enabled); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c index 54e640f913..c7109465b5 100644 --- a/src/superio/ite/it8716f/superio.c +++ b/src/superio/ite/it8716f/superio.c @@ -122,7 +122,7 @@ static void it8716f_pnp_enable(device_t dev) { pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, dev->enabled); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/smsc/lpc47b272/superio.c b/src/superio/smsc/lpc47b272/superio.c index 5bf385c7fb..0f5ea9272b 100644 --- a/src/superio/smsc/lpc47b272/superio.c +++ b/src/superio/smsc/lpc47b272/superio.c @@ -105,7 +105,7 @@ static void lpc47b272_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/lpc47b397/superio.c b/src/superio/smsc/lpc47b397/superio.c index 9c4d8d9f10..a0a6c1db19 100644 --- a/src/superio/smsc/lpc47b397/superio.c +++ b/src/superio/smsc/lpc47b397/superio.c @@ -116,7 +116,7 @@ static void lpc47b397_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/lpc47m10x/superio.c b/src/superio/smsc/lpc47m10x/superio.c index c935d628cf..04140b13f8 100644 --- a/src/superio/smsc/lpc47m10x/superio.c +++ b/src/superio/smsc/lpc47m10x/superio.c @@ -103,7 +103,7 @@ static void lpc47m10x_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/lpc47m15x/superio.c b/src/superio/smsc/lpc47m15x/superio.c index acd4b39c2b..54762de1c1 100644 --- a/src/superio/smsc/lpc47m15x/superio.c +++ b/src/superio/smsc/lpc47m15x/superio.c @@ -87,7 +87,7 @@ static void lpc47m15x_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/lpc47n217/superio.c b/src/superio/smsc/lpc47n217/superio.c index 4cc580643f..b1455330d0 100644 --- a/src/superio/smsc/lpc47n217/superio.c +++ b/src/superio/smsc/lpc47n217/superio.c @@ -119,7 +119,7 @@ static void lpc47n217_pnp_enable_resources(device_t dev) static void lpc47n217_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); - lpc47n217_pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + lpc47n217_pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/lpc47n227/superio.c b/src/superio/smsc/lpc47n227/superio.c index 2a4ead9884..20345b8230 100644 --- a/src/superio/smsc/lpc47n227/superio.c +++ b/src/superio/smsc/lpc47n227/superio.c @@ -116,7 +116,7 @@ void lpc47n227_pnp_enable_resources(device_t dev) void lpc47n227_pnp_enable(device_t dev) { pnp_enter_conf_state(dev); - lpc47n227_pnp_set_enable(dev, (dev->enabled) ? 1 : 0); + lpc47n227_pnp_set_enable(dev, !!dev->enabled); pnp_exit_conf_state(dev); } diff --git a/src/superio/smsc/smscsuperio/superio.c b/src/superio/smsc/smscsuperio/superio.c index ff8b1b926c..e618823fa4 100644 --- a/src/superio/smsc/smscsuperio/superio.c +++ b/src/superio/smsc/smscsuperio/superio.c @@ -193,7 +193,7 @@ static void smsc_pnp_enable(device_t dev) { smsc_pnp_enter_conf_state(dev); pnp_set_logical_device(dev); - (dev->enabled) ? pnp_set_enable(dev, 1) : pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); smsc_pnp_exit_conf_state(dev); } diff --git a/src/superio/via/vt1211/vt1211.c b/src/superio/via/vt1211/vt1211.c index 3cfeea66a4..dbe7404368 100644 --- a/src/superio/via/vt1211/vt1211.c +++ b/src/superio/via/vt1211/vt1211.c @@ -186,12 +186,9 @@ static void vt1211_pnp_set_resources(struct device *dev) static void vt1211_pnp_enable(device_t dev) { - if (dev->enabled) - return; - pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/winbond/w83627dhg/superio.c b/src/superio/winbond/w83627dhg/superio.c index b10ff9781f..7f7bf21d3a 100644 --- a/src/superio/winbond/w83627dhg/superio.c +++ b/src/superio/winbond/w83627dhg/superio.c @@ -76,12 +76,9 @@ static void w83627dhg_pnp_enable_resources(device_t dev) static void w83627dhg_pnp_enable(device_t dev) { - if (!dev->enabled) - return; - pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c index 34ea3d46c6..d174cace8f 100644 --- a/src/superio/winbond/w83627ehg/superio.c +++ b/src/superio/winbond/w83627ehg/superio.c @@ -160,12 +160,9 @@ static void w83627ehg_pnp_enable_resources(device_t dev) static void w83627ehg_pnp_enable(device_t dev) { - if (dev->enabled) - return; - pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c index 30275b6681..2a86aa8c47 100644 --- a/src/superio/winbond/w83627hf/superio.c +++ b/src/superio/winbond/w83627hf/superio.c @@ -179,12 +179,9 @@ static void w83627hf_pnp_enable_resources(device_t dev) static void w83627hf_pnp_enable(device_t dev) { - if (dev->enabled) - return; - pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c index b96e69bce5..9159fc2547 100644 --- a/src/superio/winbond/w83697hf/superio.c +++ b/src/superio/winbond/w83697hf/superio.c @@ -70,12 +70,9 @@ static void w83697hf_pnp_set_resources(device_t dev) static void w83697hf_pnp_enable(device_t dev) { - if (dev->enabled) - return; - pnp_enter_ext_func_mode(dev); pnp_set_logical_device(dev); - pnp_set_enable(dev, 0); + pnp_set_enable(dev, !!dev->enabled); pnp_exit_ext_func_mode(dev); } |