From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932490Ab2IUSOX (ORCPT ); Fri, 21 Sep 2012 14:14:23 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:49619 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756616Ab2IUSOW (ORCPT ); Fri, 21 Sep 2012 14:14:22 -0400 MIME-Version: 1.0 In-Reply-To: <20120920213636.2ee27d41@skate> References: <1344689809-6223-1-git-send-email-sebastian.hesselbarth@gmail.com> <50559737.8000705@gmail.com> <201209201530.40974.arnd@arndb.de> <20120920213636.2ee27d41@skate> Date: Fri, 21 Sep 2012 20:14:20 +0200 Message-ID: Subject: Re: [PATCH v4 03/10] pinctrl: mvebu: kirkwood pinctrl driver From: Linus Walleij To: Thomas Petazzoni Cc: 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 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 20, 2012 at 9:36 PM, Thomas Petazzoni wrote: > If I understand correctly, we would like drivers to be able to read > some common "system" registers to figure out which SoC variant we are > running on. Such feature should normally be provided by code in > arch/arm/mach-*/ and called by drivers, but we are trying to eliminate > all dependencies of driver code on architecture code, correct? So what I think is that any such mechanism would defy the idea with device tree providing all platform configuration, including the ASIC/SoC variant. The only not-so-unelegant idea I have is for the machine to go in and fiddle with the device tree, e.g. add some info into the tree somewhere stating into the nodes which ASIC variant it is. Maybe even modify the compatible value at runtime. But it somehow feels like cracking an egg with a sledgehammer. I think we need to meditate on this. Yours, Linus Walleij