From f054b51cc3408f8dab96c5f9a0693956ccebcb1e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 16 Apr 2002 17:38:12 +0000 Subject: 2002-04-13 Ralf Corsepius * shared/include/cpuIdent.h: New. * shared/include/cpuIdent.c: Reflect having added cpuIdent.h. * shared/include/cpu.h: Ditto. * shared/include/Makefile.am: Add cpuIndent.h. Fix EXTRA_DIST. --- c/src/lib/libcpu/powerpc/ChangeLog | 7 ++++ .../lib/libcpu/powerpc/shared/include/Makefile.am | 5 ++- c/src/lib/libcpu/powerpc/shared/include/cpu.h | 25 +----------- c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c | 1 + c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 45 ++++++++++++++++++++++ 5 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h (limited to 'c/src/lib/libcpu/powerpc') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 6a8c49154a..5e261cd735 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,10 @@ +2002-04-13 Ralf Corsepius + + * shared/include/cpuIdent.h: New. + * shared/include/cpuIdent.c: Reflect having added cpuIdent.h. + * shared/include/cpu.h: Ditto. + * shared/include/Makefile.am: Add cpuIndent.h. Fix EXTRA_DIST. + 2001-04-03 Joel Sherrill * Closed PR57. The hack is OK as it allows a BSP to override diff --git a/c/src/lib/libcpu/powerpc/shared/include/Makefile.am b/c/src/lib/libcpu/powerpc/shared/include/Makefile.am index 8b010169de..c9b0246e8e 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/Makefile.am +++ b/c/src/lib/libcpu/powerpc/shared/include/Makefile.am @@ -8,7 +8,8 @@ C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) include_libcpudir = $(includedir)/libcpu -include_libcpu_HEADERS = cpu.h spr.h io.h mmu.h page.h byteorder.h pgtable.h +include_libcpu_HEADERS = cpu.h spr.h io.h mmu.h page.h byteorder.h pgtable.h \ + cpuIdent.h OBJS = $(C_O_FILES) @@ -38,6 +39,6 @@ all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB) .PRECIOUS: $(LIB) -EXTRA_DIST = byteorder.h cpu.h cpuIdent.c io.h mmu.h page.h pgtable.h spr.h +EXTRA_DIST = cpuIdent.c include $(top_srcdir)/../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpu.h b/c/src/lib/libcpu/powerpc/shared/include/cpu.h index 417ba0fd81..cc8a1e1d1b 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpu.h +++ b/c/src/lib/libcpu/powerpc/shared/include/cpu.h @@ -175,29 +175,8 @@ n: #define SR14 14 #define SR15 15 -#ifndef ASM -typedef enum { - PPC_601 = 0x1, - PPC_603 = 0x3, - PPC_604 = 0x4, - PPC_603e = 0x6, - PPC_603ev = 0x7, - PPC_750 = 0x8, - PPC_604e = 0x9, - PPC_604r = 0xA, - PPC_620 = 0x16, - PPC_860 = 0x50, - PPC_821 = PPC_860, - PPC_8260 = 0x81, - PPC_UNKNOWN = 0xff -} ppc_cpu_id_t; - -typedef unsigned short ppc_cpu_revision_t; - -extern ppc_cpu_id_t get_ppc_cpu_type(); -extern ppc_cpu_id_t current_ppc_cpu; -extern ppc_cpu_revision_t get_ppc_cpu_revision(); -extern ppc_cpu_revision_t current_ppc_revision; +#include + /* * Routines to access the time base register */ diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c index 0e21a58d20..ddb7775d89 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c @@ -14,6 +14,7 @@ * */ +#include #include #include diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h new file mode 100644 index 0000000000..7d608bfe33 --- /dev/null +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 1999 Eric Valette (valette@crf.canon.fr) + * Canon Centre Recherche France. + * + * Added MPC8260 Andy Dachs + * Surrey Satellite Technology Limited + * + * + * The license and distribution terms for this file may be + * found in found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#ifndef _libcpu_cpuIdent_h +#define _libcpu_cpuIdent_h + +#ifndef ASM +typedef enum +{ + PPC_601 = 0x1, + PPC_603 = 0x3, + PPC_604 = 0x4, + PPC_603e = 0x6, + PPC_603ev = 0x7, + PPC_750 = 0x8, + PPC_604e = 0x9, + PPC_604r = 0xA, + PPC_620 = 0x16, + PPC_860 = 0x50, + PPC_821 = PPC_860, + PPC_8260 = 0x81, + PPC_UNKNOWN = 0xff +} ppc_cpu_id_t; + +typedef unsigned short ppc_cpu_revision_t; + +extern ppc_cpu_id_t get_ppc_cpu_type (); +extern ppc_cpu_id_t current_ppc_cpu; +extern ppc_cpu_revision_t get_ppc_cpu_revision (); +extern ppc_cpu_revision_t current_ppc_revision; +#endif /* ASM */ + +#endif -- cgit v1.2.3