]> git.hungrycats.org Git - linux/commitdiff
[ARM] SA11x0 PCMCIA 8
authorRussell King <rmk@flint.arm.linux.org.uk>
Sun, 2 Mar 2003 21:00:15 +0000 (21:00 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sun, 2 Mar 2003 21:00:15 +0000 (21:00 +0000)
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

index 1dfd2e56ebf8beb8d46fc240be8c1dfddc940ea8..c0c991f122d058b0be4060ec855caa662b859c81 100644 (file)
@@ -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;