Commit cf2623a3 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: update CF/PCMCIA drivers

  This patch updates m32r-specific CF/PCMCIA drivers and 
  fixes compile errors.
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4df70cca
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Device driver for the CFC functionality of M32R. * Device driver for the CFC functionality of M32R.
* *
* Copyright (c) 2001, 2002, 2003, 2004 * Copyright (c) 2001, 2002, 2003, 2004
* Hiroyuki Kondo, Sugai Naotom, Hayato Fujiwara * Hiroyuki Kondo, Naoto Sugai, Hayato Fujiwara
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -592,15 +592,15 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -592,15 +592,15 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
u_long addr; u_long addr;
pcc_socket_t *t = &socket[sock]; pcc_socket_t *t = &socket[sock];
DEBUG(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5" DEBUG(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, "
"lx, %#5.5x)\n", sock, map, mem->flags, mem->speed, "%#5.5lx-%#5.5lx, %#5.5x)\n", sock, map, mem->flags,
mem->sys_start, mem->sys_stop, mem->card_start); mem->speed, mem->res->start, mem->res->end, mem->card_start);
/* /*
* sanity check * sanity check
*/ */
if ((map > MAX_WIN) || (mem->card_start > 0x3ffffff) || if ((map > MAX_WIN) || (mem->card_start > 0x3ffffff) ||
(mem->sys_start > mem->sys_stop)) { (mem->res->start > mem->res->end)) {
return -EINVAL; return -EINVAL;
} }
...@@ -635,8 +635,8 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -635,8 +635,8 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
addr = t->mapaddr + (mem->card_start & M32R_PCC_MAPMASK); addr = t->mapaddr + (mem->card_start & M32R_PCC_MAPMASK);
// pcc_set(sock, PCADR, addr); // pcc_set(sock, PCADR, addr);
mem->sys_start = addr + mem->card_start; mem->res->start = addr + mem->card_start;
mem->sys_stop = mem->sys_start + (M32R_PCC_MAPSIZE - 1); mem->res->end = mem->res->start + (M32R_PCC_MAPSIZE - 1);
/* /*
* Set timing * Set timing
......
/*====================================================================== /*
* linux/arch/m32r/drivers/m32r_pcc.c
Device driver for the PCMCIA functionality of M32R. *
* Device driver for the PCMCIA functionality of M32R.
======================================================================*/ *
* Copyright (c) 2001, 2002, 2003, 2004
* Hiroyuki Kondo, Naoto Sugai, Hayato Fujiwara
*/
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
...@@ -524,15 +527,15 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -524,15 +527,15 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
#endif #endif
#endif #endif
DEBUG(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5" DEBUG(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, "
"lx, %#5.5x)\n", sock, map, mem->flags, mem->speed, "%#5.5lx-%#5.5lx, %#5.5x)\n", sock, map, mem->flags,
mem->sys_start, mem->sys_stop, mem->card_start); mem->speed, mem->res->start, mem->res->end, mem->card_start);
/* /*
* sanity check * sanity check
*/ */
if ((map > MAX_WIN) || (mem->card_start > 0x3ffffff) || if ((map > MAX_WIN) || (mem->card_start > 0x3ffffff) ||
(mem->sys_start > mem->sys_stop)) { (mem->res->start > mem->res->end)) {
return -EINVAL; return -EINVAL;
} }
...@@ -567,8 +570,8 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) ...@@ -567,8 +570,8 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
addr = t->mapaddr + (mem->card_start & M32R_PCC_MAPMASK); addr = t->mapaddr + (mem->card_start & M32R_PCC_MAPMASK);
pcc_set(sock, PCADR, addr); pcc_set(sock, PCADR, addr);
mem->sys_start = addr + mem->card_start; mem->res->start = addr + mem->card_start;
mem->sys_stop = mem->sys_start + (M32R_PCC_MAPSIZE - 1); mem->res->end = mem->res->start + (M32R_PCC_MAPSIZE - 1);
/* /*
* Enable again * Enable again
......
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