Mercurial > ecos
changeset 166:5602a8379ebc
Merge from eCos master repository on 2001-06-29-08:31:51-BST
| author | jlarmour |
|---|---|
| date | Fri, 29 Jun 2001 14:45:50 +0000 |
| parents | d63db767121d |
| children | 59f91bb9f684 |
| files | packages/devs/flash/intel/28fxxx/current/ChangeLog packages/devs/flash/intel/28fxxx/current/include/flash_28fxxx.inl packages/hal/common/current/ChangeLog packages/hal/common/current/include/hal_arbiter.h packages/hal/common/current/include/hal_misc.h packages/hal/powerpc/mpc8xx/current/ChangeLog packages/hal/powerpc/mpc8xx/current/src/var_intr.c |
| diffstat | 7 files changed, 125 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/flash/intel/28fxxx/current/ChangeLog +++ b/packages/devs/flash/intel/28fxxx/current/ChangeLog @@ -1,3 +1,7 @@ +2001-06-29 Jesper Skov <jskov@redhat.com> + + * include/flash_28fxxx.inl: Fix 28F160 block size. + 2001-06-20 Jesper Skov <jskov@redhat.com> * include/flash_28fxxx.inl (flash_hwr_init): Fix bad size
--- a/packages/devs/flash/intel/28fxxx/current/include/flash_28fxxx.inl +++ b/packages/devs/flash/intel/28fxxx/current/include/flash_28fxxx.inl @@ -83,7 +83,7 @@ // And select one of the below device variants #ifdef CYGPKG_DEVS_FLASH_INTEL_28F160 -# define FLASH_BLOCK_SIZE (0x8000*CYGNUM_FLASH_INTERLEAVE) +# define FLASH_BLOCK_SIZE (0x10000*CYGNUM_FLASH_INTERLEAVE) # define FLASH_NUM_REGIONS (32) # define CYGNUM_FLASH_WIDTH (16) # define CYGNUM_FLASH_BLANK (1)
--- a/packages/hal/common/current/ChangeLog +++ b/packages/hal/common/current/ChangeLog @@ -1,3 +1,9 @@ +2001-06-29 Jesper Skov <jskov@redhat.com> + + * include/hal_misc.h: Moved arbiter helper to + * include/hal_arbiter.h: this file to avoid header file inclusion + order problems. + 2001-06-28 Jesper Skov <jskov@redhat.com> * include/hal_misc.h (hal_call_isr): Added. Used by ISR arbiters.
new file mode 100644 --- /dev/null +++ b/packages/hal/common/current/include/hal_arbiter.h @@ -0,0 +1,109 @@ +#ifndef CYGONCE_HAL_HAL_ARBITER_H +#define CYGONCE_HAL_HAL_ARBITER_H + +//============================================================================= +// +// hal_arbiter.h +// +// Functionality used by ISR arbiters +// +//============================================================================= +//####COPYRIGHTBEGIN#### +// +// ------------------------------------------- +// The contents of this file are subject to the Red Hat eCos Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.redhat.com/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations under +// the License. +// +// The Original Code is eCos - Embedded Configurable Operating System, +// released September 30, 1998. +// +// The Initial Developer of the Original Code is Red Hat. +// Portions created by Red Hat are +// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc. +// All Rights Reserved. +// ------------------------------------------- +// +//####COPYRIGHTEND#### +//============================================================================= +//#####DESCRIPTIONBEGIN#### +// +// Author(s): jskov +// Contributors:jskov +// Date: 2001-06-29 +// Purpose: Functionality used by ISR arbiters +// Usage: #include <cyg/hal/hal_arbiter.h> +// +//####DESCRIPTIONEND#### +// +//============================================================================= + +#include <cyg/hal/hal_intr.h> // hal_interrupt_x tables +#include <cyg/hal/drv_api.h> // CYG_ISR_HANDLED + +//============================================================================= +// Function used to call ISRs from ISR arbiters +// An arbiter is hooked on the shared interrupt vector and looks like this: +// +// cyg_uint32 _arbitration_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data) +// { +// cyg_uint32 isr_ret; +// // decode interrupt source and for each active source call the ISR +// if (source_A_active) { +// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_A); +// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN +// if (isr_ret & CYG_ISR_HANDLED) +// #endif +// return isr_ret; +// } +// if (source_B_active) { +// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_B); +// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN +// if (isr_ret & CYG_ISR_HANDLED) +// #endif +// return isr_ret; +// } +// ... +// return 0; +// } +// +// Remember to attach and enable the arbiter source: +// HAL_INTERRUPT_ATTACH(CYGNUM_HAL_INTERRUPT_ARBITER, &_arbitration_isr, 0, 0); +// HAL_INTERRUPT_SET_LEVEL(CYGNUM_HAL_INTERRUPT_ARBITER, 1); +// HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_ARBITER); +// + +typedef cyg_uint32 cyg_ISR(cyg_uint32 vector, CYG_ADDRWORD data); + +extern void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj ); + +static inline cyg_uint32 +hal_call_isr (cyg_uint32 vector) +{ + cyg_ISR *isr; + CYG_ADDRWORD data; + cyg_uint32 isr_ret; + + isr = (cyg_ISR*) hal_interrupt_handlers[vector]; + data = hal_interrupt_data[vector]; + + isr_ret = (*isr) (vector, data); + +#ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT + if (isr_ret & CYG_ISR_CALL_DSR) { + cyg_interrupt_post_dsr (hal_interrupt_objects[vector]); + } +#endif + + return isr_ret & ~CYG_ISR_CALL_DSR; +} + +//----------------------------------------------------------------------------- +#endif // CYGONCE_HAL_HAL_ARBITER_H +// End of hal_arbiter.h
--- a/packages/hal/common/current/include/hal_misc.h +++ b/packages/hal/common/current/include/hal_misc.h @@ -48,66 +48,6 @@ #include <cyg/infra/cyg_type.h> // types & externC //============================================================================= -// Function used to call ISRs from ISR arbiters -// An arbiter is hooked on the shared interrupt vector and looks like this: -// -// cyg_uint32 _arbitration_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data) -// { -// cyg_uint32 isr_ret; -// // decode interrupt source and for each active source call the ISR -// if (source_A_active) { -// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_A); -// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN -// if (isr_ret & CYG_ISR_HANDLED) -// #endif -// return isr_ret; -// } -// if (source_B_active) { -// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_B); -// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN -// if (isr_ret & CYG_ISR_HANDLED) -// #endif -// return isr_ret; -// } -// ... -// return 0; -// } -// -// Remember to attach and enable the arbiter source: -// HAL_INTERRUPT_ATTACH(CYGNUM_HAL_INTERRUPT_ARBITER, &_arbitration_isr, 0, 0); -// HAL_INTERRUPT_SET_LEVEL(CYGNUM_HAL_INTERRUPT_ARBITER, 1); -// HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_ARBITER); -// - -#include <cyg/hal/hal_intr.h> // hal_interrupt_x tables -#include <cyg/hal/drv_api.h> // CYG_ISR_HANDLED - -typedef cyg_uint32 cyg_ISR(cyg_uint32 vector, CYG_ADDRWORD data); - -extern void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj ); - -static inline cyg_uint32 -hal_call_isr (cyg_uint32 vector) -{ - cyg_ISR *isr; - CYG_ADDRWORD data; - cyg_uint32 isr_ret; - - isr = (cyg_ISR*) hal_interrupt_handlers[vector]; - data = hal_interrupt_data[vector]; - - isr_ret = (*isr) (vector, data); - -#ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT - if (isr_ret & CYG_ISR_CALL_DSR) { - cyg_interrupt_post_dsr (hal_interrupt_objects[vector]); - } -#endif - - return isr_ret & ~CYG_ISR_CALL_DSR; -} - -//============================================================================= externC cyg_bool cyg_hal_is_break(char *buf, int size); externC void cyg_hal_user_break( CYG_ADDRWORD *regs ); #endif
--- a/packages/hal/powerpc/mpc8xx/current/ChangeLog +++ b/packages/hal/powerpc/mpc8xx/current/ChangeLog @@ -1,3 +1,7 @@ +2001-06-29 Jesper Skov <jskov@redhat.com> + + * src/var_intr.c: Include new arbiter header. + 2001-06-28 Jesper Skov <jskov@redhat.com> * src/var_intr.c: Moved hal_call_isr to hal_misc.h in common HAL.
--- a/packages/hal/powerpc/mpc8xx/current/src/var_intr.c +++ b/packages/hal/powerpc/mpc8xx/current/src/var_intr.c @@ -44,7 +44,7 @@ #include <pkgconf/hal.h> #include <cyg/hal/ppc_regs.h> -#include <cyg/hal/hal_misc.h> +#include <cyg/hal/hal_arbiter.h> //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #ifdef CYGPKG_HAL_POWERPC_MPC860
