From patchwork Tue May 7 05:17:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 241971 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 6A41D2C0115 for ; Tue, 7 May 2013 15:18:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756503Ab3EGFS2 (ORCPT ); Tue, 7 May 2013 01:18:28 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:57202 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650Ab3EGFS1 (ORCPT ); Tue, 7 May 2013 01:18:27 -0400 Received: by mail-pd0-f176.google.com with SMTP id x10so137575pdj.35 for ; Mon, 06 May 2013 22:18:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=uu/nmhBdhIyJb5cdcbOZZ1ilEfVlVQCaE1uPxDfAWAE=; b=VgNSgWt65W5n7JgULpf67Uc4YgwZ/xcv5DmUXgB/Rq2mnpTpo9K2Qe5qc0ejyT7CsJ m8l8EMrRAiCH2unJIuCVFj27hoihtS5UmRsn6cLwKArJ49q/StNU0jPhO+o7hbSJENSx m/7OYUF5oYTgwORxIf2v8bk3QqQGd0/Pj/AhaXAMzLQPtb8FEcw/Nf4qGUgByyyou9Wv nDWvxw90xyQlUWMuV1/nF6eyUDU5UdUjZqZRCWqxuEOXMl7ZTv6Z8X5PNRRpV/kAvoCu UlO7ipNYFomupriqZ1ezAl3ucG0ypT23RxbPfmqCN+nJImpp0BTOng/dh7bpfKjmIx3N bXpg== X-Received: by 10.66.220.104 with SMTP id pv8mr1141196pac.72.1367903906510; Mon, 06 May 2013 22:18:26 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id em2sm26775526pbb.0.2013.05.06.22.18.23 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 22:18:24 -0700 (PDT) From: Nobuhiro Iwamatsu To: netdev@vger.kernel.org Cc: yoshihiro.shimoda.uh@renesas.com, sergei.shtylyov@cogentembedded.com, Nobuhiro Iwamatsu Subject: [PATCH v3 7/9] net: sh-eth: Add irq configureation flags in sh_eth_cpu_data Date: Tue, 7 May 2013 14:17:53 +0900 Message-Id: <1367903875-32606-7-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367903875-32606-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1367903875-32606-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Gm-Message-State: ALoCoQnV94t4olWRw8Psg37XMT35gDAvyI5XtAY7TQS9wk9KVM7oFdiWTSqn7DOJ4dn8XJEUCYQn Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org sh-eth is supporting some SH and shmobile CPU. CPU with two or more network devices is in these, these specify IRQF_SHARED as IRQ configureation flags. This changes to set IRQ configureation flags using in sh_eth_cpu_data. Signed-off-by: Nobuhiro Iwamatsu --- V3: - Fix indent. - Remove irq_flags from struct sh_eth_private. V2: no change. drivers/net/ethernet/renesas/sh_eth.c | 12 ++++-------- drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index fe9ff35..880f0ca 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -462,6 +462,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI, .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE, + .irq_flags = IRQF_SHARED, .apr = 1, .mpr = 1, .tpauser = 1, @@ -570,6 +571,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = { .fdr_value = 0x0000072f, .rmcr_value = 0x00000001, + .irq_flags = IRQF_SHARED, .apr = 1, .mpr = 1, .tpauser = 1, @@ -652,6 +654,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { .hw_crc = 1, .select_mii = 1, #else + .irq_flags = IRQF_SHARED, .tsu_shared_reg = 1, #endif }; @@ -1912,14 +1915,7 @@ static int sh_eth_open(struct net_device *ndev) pm_runtime_get_sync(&mdp->pdev->dev); ret = request_irq(ndev->irq, sh_eth_interrupt, -#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \ - defined(CONFIG_CPU_SUBTYPE_SH7764) || \ - defined(CONFIG_CPU_SUBTYPE_SH7757) - IRQF_SHARED, -#else - 0, -#endif - ndev->name, ndev); + mdp->cd->irq_flags, ndev->name, ndev); if (ret) { dev_err(&ndev->dev, "Can not assign IRQ number\n"); return ret; diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h index 71c5559..2a62505 100644 --- a/drivers/net/ethernet/renesas/sh_eth.h +++ b/drivers/net/ethernet/renesas/sh_eth.h @@ -463,6 +463,7 @@ struct sh_eth_cpu_data { unsigned long tx_error_check; /* hardware features */ + unsigned long irq_flags; /* IRQ configuration flags */ unsigned no_psr:1; /* EtherC DO NOT have PSR */ unsigned apr:1; /* EtherC have APR */ unsigned mpr:1; /* EtherC have MPR */