summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-09-29 12:40:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-09-29 12:40:33 +0000
commit21bfd93aaff71a70ca426adb5ccd8397e7d8e5ef (patch)
treee40c0ed97a4fb9be2d60851600abc4adc22976a3 /c/src
parentPatch from Eric Norum <eric@skatter.usask.ca>: (diff)
downloadrtems-21bfd93aaff71a70ca426adb5ccd8397e7d8e5ef.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Please find enclosed a patch which enables me to build the bare-bsp for sh-rtems. Changes: 1. Add preinstall to libbsp/bare/include/Makefile.in 2. Removed FORCEIT, add preinstall to libbsp/sh/gensh1/include/Makefile.in 3. Disabled support of set_vector from sh code (shared/setvec.c is still present but isn't used anymore), set_vector replaced with standard rtems functions. Problems still present: 1. Support of spin-delays in bare bsp 2. Proper support of cpu frequency To configure I used: <srcdir>/configure \ --target=sh-rtems \ --prefix=<instdir>/sh-bare \ --enable-bare-cpu-model=sh7032 \ --enable-bare-cpu-cflags='-Wall -m1 -DMHZ=20 -DCPU_CONSOLE_DEVNAME="\"/dev/null\""' --enable-rtemsbsp=bare \ --disable-networking \ --disable-cxx \ --disable-posix \ --disable-tests IMO, if there are no objections to this patch, a similar approach should be applied to all CPUs/BSPs (esp. hppa1.1, mips64orion, ppc403, because they apply set_vector inside of libcpu).
Diffstat (limited to 'c/src')
-rw-r--r--c/src/lib/libbsp/bare/include/Makefile.in7
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/Makefile.in7
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/Makefile.in2
-rw-r--r--c/src/lib/libbsp/sh/shared/setvec.c5
-rw-r--r--c/src/lib/libcpu/sh/sh7032/clock/ckinit.c6
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/Makefile.in3
-rw-r--r--c/src/lib/libcpu/sh/sh7032/timer/timer.c6
8 files changed, 26 insertions, 18 deletions
diff --git a/c/src/lib/libbsp/bare/include/Makefile.in b/c/src/lib/libbsp/bare/include/Makefile.in
index 666b222fd0..ae1b37f1f7 100644
--- a/c/src/lib/libbsp/bare/include/Makefile.in
+++ b/c/src/lib/libbsp/bare/include/Makefile.in
@@ -28,6 +28,7 @@ include $(RTEMS_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
-all: $(SRCS)
- $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
- $(INSTALL) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE)
+all: preinstall
+
+preinstall: $(SRCS)
+ @INSTALL@ $(INSTINCFLAGS) $(H_FILES) $(PROJECT_INCLUDE)
diff --git a/c/src/lib/libbsp/sh/gensh1/include/Makefile.in b/c/src/lib/libbsp/sh/gensh1/include/Makefile.in
index 2a2cd51b24..e632fca2f1 100644
--- a/c/src/lib/libbsp/sh/gensh1/include/Makefile.in
+++ b/c/src/lib/libbsp/sh/gensh1/include/Makefile.in
@@ -30,8 +30,7 @@ include $(RTEMS_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
-all: $(SRCS)
- $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
- $(INSTALL) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE)
+all: preinstall
-install: all
+preinstall: $(SRCS)
+ @INSTALL@ $(INSTINCFLAGS) $(H_FILES) $(PROJECT_INCLUDE)
diff --git a/c/src/lib/libbsp/sh/gensh1/include/bsp.h b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
index ea7c370d77..8f676d07fe 100644
--- a/c/src/lib/libbsp/sh/gensh1/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
@@ -55,7 +55,11 @@ extern "C" {
#define MUST_WAIT_FOR_INTERRUPT 0
-#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
+#define Install_tm27_vector( handler ) \
+{ \
+ rtems_isr_entry ignored ; \
+ rtems_interrupt_catch( (handler), 0, &ignored ) ; \
+}
#define Cause_tm27_intr()
@@ -110,12 +114,14 @@ extern void bsp_cleanup( void );
/*
* FIXME: Should this go to libcpu/sh/sh7032 ?
*/
+#if 0
/* functions */
sh_isr_entry set_vector( /* returns old vector */
rtems_isr_entry handler, /* isr routine */
rtems_vector_number vector, /* vector number */
int type /* RTEMS or RAW intr */
);
+#endif
#ifdef __cplusplus
}
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
index 52be4a84fb..08adccc862 100644
--- a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
+++ b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
-C_PIECES=bsplibc bsppost bspstart bspclean sbrk setvec main
+C_PIECES=bsplibc bsppost bspstart bspclean sbrk main
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/sh/shared/setvec.c b/c/src/lib/libbsp/sh/shared/setvec.c
index 20bc080e23..e6c778b6a3 100644
--- a/c/src/lib/libbsp/sh/shared/setvec.c
+++ b/c/src/lib/libbsp/sh/shared/setvec.c
@@ -1,5 +1,9 @@
/* set_vector
*
+ * NOTE: This function is considered OBSOLETE and may vanish soon.
+ * Calls to set_vector should be replaced by calls to
+ * rtems_interrupt_catch or _CPU_ISR_install_raw_handler.
+ *
* This routine installs an interrupt vector on the target Board/CPU.
* This routine is allowed to be as board dependent as necessary.
*
@@ -52,4 +56,3 @@ sh_isr_entry set_vector( /* returns old vector */
return previous_isr;
}
-
diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
index 868d0cbf4b..885cdbd752 100644
--- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
+++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
@@ -152,7 +152,7 @@ void Install_clock(
*/
if ( BSP_Configuration.ticks_per_timeslice ) {
- Old_ticker = (rtems_isr_entry) set_vector( Clock_isr, CLOCK_VECTOR, 1 );
+ rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
/*
* Hardware specific initialize goes here
*/
@@ -280,8 +280,10 @@ rtems_device_driver Clock_control(
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
+ rtems_isr_entry ignored ;
rtems_interrupt_disable( isrlevel );
- (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
+ rtems_interrupt_catch( args->buffer, CLOCK_VECTOR, &ignored );
+
rtems_interrupt_enable( isrlevel );
}
}
diff --git a/c/src/lib/libcpu/sh/sh7032/include/Makefile.in b/c/src/lib/libcpu/sh/sh7032/include/Makefile.in
index 8b531dfb69..1a0b064c05 100644
--- a/c/src/lib/libcpu/sh/sh7032/include/Makefile.in
+++ b/c/src/lib/libcpu/sh/sh7032/include/Makefile.in
@@ -26,6 +26,3 @@ all: install
install:
test -d $(PROJECT_INCLUDE)/sh || $(MKDIR) $(PROJECT_INCLUDE)/sh
$(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)/sh
-
-all: FORCEIT
- cd ../../../../libbsp/$(RTEMS_CPU)/$(RTEMS_BSP)/include; $(MAKE) all
diff --git a/c/src/lib/libcpu/sh/sh7032/timer/timer.c b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
index 8aa6cb9b27..ddf8bfc06b 100644
--- a/c/src/lib/libcpu/sh/sh7032/timer/timer.c
+++ b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
@@ -62,10 +62,10 @@ rtems_boolean Timer_driver_Find_average_overhead;
void Timer_initialize( void )
{
- rtems_unsigned8 temp8;
+ rtems_unsigned8 temp8;
rtems_unsigned16 temp16;
rtems_unsigned32 level;
- rtems_isr* ignored;
+ rtems_isr *ignored;
/*
* Timer has never overflowed. This may not be necessary on some
@@ -117,7 +117,7 @@ void Timer_initialize( void )
write16( temp16, INTC_IPRC);
/* initialize ISR */
- ignored = set_vector( timerisr, ITU1_VECTOR, 0);
+ _CPU_ISR_install_raw_handler( ITU1_VECTOR, timerisr, &ignored );
_CPU_ISR_Enable( level);
/* start timer 1 */