[U-Boot] [IXP42x PATCH series v4 04/17] Fix IXP code to work after relocation was added

Michael Schwingen rincewind at discworld.dascon.de
Sun May 22 21:15:03 CEST 2011


Am 05/21/2011 01:58 AM, schrieb Marek Vasut:
>
>> -int timer_init (void)
>> +unsigned long long get_ticks(void)
>>  {
>> -	/* install interrupt handler for timer */
>> -	irq_install_handler(IXP425_TIMER_2_IRQ, timer_isr, (void *)&timestamp);
>> -
>> -	/* setup the Timer counter value */
>> -	*IXP425_OSRT2 = (LATCH & ~IXP425_OST_RELOAD_MASK) | IXP425_OST_ENABLE;
>> +	ulong now = *IXP425_OSTS_B;
> Aren't you missing an IO accessor here ?
Oops - you are correct.


>> diff --git a/arch/arm/include/asm/arch-ixp/ixp425.h
>> b/arch/arm/include/asm/arch-ixp/ixp425.h index 2114437..5132607 100644
>> --- a/arch/arm/include/asm/arch-ixp/ixp425.h
>> +++ b/arch/arm/include/asm/arch-ixp/ixp425.h
>> @@ -391,9 +391,8 @@
>>  #define IXP425_TIMER_REG(x) (IXP425_TIMER_BASE_PHYS+(x))
>>  #endif
>>
>> -#if 0 /* test-only: also defined in npe/include/... */
>> -#define IXP425_OSTS	IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
>> -#endif
>> +/* _B to avoid collision: also defined in npe/include/... */
>> +#define IXP425_OSTS_B	IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
>>  #define IXP425_OST1	IXP425_TIMER_REG(IXP425_OST1_OFFSET)
>>  #define IXP425_OSRT1	IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)
>>  #define IXP425_OST2	IXP425_TIMER_REG(IXP425_OST2_OFFSET)
> This will eventually enjoy being converted to struct ixp_timer_regset { ... } 
> goo. If you already did it in some further patch, sorry, I didn't get there yet 
> ;-)
That would probably require a major rework of all the Intel access/NPE
library code - this is not something I want to touch now.
Most of these defines are used inside the Intel code, so cleaning up
only outside of that area would not improve the code much.

cu
Michael



More information about the U-Boot mailing list