summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/bspstart.c1
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c1
-rw-r--r--c/src/lib/libbsp/powerpc/mcp750/Makefile.in8
-rw-r--r--c/src/lib/libbsp/powerpc/mcp750/clock/Makefile.in75
-rw-r--r--c/src/lib/libbsp/powerpc/mcp750/clock/c_clock.c215
-rw-r--r--c/src/lib/libbsp/powerpc/mcp750/wrapup/Makefile.in6
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.in8
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.in75
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/clock/c_clock.c215
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.in6
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.in5
-rw-r--r--c/src/lib/libcpu/hppa1.1/clock/Makefile.in2
-rw-r--r--c/src/lib/libcpu/hppa1.1/clock/clock.c11
-rw-r--r--c/src/lib/libcpu/hppa1.1/include/Makefile.in4
-rw-r--r--c/src/lib/libcpu/hppa1.1/milli/Makefile.in2
-rw-r--r--c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c10
-rw-r--r--c/src/lib/libcpu/hppa1.1/timer/Makefile.in2
-rw-r--r--c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.in2
-rw-r--r--c/src/lib/libcpu/mips/clock/ckinit.c19
-rw-r--r--c/src/lib/libcpu/mips/timer/timer.c1
-rw-r--r--c/src/lib/libcpu/mips64orion/clock/ckinit.c19
-rw-r--r--c/src/lib/libcpu/mips64orion/include/Makefile.in4
-rw-r--r--c/src/lib/libcpu/mips64orion/timer/timer.c1
-rw-r--r--c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc750/Makefile.in3
-rw-r--r--c/src/lib/libcpu/powerpc/mpc750/wrapup/Makefile.in3
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/clock/clock.c7
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c1
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/include/Makefile.in4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/timer/timer.c1
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/vectors/align_h.S1
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/clock/clock.c8
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/include/Makefile.in4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/timer/timer.c1
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/vectors/align_h.S1
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/clock/clock.c10
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/console/console.c2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/include/Makefile.in4
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.in2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/timer/timer.c1
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.S2
-rw-r--r--c/src/lib/libcpu/sh/sh7032/clock/ckinit.c10
-rw-r--r--c/src/lib/libcpu/sh/sh7032/console/console.c1
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/sci.h2
-rw-r--r--c/src/lib/libcpu/sh/sh7032/timer/timer.c2
54 files changed, 672 insertions, 110 deletions
diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
index bdd0c3074d..7634232bd8 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
@@ -116,4 +116,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}
diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
index bdd0c3074d..7634232bd8 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
@@ -116,4 +116,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}
diff --git a/c/src/lib/libbsp/powerpc/mcp750/Makefile.in b/c/src/lib/libbsp/powerpc/mcp750/Makefile.in
index 1e61ebe329..0e4a0923d5 100644
--- a/c/src/lib/libbsp/powerpc/mcp750/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/mcp750/Makefile.in
@@ -22,10 +22,14 @@ SRCS = README
all: $(SRCS)
+# We only build the Network library if HAS_NETWORKING was defined
+NETWORK_yes_V = dec21140
+NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
+
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUB_DIRS = console include pci residual openpic irq vectors start startup \
- bootloader dec21140 wrapup
+SUB_DIRS = clock console include pci residual openpic irq vectors \
+ start startup bootloader $(NETWORK) wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
diff --git a/c/src/lib/libbsp/powerpc/mcp750/clock/Makefile.in b/c/src/lib/libbsp/powerpc/mcp750/clock/Makefile.in
new file mode 100644
index 0000000000..62122d9097
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/mcp750/clock/Makefile.in
@@ -0,0 +1,75 @@
+#
+# $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ../../..
+subdir = powerpc/mcp750/clock
+
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+
+VPATH = @srcdir@
+
+PGM = ${ARCH}/clock.rel
+
+# C source names, if any, go here -- minus the .c
+C_PIECES = c_clock
+C_FILES = $(C_PIECES:%=%.c)
+C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
+
+H_FILES =
+
+SRCS = $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+INSTALL_CHANGE = @INSTALL_CHANGE@
+mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
+
+INSTALLDIRS = $(PROJECT_INCLUDE)/bsp
+
+$(INSTALLDIRS):
+ @$(mkinstalldirs) $(INSTALLDIRS)
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+LD_PATHS +=
+LD_LIBS +=
+LDFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+${PGM}: ${SRCS} ${OBJS}
+ $(make-rel)
+
+preinstall:
+ @$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+ @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/bsp
+
+all: ${ARCH} $(SRCS) preinstall $(PGM)
+
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+install: all
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/c/src/lib/libbsp/powerpc/mcp750/clock/c_clock.c b/c/src/lib/libbsp/powerpc/mcp750/clock/c_clock.c
new file mode 100644
index 0000000000..b6fafcb7df
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/mcp750/clock/c_clock.c
@@ -0,0 +1,215 @@
+/*
+ * Clock Tick Device Driver
+ *
+ * This routine utilizes the Decrementer Register common to the PPC family.
+ *
+ * The tick frequency is directly programmed to the configured number of
+ * microseconds per tick.
+ *
+ * COPYRIGHT (c) 1989-1997.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * Modified to support the MPC750.
+ * Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <bsp/irq.h>
+#include <rtems/libio.h>
+#include <stdlib.h> /* for atexit() */
+#include <assert.h>
+#include <libcpu/cpu.h>
+
+/*
+ * Clock ticks since initialization
+ */
+
+volatile rtems_unsigned32 Clock_driver_ticks;
+
+/*
+ * This is the value programmed into the count down timer.
+ */
+
+rtems_unsigned32 Clock_Decrementer_value;
+
+/*
+ * These are set by clock driver during its init
+ */
+
+rtems_device_major_number rtems_clock_major = ~0;
+rtems_device_minor_number rtems_clock_minor;
+
+void clockOff(const rtems_irq_connect_data* unused)
+{
+ if (BSP_Configuration.ticks_per_timeslice) {
+ /*
+ * Nothing to do as we cannot disable all interrupts and
+ * the decrementer interrupt enable is MSR_EE
+ */
+ }
+}
+static void clockOn(const rtems_irq_connect_data* unused)
+{
+ PPC_Set_decrementer( Clock_Decrementer_value );
+}
+
+/*
+ * Clock_isr
+ *
+ * This is the clock tick interrupt handler.
+ *
+ * Input parameters:
+ * vector - vector number
+ *
+ * Output parameters: NONE
+ *
+ * Return values: NONE
+ *
+ */
+void clockIsr()
+{
+ /*
+ * The driver has seen another tick.
+ */
+
+ PPC_Set_decrementer( Clock_Decrementer_value );
+
+ Clock_driver_ticks += 1;
+
+ /*
+ * Real Time Clock counter/timer is set to automatically reload.
+ */
+
+ rtems_clock_tick();
+}
+
+int clockIsOn(const rtems_irq_connect_data* unused)
+{
+ unsigned32 msr_value;
+
+ _CPU_MSR_GET( msr_value );
+ if (msr_value & MSR_EE) return 1;
+ return 0;
+}
+
+static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
+ clockIsr,
+ clockOn,
+ clockOff,
+ clockIsOn};
+
+
+/*
+ * Clock_exit
+ *
+ * This routine allows the clock driver to exit by masking the interrupt and
+ * disabling the clock's counter.
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return values: NONE
+ *
+ */
+
+void Clock_exit( void )
+{
+ if ( BSP_Configuration.ticks_per_timeslice ) {
+ BSP_remove_rtems_irq_handler (&clockIrqData);
+ }
+}
+
+/*
+ * Clock_initialize
+ *
+ * This routine initializes the clock driver.
+ *
+ * Input parameters:
+ * major - clock device major number
+ * minor - clock device minor number
+ * parg - pointer to optional device driver arguments
+ *
+ * Output parameters: NONE
+ *
+ * Return values:
+ * rtems_device_driver status code
+ */
+
+rtems_device_driver Clock_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *pargp
+)
+{
+ Clock_Decrementer_value = (BSP_bus_frequency/4000)*
+ (BSP_Configuration.microseconds_per_tick/1000);
+
+ if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
+ printk("Unable to initialize system clock\n");
+ rtems_fatal_error_occurred(1);
+ }
+ /* make major/minor avail to others such as shared memory driver */
+
+ rtems_clock_major = major;
+ rtems_clock_minor = minor;
+
+ return RTEMS_SUCCESSFUL;
+} /* Clock_initialize */
+
+/*
+ * Clock_control
+ *
+ * This routine is the clock device driver control entry point.
+ *
+ * Input parameters:
+ * major - clock device major number
+ * minor - clock device minor number
+ * parg - pointer to optional device driver arguments
+ *
+ * Output parameters: NONE
+ *
+ * Return values:
+ * rtems_device_driver status code
+ */
+
+rtems_device_driver Clock_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *pargp
+)
+{
+ rtems_unsigned32 isrlevel;
+ rtems_libio_ioctl_args_t *args = pargp;
+
+ if (args == 0)
+ goto done;
+
+ Clock_Decrementer_value = (BSP_bus_frequency/4000)*
+ (BSP_Configuration.microseconds_per_tick/1000);
+
+ if (args->command == rtems_build_name('I', 'S', 'R', ' '))
+ clockIsr();
+ else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
+ {
+ if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
+ printk("Error installing clock interrupt handler!\n");
+ rtems_fatal_error_occurred(1);
+ }
+ }
+done:
+ return RTEMS_SUCCESSFUL;
+}
+
+
+
+
+
+
diff --git a/c/src/lib/libbsp/powerpc/mcp750/wrapup/Makefile.in b/c/src/lib/libbsp/powerpc/mcp750/wrapup/Makefile.in
index f4f6d6d6fe..005283840d 100644
--- a/c/src/lib/libbsp/powerpc/mcp750/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/mcp750/wrapup/Makefile.in
@@ -13,7 +13,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
-BSP_PIECES = console irq openpic pci residual startup dec21140 vectors
+# We only build the Network library if HAS_NETWORKING was defined
+NETWORK_yes_V = dec21140
+NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
+
+BSP_PIECES = clock console irq openpic pci residual startup $(NETWORK) vectors
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.in b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.in
index 1e61ebe329..0e4a0923d5 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.in
@@ -22,10 +22,14 @@ SRCS = README
all: $(SRCS)
+# We only build the Network library if HAS_NETWORKING was defined
+NETWORK_yes_V = dec21140
+NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
+
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUB_DIRS = console include pci residual openpic irq vectors start startup \
- bootloader dec21140 wrapup
+SUB_DIRS = clock console include pci residual openpic irq vectors \
+ start startup bootloader $(NETWORK) wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.in b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.in
new file mode 100644
index 0000000000..62122d9097
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.in
@@ -0,0 +1,75 @@
+#
+# $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ../../..
+subdir = powerpc/mcp750/clock
+
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+
+VPATH = @srcdir@
+
+PGM = ${ARCH}/clock.rel
+
+# C source names, if any, go here -- minus the .c
+C_PIECES = c_clock
+C_FILES = $(C_PIECES:%=%.c)
+C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
+
+H_FILES =
+
+SRCS = $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+INSTALL_CHANGE = @INSTALL_CHANGE@
+mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
+
+INSTALLDIRS = $(PROJECT_INCLUDE)/bsp
+
+$(INSTALLDIRS):
+ @$(mkinstalldirs) $(INSTALLDIRS)
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+LD_PATHS +=
+LD_LIBS +=
+LDFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+${PGM}: ${SRCS} ${OBJS}
+ $(make-rel)
+
+preinstall:
+ @$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+ @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/bsp
+
+all: ${ARCH} $(SRCS) preinstall $(PGM)
+
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+install: all
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/c_clock.c b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/c_clock.c
new file mode 100644
index 0000000000..b6fafcb7df
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/c_clock.c
@@ -0,0 +1,215 @@
+/*
+ * Clock Tick Device Driver
+ *
+ * This routine utilizes the Decrementer Register common to the PPC family.
+ *
+ * The tick frequency is directly programmed to the configured number of
+ * microseconds per tick.
+ *
+ * COPYRIGHT (c) 1989-1997.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * Modified to support the MPC750.
+ * Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+#include <bsp/irq.h>
+#include <rtems/libio.h>
+#include <stdlib.h> /* for atexit() */
+#include <assert.h>
+#include <libcpu/cpu.h>
+
+/*
+ * Clock ticks since initialization
+ */
+
+volatile rtems_unsigned32 Clock_driver_ticks;
+
+/*
+ * This is the value programmed into the count down timer.
+ */
+
+rtems_unsigned32 Clock_Decrementer_value;
+
+/*
+ * These are set by clock driver during its init
+ */
+
+rtems_device_major_number rtems_clock_major = ~0;
+rtems_device_minor_number rtems_clock_minor;
+
+void clockOff(const rtems_irq_connect_data* unused)
+{
+ if (BSP_Configuration.ticks_per_timeslice) {
+ /*
+ * Nothing to do as we cannot disable all interrupts and
+ * the decrementer interrupt enable is MSR_EE
+ */
+ }
+}
+static void clockOn(const rtems_irq_connect_data* unused)
+{
+ PPC_Set_decrementer( Clock_Decrementer_value );
+}
+
+/*
+ * Clock_isr
+ *
+ * This is the clock tick interrupt handler.
+ *
+ * Input parameters:
+ * vector - vector number
+ *
+ * Output parameters: NONE
+ *
+ * Return values: NONE
+ *
+ */
+void clockIsr()
+{
+ /*
+ * The driver has seen another tick.
+ */
+
+ PPC_Set_decrementer( Clock_Decrementer_value );
+
+ Clock_driver_ticks += 1;
+
+ /*
+ * Real Time Clock counter/timer is set to automatically reload.
+ */
+
+ rtems_clock_tick();
+}
+
+int clockIsOn(const rtems_irq_connect_data* unused)
+{
+ unsigned32 msr_value;
+
+ _CPU_MSR_GET( msr_value );
+ if (msr_value & MSR_EE) return 1;
+ return 0;
+}
+
+static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
+ clockIsr,
+ clockOn,
+ clockOff,
+ clockIsOn};
+
+
+/*
+ * Clock_exit
+ *
+ * This routine allows the clock driver to exit by masking the interrupt and
+ * disabling the clock's counter.
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return values: NONE
+ *
+ */
+
+void Clock_exit( void )
+{
+ if ( BSP_Configuration.ticks_per_timeslice ) {
+ BSP_remove_rtems_irq_handler (&clockIrqData);
+ }
+}
+
+/*
+ * Clock_initialize
+ *
+ * This routine initializes the clock driver.
+ *
+ * Input parameters:
+ * major - clock device major number
+ * minor - clock device minor number
+ * parg - pointer to optional device driver arguments
+ *
+ * Output parameters: NONE
+ *
+ * Return values:
+ * rtems_device_driver status code
+ */
+
+rtems_device_driver Clock_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *pargp
+)
+{
+ Clock_Decrementer_value = (BSP_bus_frequency/4000)*
+ (BSP_Configuration.microseconds_per_tick/1000);
+
+ if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
+ printk("Unable to initialize system clock\n");
+ rtems_fatal_error_occurred(1);
+ }
+ /* make major/minor avail to others such as shared memory driver */
+
+ rtems_clock_major = major;
+ rtems_clock_minor = minor;
+
+ return RTEMS_SUCCESSFUL;
+} /* Clock_initialize */
+
+/*
+ * Clock_control
+ *
+ * This routine is the clock device driver control entry point.
+ *
+ * Input parameters:
+ * major - clock device major number
+ * minor - clock device minor number
+ * parg - pointer to optional device driver arguments
+ *
+ * Output parameters: NONE
+ *
+ * Return values:
+ * rtems_device_driver status code
+ */
+
+rtems_device_driver Clock_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *pargp
+)
+{
+ rtems_unsigned32 isrlevel;
+ rtems_libio_ioctl_args_t *args = pargp;
+
+ if (args == 0)
+ goto done;
+
+ Clock_Decrementer_value = (BSP_bus_frequency/4000)*
+ (BSP_Configuration.microseconds_per_tick/1000);
+
+ if (args->command == rtems_build_name('I', 'S', 'R', ' '))
+ clockIsr();
+ else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
+ {
+ if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
+ printk("Error installing clock interrupt handler!\n");
+ rtems_fatal_error_occurred(1);
+ }
+ }
+done:
+ return RTEMS_SUCCESSFUL;
+}
+
+
+
+
+
+
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.in b/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.in
index f4f6d6d6fe..005283840d 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.in
@@ -13,7 +13,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
-BSP_PIECES = console irq openpic pci residual startup dec21140 vectors
+# We only build the Network library if HAS_NETWORKING was defined
+NETWORK_yes_V = dec21140
+NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
+
+BSP_PIECES = clock console irq openpic pci residual startup $(NETWORK) vectors
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
diff --git a/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.in b/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.in
index 4d6988d22c..e8ce41d7da 100644
--- a/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.in
@@ -21,8 +21,9 @@ GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
$(foreach piece, $(CPU_PIECES), \
- ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) $(foreach \
- piece, $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).rel)
+ ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \
+ $(foreach piece, $(GENERIC_PIECES), \
+ ../../../$(piece)/$(ARCH)/$(piece).rel)
LIB = $(ARCH)/libbsp.a
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
diff --git a/c/src/lib/libcpu/hppa1.1/clock/Makefile.in b/c/src/lib/libcpu/hppa1.1/clock/Makefile.in
index 185ca8c78e..5670ecbcbd 100644
--- a/c/src/lib/libcpu/hppa1.1/clock/Makefile.in
+++ b/c/src/lib/libcpu/hppa1.1/clock/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/hppa1.1/clock/clock.c b/c/src/lib/libcpu/hppa1.1/clock/clock.c
index 1dcfa665ec..a0588e57fd 100644
--- a/c/src/lib/libcpu/hppa1.1/clock/clock.c
+++ b/c/src/lib/libcpu/hppa1.1/clock/clock.c
@@ -19,7 +19,6 @@
/* should get this from bsp.h, but it is not installed yet */
rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
-extern rtems_configuration_table BSP_Configuration;
#include <stdlib.h> /* for atexit() */
@@ -103,10 +102,9 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_clicks_interrupt = 0;
Clock_clicks = 0;
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
- if (BSP_Configuration.ticks_per_timeslice)
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
* First tick is set to right amount of time in the future
@@ -175,7 +173,7 @@ Clock_isr(rtems_vector_number vector)
if (Clock_isrs == 1)
{
rtems_clock_tick();
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 10000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
if (Clock_isrs == 0)
Clock_isrs = 1;
}
@@ -191,8 +189,7 @@ Clock_isr(rtems_vector_number vector)
void
Clock_exit(void)
{
- if ( BSP_Configuration.ticks_per_timeslice )
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
(void) set_vector(0, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1);
}
}
diff --git a/c/src/lib/libcpu/hppa1.1/include/Makefile.in b/c/src/lib/libcpu/hppa1.1/include/Makefile.in
index 9efc79396e..a6bbbdafc0 100644
--- a/c/src/lib/libcpu/hppa1.1/include/Makefile.in
+++ b/c/src/lib/libcpu/hppa1.1/include/Makefile.in
@@ -1,10 +1,6 @@
#
# $Id$
#
-# Install any include files needed by libcpu.
-# Mainly this just means bsp.h which would normally be installed
-# after libcpu is built.
-# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@
diff --git a/c/src/lib/libcpu/hppa1.1/milli/Makefile.in b/c/src/lib/libcpu/hppa1.1/milli/Makefile.in
index ae63b98a98..8c07e39d1a 100644
--- a/c/src/lib/libcpu/hppa1.1/milli/Makefile.in
+++ b/c/src/lib/libcpu/hppa1.1/milli/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c
index 3819736d03..011827dc75 100644
--- a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c
+++ b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c
@@ -16,7 +16,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include "semaphore.h"
@@ -123,7 +123,11 @@ hppa_semaphore_pool_initialize(void *pool_base,
* If we are node0, then init all in the pool
*/
+#if 0
if (cpu_number == 0)
+#else
+ if (_Configuration_Table->User_multiprocessing_table->node == 1)
+#endif
{
/*
* Tell other cpus we are not done, jic
@@ -139,7 +143,11 @@ hppa_semaphore_pool_initialize(void *pool_base,
* Tell other cpus we are done, or wait for it to be done if on another cpu
*/
+#if 0
if (cpu_number == 0)
+#else
+ if (_Configuration_Table->User_multiprocessing_table->node == 1)
+#endif
SEM_CONTROL->user = rtems_build_name('D', 'O', 'N', 'E');
else
while (SEM_CONTROL->user != rtems_build_name('D', 'O', 'N', 'E'))
diff --git a/c/src/lib/libcpu/hppa1.1/timer/Makefile.in b/c/src/lib/libcpu/hppa1.1/timer/Makefile.in
index 8b4b6281f4..08bbf81e83 100644
--- a/c/src/lib/libcpu/hppa1.1/timer/Makefile.in
+++ b/c/src/lib/libcpu/hppa1.1/timer/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.in b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.in
index e8cf8820c6..f1a418ece2 100644
--- a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.in
+++ b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.in
@@ -66,8 +66,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/mips/clock/ckinit.c b/c/src/lib/libcpu/mips/clock/ckinit.c
index 60b3187223..c0cdd6f898 100644
--- a/c/src/lib/libcpu/mips/clock/ckinit.c
+++ b/c/src/lib/libcpu/mips/clock/ckinit.c
@@ -43,13 +43,20 @@
#include <rtems.h>
#include <rtems/libio.h>
-#include <bsp.h>
#define EXT_INT5 0x8000 /* external interrupt 5 */
#include "clock.h"
+/* formerly in the BSP */
+#if 0
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
+#endif
+
+#define CLOCKS_PER_MICROSECOND \
+ rtems_cpu_configuration_get_clicks_per_microsecond()
+/* to avoid including the bsp */
+mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
void Clock_exit( void );
rtems_isr Clock_isr( rtems_vector_number vector );
@@ -152,20 +159,20 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
/*
* If ticks_per_timeslice is configured as non-zero, then the user
* wants a clock tick.
*/
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
/*
* Hardware specific initialize goes here
*/
- mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND;
+ mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
mips_set_timer( mips_timer_rate );
enable_int(CLOCK_VECTOR_MASK);
}
@@ -183,11 +190,9 @@ void Install_clock(
void Clock_exit( void )
{
- if ( BSP_Configuration.ticks_per_timeslice ) {
-
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* mips: turn off the timer interrupts */
disable_int(CLOCK_VECTOR_MASK);
-
}
}
diff --git a/c/src/lib/libcpu/mips/timer/timer.c b/c/src/lib/libcpu/mips/timer/timer.c
index 167a9b3804..dc7c61157e 100644
--- a/c/src/lib/libcpu/mips/timer/timer.c
+++ b/c/src/lib/libcpu/mips/timer/timer.c
@@ -47,7 +47,6 @@
#include <rtems.h>
-#include <bsp.h>
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
#define TIMER_MAX_VALUE 0xffffffff
diff --git a/c/src/lib/libcpu/mips64orion/clock/ckinit.c b/c/src/lib/libcpu/mips64orion/clock/ckinit.c
index 60b3187223..c0cdd6f898 100644
--- a/c/src/lib/libcpu/mips64orion/clock/ckinit.c
+++ b/c/src/lib/libcpu/mips64orion/clock/ckinit.c
@@ -43,13 +43,20 @@
#include <rtems.h>
#include <rtems/libio.h>
-#include <bsp.h>
#define EXT_INT5 0x8000 /* external interrupt 5 */
#include "clock.h"
+/* formerly in the BSP */
+#if 0
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
+#endif
+
+#define CLOCKS_PER_MICROSECOND \
+ rtems_cpu_configuration_get_clicks_per_microsecond()
+/* to avoid including the bsp */
+mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
void Clock_exit( void );
rtems_isr Clock_isr( rtems_vector_number vector );
@@ -152,20 +159,20 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
/*
* If ticks_per_timeslice is configured as non-zero, then the user
* wants a clock tick.
*/
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
/*
* Hardware specific initialize goes here
*/
- mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND;
+ mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
mips_set_timer( mips_timer_rate );
enable_int(CLOCK_VECTOR_MASK);
}
@@ -183,11 +190,9 @@ void Install_clock(
void Clock_exit( void )
{
- if ( BSP_Configuration.ticks_per_timeslice ) {
-
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* mips: turn off the timer interrupts */
disable_int(CLOCK_VECTOR_MASK);
-
}
}
diff --git a/c/src/lib/libcpu/mips64orion/include/Makefile.in b/c/src/lib/libcpu/mips64orion/include/Makefile.in
index 2eae888240..60c41999f0 100644
--- a/c/src/lib/libcpu/mips64orion/include/Makefile.in
+++ b/c/src/lib/libcpu/mips64orion/include/Makefile.in
@@ -1,10 +1,6 @@
#
# $Id$
#
-# Install any include files needed by libcpu.
-# Mainly this just means bsp.h which would normally be installed
-# after libcpu is built.
-# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@
diff --git a/c/src/lib/libcpu/mips64orion/timer/timer.c b/c/src/lib/libcpu/mips64orion/timer/timer.c
index 167a9b3804..dc7c61157e 100644
--- a/c/src/lib/libcpu/mips64orion/timer/timer.c
+++ b/c/src/lib/libcpu/mips64orion/timer/timer.c
@@ -47,7 +47,6 @@
#include <rtems.h>
-#include <bsp.h>
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
#define TIMER_MAX_VALUE 0xffffffff
diff --git a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.in b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.in
index 888379c3d1..3b1b15f228 100644
--- a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/mpc750/Makefile.in b/c/src/lib/libcpu/powerpc/mpc750/Makefile.in
index 499a88ce34..94355ee0c2 100644
--- a/c/src/lib/libcpu/powerpc/mpc750/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc750/Makefile.in
@@ -20,7 +20,8 @@ INSTALL_CHANGE = @INSTALL_CHANGE@
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUB_DIRS = exceptions mmu clock wrapup
+# SUB_DIRS = exceptions mmu clock wrapup
+SUB_DIRS = exceptions mmu wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
diff --git a/c/src/lib/libcpu/powerpc/mpc750/wrapup/Makefile.in b/c/src/lib/libcpu/powerpc/mpc750/wrapup/Makefile.in
index 11e6d9df59..20d9003998 100644
--- a/c/src/lib/libcpu/powerpc/mpc750/wrapup/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc750/wrapup/Makefile.in
@@ -13,7 +13,8 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
-PROC_SPECIFIC_O_PIECES = exceptions mmu clock
+# PROC_SPECIFIC_O_PIECES = exceptions mmu clock
+PROC_SPECIFIC_O_PIECES = exceptions mmu
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
diff --git a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.in b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.in
index c4178b8077..dfd133eaf1 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
index bf11c9bcbb..ce27c426a9 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
@@ -36,7 +36,6 @@
* $Id$
*/
-#include <bsp.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -74,7 +73,7 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
- pit_value = BSP_Configuration.microseconds_per_tick /
+ pit_value = rtems_configuration_get_microseconds_per_tick() /
Cpu_table.clicks_per_usec;
if (pit_value == 0) {
pit_value = 0xffff;
@@ -85,7 +84,7 @@ void Install_clock(rtems_isr_entry clock_isr)
if (pit_value > 0xffff) { /* pit is only 16 bits long */
rtems_fatal_error_occurred(-1);
}
- if (BSP_Configuration.ticks_per_timeslice) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
@@ -131,7 +130,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* disable PIT and PIT interrupts */
m821.piscr &= ~(M821_PISCR_PTE | M821_PISCR_PIE);
diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
index 8e8b876379..4b6a3a308b 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
@@ -42,7 +42,6 @@
* $Id$
*/
-#include <bsp.h>
#include <rtems/libio.h>
#include <mpc821.h>
#include <mpc821/console.h>
diff --git a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.in b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.in
index 0eba787c45..7d0bbf9f31 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.in
@@ -1,10 +1,6 @@
#
# $Id$
#
-# Install any include files needed by libcpu.
-# Mainly this just means bsp.h which would normally be installed
-# after libcpu is built.
-# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@
diff --git a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.in b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.in
index 2bb4b3782a..f1ef92cbe5 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/mpc821/timer/timer.c b/c/src/lib/libcpu/powerpc/mpc821/timer/timer.c
index 0700fea807..d9c42e9565 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/mpc821/timer/timer.c
@@ -43,7 +43,6 @@
* $Id$
*/
-#include <bsp.h>
#include <rtems.h>
#include <mpc821.h>
diff --git a/c/src/lib/libcpu/powerpc/mpc821/vectors/align_h.S b/c/src/lib/libcpu/powerpc/mpc821/vectors/align_h.S
index 9a785e347d..98b5ea891a 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/vectors/align_h.S
+++ b/c/src/lib/libcpu/powerpc/mpc821/vectors/align_h.S
@@ -44,7 +44,6 @@
*/
#include "asm.h"
-/*#include "bsp.h"*/
#define ALIGN_REGS 0x0140
.set CACHE_SIZE,16 # cache line size of 32 bytes
diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.in b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.in
index aa3be76e89..5ac2b435a0 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
index d63cd5a5cf..452b939a6d 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
@@ -36,7 +36,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -74,7 +74,7 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
- pit_value = BSP_Configuration.microseconds_per_tick /
+ pit_value = rtems_configuration_get_microseconds_per_tick() /
Cpu_table.clicks_per_usec;
if (pit_value == 0) {
pit_value = 0xffff;
@@ -85,7 +85,7 @@ void Install_clock(rtems_isr_entry clock_isr)
if (pit_value > 0xffff) { /* pit is only 16 bits long */
rtems_fatal_error_occurred(-1);
}
- if (BSP_Configuration.ticks_per_timeslice) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
@@ -131,7 +131,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* disable PIT and PIT interrupts */
m860.piscr &= ~(M860_PISCR_PTE | M860_PISCR_PIE);
diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
index 10a858b07e..604bb8734a 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
@@ -44,7 +44,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include <mpc860.h>
#include <mpc860/console.h>
diff --git a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.in b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.in
index 9bb0657a74..3d3263f522 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.in
@@ -1,10 +1,6 @@
#
# $Id$
#
-# Install any include files needed by libcpu.
-# Mainly this just means bsp.h which would normally be installed
-# after libcpu is built.
-# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@
diff --git a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.in b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.in
index 6b7d7361bb..2a52daf5d7 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c b/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
index c97439f2d6..732ab565a7 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
@@ -43,7 +43,6 @@
* $Id$
*/
-#include <bsp.h>
#include <rtems.h>
#include <mpc860.h>
diff --git a/c/src/lib/libcpu/powerpc/mpc860/vectors/align_h.S b/c/src/lib/libcpu/powerpc/mpc860/vectors/align_h.S
index 9a785e347d..98b5ea891a 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/vectors/align_h.S
+++ b/c/src/lib/libcpu/powerpc/mpc860/vectors/align_h.S
@@ -44,7 +44,6 @@
*/
#include "asm.h"
-/*#include "bsp.h"*/
#define ALIGN_REGS 0x0140
.set CACHE_SIZE,16 # cache line size of 32 bytes
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.in b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.in
index b69e86feea..df95503c19 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
index 99b538dcd3..dfcbea5535 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
@@ -37,7 +37,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -164,11 +164,10 @@ void Install_clock(rtems_isr_entry clock_isr)
else if ((pvr & 0xff00) == 0x0100) /* 403GB */
auto_restart = 1;
- pit_value = BSP_Configuration.microseconds_per_tick *
+ pit_value = rtems_configuration_get_microseconds_per_tick() *
Cpu_table.clicks_per_usec;
- if (BSP_Configuration.ticks_per_timeslice)
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
register rtems_unsigned32 tcr;
/*
@@ -218,8 +217,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
- if ( BSP_Configuration.ticks_per_timeslice )
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
register rtems_unsigned32 tcr;
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c
index 8d073b672b..b1fc7bfe9c 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c
@@ -56,7 +56,7 @@
#define NO_BSP_INIT
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include "../ictrl/ictrl.h"
#include <stdlib.h> /* for atexit() */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled b/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
index a623dde95a..e5d3b6fbce 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
+++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
@@ -31,7 +31,7 @@
#define NO_BSP_INIT
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
extern rtems_cpu_table Cpu_table; /* owned by BSP */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.in b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.in
index bb29e2c931..9d8d10ee23 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.in
@@ -69,8 +69,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c b/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c
index 11d09f748a..8f808d432d 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c
@@ -21,7 +21,7 @@
*/
#include "ictrl.h"
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include <stdlib.h> /* for atexit() */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/include/Makefile.in b/c/src/lib/libcpu/powerpc/ppc403/include/Makefile.in
index 344f4da03d..aafe051965 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/include/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/ppc403/include/Makefile.in
@@ -1,10 +1,6 @@
#
# $Id$
#
-# Install any include files needed by libcpu.
-# Mainly this just means bsp.h which would normally be installed
-# after libcpu is built.
-# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@
diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.in b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.in
index af94bb3abf..68f727435c 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.in
+++ b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.in
@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
-# the .rel file built here will be put into libbsp.a by
-# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
index 0881eef128..0ff48aec90 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
@@ -34,7 +34,6 @@
* $Id$
*/
-#include <bsp.h>
#include <rtems.h>
extern rtems_cpu_table Cpu_table; /* owned by BSP */
diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.S b/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.S
index d16298343d..b8ead27032 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.S
+++ b/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.S
@@ -44,7 +44,7 @@
*/
#include "asm.h"
-#include "bsp.h"
+#include "rtems.h"
.set CACHE_SIZE,16 # cache line size of 32 bytes
.set CACHE_SIZE_L2,4 # cache line size, log 2
diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
index 885cdbd752..7aef64ed99 100644
--- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
+++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
@@ -22,7 +22,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <stdlib.h>
@@ -143,7 +143,7 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
- Clock_isrs_const = BSP_Configuration.microseconds_per_tick / 10000;
+ Clock_isrs_const = rtems_configuration_get_microseconds_per_tick() / 10000;
Clock_isrs = Clock_isrs_const;
/*
@@ -151,7 +151,7 @@ void Install_clock(
* wants a clock tick.
*/
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
/*
* Hardware specific initialize goes here
@@ -191,7 +191,7 @@ void Install_clock(
rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED);
/* set counter limits */
- write16( _ITU_COUNTER0_MICROSECOND * BSP_Configuration.microseconds_per_tick,
+ write16( _ITU_COUNTER0_MICROSECOND * rtems_configuration_get_microseconds_per_tick(),
ITU_GRA0);
/* start counter */
@@ -214,7 +214,7 @@ void Install_clock(
void Clock_exit( void )
{
unsigned8 temp8 = 0;
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* turn off the timer interrupts */
/* set interrupt priority to 0 */
diff --git a/c/src/lib/libcpu/sh/sh7032/console/console.c b/c/src/lib/libcpu/sh/sh7032/console/console.c
index db308cbb55..6c16adfa5f 100644
--- a/c/src/lib/libcpu/sh/sh7032/console/console.c
+++ b/c/src/lib/libcpu/sh/sh7032/console/console.c
@@ -30,6 +30,7 @@
*/
#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include <iosupp.h>
diff --git a/c/src/lib/libcpu/sh/sh7032/include/sci.h b/c/src/lib/libcpu/sh/sh7032/include/sci.h
index 1b1633a488..d897003315 100644
--- a/c/src/lib/libcpu/sh/sh7032/include/sci.h
+++ b/c/src/lib/libcpu/sh/sh7032/include/sci.h
@@ -26,7 +26,7 @@
#define _sh_sci_h
#ifdef __cplusplus
-extern"C" {
+extern "C" {
#endif
/*
diff --git a/c/src/lib/libcpu/sh/sh7032/timer/timer.c b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
index ddf8bfc06b..03ffdd7e56 100644
--- a/c/src/lib/libcpu/sh/sh7032/timer/timer.c
+++ b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
@@ -29,7 +29,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7030.h>