aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-02net: sh_eth: Add r8a7794 supportHisashi Nakamura1-0/+2
Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com> [uli: added bindings documentation] Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-02sh_eth: remove checks around dev_kfree_skb() callsSergei Shtylyov1-12/+6
Since consume_skb() (and hence dev_kfree_skb() macro) checks the passed pointer for NULL, there's no need to check for NULL before invoking dev_kfree_skb(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-11net: sh_eth: Fix timing of RACT setting in sh_eth_rx()Yoshihiro Shimoda1-1/+0
This patch fixes an issue that we cannot use nfs rootfs correctly on r8a7790 when the command below runs on a host PC. $ sudo ping -f -l 8 $BOARD_IP_ADDR Since the driver sets the RACT to 1 in the first while loop of sh_eth_rx(), the controller accepts a next frame into the next RX descriptor during the while loop. But, in the first while loop doesn't allocate a next skb. So, this patch removes the RACT setting in the first while loop of sh_eth_rx(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-11net: sh_eth: Fix receive packet "exceeded" condition in sh_eth_rx()Yoshihiro Shimoda1-5/+3
This patch fixes the packet "exceeded" condition in sh_eth_rx() when RACT in an RX descriptor is not set and the "quota" is 0. Otherwise, kernel panic happens because the "&n->poll_list" is deleted twice in sh_eth_poll() which calls napi_complete() and net_rx_action(). Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-11/+23
Conflicts: include/net/inetpeer.h net/ipv6/output_core.c Changes in net were fixing bugs in code removed in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-03sh_eth: fix SH7619/771x supportSergei Shtylyov1-0/+21
Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus totally breaking SH7619/771x support. Add the missing entries using the data from before that commit. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-03sh_eth: use RNC mode for packet receptionBen Dooks2-11/+2
The current behaviour of the sh_eth driver is not to use the RNC bit for the receive ring. This means that every packet recieved is not only generating an IRQ but it also stops the receive ring DMA as well until the driver re-enables it after unloading the packet. This means that a number of the following errors are generated due to the receive packet FIFO overflowing due to nowhere to put packets: net eth0: Receive FIFO Overflow Since feedback from Yoshihiro Shimoda shows that every supported LSI for this driver should have the bit enabled it seems the best way is to remove the RMCR default value from the per-system data and just write it when initialising the RMCR value. This is discussed in the message (http://www.spinics.net/lists/netdev/msg284912.html). I have tested the RMCR_RNC configuration with NFS root filesystem and the driver has not failed yet. There are further test reports from Sergei Shtylov and others for both the R8A7790 and R8A7791. There is also feedback fron Cao Minh Hiep[1] which reports the same issue in (http://comments.gmane.org/gmane.linux.network/316285) showing this fixes issues with losing UDP datagrams under iperf. Tested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-13sh_eth: replace devm_kzalloc() with devm_kmalloc_array()Sergei Shtylyov1-2/+2
When I was converting the driver to the managed device API, only devm_kzalloc() was available for memory allocation, so I had to use it, despite zeroing out the PHY IRQ array right before initializing all its entries to PHY_POLL was quite stupid. Now that devm_kmalloc_array() has become available, we can avoid the needless zeroing out... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe1-1/+1
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-28sh_eth: ensure pm_runtime cannot suspend the device during initBen Dooks1-2/+6
The pm_rumtime work queue is causing the device to be suspended during initialisation, thus the initialisation may not be able to access registers properly. As the code is called from a work queue, it is possible that this is not seen from certain configurations/builds due to the asynchronos nature of the code. Another issue has also been found where the network device registration calls back into the driver thus causing further pm_runtime calls that also caused issues with the MDIO bus code. This has now been checked and is the only place the MDIO can be called without the device open. Use pm_runtime_get_sync() and pm_runtime_put() to ensure that the pm system does not suspend it during the probe() call and remove the now unnecessary pm_runtime_resume() call. Also add a call in the error path to call pm_runtime_disable(). This fixes the external abort that can cause /sbin/init or other such init processed to die. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-20sh_eth: Remove goto statements that jump straight to a returnLaurent Pinchart1-21/+9
"goto" is well accepted for error paths in the kernel but should not be used unnecessarily. Return the correct value directly instead of using a goto when possible. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-20sh_eth: Register MDIO bus before registering the network deviceLaurent Pinchart1-11/+9
Network API functions that rely on the MDIO bus can be called as soon as the driver calls register_netdev(). Register the MDIO bus before the network device to avoid race conditions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-20sh_eth: Simplify MDIO bus initialization and releaseLaurent Pinchart1-19/+11
The network device passed to the sh_mdio_init and sh_mdio_release functions is only used to access the sh_eth_private instance. Pass it directly to those functions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-20sh_eth: Use the platform device as the MDIO bus parentLaurent Pinchart1-1/+1
The MDIO bus parent is set to the network device. Beside not reflecting the hardware topology, this prevents registering the MDIO bus before initializing the network device. Fix it by setting the MDIO bus parent to the platform device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-20sh_eth: Use the platform device for memory allocationLaurent Pinchart1-4/+3
Memory allocated for the MDIO bus with the devm_kzalloc() API is associated with the network device. While this will cause memory to be freed at the right time, it doesn't allow allocating memory before the network device is initialized. Replace the network device with the parent platform device for memory allocation to remove that dependency. This also improves consistency with the other devm_* calls in the driver that all use the platform device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-17sh_eth: fold netif_msg_*() and netdev_*() calls into netif_*() invocationsSergei Shtylyov1-22/+11
Now that we call netdev_*() under netif_msg_*() checks, we can fold these into netif_*() macro invocations. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-17sh_eth: convert dev_*() to netdev_*() callsSergei Shtylyov1-23/+24
Convert dev_*(&ndev->dev, ...) to netdev_*(ndev, ...) calls since they are a bit shorter and at the same time give more information on a device. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-17sh_eth: convert pr_*() to netdev_*() callsSergei Shtylyov1-4/+5
Convert pr_*() to netdev_*() calls as the latter provide info on a device. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-17sh_eth: exit probe with unknown register layoutSergei Shtylyov1-1/+6
Exit the driver's probe() method when the register layout is unknown as the driver would cause kernel oops in this case anyway. While at it, move the corresponding error message printout and convert it from pr_err() to dev_err(). Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-13sh_eth: update OF PHY registerationBen Dooks1-20/+39
If the sh_eth device is registered using OF, then the driver should call of_mdiobus_register() to register the PHYs described in the devicetree and then use of_phy_connect() to connect the PHYs to the device. This ensures that any PHYs registered in the device tree are appropriately connected to the parent devices nodes so that the PHY drivers can access their OF properties. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-18sh_eth: add device tree supportSergei Shtylyov1-3/+66
Add support of the device tree probing for the Renesas SH-Mobile SoCs documenting the device tree binding as necessary. This work is loosely based on the original patch by Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-13sh_eth: use ETH_ZLEN instead of home-grown #defineSergei Shtylyov2-4/+3
The driver #define's and uses ETHERSMALL macro for the minimum Ethernet frame size for which we have a standard macro ETH_ZLEN. Use the latter instead of the home-grown one. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17sh_eth: Add support for r7s72100Simon Horman2-8/+119
The r7s72100 SoC includes a fast ethernet controller. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17sh_eth: Use bool as return type of sh_eth_is_gether()Simon Horman1-5/+2
Return a boolean from sh_eth_is_gether() and refactor it as a one-liner. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16drivers/net: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. This covers everything under drivers/net except for wireless, which has been submitted separately. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-13sh_eth: fix garbled TX error messageSergei Shtylyov1-4/+4
sh_eth_error() in case of a TX error tries to print a message using 2 dev_err() calls with the first string not finished by '\n', so that the resulting message would inevitably come out garbled, with something like "3net eth0: " inserted in the middle. Avoid that by merging 2 calls into one. While at it, insert an empty line after the nearby declaration. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-03sh_eth: coding style fixesSergei Shtylyov2-88/+75
Running 'scripts/checkpatch.pl' on the driver files gives numerous warnings: - block comments using empty /* line; - unneeded \ at end of lines; - message string split across lines; - use of __attribute__((aligned(n))) instead of __aligned(n) macro; - use of __attribute__((packed)) instead of __packed macro. Additionally, running 'scripts/checkpatch.pl --strict' gives more complaints: - including the paragraph about writing to FSF into the heading comment; - alignment not matching open paren; - multiple assignments on one line; - use of CamelCase names; - missing {} on one of the *if* arms where another has them; - spinlock definition without a comment. While fixing these, also do some more style cleanups: - remove useless () around expressions; - add {} around multi-line *if* operator's arm; - remove space before comma; - add spaces after /* and before */; - properly align continuation lines of broken up expressions; - realign comments to the structure fields. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-31net: renesas: slight optimization of addr comparedingtianhong1-1/+1
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-19sh_eth: do not reset PHY needlesslySergei Shtylyov1-5/+0
There's no need anymore to call phy_init_hw() to reset/resume the PHY from the driver, as the call chain in phylib already has reached it, and so reset/resumed the PHY (even resuming it twice). This duplicate reset is not only needless, it e.g. clears the PHY's interrupt enables just setup by phylib and so prevents the expected IRQs from the PHY. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-19sh_eth: add PHY IRQ to platform dataSergei Shtylyov1-2/+4
Allow the platform code to pass PHY's IRQ to the driver. Print this IRQ along with the other PHY datails in sh_eth_phy_init(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-10sh_eth: add R8A7791 supportSergei Shtylyov2-4/+5
Add support for yet another ARM member of the R-Car family, R-Car M2, also known as R8A7791 -- it will share the code and data with previously added R8A7790. Despite the Ether devices in these SoCs are indistinguishable at least from the driver's point of view, we do introduce a new platform device ID "r8a7791-ether" unlike the wildcard ID used for R8A7778/9 SoCs, due to newly established policy for the Renesas SoCs. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-09net: sh_eth: do not issue a wild PHY reset through BMCRFlorian Fainelli1-1/+4
The sh_eth driver issues an uncontrolled PHY reset through the MII register BMCR but fails to wait for the reset to complete, and will also implicitely wipe out all possible PHY fixups applied. Use phy_init_hw() which remedies both problems. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-04sh_eth: check platform data pointerSergei Shtylyov1-0/+6
Check the platform data pointer before dereferencing it and error out of the probe() method if it's NULL. This has additional effect of preventing kernel oops with outdated platform data containing zero PHY address instead (such as on SolutionEngine7710). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-23sh_eth: add/use RMCR.RNC bitSergei Shtylyov2-3/+6
Declare 'enum RMCR_BIT' containing the single member for the RMCR.RNC bit and replace bare numbers in the driver by this mnemonic. Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-4/+4
Conflicts: drivers/net/usb/qmi_wwan.c include/net/dst.h Trivial merge conflicts, both were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-11net: sh_eth: Correct fix for RX packet errors on R8A7740Simon Horman1-4/+4
Nguyen Hong Ky posted a patch to correct RX packet errors on R8A7740 which was applied as 2c6221e4a5aab417 ("net: sh_eth: Fix RX packets errors on R8A7740"). Unfortunately sh_eth.c contains many similar instances of struct sh_eth_cpu_data and the patch was miss-applied, updating sh7734_data instead of r8a7740_data. This patch corrects this problem by. 1. Reverting the change to sh7734_data and; 2. Applying the change to r8a7740_data. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+4
Conflicts: include/linux/netdevice.h net/core/sock.c Trivial merge issues. Removal of "extern" for functions declaration in netdevice.h at the same time "const" was added to an argument. Two parallel line additions in net/core/sock.c Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-08net: sh_eth: Fix RX packets errors on R8A7740Nguyen Hong Ky1-0/+4
This patch will fix RX packets errors when receiving big size of data by set bit RNC = 1. RNC - Receive Enable Control 0: Upon completion of reception of one frame, the E-DMAC writes the receive status to the descriptor and clears the RR bit in EDRRR to 0. 1: Upon completion of reception of one frame, the E-DMAC writes (writes back) the receive status to the descriptor. In addition, the E-DMAC reads the next descriptor and prepares for reception of the next frame. In addition, for get more stable when receiving packets, I set maximum size for the transmit/receive FIFO and inserts padding in receive data. Signed-off-by: Nguyen Hong Ky <nh-ky@jinso.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-02net:drivers/net: Miscellaneous conversions to ETH_ALENJoe Perches1-1/+1
Convert the memset/memcpy uses of 6 to ETH_ALEN where appropriate. Also convert some struct definitions and u8 array declarations of [6] to ETH_ALEN. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-6/+8
Conflicts: drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c net/bridge/br_multicast.c net/ipv6/sit.c The conflicts were minor: 1) sit.c changes overlap with change to ip_tunnel_xmit() signature. 2) br_multicast.c had an overlap between computing max_delay using msecs_to_jiffies and turning MLDV2_MRC() into an inline function with a name using lowercase instead of uppercase letters. 3) stmmac had two overlapping changes, one which conditionally allocated and hooked up a dma_cfg based upon the presence of the pbl OF property, and another one handling store-and-forward DMA made. The latter of which should not go into the new of_find_property() basic block. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-04sh_eth: fix napi_{en|dis}able() calls racing against interruptsSergei Shtylyov1-5/+7
While implementing NAPI for the driver, I overlooked the race conditions where interrupt handler might have called napi_schedule_prep() before napi_enable() was called or after napi_disable() was called. If RX interrupt happens, this would cause the endless interrupts and messages like: sh-eth eth0: ignoring interrupt, status 0x00040000, mask 0x01ff009f. The interrupt wouldn't even be masked by the kernel eventually since the handler would return IRQ_HANDLED all the time. As a fix, move napi_enable() call before request_irq() call and napi_disable() call after free_irq() call. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-04sh_eth: NAPI requires netif_receive_skb()Sergei Shtylyov1-1/+1
Driver supporting NAPI should use NAPI-specific function for receiving packets, so netif_rx() should be changed to netif_receive_skb(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-03sh_eth: Enable Rx descriptor word 0 shift for r8a7790Kouei Abe1-0/+1
This corrects an oversight when r8a7790 support was added to sh_eth. Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-03sh_eth: Fix cache invalidation omission of receive bufferKouei Abe1-0/+3
Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-30net: sh_eth: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29sh_eth: no need to call ether_setup()Sergei Shtylyov1-3/+0
There's no need to call ether_setup() in the driver since prior alloc_etherdev() call already arranges for it. Suggested-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20sh_eth: remove 'register_type' field from 'struct sh_eth_plat_data'Sergei Shtylyov1-0/+7
Now that the 'register_type' field of the 'sh_eth' driver's platform data is not used by the driver anymore, it's time to remove it and its initializers from the SH platform code. Also move *enum* declaring values for this field from <linux/sh_eth.h> to the local driver's header file as they're only needed by the driver itself now... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20sh_eth: get register layout from 'struct sh_eth_cpu_data'Sergei Shtylyov2-1/+22
The register layout is a SoC characteristic, so it's wrong that it's stored in the otherwise board specific platform data. Add 'register_type' field to 'struct sh_eth_cpu_data', initialize it properly for each SoC, and read it from this structure instead of the platfrom data from now on... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-31sh_eth: r8a7790: Handle the RFE (Receive FIFO overflow Error) interruptLaurent Pinchart1-2/+3
The RFE interrupt is enabled for the r8a7790 but isn't handled, resulting in the interrupts core noticing unhandled interrupts, and eventually disabling the ethernet IRQ. Fix it by adding RFE to the bitmask of error interrupts to be handled for r8a7790. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-24sh_eth: Add support for r8a7790 SoCSimon Horman2-1/+22
This is a copy of support for r8a7778/9 with the .rmiimode mode bit of struct sh_eth_cpu_data set. Also update R8A7779 to R8A777x. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>