From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 25 Nov 2011 20:33:58 +0100 Subject: [U-Boot] yet another arm mach-types.h thread In-Reply-To: <201111242329.40991.michael@walle.cc> References: <201111242329.40991.michael@walle.cc> Message-ID: <4ECFEDA6.1060007@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 24/11/2011 23:29, Michael Walle a ?crit : > > Hi, > > As there was no real conclusion on my previous "arm mach-types.h" thread, i > have to reemphasize that the current mach types handling is broken. > > 1. u-boot follows linux mach-types.h > 2. linux only includes ids > a, they have (non DT!) board support for or > b, id which are not older than 12 months. > > Now there are the following cases with problems: > - boards which have no linux support but uboot support These need no machine ID. Machine ID is a Linux thing, right? > - boards which have only dt support within linux. uboot won't be able to boot > these board with older kernels, which do not have dt support, but instead > still using the old-fashioned setup code. I'm not sure I get this one right. If we're talking about boards that started out with a machine ID and then went DT-only, then they did not lose their machine ID, did they? And U-Boot is aiming at supporting device trees, right, so boards with DT support won't need a machine ID long, right? > - boards which have only dt support in mainline kernel but have been > backported to older kernels and old-fashioned setup code. > - there will always be regressions when pulling the newest mach-types.h from > linux Indeed. And these regressions will help show which boards are still alive and which are dead and should be removed from the codebase (or maybe have moved to DT and might require device tree support in U-Boot). > The proposed solution was to add the ID to the board config. Why not put all > ids into the board configs then and remove the mach-types.h? There is no need for a broad generalization. The general case should be that board support in U-Boot provide device tree (resp. machine ID) support to boards for which Linux supports device trees (resp. machine IDs), and other cases are exceptions that deserve specific treatment such as, for instance, custom machine ID support in config files. > Maybe you want to > have database with all ids? But with tracking the linux mach-types.h you > always have the database with boards _linux mainline_ supports and not the > boards uboot supports. Something seems to be broken there :) That's because you consider machine IDs to mean "supported by U-Boot" whereas basically they say "still supported by Linux without a device tree". > IMHO either you say > - you have a database, that way you have to include the ids _you_ support or > - you don't have such a file and have the ids scattered all across the board > configs. There is a database, it is mach-types.h, and it lists the boards for which Linux currently supports machine IDs. IDs in config files are for boards which want to advertise a machine ID to Linux despite mainline Linux currently not supporting their machine ID. Amicalement, -- Albert.