[U-Boot] [PATCH 7/9] imx: esdhc: Needed to use in imx-regs.h defined address

Timo Ketola timo at exertus.fi
Wed Apr 18 18:27:37 CEST 2012


On 18.04.2012 18:05, Stefano Babic wrote:
> On 18/04/2012 13:05, Timo Ketola wrote:
>> Stefano Babic wrote:
>>> Timo Ketola wrote:
>>>> PPC seems to use a predefined macro from asm/immap_8xxx.h files. Where
>>>> is that file included?
>>>
>>> It is a different way. The board configuration file includes the
>>> register description file, so for example immap_86xx.h, immap_85xx.h,
>>
>> Where? I don't see an example.
>
> For PPC86xx I can see at least:
>
> arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c:#include<asm/immap_86xx.h>
> arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c:#include<asm/immap_86xx.h>
> board/freescale/mpc8610hpcd/mpc8610hpcd.c:#include<asm/immap_86xx.h>
> board/freescale/mpc8641hpcn/mpc8641hpcn.c:#include<asm/immap_86xx.h>

Yes, I saw those but when you said that board configuration file includes 
those, I thought that you meant the header files in include/configs.

>> But I see them included in common.h.
>> Should there be also imx-regs? Seems to work if I do so.
>
> No, this is wrong.
...
>> Then I tried to include imx-regs.h in fsl_esdhc.c and 'MAKEALL -a arm'
>> was happy.
>>
>> Maybe the right fix is to include imx-regs in common.h?
>
> No. common.h, as the name suggests, is for all architectures, not only
> for i.MX. We cannot fix i:MX and break other boards.

But why PPC register description files are included there then? For example 
line 87:

#ifdef CONFIG_MPC86xx
#include <mpc86xx.h>
#include <asm/immap_86xx.h>
#endif

Is that deprecated?

And how would adding imx file with the same logic break other boards? I mean, 
putting there:

#if defined(CONFIG_MX25) || defined(CONFIG_MX31) || ...
#include <asm/arch/imx-regs.h>
#endif

But if the board configuration file in include/configs is the correct place to 
include it, I shall then find the obstacle on that approach...

--

Timo


More information about the U-Boot mailing list