From patchwork Tue Oct 15 22:29:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3049031 Return-Path: X-Original-To: patchwork-linux-sh@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 5441B9F2B6 for ; Tue, 15 Oct 2013 22:31:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66D0B2042B for ; Tue, 15 Oct 2013 22:31:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67FE020421 for ; Tue, 15 Oct 2013 22:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933633Ab3JOWbE (ORCPT ); Tue, 15 Oct 2013 18:31:04 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:51840 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933519Ab3JOWbD (ORCPT ); Tue, 15 Oct 2013 18:31:03 -0400 Received: by mail-lb0-f170.google.com with SMTP id w7so63865lbi.29 for ; Tue, 15 Oct 2013 15:31:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=bMZxH9fyJn74+75QGtiL9TAD6DHoXsPf65urb4KYKvw=; b=E+UOlfoOlvkLNbNHK2U3Z0FpXYWi6+3XQwx8TsCdnLyGCLLlhyOU20yYEljb6SJfpJ 6Ott7yHwswsavNK3BaiV/1A2BJQhcb6uL7dSU4U/JPNI1orGuYOKgEK15jnYIXvzK1fx If6ScV96fRtLGZHNckQShIw03qRTgxmYeC2PhBh87eSx6oIiyeCmRQFzJLf2Ih9QCdZ7 TjG7gGQXN59hplY5/w1siffF6R1RW208lUPGEj/lXnlDQYL/rRsF1eeD4OahjOVn3cNU LNlRubV0aWYH5es4bDjZ7xSo9kjk0bD4g/wWQNucEm0X0WalDCGXESC7Op/aNCrh6HgM oGOA== X-Gm-Message-State: ALoCoQmMr2rSfcstLIHwqFZvDtRECubpejEX9b99oPT7Nm2lJjGtMkoKmnzpo/32YAa2dPsAGo86 X-Received: by 10.112.50.41 with SMTP id z9mr54791lbn.83.1381876260874; Tue, 15 Oct 2013 15:31:00 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp83-237-49-176.pppoe.mtu-net.ru. [83.237.49.176]) by mx.google.com with ESMTPSA id k6sm66804684lae.9.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Oct 2013 15:31:00 -0700 (PDT) To: netdev@vger.kernel.org Subject: [PATCH] sh_eth: add/use RMCR.RNC bit Cc: nobuhiro.iwamatsu.yj@renesas.com, linux-sh@vger.kernel.org, davem@davemloft.net, horms@verge.net.au From: Sergei Shtylyov Organization: Cogent Embedded Date: Wed, 16 Oct 2013 02:29:58 +0400 MIME-Version: 1.0 Message-Id: <201310160229.58735.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC bit and replace bare numbers in the driver by this mnemonic. Suggested-by: David Miller Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman --- This patch is against DaveM's 'net.git' repo but it intended for 'net-next.git' repo -- it's because 'net-next.git' doesn't contain the required Simon Horman's patch yet. drivers/net/ethernet/renesas/sh_eth.c | 6 +++--- drivers/net/ethernet/renesas/sh_eth.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net/drivers/net/ethernet/renesas/sh_eth.c @@ -483,7 +483,7 @@ static struct sh_eth_cpu_data sh7757_dat .register_type = SH_ETH_REG_FAST_SH4, .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, - .rmcr_value = 0x00000001, + .rmcr_value = RMCR_RNC, .tx_check = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO, .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | @@ -561,7 +561,7 @@ static struct sh_eth_cpu_data sh7757_dat EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI, .fdr_value = 0x0000072f, - .rmcr_value = 0x00000001, + .rmcr_value = RMCR_RNC, .irq_flags = IRQF_SHARED, .apr = 1, @@ -689,7 +689,7 @@ static struct sh_eth_cpu_data r8a7740_da EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI, .fdr_value = 0x0000070f, - .rmcr_value = 0x00000001, + .rmcr_value = RMCR_RNC, .apr = 1, .mpr = 1, Index: net/drivers/net/ethernet/renesas/sh_eth.h =================================================================== --- net.orig/drivers/net/ethernet/renesas/sh_eth.h +++ net/drivers/net/ethernet/renesas/sh_eth.h @@ -321,6 +321,9 @@ enum TD_STS_BIT { #define TD_TFP (TD_TFP1|TD_TFP0) /* RMCR */ +enum RMCR_BIT { + RMCR_RNC = 0x00000001, +}; #define DEFAULT_RMCR_VALUE 0x00000000 /* ECMR */