Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3382677imm; Mon, 8 Oct 2018 03:07:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV61CbXiAagOyAd8uKb1gEOm65e2Uksn7XGzMdR/IENonIS+0QbVEdY1eOXI+RLjtJr03pR45 X-Received: by 2002:a65:45c9:: with SMTP id m9-v6mr15351688pgr.212.1538993262149; Mon, 08 Oct 2018 03:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538993262; cv=none; d=google.com; s=arc-20160816; b=C68VqqnUJNCfdjVpH0WikmGjRBDI6YYRWZ3GxxJiFpH9nBfz5vRjXLu8OZ4bl1enMG SUX0/gi/A/13MW5eKwQPtjP68aFIsNMSaqHCgy8sIGiML9THIwEip9nwDIP37ofW8tzl Na3UaQquX4bnhoL8oq5aR4fyy01zf3lLOrJU0ja1LN9TZMcTooP2sQ6zuKIZTYGnJIXl sVa6GQwpjynDmVjJNJEIRWdNghGKPusD3JTxIvbg6ACU8xf/0jHq4jnLKOGzaivEvXrZ 8OQhcXd30NRS7QY+j4nrniCXRCnfOllDv8ef8+rbrN5gnTUMWI+5G6dKIA14G+Vc6W9e QKsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=5ND4333KgeiGhqJUZDrQhCAD3jx2kxYi2DF+wzdibHc=; b=V6d0wqMLACjAYWCoOPtWmxbiMk1kUuUwbLEePTi/dQZxlP39PGf6BTt0b5RDOCvlIf cqExGlbnLODyys18En9pY6ySRvLUC+b3FNfLH4lUvLqPFIQTuIKNRYmG16XDmVAkZYZJ P15cKcrM6oIoHxyAiLGC/KkvfkyY+lZQyDQaHkZrNOyfUq+ibIrGNcMmYaKyUe3fTruR oPnm8zI4KfDdtOQl5W1mOsh95YECqa/voYgoSSEXGHXGHsKlu2MllWDq5QJdbS17/UeQ z7VOXQo30FlO69X6pNx6N/EEgmfyP7LqIRjHlFitZdVn1EbgVnTzHYtUFojzBsxaYXiJ NTGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z127-v6si18202907pgb.455.2018.10.08.03.07.19; Mon, 08 Oct 2018 03:07:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbeJHRRo (ORCPT + 99 others); Mon, 8 Oct 2018 13:17:44 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:38400 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbeJHRRn (ORCPT ); Mon, 8 Oct 2018 13:17:43 -0400 Received: by mail-qt1-f195.google.com with SMTP id l9-v6so20288677qtf.5; Mon, 08 Oct 2018 03:06:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5ND4333KgeiGhqJUZDrQhCAD3jx2kxYi2DF+wzdibHc=; b=co83knW1NeYhAcUQpMqAl4c5QBAcm1ybcGTuSspBBL58evDOmAGsdzki3/1cYpbppU pf6cqcfFVmzzcD0rlE8Z2X3Rmcqzqqsdox0kJ9dM/8A70GGo4gsAgnC73WxYm1+oJpN3 4c8jzF/b4Ji3xI5an8pLTuHUBF7QfiKWsFfyYp6QqsF83wiaDfug4x9SP4Ook8niuDBC /Mx+u8f7bbZtGmWJeCfizEwq3UC0zKBx1P2ODVigENjVDHzGo0zNK9fwwffL3GLISnxX xo4v2yEL44LzX57JsIKLrNI4MgJualIqjSMwi8TYgtFOD85la3gXr5UAu3DLOEgzByde DBsA== X-Gm-Message-State: ABuFfogvr3ekCxhnLJ1SsxsWYg3RhkQJvYSXF4wZqGX8GvxE3DOd8pIi 6Eapp3xSb++ZVQyeC2UMWuuYGuMFGPQnJx2e91g= X-Received: by 2002:aed:3f08:: with SMTP id p8-v6mr18379305qtf.185.1538993206906; Mon, 08 Oct 2018 03:06:46 -0700 (PDT) MIME-Version: 1.0 References: <20181003132212.12619-1-boris.brezillon@bootlin.com> <20181003132212.12619-8-boris.brezillon@bootlin.com> In-Reply-To: <20181003132212.12619-8-boris.brezillon@bootlin.com> From: Arnd Bergmann Date: Mon, 8 Oct 2018 12:06:30 +0200 Message-ID: Subject: Re: [PATCH v8 07/10] i3c: master: Add driver for Cadence IP To: Boris Brezillon Cc: Wolfram Sang , Linux I2C , Jonathan Corbet , "open list:DOCUMENTATION" , gregkh , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , DTML , Linux Kernel Mailing List , Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Przemyslaw Gaj , Peter Rosin , mshettel@codeaurora.org, swboyd@chromium.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 3, 2018 at 3:22 PM Boris Brezillon wrote: > > Add a driver for Cadence I3C master IP. > > Signed-off-by: Boris Brezillon > --- > Changes in v7: > - Fix readsl/writesl() usage > - Add a depends on ARM || ARM64 || XTENSA to forbid selection of this > driver on platforms that are not implementing readsl/writesl Most architectures include asm-generic/io.h, which contains a generic implementation of readsl(). Maybe that #ifdef could be extended here? I remember discussing this with you not so long ago, which led to commit 0bbf47eab469 ("ia64: use asm-generic/io.h"). Do we have a list of architectures that don't include asm-generic/io.h? Maybe the 'depends on' could be for the set of architectures that fail here. > +static void cdns_i3c_master_rd_from_rx_fifo(struct cdns_i3c_master *master, > + u8 *bytes, int nbytes) > +{ > + readsl(master->regs + RX_FIFO, bytes, nbytes / 4); > + if (nbytes & 3) { > + u32 tmp = __raw_readl(master->regs + RX_FIFO); > + > + memcpy(bytes + (nbytes & ~3), &tmp, nbytes & 3); > + } > +} The __raw_readl() is probably correct here (I can't think of any architecture on which it is not), but it still makes me feel uneasy about possible endianess or other issues. Maybe make this:? readsl(master->regs + RX_FIFO, &tmp, 1); Arnd