From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Samuelsson Date: Tue, 22 Aug 2006 16:58:16 +0200 Subject: [U-Boot-Users] Adding multiple MIPS based SoCs? References: <20060822144812.991A3353A61@atlas.denx.de> Message-ID: <00a201c6c5fc$13e4a5a0$104765d5@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >> We are in the process of adding our internal U-Boot changes to the latest >> public U-Boot. One "problem" we face is that we have multiple SoCs each >> with a (slightly) different MIPS core variant. Adding them all under >> cpu/mips and #ifdef-ing start.S does not seem appealing. Our preference >> is to have a separate cpu directory for each SoC, more or less as is done >> for the MPCs. Any ideas, suggestions? Thanks in advance. > > There is no general answer so such a vague question. If there are > inded only slight differences, separate directories would probably > contain mostly duplicated code, which is unacceptable. Then rather > have a few (I really mean *few*) #ifdef's, or call some private init > function which can be implemented in a board / SoC specific way. > Have been thinking of similar problems: The README file says that the board directory needs to have a board*.c u-boot.lds flash.c Since the flash.c is in many cases identical, does it not make more sense to have it in the drivers directory, and then call it something more specific like: at45dbxxx.c at49bvxxx.c Then anyone can use these files for their board, instead of duplicating the file. > Best regards, > > Wolfgang Denk > Please do not send mails or "reply" to ulfs at dof.se, since it will be routed to my GSM phone. My email address is ulf at atmel.com Best Regards Ulf Samuelsson ulf at atmel.com Atmel Nordic AB Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29 GSM +46 (706) 22 44 57 Technical support when I am not available: AT89 C51 Applications Group: mailto:micro.hotline at nto.atmel.com AT90 AVR Applications Group: mailto:avr at atmel.com AT91 ARM Applications Group: mailto:at91support at atmel.com FPSLIC Application Group: mailto:fpslic at atmel.com Best AVR link: www.avrfreaks.net