From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186AbcGRUAc (ORCPT ); Mon, 18 Jul 2016 16:00:32 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:52633 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662AbcGRUAa (ORCPT ); Mon, 18 Jul 2016 16:00:30 -0400 From: Arnd Bergmann To: Brian Norris Cc: Cyrille Pitchen , linux-mtd@lists.infradead.org, nicolas.ferre@atmel.com, boris.brezillon@free-electrons.com, marex@denx.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mtd: atmel-quadspi: add driver for Atmel QSPI controller Date: Mon, 18 Jul 2016 21:59:56 +0200 Message-ID: <1715321.52KD2CMTqu@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-28-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160718195511.GA137880@google.com> References: <3482823.TCe8doMvLu@wuerfel> <20160718195511.GA137880@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:fWIjMnbBWzvyvbqVS4O1BFgZvxd1VjjCKNJyqdcPk3gMoWjSMHG 3BiDnirJV48sB4g5nDlfrj9SZniz5lHjB4E00Okg6Euwo72DJBZ7TWrG8iDif+6a/FoaMHa c/uQ8IJWBjvskL2SFIFzBMmxeWJicX6StaicuEtm5TZ7ooBfrAaHzEl8YMUB85x2MBw6Tfv ipbwdDdd1x+8BRWT8nlgw== X-UI-Out-Filterresults: notjunk:1;V01:K0:t3YIAgcw4SA=:Ij/41Brvj8GKwt+yJhpz8v DWzOHPsykcMmC27H9iWfhlDybBho11qVeLmNuDW2GAy4EhEV1qsHen5hBckZ/TuI7IjQaL0j1 pEitGQTtnm3jUr3s9d1nwJJ8QVp/Nwc3SKu5htXrIUByKhXkoCsME/qK913lBhPWkKDcbsmqc UJF7hd3fjytQkUU8F05DE+l5U9Wu76L0y42s7skIuHumwNsqC/Z/ABIgIfZIK7sgE7pbtPUdG 9BeYYqkAFta9SlhG+7dsngyhN4SuKSOYZxjp7uC3TRYRnQFxU75fVIQVxama2Fw0GIFm+inHO NPnWTiMlek1tyWOZ0F/5mNxNAwABdwjJHWxtZMWcRNX6UmgiGVTZBn6LbBQ0BLxX9/N8p8U/M oKZYktNYruFBttEdO8AuAlk+fHoCiVDMNUxzECON/DhgFkcB/1mCp0yra/3krRFJgonE8ZuRr wLZmfMIaDJL4utX9WKzFzvmie3DGT+MX6tZ/RN9HgIwHw/IM5NT25cSpS0kSloGx+TpXnYGWa cZ0T7rlimmzZ8pUZ0fnyDjIcho++aLmgsaY72BycUSvB3BGgGGVBOAOp5M8nzRRtCLxI1tRj1 iU+76K2ToEXN6u0xTA4VXhu6MuwdQaWSIQeqJmELvjIr3YQXhRU18DFmmV0cl3nBoBeuetfHp +sECjb66qLiQ1pl0rUtIUV9GGyaKshL+XNMhgJH43JmII0dCVsuE6h6dFlqPvcWQW6qq3NtaJ y+H5Qyilced+ygwH Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 18, 2016 12:55:11 PM CEST Brian Norris wrote: > On Mon, Jul 18, 2016 at 09:35:39PM +0200, Arnd Bergmann wrote: > > On Friday, July 15, 2016 5:45:07 PM CEST Brian Norris wrote: > > > Applied to l2-mtd.git with that fixup. > > > > I'm getting this build error now on a randconfig build: > > > > drivers/mtd/built-in.o: In function `atmel_qspi_run_command': > > :(.text+0x1ee3c): undefined reference to `_memcpy_toio' > > :(.text+0x1ee48): undefined reference to `_memcpy_fromio' > > Whoops, I noticed those during review, but I don't know why I forgot to > mention them nor fix them up before applying. > > > On ARCH_EBSA, which doesn't build the file that contains the two > > functions. I don't see any other driver on ARM using those two > > functions directly. What is the specific reason for using them > > here? Do you require byte-wise accesses, or could you use > > the normal memcpy_toio/memcpy_fromio that turn into aligned > > 32-bit word accesses instead? > > Good questions. I would suspect that aligned 32-bit accesses are what > they're looking for, but I'm not absolutely sure. Ok, so we should look at that first. If the driver supports 32-bit access, using the regular accessors will also make the transfers much faster. > > If you have to use the non-portable > > functions, maybe we can just make the driver depend on !ARCH_EBSA? > > I don't see an ARCH_EBSA. Did you mean ARCH_EBSA110? Yes, sorry for the typo. > Or we could just drop the '|| (ARM && COMPILE_TEST)' clause for now: > > depends on ARCH_AT91 || (ARM && COMPILE_TEST) I'd prefer to keep the COMPILE_TEST option, after all it's how I found the problem. On a related note, what is the ARM dependency for? Is that just for the _memcpy_toio/_memcpy_fromio? Maybe we can drop too if we find the right architecture-independent replacement for those two calls. Arnd