mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-15 14:43:49 +09:00
![Masahiro Yamada](/assets/img/avatar_default.png)
Enough time has passed since these boards were moved to Orphan. Remove. - Remove include/configs/{ADS860.h,FADS823.h,FADS850SAR.h,FADS860T.h} - Cleanup defined(CONFIG_ADS), defined(CONFIG_MPC823FADS), defined(CONFIG_MPC850SAR), defined(CONFIG_SYS_DAUGHTERBOARD) - Remove the entries from boards.cfg Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
72 lines
1.2 KiB
C
72 lines
1.2 KiB
C
#include <common.h>
|
|
#include <mpc8xx.h>
|
|
#include <pcmcia.h>
|
|
|
|
#undef CONFIG_PCMCIA
|
|
|
|
#if defined(CONFIG_CMD_PCMCIA)
|
|
#define CONFIG_PCMCIA
|
|
#endif
|
|
|
|
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
|
|
#define CONFIG_PCMCIA
|
|
#endif
|
|
|
|
#ifdef CONFIG_PCMCIA
|
|
|
|
#define PCMCIA_BOARD_MSG "FADS"
|
|
|
|
int pcmcia_voltage_set(int slot, int vcc, int vpp)
|
|
{
|
|
u_long reg = 0;
|
|
|
|
switch(vpp) {
|
|
case 0: reg = 0; break;
|
|
case 50: reg = 1; break;
|
|
case 120: reg = 2; break;
|
|
default: return 1;
|
|
}
|
|
|
|
switch(vcc) {
|
|
case 0: reg = 0; break;
|
|
#ifdef CONFIG_FADS
|
|
case 33: reg = BCSR1_PCCVCC0 | BCSR1_PCCVCC1; break;
|
|
case 50: reg = BCSR1_PCCVCC1; break;
|
|
#endif
|
|
default: return 1;
|
|
}
|
|
|
|
/* first, turn off all power */
|
|
|
|
#ifdef CONFIG_FADS
|
|
*((uint *)BCSR1) &= ~(BCSR1_PCCVCC0 | BCSR1_PCCVCC1);
|
|
#endif
|
|
*((uint *)BCSR1) &= ~BCSR1_PCCVPP_MASK;
|
|
|
|
/* enable new powersettings */
|
|
|
|
#ifdef CONFIG_FADS
|
|
*((uint *)BCSR1) |= reg;
|
|
#endif
|
|
|
|
*((uint *)BCSR1) |= reg << 20;
|
|
|
|
return 0;
|
|
}
|
|
|
|
int pcmcia_hardware_enable(int slot)
|
|
{
|
|
*((uint *)BCSR1) &= ~BCSR1_PCCEN;
|
|
return 0;
|
|
}
|
|
|
|
#if defined(CONFIG_CMD_PCMCIA)
|
|
int pcmcia_hardware_disable(int slot)
|
|
{
|
|
*((uint *)BCSR1) &= ~BCSR1_PCCEN;
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#endif /* CONFIG_PCMCIA */
|