On 9/2/2015 9:35 AM, Murali Karicheri wrote:
Santosh,
Thanks for update on that.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.
The serdes initialization procedure requires checking the status in theOr SerDes driver can embed the status reg address space.
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
This is read only access so should be fine.
pcie {Serdes Driver with its status register address space might solve this
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.
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.
The SerDes will use the firmware interface to download and configure theFirmware interface usage seems to be correct way.
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.
Thanks for giving the details. It helped me to get better picture.
Regards,
Santosh
Regards,
Santosh