From patchwork Fri Nov 27 15:44:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 7713871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A571DC01BB for ; Fri, 27 Nov 2015 15:47:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 130F120722 for ; Fri, 27 Nov 2015 15:47:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40613206C3 for ; Fri, 27 Nov 2015 15:47:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a2LD1-00064F-K7; Fri, 27 Nov 2015 15:45:15 +0000 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a2LCi-0005BG-1q for linux-arm-kernel@lists.infradead.org; Fri, 27 Nov 2015 15:44:57 +0000 Received: by lffu14 with SMTP id u14so133789584lff.1 for ; Fri, 27 Nov 2015 07:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bxN4XlrctLun1zOccYzX1kF25pzoxGZf/y/R7nWXePo=; b=I5L7cBLtZUfdcyR4yl2Yd4evmD0ojrYQrlBaYW/kzyiDTNjZUWc2iAEbFMmtP8Ggp+ mZpSlyF/y59O+IXa86A2TWl9EgdiIzEyYFstXMiy+tnbR9VddN8QRwgFD//H0kmhNwtn EfdgXCUHAhjKO/zAD8yWOOZ2oP1/WhRwnYmsZeMaokVROu7Atp/E0v4himLH2HY2ooNe vP/zy/Wfj+lkyha2QlysAzzM5VW8SzN9CqfxUINZs9TWM7jatPfF9hQWZaCp/2jRSGuP VLBaB4J+HZf7EZhJW+FAE5MrJ07R64G81mupt0xpfgosOBAbx8zn6BLexbbEt6HUE73s DxzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bxN4XlrctLun1zOccYzX1kF25pzoxGZf/y/R7nWXePo=; b=a1UJ3TaP8W4Qm1ELtzNAjdpp6iUs4YdO14V7gtp7b420dOE+I4tnuUyiiG3bCKONJo e4G7rZFRBLlcGSCJfZB7/giBny6eGkpwKKQNHEqv7yGDlLajveffLNrGsY0eNTKueibk JJ4l2Ngq6SsZo8ZL4tFEiURFuWRQ9Z3PW03j/HhseIvwFFbJs6Icr6SusCLJNEh8x6nG PVVxYpPHBzOUS6wEiT3k3lVjYZBxEflZeF7cbXVB4Qv0Ml4lJGETZtL7oJrPOSGX8/kq rNCO/imgnWbGVXeqoytHvhIzV1geUaiE2bmaHLKS5seSVrHn86hpLgjc5Bkd/E73yYgH T9RA== X-Gm-Message-State: ALoCoQlPRBMsRtFATHUeeVvp9XEY7bnHEp+uUNAIJpMHtOier+bpHjmx7t+tB1PD584Y8LHMRcEb X-Received: by 10.112.136.136 with SMTP id qa8mr19848278lbb.14.1448639074153; Fri, 27 Nov 2015 07:44:34 -0800 (PST) Received: from enkidu.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id k189sm5096651lfd.12.2015.11.27.07.44.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2015 07:44:33 -0800 (PST) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH v3 net 1/6] net: mvneta: add configuration for MBUS windows access protection Date: Fri, 27 Nov 2015 16:44:21 +0100 Message-Id: <1448639066-13074-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1448639066-13074-1-git-send-email-mw@semihalf.com> References: <1448639066-13074-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151127_074456_364182_C8B77CEF X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, linux@arm.linux.org.uk, jason@lakedaemon.net, myair@marvell.com, jaz@semihalf.com, simon.guinot@sequanux.org, xswang@marvell.com, nadavh@marvell.com, alior@marvell.com, tn@semihalf.com, gregory.clement@free-electrons.com, nitroshift@yahoo.com, mw@semihalf.com, davem@davemloft.net, sebastian.hesselbarth@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds missing configuration of MBUS windows access protection in mvneta_conf_mbus_windows function - a dedicated variable for that purpose remained there unused since v3.8 initial mvneta support. Because of that the register contents were inherited from the bootloader. Signed-off-by: Marcin Wojtas Reviewed-by: Gregory CLEMENT Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") --- drivers/net/ethernet/marvell/mvneta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index e84c7f2..2d80256 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -62,6 +62,7 @@ #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3)) #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2)) #define MVNETA_BASE_ADDR_ENABLE 0x2290 +#define MVNETA_ACCESS_PROTECT_ENABLE 0x2294 #define MVNETA_PORT_CONFIG 0x2400 #define MVNETA_UNI_PROMISC_MODE BIT(0) #define MVNETA_DEF_RXQ(q) ((q) << 1) @@ -3191,6 +3192,7 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, } mvreg_write(pp, MVNETA_BASE_ADDR_ENABLE, win_enable); + mvreg_write(pp, MVNETA_ACCESS_PROTECT_ENABLE, win_protect); } /* Power up the port */