9
0
Fork 0
Commit Graph

82 Commits

Author SHA1 Message Date
Sascha Hauer 73339649ae Merge branch 'for-next/net-of-phy' 2014-06-04 21:03:49 +02:00
Sascha Hauer a3dfea9af8 Merge branch 'for-next/net'
Conflicts:
	drivers/net/dm9k.c
2014-06-04 21:03:45 +02:00
Sascha Hauer 0955253ce1 net: fec_imx: Add devicetree support for mdio bus
The fec has a mdio bus. This adds support for a subnode
in which the phys on this bus can be specified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer d4d9fc125f net: fec_imx: check return value of registration functions
We do not care about releasing the resources in the error
path, but at least check the return value of eth_register
and mdiobus_register.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:56 +02:00
Sascha Hauer d4f202f30e net: fec_imx: mask mii register reads correctly
mii registers are 16bit wide, so mask out the higher bits.
The higher bits confuse mii-tool.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:52 +02:00
Sascha Hauer 22b878d251 net: Pass eth_device to net_receive
So that barebox has the information which interface a packet
came from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 08:15:21 +02:00
Rostislav Lisovy 5c1846b625 ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree
Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 09:01:33 +01:00
Sascha Hauer 68fa6a7ada net: fec: Use clk API unconditionally
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:56 +02:00
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
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 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 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
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
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
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
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
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
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 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 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 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
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
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
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 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
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 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
Wolfram Sang 79b385b017 net: fec_imx: configure FEC for 10Mbit when necessary
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang ad0bd00a55 net: fec_imx: enable payload length check and pause frames
Q: "the linux driver add these bits, why not we?"
A: Because nobody activated the bits?

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang 6b145cd3b3 net: fec_imx: refactor R_CNTRL setup
Introduce a variable which gets updated when needed and only written
once. Will make further additions easier.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang eeabfc4ab5 net: fec_imx: small cleanups
remove double include, remove unused (and double in case of RCNTRL)
defines, sort the includes at least somewhat.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer 8fddb2edf6 net mii: add a parent pointer to miidevs and set it to the hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:48:03 +02:00
Sascha Hauer 6d16fbdcd4 net: make the ethernet device a child of the hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:48:03 +02:00
Sascha Hauer a6aefdeaee Merge branches 'pu-ethaddr', 'pu-fec', 'pu-imx-iim', 'pu-resources' and 'pu-resources1' into next 2011-07-29 12:09:58 +02:00
Sascha Hauer 2fd4fa2e99 ARM i.MX: rework IIM MAC address setting
Switch to the generic way of setting a MAC address for a
device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:05:26 +02:00
Sascha Hauer 2b2994a4f9 net i.MX fec: rename driver struct to be generic
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 12:07:39 +02:00
Sascha Hauer 98d9ce9bec net i.MX fec: embed ethernet device into priv
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 12:07:39 +02:00
Sascha Hauer 0b9bb06a36 net i.MX fec: remove unnecessary alignment
dma_alloc_coherent returns sufficiently aligned memory. While
at it, remove some unnecessary casts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 12:07:39 +02:00
Sascha Hauer 7079d33597 net i.MX fec: make multi instance safe
The driver uses a static int once variable to alloc the
rx packets. remove this to make the driver multi instance
safe. While at it, remove the crappy selfmade alignment.
dma_alloc_coherent returns sufficiently aligned memory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 12:07:39 +02:00