[lkml]   [2018]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings
David Miller <> writes:

> From: Andrew Lunn <>
> Date: Thu, 5 Apr 2018 22:40:49 +0200
>> Or could it still contain whatever state the last boot of Linux, or
>> maybe the bootloader, left the PHY in?
> Right, this is my concern as well.

I don't think that should happen.
With config_init() being called (in phy_init_hw()) after soft_reset(),
any state set by software should be cleared.

From DP83620 datasheet description of what happens when BMCR_RESET is

The software reset will reset the device such that all registers
will be reset to default values and the hardware configuration
values will be maintained.

But something else that could be a concern is the risk that there is
boards out there with wrong hardware configuration, which works with
current Linux (because it ignores hardware configuration). Such designs
could break with this patch.

If we need to safeguard against that, maybe we could just keep the
genphy_read_config() function in the kernel, and let board specific code
use it as a phy_fixup where hardware configuration is to be respected.

Would that be a better approach?


 \ /
  Last update: 2018-04-06 13:06    [W:0.054 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site