Commit b47b4b3e authored by Russell King's avatar Russell King

[PCMCIA] pcmcia-6: s/CONFIG_ISA/CONFIG_PCMCIA_PROBE/

Remove the dependence of the PCMCIA layer on CONFIG_ISA - introduce
CONFIG_PCMCIA_PROBE to determine whether we need the resource
handling code.  This prevents oopsen on SA11x0 and similar platforms
which use statically mapped, non-windowed sockets.
parent 8fda2958
...@@ -87,5 +87,9 @@ config PCMCIA_SA1111 ...@@ -87,5 +87,9 @@ config PCMCIA_SA1111
tristate "SA1111 support" tristate "SA1111 support"
depends on PCMCIA_SA1100 && SA1111 depends on PCMCIA_SA1100 && SA1111
config PCMCIA_PROBE
bool
default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X
endmenu endmenu
...@@ -1621,7 +1621,7 @@ int pcmcia_release_irq(client_handle_t handle, irq_req_t *req) ...@@ -1621,7 +1621,7 @@ int pcmcia_release_irq(client_handle_t handle, irq_req_t *req)
free_irq(req->AssignedIRQ, req->Instance); free_irq(req->AssignedIRQ, req->Instance);
} }
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
if (req->AssignedIRQ != s->cap.pci_irq) if (req->AssignedIRQ != s->cap.pci_irq)
undo_irq(req->Attributes, req->AssignedIRQ); undo_irq(req->Attributes, req->AssignedIRQ);
#endif #endif
...@@ -1883,7 +1883,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req) ...@@ -1883,7 +1883,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
if (!s->cap.irq_mask) { if (!s->cap.irq_mask) {
irq = s->cap.pci_irq; irq = s->cap.pci_irq;
ret = (irq) ? 0 : CS_IN_USE; ret = (irq) ? 0 : CS_IN_USE;
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
} else if (s->irq.AssignedIRQ != 0) { } else if (s->irq.AssignedIRQ != 0) {
/* If the interrupt is already assigned, it must match */ /* If the interrupt is already assigned, it must match */
irq = s->irq.AssignedIRQ; irq = s->irq.AssignedIRQ;
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") #define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
INT_MODULE_PARM(probe_mem, 1); /* memory probe? */ INT_MODULE_PARM(probe_mem, 1); /* memory probe? */
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
INT_MODULE_PARM(probe_io, 1); /* IO port probe? */ INT_MODULE_PARM(probe_io, 1); /* IO port probe? */
INT_MODULE_PARM(mem_limit, 0x10000); INT_MODULE_PARM(mem_limit, 0x10000);
#endif #endif
...@@ -87,7 +87,7 @@ static resource_map_t io_db = { 0, 0, &io_db }; ...@@ -87,7 +87,7 @@ static resource_map_t io_db = { 0, 0, &io_db };
static DECLARE_MUTEX(rsrc_sem); static DECLARE_MUTEX(rsrc_sem);
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
typedef struct irq_info_t { typedef struct irq_info_t {
u_int Attributes; u_int Attributes;
...@@ -273,7 +273,7 @@ static int sub_interval(resource_map_t *map, u_long base, u_long num) ...@@ -273,7 +273,7 @@ static int sub_interval(resource_map_t *map, u_long base, u_long num)
======================================================================*/ ======================================================================*/
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
static void do_io_probe(ioaddr_t base, ioaddr_t num) static void do_io_probe(ioaddr_t base, ioaddr_t num)
{ {
...@@ -378,7 +378,7 @@ static int do_mem_probe(u_long base, u_long num, ...@@ -378,7 +378,7 @@ static int do_mem_probe(u_long base, u_long num,
return (num - bad); return (num - bad);
} }
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
static u_long inv_probe(int (*is_valid)(u_long), static u_long inv_probe(int (*is_valid)(u_long),
int (*do_cksum)(u_long), int (*do_cksum)(u_long),
...@@ -442,7 +442,7 @@ void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long), ...@@ -442,7 +442,7 @@ void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long),
up(&rsrc_sem); up(&rsrc_sem);
} }
#else /* CONFIG_ISA */ #else /* CONFIG_PCMCIA_PROBE */
void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long), void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long),
int force_low, socket_info_t *s) int force_low, socket_info_t *s)
...@@ -459,7 +459,7 @@ void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long), ...@@ -459,7 +459,7 @@ void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long),
} }
} }
#endif /* CONFIG_ISA */ #endif /* CONFIG_PCMCIA_PROBE */
/*====================================================================== /*======================================================================
...@@ -545,7 +545,7 @@ int find_mem_region(u_long *base, u_long num, u_long align, ...@@ -545,7 +545,7 @@ int find_mem_region(u_long *base, u_long num, u_long align,
======================================================================*/ ======================================================================*/
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
static void fake_irq(int i, void *d, struct pt_regs *r) { } static void fake_irq(int i, void *d, struct pt_regs *r) { }
static inline int check_irq(int irq) static inline int check_irq(int irq)
...@@ -634,7 +634,7 @@ int try_irq(u_int Attributes, int irq, int specific) ...@@ -634,7 +634,7 @@ int try_irq(u_int Attributes, int irq, int specific)
/*====================================================================*/ /*====================================================================*/
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
void undo_irq(u_int Attributes, int irq) void undo_irq(u_int Attributes, int irq)
{ {
...@@ -725,7 +725,7 @@ static int adjust_io(adjust_t *adj) ...@@ -725,7 +725,7 @@ static int adjust_io(adjust_t *adj)
ret = CS_IN_USE; ret = CS_IN_USE;
break; break;
} }
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
if (probe_io) if (probe_io)
do_io_probe(base, num); do_io_probe(base, num);
#endif #endif
...@@ -747,7 +747,7 @@ static int adjust_io(adjust_t *adj) ...@@ -747,7 +747,7 @@ static int adjust_io(adjust_t *adj)
static int adjust_irq(adjust_t *adj) static int adjust_irq(adjust_t *adj)
{ {
int ret = CS_SUCCESS; int ret = CS_SUCCESS;
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
int irq; int irq;
irq_info_t *info; irq_info_t *info;
......
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