[U-Boot] [PATCH 1/5] vybrid: add vybrid CPU support
Stefano Babic
sbabic at denx.de
Sun Apr 28 12:59:20 CEST 2013
On 28/04/2013 12:36, Wang Huan-B18965 wrote:
>>
>> I would like to understand there common code should be put. As you
>> can see, for i.MX there is a imx_common directory that is valid
>> across ARM-Core.
> [Alison Wang] I'm trying to align the soc with i.mx platform and will
> use i.MX's imx_common directory in the next version. But there are
> still some issues for sharing the I.MX platform,
>
> 1. i.mx family uses GPT in timer.c. VF600 doesn't have GPT but a
> Periodic Interrupt Timer(PIT) which I think is totally different with
> GPT. Too much ifdef in the timer.c seems unacceptable. So I plan to
> modify the Makefile and add a pit.c file in imx_common directory for
> the timer on this Vybrid platform, How do you think about this idea?
> Thanks.
We do not need to put everything in imx-common if there is nothing in
common. Of course, a new driver is fully acceptable if it support a
device that it is not yet mainlined.
> 2. The SRC_SRSR register definition on VF600 is different with i.MX.
> To reuse the get_reset_cause() function in cpu.c, some platform
> related ifdef will be introduced. For example: #ifdef CONFIG_MVF600
> case 0x00080: return "EXTERNAL RESET"; #endif
>
> Does this kind of ifdef acceptable? Thanks.
Only if there are some differences, but most code is shared. We have a
get_reset_cause() in imx-common/cpu.c, but also a specific
get_reset_cause() for mx25/mx31/mx35. The question can be better
answered after you post the code.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list