Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc301101 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

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: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 1a4a0460
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -175,10 +175,8 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
		return -ENODEV;

	/* Does this card need audio output? */
	if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
	if (cfg->flags & CISTPL_CFTABLE_AUDIO)
		p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
		p_dev->conf.Status = CCSR_AUDIO_ENA;
	}

	/* Use power settings for Vcc and Vpp if present */
	/*  Note that the CIS values need to be rescaled */
+1 −3
Original line number Diff line number Diff line
@@ -334,10 +334,8 @@ static int axnet_config(struct pcmcia_device *link)
    if (!link->irq)
	    goto failed;
    
    if (resource_size(link->resource[1]) == 8) {
    if (resource_size(link->resource[1]) == 8)
	link->conf.Attributes |= CONF_ENABLE_SPKR;
	link->conf.Status = CCSR_AUDIO_ENA;
    }
    
    ret = pcmcia_request_configuration(link, &link->conf);
    if (ret)
+2 −3
Original line number Diff line number Diff line
@@ -560,10 +560,9 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,
	if (!link->irq)
		return NULL;

	if (resource_size(link->resource[1]) == 8) {
	if (resource_size(link->resource[1]) == 8)
		link->conf.Attributes |= CONF_ENABLE_SPKR;
		link->conf.Status = CCSR_AUDIO_ENA;
	}

	if ((link->manf_id == MANFID_IBM) &&
	    (link->card_id == PRODID_IBM_HOME_AND_AWAY))
		link->conf.ConfigIndex |= 0x10;
+0 −2
Original line number Diff line number Diff line
@@ -446,7 +446,6 @@ static int mhz_mfc_config(struct pcmcia_device *link)
    int i;

    link->conf.Attributes |= CONF_ENABLE_SPKR;
    link->conf.Status = CCSR_AUDIO_ENA;
    link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
    link->resource[1]->end = 8;

@@ -640,7 +639,6 @@ static int osi_config(struct pcmcia_device *link)
    int i, j;

    link->conf.Attributes |= CONF_ENABLE_SPKR;
    link->conf.Status = CCSR_AUDIO_ENA;
    link->resource[0]->end = 64;
    link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
    link->resource[1]->end = 8;
+2 −3
Original line number Diff line number Diff line
@@ -812,10 +812,9 @@ xirc2ps_config(struct pcmcia_device * link)
    if (local->modem) {
	int pass;

	if (do_sound) {
	if (do_sound)
	    link->conf.Attributes |= CONF_ENABLE_SPKR;
	    link->conf.Status |= CCSR_AUDIO_ENA;
	}

	link->resource[1]->end = 8;
	link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
	if (local->dingo) {
Loading