From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: netdev@vger.kernel.org, yoshihiro.shimoda.uh@renesas.com
Subject: Re: [PATCH] net: sh-eth: Add flag to determine the type of TSU register
Date: Tue, 07 May 2013 11:36:49 +0900 [thread overview]
Message-ID: <518868C1.7010502@renesas.com> (raw)
In-Reply-To: <517007B0.7010807@cogentembedded.com>
(2013/04/18 23:48), Sergei Shtylyov wrote:
> Hello.
>
> On 18-04-2013 5:26, Nobuhiro Iwamatsu wrote:
>
>> Some sh-eth devices may have two ether devices in the inside.
>
> s/in the//
I will remove this.
>
>> And the function of TSU is accessed from each ether device.
>> In this case, sh-eth need to remap address using devm_ioremap(),
>> without using devm_ioremap_resource().
>
> Do you mean TSU region is shared between Ether devices?
>
>> acl_multi_reg
>
> You meant 'tsu_multi_reg'.
>
>> of sh_eth_cpu_data is used for this control.
>
> So, "multi" here means "shared"?
>
Yes, your comment is right.
I will change variable name from tsu_multi_reg to tsu_shared_reg.
>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> [...]
>
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
>> index a7499cb..d9458ae 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
>> @@ -2743,7 +2747,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
>> ret = -ENODEV;
>> goto out_release;
>> }
>> - mdp->tsu_addr = devm_ioremap_resource(&pdev->dev, rtsu);
>> +
>> + if (mdp->cd->tsu_multi_reg)
>> + mdp->tsu_addr = devm_ioremap(&pdev->dev, rtsu->start,
>> + resource_size(rtsu));
>> + else
>> + mdp->tsu_addr = devm_ioremap_resource(&pdev->dev, rtsu);
>> if (IS_ERR(mdp->tsu_addr)) {
>> ret = PTR_ERR(mdp->tsu_addr);
>> goto out_release;
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
>> index 1ddc9f2..6f9a997 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.h
>> +++ b/drivers/net/ethernet/renesas/sh_eth.h
>> @@ -472,6 +472,7 @@ struct sh_eth_cpu_data {
>> unsigned tpauser:1; /* EtherC have TPAUSER */
>> unsigned bculr:1; /* EtherC have BCULR */
>> unsigned tsu:1; /* EtherC have TSU */
>> + unsigned tsu_multi_reg:1; /* EtherC have TSU multi register */
>
> Please indent the comment with tab(s) like all the others.
OK, I will fix.
Nobuhiro
prev parent reply other threads:[~2013-05-07 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 1:26 [PATCH] net: sh-eth: Add flag to determine the type of TSU register Nobuhiro Iwamatsu
2013-04-18 14:48 ` Sergei Shtylyov
2013-05-07 2:36 ` Nobuhiro Iwamatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518868C1.7010502@renesas.com \
--to=nobuhiro.iwamatsu.yj@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.