projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move coloured led API to status_led.h
[oweals/u-boot.git]
/
drivers
/
tqm8xx_pcmcia.c
diff --git
a/drivers/tqm8xx_pcmcia.c
b/drivers/tqm8xx_pcmcia.c
index 8d4a85c21f7679b69e173fa963c0421b8b4fabfd..132c7a5169b649e59a255b5265a34e4f0eff345d 100644
(file)
--- a/
drivers/tqm8xx_pcmcia.c
+++ b/
drivers/tqm8xx_pcmcia.c
@@
-3,16
+3,18
@@
/* SC8xx Boards by SinoVee Microsystems */
/* -------------------------------------------------------------------- */
#include <common.h>
/* SC8xx Boards by SinoVee Microsystems */
/* -------------------------------------------------------------------- */
#include <common.h>
+#ifdef CONFIG_8xx
#include <mpc8xx.h>
#include <mpc8xx.h>
+#endif
#include <pcmcia.h>
#undef CONFIG_PCMCIA
#include <pcmcia.h>
#undef CONFIG_PCMCIA
-#if
(CONFIG_COMMANDS & CF
G_CMD_PCMCIA)
+#if
defined(CONFI
G_CMD_PCMCIA)
#define CONFIG_PCMCIA
#endif
#define CONFIG_PCMCIA
#endif
-#if
(CONFIG_COMMANDS & CF
G_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
+#if
defined(CONFI
G_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
#define CONFIG_PCMCIA
#endif
#define CONFIG_PCMCIA
#endif
@@
-191,7
+193,7
@@
int pcmcia_hardware_enable(int slot)
udelay(10000);
debug ("[%d] %s: PIPR(%p)=0x%x\n", __LINE__,__FUNCTION__,
&(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
udelay(10000);
debug ("[%d] %s: PIPR(%p)=0x%x\n", __LINE__,__FUNCTION__,
&(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-
+
if (check_card_is_absent(slot)) {
printf (" No Card found\n");
return (1);
if (check_card_is_absent(slot)) {
printf (" No Card found\n");
return (1);
@@
-206,7
+208,7
@@
int pcmcia_hardware_enable(int slot)
reg,
(reg&PCMCIA_VS1(slot))?"n":"ff",
(reg&PCMCIA_VS2(slot))?"n":"ff");
reg,
(reg&PCMCIA_VS1(slot))?"n":"ff",
(reg&PCMCIA_VS2(slot))?"n":"ff");
-
+
if ((reg & mask) == mask) {
power_on_5_0(slot);
puts (" 5.0V card found: ");
if ((reg & mask) == mask) {
power_on_5_0(slot);
puts (" 5.0V card found: ");
@@
-228,7
+230,7
@@
int pcmcia_hardware_enable(int slot)
reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
reg &= ~NSCU_GCRX_CXOE;
reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
reg &= ~NSCU_GCRX_CXOE;
-
+
PCMCIA_PGCRX(slot) = reg;
udelay(250000); /* some cards need >150 ms to come up :-( */
PCMCIA_PGCRX(slot) = reg;
udelay(250000); /* some cards need >150 ms to come up :-( */
@@
-239,11
+241,9
@@
int pcmcia_hardware_enable(int slot)
}
}
-#if
(CONFIG_COMMANDS & CF
G_CMD_PCMCIA)
+#if
defined(CONFI
G_CMD_PCMCIA)
int pcmcia_hardware_disable(int slot)
{
int pcmcia_hardware_disable(int slot)
{
- volatile pcmconf8xx_t *pcmp =
- (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
u_long reg;
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
u_long reg;
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
@@
-263,14
+263,16
@@
int pcmcia_hardware_disable(int slot)
return (0);
}
return (0);
}
-#endif
/* CFG_CMD_PCMCIA */
+#endif
int pcmcia_voltage_set(int slot, int vcc, int vpp)
{
#ifndef CONFIG_NSCU
int pcmcia_voltage_set(int slot, int vcc, int vpp)
{
#ifndef CONFIG_NSCU
+ u_long reg;
+# ifdef DEBUG
volatile pcmconf8xx_t *pcmp =
(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
volatile pcmconf8xx_t *pcmp =
(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
- u_long reg;
+# endif
debug ("voltage_set: " PCMCIA_BOARD_MSG
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
debug ("voltage_set: " PCMCIA_BOARD_MSG
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
@@
-285,7
+287,7
@@
int pcmcia_voltage_set(int slot, int vcc, int vpp)
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
reg |= NSCU_GCRX_CXOE; /* active low */
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
reg |= NSCU_GCRX_CXOE; /* active low */
-
+
PCMCIA_PGCRX(slot) = reg;
udelay(500);
PCMCIA_PGCRX(slot) = reg;
udelay(500);