summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
commit1471f525455788c20b130690e0f104df451aeb43 (patch)
tree3778beba56558beb9a9548ea5b467e9c44ea966f /drivers/pcmcia
parente80d2c5456d30ebba5b0eb8a9d33e17d815d4d83 (diff)
Merge with Linux 2.3.51.
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/i82365.c6
-rw-r--r--drivers/pcmcia/yenta.c26
2 files changed, 30 insertions, 2 deletions
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 6ea612b84..af89ed1d3 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -1336,7 +1336,6 @@ static int proc_read_exca(char *buf, char **start, off_t pos,
static void pcic_proc_setup(unsigned int sock, struct proc_dir_entry *base)
{
-#ifdef CONFIG_PROC_FS
socket_info_t *s = &socket[sock];
if (s->flags & IS_ALIVE)
@@ -1345,7 +1344,6 @@ static void pcic_proc_setup(unsigned int sock, struct proc_dir_entry *base)
create_proc_read_entry("info", 0, base, proc_read_info, s);
create_proc_read_entry("exca", 0, base, proc_read_exca, s);
s->proc = base;
-#endif
}
static void pcic_proc_remove(u_short sock)
@@ -1356,6 +1354,10 @@ static void pcic_proc_remove(u_short sock)
remove_proc_entry("exca", base);
}
+#else
+
+#define pcic_proc_setup NULL
+
#endif /* CONFIG_PROC_FS */
/*====================================================================*/
diff --git a/drivers/pcmcia/yenta.c b/drivers/pcmcia/yenta.c
index abb46572a..e517fbf27 100644
--- a/drivers/pcmcia/yenta.c
+++ b/drivers/pcmcia/yenta.c
@@ -555,6 +555,30 @@ static void yenta_clear_maps(pci_socket_t *socket)
}
}
+/*
+ * Many chipsets (all TI chips?) seem to have
+ * problems sensing the power state of the card
+ * that was inserted at chip init time, so force
+ * it if necessary..
+ */
+static void yenta_power_sense(pci_socket_t *socket)
+{
+ u32 status = config_readl(socket, CB_SOCKET_STATE);
+
+ /*
+ * Nothing inserted, nothing to sense..
+ * ..or sense status already available.
+ */
+ if (status & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD))
+ return;
+
+ /*
+ * Ho humm. It reports a card, but it doesn't report
+ * any voltages. Need to redo the VS test..
+ */
+ cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
+}
+
/* Called at resume and initialization events */
static int yenta_init(pci_socket_t *socket)
{
@@ -595,6 +619,8 @@ static int yenta_init(pci_socket_t *socket)
exca_writeb(socket, I365_GBLCTL, 0x00);
exca_writeb(socket, I365_GENCTL, 0x00);
+ yenta_power_sense(socket);
+
yenta_clear_maps(socket);
return 0;
}