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: 547287 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C49801401DA for ; Sun, 22 Nov 2015 18:58:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=semihalf-com.20150623.gappssmtp.com header.i=@semihalf-com.20150623.gappssmtp.com header.b=Ni5FM5HF; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbbKVHy5 (ORCPT ); Sun, 22 Nov 2015 02:54:57 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33238 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbbKVHxt (ORCPT ); Sun, 22 Nov 2015 02:53:49 -0500 Received: by lfaz4 with SMTP id z4so91270226lfa.0 for ; Sat, 21 Nov 2015 23:53:47 -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=bsNUPCTJUuK0R8fbE1Y+H8Y/xVINwjqNH5tUQVYNrD7SBdreVe4Lc6Vveo1V3MrBMG cc5Ky8XtxVr+tV/lNaF7MbvgAKbN0hEoj95kBfO3v1fR4KFAvdEn5FK3/92HpMS07K3j lQo7Bd0er9CEO6h3WTSt7z2AToM3s8Bqmd6V7YpoxLWCX1Bes4nQOzmUgJycnLhWZLUn 3HC9X9xCjR1xk/M67ht+36YGgkzJFC1KCQo9fle7lYi33MpMmIPjFpLsPlUPlH4TQdfc IhN1gJy5nL9DNVPNbjsc/0fGM5OshEDc2pKIi9n1hvuD4RNlTQyEe963IHldlhOtE9Bd Q9nw== X-Gm-Message-State: ALoCoQnKg/Qnk6dzRkHCwK0WcrnihH1KnDhk0NQioWdU6JOXPIiNShgiWXXsI7e7p/raCKTGSXmb 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 Cc: davem@davemloft.net, linux@arm.linux.org.uk, sebastian.hesselbarth@gmail.com, andrew@lunn.ch, jason@lakedaemon.net, thomas.petazzoni@free-electrons.com, gregory.clement@free-electrons.com, simon.guinot@sequanux.org, nadavh@marvell.com, alior@marvell.com, xswang@marvell.com, myair@marvell.com, nitroshift@yahoo.com, mw@semihalf.com, jaz@semihalf.com, tn@semihalf.com, 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> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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);