]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/powerpc/cpu/ppc4xx/speed.c
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / arch / powerpc / cpu / ppc4xx / speed.c
index 906face033030fac18bad2a77b17daca13f39b70..49a8295bb3639b8965963ab5d0ba0c43cc3e729a 100644 (file)
@@ -2,28 +2,12 @@
  * (C) Copyright 2000-2008
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <ppc_asm.tmpl>
-#include <ppc4xx.h>
+#include <asm/ppc4xx.h>
 #include <asm/processor.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -35,9 +19,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define DEBUGF(fmt,args...)
 #endif
 
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-#if defined(CONFIG_405GP) || defined(CONFIG_405CR)
+#if defined(CONFIG_405GP)
 
 void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
 {
@@ -727,7 +709,7 @@ unsigned long determine_pci_clock_per(void)
                        pci_period = PERIOD_66_66MHZ;
                        break;
                default:
-                       pci_period = PERIOD_33_33MHZ;;
+                       pci_period = PERIOD_33_33MHZ;
                        break;
        }
 
@@ -739,14 +721,6 @@ unsigned long determine_pci_clock_per(void)
 extern void get_sys_info (sys_info_t * sysInfo);
 extern ulong get_PCI_freq (void);
 
-#elif defined(CONFIG_AP1000)
-void get_sys_info (sys_info_t * sysInfo)
-{
-       sysInfo->freqProcessor = 240 * 1000 * 1000;
-       sysInfo->freqPLB = 80 * 1000 * 1000;
-       sysInfo->freqPCI = 33 * 1000 * 1000;
-}
-
 #elif defined(CONFIG_405)
 
 void get_sys_info (sys_info_t * sysInfo)
@@ -902,7 +876,7 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
        /*
         * Read CPR_PRIMAD register
         */
-       mfcpr(CPC0_PRIMAD, cpr_primad);
+       mfcpr(CPR0_PRIMAD, cpr_primad);
 
        /*
         * Determine PLB_DIV.
@@ -1117,22 +1091,12 @@ void get_sys_info (sys_info_t * sysInfo)
 
 int get_clocks (void)
 {
-#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
-    defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
-    defined(CONFIG_405EX) || defined(CONFIG_405) || \
-    defined(CONFIG_440)
        sys_info_t sys_info;
 
        get_sys_info (&sys_info);
        gd->cpu_clk = sys_info.freqProcessor;
        gd->bus_clk = sys_info.freqPLB;
 
-#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */
-
-#ifdef CONFIG_IOP480
-       gd->cpu_clk = 66000000;
-       gd->bus_clk = 66000000;
-#endif
        return (0);
 }
 
@@ -1145,7 +1109,7 @@ ulong get_bus_freq (ulong dummy)
 {
        ulong val;
 
-#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
+#if defined(CONFIG_405GP) || \
     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
     defined(CONFIG_405EX) || defined(CONFIG_405) || \
     defined(CONFIG_440)
@@ -1153,11 +1117,6 @@ ulong get_bus_freq (ulong dummy)
 
        get_sys_info (&sys_info);
        val = sys_info.freqPLB;
-
-#elif defined(CONFIG_IOP480)
-
-       val = 66;
-
 #else
 # error get_bus_freq() not implemented
 #endif
@@ -1165,7 +1124,6 @@ ulong get_bus_freq (ulong dummy)
        return val;
 }
 
-#if !defined(CONFIG_IOP480)
 ulong get_OPB_freq (void)
 {
        PPC4xx_SYS_INFO sys_info;
@@ -1174,4 +1132,3 @@ ulong get_OPB_freq (void)
 
        return sys_info.freqOPB;
 }
-#endif