aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-13drivers: net: ethernet: cpsw: implement get phy_id via ioctlMugunthan V N1-2/+14
Implement get phy_id via ioctl SIOCGMIIPHY. In switch mode active phy_id is returned and in dual EMAC mode slave's specific phy_id is returned. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-13driver: net: ethernet: cpsw: implement interrupt pacing via ethtoolMugunthan V N1-0/+104
This patch implements support for interrupt pacing block of CPSW via ethtool Inetrrupt pacing block is common of both the ethernet interface in dual emac mode Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-13driver: net: ethernet: cpsw: implement ethtool get/set phy settingMugunthan V N1-0/+29
This patch implements get/set of the phy settings via ethtool apis Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-13drivers: net: ethernet: cpsw: change cpts_active_slave to active_slaveMugunthan V N1-5/+5
Change cpts_active_slave to active_slave so that the same DT property can be used to ethtool and SIOCGMIIPHY. CC: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-09drivers:net: Remove unnecessary OOM messages after netdev_alloc_skbJoe Perches1-3/+1
Emitting netdev_alloc_skb and netdev_alloc_skb_ip_align OOM messages is unnecessary as there is already a dump_stack after allocation failures. Other trivial changes around these removals: Convert a few comparisons of pointer to 0 to !pointer. Change flow to remove unnecessary label. Remove now unused variable. Hoist assignment from if. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-26drivers: net: ethernet: cpsw: consider number of slaves in interationDaniel Mack1-1/+1
Make cpsw_add_default_vlan() look at the actual number of slaves for its iteration, so boards with less than 2 slaves don't ooops at boot. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: David S. Miller <davem@davemloft.net> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-21Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-0/+3
Pull ARM SoC multiplatform support from Arnd Bergmann: "Converting more ARM platforms to multiplatform support. This time, OMAP gets converted, which is a major step since this is by far the largest platform in terms of code size. The same thing happens to the vt8500 platform." * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: net: cwdavinci_cpdma: export symbols for cpsw remoteproc: omap: depend on OMAP_MBOX_FWK [media] davinci: do not include mach/hardware.h ARM: OMAP2+: Make sure files with omap initcalls include soc.h ARM: OMAP2+: Include soc.h to drm.c to fix compiling ARM: OMAP2+: Fix warning for hwspinlock omap_postcore_initcall ARM: multi_v7_defconfig: add ARCH_ZYNQ ARM: multi_v7_defconfig: remove unnecessary CONFIG_GPIOLIB arm: vt8500: Remove remaining mach includes arm: vt8500: Convert debug-macro.S to be multiplatform friendly arm: vt8500: Remove single platform Kconfig options ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S ARM: OMAP2+: Add minimal support for booting vexpress ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support ARM: OMAP2+: Disable code that currently does not work with multiplaform ARM: OMAP2+: Add multiplatform debug_ll support ARM: OMAP: Fix dmaengine init for multiplatform ARM: OMAP: Fix i2c cmdline initcall for multiplatform ARM: OMAP2+: Use omap initcalls ARM: OMAP2+: Limit omap initcalls to omap only on multiplatform kernels
2013-02-21Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-2/+2
Pull driver core patches from Greg Kroah-Hartman: "Here is the big driver core merge for 3.9-rc1 There are two major series here, both of which touch lots of drivers all over the kernel, and will cause you some merge conflicts: - add a new function called devm_ioremap_resource() to properly be able to check return values. - remove CONFIG_EXPERIMENTAL Other than those patches, there's not much here, some minor fixes and updates" Fix up trivial conflicts * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits) base: memory: fix soft/hard_offline_page permissions drivercore: Fix ordering between deferred_probe and exiting initcalls backlight: fix class_find_device() arguments TTY: mark tty_get_device call with the proper const values driver-core: constify data for class_find_device() firmware: Ignore abort check when no user-helper is used firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER firmware: Make user-mode helper optional firmware: Refactoring for splitting user-mode helper code Driver core: treat unregistered bus_types as having no devices watchdog: Convert to devm_ioremap_resource() thermal: Convert to devm_ioremap_resource() spi: Convert to devm_ioremap_resource() power: Convert to devm_ioremap_resource() mtd: Convert to devm_ioremap_resource() mmc: Convert to devm_ioremap_resource() mfd: Convert to devm_ioremap_resource() media: Convert to devm_ioremap_resource() iommu: Convert to devm_ioremap_resource() drm: Convert to devm_ioremap_resource() ...
2013-02-18drivers: net: davinci_cpdma: acknowledge interrupt properlyMugunthan V N3-12/+24
CPDMA interrupts are not properly acknowledged which leads to interrupt storm, only cpdma interrupt 0 is acknowledged in Davinci CPDMA driver. Changed cpdma_ctlr_eoi api to acknowledge 1 and 2 interrupts which are used for rx and tx respectively. Reported-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-15net: cwdavinci_cpdma: export symbols for cpswArnd Bergmann1-0/+3
With the support for ARM AM33xx in multiplatform kernels in 3.9, an older bug appears in ARM allmodconfig: When the cpsw driver is built as a module with cpdma support enabled, it uses symbols that the cpdma driver does not export. Without this patch, building allmodconfig results in: ERROR: "cpdma_ctlr_int_ctrl" [drivers/net/ethernet/ti/ti_cpsw.ko] undefined! ERROR: "cpdma_control_set" [drivers/net/ethernet/ti/ti_cpsw.ko] undefined! ERROR: "cpdma_ctlr_eoi" [drivers/net/ethernet/ti/ti_cpsw.ko] undefined! Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: David S. Miller <davem@davemloft.net> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: netdev@vger.kernel.org
2013-02-13net: ethernet: ti: remove redundant NULL check.Cyril Roelandt1-4/+2
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in cpdma_ctlr_destroy() can safely be removed. Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-12driver: net: ethernet: cpsw: dual emac interface implementationMugunthan V N1-52/+283
The CPSW switch can act as Dual EMAC by segregating the switch ports using VLAN and port VLAN as per the TRM description in 14.3.2.10.2 Dual Mac Mode Following CPSW components will be common for both the interfaces. * Interrupt source is common for both eth interfaces * Interrupt pacing is common for both interfaces * Hardware statistics is common for all the ports * CPDMA is common for both eth interface * CPTS is common for both the interface and it should not be enabled on both the interface as timestamping information doesn't contain port information. Constrains * Reserved VID of One port should not be used in other interface which will enable switching functionality * Same VID must not be used in both the interface which will enable switching functionality Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-12driver: net: ethernet: cpsw: make cpts as pointerMugunthan V N1-15/+21
As CPTS is common module for both EMAC in Dual EMAC mode so making cpts as pointer. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-12driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detectionMugunthan V N4-9/+24
* Introduced parameter to add port number for directed packet in cpdma_chan_submit * Source port detection macro with DMA descriptor status Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-06drivers: net:ethernet: cpsw: add support for VLANMugunthan V N2-2/+108
adding support for VLAN interface for cpsw. CPSW VLAN Capability * Can filter VLAN packets in Hardware Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-06drivers: net: cpsw: Add helper functions for VLAN ALE implementationMugunthan V N3-22/+113
Add helper functions for VLAN ALE implementations for Add, Delete Dump VLAN related ALE entries Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04ethernet: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches2-8/+4
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Fix a few whitespace defects. Convert a constant 6 to ETH_ALEN. Use parentheses around sizeof. Convert vmalloc/memset to vzalloc. Remove now unused size variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-21net: ethernet: davinci: Fix build breakageThierry Reding1-1/+1
The correct name of the transmit DMA channel field in struct emac_priv is txchan, not txch. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-18net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptorsMugunthan V N4-13/+57
When there is heavy transmission traffic in the CPDMA, then Rx descriptors memory is also utilized as tx desc memory looses all rx descriptors and the driver stops working then. This patch adds boundary for tx and rx descriptors in bd ram dividing the descriptor memory to ensure that during heavy transmission tx doesn't use rx descriptors. This patch is already applied to davinci_emac driver, since CPSW and davici_dmac shares the same CPDMA, moving the boundry seperation from Davinci EMAC driver to CPDMA driver which was done in the following commit commit 86d8c07ff2448eb4e860e50f34ef6ee78e45c40c Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Tue Jan 3 05:27:47 2012 +0000 net/davinci: do not use all descriptors for tx packets The driver uses a shared pool for both rx and tx descriptors. During open it queues fixed number of 128 descriptors for receive packets. For each received packet it tries to queue another descriptor. If this fails the descriptor is lost for rx. The driver has no limitation on tx descriptors to use, so it can happen during a nmap / ping -f attack that the driver allocates all descriptors for tx and looses all rx descriptors. The driver stops working then. To fix this limit the number of tx descriptors used to half of the descriptors available, the rx path uses the other half. Tested on a custom board using nmap / ping -f to the board from two different hosts. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-14net: phy: remove flags argument from phy_{attach, connect, connect_direct}Florian Fainelli3-4/+4
The flags argument of the phy_{attach,connect,connect_direct} functions is then used to assign a struct phy_device dev_flags with its value. All callers but the tg3 driver pass the flag 0, which results in the underlying PHY drivers in drivers/net/phy/ not being able to actually use any of the flags they would set in dev_flags. This patch gets rid of the flags argument, and passes phydev->dev_flags to the internal PHY library call phy_attach_direct() such that drivers which actually modify a phy device dev_flags get the value preserved for use by the underlying phy driver. Acked-by: Kosta Zertsekel <konszert@marvell.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-11drivers/net/ethernet/ti: remove depends on CONFIG_EXPERIMENTALKees Cook1-2/+2
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it from any "depends on" lines in Kconfigs. CC: Tony Lindgren <tony@atomide.com> CC: Mugunthan V N <mugunthanvnm@ti.com> CC: Kevin Hilman <khilman@ti.com> CC: "David S. Miller" <davem@davemloft.net> CC: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: David S. Miller <davem@davemloft.net>
2013-01-06ethtool: fix drvinfo strings set in driversJiri Pirko3-9/+9
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-03net: remove unnecessary NET_ADDR_RANDOM "bitclean"Jiri Pirko1-1/+0
NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-26cpts: fix a run time warn_on.Richard Cochran1-1/+1
This patch fixes a warning in clk_enable by calling clk_prepare_enable instead. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-26cpts: fix build error by removing useless code.Richard Cochran2-2/+0
The cpts driver tries to obtain the input clock frequency by calling the clock's internal 'recalc' method. Since <plat/clock.h> has been removed, this code can no longer compile. However, the driver never makes use of the frequency value, so this patch fixes the issue by removing the offending code altogether. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-14cpts: Fix build error caused by include of plat/clock.hTony Lindgren1-2/+0
Commit 87c0e764 (cpts: introduce time stamping code and a PTP hardware clock) mistakenly included plat/clock.h that should not be included by drivers even if it exists. Otherwise we get the following error with at least omap2plus_defconfig: drivers/net/ethernet/ti/cpts.c:30:24: error: plat/clock.h: No such file or directory Signed-off-by: Tony Lindgren <tony@atomide.com Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman1-3/+2
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03net/davinci_emac: remove __dev* attributesBill Pemberton2-6/+6
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03cpsw: remove __dev* attributesBill Pemberton1-3/+3
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03tlan: remove __dev* attributesBill Pemberton1-4/+4
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Samuel Chessman <chessman@tux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03cpmac: remove __dev* attributesBill Pemberton1-5/+5
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Florian Fainelli <florian@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28net: ethernet: cpsw: fix build warnings for CPSW when CPTS not selectedMugunthan V N1-4/+3
CC drivers/net/ethernet/ti/cpsw.o drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_ndo_ioctl': drivers/net/ethernet/ti/cpsw.c:881:20: warning: unused variable 'priv' The build warning is generated when CPTS is not selected in Kernel Build. Fixing by passing the net_device pointer to cpts IOCTL instead of passing priv Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-26cpts: add missing kconfig dependencyRichard Cochran1-0/+1
The Common Platform Time Sync function of the CPSW does not depend the CPSW configuration option as it should. This patch fixes the issue by adding the dependency. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net: cpsw: halt network stack before halting the device during suspendMugunthan V N1-3/+3
Move network stack halt APIs before halting the hardware to ensure no packets are queued to hardware during closing the device during suspend sequence. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14cpsw: simplify the setup of the register pointersRichard Cochran1-139/+103
Instead of having a host of different register offsets in the device tree, this patch simplifies the CPSW code by letting the driver set the proper register offsets automatically, based on the CPSW version. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net: cpsw: Add parent<->child relation support between cpsw and mdioVaibhav Hiremath1-2/+14
CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma, cpsw, etc... These sub-modules are also used in some of Davinci family of devices. Now based on requirement, use-case and available technology nodes the integration of these sub-modules varies across devices. So coming back to Linux net driver, currently separate and independent platform devices & drivers for CPSW and MDIO is implemented. In case of Davinci they both has separate control, from resources perspective, like clock. In case of AM33XX, the resources are shared and only one register bit-field is provided to control module/clock enable/disable, makes it difficult to handle common resource. So the solution here implemented in this patch is, Create parent<->child relationship between both the drivers, making CPSW as a parent and MDIO as its child and enumerate all the child nodes under CPSW module. Both the drivers will function exactly the way it was operating before, including runtime-pm functionality. No change is required in MDIO driver (for that matter to any child driver). As this is only supported during DT boot, the parent<->child relationship is created and populated in DT execution flow. The only required change is inside DTS file, making MDIO as a child to CPSW node. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net: davinci_mdio: Fix typo mistake in calling runtime-pm apiVaibhav Hiremath1-1/+1
By mistake (most likely a copy-paste), instead of pm_runtime_get_sync() api, driver is calling pm_runtime_put_sync() api in resume callback function. The bug was introduced by commit id (ae2c07aaf74: davinci_mdio: runtime PM support). Now, the reason why it didn't impact functionality is, the patch has been tested on AM335x-EVM and BeagleBone platform while submitting; and in case of AM335x the MDIO driver doesn't control the module enable/disable part, which is handled by CPSW driver. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03cpsw: fix leaking IO mappingsRichard Cochran1-9/+8
The CPSW driver remaps two different IO regions, but fails to unmap them both. This patch fixes the issue by calling iounmap in the appropriate places. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03cpsw: rename register banks to match the reference manual, part 2Richard Cochran1-13/+13
The code mixes up the CPSW_SS and the CPSW_WR register naming. This patch changes the names to conform to the published Technical Reference Manual from TI, in order to make working on the code less confusing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03ptp: fixup Kconfig for two PHC drivers.Richard Cochran1-1/+1
Ben Hutchings recently came up with a better way to handle the kconfig dependencies for the PTP hardware clocks. This patch converts one new and one older driver to the new scheme. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: support the HWTSTAMP ioctl and the CPTSRichard Cochran1-0/+182
This patch hooks into the CPTS code and adds support for the HWTSTAMP ioctl. The patch includes code for the CPSW version found in the dm814x even though the background device tree support for this board is still missing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpts: specify the input clock frequency via DTRichard Cochran1-0/+14
This patch adds a way to configure the CPTS input clock scaling factors via the device tree. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add a DT field for the active time stamping portRichard Cochran1-0/+7
Because time stamping on both external ports of the switch simultaneously is positively useless from the application's point of view, this patch provides a DT configuration method to choose the active port. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add a DT field for the cpts offsetRichard Cochran1-0/+7
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpts: introduce time stamping code and a PTP hardware clock.Richard Cochran4-1/+582
This patch adds a driver for the CPTS that offers time stamping and a PTP hardware clock. Because some of the CPTS hardware variants (like the am335x) do not support frequency adjustment, we have implemented this in software by changing the multiplication factor of the timecounter. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: support both silicon versionsRichard Cochran1-16/+90
This patch fixes the cpsw driver to operate correctly with both the dm814x and the am335x versions of the switch hardware. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: remember the silicon versionRichard Cochran1-0/+4
This patch lets the CPSW driver remember the version number in order to support the two different variants already in the wild. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add missing fields to the CPSW_SS register bank.Richard Cochran1-0/+8
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: rename register banks to match the reference manualRichard Cochran1-9/+9
The code mixes up the CPSW_SS and the CPSW_WR register naming. This patch changes the names to conform to the published Technical Reference Manual from TI, in order to make working on the code less confusing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>