From patchwork Sun Nov 22 07:53:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 7675651 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 7CA0CBF90C for ; Sun, 22 Nov 2015 08:00:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9802E2064F for ; Sun, 22 Nov 2015 08:00:04 +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 D2D112064B for ; Sun, 22 Nov 2015 08:00:03 +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 1a0PWC-000385-UP; Sun, 22 Nov 2015 07:57:04 +0000 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a0PTO-00084G-Uz for linux-arm-kernel@lists.infradead.org; Sun, 22 Nov 2015 07:54:11 +0000 Received: by lfaz4 with SMTP id z4so91270227lfa.0 for ; Sat, 21 Nov 2015 23:53:48 -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=Xtp0S/I79naESM4hYtDMGuVRzlkzAUvL+L4PzKU+viE=; b=Ni5FM5HFRHAOYIY2bb+cJ6Mrg7Txx9yut5L+XefDk2yrbMR0EsZohqi+a1DNwz7WRV t+0tRdEmh0kNrSn7I4eBcTfCexrasvZCYujpLG8v44sU5miZOILcVe7HNnGwoYwnTDXy etEmjPFHoXybO/0qmbTBj4ABZBKr6wB8F+ypw0ERDD3j+rH6unUxGMpCryqpbtrH8OnB 1rq/U8RbPPu915Q2VfhFkwItw1XmekDSl6fVpRRi4aP+jAhwhwe+/OmQxuIszVPf4DP2 UnKACbd5osYMI+QOF/A5Dc8ISRN5Zixvr/IwBfD97qq7yzgZrsdGMlDWQR7p/QIa4HHd o0LQ== 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=Xtp0S/I79naESM4hYtDMGuVRzlkzAUvL+L4PzKU+viE=; b=aBXV09jDiyCAGfsTkPMVhASXaeauLG1GouTG45W1OuWawlSN17Ub1LbWaqakA2KSce Hza5mRsaQGsuBSf6ALy0CDOlGzdssbSu7K4hEZumD+VtVorPnm47ZzVHHmKVykw54o+c /xB231I7MLBrBfo7xmZ6X1ZUuMzjTNl+SgnJrEjHu/yRBBYcMXEy4OtwNqn9W0mwhBh+ y0Qfu6G/o8lXo2lLgMkBev5qtdquB5pD6fjaoBB4Qi4hsZPZEXm6xb8KRXmoaK/yb/aB 3QATIM9AnnROJ7NC/Wg6DExtPsMSRx+Z8S9R/opKDLo7Ppflwb8XevcXWugSfh2dlb3K s1ww== X-Gm-Message-State: ALoCoQlh184JuHI096TCemZ1h7W0BYCOLQNIztiWeURP1Hi8OCRL/Nwnh02Y+2x5BlLoBzBDT+be X-Received: by 10.25.21.151 with SMTP id 23mr7088305lfv.165.1448178827904; Sat, 21 Nov 2015 23:53:47 -0800 (PST) Received: from enkidu.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id y79sm1010840lfd.45.2015.11.21.23.53.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2015 23:53:47 -0800 (PST) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH 01/13] net: mvneta: add configuration for MBUS windows access protection Date: Sun, 22 Nov 2015 08:53:47 +0100 Message-Id: <1448178839-3541-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1448178839-3541-1-git-send-email-mw@semihalf.com> References: <1448178839-3541-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151121_235411_255516_30C13C4F X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. 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, stable@vger.kernel.org, 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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Cc: # v3.8+ Reviewed-by: Gregory CLEMENT --- drivers/net/ethernet/marvell/mvneta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index e84c7f2..0f30aaa 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) @@ -3188,6 +3189,8 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, win_enable &= ~(1 << i); win_protect |= 3 << (2 * i); + + mvreg_write(pp, MVNETA_ACCESS_PROTECT_ENABLE, win_protect); } mvreg_write(pp, MVNETA_BASE_ADDR_ENABLE, win_enable);