Commit 4d9bd180 authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/bk/linux-2.6

into flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-pcmcia
parents cedc5632 66787112
......@@ -35,7 +35,6 @@
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/vmalloc.h>
......@@ -140,7 +139,7 @@ static int __init au1000_pcmcia_driver_init(void)
struct pcmcia_state state;
unsigned int i;
printk("\nAu1x00 PCMCIA (CS release %s)\n", CS_RELEASE);
printk("\nAu1x00 PCMCIA\n");
#ifndef CONFIG_64BIT_PHYS_ADDR
printk(KERN_ERR "Au1x00 PCMCIA 36 bit IO support not enabled\n");
......
......@@ -30,7 +30,6 @@
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
#include <linux/version.h>
#include <linux/types.h>
#include <pcmcia/version.h>
......
......@@ -82,7 +82,7 @@
#define OPTIONS PCI_OPT CB_OPT PM_OPT
#endif
static const char *release = "Linux Kernel Card Services " CS_RELEASE;
static const char *release = "Linux Kernel Card Services";
static const char *options = "options: " OPTIONS;
/*====================================================================*/
......@@ -90,8 +90,7 @@ static const char *options = "options: " OPTIONS;
/* Module parameters */
MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
MODULE_DESCRIPTION("Linux Kernel Card Services " CS_RELEASE
"\n options:" OPTIONS);
MODULE_DESCRIPTION("Linux Kernel Card Services\noptions:" OPTIONS);
MODULE_LICENSE("Dual MPL/GPL");
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
......@@ -450,6 +449,7 @@ static void shutdown_socket(struct pcmcia_socket *s)
s->state &= SOCKET_PRESENT|SOCKET_INUSE;
s->socket = dead_socket;
s->ops->init(s);
s->ops->set_socket(s, &s->socket);
s->irq.AssignedIRQ = s->irq.Config = 0;
s->lock_count = 0;
destroy_cis_cache(s);
......@@ -457,15 +457,6 @@ static void shutdown_socket(struct pcmcia_socket *s)
kfree(s->fake_cis);
s->fake_cis = NULL;
}
/* Should not the socket be forced quiet as well? e.g. turn off Vcc */
/* Without these changes, the socket is left hot, even though card-services */
/* realizes that no card is in place. */
s->socket.flags &= ~SS_OUTPUT_ENA;
s->socket.Vpp = 0;
s->socket.Vcc = 0;
s->socket.io_irq = 0;
s->ops->set_socket(s, &s->socket);
/* */
#ifdef CONFIG_CARDBUS
cb_free(s);
#endif
......@@ -485,6 +476,14 @@ static void shutdown_socket(struct pcmcia_socket *s)
}
free_regions(&s->a_region);
free_regions(&s->c_region);
{
int status;
skt->ops->get_status(skt, &status);
if (status & SS_POWERON) {
printk(KERN_ERR "PCMCIA: socket %p: *** DANGER *** unable to remove socket power\n", skt);
}
}
} /* shutdown_socket */
/*======================================================================
......@@ -639,6 +638,12 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(cs_to_timeout(vcc_settle));
skt->ops->get_status(skt, &status);
if (!(status & SS_POWERON)) {
pcmcia_error(skt, "unable to apply power.\n");
return CS_BAD_TYPE;
}
return socket_reset(skt);
}
......@@ -698,6 +703,7 @@ static int socket_resume(struct pcmcia_socket *skt)
skt->socket = dead_socket;
skt->ops->init(skt);
skt->ops->set_socket(skt, &skt->socket);
ret = socket_setup(skt, resume_delay);
if (ret == CS_SUCCESS) {
......@@ -770,6 +776,7 @@ static int pccardd(void *__skt)
skt->socket = dead_socket;
skt->ops->init(skt);
skt->ops->set_socket(skt, &skt->socket);
/* register with the device core */
ret = class_device_register(&skt->dev);
......@@ -1338,7 +1345,7 @@ int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
} else
c = CONFIG(handle);
if ((c != NULL) && (c->state & CONFIG_LOCKED) &&
(c->IntType & INT_MEMORY_AND_IO)) {
(c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) {
u_char reg;
if (c->Present & PRESENT_PIN_REPLACE) {
read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, &reg);
......@@ -1749,6 +1756,8 @@ int pcmcia_request_configuration(client_handle_t handle,
c->Attributes = req->Attributes;
if (req->IntType & INT_MEMORY_AND_IO)
s->socket.flags |= SS_IOCARD;
if (req->IntType & INT_ZOOMED_VIDEO)
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)
......
......@@ -64,7 +64,7 @@
/* Module parameters */
MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
MODULE_DESCRIPTION("PCMCIA Driver Services " CS_RELEASE);
MODULE_DESCRIPTION("PCMCIA Driver Services");
MODULE_LICENSE("Dual MPL/GPL");
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
......
......@@ -348,10 +348,6 @@ static int hs_init(struct pcmcia_socket *s)
DPRINTK("hs_init(%d)\n", sp->number);
sp->state.Vcc = 0;
sp->state.Vpp = 0;
hs_set_voltages(sp, 0, 0);
return 0;
}
......
......@@ -426,7 +426,6 @@ static int i82092aa_init(struct pcmcia_socket *sock)
enter("i82092aa_init");
mem.sys_stop = 0x0fff;
i82092aa_set_socket(sock, &dead_socket);
for (i = 0; i < 2; i++) {
io.map = i;
i82092aa_set_io_map(sock, &io);
......
......@@ -1322,7 +1322,6 @@ static int pcic_init(struct pcmcia_socket *s)
pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
mem.sys_stop = 0x1000;
pcic_set_socket(s, &dead_socket);
for (i = 0; i < 2; i++) {
io.map = i;
pcic_set_io_map(s, &io);
......
......@@ -232,8 +232,6 @@ static int sa1100_pcmcia_sock_init(struct pcmcia_socket *sock)
DEBUG(2, "%s(): initializing socket %u\n", __FUNCTION__, skt->nr);
skt->ops->socket_init(skt);
sa1100_pcmcia_config_skt(skt, &dead_socket);
return 0;
}
......@@ -946,7 +944,7 @@ static int __init sa11xx_pcmcia_init(void)
{
int ret;
printk(KERN_INFO "SA11xx PCMCIA (CS release %s)\n", CS_RELEASE);
printk(KERN_INFO "SA11xx PCMCIA\n");
ret = cpufreq_register_notifier(&sa1100_pcmcia_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
......
......@@ -865,7 +865,6 @@ static int tcic_init(struct pcmcia_socket *s)
pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
mem.sys_stop = 0x1000;
tcic_set_socket(s, &dead_socket);
for (i = 0; i < 2; i++) {
io.map = i;
tcic_set_io_map(s, &io);
......
......@@ -180,6 +180,7 @@ typedef struct config_req_t {
#define INT_MEMORY 0x01
#define INT_MEMORY_AND_IO 0x02
#define INT_CARDBUS 0x04
#define INT_ZOOMED_VIDEO 0x08
/* For RequestIO and ReleaseIO */
typedef struct io_req_t {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment