summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/gen68302
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-30 21:54:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-30 21:54:45 +0000
commit97005786d89fd7a57b5fe82f713cea739916f3da (patch)
treecfff15a6bc93114480ecd20f6afddde3dcd74470 /c/src/lib/libbsp/m68k/gen68302
parentreordered test cases from simple to complex (diff)
downloadrtems-97005786d89fd7a57b5fe82f713cea739916f3da.tar.bz2
SPARC port passes all tests
Diffstat (limited to 'c/src/lib/libbsp/m68k/gen68302')
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c18
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/start/start302.s9
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/start302/start302.s9
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c11
4 files changed, 12 insertions, 35 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c b/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
index f842bbc83c..386fc026a7 100644
--- a/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/gen68302/clock/ckinit.c
@@ -89,7 +89,7 @@ void Install_clock(
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
if ( BSP_Configuration.ticks_per_timeslice ) {
-/* set_vector( clock_isr, CLOCK_VECTOR, 1 );*/
+ set_vector( clock_isr, CLOCK_VECTOR, 1 );
m302.reg.trr1 = TRR1_VAL; /* set timer reference register */
m302.reg.tmr1 = TMR1_VAL; /* set timer mode register & enable */
@@ -102,17 +102,6 @@ void Install_clock(
}
}
-void ReInstall_clock(
- rtems_isr_entry clock_isr
-)
-{
- rtems_unsigned32 isrlevel;
-
- rtems_interrupt_disable( isrlevel );
- /* (void) set_vector( clock_isr, CLOCK_VECTOR, 1 ); */
- rtems_interrupt_enable( isrlevel );
-}
-
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
@@ -145,6 +134,7 @@ rtems_device_driver Clock_control(
void *pargp
)
{
+ rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
@@ -161,7 +151,9 @@ rtems_device_driver Clock_control(
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
- ReInstall_clock(args->buffer);
+ rtems_interrupt_disable( isrlevel );
+ (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
+ rtems_interrupt_enable( isrlevel );
}
done:
diff --git a/c/src/lib/libbsp/m68k/gen68302/start/start302.s b/c/src/lib/libbsp/m68k/gen68302/start/start302.s
index d92ed1ce6b..311cd3fa39 100644
--- a/c/src/lib/libbsp/m68k/gen68302/start/start302.s
+++ b/c/src/lib/libbsp/m68k/gen68302/start/start302.s
@@ -193,7 +193,6 @@ cpy_Bad1: move.l d1,(a0)+
| move.l #_cnsl_isr,vbase+0x028 | SCC2
move.l #timerisr,vbase+0x018 | Timer ISR
- move.l #RTC_ISR,vbase+0x024 | Real Time Clock ISR
|
| zero out uninitialized data area
@@ -236,14 +235,6 @@ loop: movel d0,a1@+ | to zero out uninitialized
Bad: bra Bad
nop
-RTC_ISR:
- movem.l d0-d1/a0-a1,a7@- | save d0-d1,a0-a1
- addql #1,_ISR_Nest_level | one nest level deeper
- addql #1,_Thread_Dispatch_disable_level
- | disable multitasking
-
- jbsr Clock_isr | invoke the user ISR
- jmp _ISR_Exit
END_CODE
diff --git a/c/src/lib/libbsp/m68k/gen68302/start302/start302.s b/c/src/lib/libbsp/m68k/gen68302/start302/start302.s
index d92ed1ce6b..311cd3fa39 100644
--- a/c/src/lib/libbsp/m68k/gen68302/start302/start302.s
+++ b/c/src/lib/libbsp/m68k/gen68302/start302/start302.s
@@ -193,7 +193,6 @@ cpy_Bad1: move.l d1,(a0)+
| move.l #_cnsl_isr,vbase+0x028 | SCC2
move.l #timerisr,vbase+0x018 | Timer ISR
- move.l #RTC_ISR,vbase+0x024 | Real Time Clock ISR
|
| zero out uninitialized data area
@@ -236,14 +235,6 @@ loop: movel d0,a1@+ | to zero out uninitialized
Bad: bra Bad
nop
-RTC_ISR:
- movem.l d0-d1/a0-a1,a7@- | save d0-d1,a0-a1
- addql #1,_ISR_Nest_level | one nest level deeper
- addql #1,_Thread_Dispatch_disable_level
- | disable multitasking
-
- jbsr Clock_isr | invoke the user ISR
- jmp _ISR_Exit
END_CODE
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index 94973ea4cc..af512c0d8e 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -130,18 +130,21 @@ void
bsp_postdriver_hook(void)
{
int stdin_fd, stdout_fd, stderr_fd;
+ int error_code;
+
+ error_code = 'S' << 24 | 'T' << 16;
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD0');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD1');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD2');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
- rtems_fatal_error_occurred('STIO');
+ rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
}
int main(