Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp826399ybi; Thu, 30 May 2019 07:21:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7tARG4F/vtjIOgUUK0M081cs7lubOKzbcsBsUb7rnVdL5xIXhMUf4x6YxPAuutaG6ytwS X-Received: by 2002:a17:90a:bd10:: with SMTP id y16mr3660844pjr.92.1559226087821; Thu, 30 May 2019 07:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559226087; cv=none; d=google.com; s=arc-20160816; b=eyCriUv4TOcr2srA8n0x7JTf41riSpknSSTmE8Xk+VmOkqK5X97d/yCuFj2q9QpATP s8292E/d2hW91aKuaQU/+FExySOjEv8eoQVuvwiYAziOmVfmHdYXT60j6w7q/QXLVkNC tKH0ackVJOshQz2PVJ7wICc9jSTwJ27zrWKryGY1H0nNBTl9VnUj3S3Hv8npzq4Gmfiv WwSuC0IV9dAWXoaRk3yjfx2wJb+3+g4MQF46F9nJBfY9eOKyctpocLVqKnsNAOR06aIl YBuHDs4UI2DJpBKoeRvTLy4oH5Xku6JGODRoLkZ6e6N7GTd6MU+HrVriUnnl60B7WRPA MHPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=+Xfq4QPmcvqCf2haIpwvr5AVnrDtfl0eK5UbJ4/aMME=; b=hlqM4skGRukWyhP7w0XPmJw4/dWAM5bXeLcF4qZF69W4RLfdAAjScI0kacZH0tfH+C jXtb3uyFF6L2OrTkyq89le3G9e+NUifVtAkkD99MZhk1I8WWCga2avrQlH7EluRsLaSi /K9cfKivZKfinj4LN0Z4LwHjW5OY01ZfzFqPCwPFsnzARFCReAMIvtScfD1shRS3waQH F3QXMdzG1sv6bLZWRJ6tcc1jNyCnqTHxKV7JVMsfuLVzX1lTCy02TrIWbpa9Nsv1jC/6 48IG5ksFfROmrjNne2yMCEVp4T7A8cTPyDwB2MDPq/rax6Hk6dcWlES69mM8zWOjGCvw O4Tg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4si3597609pfb.274.2019.05.30.07.21.11; Thu, 30 May 2019 07:21:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbfE3OT5 (ORCPT + 99 others); Thu, 30 May 2019 10:19:57 -0400 Received: from inva020.nxp.com ([92.121.34.13]:48968 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfE3OT4 (ORCPT ); Thu, 30 May 2019 10:19:56 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 28A251A0650; Thu, 30 May 2019 16:19:54 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1C93E1A016B; Thu, 30 May 2019 16:19:54 +0200 (CEST) Received: from fsr-ub1864-101.ea.freescale.net (fsr-ub1864-101.ea.freescale.net [10.171.82.13]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 883732061C; Thu, 30 May 2019 16:19:53 +0200 (CEST) From: laurentiu.tudor@nxp.com To: netdev@vger.kernel.org, madalin.bucur@nxp.com, roy.pledge@nxp.com, camelia.groza@nxp.com, leoyang.li@nxp.com Cc: Joakim.Tjernlund@infinera.com, davem@davemloft.net, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Laurentiu Tudor Subject: [PATCH v3 1/6] fsl/fman: don't touch liodn base regs reserved on non-PAMU SoCs Date: Thu, 30 May 2019 17:19:46 +0300 Message-Id: <20190530141951.6704-2-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190530141951.6704-1-laurentiu.tudor@nxp.com> References: <20190530141951.6704-1-laurentiu.tudor@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurentiu Tudor liodn base registers are specific to PAMU based NXP systems and on SMMU based ones are reserved. Don't access them if PAMU is compiled in. Signed-off-by: Laurentiu Tudor --- drivers/net/ethernet/freescale/fman/fman.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c index e80fedb27cee..cce6636b1763 100644 --- a/drivers/net/ethernet/freescale/fman/fman.c +++ b/drivers/net/ethernet/freescale/fman/fman.c @@ -634,6 +634,9 @@ static void set_port_liodn(struct fman *fman, u8 port_id, { u32 tmp; + iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]); + if (!IS_ENABLED(CONFIG_FSL_PAMU)) + return; /* set LIODN base for this port */ tmp = ioread32be(&fman->dma_regs->fmdmplr[port_id / 2]); if (port_id % 2) { @@ -644,7 +647,6 @@ static void set_port_liodn(struct fman *fman, u8 port_id, tmp |= liodn_base << DMA_LIODN_SHIFT; } iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]); - iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]); } static void enable_rams_ecc(struct fman_fpm_regs __iomem *fpm_rg) @@ -1942,6 +1944,8 @@ static int fman_init(struct fman *fman) fman->liodn_offset[i] = ioread32be(&fman->bmi_regs->fmbm_spliodn[i - 1]); + if (!IS_ENABLED(CONFIG_FSL_PAMU)) + continue; liodn_base = ioread32be(&fman->dma_regs->fmdmplr[i / 2]); if (i % 2) { /* FMDM_PLR LSB holds LIODN base for odd ports */ -- 2.17.1