Misc ti_pci1410a fixups

Removed do_pinit() - now declared in cmd_pcmcia.c

Added #define CONFIG_CMD_PCMCIA around pcmcia_off() in line with other
PCMCIA drivers

signed/unsigned type fixups

Added semi-colon after default: label as required by newer gcc

The only board that appears to use this driver is the sc520_spunk which
is very old and very likely very broken anyway. I do not have one to test
whether this patch breaks anything functionaly, I have can only check
that it compiles without warning or error

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
This commit is contained in:
Graeme Russ 2009-08-23 12:59:52 +10:00 committed by Wolfgang Denk
parent 31b9ab33d9
commit a92510e7fa

View File

@ -68,13 +68,12 @@
int pcmcia_on(int ide_base_bus); int pcmcia_on(int ide_base_bus);
static int pcmcia_off(void);
static int hardware_disable(int slot); static int hardware_disable(int slot);
static int hardware_enable(int slot); static int hardware_enable(int slot);
static int voltage_set(int slot, int vcc, int vpp); static int voltage_set(int slot, int vcc, int vpp);
static void print_funcid(int func); static void print_funcid(int func);
static void print_fixed(volatile uchar *p); static void print_fixed(volatile char *p);
static int identify(volatile uchar *p); static int identify(volatile char *p);
static int check_ide_device(int slot, int ide_base_bus); static int check_ide_device(int slot, int ide_base_bus);
@ -86,33 +85,6 @@ const char *indent = "\t ";
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
int do_pinit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
#ifndef CONFIG_SYS_FIRST_PCMCIA_BUS
# define CONFIG_SYS_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(CONFIG_SYS_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[] = { static struct pci_device_id supported[] = {
{ PCI_VENDOR_ID_TI, 0xac50 }, /* Ti PCI1410A */ { PCI_VENDOR_ID_TI, 0xac50 }, /* Ti PCI1410A */
{ PCI_VENDOR_ID_TI, 0xac56 }, /* Ti PCI1510 */ { PCI_VENDOR_ID_TI, 0xac56 }, /* Ti PCI1510 */
@ -245,7 +217,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; int slot = 0;
@ -285,6 +258,7 @@ static int pcmcia_off (void)
return 0; return 0;
} }
#endif
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
@ -294,9 +268,9 @@ static int pcmcia_off (void)
int ide_devices_found; int ide_devices_found;
static int check_ide_device(int slot, int ide_base_bus) static int check_ide_device(int slot, int ide_base_bus)
{ {
volatile uchar *ident = NULL; volatile char *ident = NULL;
volatile uchar *feature_p[MAX_FEATURES]; volatile char *feature_p[MAX_FEATURES];
volatile uchar *p, *start; volatile char *p, *start;
int n_features = 0; int n_features = 0;
uchar func_id = ~0; uchar func_id = ~0;
uchar code, len; uchar code, len;
@ -314,7 +288,7 @@ static int check_ide_device(int slot, int ide_base_bus)
return 1; return 1;
} }
start = p = (volatile uchar *) pcmcia_cis_ptr; start = p = (volatile char *) pcmcia_cis_ptr;
while ((p - start) < MAX_TUPEL_SZ) { while ((p - start) < MAX_TUPEL_SZ) {
@ -417,7 +391,7 @@ static int voltage_set(int slot, int vcc, int vpp)
socket_control |= 0x30; socket_control |= 0x30;
break; break;
case 0: case 0:
default: default: ;
} }
switch (vpp) { switch (vpp) {
@ -431,7 +405,7 @@ static int voltage_set(int slot, int vcc, int vpp)
socket_control |= 0x3; socket_control |= 0x3;
break; break;
case 0: case 0:
default: default: ;
} }
writel(socket_control, reg); writel(socket_control, reg);
@ -537,7 +511,7 @@ static void print_funcid(int func)
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static void print_fixed(volatile uchar *p) static void print_fixed(volatile char *p)
{ {
if (p == NULL) if (p == NULL)
return; return;
@ -605,17 +579,17 @@ static void print_fixed(volatile uchar *p)
#define MAX_IDENT_CHARS 64 #define MAX_IDENT_CHARS 64
#define MAX_IDENT_FIELDS 4 #define MAX_IDENT_FIELDS 4
static uchar *known_cards[] = { static char *known_cards[] = {
"ARGOSY PnPIDE D5", "ARGOSY PnPIDE D5",
NULL NULL
}; };
static int identify(volatile uchar *p) static int identify(volatile char *p)
{ {
uchar id_str[MAX_IDENT_CHARS]; char id_str[MAX_IDENT_CHARS];
uchar data; char data;
uchar *t; char *t;
uchar **card; char **card;
int i, done; int i, done;
if (p == NULL) if (p == NULL)