X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fpcmcia%2Fti_pci1410a.c;h=d83db3f022ece851511610b781fa99bb9d7203f8;hb=d09ec7f81650425140776995fc9752189ddf7956;hp=c876d0c402556126d2953af71f30ac35b297be51;hpb=794a5924972fc8073616e98a2668da4a5f9aea90;p=oweals%2Fu-boot.git diff --git a/drivers/pcmcia/ti_pci1410a.c b/drivers/pcmcia/ti_pci1410a.c index c876d0c402..d83db3f022 100644 --- a/drivers/pcmcia/ti_pci1410a.c +++ b/drivers/pcmcia/ti_pci1410a.c @@ -2,25 +2,9 @@ * (C) Copyright 2000-2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * (C) Copyright 2002 - * Daniel Engström, Omicron Ceti AB + * Daniel Engström, Omicron Ceti AB * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ * ******************************************************************** * @@ -68,13 +52,12 @@ int pcmcia_on(int ide_base_bus); -static int pcmcia_off(void); static int hardware_disable(int slot); static int hardware_enable(int slot); static int voltage_set(int slot, int vcc, int vpp); static void print_funcid(int func); -static void print_fixed(volatile uchar *p); -static int identify(volatile uchar *p); +static void print_fixed(volatile char *p); +static int identify(volatile char *p); static int check_ide_device(int slot, int ide_base_bus); @@ -86,33 +69,6 @@ const char *indent = "\t "; /* ------------------------------------------------------------------------- */ -int do_pinit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -{ -#ifndef CFG_FIRST_PCMCIA_BUS -# define CFG_FIRST_PCMCIA_BUS 0 -#endif - - int rcode = 0; - - if (argc != 2) { - printf ("Usage: pinit {on | off}\n"); - return 1; - } - if (strcmp(argv[1],"on") == 0) { - rcode = pcmcia_on(CFG_FIRST_PCMCIA_BUS); - } else if (strcmp(argv[1],"off") == 0) { - rcode = pcmcia_off(); - } else { - printf ("Usage: pinit {on | off}\n"); - return 1; - } - - return rcode; -} - -/* ------------------------------------------------------------------------- */ - - static struct pci_device_id supported[] = { { PCI_VENDOR_ID_TI, 0xac50 }, /* Ti PCI1410A */ { PCI_VENDOR_ID_TI, 0xac56 }, /* Ti PCI1510 */ @@ -148,11 +104,11 @@ int pcmcia_on(int ide_base_bus) debug("Enable PCMCIA Ti PCI1410A\n"); } - pcmcia_cis_ptr = CFG_PCMCIA_CIS_WIN; - cis_len = CFG_PCMCIA_CIS_WIN_SIZE; + pcmcia_cis_ptr = CONFIG_SYS_PCMCIA_CIS_WIN; + cis_len = CONFIG_SYS_PCMCIA_CIS_WIN_SIZE; - io_base = CFG_PCMCIA_IO_WIN; - io_len = CFG_PCMCIA_IO_WIN_SIZE; + io_base = CONFIG_SYS_PCMCIA_IO_WIN; + io_len = CONFIG_SYS_PCMCIA_IO_WIN_SIZE; /* * Setup the PCI device. @@ -245,7 +201,8 @@ int pcmcia_on(int ide_base_bus) /* ------------------------------------------------------------------------- */ -static int pcmcia_off (void) +#if defined(CONFIG_CMD_PCMCIA) +int pcmcia_off (void) { int slot = 0; @@ -285,6 +242,7 @@ static int pcmcia_off (void) return 0; } +#endif /* ------------------------------------------------------------------------- */ @@ -294,9 +252,9 @@ static int pcmcia_off (void) int ide_devices_found; static int check_ide_device(int slot, int ide_base_bus) { - volatile uchar *ident = NULL; - volatile uchar *feature_p[MAX_FEATURES]; - volatile uchar *p, *start; + volatile char *ident = NULL; + volatile char *feature_p[MAX_FEATURES]; + volatile char *p, *start; int n_features = 0; uchar func_id = ~0; uchar code, len; @@ -314,7 +272,7 @@ static int check_ide_device(int slot, int ide_base_bus) return 1; } - start = p = (volatile uchar *) pcmcia_cis_ptr; + start = p = (volatile char *) pcmcia_cis_ptr; while ((p - start) < MAX_TUPEL_SZ) { @@ -417,7 +375,7 @@ static int voltage_set(int slot, int vcc, int vpp) socket_control |= 0x30; break; case 0: - default: + default: ; } switch (vpp) { @@ -431,7 +389,7 @@ static int voltage_set(int slot, int vcc, int vpp) socket_control |= 0x3; break; case 0: - default: + default: ; } writel(socket_control, reg); @@ -537,7 +495,7 @@ static void print_funcid(int func) /* ------------------------------------------------------------------------- */ -static void print_fixed(volatile uchar *p) +static void print_fixed(volatile char *p) { if (p == NULL) return; @@ -605,17 +563,17 @@ static void print_fixed(volatile uchar *p) #define MAX_IDENT_CHARS 64 #define MAX_IDENT_FIELDS 4 -static uchar *known_cards[] = { +static char *known_cards[] = { "ARGOSY PnPIDE D5", NULL }; -static int identify(volatile uchar *p) +static int identify(volatile char *p) { - uchar id_str[MAX_IDENT_CHARS]; - uchar data; - uchar *t; - uchar **card; + char id_str[MAX_IDENT_CHARS]; + char data; + char *t; + char **card; int i, done; if (p == NULL)