From patchwork Mon Aug 12 11:41:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 2843047 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE1349F239 for ; Mon, 12 Aug 2013 11:41:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1F27203EB for ; Mon, 12 Aug 2013 11:41:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21A7C203F3 for ; Mon, 12 Aug 2013 11:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756049Ab3HLLl0 (ORCPT ); Mon, 12 Aug 2013 07:41:26 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:56903 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756020Ab3HLLlX (ORCPT ); Mon, 12 Aug 2013 07:41:23 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7CBfMp8005342; Mon, 12 Aug 2013 06:41:22 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7CBfM4F028060; Mon, 12 Aug 2013 06:41:22 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 12 Aug 2013 06:41:22 -0500 Received: from mugunthan-lt.india.ti.com ([172.24.190.79]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r7CBfK4V022900; Mon, 12 Aug 2013 06:41:21 -0500 From: Mugunthan V N To: CC: , , Mugunthan V N Subject: [net-next PATCH 1/1] drivers: net: cpsw: Add support for new CPSW IP version present in AM43xx SoC Date: Mon, 12 Aug 2013 17:11:15 +0530 Message-ID: <1376307675-11501-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 1.8.4.rc1.21.gfb56570 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The new IP version which is present in AM43xx SoC has a minor changes and the offsets are same as the previous version, so adding new IP version support in the driver. Signed-off-by: Mugunthan V N --- drivers/net/ethernet/ti/cpsw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index cd95671..0fcf212 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -83,6 +83,7 @@ do { \ #define CPSW_VERSION_1 0x19010a #define CPSW_VERSION_2 0x19010c #define CPSW_VERSION_3 0x19010f +#define CPSW_VERSION_4 0x190112 #define HOST_PORT_NUM 0 #define SLIVER_SIZE 0x40 @@ -993,6 +994,7 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) break; case CPSW_VERSION_2: case CPSW_VERSION_3: + case CPSW_VERSION_4: slave_write(slave, TX_PRIORITY_MAPPING, CPSW2_TX_PRI_MAP); break; } @@ -2018,6 +2020,7 @@ static int cpsw_probe(struct platform_device *pdev) break; case CPSW_VERSION_2: case CPSW_VERSION_3: + case CPSW_VERSION_4: priv->host_port_regs = ss_regs + CPSW2_HOST_PORT_OFFSET; priv->cpts->reg = ss_regs + CPSW2_CPTS_OFFSET; priv->hw_stats = ss_regs + CPSW2_HW_STATS;