From patchwork Mon Sep 17 08:46:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 10602225 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8599814BD for ; Mon, 17 Sep 2018 08:46:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75D4729647 for ; Mon, 17 Sep 2018 08:46:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 685A72965F; Mon, 17 Sep 2018 08:46:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007D729647 for ; Mon, 17 Sep 2018 08:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbeIQOMt (ORCPT ); Mon, 17 Sep 2018 10:12:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35574 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbeIQOMt (ORCPT ); Mon, 17 Sep 2018 10:12:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id 7-v6so7334299pgf.2 for ; Mon, 17 Sep 2018 01:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:subject; bh=JE1ntcm6Vu7oK0HqVZrCB1GNE9zUr8Trl7eSbyIE4ec=; b=Wkb77xXiXVoKEfR8yYaV3DgQWHAQKe88G8Rl6WdKxe6lF5nlxedV6gVbmF3FUW6qzR hXX3VcuRzFo9TBsJZ2YQ4naC2QsWiG/Dq1ciTtPKtJrHfKbrJvcwZl1iLgliCFLH48Cq TjNYu2hqVB09zDPKA129y2HQgbPDnsUaJ8fQPcV5hC5+FD2TPAy3NtfgQ1zMc5IHEFjs xJd9zNFWZwhFghRwjAn+Xfcid+L1R3CSmFA15slWumqfK/soca8qOyeRP65AOO5miyuu WecyNPb5heBMzI3hiA3wReG1WJn/EqKnG+d8Xvv43T4JCYmvUG51j9SpuSwNVum1Ici7 mizA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:date:message-id:subject; bh=JE1ntcm6Vu7oK0HqVZrCB1GNE9zUr8Trl7eSbyIE4ec=; b=t+xAGzzIdOwNnWov3IKCyEy7QX8Kz7lCRWS1mQXOCRyfp9Yjw94TtZPaBYTr5LbatJ dXoeRHWx+sP0lXa1C2Y3rWlOvUiC64guLTbLQWO/3+ydHypC7ur0/aeRaR7UPjU5jHgN Jot6gEAbAUHo8Ul7q6XOIY/wt+zjhWyk8aAZ0aJmdPIGquzez7FZS7Gea4xW15X1i974 8zVj1MWBA7ZJ5uIttHswecKhl+cQbyk6SR8ye/HY6vNAvkvTeI3nV6yYK19DVgekKmIm 5OKhpe8sYLwd0Y3bNYMQhrgXQL0eZKpfSqeDtGpvnU59sFCrF9wgbiOocG5Hl2/StYTW rgkA== X-Gm-Message-State: APzg51DlwboyrdKpt7N0Zhck+VTWhcbkwwyf46VPVm3BYPVO5w8eusah xAnpKlmC03WVaOqoZjquwP2dmYTU X-Google-Smtp-Source: ANB0VdbZbJ0ZVjYY/htduO1LA5S4Di/1gqyf8ibd52Q+3SZSmoR3moBP12If0UP3U3IdNdBLMuQhQQ== X-Received: by 2002:a63:7a0f:: with SMTP id v15-v6mr22881530pgc.127.1537173983571; Mon, 17 Sep 2018 01:46:23 -0700 (PDT) Received: from [127.0.0.1] (l193216.ppp.asahi-net.or.jp. [218.219.193.216]) by smtp.gmail.com with ESMTPSA id t86-v6sm20035966pfe.109.2018.09.17.01.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Sep 2018 01:46:22 -0700 (PDT) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: Magnus Damm Date: Mon, 17 Sep 2018 17:46:23 +0900 Message-Id: <153717398326.578.15513023441673714711.sendpatchset@octo> Subject: [PATCH/RFC] iommu/ipmmu-vmsa: R-Car E3 SYS-DMAC whitelist prototype Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm For testing purpose enable IPMMU for SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2 on R-Car E3. Not for upstream merge. Not-Yet-Signed-off-by: Magnus Damm --- Applies on top of renesas-devel-20180914-v4.19-rc3 drivers/iommu/ipmmu-vmsa.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- 0001/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2018-09-17 17:09:36.083484128 +0900 @@ -756,6 +756,18 @@ static int ipmmu_init_platform_device(st static bool ipmmu_slave_whitelist(struct device *dev) { + /* R-Car E3 SYS-DMAC0 (Channel 0-15) */ + if (!strcmp(dev_name(dev), "e6700000.dma-controller")) + return true; + + /* R-Car E3 SYS-DMAC1 (Channel 16-31) */ + if (!strcmp(dev_name(dev), "e7300000.dma-controller")) + return true; + + /* R-Car E3 SYS-DMAC2 (Channel 32-47) */ + if (!strcmp(dev_name(dev), "e7310000.dma-controller")) + return true; + /* By default, do not allow use of IPMMU */ return false; }