aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-07-31Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-20/+14
Conflicts: arch/s390/net/bpf_jit_comp.c drivers/net/ethernet/ti/netcp_ethss.c net/bridge/br_multicast.c net/ipv4/ip_fragment.c All four conflicts were cases of simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-27macb: Fix build with macro'ized readl/writel.David S. Miller1-8/+8
If an architecture defines readl/writel using CPP macros, we get the following kinds of build failure: > > > drivers/net/ethernet/cadence/macb.c:164:1: error: macro "writel" > > > passed 3 arguments, but takes just 2 > macb_or_gem_writel(bp, SA1B, bottom); > ^ Rename the methods so that this doesn't happen. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-27net/macb: suppress compiler warningsAndy Shevchenko1-3/+3
This patch fixes the following warnings: drivers/net/ethernet/cadence/macb.c: In function ‘macb_handle_link_change’: drivers/net/ethernet/cadence/macb.c:266: warning: comparison between signed and unsigned drivers/net/ethernet/cadence/macb.c:267: warning: comparison between signed and unsigned drivers/net/ethernet/cadence/macb.c:291: warning: comparison between signed and unsigned drivers/net/ethernet/cadence/macb.c: In function ‘gem_update_stats’: drivers/net/ethernet/cadence/macb.c:1908: warning: comparison between signed and unsigned drivers/net/ethernet/cadence/macb.c: In function ‘gem_get_ethtool_strings’: drivers/net/ethernet/cadence/macb.c:1988: warning: comparison between signed and unsigned Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-27net/macb: improve big endian CPU supportAndy Shevchenko1-17/+11
The commit a50dad355a53 (net: macb: Add big endian CPU support) converted I/O accessors to readl_relaxed() and writel_relaxed() and consequentially broke MACB driver on AVR32 platforms such as ATNGW100. This patch improves I/O access by checking endiannes first and use the corresponding methods. Fixes: a50dad355a53 (net: macb: Add big endian CPU support) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-26net: macb: Change capability mask for jumbo supportHarini Katakam1-1/+1
JUMBO and NO_GIGABIT_HALF have the same capability masks. Change one of them. Signed-off-by: Harini Katakam <harinik@xilinx.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+1
Conflicts: drivers/net/ethernet/cadence/macb.c drivers/net/phy/phy.c include/linux/skbuff.h net/ipv4/tcp.c net/switchdev/switchdev.c Switchdev was a case of RTNH_H_{EXTERNAL --> OFFLOAD} renaming overlapping with net-next changes of various sorts. phy.c was a case of two changes, one adding a local variable to a function whilst the second was removing one. tcp.c overlapped a deadlock fix with the addition of new tcp_info statistic values. macb.c involved the addition of two zyncq device entries. skbuff.h involved adding back ipv4_daddr to nf_bridge_info whilst net-next changes put two other existing members of that struct into a union. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-22net: macb: Disable half duplex gigabit on ZynqNathan Sullivan1-0/+1
According to the Zynq TRM, gigabit half duplex is not supported. Add a new cap and compatible string so Zynq can avoid advertising that mode. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09net: macb: Add support for jumbo framesHarini Katakam1-0/+9
Enable jumbo frame support for Zynq Ultrascale+ MPSoC. Update the NWCFG register and descriptor length masks accordingly. Jumbo max length register should be set according to support in SoC; it is set to 10240 for Zynq Ultrascale+ MPSoC. Signed-off-by: Harini Katakam <harinik@xilinx.com> Reviewed-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31net/macb: unify peripheral version testingNicolas Ferre1-0/+5
As we need to check peripheral version from the hardware during probe, I introduce a little helper to unify these tests. It would prevent to de-synchronize the test like previously observed. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31net/macb: add the user i/o to ethtool register dumpNicolas Ferre1-1/+1
User i/o register EMAC_USRIO or GMAC_UR can be found on both macb and gem flavors of the peripheral. By using the proper accessor, we can add it to the register dump feature of ethtool. Increment the version of this API so it can be noticed from user space. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31net/macb: fix probe sequence to setup clocks earlierNicolas Ferre1-0/+2
As accessing the peripheral registers need the clocks to be set, we have to enable them as soon as possible. Their configuration depend on the type of device used and determined by the DT compatible string. That lead to add another initialization function in the DT configuration structure. As the device private structure length depend on an information read in the registers, we have to store the clock pointers in temporary variables before feeding the structure fields. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31net/macb: only probe queues once and use stored valuesNicolas Ferre1-0/+1
When merging at91_ether and macb driver during 421d9df0628b (net/macb: merge at91_ether driver into macb driver) the probe function has been split. The code dealing with initialization of queues is now moved in macb_init() which needs information computed in the parent macb_probe() function. So, add the queue_mask information to the private structure and use it when needed in macb_init(). Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/cadence/macb.c Overlapping changes in macb driver, mostly fixes and cleanups in 'net' overlapping with the integration of at91_ether into macb in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-07net/macb: merge at91_ether driver into macb driverCyrille Pitchen1-9/+1
macb and at91_ether drivers can be compiled as modules, but the at91_ether driver use some functions and variables defined in the macb one, thus creating a dependency on the macb driver. Since these drivers are sharing the same logic we can easily merge at91_ether into macb. In order to factorize common probing logic we've added an ->init() function to struct macb_config (the structure associated with the compatible string), and moved macb specific init code from macb_probe to macb_init. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-07net: macb: remove #if defined(CONFIG_ARCH_AT91) sectionsBoris BREZILLON1-0/+2
With multi platform support those sections could lead to unexpected behavior if both ARCH_AT91 and another ARM SoC using the MACB IP are selected. Add two new capabilities to encode the default MII mode and the presence of a CLKEN bit in USRIO register. Then define the appropriate config for IPs embedded in at91 SoCs. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05net: macb: Correct the MID field length valuePunnaiah Choudary Kalluri1-1/+1
The latest spec "I-IPA01-0266-USR Rev 10" limit the MID field length to 12 bit value. For previous versions it is 16 bit value. This change will not break the backward compatibility as the latest ID value is 7 and with in the 12 bit value limit. Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-01net: macb: Properly add DMACFG bit definitionsArun Chandran1-1/+2
Add *_SIZE macros for the bits ENDIA_DESC and ENDIA_PKT Signed-off-by: Arun Chandran <achandran@mvista.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20net: macb: Add big endian CPU supportArun Chandran1-7/+8
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran <achandran@mvista.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-16net/macb: Fix comments to meet style guidelinesXander Huff1-450/+284
Change comments to not exceed 80 characters per line. Update block comments in macb.h to start on the line after /*. Signed-off-by: Xander Huff <xander.huff@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-14net/macb: improved ethtool statistics supportXander Huff1-0/+256
Currently `ethtool -S` simply returns "no stats available". It would be more useful to see what the various ethtool statistics registers' values are. This change implements get_ethtool_stats, get_strings, and get_sset_count functions to accomplish this. Read all GEM statistics registers and sum them into macb.ethtool_stats. Add the necessary infrastructure to make this accessible via `ethtool -S`. Update gem_update_stats to utilize ethtool_stats. Signed-off-by: Xander Huff <xander.huff@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-14net/macb: Adding comments to various #defs to make interpretation easierXander Huff1-107/+162
This change is to help improve at-a-glace knowledge of the purpose of the various Cadence MACB/GEM registers. Comments are more helpful for human readability than short acronyms. Describe various #define varibles Cadence MACB/GEM registers as documented in Xilinix's "Zynq-7000 All Programmable SoC TechnicalReference Manual, v1.9.1 (UG-585)" Signed-off-by: Xander Huff <xander.huff@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-12net/macb: add TX multiqueue support for gemCyrille Pitchen1-5/+31
gem devices designed with multiqueue CANNOT work without this patch. When probing a gem device, the driver must first prepare and enable the peripheral clock before accessing I/O registers. The second step is to read the MID register to find whether the device is a gem or an old macb IP. For gem devices, it reads the Design Configuration Register 6 (DCFG6) to compute to total number of queues, whereas macb devices always have a single queue. Only then it can call alloc_etherdev_mq() with the correct number of queues. This is the reason why the order of some initializations has been changed in macb_probe(). Eventually, the dedicated IRQ and TX ring buffer descriptors are initialized for each queue. For backward compatibility reasons, queue0 uses the legacy registers ISR, IER, IDR, IMR, TBQP and RBQP. On the other hand, the other queues use new registers ISR[1..7], IER[1..7], IDR[1..7], IMR[1..7], TBQP[1..7] and RBQP[1..7]. Except this hardware detail there is no real difference between queue0 and the others. The driver hides that thanks to the struct macb_queue. This structure allows us to share a common set of functions for all the queues. Besides when a TX error occurs, the gem MUST be halted before writing any of the TBQP registers to reset the relevant queue. An immediate side effect is that the other queues too aren't processed anymore by the gem. So macb_tx_error_task() calls netif_tx_stop_all_queues() to notify the Linux network engine that all transmissions are stopped. Also macb_tx_error_task() now calls spin_lock_irqsave() to prevent the interrupt handlers of the other queues from running as each of them may wake its associated queue up (please refer to macb_tx_interrupt()). Finally, as all queues have previously been stopped, they should be restarted calling netif_tx_start_all_queues() and setting the TSTART bit into the Network Control Register. Before this patch, when dealing with a single queue, the driver used to defer the reset of the faulting queue and the write of the TSTART bit until the next call of macb_start_xmit(). As explained before, this bit is now set by macb_tx_error_task() too. That's why the faulting queue MUST be reset by setting the TX_USED bit in its first buffer descriptor before writing the TSTART bit. Queue 0 always exits and is the lowest priority when other queues are available. The higher the index of the queue is, the higher its priority is. When transmitting frames, the TX queue is selected by the skb->queue_mapping value. So queue discipline can be used to define the queue priority policy. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-24net/macb: add RX checksum offload featureCyrille Pitchen1-0/+19
When RX checksum offload is enabled at GEM level (bit 24 set in the Network Control Register), frames with invalid IP, TCP or UDP checksums are discarted even if promiscuous mode is enabled (bit 4 set in the Network Control Register). This was verified with a simple userspace program, which corrupts UDP checksum using libnetfilter_queue. Then both IFF_PROMISC bit must be clear in dev->flags and NETIF_F_RXCSUM bit must be set in dev->features to enable RX checksum offload at GEM level. This way tcpdump is still able to capture corrupted frames. Also skb->ip_summed is set to CHECKSUM_UNNECESSARY only when both TCP/IP or UDP/IP checksums were verified by the GEM. Indeed the GEM may verify only IP checksum but not the one for ICMP (or other protocol than TCP or UDP). Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-24net/macb: add scatter-gather hw featureCyrille Pitchen1-2/+13
The scatter-gather feature will allow to enable the Generic Segmentation Offload. Generic Segmentation Offload can be enabled/disabled using ethtool -K DEVNAME gso on|off. e.g: ethtool -K eth0 gso off When enabled, the driver may be provided with socket buffers splitted into many fragments. These fragments need to be queued into the TX ring in reverse order, starting from to the last one down to the first one, to avoid a race condition with the MAC. Especially the 'TX_USED' bit in word 1 of the transmit buffer descriptor of the first fragment should be cleared at the very final step of the queueing algorithm. This will tell the hardware that fragments are ready to be sent. Also since the MAC only update the status word of the first buffer descriptor of the ethernet frame, the queueing algorithm can no longer expect a 'TX_USED' bit to be set by the MAC into the buffer descriptor following the one for last fragment of the skb. This is why the driver sets the 'TX_USED' bit before queueing any fragment, so the end of queue position is well defined for the MAC. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-24net/macb: configure for FIFO mode and non-gigabitNicolas Ferre1-2/+17
This addition will also allow to configure DMA burst length. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-10net: macb: Adjust tx_clk when link speed changesSoren Brinkmann1-0/+1
Adjust the ethernet clock according to the negotiated link speed. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-06net/macb: change RX path for GEMNicolas Ferre1-0/+13
GEM is able to adapt its DMA buffer size, so change the RX path to take advantage of this possibility and remove all kind of memcpy in this path. This modification introduces function pointers for managing differences between MACB and GEM adapter type. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-06net/macb: increase RX buffer size for GEMNicolas Ferre1-0/+1
Macb Ethernet controller requires a RX buffer of 128 bytes. It is highly sub-optimal for Gigabit-capable GEM that is able to use a bigger DMA buffer. Change this constant and associated macros with data stored in the private structure. RX DMA buffer size has to be multiple of 64 bytes as indicated in DMA Configuration Register specification. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-14net/macb: fix ISR clear-on-write behavior only for some SoCNicolas Ferre1-0/+7
Commit 749a2b6 (net/macb: clear tx/rx completion flags in ISR) introduces clear-on-write on ISR register. This behavior is not always implemented when using Cadence MACB/GEM and is breaking other platforms. We are using the Design Configuration Register 1 information and a capability property to actually activate this clear-on-write behavior on ISR. Reported-by: Hein Tibosch <hein_tibosch@yahoo.es> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Hein Tibosch <hein_tibosch@yahoo.es> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-28net/macb: force endian_swp_pkt_en to offSteffen Trumtrar1-0/+2
The core has a bit for swapping packet data endianism. Reset default from Cadence is off. Xilinx however, who uses this core on the Zynq SoCs, opted for on. Force it to off. This shouldn't change the behaviour for current users of the macb, but enables usage on Zynq devices. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-23net/macb: GEM DMA configuration register updateNicolas Ferre1-0/+11
Add information to the DMA Configuration Register to maximize system performance: - rx/tx packet buffer full memory size - allow possibility to use INCR16 if supported Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Joachim Eastwood <manabian@gmail.com Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/macb: clear unused address registerJoachim Eastwood1-0/+6
Only the first register set is used for matching but we support getting the initial hw addr from any of the registers. To prevent stale entries and false matches clear unused register sets. This most important for the at91_ether driver where u-boot always uses the 2nd register set. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/at91_ether: drop board_data private struct memberJoachim Eastwood1-6/+1
No longer used after gpio phy interrupt support was removed from at91_ether. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/at91_ether: use stat function from macbJoachim Eastwood1-0/+1
Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/macb: export macb_set_hwaddr and macb_get_hwaddrJoachim Eastwood1-0/+2
for usage in at91_ether driver. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: better manage tx errorsNicolas Ferre1-0/+1
Handle all TX errors, not only underruns. TX error management is deferred to a dedicated workqueue. Reinitialize the TX ring after treating all remaining frames, and restart the controller when everything has been cleaned up properly. Napi is not stopped during this task as the driver only handles napi for RX for now. With this sequence, we do not need a special check during the xmit method as the packets will be caught by TX disable during workqueue execution. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: ethtool interface: add register dump featureNicolas Ferre1-0/+3
Add macb_get_regs() ethtool function and its helper function: macb_get_regs_len(). The version field is deduced from the IP revision which gives the "MACB or GEM" information. An additional version field is reserved. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: clean up ring buffer logicHavard Skinnemoen1-7/+15
Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes the code slightly smaller, and hopefully faster as well. Also, doing the ring buffer management this way will simplify things a lot when making the ring sizes configurable in the future. Available number of descriptors in ring buffer function by David Laight. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics, adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: Add support for Gigabit Ethernet modePatrice Vilchez1-0/+4
Add Gigabit Ethernet mode to GEM cadence IP and enable RGMII connection. Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-19net/at91_ether: clean up rx buffer handlingJoachim Eastwood1-13/+0
This patch does two things: * Use macb struct members and remove at91_ether ones * Alloc DMA buffers on netdev start and dealloc on stop Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/at91_ether: use macb dma description structJoachim Eastwood1-6/+1
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/at91_ether: share macb_set_rx_mode with macbJoachim Eastwood1-0/+1
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/at91_ether: use ethtool and mdio from macbJoachim Eastwood1-7/+0
This rips out the at91_ether phy handling and ethtool stuff and replace it with equivalent stuff from macb. The only thing lost is the phy irq support from at91_ether, but this can be added to macb and then benefit all users. Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/macb: export some symbols for at91_etherJoachim Eastwood1-0/+5
Export some symbols to start sharing code between macb and at91_ether drivers. Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/at91_ether: use pclk member instead of ether_clkJoachim Eastwood1-1/+0
Remove old at91_priv member and use pclk member from macb. Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/at91_ether/macb: absorb at91_private in to macb private structJoachim Eastwood1-0/+36
This will make it easier to share code between the drivers and eventually merge them into one driver. Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/macb: add AT91RM9200 specific registers and bits to headerJoachim Eastwood1-0/+6
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2011-12-16net/macb: add DT support for Cadence macb/gem driverJean-Christophe PLAGNIOL-VILLARD1-0/+2
Allow the device tree to provide the mac address and the phy mode. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> [nicolas.ferre@atmel.com: change "compatible" node property, doc and DT hwaddr] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> [jamie@jamieiles.com: add "gem" compatibility strings and doc] Acked-by: Jamie Iles<jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net>
2011-11-22macb: allow GEM to have configurable receive buffer sizeJamie Iles1-0/+5
GEM has configurable receive buffer sizes so requires this to be programmed up. Any size < 2048 and a multiple of 64 bytes is permitted. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-11-22macb: support DMA bus widths > 32 bitsJamie Iles1-0/+19
Some GEM implementations may support DMA bus widths up to 128 bits. We can get the maximum supported DMA bus width from the design configuration register so use that to program the device up. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>