From: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
To: santosh shilimkar
<santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
"Kwok, WingMan" <w-kwok2-l0cyMroinI0@public.gmane.org>,
"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"pawel.moll-5wv7dgnIgG8@public.gmane.org"
<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"mark.rutland-5wv7dgnIgG8@public.gmane.org"
<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] ARM: dts: keystone: use one to one address translations under netcp
Date: Wed, 2 Sep 2015 13:58:06 -0400 [thread overview]
Message-ID: <55E738AE.9000207@ti.com> (raw)
In-Reply-To: <55E730D4.6040102-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
On 09/02/2015 01:24 PM, santosh shilimkar wrote:
> On 9/2/2015 9:35 AM, Murali Karicheri wrote:
>> Santosh,
>>
---Cut-------------------
>>> I suspected the same. I know back then we started with SERDES code
>>> with NETCP but as you already know, its a separate block which
>>> is needed for NIC card to work. Its more of phy and hence its
>>> having different address space is not surprising.
>>
>> Using Phy interface is not acceptable to the subsystem maintainer based
>> on the communication I had on this. Also the Phy here is tighly coupled
>> with the hardware block it is working with. So this model is not right
>> for SerDes driver as it require additional enhancements as described
>> below if needs to be used.
>>
> Thanks for update on that.
>
>> The serdes initialization procedure requires checking the status in the
>> hardware block (PCIe, 1G or 10G) and then taking corrective action. This
>> means a Phy driver would require mapping of related hw address space
>> (PCIe, 1G and 10G) as well which is already mapped by the hardware
>> driver(PCIe, 1G and 10G). One solution is to treat this as a libray
>> function that can be called from the respective hardware device driver.
>> A device node of h/w device (PCIe or 1G) in such as looks like
>>
> Or SerDes driver can embed the status reg address space.
> This is read only access so should be fine.
>
>> pcie {
>>
>> serdes@someaddress {
>> reg = <address of serdes>;
>> }
>> }
>>
>> hw driver will call ks2_serdes_init(node, hw_base_address) to initialize
>> the serdes. Other APIs can be added to enable/disable lane or shutdown
>> etc. The libary will be added to drivers/soc/ti/ and used by various
>> device drivers to initialize and use the phy. As the serdes is slightly
>> integrated with the hardware block, IMO, this is a better approach than
>> using the phy model. The API definitions will be added to
>> include/linux/soc/ti/ folder.
>>
> Serdes Driver with its status register address space might solve this
> sharing problem. Library might work but we should try to have driver
> considering there is a physical device. I don't have strong opinion
> on drivers vs library.
>
In addition to checking status in the SerDes, it needs to also check the
status of the associated hardware block (PCIe, 1G, 10G etc). So this
means, same needs to be mapped twice, first by the above hardware device
drivers and then by the serdes driver which causes problem. My point is
since they both are tightly coupled, a libary is a better option. That
way the mapped address can be passed to the serdes API to perform the
required task, instead of using Phy API which doesn't allow us to do the
same. If SerDes h/w can be brought up independently, the Phy model fits
well.
Murali
>
>> The SerDes will use the firmware interface to download and configure the
>> hardware block to use with PCIe/1G/10G/SRIO. I queried the linux forum
>> on this and the response was that firmware interface can be used for
>> this. The patch will be using the firmware interface instead of
>> embedding magic values in the serdes driver.
>>
> Firmware interface usage seems to be correct way.
> Thanks for giving the details. It helped me to get better picture.
>
> Regards,
> Santosh
>
> Regards,
> Santosh
>
>
--
Murali Karicheri
Linux Kernel, Keystone
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-09-02 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 20:28 [PATCH] ARM: dts: keystone: use one to one address translations under netcp WingMan Kwok
[not found] ` <1441139324-29296-1-git-send-email-w-kwok2-l0cyMroinI0@public.gmane.org>
2015-09-01 21:19 ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
[not found] ` <55E61658.9010207-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-09-02 15:31 ` Kwok, WingMan
2015-09-02 15:50 ` santosh shilimkar
[not found] ` <55E71AB3.7070406-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-09-02 16:35 ` Murali Karicheri
2015-09-02 17:24 ` santosh shilimkar
[not found] ` <55E730D4.6040102-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-09-02 17:58 ` Murali Karicheri [this message]
[not found] ` <55E738AE.9000207-l0cyMroinI0@public.gmane.org>
2015-09-02 18:25 ` santosh shilimkar
2015-09-02 18:42 ` Murali Karicheri
2015-09-03 14:26 ` Tony Lindgren
2015-09-03 14:48 ` santosh.shilimkar
[not found] ` <20150903142645.GS4215-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2015-09-03 19:18 ` Murali Karicheri
[not found] ` <55E89CF8.4050700-l0cyMroinI0@public.gmane.org>
2015-09-08 15:13 ` Tony Lindgren
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=55E738AE.9000207@ti.com \
--to=m-karicheri2-l0cymroini0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=w-kwok2-l0cyMroinI0@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).