summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fec_ptp.c
AgeCommit message (Collapse)Author
2013-06-07fec: Only pass pdev in fec_ptp_init()Fabio Estevam
Passing pdev in fec_ptp_init() is enough, since we can get ndev locally. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-14fec: Convert printks to netdev_<level>Joe Perches
Use a more current logging message style. Convert the printks where a struct net_device is available to netdev_<level>. Convert the other printks to pr_<level> and add pr_fmt where appropriate. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-13fec: Fix PHC device logFabio Estevam
Currently when booting a mx6 device we get the following on boot: registered PHC device on eth%d Fix it by printing the network device name only after it gets registered, so that the following can be read now: fec 2188000.ethernet eth0: registered PHC device 0 Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-25net: fec: build fec.c and fec_ptp.c to one moduleFrank Li
fec_ptp.ko can't run individually rename fec.c to fec_main.c Build fec.o and fec_ptp.o into one fec.ko Remove unnessary EXPORT_SYMBOL in fec_ptp Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-20fec: Fix the build as moduleFabio Estevam
Since commit ff43da86c69 (NET: FEC: dynamtic check DMA desc buff type) the following build error happens when CONFIG_FEC=m ERROR: "fec_ptp_init" [drivers/net/ethernet/freescale/fec.ko] undefined! ERROR: "fec_ptp_ioctl" [drivers/net/ethernet/freescale/fec.ko] undefined! ERROR: "fec_ptp_start_cyclecounter" [drivers/net/ethernet/freescale/fec.ko] undefined! Fix it by exporting the required fec_ptp symbols. Reported-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-08net: fec: fix spin_lock dead lockFrank Li
========================================================= [ INFO: possible irq lock inversion dependency detected ] 3.8.0-rc5+ #82 Not tainted --------------------------------------------------------- swapper/0/0 just changed the state of lock: (&(&fep->hw_lock)->rlock){..-...}, at: [<8034e2f8>] fec_enet_start_xmit+0x48/0x 2cc but this lock took another, SOFTIRQ-unsafe lock in the past: (prepare_lock){+.+.+.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(prepare_lock); local_irq_disable() lock(&(&fep->hw_lock)->rlock); lock(prepare_lock); <Interrupt> lock(&(&fep->hw_lock)->rlock); *** DEADLOCK *** Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net: fec: reduce spin lock time in fec_ptp_adjfreqFrank Li
move below calculate out of spin lock section diff = fep->cc.mult; diff *= ppb; diff = div_u64(diff, 1000000000ULL); diff is local variable and not neccesary in spin lock Signed-off-by: Frank Li <Frank.Li@freescale.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01FEC: Add time stamping code and a PTP hardware clockFrank Li
This patch adds a driver for the FEC(MX6) that offers time stamping and a PTP haderware clock. Because FEC\ENET(MX6) hardware frequency adjustment is complex, we have implemented this in software by changing the multiplication factor of the timecounter. Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>