From patchwork Thu Oct 11 20:27:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 1583991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 54A8B40135 for ; Thu, 11 Oct 2012 20:29:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TMPMJ-0000Lr-E0; Thu, 11 Oct 2012 20:27:55 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TMPM9-0000Jm-6u for linux-arm-kernel@lists.infradead.org; Thu, 11 Oct 2012 20:27:47 +0000 Received: by mail-we0-f177.google.com with SMTP id u50so1314769wey.36 for ; Thu, 11 Oct 2012 13:27:40 -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=7LPDZlEoDwDgBEKyVzqC5yYG3UgbLGD7lVf6I5HUABc=; b=PGbeMjdqP54PXta7agAtkKZ/PZppRKIQmsF1wmRXyD+ZkUQZHQBhS0YKTnxvAqq747 SHKg08ThD70B8vXMD1u+i4hLVBOGUlNjS3wMzvgLxl+lbJceoN6TO18KQOmsa4unix6J 44K9tH7hWeXEcZBCXviWC+wCDkcZ6KS7E7f8f/CV10867wo4E8xKclCruB3ZtJ/XRFvS Phk/WcJ6trs1h6Tzcq+ZjTbBZA6qBVzq/aMWvWcSmZ5qc6iYTUch8KKVzPuYKasdWe6w Wxd6PcK/MhJs1hk/QR2pzLF9R9yZ0keENLkkChkXZtbMlGj7IpMeFoiej0WIBHmtgT0x moDg== Received: by 10.180.83.234 with SMTP id t10mr543653wiy.7.1349987260201; Thu, 11 Oct 2012 13:27:40 -0700 (PDT) Received: from localhost.localdomain (089144206247.atnat0015.highway.a1.net. [89.144.206.247]) by mx.google.com with ESMTPS id f1sm374041wiy.2.2012.10.11.13.27.37 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 13:27:39 -0700 (PDT) From: Richard Cochran To: Subject: [PATCH RFC 3/7] cpsw: correct the CPSW_PORT register bank declaration Date: Thu, 11 Oct 2012 22:27:18 +0200 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 [74.125.82.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: Sriramakrishnan A G , 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 This commit corrects and expands the slave port register bank according to TI's Technical Reference Manual. Signed-off-by: Richard Cochran --- Documentation/devicetree/bindings/net/cpsw.txt | 8 ++++---- drivers/net/ethernet/ti/cpsw.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index dcaabe9..3af47b7 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt @@ -59,14 +59,14 @@ Examples: mac_control = <0x20>; slaves = <2>; cpsw_emac0: slave@0 { - slave_reg_ofs = <0x208>; + slave_reg_ofs = <0x200>; sliver_reg_ofs = <0xd80>; phy_id = "davinci_mdio.16:00"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; }; cpsw_emac1: slave@1 { - slave_reg_ofs = <0x308>; + slave_reg_ofs = <0x300>; sliver_reg_ofs = <0xdc0>; phy_id = "davinci_mdio.16:01"; /* Filled in by U-Boot */ @@ -93,14 +93,14 @@ Examples: mac_control = <0x20>; slaves = <2>; cpsw_emac0: slave@0 { - slave_reg_ofs = <0x208>; + slave_reg_ofs = <0x200>; sliver_reg_ofs = <0xd80>; phy_id = "davinci_mdio.16:00"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; }; cpsw_emac1: slave@1 { - slave_reg_ofs = <0x308>; + slave_reg_ofs = <0x300>; sliver_reg_ofs = <0xdc0>; phy_id = "davinci_mdio.16:01"; /* Filled in by U-Boot */ diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 24304e8..600699e 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -157,9 +157,11 @@ struct cpsw_ss_regs { }; struct cpsw_slave_regs { + u32 control; + u32 res1; u32 max_blks; u32 blk_cnt; - u32 flow_thresh; + u32 tx_in_ctl; u32 port_vlan; u32 tx_pri_map; u32 ts_ctl; @@ -167,6 +169,16 @@ struct cpsw_slave_regs { u32 ts_vlan; u32 sa_lo; u32 sa_hi; + u32 send_percent; + u32 res2; + u32 rx_dscp_pri_map0; + u32 rx_dscp_pri_map1; + u32 rx_dscp_pri_map2; + u32 rx_dscp_pri_map3; + u32 rx_dscp_pri_map4; + u32 rx_dscp_pri_map5; + u32 rx_dscp_pri_map6; + u32 rx_dscp_pri_map7; }; struct cpsw_host_regs {