diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-29 10:19:39 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 11:20:22 -0400 |
commit | fc301101034c06bf56a7f71bf682c48909e401a4 (patch) | |
tree | f1faa456d436515d73679bb12587967efba05e7c /drivers/net | |
parent | 1a4a046030ade0f57b8f3b476d61c7c35d894b66 (diff) |
pcmcia: simplify Status, ExtStatus register access
The Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were
only accessed to enable audio output for some drivers and IRQ for
serial_cs.c. The former also required setting config_req_t.Attributes
to CONF_ENABLE_SPKR; the latter can be simplified to setting this
field to CONF_ENABLE_ESR.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: linux-scsi@vger.kernel.org
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 5 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 4 |
7 files changed, 8 insertions, 20 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 5f05ffb240c..8734ed8f174 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -334,10 +334,8 @@ static int axnet_config(struct pcmcia_device *link) | |||
334 | if (!link->irq) | 334 | if (!link->irq) |
335 | goto failed; | 335 | goto failed; |
336 | 336 | ||
337 | if (resource_size(link->resource[1]) == 8) { | 337 | if (resource_size(link->resource[1]) == 8) |
338 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 338 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
339 | link->conf.Status = CCSR_AUDIO_ENA; | ||
340 | } | ||
341 | 339 | ||
342 | ret = pcmcia_request_configuration(link, &link->conf); | 340 | ret = pcmcia_request_configuration(link, &link->conf); |
343 | if (ret) | 341 | if (ret) |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index aa6ee6b264c..f3d7a149070 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -560,10 +560,9 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link, | |||
560 | if (!link->irq) | 560 | if (!link->irq) |
561 | return NULL; | 561 | return NULL; |
562 | 562 | ||
563 | if (resource_size(link->resource[1]) == 8) { | 563 | if (resource_size(link->resource[1]) == 8) |
564 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 564 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
565 | link->conf.Status = CCSR_AUDIO_ENA; | 565 | |
566 | } | ||
567 | if ((link->manf_id == MANFID_IBM) && | 566 | if ((link->manf_id == MANFID_IBM) && |
568 | (link->card_id == PRODID_IBM_HOME_AND_AWAY)) | 567 | (link->card_id == PRODID_IBM_HOME_AND_AWAY)) |
569 | link->conf.ConfigIndex |= 0x10; | 568 | link->conf.ConfigIndex |= 0x10; |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 395e586d7c0..2031a27253d 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -446,7 +446,6 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
446 | int i; | 446 | int i; |
447 | 447 | ||
448 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 448 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
449 | link->conf.Status = CCSR_AUDIO_ENA; | ||
450 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; | 449 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; |
451 | link->resource[1]->end = 8; | 450 | link->resource[1]->end = 8; |
452 | 451 | ||
@@ -640,7 +639,6 @@ static int osi_config(struct pcmcia_device *link) | |||
640 | int i, j; | 639 | int i, j; |
641 | 640 | ||
642 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 641 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
643 | link->conf.Status = CCSR_AUDIO_ENA; | ||
644 | link->resource[0]->end = 64; | 642 | link->resource[0]->end = 64; |
645 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; | 643 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; |
646 | link->resource[1]->end = 8; | 644 | link->resource[1]->end = 8; |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 4308bda0e96..59398a6f134 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -812,10 +812,9 @@ xirc2ps_config(struct pcmcia_device * link) | |||
812 | if (local->modem) { | 812 | if (local->modem) { |
813 | int pass; | 813 | int pass; |
814 | 814 | ||
815 | if (do_sound) { | 815 | if (do_sound) |
816 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 816 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
817 | link->conf.Status |= CCSR_AUDIO_ENA; | 817 | |
818 | } | ||
819 | link->resource[1]->end = 8; | 818 | link->resource[1]->end = 8; |
820 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; | 819 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; |
821 | if (local->dingo) { | 820 | if (local->dingo) { |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 488e7b45d54..ab60f108471 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -158,10 +158,8 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, | |||
158 | return -ENODEV; | 158 | return -ENODEV; |
159 | 159 | ||
160 | /* Does this card need audio output? */ | 160 | /* Does this card need audio output? */ |
161 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 161 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) |
162 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 162 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
163 | p_dev->conf.Status = CCSR_AUDIO_ENA; | ||
164 | } | ||
165 | 163 | ||
166 | /* Use power settings for Vcc and Vpp if present */ | 164 | /* Use power settings for Vcc and Vpp if present */ |
167 | /* Note that the CIS values need to be rescaled */ | 165 | /* Note that the CIS values need to be rescaled */ |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 479f5084bac..d6d585cb992 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -175,10 +175,8 @@ static int atmel_config_check(struct pcmcia_device *p_dev, | |||
175 | return -ENODEV; | 175 | return -ENODEV; |
176 | 176 | ||
177 | /* Does this card need audio output? */ | 177 | /* Does this card need audio output? */ |
178 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 178 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) |
179 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 179 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
180 | p_dev->conf.Status = CCSR_AUDIO_ENA; | ||
181 | } | ||
182 | 180 | ||
183 | /* Use power settings for Vcc and Vpp if present */ | 181 | /* Use power settings for Vcc and Vpp if present */ |
184 | /* Note that the CIS values need to be rescaled */ | 182 | /* Note that the CIS values need to be rescaled */ |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 3f35dd4438c..3fa285b1bdd 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -484,10 +484,8 @@ static int prism2_config_check(struct pcmcia_device *p_dev, | |||
484 | "(default 0x%02X)\n", cfg->index, dflt->index); | 484 | "(default 0x%02X)\n", cfg->index, dflt->index); |
485 | 485 | ||
486 | /* Does this card need audio output? */ | 486 | /* Does this card need audio output? */ |
487 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | 487 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) |
488 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; | 488 | p_dev->conf.Attributes |= CONF_ENABLE_SPKR; |
489 | p_dev->conf.Status = CCSR_AUDIO_ENA; | ||
490 | } | ||
491 | 489 | ||
492 | /* Use power settings for Vcc and Vpp if present */ | 490 | /* Use power settings for Vcc and Vpp if present */ |
493 | /* Note that the CIS values need to be rescaled */ | 491 | /* Note that the CIS values need to be rescaled */ |