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 */
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)
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;
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;
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;
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) {
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 */
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 */
"(default 0x%02X)\n", cfg->index, dflt->index);
/* 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 */
unsigned int Attributes;
unsigned int IntType;
unsigned int ConfigBase;
- unsigned char Status, Option, ExtStatus;
+ unsigned char Option;
unsigned int CardValues;
struct resource io[MAX_IO_WIN]; /* io ports */
struct pcmcia_socket *s = p_dev->socket;
config_t *c;
pccard_io_map iomap;
+ unsigned char status = 0;
+ unsigned char ext_status = 0;
if (!(s->state & SOCKET_PRESENT))
return -ENODEV;
s->socket.flags |= SS_ZVCARD | SS_IOCARD;
if (req->Attributes & CONF_ENABLE_DMA)
s->socket.flags |= SS_DMA_MODE;
- if (req->Attributes & CONF_ENABLE_SPKR)
+ if (req->Attributes & CONF_ENABLE_SPKR) {
s->socket.flags |= SS_SPKR_ENA;
+ status = CCSR_AUDIO_ENA;
+ if (!(req->Present & PRESENT_STATUS))
+ dev_warn(&p_dev->dev, "speaker requested, but "
+ "PRESENT_STATUS not set!\n");
+ }
if (req->Attributes & CONF_ENABLE_IRQ)
s->socket.io_irq = s->pcmcia_irq;
else
s->socket.io_irq = 0;
+ if (req->Attributes & CONF_ENABLE_ESR) {
+ req->Present |= PRESENT_EXT_STATUS;
+ ext_status = ESR_REQ_ATTN_ENA;
+ }
s->ops->set_socket(s, &s->socket);
s->lock_count++;
pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
mdelay(40);
}
- if (req->Present & PRESENT_STATUS) {
- c->Status = req->Status;
- pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
- }
- if (req->Present & PRESENT_EXT_STATUS) {
- c->ExtStatus = req->ExtStatus;
- pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);
- }
+ if (req->Present & PRESENT_STATUS)
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &status);
+
+ if (req->Present & PRESENT_EXT_STATUS)
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1,
+ &ext_status);
+
if (req->Present & PRESENT_IOBASE_0) {
u8 b = c->io[0].start & 0xff;
pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b);
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 */
{
struct serial_info *info = link->priv;
- if (info->multi) {
- link->conf.Present |= PRESENT_EXT_STATUS;
- link->conf.ExtStatus = ESR_REQ_ATTN_ENA;
- }
+ if (info->multi)
+ link->conf.Attributes |= CONF_ENABLE_ESR;
}
static const struct serial_quirk quirks[] = {
link->priv = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
- if (do_sound) {
+ if (do_sound)
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status = CCSR_AUDIO_ENA;
- }
+
link->conf.IntType = INT_MEMORY_AND_IO;
return serial_config(link);
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;
- }
/* Do we need to allocate an interrupt? */
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
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;
- }
/* Do we need to allocate an interrupt? */
p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
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;
- }
/* Do we need to allocate an interrupt? */
p_dev->conf.Attributes |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
u_int Attributes;
u_int IntType;
u_int ConfigBase;
- u_char Status, ExtStatus;
u_char ConfigIndex;
u_int Present;
} config_req_t;
#define CONF_ENABLE_DMA 0x02
#define CONF_ENABLE_SPKR 0x04
#define CONF_ENABLE_PULSE_IRQ 0x08
+#define CONF_ENABLE_ESR 0x10
#define CONF_VALID_CLIENT 0x100
/* IntType field */