This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS Arch fix for hal_delay_us


Tim Michals wrote:
All,

In mips/arch/hal_misc.c function hal_delay_us uses counter/compare in the
MIPS core.  If a HAL would like to use a different timer this causes an
issue, due to how HAL_DELAY_US is defined.
Several options that I could see:
1) replace the assembly with #define for reading the timer
2) hal_intr.h move the #define
externC void hal_delay_us(int us);
#define HAL_DELAY_US(n)          hal_delay_us(n)
into the CYGHWR_HAL_CLOCK_CONTROL_DEFINED  and have the user supply the
function and macro

Enclosed is a fix for 1) is this ok?  Is there another way?
Since the asm is essentially the definition of HAL_CLOCK_READ, I don't see the problem. Applied (with val2 for the second as per your other mail).

Please include a ChangeLog entry in future. I wrote one for you this time.

Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]