From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 05/15] musb: Do not use musb_read[b|w] / _write[b|w] wrappers in generic fifo functions Date: Mon, 09 Mar 2015 22:50:29 +0100 Message-ID: <4821047.1nqnop93Xh@wuerfel> References: <1425933628-9672-1-git-send-email-hdegoede@redhat.com> <1425933628-9672-6-git-send-email-hdegoede@redhat.com> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1425933628-9672-6-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Hans de Goede Cc: Felipe Balbi , Kishon Vijay Abraham I , Maxime Ripard , Chen-Yu Tsai , Roman Byshko , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org On Monday 09 March 2015 21:40:18 Hans de Goede wrote: > The generic fifo functions already use non wrapped accesses in various > cases through the iowrite#_rep functions, and all platforms which override > the default musb_read[b|w] / _write[b|w] functions also provide their own > fifo access functions, so we can safely drop the unnecessary indirection > from the fifo access functions. > > Signed-off-by: Hans de Goede > The patch looks reasonably, but the description seem misleading. I believe the real reason why it's ok to use __raw_writew for the FIFO is that a FIFO by definition is using CPU endian access for copying byte streams from memory, which is unlike any other MMIO register that requires fixed-endian accessors. Arnd