Commit c8b3c87d authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 02-move_bulkmem.diff

The rest of drivers/pcmcia/bulkmem.c is only used by code
relevant for 16-bit PCMCIA devices. So, link it with ds instead
of with cs. The newly created module pcmcia.ko contains a
MODULE_ALIAS() for the name "ds" so that backwards compatibility
is ensured.
parent 46535956
...@@ -6,7 +6,7 @@ ifeq ($(CONFIG_PCMCIA_DEBUG),y) ...@@ -6,7 +6,7 @@ ifeq ($(CONFIG_PCMCIA_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG EXTRA_CFLAGS += -DDEBUG
endif endif
obj-$(CONFIG_PCMCIA) += pcmcia_core.o ds.o obj-$(CONFIG_PCMCIA) += pcmcia_core.o pcmcia.o
obj-$(CONFIG_YENTA) += yenta_socket.o obj-$(CONFIG_YENTA) += yenta_socket.o
obj-$(CONFIG_PD6729) += pd6729.o obj-$(CONFIG_PD6729) += pd6729.o
...@@ -18,9 +18,11 @@ obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_core.o sa1100_cs.o ...@@ -18,9 +18,11 @@ obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_core.o sa1100_cs.o
obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_core.o sa1111_cs.o obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_core.o sa1111_cs.o
obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o pxa2xx_cs.o obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o pxa2xx_cs.o
pcmcia_core-y += cistpl.o rsrc_mgr.o bulkmem.o cs.o socket_sysfs.o pcmcia_core-y += cistpl.o rsrc_mgr.o cs.o socket_sysfs.o
pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o
pcmcia-y += ds.o bulkmem.o
sa11xx_core-y += soc_common.o sa11xx_base.o sa11xx_core-y += soc_common.o sa11xx_base.o
pxa2xx_core-y += soc_common.o pxa2xx_base.o pxa2xx_core-y += soc_common.o pxa2xx_base.o
......
...@@ -48,6 +48,19 @@ ...@@ -48,6 +48,19 @@
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include "cs_internal.h" #include "cs_internal.h"
#ifdef DEBUG
extern int pc_debug;
#define cs_socket_name(skt) ((skt)->dev.class_id)
#define ds_dbg(skt, lvl, fmt, arg...) do { \
if (pc_debug >= lvl) \
printk(KERN_DEBUG "ds: %s: " fmt, \
cs_socket_name(skt) , ## arg); \
} while (0)
#else
#define ds_dbg(lvl, fmt, arg...) do { } while (0)
#endif
/*====================================================================== /*======================================================================
This stuff is used by Card Services to initialize the table of This stuff is used by Card Services to initialize the table of
...@@ -66,7 +79,7 @@ static void setup_regions(client_handle_t handle, int attr, ...@@ -66,7 +79,7 @@ static void setup_regions(client_handle_t handle, int attr,
cistpl_device_geo_t geo; cistpl_device_geo_t geo;
memory_handle_t r; memory_handle_t r;
cs_dbg(SOCKET(handle), 1, "setup_regions(0x%p, %d, 0x%p)\n", ds_dbg(SOCKET(handle), 1, "setup_regions(0x%p, %d, 0x%p)\n",
handle, attr, list); handle, attr, list);
code = (attr) ? CISTPL_DEVICE_A : CISTPL_DEVICE; code = (attr) ? CISTPL_DEVICE_A : CISTPL_DEVICE;
...@@ -75,13 +88,13 @@ static void setup_regions(client_handle_t handle, int attr, ...@@ -75,13 +88,13 @@ static void setup_regions(client_handle_t handle, int attr,
code = (attr) ? CISTPL_JEDEC_A : CISTPL_JEDEC_C; code = (attr) ? CISTPL_JEDEC_A : CISTPL_JEDEC_C;
has_jedec = (read_tuple(handle, code, &jedec) == CS_SUCCESS); has_jedec = (read_tuple(handle, code, &jedec) == CS_SUCCESS);
if (has_jedec && (device.ndev != jedec.nid)) { if (has_jedec && (device.ndev != jedec.nid)) {
cs_dbg(SOCKET(handle), 0, "Device info does not match JEDEC info.\n"); ds_dbg(SOCKET(handle), 0, "Device info does not match JEDEC info.\n");
has_jedec = 0; has_jedec = 0;
} }
code = (attr) ? CISTPL_DEVICE_GEO_A : CISTPL_DEVICE_GEO; code = (attr) ? CISTPL_DEVICE_GEO_A : CISTPL_DEVICE_GEO;
has_geo = (read_tuple(handle, code, &geo) == CS_SUCCESS); has_geo = (read_tuple(handle, code, &geo) == CS_SUCCESS);
if (has_geo && (device.ndev != geo.ngeo)) { if (has_geo && (device.ndev != geo.ngeo)) {
cs_dbg(SOCKET(handle), 0, "Device info does not match geometry tuple.\n"); ds_dbg(SOCKET(handle), 0, "Device info does not match geometry tuple.\n");
has_geo = 0; has_geo = 0;
} }
...@@ -161,6 +174,7 @@ int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn) ...@@ -161,6 +174,7 @@ int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn)
else else
return match_region(handle, s->c_region, rgn); return match_region(handle, s->c_region, rgn);
} /* get_first_region */ } /* get_first_region */
EXPORT_SYMBOL(pcmcia_get_first_region);
int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn) int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn)
{ {
...@@ -168,4 +182,4 @@ int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn) ...@@ -168,4 +182,4 @@ int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn)
return CS_BAD_HANDLE; return CS_BAD_HANDLE;
return match_region(handle, rgn->next, rgn); return match_region(handle, rgn->next, rgn);
} /* get_next_region */ } /* get_next_region */
EXPORT_SYMBOL(pcmcia_get_next_region);
...@@ -1431,6 +1431,7 @@ int read_tuple(client_handle_t handle, cisdata_t code, void *parse) ...@@ -1431,6 +1431,7 @@ int read_tuple(client_handle_t handle, cisdata_t code, void *parse)
kfree(buf); kfree(buf);
return ret; return ret;
} }
EXPORT_SYMBOL(read_tuple);
/*====================================================================== /*======================================================================
......
...@@ -2096,10 +2096,8 @@ EXPORT_SYMBOL(pcmcia_get_card_services_info); ...@@ -2096,10 +2096,8 @@ EXPORT_SYMBOL(pcmcia_get_card_services_info);
EXPORT_SYMBOL(pcmcia_get_configuration_info); EXPORT_SYMBOL(pcmcia_get_configuration_info);
EXPORT_SYMBOL(pcmcia_get_mem_page); EXPORT_SYMBOL(pcmcia_get_mem_page);
EXPORT_SYMBOL(pcmcia_get_next_client); EXPORT_SYMBOL(pcmcia_get_next_client);
EXPORT_SYMBOL(pcmcia_get_first_region);
EXPORT_SYMBOL(pcmcia_get_first_tuple); EXPORT_SYMBOL(pcmcia_get_first_tuple);
EXPORT_SYMBOL(pcmcia_get_first_window); EXPORT_SYMBOL(pcmcia_get_first_window);
EXPORT_SYMBOL(pcmcia_get_next_region);
EXPORT_SYMBOL(pcmcia_get_next_tuple); EXPORT_SYMBOL(pcmcia_get_next_tuple);
EXPORT_SYMBOL(pcmcia_get_next_window); EXPORT_SYMBOL(pcmcia_get_next_window);
EXPORT_SYMBOL(pcmcia_get_status); EXPORT_SYMBOL(pcmcia_get_status);
......
...@@ -75,7 +75,7 @@ MODULE_DESCRIPTION("PCMCIA Driver Services"); ...@@ -75,7 +75,7 @@ MODULE_DESCRIPTION("PCMCIA Driver Services");
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
#ifdef DEBUG #ifdef DEBUG
static int pc_debug; int pc_debug;
module_param(pc_debug, int, 0644); module_param(pc_debug, int, 0644);
...@@ -1241,3 +1241,5 @@ static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info) ...@@ -1241,3 +1241,5 @@ static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info)
return cmp.drv; return cmp.drv;
return NULL; return NULL;
} }
MODULE_ALIAS("ds");
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