9
0
Fork 0
Commit Graph

468 Commits

Author SHA1 Message Date
Sascha Hauer 064fdcec9f Merge branch 'for-next/imx-oftree'
Conflicts:
	arch/arm/boards/freescale-mx51-pdk/board.c
2013-06-02 12:36:38 +02:00
Oleksij Rempel 7d27f0db93 net: add ar231x-eth support
This driver should work with some Atheros WiSoCs:
- ar2312, ar2313
- ar2315, ar2316 ...

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:56:33 +02:00
Sascha Hauer 73b0d228e5 driver: Attach info callback to device, not to driver
Since the info is device specific and not driver specific, attach
the callback to the device. This makes it possible to have a info
callback for a device which does not have a driver attached.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:27 +02:00
Sascha Hauer 3ece590c38 net: fec_imx: default phy address to -1 for dt probe
To enable automatic probing of the phy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-27 18:24:27 +02:00
Sascha Hauer 0585980bca net: fec: Add imx25 compatible property
The i.MX53 fec claims to be compatible to i.MX25 and i.MX53. In barebox
we do not have to make differences between i.MX25 and i.MX27 though, so
just fall back to i.MX27.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 09:36:35 +02:00
Sascha Hauer 7c6c61fe8e treewide: Use dev_add_param_int_ro where possible
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer 7d29b3cd83 net: ksz8864: Use dev_add_param_bool for enable parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:34 +02:00
Sascha Hauer 9b1d226a79 net: fec: probe phy_mode from devicetree
This allows to parse the phy mode from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-04 23:23:41 +02:00
Sascha Hauer 0a637bcc3c Merge branch 'for-next/zynq'
Conflicts:
	arch/arm/Makefile
2013-04-04 23:23:19 +02:00
Sascha Hauer 2143dfda8b Merge branch 'for-next/pr_print' 2013-04-04 14:20:33 +02:00
Sascha Hauer 602a8a6e96 Merge branch 'for-next/fec' 2013-04-04 12:03:20 +02:00
Sascha Hauer 0e291a853a Merge branch 'for-next/device-driver-macros' 2013-04-04 12:03:20 +02:00
Steffen Trumtrar 33552e74b4 net: macb: turn off endian_swp_pkt_en
The core has a bit for swapping packet data endianism.
Reset default from Cadence is off. Xilinx however, that uses this core on the
Zynq SoCs, opted for on. Turn it off for all devices.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 17:21:51 +02:00
Josh Cartwright 28acd8331d macb: rename platform data
The macb/gem core is used by the Zynq SoC.  In preparation of sharing
the macb driver between at91 and Zynq, rename the platform data to
'struct macb_platform_data', and move the definition to a common
location.

Signed-off-by: Josh Cartwright <joshc@eso.teric.us>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 17:21:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD 58926bd26f macb: fix gem_recv circular buffer handling
as we use a full buffer no need to check the SOF
and reset the rx_tail

fix at the same time the gem detection so we can have the rx_buffer
allocated correctly according to the IP

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-15 16:49:36 +01:00
Alexander Shiyan e4588cf311 Introduce device_spi_driver() macro and use it for SPI drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:45 +01:00
Alexander Shiyan 2f65379c98 SPI: Rename spi_register_driver() for using with register_driver_macro()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Alexander Shiyan aeaeb40ccf Add more drivers to using device_platform_driver()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Sascha Hauer e9e5919dd3 net: fec: use standard phy type defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 20:09:23 +01:00
Sascha Hauer 31865e8a7f net: fec: drop sevenwire support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 20:09:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1e0787adfa net/phy: convert to pr_info
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 11:18:08 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Sascha Hauer 908bc8ce45 Merge branch 'for-next/imx' 2013-03-04 09:21:37 +01:00
Sascha Hauer 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD dc62dd48d8 smc911111: fix send and recv return value
on error send error code and 0 on success

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD 62acc70dc1 phy: fix force mode
do not try to read the status in force mode
the link is up

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:54:40 +01:00
Hubert Feurstein c1722ac266 net: fec_imx: ensure constant timeout in fec_halt
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-22 09:22:51 +01:00
Hubert Feurstein 0f27e5d8de net: fec_imx: use dev_err and dev_warn instead of printf
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-22 09:22:51 +01:00
Hubert Feurstein 1208df19ca net: imx_fec: fix RMII support for i.MX6
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:27:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 59cfe5905b highbank: add xgmac support
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:28:00 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Alexander Aring e0946e79c9 net: fix cpsw depends on ARCH_OMAP
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Hubert Feurstein 91afe6c222 net fec_imx: add support for i.MX6 1000Mbps mode
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:56:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD 650e2daa9f phy/micrel: KSZ9021 diasable Asym Pause support
Due to a hw bug do not enable teh Asym_Pause.
Otherwise if you ser the bit 11 in 4h you will have to unplug
and replug the cable to make the phy work.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9c305a0dbe macb: add cadence Gigabit GEM support
based on the kernel code
detect it via IP version

In the GEM we can use a full packet buffer for receive but the buffer size
need to be 64bit size aligned.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa2095304a macb: fix tx ring size
the mininal tx ring size is 2 as if one we wrap on the same descriptor
and can cause IP lock on GEM (gigabit version) this is always the case

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 36bcee4892 net macb: reset the IP at init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD 044cb6a298 net macb: enable Tramsmit and Receive at open
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD 882ae3da84 net macb: use the macro as in linux for tx/rx buffer ring size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD d702d97a8a net macb: sync remaining define with linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2e2466f5ae net macb: call macb_init at probe explicitly
as eth_device init is planning for remove and we need the init before register
the mdio bus

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0fcceb6c55 macb: drop non used define
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD a097eabc81 macb: report timeout on send
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD 554ab80b87 macb: use dev_xx message
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:34:58 +01:00
Sascha Hauer cfb14ce242 Merge branch 'for-next/omap' 2013-02-04 15:49:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD f7e3126619 macb: allow to pass the phy interface
as we will add later the GMAC IP verion support (GEM)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 11:44:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD f0aa3cdf8d macb: sync register access and clock with the kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 09:59:17 +01:00
Jan Luebbe 5824325936 drivers: net: add driver for TI CPSW
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-10 20:41:50 +01:00
Sascha Hauer 0ccb9aebcd Merge branch 'pu/net-link' 2012-12-13 16:26:19 +01:00
Sascha Hauer a1a50a4654 net phylib: force to wait for link
When starting a network device wait until the link is up. Otherwise
autobooting does not work with little timeout and several attempts
have to be made until the network is finally up.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 20:02:44 +01:00
Sascha Hauer 1a9e93cc81 drivers/base: fix corrupt device tree
dev_add_child is a very unsafe function. If called multiple times
it allows setting the same device to different parents thus corrupting
the siblings list. This happens regularly since:

| commit c2e568d19c
| Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| Date:   Sat Nov 3 16:11:05 2012 +0100
|
|    bus: add bus device
|
|    automatically add it as parent of any bus device if none already specified
|
|    we have now a nice output per bus

If for example a FATfs is mounted this nice output per bus often ends with:

>     `---- fat0
>     `---- 0
>          `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL>
>          `---- sram00
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               unable to handle NULL pointer dereference at address 0x0000000c
> pc : [<87f08a20>]    lr : [<87f08a04>]
> sp : 86eff8c0  ip : 87f3fbde  fp : ffffffff
> r10: ffffffff  r9 : 00000000  r8 : 00000003
> r7 : 86f075b8  r6 : 00000002  r5 : ffffffec  r4 : 86f07544
> r3 : 00000000  r2 : 43f900b4  r1 : 00000020  r0 : 00000005
> Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32
> [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130)
>
> [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c)
> [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14)
> [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38)
> [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60)

This patch fixes this by adding a device to its parents children list in
register_device so that dev_add_child is no longer needed. This function
is removed from the tree. Now callers of register_device have to clearly
set the parent *before* registering a device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Jan Lübbe <jlu@pengutronix.de>
2012-12-12 15:04:27 +01:00
Sascha Hauer ac48b10467 net phylib: Clear BMCR_PDOWN bit
Some phys come up with this bit set, clear it so that these phys
can work. This has been observed with a ASIX compatible USB ethernet
adapter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:52:55 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 8f32824c6e Merge branch 'for-next/phylib'
Conflicts:
	drivers/net/phy/phy.c
2012-12-07 16:43:21 +01:00
Jan Luebbe bba73109ce net: phy: micrel: fix typo in driver name
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:53:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD 90806eea09 mdio_bus: fix match
on barebox we have the weird way the return 0 true on bus match

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 13:22:01 +01:00
Antony Pavlov 300a23cba5 phylib: fix compiler warning
fixes:
 drivers/net/phy/phy.c:57: warning: no previous prototype for ‘phy_device_create’

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-26 09:06:57 +01:00
Jean-Christophe PLAGNIOL-VILLARD 34bcbaa2ba phylib: add micrel support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4a1e4d4b1d phylib: add fixup support
if board need specific phy fixup they can register it and then the code will
executed only if needed

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 30298c0f3c mdio_bus: fix match
on barebox we have the weird way the return 0 true on bus match

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9ea956db77 phylib: fix generic phy driver probe
the generic phy driver is used if no driver are found

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD c811546712 macb/ether: split flags for drivers and phylib
as in the kernel use is_rmii
flags for pinctrl
phy_flags for phylib flags

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD d1662f9db3 phylib: introduction of forced 100Mbps
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD e7d143f036 phylib: export phy_id via param
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Sascha Hauer 1bfbbcca51 Merge branch 'for-next/phylib' 2012-11-16 14:02:49 +01:00
Sascha Hauer 6584c1f801 Merge branch 'for-next/net' 2012-11-16 14:02:37 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Sascha Hauer e84241c994 Revert "net fec: connect phy at probe time"
While this makes sure that the phy fixups are applied even if
networking is not used on i.MX6, this patch due to latest phy
changes causes the startup of barebox delayed until we have a
link on the i.MX fec. Revert it for now and look for a better
solution later.

This reverts commit 3a17af33c0.
2012-11-16 09:38:36 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa498eefce phy: add smsc phy driver support
as we to have specific phy init to fix chip issue link detection support

based on linux 3.6

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4f655dd24a phy: add phy_drivers_register
to allow to register an array of drivers

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:18 +01:00
Andreas Pretzsch ea26693b8f net smc911x: add support for external PHY
On LAN9115/LAN9117/LAN9215/LAN9217, external PHYs are supported.
Switch to external PHY based on hardware strap pin and/or override flags.
Also add a mask to platform data selecting external PHY address to be used.

Code based on linux/drivers/net/ethernet/smsc/smsc911x.c (fd9abb3d, d23f028a).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 08:29:48 +01:00
Andreas Pretzsch 78d3b8571c mdiobus: unbreak phy_device_connect(): honor masked out PHYs
commit 89dfe2d2af "mdiobus: do not scan
the bus at registration time" dropped the check for struct mii_bus
element phy_mask while scanning through all addresses.
Re-add this check.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 08:28:18 +01:00
Sascha Hauer 89dfe2d2af mdiobus: do not scan the bus at registration time
Scanning the bus can take some time. If we do not need the ethernet
device, this is unnecessary, so delay the scan until the phy device
iactually is needed.

Andread Pretzsch: Fixup bug in scanning for all devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
2012-11-07 09:00:19 +01:00
Sascha Hauer c83623d010 net usb asix: Add missing line breaks in dev_* messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 08:43:05 +01:00
Sascha Hauer 51e9c42c74 net fec: call fec_init at probe time
fec_init() initializes some bits important for phy access, so do
this before the mdiobus is registered. This fixes mdiobus support
on i.MX28 boards in RMII mode.

Reported-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-31 21:51:36 +01:00
Sascha Hauer 745c16db7e mdiobus: return existing phydev in mdiobus_scan
Test if we already found a phy device on an address earlier and return
it if it exists. This makes it possible to call mdiobus_scan multiple
times.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:26:22 +01:00
Sascha Hauer 3a17af33c0 net fec: connect phy at probe time
Several i.MX boards (all i.MX6 boards) need to do some adjustments
to phy registers. If barebox itself does not use network, networking
won't work in the kernel if the kernel does not have the fixups. Connect
the phy at probe time so that these tweaks are done during probe so that
the kernel works without phy register tweaks. Also this has the effect
that the phy device is present and introspectable without doing fake
network transfers beforehand.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:17:35 +01:00
Sascha Hauer c0aabaff3b net gianfar: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:57 +02:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer aaad5cbad7 Merge branch 'for-next/clk' into for-next/imx
Conflicts:
	drivers/net/fec_imx.c
2012-10-17 20:21:46 +02:00
Sascha Hauer f393758c53 Merge branch 'for-next/imx-dt' into for-next/imx 2012-10-17 08:48:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5d1d1c65a6 designware: set parent for eth_device and miibus
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 09:11:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 052a701207 net:designware: allow to pass the phy interface
If none set use NA (0) as before.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 08:54:41 +02:00
Jean-Christophe PLAGNIOL-VILLARD 840d4858d0 designware: fix 100mps phy support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 08:54:14 +02:00
Sascha Hauer a4c8692240 ARM i.MX: Enable clocks in common place
On i.MX we enable all necessary clocks during startup of the clock
controller driver, so we do not need the register hacking in the drivers
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Antony Pavlov 026e6aeb82 davinci_emac: fix comment for the _send function
The _send function should not return the length
of the transmitted packet.

See also

commit 76c4c9e48f
Author: Jan Luebbe <jlu@pengutronix.de>
Date:   Fri Sep 28 18:17:44 2012 +0200

    davinci_emac: return 0 on successful transmit

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 18:51:56 +02:00
Sascha Hauer 258e096e13 net fec_imx: determine fec version based on device ids
This adds the device id mechanism to the i.MX fec driver and
uses it to determine the fec version. Also adds devicetree
probing support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:32:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7407118bbf net/designware: fix phylib support
/opt/work/barebox/drivers/net/designware.c: In function 'dwc_update_linkspeed':
/opt/work/barebox/drivers/net/designware.c:234:9: error: 'mac_p' undeclared (first use in this function)
/opt/work/barebox/drivers/net/designware.c:234:9: note: each undeclared identifier is reported only once for each function it appears in
/opt/work/barebox/drivers/net/designware.c: In function 'dwc_ether_open':
/opt/work/barebox/drivers/net/designware.c:254:6: error: too few arguments to function 'phy_device_connect'
/opt/work/barebox/include/linux/phy.h:252:5: note: declared here
/opt/work/barebox/drivers/net/designware.c: At top level:
/opt/work/barebox/drivers/net/designware.c:226:13: warning: 'dwc_update_linkspeed' defined but not used

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:20:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD 65f0148e22 net/designware: update version display to print user ID and Synosys ID
So we can check it with the kernel one

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:20:43 +02:00
Sascha Hauer df80e39547 net mdio_bus: Add missing bus_register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:08:06 +02:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer 70253cbbbb net fec: Switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 8338984862 Merge branch 'for-next/net' 2012-10-03 21:09:55 +02:00
Sascha Hauer d4541ee94f Merge branch 'for-next/driver' 2012-10-03 21:09:34 +02:00
Jan Luebbe 81b5356215 davinci_emac: get rid of mdio wrapper functions
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:58:18 +02:00
Jan Luebbe 419ae85d44 davinci_emac: adjust to new phylib framework
Also pass flags using platform_data and remove useless casts from void*.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:58:12 +02:00
Jan Luebbe 76c4c9e48f davinci_emac: return 0 on successful transmit
The _send function should not return the length of the transmitted packet.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:57:59 +02:00
Sascha Hauer 0dc9de2efd net/eth: fix link handling
Check link status on eth device open time and then periodically
every 5 seconds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +02:00
Sascha Hauer 26eab97b41 net fec_mpc5200: Use same platform_data as i.MX fec driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 20:35:20 +02:00
Jean-Christophe PLAGNIOL-VILLARD 660809446f net/tap: use xzalloc to allocate data
this will ensure the data are set to 0 (list as example)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Jan Luebbe 13e657f712 drivers/net: add driver for the EMAC device found in some TI SoCs
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:54:50 +02:00
Jan Luebbe d836d76d97 drivers/net/ksz8864rmn: add driver for Micrel KSZ8864RMN Ethernet Switch
It starts the switch and provides basic access to the registers.

This driver could also work with some other Micrel switches, possibly
with some small changes.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Eric Bénard 79101c609c miidev: fix 1G wrong detection
since 99e72c8bbd on an i.MX51 based board,
I get : "phy0: Link is up - 1000/Full". It seems miidev tries to probe
the PHY to early and gets 0x3ffff which leads to the wrong capabilities
setting.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 09:03:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8b3bf5971a tap: fix missing parent setting on eth_device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:26:26 +02:00
Jan Weitzel a685c02ebf smsc911x: Check platformdata pointer
If pdata is NULL smc911x_probe will crash. Checking the zero initialized
priv->shift results in default configuration if pdata is not set.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-10 18:06:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0c4ea17225 smc911x: fix typo pn check if the device is ready before using it
the check need to be inverted

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-10 08:26:24 +02:00
Sascha Hauer 40830caf4e Merge branch 'for-next/smc911x' 2012-09-05 12:59:59 +02:00
Sascha Hauer 6662e16dbb Merge branch 'for-next/ppc'
Conflicts:
	arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
	arch/ppc/configs/p2020rdb_defconfig
	arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h
2012-09-05 12:59:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD bfcd63fdc4 smc911x: check if the device is ready before using it
poll the READY bit in PMT_CTRL. Any other access to the device is
forbidden while this bit isn't set. Try for 100ms

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD da9ef64678 smc911x: update chip detection
Use linux kernel chip detection from 3.5

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD fb11747bfe smc911x: improve detection handle
detect if the bus is swapped and report a 32bit drivers is used on a 16bit bus

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 655dc6b8aa smc911x: add support to pass the shift via platform data
switch ipe337: to it at the same time to do not brake it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 75880ac0ad smc911x: add 16bit bus width support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 187c55fdde smc911x: introduce read/write ops
This will allow to replace them depending on the platform data.
So we can specify shift and reg io witdh (16bit/32bit)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD c3ec0b08bf smc911x: move register define to smc911x.h
this make the driver more readable

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Wolfram Sang b732f178b7 net: miidev: really wait for auto negotiation
miidev_wait_aneg() polled the wrong bit, so link detection did fail on
boards where the PHY had to come out of a powerdown mode.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:43:59 +02:00
Renaud Barbier caf788ae5a net: GIANFAR driver
This update adds the GIANFAR driver along with the configuration
and build files.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Sascha Hauer 149d4764a3 Merge branch 'for-next/ethernet' 2012-07-02 11:00:33 +02:00
Sascha Hauer 05772f77e8 Merge branch 'for-next/net-designware' 2012-07-02 11:00:05 +02:00
Sascha Hauer f22d4e2778 Merge branch 'for-next/sparse' 2012-07-02 10:59:37 +02:00
Sascha Hauer f9b94c867b net smc911x: Use __iomem for register base
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Johannes Stezenbach 8f2fcf6554 miidev: consistent md and mw on phy regs
The dump generated by "md -w -s /dev/phy0"
suggests individual registers need to be
addressed by byte offset, not by register number.
E.g. to set the autonegotiation advertisement register
for 10Mbit only, use "mw -w -d /dev/phy0 8+2 0x0061".
The current mix of offset == register number, but
count == byte count is unintuitive.

Also, to be consistent with "md" on /dev/mem, round up
the count so "8+1" also works to access one register.
However, no attempt is made to do read-modify-write
single byte writes.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 99e72c8bbd miidev: add support for 1000Mbit
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 1b725b9c44 miidev: actually probe the PHY
Check if the PHY is really accessible (e.g. the
PHY address is correct) during probe.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 467d9d9cee miidev: fix auto negotiation
The auto negotiation result is the intersect
of the advertised abilities and the link partner abilities.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:14 +02:00
Johannes Stezenbach 54edd7cfa9 drivers/net: add designware driver
Straight forward port of Synopsys Designware ethernet
driver from u-boot v2012.04.01.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-26 17:41:12 +02:00
Juergen Beisert 79dc70c9ea netX/network: fix debug outputs
If DEBUG is defined it fails due to wrong variable names

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Sascha Hauer ba361ee78f Merge branch 'pu/mx6-v2' into next
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-imx/Kconfig

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:38:23 +02:00
Sascha Hauer 7753263c50 net mii: Add mii_open/mii_close functions
Some phys need board specific fixups. To be able to do this
from board code add mii_open/mii_close functions so that the
board can use the regular mii_read/mii_write functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 86cfd96af4 net fec: Add i.MX6 support
Currently only 100Mb/s is tested. Freescale's U-Boot suggests that
there are some additional adjustments necessary for Gigabit support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2452210ac9 net: at91_ether re-implement against new at91rm9200 api
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 10:26:14 +02:00
Wolfram Sang 6cbecc4163 net: miidev: properly check for MII reset
Wait until the reset bit is actually cleared instead of some
arbitrary delay (which caused problems with a PHY which was in some
energy saving mode).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-23 08:23:11 +01:00
Wolfram Sang b7c9126750 net: miidev: Refactor timeout for aneg
First check the status at least once, then do timeout checks. Minor
cleanups also.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-23 08:23:11 +01:00
Wolfram Sang 76ed3bd9ef net: miidev: check for errors when accessing bus in restart_aneg
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-23 08:23:11 +01:00
Jan Weitzel 4088ab5588 NET: Add support for ks8851_mll
Add support for KS8851 16bit MLL chip from Micrel Inc.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-13 13:35:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 89c670c945 macb: fix mmu support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-06 09:46:01 +01:00
Jean-Christophe PLAGNIOL-VILLARD f4b9f8a9af macb: add timeout on send
This will ensure that we send an other packet only when the first one is send.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-06 09:45:57 +01:00
Sascha Hauer 78da28d088 net fec_mpc5200: drop type_data usage
Also, clean some whitespace damage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer 89fe5482e7 net fec_imx: drop type_data usage
Store the private data pointer in dev->priv as it's intended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer e609cbe1e5 net drivers: remove unused type_data
Many net drivers set dev->type_data without ever using it, so
just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:26 +01:00
Sascha Hauer 67d938b2ea net: use container_of instead of dev->type_data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:22 +01:00
Sascha Hauer 4af196ebfc usb net: fix unregistration
First call mii_unregister which is done in the drivers unbind function,
then eth_unregister. Also, remove unregister_device which is done in
eth_unregister.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-14 23:57:00 +01:00
Sascha Hauer daa068fcfb usb net smsc95xx: add missing mii_unregister
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-14 23:56:46 +01:00