[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Add udelay routine for ColdFire



2014-04-24 17:21 GMT+02:00 markus@mubf.de <markus@mubf.de>:
>
>
>
>> Another thing that must be taken into account with this approach are
>> Evaluation Boards.
>> FireTOS use STL 0 for system timer interrupt on EVBs.
>> Also System bus frequency (SYSCLK in the code above) is 133 for the
>> FireBee but looking at the FireTOS sources It seems that there are
>> some EVB (548X??) which have a 100 MHz bus. So the kernel should
>> figure out where is running on to give SYSCLK the correct value, or we
>> should make this configurable and make a specific kernel for those
>> boards.
>>
>>
>
> Unfortunately, there is no (easy) way of determining the clock speed on the Coldfires.
> You could, however, readout the JTAG id (MCF_SIU_JTAGID) and determine the
> processor type. If you find a MCF548x, you can be sure you are at SYSCLK=100000
> (or slower, but unlikely), if you find a MCF7474, you are probably on a Firebee with 132 MHz.

OK, for this kind of "inlined" code I think we should try to avoid
conditional branches and do it at compile time.
But in any case the delay with SLT0 won't work with FireTOS on
evaluations boards, but I don't think there are many users (if any)
running MiNT on those boards.

Alan and anybody else who wants to give an opinion, what ColdFire
udelay approach do we take? the less accurate but working with all V4e
ColdFires or the one more accurate that won't work with FireTOS on
evaluation boards? For the second method we should add some ColdFire
flags in KERNELDEFS file too.