Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp933862pxk; Fri, 25 Sep 2020 01:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp/nM5oIlWP7eA+x/IBLz17kOXTgSqmTTVW8MXQeVnLHfoeHjvexRhzHd7oQZjpXqzaWok X-Received: by 2002:a05:6402:2c3:: with SMTP id b3mr74817edx.213.1601022659458; Fri, 25 Sep 2020 01:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601022659; cv=none; d=google.com; s=arc-20160816; b=0/05/5nKfNoMdSUZ57hd6zDIh3yLHr4c6juTvulVii5S5/KGrCEmFHbIZdvvsq3/fy WRSUTQ/4f39NejRLYHmJetqO/C2wDaUAH9fDtM8fPa6ewFdbTsulOZj9cX6Kkl0Aiq/U yHEgIdbdXWXS0LxAgLwRQhTtEv5uoBC5VzNB3kdimeC7g3/EME1Yx57MpyxvJqk5fevd v7eXhGTCmf2737NIFzoVk3wohMaOdkvHIDEGRigBDaUg4qEzarncUGWhDdkCK0BTjArp QMljMyATi9w/yokzy5l97V82hnvzyJ3ehE3b1aKo+w91qb/4nc6INgPxnxm68G46hnAe m6dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SrY0n+Lxp4Ps0vKWrqg8qzPispapVC5K8BCl7226S1Y=; b=Tz3e7CbIlGhXoZKT4oSY/+aMDpO44NxdTpmaodArAKySB9AIz4tKsXnR+d3LcLBNK7 VeDXpDiOzaPxifPiHI707RU5LytnQXxgEBTYk4oSbB5D3o0lWHsoQYK6qakc5d+Ny2qB 5eDLYlScv1q6yKl90JZ9voLRZ1i4PIfcdnnzqI7Z72tmxxqyz0EaoHGSCHpTabRbcWqY Mok/W7AdLz4EtZAtiI7RvkjQnTI1NJ3o3kdZZAsQZIvwq+KAeAu1n3BnorJQR2UQhRRE ncCfRiE6VoKuhO5JRFJ2r17fBHS7e+WAezxxuRS/jOymb28IG/juAeZUoGbV6M09ZIIw 5h/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T0fhmfBT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si1359392eds.286.2020.09.25.01.30.36; Fri, 25 Sep 2020 01:30:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T0fhmfBT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727536AbgIYI1L (ORCPT + 99 others); Fri, 25 Sep 2020 04:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbgIYI1L (ORCPT ); Fri, 25 Sep 2020 04:27:11 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F8EC0613CE; Fri, 25 Sep 2020 01:27:11 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id l16so1528747ilt.13; Fri, 25 Sep 2020 01:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SrY0n+Lxp4Ps0vKWrqg8qzPispapVC5K8BCl7226S1Y=; b=T0fhmfBTGttasq8Kei96OjnUWqoXnD1EhQm31QUfLpIDhsjWLMFk9PV2pa+s0Hdg4A fjPpdwt7ABi70fGaUKKmKv2bZFl1TX1+6zeJIsfMkkdroMBVgloDbus7BReFk/VnR6SK U3/FeQaNf+VwOjhpb7jEHXM9O0kdlPRDgdL57bNQPOItMru8HlJjVYwQ+N+2344BnMPn VLAi5RiU3HyfXVpuXxk7zerjlavpgg2bAlP3+3cJTt25Ft9WDn+uxWyPYbRLNm7Ai0Pc vXXXfPvNhZtFZkSVRsZBYd2w5ycRNts4T71gXQtVVij69COOyaOfL2kzw9iAAtRqdG7F mAAQ== 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=SrY0n+Lxp4Ps0vKWrqg8qzPispapVC5K8BCl7226S1Y=; b=qMeJyPa4fO89sO7aVdN+57AjvY9VAlC995fcW8sLf9bCympoZrPP6pPZxLxIhjy7g+ +cuSCLdBkZGvqnFZzrr9bThrnCk6vkigordvUX+X6HDEnw4jONyMaYlRPAo8iSxRCZ1E 8FUdgCCm85KL7/gpCUsds2wwyio4RrnC1NiAxEZE1uTjIT77BruegSICKfAqJJhLNuzx 56OtoAUrGtmZKCtPC2+KWRx0lN3OhUkuLU7V1SCQMV3hYNe4CSjFDn6C4e3Hp1fUkV4b xhY++rqNdUiVVSdkIa04esl6SulsPPvDKojoHPl7VfbNEraJoV+ukFIUVHV9fjzgiq7h akAg== X-Gm-Message-State: AOAM533LNusq2Fm1nAdJ7eFltG5rrPtGMhRYUCmizaGxRl4UC3lWrEDf l5xtGow+wjqgm4vzVbC4hsZb87Q3Nkag1i576F4= X-Received: by 2002:a92:910:: with SMTP id y16mr2375456ilg.22.1601022430617; Fri, 25 Sep 2020 01:27:10 -0700 (PDT) MIME-Version: 1.0 References: <20200925065418.1077472-1-ikjn@chromium.org> <20200925145255.v3.5.Id1cb208392928afc7ceed4de06924243c7858cd0@changeid> In-Reply-To: <20200925145255.v3.5.Id1cb208392928afc7ceed4de06924243c7858cd0@changeid> From: Chuanhong Guo Date: Fri, 25 Sep 2020 16:26:59 +0800 Message-ID: Subject: Re: [PATCH v3 5/6] spi: spi-mtk-nor: support 36bit dma addressing To: Ikjoon Jang Cc: Rob Herring , Mark Brown , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org, Matthias Brugger , "moderated list:ARM/Mediatek SoC support" , open list , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Fri, Sep 25, 2020 at 2:56 PM Ikjoon Jang wrote: > > This patch enables 36bit dma address support to spi-mtk-nor. > Currently this is enabled only for mt8192-nor. > > Signed-off-by: Ikjoon Jang > --- > > (no changes since v1) > > drivers/spi/spi-mtk-nor.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c > index 8dbafee7f431..35205635ed42 100644 > --- a/drivers/spi/spi-mtk-nor.c > +++ b/drivers/spi/spi-mtk-nor.c > @@ -78,6 +78,8 @@ > #define MTK_NOR_REG_DMA_FADR 0x71c > #define MTK_NOR_REG_DMA_DADR 0x720 > #define MTK_NOR_REG_DMA_END_DADR 0x724 > +#define MTK_NOR_REG_DMA_DADR_HB 0x738 > +#define MTK_NOR_REG_DMA_END_DADR_HB 0x73c > > /* maximum bytes of TX in PRG mode */ > #define MTK_NOR_PRG_MAX_SIZE 6 > @@ -106,6 +108,7 @@ struct mtk_nor { > unsigned int spi_freq; > bool wbuf_en; > bool has_irq; > + bool high_dma; > struct completion op_done; > }; > > @@ -305,6 +308,11 @@ static int mtk_nor_dma_exec(struct mtk_nor *sp, u32 from, unsigned int length, > writel(dma_addr, sp->base + MTK_NOR_REG_DMA_DADR); > writel(dma_addr + length, sp->base + MTK_NOR_REG_DMA_END_DADR); > > + if (sp->high_dma) { > + writel(dma_addr >> 32, sp->base + MTK_NOR_REG_DMA_DADR_HB); > + writel((dma_addr + length) >> 32, sp->base + MTK_NOR_REG_DMA_END_DADR_HB); > + } I remembered kbuild test robot reported a warning on this on 32-bit platforms in your v1. [0] I don't know what's the fix for this though :( [0] https://marc.info/?l=linux-spi&m=159982425706940&w=2 -- Regards, Chuanhong Guo