This is the mail archive of the
mailing list for the eCos project.
Re: LPC2XXX interrupt_acknowledge
if is it possible, commit please this one for the LPC2XXX varient too.
> This seems like a worthwhile thing to add to the LPC2xxx hal.
> ----- Original Message -----
> From: "Andrew Lunn" <firstname.lastname@example.org>
> To: "Sergei Gavrikov" <email@example.com>
> Cc: "Andrew Lunn" <firstname.lastname@example.org>; "Andy Jackson" <email@example.com>;
> Sent: Monday, May 08, 2006 10:59 AM
> Subject: Re: LPC2XXX interrupt_acknowledge
>> On Mon, May 08, 2006 at 02:06:57PM +0300, Sergei Gavrikov wrote:
>>> Thank you for this commit. I have an eCos newbie question.
>>> I have looked var_misc.c sources for other ARM platforms. Most of them
>>> usually has call hal_plf_hardware_init() after the hal_if_init() call
>>> the hal_hardware_init() epilogue. So, the platform layer has point for
>>> additional hardware initializing in C. Sorry, but LPC2XXX variant init
>>> (in the lpc2xxx_misc.c) have no such a call. Therefore, we have one
>>> point for the early hardware initializing in the hal_platform_setup.h
>>> for the evolution boards (in assembler only). There is no other point
>>> for the hardware initializing in the lpc2xxx platforms.
>> I had a similar problem with the AT91 varient HAL. What i did there was
>> #ifdef HAL_PLF_HARDWARE_INIT
>> // Perform any platform specific initializations
>> into hal_hardware_init().
>> The platform hal then has something like:
>> // The platform needs this initialization during the
>> // hal_hardware_init() function in the varient HAL.
>> #ifndef __ASSEMBLER__
>> extern void hal_plf_hardware_init(void);
>> #define HAL_PLF_HARDWARE_INIT() \
>> in plf_io.h and the necassary code in the _misc.c file.
>> Doing it like this with a #define means you do not have to edit all
>> the platform HALs adding an empty function. You just have the function
>> when you need it.
diff -ur ecos/packages/hal/arm/lpc2xxx/var/current/src/lpc2xxx_misc.c ecos.patched/packages/hal/arm/lpc2xxx/var/current/src/lpc2xxx_misc.c
--- ecos/packages/hal/arm/lpc2xxx/var/current/src/lpc2xxx_misc.c 2006-05-08 12:54:56.000000000 +0300
+++ ecos.patched/packages/hal/arm/lpc2xxx/var/current/src/lpc2xxx_misc.c 2006-05-08 14:08:19.000000000 +0300
@@ -234,6 +234,12 @@
+ // Perform any platform specific initializations
// Set up eCos/ROM interfaces