From dad34779e94a53240ca68660b1c7ebee9fa33280 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 5 Sep 2008 22:06:54 +0000 Subject: 2008-09-05 Joel Sherrill * mpc5xx/clock/clock.c, mpc6xx/clock/c_clock.c, mpc8260/clock/clock.c, mpc8xx/clock/clock.c, ppc403/clock/clock.c, ppc403/clock/clock_4xx.c: The Shared Memory Driver no longer requires the special IOCTL in Clock_control. This was a hack which has existed since before the Classic API Timer Manager was implemented. All implementations of and references to Clock_control were removed. --- c/src/lib/libcpu/powerpc/ChangeLog | 9 +++++ c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c | 27 --------------- c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c | 42 ----------------------- c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c | 27 --------------- c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c | 27 --------------- c/src/lib/libcpu/powerpc/ppc403/clock/clock.c | 35 ------------------- c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c | 23 ------------- 7 files changed, 9 insertions(+), 181 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 6da17b4e03..bbe1ac26be 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,12 @@ +2008-09-05 Joel Sherrill + + * mpc5xx/clock/clock.c, mpc6xx/clock/c_clock.c, mpc8260/clock/clock.c, + mpc8xx/clock/clock.c, ppc403/clock/clock.c, ppc403/clock/clock_4xx.c: + The Shared Memory Driver no longer requires the special IOCTL in + Clock_control. This was a hack which has existed since before the + Classic API Timer Manager was implemented. All implementations of and + references to Clock_control were removed. + 2008-09-05 Joel Sherrill * mpc6xx/clock/c_clock.c: CLOCK_DRIVER_USE_FAST_IDLE must be checked to diff --git a/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c index 1cff296ec5..bdb915fb29 100644 --- a/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c @@ -167,30 +167,3 @@ rtems_device_driver Clock_initialize( return RTEMS_SUCCESSFUL; } - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) { - Clock_isr(0); /* vector number ignored */ - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) { - ReInstall_clock(args->buffer); - } - - done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c index 7a05cff62d..fc0f656ad5 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c @@ -303,45 +303,3 @@ rtems_interrupt_level l,tcr; 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_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - Clock_Decrementer_value = (BSP_bus_frequency/BSP_time_base_divisor)* - (rtems_configuration_get_microseconds_per_tick()/1000); - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - clockHandler(); - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - if (clock_handler == NULL) - Clock_initialize(major, minor, 0); - clock_handler = args->buffer; - } -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c index 22986f0cba..8f2304ba72 100644 --- a/c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c @@ -179,30 +179,3 @@ rtems_device_driver Clock_initialize( return RTEMS_SUCCESSFUL; } - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) { - Clock_isr(BSP_PERIODIC_TIMER); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) { - ReInstall_clock(args->buffer); - } - - done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c index dcae520175..0940991c05 100644 --- a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c @@ -179,30 +179,3 @@ rtems_device_driver Clock_initialize( return RTEMS_SUCCESSFUL; } - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) { - Clock_isr(PPC_IRQ_LVL0); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) { - ReInstall_clock(args->buffer); - } - - done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c index 7c30022fab..c01abe07cd 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c @@ -449,38 +449,3 @@ rtems_device_driver Clock_initialize( return RTEMS_SUCCESSFUL; } - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - { -#if PPC_HAS_CLASSIC_EXCEPTIONS - Clock_isr(PPC_IRQ_PIT); -#elif defined(BSP_PPC403_CLOCK_HOOK_EXCEPTION) - Clock_isr(NULL, BSP_PPC403_CLOCK_HOOK_EXCEPTION); -#else - Clock_isr(NULL); -#endif - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - ReInstall_clock(args->buffer); - } - -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c index 890e75509d..1a6d91cafb 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c +++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c @@ -226,26 +226,3 @@ rtems_device_driver Clock_initialize( return RTEMS_SUCCESSFUL; } - - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_libio_ioctl_args_t* args = pargp; - - if (args!=NULL) { - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - Clock_isr(NULL); - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - ReInstall_clock(args->buffer); - } - return RTEMS_SUCCESSFUL; -} -- cgit v1.2.3