mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
mpc85xx: use LCRR_DBYP define instead of raw constant
Using the raw value of 0x80000000 directly in the code can lead to "count the zeros" bugs like that fixed in commit 718e9d13b98 ("MPC85xxCDS: Fix missing LCRR_DBYP bits for 66-133MHz LBC") Change all existing raw values to use the symbolic value of LCRR_DBYP instead. Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
This commit is contained in:
parent
ae6beb24d7
commit
a2af6a7a84
4 changed files with 12 additions and 12 deletions
|
@ -87,10 +87,10 @@ local_bus_init(void)
|
|||
lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
|
||||
|
||||
if (lbc_hz < 66) {
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR | 0x80000000; /* DLL Bypass */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR | LCRR_DBYP; /* DLL Bypass */
|
||||
|
||||
} else if (lbc_hz >= 133) {
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~LCRR_DBYP); /* DLL Enabled */
|
||||
|
||||
} else {
|
||||
/*
|
||||
|
@ -105,7 +105,7 @@ local_bus_init(void)
|
|||
lbc->lcrr = 0x10000004;
|
||||
}
|
||||
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~LCRR_DBYP); /* DLL Enabled */
|
||||
udelay(200);
|
||||
|
||||
/*
|
||||
|
|
|
@ -269,13 +269,13 @@ local_bus_init(void)
|
|||
lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
|
||||
|
||||
if (lbc_hz < 66) {
|
||||
lbc->lcrr |= 0x80000000; /* DLL Bypass */
|
||||
lbc->lcrr |= LCRR_DBYP; /* DLL Bypass */
|
||||
|
||||
} else if (lbc_hz >= 133) {
|
||||
lbc->lcrr &= (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr &= (~LCRR_DBYP); /* DLL Enabled */
|
||||
|
||||
} else {
|
||||
lbc->lcrr &= (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr &= (~LCRR_DBYP); /* DLL Enabled */
|
||||
udelay(200);
|
||||
|
||||
/*
|
||||
|
|
|
@ -267,13 +267,13 @@ local_bus_init(void)
|
|||
lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
|
||||
|
||||
if (lbc_hz < 66) {
|
||||
lbc->lcrr |= 0x80000000; /* DLL Bypass */
|
||||
lbc->lcrr |= LCRR_DBYP; /* DLL Bypass */
|
||||
|
||||
} else if (lbc_hz >= 133) {
|
||||
lbc->lcrr &= (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr &= (~LCRR_DBYP); /* DLL Enabled */
|
||||
|
||||
} else {
|
||||
lbc->lcrr &= (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr &= (~LCRR_DBYP); /* DLL Enabled */
|
||||
udelay(200);
|
||||
|
||||
/*
|
||||
|
|
|
@ -292,10 +292,10 @@ local_bus_init(void)
|
|||
lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
|
||||
|
||||
if (lbc_hz < 66) {
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR | 0x80000000; /* DLL Bypass */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR | LCRR_DBYP; /* DLL Bypass */
|
||||
|
||||
} else if (lbc_hz >= 133) {
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~0x80000000); /* DLL Enabled */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~LCRR_DBYP); /* DLL Enabled */
|
||||
|
||||
} else {
|
||||
/*
|
||||
|
@ -310,7 +310,7 @@ local_bus_init(void)
|
|||
lbc->lcrr = 0x10000004;
|
||||
}
|
||||
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~0x80000000);/* DLL Enabled */
|
||||
lbc->lcrr = CONFIG_SYS_LBC_LCRR & (~LCRR_DBYP);/* DLL Enabled */
|
||||
udelay(200);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue