Commit 5b3dfd13 authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu Committed by David S. Miller

sh_eth: add IRQ flags to 'struct sh_eth_cpu_data'

The driver supports some SH and SH-Mobile SOCs. There are SOCs with two or more
Ethernet devices, for these we need to pass IRQF_SHARED to request_irq().  Add
the 'irq_flags' field to the 'struct sh_eth_cpu_data' instead of #ifdef'fery.
Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: properly aligned request_irq() call continuation line, reworded the
changelog, reworded the subject, changing the prefix.]
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f861341
...@@ -462,6 +462,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { ...@@ -462,6 +462,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI, EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI,
.tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE, .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE,
.irq_flags = IRQF_SHARED,
.apr = 1, .apr = 1,
.mpr = 1, .mpr = 1,
.tpauser = 1, .tpauser = 1,
...@@ -570,6 +571,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = { ...@@ -570,6 +571,7 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = {
.fdr_value = 0x0000072f, .fdr_value = 0x0000072f,
.rmcr_value = 0x00000001, .rmcr_value = 0x00000001,
.irq_flags = IRQF_SHARED,
.apr = 1, .apr = 1,
.mpr = 1, .mpr = 1,
.tpauser = 1, .tpauser = 1,
...@@ -650,6 +652,8 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { ...@@ -650,6 +652,8 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
#if defined(CONFIG_CPU_SUBTYPE_SH7734) #if defined(CONFIG_CPU_SUBTYPE_SH7734)
.hw_crc = 1, .hw_crc = 1,
.select_mii = 1, .select_mii = 1,
#else
.irq_flags = IRQF_SHARED,
#endif #endif
}; };
...@@ -1908,14 +1912,7 @@ static int sh_eth_open(struct net_device *ndev) ...@@ -1908,14 +1912,7 @@ static int sh_eth_open(struct net_device *ndev)
pm_runtime_get_sync(&mdp->pdev->dev); pm_runtime_get_sync(&mdp->pdev->dev);
ret = request_irq(ndev->irq, sh_eth_interrupt, ret = request_irq(ndev->irq, sh_eth_interrupt,
#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \ mdp->cd->irq_flags, ndev->name, ndev);
defined(CONFIG_CPU_SUBTYPE_SH7764) || \
defined(CONFIG_CPU_SUBTYPE_SH7757)
IRQF_SHARED,
#else
0,
#endif
ndev->name, ndev);
if (ret) { if (ret) {
dev_err(&ndev->dev, "Can not assign IRQ number\n"); dev_err(&ndev->dev, "Can not assign IRQ number\n");
return ret; return ret;
......
...@@ -463,6 +463,7 @@ struct sh_eth_cpu_data { ...@@ -463,6 +463,7 @@ struct sh_eth_cpu_data {
unsigned long tx_error_check; unsigned long tx_error_check;
/* hardware features */ /* hardware features */
unsigned long irq_flags; /* IRQ configuration flags */
unsigned no_psr:1; /* EtherC DO NOT have PSR */ unsigned no_psr:1; /* EtherC DO NOT have PSR */
unsigned apr:1; /* EtherC have APR */ unsigned apr:1; /* EtherC have APR */
unsigned mpr:1; /* EtherC have MPR */ unsigned mpr:1; /* EtherC have MPR */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment