summaryrefslogtreecommitdiffstats
path: root/arch/ppc/lib
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2012-05-01 10:26:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-02 10:16:30 +0200
commitbd20ba67987875283cabba9e9e813e6dc355281a (patch)
tree058c0fb76d7e59ebe5ee6e91e27e82b2acda3218 /arch/ppc/lib
parent84aec66a831990874e98340ce4d3ccadb82d9236 (diff)
downloadbarebox-bd20ba67987875283cabba9e9e813e6dc355281a.tar.gz
barebox-bd20ba67987875283cabba9e9e813e6dc355281a.tar.xz
Preparation stage to support multiple PPC architectures
arch/ppc/Kconfig is reworked to make the configuration environment architecture neutral. All MPC5200 configuration is moved to the MPC5200 architecture specific configuration file. These modifications are reflected in the PCM030 board support. arch/ppc/Makefile compilation directives are updated in preparation for the introduction of future cpus/machines. lib/time.c is moved to the architecture specific directory and the building instructions updated in the Make files. The file is cleaned up of unused code. The definition of L1_CACHE_... is updated and CACHELINE_SIZE is defined in ppc/include/asm/cache.h for future use by the mpc85xx. The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are updated accordingly. The declaration of search_exception_table is moved in include/asm/common.h because it is used across architectures. mach-mpc5xxx/traps.c is also updated to reflect this change. The definition of exception in asm/ppc_asm.tmpl is updated for future use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated accordingly. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/lib')
-rw-r--r--arch/ppc/lib/Makefile1
-rw-r--r--arch/ppc/lib/time.c74
2 files changed, 0 insertions, 75 deletions
diff --git a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile
index 9e389b71e6..0f5e01761d 100644
--- a/arch/ppc/lib/Makefile
+++ b/arch/ppc/lib/Makefile
@@ -4,7 +4,6 @@ obj-y += extable.o
obj-y += kgdb.o
obj-y += ppcstring.o
obj-y += ticks.o
-obj-y += time.o
obj-y += misc.o
obj-$(CONFIG_CMD_BOOTM) += ppclinux.o
obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/ppc/lib/time.c b/arch/ppc/lib/time.c
deleted file mode 100644
index 04c71dfcc6..0000000000
--- a/arch/ppc/lib/time.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * 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
- */
-
-#include <common.h>
-#include <clock.h>
-#include <init.h>
-#include <mach/clocks.h>
-#include <asm/common.h>
-
-/* ------------------------------------------------------------------------- */
-
-static int init_timebase (void)
-{
-#if defined(CONFIG_5xx) || defined(CONFIG_8xx)
- volatile immap_t *immap = (immap_t *) CFG_IMMR;
-
- /* unlock */
- immap->im_sitk.sitk_tbk = KAPWR_KEY;
-#endif
-
- /* reset */
- asm ("li 3,0 ; mttbu 3 ; mttbl 3 ;");
-
-#if defined(CONFIG_5xx) || defined(CONFIG_8xx)
- /* enable */
- immap->im_sit.sit_tbscr |= TBSCR_TBE;
-#endif
- return (0);
-}
-/* ------------------------------------------------------------------------- */
-
-uint64_t ppc_clocksource_read(void)
-{
- return get_ticks();
-}
-
-static struct clocksource cs = {
- .read = ppc_clocksource_read,
- .mask = CLOCKSOURCE_MASK(32),
- .shift = 15,
-};
-
-static int clocksource_init (void)
-{
- init_timebase();
-
- cs.mult = clocksource_hz2mult(get_timebase_clock(), cs.shift);
-
- init_clock(&cs);
-
- return 0;
-}
-
-core_initcall(clocksource_init);