From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 17 May 2011 12:41:53 +0530 Subject: [U-Boot] [PATCH v2 09/22] omap4: add spl support for OMAP4 SDP In-Reply-To: <20110516154814.D92D81491B07@gemini.denx.de> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1305472900-4004-10-git-send-email-aneesh@ti.com> <20110515183343.9D6771491B06@gemini.denx.de> <4DD134DD.6040802@ti.com> <20110516154814.D92D81491B07@gemini.denx.de> Message-ID: <4DD21FB9.6070901@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Monday 16 May 2011 09:18 PM, Wolfgang Denk wrote: > Dear Aneesh V, > > In message<4DD134DD.6040802@ti.com> you wrote: >> >>>> create mode 100644 spl/board/ti/omap4.mk >>>> create mode 100644 spl/board/ti/rules-omap.mk >>> >>> We do you introduce these files? Please omit them, and use a plain >>> Makefile instead. >> >> I introduced them because 'spl/board/ti/sdp4430/Makefile' and 'spl/board >> /ti/panda/Makefile' were exactly same and wanted to re-use the make >> rules. > > But in the result, the Makefiles are still the same, aren't they? Yes, but the contents are not duplicated in two files. Easier for maintenance. > >> I indeed wanted to abstract it out even further in future so that the >> make rules can be shared between OMAP3 and OMAP4 too. This way the >> changes needed to support a new board will be lesser and maintenance >> will be easier while adding new features. >> >> For instance, if I have to add NAND support today I just need to update >> omap4.mk instead of updating the Makefile of both panda and SDP. >> >> This re-use will be evident when you see a later patch that >> replicates the same Makefile for panda. > > Can you please rather try and move this to a common directory level, > then? The top-level make rule being the following, we will need a Makefile in the board directory, right? +SPL :$(TIMESTAMP_FILE) $(VERSION_FILE) depend tools + $(MAKE) -C spl/board/$(BOARDDIR) all > > I have a bad feeling about this. If the Makefiles are the same, then > the code is probably more or less the same, also. Eventually larger > parts of the code should be moved to a common directory, too? > In fact, code is already common. All OMAP code specific to SPL comes from spl/board/ti/spl-omap.c . All OMAP code shared with OMAP U-Boot comes from the respective directory within arch/arm/cpu/armv7/* In the interest of simplicity I deferred all board specific initialization of OMAP4(mainly mux) to U-Boot. So, SPL is board independent today for OMAP4. best regards, Aneesh