Commit Graph

195 Commits

Author SHA1 Message Date
Yoshihiro Shimoda
d4c02e6f5d rtl8169: fix cache coherency problem
Fix the problem that cannot access actual data when CPU data cache enabled.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Tested-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-04-28 00:18:10 +02:00
Sascha Hauer
f5cf2ef2ad mpc52xx phy: initialize only when needed
Do not initialize phy on startup, instead initialize it
when we actually need it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-04 22:37:39 +02:00
Ladislav Michl
fd88d91a63 cs8900 compile fix
cs8900.c: In function 'eth_init':
cs8900.c:164: warning: passing argument 2 of 'eth_getenv_enetaddr' from incompatible pointer type
cs8900.c:165: error: invalid operands to binary <<
cs8900.c:166: error: invalid operands to binary <<
cs8900.c:167: error: invalid operands to binary <<

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-03-29 00:12:00 +01:00
Nicolas Ferre
df486b1fa3 at91: Support for the at91sam9g20 : Atmel 400Mhz ARM 926ej-s SOC.
AT91sam9g20 is an evolution of the at91sam9260 with a faster clock speed.

The AT91SAM9G20-EK board is an updated revision of the AT91SAM9260-EK board.
It is essentially the same, with a few minor differences.

Here is the chip page on Atmel website:
http://www.atmel.com/dyn/products/product_card.asp?part_id=4337

Signed-off-by: Justin Waters <justin.waters@timesys.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-03-22 14:48:16 +01:00
Mike Frysinger
03f3d8d3b3 lan91c96/smc91111/smc911x: get mac address from environment
The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Also, do not bother checking the EEPROM if the env is setup.  This
simplifies the code greatly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Wolfgang Dnek <wd@denx.de>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Rolf Offermanns <rof@sysgo.de>
CC: Erik Stahlman <erik@vt.edu>
CC: Daris A Nevil <dnevil@snmc.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-20 22:39:11 +01:00
Mike Frysinger
c527ce9251 sh_eth: get mac address from environment
The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The sh_eth driver can also be simplified a bit by using enetaddr member of
the eth_device structure.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Carlos Munoz <carlos@kenati.com>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:11 +01:00
Mike Frysinger
0a5238cea9 cs8900: get mac address from environment
The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The cs8900 driver also changes slightly in that the hardware is not
consulted if the mac address in the env is sane.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Marius Groeger <mgroeger@sysgo.de>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:11 +01:00
Mike Frysinger
c4b8762f11 bcm570x: get mac address from environment
The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Since the address is in the PLM_DEVICE_BLOCK structure already, there is
no need to pass the NodeAddress as a second parameter.  So drop the second
argument to the LM_SetMacAddress() function (and update the tigon3 driver
accordingly).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger
d3f871482f drivers/net/: get mac address from environment
The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The drivers that get converted here:
	3c589
	4xx_enet
	dc2114x
	dm9000x
	enc28j60
	fsl_mcdmafec
	ks8695eth
	mcffec
	rtl8019
	rtl8169
	s3c4510b_eth
	xilinx_emac
	xilinx_emaclite

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Rolf Offermanns <rof@sysgo.de>
CC: Stefan Roese <sr@denx.de>
CC: Sascha Hauer <saschahauer@web.de>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
CC: Greg Ungerer <greg.ungerer@opengear.com>
CC: Xue Ligong <lgxue@hotmail.com>
CC: Masami Komiya <mkomiya@sonare.it>
CC: Curt Brune <curt@cucy.com>
CC: Michal SIMEK <monstr@monstr.eu>
2009-03-20 22:39:10 +01:00
Mike Frysinger
500b6c51e4 Blackfin: bfin_mac: force boards to setup the MAC themselves
Since the on-chip MAC does not have an eeprom or similar interface, force
all Blackfin boards that use this driver to setup the board data with a
proper MAC.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +01:00
Nobuhiro Iwamatsu
40281a9ca2 net: sh_eth: Remove sh_eth_reset() from halt function
sh_eth_reset is function to reset Ether IP.
The MAC address is stored in IP, but it is initialized by this function.
OS (e.g. Linux Kernel) can not use this device when initialized.
This revises this problem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
2009-03-20 22:16:36 +01:00
Jon Smirl
f949bd8d08 MPC5200 FEC MII speed register
Set a non-zero speed in the MII register so that MII commands will work.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
2009-03-13 09:58:37 -06:00
Paul Gortmaker
0452352df1 tsec: report when there is no vendor specific PHY support
Commit af1c2b84 added a generic phy support, with an ID of zero
and a 32 bit mask; meaning that it will match on any PHY ID.

The problem is that there is a test that checked if a matching
PHY was found, and if not, it printed the non-matching ID.
But since there will always be a match (on the generic PHY,
worst case), this test will never trip.

In the case of a misconfigured PHY address, or of a PHY that
isn't explicitly supported outside of the generic support,
you will never see the ID of 0xffffffff, or the ID of the
real (but unsupported) chip.  It will silently fall through
onto the generic support.

This change makes that test useful again, and ensures that
the selection of generic PHY support doesn't happen without
some sort of notice.  It also makes it explicitly clear that
the generic PHY must be last in the PHY table.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2009-03-09 18:08:04 -05:00
Mike Frysinger
75ba6d693b smc911x: split out useful defines/functions into local header
The smc911x driver has a lot of useful defines/functions which can be used
by pieces of code (such as example eeprom programmers).  Rather than
forcing each place to duplicate these defines/functions, split them out
of the smdc911x driver into a local header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Guennadi Liakhovetski <lg@denx.de>
CC: Magnus Lilja <lilja.magnus@gmail.com>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-02-25 09:00:32 +01:00
Pieter Henning
736323a490 Added Vitesse VSC8211 definitions to TSEC driver
Added the struct containing PHY settings for the Vitesse VSC8211 phy to
the phy_info list in tsec.c

Signed-off-by: Pieter Henning <phenning@vastech.co.za>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-22 23:49:33 -08:00
Wolfgang Denk
09fee8e867 Coding Style cleanup; update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-02-22 01:19:52 +01:00
Wolfgang Denk
9eb468da3f Merge branch 'master' of git://git.denx.de/u-boot-arm 2009-02-19 00:46:32 +01:00
Ben Warren
86321fc112 net: removed board-specific CONFIGs from MPC5xxx FEC driver
Added new CONFIG options for the three type of MAC-PHY interconnect and
applied them all relevant board config files

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-09 23:01:40 -08:00
Andy Fleming
9e5be8214b tsec: Fix a bug in soft-resetting
SOFT_RESET must be asserted for at least 3 TX clocks.  Usually, that's about 30
clock cycles, so it's been mostly working.  But we had no guarantee, and at
slower bitrates, it's just over a microsecond (over 1000 clock cycles).  This
enforces a 2 microsecond gap between assertion and deassertion.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-09 22:52:32 -08:00
Simon Munton
09fcc8b5d8 Fix 100Mbs ethernet operation on sh7763 based boards
100Mbs ethernet does not work on sh7763 chips due to the wrong value being
used in the GECMR register. Following diff fixes the problem

Signed-off-by: Simon Munton	<simon@nidoran.m5data.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-09 22:52:11 -08:00
Ilya Yanok
62cbc408f5 dnet: driver for Dave DNET ethernet controller
Driver for Dave DNET ethernet controller (used on Dave/DENX
QongEVB-LITE board).

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-10 00:16:27 +01:00
Richard Retanubun
c4ff77f5e6 Coldfire: mcfmii: Allow non-autonegotiating PHYs to use mii command
Modified mii_init to support boards with PHYs that are not set to
autonegotiate, but still want to use u-boot's mii commands to probe
the smi bus. Such PHYs will not set the Autonegotiate-done bit.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
2009-02-06 14:54:47 -07:00
Mike Frysinger
6d7d4803c7 Blackfin: bfin_mac: cleanup pointer/casts for aliasing issues
Redo how pointers are managed to get rid of ugly casts and strict pointer
aliasing issues that are highlighted by gcc 4.3.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:24:27 -05:00
Mike Frysinger
092d2487ba Blackfin: bfin_mac: convert CONFIG_BFIN_MAC_RMII to CONFIG_RMII
No point in having a Blackfin-specific define "CONFIG_BFIN_MAC_RMII" that
does exactly the same thing as common "CONFIG_RMII".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:24:27 -05:00
Mike Frysinger
8eed6ca51e Blackfin: bfin_mac: use common debug()
Rather then defining our own DEBUGF(), just use the common debug().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:24:26 -05:00
Mike Frysinger
a7ec6ac8b2 Blackfin: bfin_mac: respect CONFIG_PHY_{ADDR,CLOCK_FREQ}
Rather than having the on-chip MAC hardcoded to phy address 1 and a speed
of 2.5mhz, use these as defaults if the board doesn't specify otherwise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:24:26 -05:00
Mike Frysinger
ac45af4e63 Blackfin: bfin_mac: cleanup MII/PHY functions
Cleanup and rewrite the MII/PHY related functions so that we can reuse the
existing common linux/miiphy.h code and hook into the `mii` command.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:24:24 -05:00
Mike Frysinger
6b310a05f0 Blackfin: bfin_mac: set MDCDIV based on SCLK
Rather than hardcoding MDCDIV to 24 (which is correct for ~125mhz SCLK),
use the real algorithm so it gets set correctly regardless of SCLK.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-02 12:23:20 -05:00
Wolfgang Denk
ee924e0030 Merge branch 'master' of git://git.denx.de/u-boot-net 2009-02-01 21:31:37 +01:00
Gunnar Rangoy
fc01ea1e27 AVR32: macb - Search for PHY id
This patch adds support for searching through available PHY-addresses in
the macb-driver. This is needed for the ATEVK1100 evaluation board,
where the PHY-address will be initialized to either 1 or 7.

This patch adds a config option, CONFIG_MACB_SEARCH_PHY, which when
enabled tells the driver to search for the PHY address.

Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com>
Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com>
Signed-off-by: Olav Morken <olavmrk@gmail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-28 23:59:28 -08:00
Ron Madrid
12a8b9db12 Marvell 88E1118 interrupt fix
This patch adjusts the LED control so that interrupt lines are not reading LEDs
and effectively causing indefinite interrupts to the controller.

Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-28 23:59:28 -08:00
Stefan Roese
9a37f2acc3 net: smc911x.c: Add LAN9211 to chip_ids[] array
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-28 23:59:28 -08:00
Michal Simek
268859338c net: Sort Makefile labels
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-28 23:59:27 -08:00
Mike Frysinger
1118ea7369 Blackfin: bfin_mac: update port muxing
Adds support more Blackfin parts and fixes broken muxing for older ones.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:12 -05:00
Stefan Althoefer
1bc4343730 drivers/net/e1000.c: missing terminator for supported devices
Signed-off-by: Stefan Althoefer <stefan.althoefer@web.de>
2009-01-27 21:53:02 +01:00
Nobuhiro Iwamatsu
bd3980cc09 sh: sh_eth: Change new network API
sh_eth used old network API. This patch changed new API.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-24 20:45:51 -08:00
Stefan Roese
890a02e8ee net: smc911x: Make register read/write functions weak
This patch changes the reg_read/_write to smc911x_reg_read/_write
and defines then as weak so that they can be overridden by board
specific version.

This will be used by the upcoming VCTH board support.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-24 20:45:51 -08:00
Anatolij Gustschin
23afaba65e net: tsec: Fix Marvell 88E1121R phy init
This patch tries to ensure that phy interrupt pin
won't be asserted after booting. We experienced
following issues with current 88E1121R phy init:

Marvell 88E1121R phy can be hardware-configured
to share MDC/MDIO and interrupt pins for both ports
P0 and P1 (e.g. as configured on socrates board).
Port 0 interrupt pin will be shared by both ports
in such configuration. After booting Linux and
configuring eth0 interface, port 0 phy interrupts
are enabled. After rebooting without proper eth0
interface shutdown port 0 phy interrupts remain
enabled so any change on port 0 (link status, etc.)
cause assertion of the interrupt. Now booting Linux
and configuring eth1 interface will cause permanent
phy interrupt storm as the registered phy 1 interrupt
handler doesn't acknowledge phy 0 interrupts. This
of course should be fixed in Linux driver too.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00
TsiChung Liew
54bdcc9fb6 ColdFire: Add mii driver in drivers/net
All CF platforms' mii.c are consolidated into one

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09 21:38:05 -08:00
Ben Warren
4d03a4e20e Moved PPC4xx EMAC driver to drivers/net
Also changed path in all linker scripts that reference this driver

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2008-11-09 21:38:04 -08:00
Clive Stubbings
f2a7806fc2 xilinx_emaclite buffer overrun
Patch to fix buffer allocation size and alignment. Buffer needs to be u32 aligned and
PKTSIZE_ALIGN bytes long.

Acked-by: Michal Simek <monstr@monstr.eu>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09 21:38:02 -08:00
Wolfgang Denk
8ed44d91c8 Cleanup: fix "MHz" spelling
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-21 11:25:39 +02:00
Wolfgang Denk
f82642e338 Merge 'next' branch
Conflicts:

	board/freescale/mpc8536ds/mpc8536ds.c
	include/configs/mgcoge.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-18 21:59:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD
6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Wolfgang Denk
b4dbacf69a Coding Style cleanup, update CHANGELOG, prepare 2008.10-rc3
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-15 15:50:45 +02:00
Louis Su
30f5747172 AX88180: new gigabit network driver
Signed-off-by: Louis Su <louis@asix.com.tw>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-13 22:33:12 -07:00
Andre Schwarz
c9d6b69253 enable 10/100M at VSC8601 at tsec driver
Currently VSC8601 doesn't link with 10/100M partners if the
EEPROM/Strapping is not set up.
Setting the auto-neg register fixes this.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-13 22:29:37 -07:00
Nobuhiro Iwamatsu
702c85b0e8 net: ne2000: Divided a function of NE2000 driver
get_prom function was used __attriute__ , but it is not enable.
ax88796.o does not do link besides ne2000.o. When ld is carried
out, get_prom function of ax88796.c is ignored.
This problem is a thing by specifications of ld.
I checked and test this patch on SuperH and MIPS.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-13 22:28:32 -07:00
Peter Tyser
ce47eb402c Support for multiple SGMII/TBI interfaces for TSEC ethernet
Fix TBI PHY accesses to use the proper offset in CPU register space. The
previous code would incorrectly access the TBI PHY by reading/writing to CPU
register space at the same location as would be used to access external PHYs.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-09-16 11:32:45 -05:00
Wolfgang Denk
225f0eaa74 Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-09-12 16:14:28 +02:00