]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc85xx: use LCRR_DBYP define instead of raw constant
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 13 Aug 2012 13:48:57 +0000 (13:48 +0000)
committerAndy Fleming <afleming@freescale.com>
Thu, 23 Aug 2012 15:24:18 +0000 (10:24 -0500)
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>
board/freescale/mpc8540ads/mpc8540ads.c
board/freescale/mpc8541cds/mpc8541cds.c
board/freescale/mpc8555cds/mpc8555cds.c
board/freescale/mpc8560ads/mpc8560ads.c

index c75585e28c0ede2f79f10a8cd6f2d5aec06633b3..a275d3a074d8fb4fb4b490c8ec7333a06cfb2a73 100644 (file)
@@ -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);
 
                /*
index 532d32ac7cb19335960f92edd4f2ac087249c7e4..13ca84b65234b6fc227a2a4f1bcea4180ecc5d14 100644 (file)
@@ -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);
 
                /*
index 3361614de5f7b2961514be207bab0a165cf0c170..4cfd61cdd95feac82776e8f099ff023bcdf320f7 100644 (file)
@@ -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);
 
                /*
index 1a165bff8698bf87c39ab9ff2c90a71439e69487..285edbce6b46b7206b0b045eb55a88b4675aff30 100644 (file)
@@ -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);
 
                /*