Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755484AbbHFKWk (ORCPT ); Thu, 6 Aug 2015 06:22:40 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:39016 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754579AbbHFKWi (ORCPT ); Thu, 6 Aug 2015 06:22:38 -0400 Date: Thu, 6 Aug 2015 11:22:25 +0100 From: Russell King - ARM Linux To: Michal Suchanek Cc: Mark Brown , "R, Vignesh" , devicetree , Brian Norris , Tony Lindgren , Linux Kernel Mailing List , linux-spi , Huang Shijie , MTD Maling List , linux-omap@vger.kernel.org, David Woodhouse , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Message-ID: <20150806102225.GI7576@n2100.arm.linux.org.uk> References: <20150731181745.GM20873@sirena.org.uk> <55BEF4AF.5090704@ti.com> <20150804155148.GR20873@sirena.org.uk> <55C0FD98.1090107@ti.com> <20150805115013.GJ20873@sirena.org.uk> <20150805124412.GN20873@sirena.org.uk> <20150806090202.GO20873@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2163 Lines: 56 On Thu, Aug 06, 2015 at 12:01:37PM +0200, Michal Suchanek wrote: > Disclaimer: I am not familiar with the hardware for which this patch > adds support. > > However, I am familiar m25p80.c and as I understand it the controller > is basically supposed to implement m25p80.c in hardware when this flag > is set. That, to me, sounds like what you have is: ---m25p80 specific interface--->SPI bus--->m25p80 device Where the m25p80 specific interface does not expose direct access to the SPI bus? If that's the case, then maybe you should consider whether using the SPI bus infrastructure is really the best way forward. Would it make more sense instead to adopt a different software structure, something more high-level like: +-------------------------------------------+ | m25p80 high-level driver | +----------------------+--------------------+ | SPI m25p80 driver | | +----------------------+ | | SPI layer | Special driver | +----------------------+ | | SPI bus driver | | +----------------------+--------------------+ | SPI hardware | Special hardware | +----------------------+--------------------+ Rather than what you seem to be trying to do, which seems to be: +----------------------+ | SPI m25p80 driver | +----------------------+ | SPI layer | +----------------------+ | Translation driver | +----------------------+ | Special hardware | +----------------------+ where this requires M25P80 specific hacks to be introduced into the SPI layer so that you can communicate additional information between the SPI M25P80 driver and the translation driver. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- 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/