From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161069AbcFBLo1 (ORCPT ); Thu, 2 Jun 2016 07:44:27 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:60174 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161017AbcFBLoF (ORCPT ); Thu, 2 Jun 2016 07:44:05 -0400 From: Arnd Bergmann To: Scott Wood Cc: linuxppc-dev@lists.ozlabs.org, Ulf Hansson , Yangbo Lu , Mark Rutland , Xiaobo Xie , "linux-i2c@vger.kernel.org" , "linux-clk@vger.kernel.org" , Qiang Zhao , Russell King , Bhupesh Sharma , Joerg Roedel , Claudiu Manoil , "devicetree@vger.kernel.org" , Rob Herring , Santosh Shilimkar , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yang-Leo Li , "iommu@lists.linux-foundation.org" , Kumar Gala Subject: Re: [PATCH 4/4] Revert "powerpc/fsl: Move fsl_guts.h out of arch/powerpc" Date: Thu, 02 Jun 2016 11:01:45 +0200 Message-ID: <3225846.9EJ0sHv0XK@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1464830660.22191.6.camel@buserror.net> References: <1462417950-46796-1-git-send-email-yangbo.lu@nxp.com> <5513501.AmZs7h1vI2@wuerfel> <1464830660.22191.6.camel@buserror.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:3AZ1C3PPb1dg3rWOVeHrbU0IOVeQGoelJ4QFxeaBxCIZ/m4MDSW szSp97jMfrK/wtTBGbqXlpsSpdlsiEXSHEDXLR8yMGfs3uovA3LpJEEaK6GyMS7ci3B/dL4 WbHn1/uH/3/8SQEwb9rJ7wTOJNSghHIggICFBouGkBZHM6uqhOycEi1DTr7Hs29Jww/1lWb WkJyOSRgRW5YgYTZ0iliw== X-UI-Out-Filterresults: notjunk:1;V01:K0:QrGWbzoinm0=:r6iEzE3oQXgjot+8+yHxtm rI4NwijVuokC6t445DaSgp63VPhXXFJYbBiSb6LgiVO1h2RPomW6NEjZXA8y+GkNHqlk3YNNf 6nkJkRxTbQ9Y7z0oE1GztoQJ4Y3KhLpEQpWZIsnzowf6oxWgr1qdA1E5foq4TILnn2Cgf5PLf JaCSi44uWdgepDHbHIhoABtSriBwCwVvkkNdT96lmeqxP2DpDjYYnFhycTaPT+089Q2Hh/GUk pRvx4qS/0TPtGFQw2omh0uJcz+hlmiwjpKaviJgDXWeOkMemJ2icc7mO2AZUpAV5eOJsZixTP IMyJ23FcWKtIPpvY7YBsCag/zL9FvPPev05dkC0Vge1SmtTe7Lp8yT2kkCGrsgmARp1pDgAqQ rFYi0dLiH9dHwbsknx4g+0GgTKGT73RQNU7zoQo8gy28qLYw35ZTQwUlMW2Wh+ZREXdBNUeCD S+HHZF1Rb+jXkji3ZYgPb51wtxtGIenh1szhJPJEzLLPvDlIhRE7h2brv8h0S8l79Aa1IVIW/ fynDEOeE0DRTdS1aYb4l4U7SeVUvLpM+SNbESpolt5/qxnnFc1hIONyBNHrUT+g85hm1pLa8A YbnuhX4zjSMJb8wNDfraILJbpLga0LPc6iwxzZ/bLavgcjYCl7YPJdLYFPrblAvU7VjRsUrbP Z88/3gntYzGvOJeWTsmj7/9nVg7nqNLFBBPMRF6NTybfctkH6fyE6TB0jxjSmW6BPweRXQBLk oRFGhosdvudXjC09 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, June 1, 2016 8:24:20 PM CEST Scott Wood wrote: > On Mon, 2016-05-30 at 15:18 +0200, Arnd Bergmann wrote: > > All users of this driver are PowerPC specific and the header file > > has no business in the global include/linux/ hierarchy, so move > > it back before anyone starts using it on ARM. > > > > This reverts commit 948486544713492f00ac8a9572909101ea892cb0. > > > > Signed-off-by: Arnd Bergmann > > --- > > This part of the series is not required for the eSDHC quirk, > > but it restores the asm/fsl_guts.h header so it doesn't accidentally > > get abused for this in the future. I found two drivers outside of > > arch/powerpc that already accessed the registers directly, but the > > functions look fairly contained, and can be easily hidden in an > > #ifdef CONFIG_PPC > > NACK > > Besides adding ifdef pollution for no good reason, this register block is used > on some ARM chips as well. Why is it a problem if "anyone starts using it on > ARM"? It's just not a good interface when it's defined as "this is the layout of a register area that any driver can ioremap() if they can figure out the device node". It's not uncommon to have register areas like that, but normally you have at the minimum a 'syscon' device to handle locking between drivers accessing the same registers and to avoid having to map the same area multiple times. If we need to use 'guts' registers on ARM, we can find a way to abstract them properly for the given use cases, using a syscon or a driver with exported functions, but just making a PowerPC platform specific header global to all Linux drivers by putting it into include/linux doesn't seem right. Note that the header file uses a structure definition rather than the more common macros with register offsets, which is fine for a driver that has its own registers and abstracts them, but it doesn't really work with the regmap interface, so if we want to use it with syscon, it also needs to be rewritten. > BTW, of all the mailing lists you included on this CC, you seem to have left > off the PPC list (I've added it). Sorry, my mistake. Arnd