From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756114Ab2ITTv3 (ORCPT ); Thu, 20 Sep 2012 15:51:29 -0400 Received: from londo.lunn.ch ([80.238.139.98]:38594 "EHLO londo.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754654Ab2ITTv2 (ORCPT ); Thu, 20 Sep 2012 15:51:28 -0400 Date: Thu, 20 Sep 2012 21:51:06 +0200 From: Andrew Lunn To: Thomas Petazzoni Cc: Linus Walleij , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth , Andrew Lunn , Russell King , Jason Cooper , Stephen Warren , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Grant Likely , Lior Amsalem , Ben Dooks , Rob Landley , Gregory CLEMENT Subject: Re: [PATCH v4 03/10] pinctrl: mvebu: kirkwood pinctrl driver Message-ID: <20120920195106.GY28177@lunn.ch> References: <1344689809-6223-1-git-send-email-sebastian.hesselbarth@gmail.com> <50559737.8000705@gmail.com> <201209201530.40974.arnd@arndb.de> <20120920213636.2ee27d41@skate> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120920213636.2ee27d41@skate> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > So, wouldn't we need a small, architecture-independent, infrastructure, > through which architecture-specific code could "register" at boot > time which SoC we are running on, and drivers could query this > information from the common infrastructure? > > Of course, the major problem is to figure out what is the good > representation for this SoC identifier. Do we need a big list of SoCs > like we had machine IDs? A simple string? Or maybe there is just no > good way, and the whole idea is moot. I did think about stuffing it inside the cpuinfo structures: $ cat /proc/cpuinfo Processor : Feroceon 88FR131 rev 1 (v5l) BogoMIPS : 1196.85 Features : swp half thumb fastmult edsp CPU implementer : 0x56 CPU architecture: 5TE CPU variant : 0x2 CPU part : 0x131 CPU revision : 1 Hardware : BUBBA3 Kirkwood based miniserver Revision : 0000 Serial : 0000000000000000 I could imaging a SoC : MV88F6281 It would probably need a bit of string parsing by any consumer, which is not so good. Andrew