From 78f8c70e3799aad37359ca6b399195e95a94d07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Sun, 11 Nov 2012 11:44:08 +0000 Subject: Revert commit 6430 --- mdk-stage1/pcmcia/probe.c | 313 +++++++++++++++----------------------------- mdk-stage1/pcmcia/startup.c | 290 ++++++++++++++++++++-------------------- 2 files changed, 249 insertions(+), 354 deletions(-) (limited to 'mdk-stage1/pcmcia') diff --git a/mdk-stage1/pcmcia/probe.c b/mdk-stage1/pcmcia/probe.c index 222be6239..240fe3a17 100644 --- a/mdk-stage1/pcmcia/probe.c +++ b/mdk-stage1/pcmcia/probe.c @@ -12,6 +12,9 @@ * * * Code comes from /anonymous@projects.sourceforge.net:/pub/pcmcia-cs/pcmcia-cs-3.1.29.tar.bz2 + * + * FIXME: resync with latest pcmcia-cs-3.2.8 or with pcmciautils-0.18 (which uses sysfs) + * */ /*====================================================================== @@ -55,18 +58,15 @@ #include #include -//mdk-stage1// #include #include "log.h" #include "pcmcia.h" /*====================================================================*/ -//mdk-stage1// #ifdef CONFIG_PCI - typedef struct { - u_short vendor, device; - char *modname; - char *name; + u_short vendor, device; + char *modname; + char *name; } pci_id_t; pci_id_t pci_id[] = { @@ -138,79 +138,40 @@ static int pci_probe(void) u_int device, vendor, i; FILE *f; -//mdk-stage1// if (!module) log_message("PCMCIA: probing PCI bus.."); if ((f = fopen("/proc/bus/pci/devices", "r")) != NULL) { - while (fgets(s, 256, f) != NULL) { - u_int n = strtoul(s+5, NULL, 16); - vendor = (n >> 16); device = (n & 0xffff); - if (vendor == 0x1217) { - driver = "yenta_socket"; - name = "O2 Micro|PCMCIA Controller"; - break; - } - for (i = 0; i < PCI_COUNT; i++) - if ((vendor == pci_id[i].vendor) && - (device == pci_id[i].device)) break; - if (i < PCI_COUNT) { - name = pci_id[i].name; - driver = pci_id[i].modname; - } - } + while (fgets(s, 256, f) != NULL) { + u_int n = strtoul(s+5, NULL, 16); + vendor = (n >> 16); device = (n & 0xffff); + if (vendor == 0x1217) { + driver = "yenta_socket"; + name = "O2 Micro|PCMCIA Controller"; + break; + } + for (i = 0; i < PCI_COUNT; i++) + if ((vendor == pci_id[i].vendor) && + (device == pci_id[i].device)) break; + if (i < PCI_COUNT) { + name = pci_id[i].name; + driver = pci_id[i].modname; + } + } } -//mdk-stage1// else if ((f = fopen("/proc/pci", "r")) != NULL) { -//mdk-stage1// while (fgets(s, 256, f) != NULL) { -//mdk-stage1// t = strstr(s, "Device id="); -//mdk-stage1// if (t) { -//mdk-stage1// device = strtoul(t+10, NULL, 16); -//mdk-stage1// t = strstr(s, "Vendor id="); -//mdk-stage1// vendor = strtoul(t+10, NULL, 16); -//mdk-stage1// for (i = 0; i < PCI_COUNT; i++) -//mdk-stage1// if ((vendor == pci_id[i].vendor) && -//mdk-stage1// (device == pci_id[i].device)) break; -//mdk-stage1// } else -//mdk-stage1// for (i = 0; i < PCI_COUNT; i++) -//mdk-stage1// if (strstr(s, pci_id[i].tag) != NULL) break; -//mdk-stage1// if (i != PCI_COUNT) { -//mdk-stage1// name = pci_id[i].name; -//mdk-stage1// break; -//mdk-stage1// } else { -//mdk-stage1// t = strstr(s, "CardBus bridge"); -//mdk-stage1// if (t != NULL) { -//mdk-stage1// name = t + 16; -//mdk-stage1// t = strchr(s, '('); -//mdk-stage1// t[-1] = '\0'; -//mdk-stage1// break; -//mdk-stage1// } -//mdk-stage1// } -//mdk-stage1// } -//mdk-stage1// } fclose(f); if (name) { -//mdk-stage1// if (module) -//mdk-stage1// printf("i82365\n"); -//mdk-stage1// else - log_message("\t%s found, 2 sockets (driver %s).", name, driver); - return 0; + log_message("\t%s found, 2 sockets (driver %s).", name, driver); + return 0; } else { -//mdk-stage1// if (!module) - log_message("\tnot found."); - return -ENODEV; + log_message("\tnot found."); + return -ENODEV; } } -//mdk-stage1// #endif /*====================================================================*/ -//mdk-stage1// #ifdef CONFIG_ISA -//mdk-stage1// -//mdk-stage1// #ifdef __GLIBC__ #include -//mdk-stage1// #else -//mdk-stage1// #include -//mdk-stage1// #endif typedef u_short ioaddr_t; #include "i82365.h" @@ -251,9 +212,7 @@ int i365_probe(void) int val, sock, done; char *name = "i82365sl"; -//mdk-stage1// if (!module) log_message("PCMCIA: probing for Intel PCIC (ISA).."); -//mdk-stage1// if (verbose) printf("\n"); sock = done = 0; if (ioperm(i365_base, 4, 1)) { @@ -262,39 +221,35 @@ int i365_probe(void) } ioperm(0x80, 1, 1); for (; sock < 2; sock++) { - val = i365_get(sock, I365_IDENT); -//mdk-stage1// if (verbose) -//mdk-stage1// printf(" ident(%d)=%#2.2x", sock, val); - switch (val) { - case 0x82: - name = "i82365sl A step"; - break; - case 0x83: - name = "i82365sl B step"; - break; - case 0x84: - name = "VLSI 82C146"; - break; - case 0x88: case 0x89: case 0x8a: - name = "IBM Clone"; - break; - case 0x8b: case 0x8c: - break; - default: - done = 1; - } - if (done) break; + val = i365_get(sock, I365_IDENT); + switch (val) { + case 0x82: + name = "i82365sl A step"; + break; + case 0x83: + name = "i82365sl B step"; + break; + case 0x84: + name = "VLSI 82C146"; + break; + case 0x88: case 0x89: case 0x8a: + name = "IBM Clone"; + break; + case 0x8b: case 0x8c: + break; + default: + done = 1; + } + if (done) break; } -//mdk-stage1// if (verbose) printf("\n "); if (sock == 0) { -//mdk-stage1// if (!module) - log_message("\tnot found."); - return -ENODEV; + log_message("\tnot found."); + return -ENODEV; } if ((sock == 2) && (strcmp(name, "VLSI 82C146") == 0)) - name = "i82365sl DF"; + name = "i82365sl DF"; /* Check for Vadem chips */ outb(0x0e, i365_base); @@ -302,49 +257,40 @@ int i365_probe(void) i365_bset(0, VG468_MISC, VG468_MISC_VADEMREV); val = i365_get(0, I365_IDENT); if (val & I365_IDENT_VADEM) { - if ((val & 7) < 4) - name = "Vadem VG-468"; - else - name = "Vadem VG-469"; - i365_bclr(0, VG468_MISC, VG468_MISC_VADEMREV); + if ((val & 7) < 4) + name = "Vadem VG-468"; + else + name = "Vadem VG-469"; + i365_bclr(0, VG468_MISC, VG468_MISC_VADEMREV); } /* Check for Cirrus CL-PD67xx chips */ i365_set(0, PD67_CHIP_INFO, 0); val = i365_get(0, PD67_CHIP_INFO); if ((val & PD67_INFO_CHIP_ID) == PD67_INFO_CHIP_ID) { - val = i365_get(0, PD67_CHIP_INFO); - if ((val & PD67_INFO_CHIP_ID) == 0) { - if (val & PD67_INFO_SLOTS) - name = "Cirrus CL-PD672x"; - else { - name = "Cirrus CL-PD6710"; - sock = 1; - } - i365_set(0, PD67_EXT_INDEX, 0xe5); - if (i365_get(0, PD67_EXT_INDEX) != 0xe5) - name = "VIA VT83C469"; - } + val = i365_get(0, PD67_CHIP_INFO); + if ((val & PD67_INFO_CHIP_ID) == 0) { + if (val & PD67_INFO_SLOTS) + name = "Cirrus CL-PD672x"; + else { + name = "Cirrus CL-PD6710"; + sock = 1; + } + i365_set(0, PD67_EXT_INDEX, 0xe5); + if (i365_get(0, PD67_EXT_INDEX) != 0xe5) + name = "VIA VT83C469"; + } } -//mdk-stage1// if (module) -//mdk-stage1// printf("i82365\n"); -//mdk-stage1// else - printf("\t%s found, %d sockets.\n", name, sock); + printf("\t%s found, %d sockets.\n", name, sock); return 0; } /* i365_probe */ -//mdk-stage1//#endif /* CONFIG_ISA */ - /*====================================================================*/ -//mdk-stage1//#ifdef CONFIG_ISA - #include "tcic.h" -//mdk-stage1//static ioaddr_t tcic_base = TCIC_BASE; - static u_char tcic_getb(ioaddr_t base, u_char reg) { u_char val = inb(base+reg); @@ -398,10 +344,9 @@ int tcic_probe_at(ioaddr_t base) /* Anything there?? */ for (i = 0; i < 0x10; i += 2) - if (tcic_getw(base, i) == 0xffff) - return -1; + if (tcic_getw(base, i) == 0xffff) + return -1; -//mdk-stage1// if (!module) log_message("\tat %#3.3x: ", base); fflush(stdout); /* Try to reset the chip */ @@ -412,13 +357,13 @@ int tcic_probe_at(ioaddr_t base) old = tcic_getw(base, TCIC_ADDR); tcic_setw(base, TCIC_ADDR, 0); if (tcic_getw(base, TCIC_ADDR) != 0) { - tcic_setw(base, TCIC_ADDR, old); - return -2; + tcic_setw(base, TCIC_ADDR, old); + return -2; } tcic_setw(base, TCIC_ADDR, 0xc3a5); if (tcic_getw(base, TCIC_ADDR) != 0xc3a5) - return -3; + return -3; return 2; } @@ -427,105 +372,55 @@ int tcic_probe(void) { int sock, id; -//mdk-stage1// if (!module) log_message("PCMCIA: probing for Databook TCIC-2 (ISA).."); fflush(stdout); if (ioperm(TCIC_BASE, 16, 1)) { - log_perror("PCMCIA: ioperm"); - return -1; + log_perror("PCMCIA: ioperm"); + return -1; } ioperm(0x80, 1, 1); sock = tcic_probe_at(TCIC_BASE); if (sock <= 0) { -//mdk-stage1// if (!module) - log_message("\tnot found."); - return -ENODEV; + log_message("\tnot found."); + return -ENODEV; } -//mdk-stage1// if (module) -//mdk-stage1// printf("tcic\n"); -//mdk-stage1// else { - id = get_tcic_id(TCIC_BASE); - switch (id) { - case TCIC_ID_DB86082: - log_message("DB86082"); break; - case TCIC_ID_DB86082A: - log_message("DB86082A"); break; - case TCIC_ID_DB86084: - log_message("DB86084"); break; - case TCIC_ID_DB86084A: - log_message("DB86084A"); break; - case TCIC_ID_DB86072: - log_message("DB86072"); break; - case TCIC_ID_DB86184: - log_message("DB86184"); break; - case TCIC_ID_DB86082B: - log_message("DB86082B"); break; - default: - log_message("Unknown TCIC-2 ID 0x%02x", id); - } - log_message(" found at %#6x, %d sockets.", TCIC_BASE, sock); -//mdk-stage1// } + id = get_tcic_id(TCIC_BASE); + switch (id) { + case TCIC_ID_DB86082: + log_message("DB86082"); break; + case TCIC_ID_DB86082A: + log_message("DB86082A"); break; + case TCIC_ID_DB86084: + log_message("DB86084"); break; + case TCIC_ID_DB86084A: + log_message("DB86084A"); break; + case TCIC_ID_DB86072: + log_message("DB86072"); break; + case TCIC_ID_DB86184: + log_message("DB86184"); break; + case TCIC_ID_DB86082B: + log_message("DB86082B"); break; + default: + log_message("Unknown TCIC-2 ID 0x%02x", id); + } + log_message(" found at %#6x, %d sockets.", TCIC_BASE, sock); return 0; } /* tcic_probe */ -//mdk-stage1// #endif /* CONFIG_ISA */ - -//mdk-stage1// /*====================================================================*/ -//mdk-stage1// -//mdk-stage1// int main(int argc, char *argv[]) -//mdk-stage1// { -//mdk-stage1// int optch, errflg; -//mdk-stage1// extern char *optarg; -//mdk-stage1// int verbose = 0, module = 0; -//mdk-stage1// -//mdk-stage1// errflg = 0; -//mdk-stage1// while ((optch = getopt(argc, argv, "t:vxm")) != -1) { -//mdk-stage1// switch (optch) { -//mdk-stage1// #ifdef CONFIG_ISA -//mdk-stage1// case 't': -//mdk-stage1// tcic_base = strtoul(optarg, NULL, 0); break; -//mdk-stage1// #endif -//mdk-stage1// case 'v': -//mdk-stage1// verbose = 1; break; -//mdk-stage1// case 'm': -//mdk-stage1// module = 1; break; -//mdk-stage1// default: -//mdk-stage1// errflg = 1; break; -//mdk-stage1// } -//mdk-stage1// } -//mdk-stage1// if (errflg || (optind < argc)) { -//mdk-stage1// fprintf(stderr, "usage: %s [-t tcic_base] [-v] [-m]\n", argv[0]); -//mdk-stage1// exit(EXIT_FAILURE); -//mdk-stage1// } -//mdk-stage1// -//mdk-stage1// #ifdef CONFIG_PCI -//mdk-stage1// if (pci_probe(verbose, module) == 0) -//mdk-stage1// exit(EXIT_SUCCESS); -//mdk-stage1// #endif -//mdk-stage1// #ifdef CONFIG_ISA -//mdk-stage1// if (i365_probe(verbose, module) == 0) -//mdk-stage1// exit(EXIT_SUCCESS); -//mdk-stage1// else if (tcic_probe(verbose, module, tcic_base) == 0) -//mdk-stage1// exit(EXIT_SUCCESS); -//mdk-stage1// #endif -//mdk-stage1// exit(EXIT_FAILURE); -//mdk-stage1// return 0; -//mdk-stage1// } - char * pcmcia_probe(void) { - if (!pci_probe()) - return driver; + if (!pci_probe()) + return driver; #if !defined(__x86_64__) - else if (!i365_probe()) - return "pd6729"; - else if (!tcic_probe()) - return "tcic"; + else if (!i365_probe()) + return "pd6729"; + else if (!tcic_probe()) + return "tcic"; #endif - else - return NULL; + else + return NULL; } diff --git a/mdk-stage1/pcmcia/startup.c b/mdk-stage1/pcmcia/startup.c index 4112a439c..e9004484a 100644 --- a/mdk-stage1/pcmcia/startup.c +++ b/mdk-stage1/pcmcia/startup.c @@ -1,7 +1,7 @@ /* * Startup tool for non statically mapped PCMCIA sockets * - * (C) 2005 Dominik Brodowski + * (C) 2005 Dominik Brodowski * * The initial developer of the original code is David A. Hinds * . Portions created by David A. Hinds @@ -42,149 +42,149 @@ enum { static const char *resource_files[MAX_RESOURCE_FILES] = { - [RESOURCE_MEM] = "available_resources_mem", - [RESOURCE_IO] = "available_resources_io", + [RESOURCE_MEM] = "available_resources_mem", + [RESOURCE_IO] = "available_resources_io", }; #define PATH_TO_SOCKET "/sys/class/pcmcia_socket/" static int add_available_resource(unsigned int socket_no, unsigned int type, - unsigned int action, - unsigned long start, unsigned long end) + unsigned int action, + unsigned long start, unsigned long end) { - char file[SYSFS_PATH_MAX]; - char content[SYSFS_PATH_MAX]; - struct sysfs_attribute *attr; - int ret; - size_t len; + char file[SYSFS_PATH_MAX]; + char content[SYSFS_PATH_MAX]; + struct sysfs_attribute *attr; + int ret; + size_t len; - if (type >= MAX_RESOURCE_FILES) - return -EINVAL; + if (type >= MAX_RESOURCE_FILES) + return -EINVAL; - if (end <= start) - return -EINVAL; + if (end <= start) + return -EINVAL; - dprintf("%d %d %d 0x%lx 0x%lx\n", socket_no, type, action, start, end); + dprintf("%d %d %d 0x%lx 0x%lx\n", socket_no, type, action, start, end); - snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET "pcmcia_socket%u/%s", - socket_no, resource_files[type]); + snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET "pcmcia_socket%u/%s", + socket_no, resource_files[type]); - switch(action) { - case ADD_MANAGED_RESOURCE: - len = snprintf(content, SYSFS_PATH_MAX, - "0x%08lx - 0x%08lx", start, end); - break; + switch(action) { + case ADD_MANAGED_RESOURCE: + len = snprintf(content, SYSFS_PATH_MAX, + "0x%08lx - 0x%08lx", start, end); + break; - case REMOVE_MANAGED_RESOURCE: - len = snprintf(content, SYSFS_PATH_MAX, - "- 0x%08lx - 0x%08lx", start, end); - break; + case REMOVE_MANAGED_RESOURCE: + len = snprintf(content, SYSFS_PATH_MAX, + "- 0x%08lx - 0x%08lx", start, end); + break; - default: - return -EINVAL; - } + default: + return -EINVAL; + } - dprintf("content is %s\n", content); + dprintf("content is %s\n", content); - dprintf("file is %s\n", file); + dprintf("file is %s\n", file); - attr = sysfs_open_attribute(file); - if (!attr) - return -ENODEV; + attr = sysfs_open_attribute(file); + if (!attr) + return -ENODEV; - dprintf("open, len %d\n", len); + dprintf("open, len %d\n", len); - ret = sysfs_write_attribute(attr, content, len); + ret = sysfs_write_attribute(attr, content, len); - dprintf("ret is %d\n", ret); + dprintf("ret is %d\n", ret); - sysfs_close_attribute(attr); + sysfs_close_attribute(attr); - return (ret); + return (ret); } static int setup_done(unsigned int socket_no) { - int ret; - char file[SYSFS_PATH_MAX]; - struct sysfs_attribute *attr; + int ret; + char file[SYSFS_PATH_MAX]; + struct sysfs_attribute *attr; - snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET - "pcmcia_socket%u/available_resources_setup_done", - socket_no); + snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET + "pcmcia_socket%u/available_resources_setup_done", + socket_no); - attr = sysfs_open_attribute(file); - if (!attr) - return -ENODEV; + attr = sysfs_open_attribute(file); + if (!attr) + return -ENODEV; - ret = sysfs_write_attribute(attr, "42", 2); + ret = sysfs_write_attribute(attr, "42", 2); - sysfs_close_attribute(attr); + sysfs_close_attribute(attr); - return (ret); + return (ret); } static int disallow_irq(unsigned int socket_no, unsigned int irq) { - char file[SYSFS_PATH_MAX]; - char content[SYSFS_PATH_MAX]; - struct sysfs_attribute *attr; - unsigned int mask = 0xfff; - unsigned int new_mask; - int ret; - size_t len; - - if (irq >= 32) - return -EINVAL; - - len = snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET - "pcmcia_socket%u/card_irq_mask", - socket_no); - dprintf("file is %s\n", file); - - attr = sysfs_open_attribute(file); - if (!attr) - return -ENODEV; - - dprintf("open, len %d\n", len); - - ret = sysfs_read_attribute(attr); - if (ret) { - ret = -EINVAL; - goto out; - } + char file[SYSFS_PATH_MAX]; + char content[SYSFS_PATH_MAX]; + struct sysfs_attribute *attr; + unsigned int mask = 0xfff; + unsigned int new_mask; + int ret; + size_t len; - if (!attr->value || (attr->len < 6)) { - ret = -EIO; - goto out; - } + if (irq >= 32) + return -EINVAL; + + len = snprintf(file, SYSFS_PATH_MAX, PATH_TO_SOCKET + "pcmcia_socket%u/card_irq_mask", + socket_no); + dprintf("file is %s\n", file); + + attr = sysfs_open_attribute(file); + if (!attr) + return -ENODEV; + + dprintf("open, len %d\n", len); + + ret = sysfs_read_attribute(attr); + if (ret) { + ret = -EINVAL; + goto out; + } - ret = sscanf(attr->value, "0x%x\n", &mask); + if (!attr->value || (attr->len < 6)) { + ret = -EIO; + goto out; + } - new_mask = 1 << irq; + ret = sscanf(attr->value, "0x%x\n", &mask); - mask &= ~new_mask; + new_mask = 1 << irq; - len = snprintf(content, SYSFS_PATH_MAX, "0x%04x", mask); + mask &= ~new_mask; - dprintf("content is %s\n", content); + len = snprintf(content, SYSFS_PATH_MAX, "0x%04x", mask); - ret = sysfs_write_attribute(attr, content, len); + dprintf("content is %s\n", content); + + ret = sysfs_write_attribute(attr, content, len); out: - sysfs_close_attribute(attr); + sysfs_close_attribute(attr); - return (ret); + return (ret); } static void load_config(void) { if (chdir(configpath) != 0) { - syslog(LOG_ERR, "chdir to %s failed: %m", configpath); - exit(EXIT_FAILURE); + syslog(LOG_ERR, "chdir to %s failed: %m", configpath); + exit(EXIT_FAILURE); } parse_configfile("config.opts"); return; @@ -196,76 +196,76 @@ static void adjust_resources(unsigned int socket_no) adjust_list_t *al; for (al = root_adjust; al; al = al->next) { - switch (al->adj.Resource) { - case RES_MEMORY_RANGE: - add_available_resource(socket_no, RESOURCE_MEM, - al->adj.Action, - al->adj.resource.memory.Base, - al->adj.resource.memory.Base + - al->adj.resource.memory.Size - 1); - break; - case RES_IO_RANGE: - add_available_resource(socket_no, RESOURCE_IO, - al->adj.Action, - al->adj.resource.io.BasePort, - al->adj.resource.io.BasePort + - al->adj.resource.io.NumPorts - 1); - break; - case RES_IRQ: - if(al->adj.Action == REMOVE_MANAGED_RESOURCE) - disallow_irq(socket_no, al->adj.resource.irq.IRQ); - break; - } + switch (al->adj.Resource) { + case RES_MEMORY_RANGE: + add_available_resource(socket_no, RESOURCE_MEM, + al->adj.Action, + al->adj.resource.memory.Base, + al->adj.resource.memory.Base + + al->adj.resource.memory.Size - 1); + break; + case RES_IO_RANGE: + add_available_resource(socket_no, RESOURCE_IO, + al->adj.Action, + al->adj.resource.io.BasePort, + al->adj.resource.io.BasePort + + al->adj.resource.io.NumPorts - 1); + break; + case RES_IRQ: + if(al->adj.Action == REMOVE_MANAGED_RESOURCE) + disallow_irq(socket_no, al->adj.resource.irq.IRQ); + break; + } } } /* mdk-stage1 int main(int argc, char *argv[]) { - char *socket_no; - unsigned long socket, i; - unsigned int all_sockets = 0; - - - if ((socket_no = getenv("SOCKET_NO"))) { - socket = strtoul(socket_no, NULL, 0); - } else if (argc == 2) { - socket = strtoul(argv[1], NULL, 0); - } else if (argc == 1) { - socket = 0; - all_sockets = 1; - } else { - return -EINVAL; - } + char *socket_no; + unsigned long socket, i; + unsigned int all_sockets = 0; - load_config(); - for (i = 0; i < MAX_SOCKS; i++) { - if ((socket != i) && (!all_sockets)) - continue; + if ((socket_no = getenv("SOCKET_NO"))) { + socket = strtoul(socket_no, NULL, 0); + } else if (argc == 2) { + socket = strtoul(argv[1], NULL, 0); + } else if (argc == 1) { + socket = 0; + all_sockets = 1; + } else { + return -EINVAL; + } - adjust_resources(i); - setup_done(i); - } + load_config(); - return 0; + for (i = 0; i < MAX_SOCKS; i++) { + if ((socket != i) && (!all_sockets)) + continue; + + adjust_resources(i); + setup_done(i); + } + + return 0; } */ void pcmcia_socket_startup(int socket_no) { - unsigned long i; - unsigned int all_sockets = 0; + unsigned long i; + unsigned int all_sockets = 0; if (socket_no == -1) - all_sockets = 1; + all_sockets = 1; - load_config(); + load_config(); - for (i = 0; i < MAX_SOCKS; i++) { - if ((socket_no != i) && (!all_sockets)) - continue; + for (i = 0; i < MAX_SOCKS; i++) { + if ((socket_no != i) && (!all_sockets)) + continue; - adjust_resources(i); - setup_done(i); - } + adjust_resources(i); + setup_done(i); + } } -- cgit v1.2.1