From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 21 May 2010 11:07:19 -0500 Subject: [U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board In-Reply-To: <20100521142256.8AC57E67644@gemini.denx.de> References: <1274392909-16422-1-git-send-email-timur@freescale.com> <20100520223324.50594CCF026@gemini.denx.de> <20100521070719.5B27BCCF026@gemini.denx.de> <4BF68E6A.4070801@freescale.com> <20100521142256.8AC57E67644@gemini.denx.de> Message-ID: <4BF6AFB7.6000107@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: >>>>>> > >>>> +#ifndef __ASSEMBLY__ >>>>>> > >>>> +extern unsigned long calculate_board_sys_clk(void); >>>>>> > >>>> +extern unsigned long calculate_board_ddr_clk(void); >>>>>> > >>>> +#endif >>>>> > >>> >>>>> > >>> Please move to appropriate header file. > ... >> > Well, this particular change would probably need to be made later, because I >> > would probably need to change all the board header files at once. It's not >> > trivial. > What exactly is not trivial in moving some prototype declarations to > another header file? Please elucidate. The most difficult part is > probably determining where they actually belong to. Well, I'm having a hard time finding a good header file. For the P1022DS, I just need to have this macros known to speed.c, so I could add these lines to the top of /arch/powerpc/cpu/mpc85xx/speed.c: #include #include #include #include /* Clock frequency */ unsigned long calculate_board_sys_clk(void); unsigned long calculate_board_ddr_clk(void); DECLARE_GLOBAL_DATA_PTR; But I suspect this will not be sufficient for all of the other 85xx boards. Another option is arch/powerpc/include/asm/config.h, but that header file doesn't have any function prototypes today. There's also include/common.h, near this block: #if defined(CONFIG_MPC85xx) typedef MPC85xx_SYS_INFO sys_info_t; void get_sys_info ( sys_info_t * ); ulong get_ddr_freq (ulong); #endif #if defined(CONFIG_MPC86xx) typedef MPC86xx_SYS_INFO sys_info_t; void get_sys_info ( sys_info_t * ); #endif Suggestions? -- Timur Tabi Linux kernel developer at Freescale