net: phy: ti: Fix clock output DT property
authorTrent Piepho <tpiepho@impinj.com>
Fri, 10 May 2019 17:49:08 +0000 (17:49 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 15 Jul 2019 18:32:25 +0000 (13:32 -0500)
commit2529dea8931849c2bf8ee32963ee846e8e06e390
treed7aeb83923dc04f2892cc7d9eb7e29a9607d3e3d
parentc2df9b49ce295ad8ecbeccb7f1d22c9d83e1c0cd
net: phy: ti: Fix clock output DT property

The code block reading the DT property for the clock output control was
before the phy's DT node pointer was set, so it could never work.  Move
it after the node pointer is set.

Also store the unsigned 32-bit property into an unsigned value, not a
signed value, as the former will cause a problem if value overflows.
For instance, if one were to add 0xffffffff as a code to mean the clock
output should be turned off.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Janine Hagemann <j.hagemann@phytec.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/ti.c