Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757225AbbEVNUr (ORCPT ); Fri, 22 May 2015 09:20:47 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:65425 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756751AbbEVNUq (ORCPT ); Fri, 22 May 2015 09:20:46 -0400 From: Arnd Bergmann To: Stefan Agner Cc: Sanchayan Maity , linux-arm-kernel@lists.infradead.org, shawn.guo@linaro.org, kernel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] soc: Add driver for Freescale Vybrid Platform Date: Fri, 22 May 2015 15:20 +0200 Message-ID: <3574233.JhJlJx8SSu@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <61585e4449cfc1f36e16a64b9b4a54fe@agner.ch> References: <35561091.AtkcGa6qVG@wuerfel> <61585e4449cfc1f36e16a64b9b4a54fe@agner.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:s4sBVcgXSrNW+P9DgF9AMDth9IjJarrMl/OoKrtrj3km91jLpEY rt0skARHJUcBIY1aq5rk12A5g/2Q7Sh2Pqk5fK1upkxFCBCRpP65BmiWQky7OTxne9bNO5n axdpGdzoORHRcYQ8NEJFPRxvk9gK/PxwDUapQWBZE+TpzLnQ2JxI9HIqZ5wht3eZaEo+Q+v ZsbsyS1LPxiX2BLemFSiw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 38 On Friday 22 May 2015 14:02:52 Stefan Agner wrote: > > Can you use syscon_regmap_lookup_by_phandle instead, and put the > > phandles in the fsl,vf610-mscm-cpucfg node? > > Hm, with that we would wire up hardware modules which does nothing has > to do with each other. We just happen to need a driver which collects > information accross the SoC. I'm not sure we should put the modules > required into the device tree. > > I don't think its nice to have the compatible strings in the source > code, however it feels more appropriate than in the device tree, IMHO... I see. Another option would be to point directly to the registers you need: ocotp-cfg0 = <&ocotp 0x10>; ocotp-cfg1 = <&ocotp 0x20>; rom-revision = <&rom 0x80>; We don't yet have an abstraction to access a register from a syscon reference like this, but you could either roll your own here, or add a generic abstraction. > > Also, I'd argue that the mscm should not be a syscon device at all, > > but instead I'd use platform_get_resource()/devm_ioremap_resource() > > to get an __iomem pointer. > > We need to have mscm-cpucfg to be syscon because we need to get the CPU > personality in the MSCM interrupt router driver (irq-vf610-mscm-ir.c). It can be both at the same time now. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/