From patchwork Mon Oct 29 18:45:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 1665211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 4C8E4DFB80 for ; Mon, 29 Oct 2012 18:48:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TSuLb-0003a9-Lo; Mon, 29 Oct 2012 18:46:03 +0000 Received: from mail-ea0-f177.google.com ([209.85.215.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TSuLC-0003Wm-70 for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2012 18:45:39 +0000 Received: by mail-ea0-f177.google.com with SMTP id n13so1876306eaa.36 for ; Mon, 29 Oct 2012 11:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=4hs9CnTcTUx8jCP7NcSPSqvIHB3RIUT0tKqet/vkWUY=; b=wYnZ+57fOcMX96+FdSPkt/s1vCYSEQK2zk8rlGMeSsyH4VTDUdxhG/thqOK9Crj+Vw M/6Z9mnqIBUAcYFmXexWlVrF4ZWn4CusXnRyN9sGwyRMY87pwF3IA9l/5GiCT81lcXun /vLa/TkA6xFwyqOiWmhGZSS90NRSXMxqyElSXPnv0p48scO7XQbsB/3sJ+l8rvGUKIzx XypmncKbtRILJVsH6of1cO8SfUkvRpJtefFNpdNUSZaMh5FwJ4zxqtPzYsDmm1oEXTBS uY+R1rihg3AjDLjRFPoMClUWIzIYs8MM3YlXTPK0myya67OecH/s646OziG4sX3nkIEn P9+g== Received: by 10.14.200.194 with SMTP id z42mr55867447een.13.1351536337162; Mon, 29 Oct 2012 11:45:37 -0700 (PDT) Received: from localhost.localdomain (089144206154.atnat0015.highway.a1.net. [89.144.206.154]) by mx.google.com with ESMTPS id o49sm24364915eep.5.2012.10.29.11.45.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 11:45:36 -0700 (PDT) From: Richard Cochran To: Subject: [PATCH net-next V3 02/10] cpsw: rename register banks to match the reference manual Date: Mon, 29 Oct 2012 19:45:12 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (richardcochran[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Mugunthan V N , David Miller , linux-arm-kernel@lists.infradead.org, Cyril Chemparathy X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The code mixes up the CPSW_SS and the CPSW_WR register naming. This patch changes the names to conform to the published Technical Reference Manual from TI, in order to make working on the code less confusing. Signed-off-by: Richard Cochran --- drivers/net/ethernet/ti/cpsw.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 63b046f..e651a2a 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -131,7 +131,7 @@ static int rx_packet_max = CPSW_MAX_PACKET_SIZE; module_param(rx_packet_max, int, 0); MODULE_PARM_DESC(rx_packet_max, "maximum receive packet size (bytes)"); -struct cpsw_ss_regs { +struct cpsw_wr_regs { u32 id_ver; u32 soft_reset; u32 control; @@ -142,7 +142,7 @@ struct cpsw_ss_regs { u32 misc_en; }; -struct cpsw_regs { +struct cpsw_ss_regs { u32 id_ver; u32 control; u32 soft_reset; @@ -204,8 +204,8 @@ struct cpsw_priv { struct napi_struct napi; struct device *dev; struct cpsw_platform_data data; - struct cpsw_regs __iomem *regs; - struct cpsw_ss_regs __iomem *ss_regs; + struct cpsw_ss_regs __iomem *regs; + struct cpsw_wr_regs __iomem *wr_regs; struct cpsw_host_regs __iomem *host_port_regs; u32 msg_enable; struct net_device_stats stats; @@ -256,8 +256,8 @@ static void cpsw_ndo_set_rx_mode(struct net_device *ndev) static void cpsw_intr_enable(struct cpsw_priv *priv) { - __raw_writel(0xFF, &priv->ss_regs->tx_en); - __raw_writel(0xFF, &priv->ss_regs->rx_en); + __raw_writel(0xFF, &priv->wr_regs->tx_en); + __raw_writel(0xFF, &priv->wr_regs->rx_en); cpdma_ctlr_int_ctrl(priv->dma, true); return; @@ -265,8 +265,8 @@ static void cpsw_intr_enable(struct cpsw_priv *priv) static void cpsw_intr_disable(struct cpsw_priv *priv) { - __raw_writel(0, &priv->ss_regs->tx_en); - __raw_writel(0, &priv->ss_regs->rx_en); + __raw_writel(0, &priv->wr_regs->tx_en); + __raw_writel(0, &priv->wr_regs->rx_en); cpdma_ctlr_int_ctrl(priv->dma, false); return; @@ -999,7 +999,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev) dev_err(priv->dev, "unable to map i/o region\n"); goto clean_cpsw_ss_iores_ret; } - priv->ss_regs = regs; + priv->wr_regs = regs; for_each_slave(priv, cpsw_slave_init, priv);