Commit 0a78f160 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Linus Torvalds

[PATCH] pcmcia: yenta override to re-allocate resources

From: Manfred Spraul 

One bios assigns a small window for i/o access to yenta bridges.  But there
are Cardbus cards that needs lots of i/o ports.  yenta usually honors the bios
selected values, except if the bios choice is clearly invalid.  The patch
allows an override from the command line.
Signed-Off-By: default avatarManfred Spraul <manfred@colorfullife.com>
Signed-Off-By: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1c6f569a
...@@ -45,6 +45,10 @@ MODULE_PARM_DESC(disable_clkrun, "If PC card doesn't function properly, please t ...@@ -45,6 +45,10 @@ MODULE_PARM_DESC(disable_clkrun, "If PC card doesn't function properly, please t
static int yenta_probe_cb_irq(struct yenta_socket *socket); static int yenta_probe_cb_irq(struct yenta_socket *socket);
static unsigned int override_bios;
module_param(override_bios, uint, 0000);
MODULE_PARM_DESC (override_bios, "yenta ignore bios resource allocation");
/* /*
* Generate easy-to-use ways of reading a cardbus sockets * Generate easy-to-use ways of reading a cardbus sockets
* regular memory space ("cb_xxx"), configuration space * regular memory space ("cb_xxx"), configuration space
...@@ -554,7 +558,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ ...@@ -554,7 +558,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
start = config_readl(socket, offset) & mask; start = config_readl(socket, offset) & mask;
end = config_readl(socket, offset+4) | ~mask; end = config_readl(socket, offset+4) | ~mask;
if (start && end > start) { if (start && end > start && !override_bios) {
res->start = start; res->start = start;
res->end = end; res->end = end;
if (request_resource(root, res) == 0) if (request_resource(root, res) == 0)
......
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