From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbbCLGw6 (ORCPT ); Thu, 12 Mar 2015 02:52:58 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:49334 "EHLO mailhub1.si.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbbCLGw5 (ORCPT ); Thu, 12 Mar 2015 02:52:57 -0400 Message-ID: <550137C5.1020109@c-s.fr> Date: Thu, 12 Mar 2015 07:52:53 +0100 From: leroy christophe User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Mark Brown CC: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-spi@vger.kernel.org Subject: Re: [PATCH] spi: fsl-spi: use of_iomap() to map parameter ram on CPM1 References: <20150226161142.D08681A2360@localhost.localdomain> <20150303184403.GE21293@sirena.org.uk> <54F6BBA7.8040008@c-s.fr> <20150306114413.GM21293@sirena.org.uk> In-Reply-To: <20150306114413.GM21293@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 06/03/2015 12:44, Mark Brown a écrit : > On Wed, Mar 04, 2015 at 09:00:39AM +0100, leroy christophe wrote: >> Le 03/03/2015 19:44, Mark Brown a écrit : >>> Why are we using of_iomap() rather than a generic I/O mapping function >>> here? >> because all drivers for powerpc seems to be using of_iomap(), as on powerpc >> the HW is described by the bootloader in a OF device tree. >> Today, of_iomap() is at least used in FSL SPI, FSL UART, SPI mpc52xx, UART >> mpc52xx, i2c-mpc, i2c-cpm, freescale ethernet drivers, etc .... >> Is it not correct ? > It's legacy, all that code is really old. Modern code is written in as > architecture and firmware neutral a fashion as possible to make things > more consistent and maintainable. This patch is only a small bug fix. That driver already contains calls to of_iomap() and other related of_ functions. Is it worth rewriting the driver for just a small bug fix ? Christophe