From c0f058078388f058cf670ffeb54c186d47d4b59f Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 2 Mar 2003 21:00:15 +0000 Subject: [PATCH] [ARM] SA11x0 PCMCIA 8 Fix socket memory mapping bug - we need to take account of the requested card offset when returning the address for ioremap. --- drivers/pcmcia/sa1100_generic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index 1dfd2e56ebf8b..c0c991f122d05 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c @@ -724,14 +724,13 @@ sa1100_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *map) } - start = (map->flags & MAP_ATTRIB) ? skt->phys_attr : skt->phys_mem; - if (map->sys_stop == 0) map->sys_stop = PAGE_SIZE-1; + start = (map->flags & MAP_ATTRIB) ? skt->phys_attr : skt->phys_mem; map->sys_stop -= map->sys_start; - map->sys_stop += start; - map->sys_start = start; + map->sys_stop += start + map->card_start; + map->sys_start = start + map->card_start; skt->pc_mem_map[map->map] = *map; -- 2.53.0