diff options
author | Tony Lindgren <tony@atomide.com> | 2014-03-02 17:22:03 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-03-02 17:22:03 -0500 |
commit | f777ba1780584b100ab9664cc06d04f3bb273a84 (patch) | |
tree | 865813eb0078530ca3b036c0c3eee6ce33f9315f /drivers/net/phy/dp83640.c | |
parent | f68e355c86cff91e5266cf937ea24fcba0641900 (diff) | |
parent | 1a5fe3ca5ea192d4309dd61f3626b79ff38693c2 (diff) |
Merge tag 'for_3.15/dts_signed' of git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt into omap-for-v3.15/dt
Add craneboard devices
Add more N900 devices
Add am43x-epos-evm and am437x-gp-evm devices
Add OMAP4 DMM devices
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/dra7.dtsi
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r-- | drivers/net/phy/dp83640.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 547725fa8671..9414fa272160 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c | |||
@@ -437,7 +437,10 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp, | |||
437 | if (on) { | 437 | if (on) { |
438 | gpio_num = gpio_tab[EXTTS0_GPIO + index]; | 438 | gpio_num = gpio_tab[EXTTS0_GPIO + index]; |
439 | evnt |= (gpio_num & EVNT_GPIO_MASK) << EVNT_GPIO_SHIFT; | 439 | evnt |= (gpio_num & EVNT_GPIO_MASK) << EVNT_GPIO_SHIFT; |
440 | evnt |= EVNT_RISE; | 440 | if (rq->extts.flags & PTP_FALLING_EDGE) |
441 | evnt |= EVNT_FALL; | ||
442 | else | ||
443 | evnt |= EVNT_RISE; | ||
441 | } | 444 | } |
442 | ext_write(0, phydev, PAGE5, PTP_EVNT, evnt); | 445 | ext_write(0, phydev, PAGE5, PTP_EVNT, evnt); |
443 | return 0; | 446 | return 0; |
@@ -1058,6 +1061,13 @@ static void dp83640_remove(struct phy_device *phydev) | |||
1058 | kfree(dp83640); | 1061 | kfree(dp83640); |
1059 | } | 1062 | } |
1060 | 1063 | ||
1064 | static int dp83640_config_init(struct phy_device *phydev) | ||
1065 | { | ||
1066 | enable_status_frames(phydev, true); | ||
1067 | ext_write(0, phydev, PAGE4, PTP_CTL, PTP_ENABLE); | ||
1068 | return 0; | ||
1069 | } | ||
1070 | |||
1061 | static int dp83640_ack_interrupt(struct phy_device *phydev) | 1071 | static int dp83640_ack_interrupt(struct phy_device *phydev) |
1062 | { | 1072 | { |
1063 | int err = phy_read(phydev, MII_DP83640_MISR); | 1073 | int err = phy_read(phydev, MII_DP83640_MISR); |
@@ -1195,11 +1205,6 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) | |||
1195 | 1205 | ||
1196 | mutex_lock(&dp83640->clock->extreg_lock); | 1206 | mutex_lock(&dp83640->clock->extreg_lock); |
1197 | 1207 | ||
1198 | if (dp83640->hwts_tx_en || dp83640->hwts_rx_en) { | ||
1199 | enable_status_frames(phydev, true); | ||
1200 | ext_write(0, phydev, PAGE4, PTP_CTL, PTP_ENABLE); | ||
1201 | } | ||
1202 | |||
1203 | ext_write(0, phydev, PAGE5, PTP_TXCFG0, txcfg0); | 1208 | ext_write(0, phydev, PAGE5, PTP_TXCFG0, txcfg0); |
1204 | ext_write(0, phydev, PAGE5, PTP_RXCFG0, rxcfg0); | 1209 | ext_write(0, phydev, PAGE5, PTP_RXCFG0, rxcfg0); |
1205 | 1210 | ||
@@ -1281,6 +1286,7 @@ static void dp83640_txtstamp(struct phy_device *phydev, | |||
1281 | } | 1286 | } |
1282 | /* fall through */ | 1287 | /* fall through */ |
1283 | case HWTSTAMP_TX_ON: | 1288 | case HWTSTAMP_TX_ON: |
1289 | skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; | ||
1284 | skb_queue_tail(&dp83640->tx_queue, skb); | 1290 | skb_queue_tail(&dp83640->tx_queue, skb); |
1285 | schedule_work(&dp83640->ts_work); | 1291 | schedule_work(&dp83640->ts_work); |
1286 | break; | 1292 | break; |
@@ -1330,6 +1336,7 @@ static struct phy_driver dp83640_driver = { | |||
1330 | .flags = PHY_HAS_INTERRUPT, | 1336 | .flags = PHY_HAS_INTERRUPT, |
1331 | .probe = dp83640_probe, | 1337 | .probe = dp83640_probe, |
1332 | .remove = dp83640_remove, | 1338 | .remove = dp83640_remove, |
1339 | .config_init = dp83640_config_init, | ||
1333 | .config_aneg = genphy_config_aneg, | 1340 | .config_aneg = genphy_config_aneg, |
1334 | .read_status = genphy_read_status, | 1341 | .read_status = genphy_read_status, |
1335 | .ack_interrupt = dp83640_ack_interrupt, | 1342 | .ack_interrupt = dp83640_ack_interrupt, |