mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-02 16:23:46 +09:00
ppc4xx: Some more PMC405 coding-style cleanup
Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
2f6eb9170b
commit
f50fe4bd61
@ -72,21 +72,21 @@ int board_early_init_f (void)
|
|||||||
/*
|
/*
|
||||||
* Setup GPIO pins
|
* Setup GPIO pins
|
||||||
*/
|
*/
|
||||||
mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_FPGA_INIT | \
|
mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_FPGA_INIT |
|
||||||
CONFIG_SYS_FPGA_DONE | \
|
CONFIG_SYS_FPGA_DONE |
|
||||||
CONFIG_SYS_XEREADY | \
|
CONFIG_SYS_XEREADY |
|
||||||
CONFIG_SYS_NONMONARCH | \
|
CONFIG_SYS_NONMONARCH |
|
||||||
CONFIG_SYS_REV1_2) << 5));
|
CONFIG_SYS_REV1_2) << 5));
|
||||||
|
|
||||||
if (!(in_be32((void *)GPIO0_IR) & CONFIG_SYS_REV1_2)) {
|
if (!(in_be32((void *)GPIO0_IR) & CONFIG_SYS_REV1_2)) {
|
||||||
/* rev 1.2 boards */
|
/* rev 1.2 boards */
|
||||||
mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_INTA_FAKE | \
|
mtdcr(cntrl0, mfdcr(cntrl0) | ((CONFIG_SYS_INTA_FAKE |
|
||||||
CONFIG_SYS_SELF_RST) << 5));
|
CONFIG_SYS_SELF_RST) << 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
out_be32((void *)GPIO0_OR, CONFIG_SYS_VPEN);
|
out_be32((void *)GPIO0_OR, CONFIG_SYS_VPEN);
|
||||||
/* setup for output */
|
/* setup for output */
|
||||||
out_be32((void*)GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK | \
|
out_be32((void *)GPIO0_TCR, CONFIG_SYS_FPGA_PRG | CONFIG_SYS_FPGA_CLK |
|
||||||
CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY | CONFIG_SYS_VPEN);
|
CONFIG_SYS_FPGA_DATA | CONFIG_SYS_XEREADY | CONFIG_SYS_VPEN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -112,6 +112,7 @@ int misc_init_r (void)
|
|||||||
ushort pmc405_pci_subsys_deviceid(void)
|
ushort pmc405_pci_subsys_deviceid(void)
|
||||||
{
|
{
|
||||||
ulong val;
|
ulong val;
|
||||||
|
|
||||||
val = in_be32((void *)GPIO0_IR);
|
val = in_be32((void *)GPIO0_IR);
|
||||||
if (!(val & CONFIG_SYS_REV1_2)) { /* low=rev1.2 */
|
if (!(val & CONFIG_SYS_REV1_2)) { /* low=rev1.2 */
|
||||||
/* check monarch# signal */
|
/* check monarch# signal */
|
||||||
@ -128,7 +129,6 @@ ushort pmc405_pci_subsys_deviceid(void)
|
|||||||
int checkboard (void)
|
int checkboard (void)
|
||||||
{
|
{
|
||||||
ulong val;
|
ulong val;
|
||||||
|
|
||||||
char str[64];
|
char str[64];
|
||||||
int i = getenv_r("serial#", str, sizeof(str));
|
int i = getenv_r("serial#", str, sizeof(str));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user