projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc/85xx: Rework TQM boards pci_init_board to use common FSL PCIe code
[oweals/u-boot.git]
/
board
/
lwmon
/
pcmcia.c
diff --git
a/board/lwmon/pcmcia.c
b/board/lwmon/pcmcia.c
index 2349286bb252472e12be50e5ecfa734c7db4fca4..ad2e60d590fe72b3657028e726f3678d7ced5806 100644
(file)
--- a/
board/lwmon/pcmcia.c
+++ b/
board/lwmon/pcmcia.c
@@
-5,11
+5,11
@@
#undef CONFIG_PCMCIA
#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
@@
-51,10
+51,10
@@
int pcmcia_hardware_enable(int slot)
#endif
udelay(10000);
#endif
udelay(10000);
- immap = (immap_t *)C
FG
_IMMR;
- sysp = (sysconf8xx_t *)(&(((immap_t *)C
FG
_IMMR)->im_siu_conf));
- pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
FG
_IMMR)->im_pcmcia));
- cp = (cpm8xx_t *)(&(((immap_t *)C
FG
_IMMR)->im_cpm));
+ immap = (immap_t *)C
ONFIG_SYS
_IMMR;
+ sysp = (sysconf8xx_t *)(&(((immap_t *)C
ONFIG_SYS
_IMMR)->im_siu_conf));
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
ONFIG_SYS
_IMMR)->im_pcmcia));
+ cp = (cpm8xx_t *)(&(((immap_t *)C
ONFIG_SYS
_IMMR)->im_cpm));
/*
* Configure SIUMCR to enable PCMCIA port B
/*
* Configure SIUMCR to enable PCMCIA port B
@@
-108,8
+108,8
@@
int pcmcia_hardware_enable(int slot)
/* switch VCC on */
val |= MAX1604_OP_SUS | MAX1604_VCCBON;
/* switch VCC on */
val |= MAX1604_OP_SUS | MAX1604_VCCBON;
- i2c_init (C
FG_I2C_SPEED, CFG
_I2C_SLAVE);
- i2c_write (C
FG
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
+ i2c_init (C
ONFIG_SYS_I2C_SPEED, CONFIG_SYS
_I2C_SLAVE);
+ i2c_write (C
ONFIG_SYS
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
udelay(500000);
udelay(500000);
@@
-127,7
+127,7
@@
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)
{
volatile immap_t *immap;
int pcmcia_hardware_disable(int slot)
{
volatile immap_t *immap;
@@
-137,13
+137,13
@@
int pcmcia_hardware_disable(int slot)
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
- immap = (immap_t *)C
FG
_IMMR;
- pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
FG
_IMMR)->im_pcmcia));
+ immap = (immap_t *)C
ONFIG_SYS
_IMMR;
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
ONFIG_SYS
_IMMR)->im_pcmcia));
/* remove all power, put output in high impedance state */
val = MAX1604_VCCBHIZ | MAX1604_VPPBHIZ;
/* remove all power, put output in high impedance state */
val = MAX1604_VCCBHIZ | MAX1604_VPPBHIZ;
- i2c_init (C
FG_I2C_SPEED, CFG
_I2C_SLAVE);
- i2c_write (C
FG
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
+ i2c_init (C
ONFIG_SYS_I2C_SPEED, CONFIG_SYS
_I2C_SLAVE);
+ i2c_write (C
ONFIG_SYS
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
/* Configure PCMCIA General Control Register */
debug ("Disable PCMCIA buffers and assert RESET\n");
/* Configure PCMCIA General Control Register */
debug ("Disable PCMCIA buffers and assert RESET\n");
@@
-166,7
+166,7
@@
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)
int pcmcia_voltage_set(int slot, int vcc, int vpp)
@@
-181,8
+181,8
@@
int pcmcia_voltage_set(int slot, int vcc, int vpp)
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
- immap = (immap_t *)C
FG
_IMMR;
- pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
FG
_IMMR)->im_pcmcia));
+ immap = (immap_t *)C
ONFIG_SYS
_IMMR;
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)C
ONFIG_SYS
_IMMR)->im_pcmcia));
/*
* Disable PCMCIA buffers (isolate the interface)
* and assert RESET signal
/*
* Disable PCMCIA buffers (isolate the interface)
* and assert RESET signal
@@
-199,15
+199,15
@@
int pcmcia_voltage_set(int slot, int vcc, int vpp)
*/
debug ("PCMCIA power OFF\n");
val = MAX1604_VCCBHIZ | MAX1604_VPPBHIZ;
*/
debug ("PCMCIA power OFF\n");
val = MAX1604_VCCBHIZ | MAX1604_VPPBHIZ;
- i2c_init (C
FG_I2C_SPEED, CFG
_I2C_SLAVE);
- i2c_write (C
FG
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
+ i2c_init (C
ONFIG_SYS_I2C_SPEED, CONFIG_SYS
_I2C_SLAVE);
+ i2c_write (C
ONFIG_SYS
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
val = 0;
switch(vcc) {
val = 0;
switch(vcc) {
- case 0: break;
+ case 0: break;
case 33: val = MAX1604_VCC_35; break;
case 33: val = MAX1604_VCC_35; break;
- case 50: break;
- default: goto done;
+ case 50: break;
+ default: goto done;
}
/* Checking supported voltages */
}
/* Checking supported voltages */
@@
-216,7
+216,7
@@
int pcmcia_voltage_set(int slot, int vcc, int vpp)
pcmp->pcmc_pipr,
(pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
pcmp->pcmc_pipr,
(pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
- i2c_write (C
FG
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
+ i2c_write (C
ONFIG_SYS
_I2C_POWER_A_ADDR, 0, 0, &val, 1);
if (val) {
debug ("PCMCIA powered at %sV\n",
(val & MAX1604_VCC_35) ? "3.3" : "5.0");
if (val) {
debug ("PCMCIA powered at %sV\n",
(val & MAX1604_VCC_35) ? "3.3" : "5.0");