From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timo Ketola Date: Wed, 18 Apr 2012 19:27:37 +0300 Subject: [U-Boot] [PATCH 7/9] imx: esdhc: Needed to use in imx-regs.h defined address In-Reply-To: <4F8ED82F.5010905@denx.de> References: <1334223234-23383-1-git-send-email-timo@exertus.fi> <1334735852-23415-1-git-send-email-timo@exertus.fi> <1334735852-23415-8-git-send-email-timo@exertus.fi> <4F8E7ECC.3000507@denx.de> <4F8E8529.30809@exertus.fi> <4F8E97DF.5060700@denx.de> <4F8E9FF3.8050805@exertus.fi> <4F8ED82F.5010905@denx.de> Message-ID: <4F8EEB79.10305@exertus.fi> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c:#include > board/freescale/mpc8610hpcd/mpc8610hpcd.c:#include > board/freescale/mpc8641hpcn/mpc8641hpcn.c:#include 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 #include #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 #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