From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759387Ab3BGVJ6 (ORCPT ); Thu, 7 Feb 2013 16:09:58 -0500 Received: from gate.crashing.org ([63.228.1.57]:58606 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759027Ab3BGVJ4 (ORCPT ); Thu, 7 Feb 2013 16:09:56 -0500 Message-ID: <1360271357.2650.34.camel@pasglop> Subject: Re: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be) From: Benjamin Herrenschmidt To: Grant Likely Cc: Alexey Brodkin , Michal Simek , Arnd Bergmann , Vineet Gupta , Linux Kernel Mailing List , Alan Cox , Geert Uytterhoeven , dahinds@users.sourceforge.net Date: Fri, 08 Feb 2013 08:09:17 +1100 In-Reply-To: References: <1359475380-31512-1-git-send-email-abrodkin@synopsys.com> <1781360.cmQWHCW5SC@wuerfel> <201302041724.47331.arnd@arndb.de> <1360031367.14701.47.camel@pasglop> <1360066756.4529.6.camel@pasglop> <51111133.7000105@synopsys.com> <1360098004.4529.13.camel@pasglop> <511178AC.7080304@synopsys.com> <1360105635.2707.7.camel@pasglop> <1360186550.2650.4.camel@pasglop> <5113C459.8000602@synopsys.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.2-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2013-02-07 at 15:23 +0000, Grant Likely wrote: > > Maybe. In a separate patch. Hmmm... I guess there isn't an > ioread16be_rep variant. Because it would not make sense. The ioread16_rep isn't "LE" ... it should be usable for any kind if data port since such a fifo should never require byteswap as long as the bus is wired properly (whether the device is LE or BE). The problem we have here is that we have an LE device that can be wired backward. The fact that this only happens when the CPU is BE is somewhat irrelevant (well, let's say that the confusion is easier to make for the HW guys when using a BE CPU but fundamentally it's not relevant, a similar backard wiring could have been done for a BE device on a LE CPU for example). So in that case, you need some kind of hand made loop. > Oh well. Check first with Michal on LE microblaze before making the > change. If it doesn't work for him the more understanding is needed. I > was pretty sure the LE variant already worked. > > > not sure about items for "ace_datain/out_be16" - what about _rep > options > > here? > > ioread16_rep should be fine. The ace_data{in,out}_be16 routines need > to use the LE accessor. The existing code is definitely correct in > this respect. Ben.