summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/pcmcia_resource.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-29 15:54:54 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 17:20:21 +0200
commit1a4a046030ade0f57b8f3b476d61c7c35d894b66 (patch)
tree07496ee2340444c87740745b140957347b4da1c3 /drivers/pcmcia/pcmcia_resource.c
parente8405f0f617856de0ceb7d04e65b663051451544 (diff)
pcmcia: remove Pin, Copy configuration register access
The "Pin" and "Copy" configuration registers (CISREG_SCR, CISREG_PPR) do not seem to be utilized anywhere. If a device would request a write to these registers, "0" would be written. Continue to do so, but warn of unexpected behavior -- and remove the "Pin" and "Copy" entries from config_req_t. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r--drivers/pcmcia/pcmcia_resource.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 817d00adfc89..28717eea7c57 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -489,8 +489,14 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
base = c->ConfigBase = req->ConfigBase;
c->CardValues = req->Present;
if (req->Present & PRESENT_COPY) {
- c->Copy = req->Copy;
- pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);
+ u16 tmp = 0;
+ dev_dbg(&p_dev->dev, "clearing CISREG_SCR\n");
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &tmp);
+ }
+ if (req->Present & PRESENT_PIN_REPLACE) {
+ u16 tmp = 0;
+ dev_dbg(&p_dev->dev, "clearing CISREG_PRR\n");
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &tmp);
}
if (req->Present & PRESENT_OPTION) {
if (s->functions == 1) {
@@ -511,10 +517,6 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
c->Status = req->Status;
pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
}
- if (req->Present & PRESENT_PIN_REPLACE) {
- c->Pin = req->Pin;
- pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &c->Pin);
- }
if (req->Present & PRESENT_EXT_STATUS) {
c->ExtStatus = req->ExtStatus;
pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);