Commit Graph

499 Commits

Author SHA1 Message Date
Joachim Foerster
70d52f9a4e altera_tse: Fix return of eth_device's recv() callback
It seems to be good practice to return the number of received bytes in the
eth_device's recv() callback, here: tse_eth_rx().

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2011-10-26 21:29:08 +02:00
Joachim Foerster
15eb106966 altera_tse: m88e1111s: Honor device flags regarding PHY interface mode
Note: This is kind of guess work. The current code is preserved for
all RGMII related modes. It is different for flags=0 (GMII) and flags=5
(SGMII). The last case, SGMII, is successfully tested on
Altera's Terasic DE4.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2011-10-26 21:28:18 +02:00
Joachim Foerster
b962ac794a altera_tse: Add support for dedicated descriptor memory
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2011-10-26 21:27:37 +02:00
Joachim Foerster
29095f1a5c altera_tse: Fix SGDMA reset triggering
The SW_RESET needs to be set instead of being masked out!

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2011-10-26 21:26:48 +02:00
Joachim Foerster
337aff53f6 altera_tse: Clear SGDMA's RUN bit in async transfer, like in sync case
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2011-10-26 21:25:42 +02:00
Mike Frysinger
5de78b17f0 net: sc589: drop unused !NET_MULTI driver
No boards appear to use this driver, and it doesn't support NET_MULTI,
so punt the old driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23 23:34:20 +02:00
Mike Frysinger
c1761eeab0 net: s3c4510b_eth: drop unused !NET_MULTI driver
No boards appear to use this driver, and it doesn't support NET_MULTI,
so punt the old driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23 23:34:20 +02:00
Mike Frysinger
8b710b163b net: ns9750: drop !NET_MULTI driver
Only one board uses this driver (ns9750dev), but the board doesn't seem
to have an entry to actually build it in the Makefile/boards.cfg, so just
delete net support from its board config.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23 23:34:20 +02:00
Mike Frysinger
ae6edb54c0 net: enc28j60_lpc2292: drop unused !NET_MULTI driver
Everyone seems to have converted to the new enc28j60 driver, so drop
this older one which isn't used and doesn't support NET_MULTI.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23 23:34:20 +02:00
Michal Simek
c1044a1ec1 net: emaclite: Move RX/TX ping pong initialization to
Init RX/TX ping pong directly from board not in the driver.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-23 23:32:44 +02:00
Michal Simek
9b94755af9 net: emaclite: Use unsigned long for baseaddr
Baseaddr should be unsigned long.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-23 23:32:44 +02:00
Anatolij Gustschin
c4c9fbebae consolidate mdelay by providing a common function for all users
There are several mdelay() definitions in the driver and
board code. Remove them all and provide a common mdelay()
in lib/time.c.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-22 01:16:08 +02:00
Linus Walleij
df6a36fbef net: dc2114x: check for apropriate command
The code had two paths depending on whether the card was to be
accessed from plain memory or the IO region. However the error
path checks whether IO region was obtained - twice. Fix up the
error path according to the probable intention.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-10-22 00:37:49 +02:00
Macpaul Lin
55b438a919 ftgmac100: reset fix when supports wake on lan
This patch move the reset function from initialization to
driver register procedure.

Some embedded system supports wake on lan nowadays. On this kind of system,
the ftgmac100 will be still supplied power after the system has been
shut-down by Linux. Hence the register used by linux won't be clear
when the system has been powered-off.

The origin ftgmac100 driver in u-boot will only register
driver and functions to network stack and won't reset the ftgmac100
hardware if the network won't be used during boot-up.
This will lead ftgmac100 continue receiving packets and then might corrupt
linux kernel when booting up.

So we reorder the hardware reset function earlier to force the hardware
to be reset whether it will be used or not.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-10-22 00:36:12 +02:00
Timur Tabi
a836626cc4 powerpc/85xx: wait for alignment before resetting SERDES RX lanes (SERDES9)
The work-around for P4080 erratum SERDES9 says that the SERDES receiver
lanes should be reset after the XAUI starts tranmitting alignment signals.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-20 16:01:37 -05:00
Kumar Gala
f5b9e73641 fm: Don't allow disabling of FM1-DTSEC1
The MDIO controller to talk to external PHYs is on FM1-DTSEC1 so don't
allow disabling.  If we disable it we end up powering the block down in
the SoC and thus can't communicate to any external PHYs.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-18 00:36:15 -05:00
Kumar Gala
e81c0aba9a fm-eth: Don't mark the MAC we use for MDIO as disabled in device tree
FM1-DTSEC1's MAC was being marked as disabled if the port was not
configured based on the SoC configuration.  However we utilize the MAC
interface for MDIO and thus should NOT mark it disabled.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-18 00:36:15 -05:00
Jason Jin
5c1d082b14 DM9000:Add a byte swap macro for dm9000 io operation.
commit a45dde2293 changed the dm9000
direct register access to standard IO. This should work
on the ColdFire platform as there are corresponding macros for
the LE devices. But the hardware settings on some ColdFire boards had
swapped the byte order which make the original macros such as out_le16
cannot work. To avoid changing the common io access code on ColdFire
platform, the DM9000_BYTE_SWAPPED define was added to make the dm9000 use
__raw* IO access on some ColdFire boards.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
2011-10-17 22:25:33 +02:00
Michal Simek
4f1ec4c176 net: axi_ethernet: Add driver to u-boot
Add axi_ethernet driver for little-endian Microblaze.

RX/TX BDs and rxframe buffer are shared among all axi_ethernet MACs.
Only one MAC can work in one time.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-15 22:12:05 +02:00
Michal Simek
5ac83801f9 net: emaclite: Fix coding style
Coding style should follow linux coding style.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:09:43 +02:00
Michal Simek
8043925204 net: emaclite: Use PKTSIZE directly
Do not setup additional ENET_MAX_MTU macro.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:09:27 +02:00
Michal Simek
947324b9ca net: emaclite: Setup RX/TX ping pong for every instance
Setup RX/TX ping-pong buffer for every emaclite IP separately.
The next patch move initialization directly to board code.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:06:38 +02:00
Timur Tabi
2339e4972f phylib: wait for TN2020 to achieve SERDES lane alignment at startup
Before the Teranetics TN2020 PHY can be used, the SERDES lanes need to be
aligned, so wait for lane alignment before completing the startup sequence.

Note that this process can take up to three seconds.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-13 23:38:11 -05:00
Timur Tabi
7f92c3a275 powerpc/p3060: remove all references to RCW bits EC1_EXT, EC2_EXT, and EC3
The EC1_EXT, EC2_EXT, and EC3 bits in the RCW don't officially exist on the
P3060 and should always be set to zero.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-13 23:38:10 -05:00
Timur Tabi
3038171628 powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY
Function dtsec_configure_serdes() needs to know where the TBI PHY registers
are in order to configure SGMII for proper SerDes operation.

During SGMII initialzation, fm_eth_init_mac() passing NULL for 'phyregs'
when it called init_dtsec(), because it was believed that phyregs was not
used.  In fact, it is used by dtsec_configure_serdes() to configure the TBI
PHY registers.

We also need to define the PHY registers in struct fm_mdio.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-09 17:57:53 -05:00
Andy Fleming
ebfdacb42b phylib: Work around bug in Teranetics PHY
The Teranetics PHY does not properly report the link state
for fiber connections. The new PHY code actually checked the link,
and so the FM driver would refuse to talk over a linkless PHY.

But the link may actually be up, so now we always report it as up
for fiber connections on the tn2020.

Signed-off-by: Andy Fleming <afleming@freescale.com>
2011-10-09 17:57:53 -05:00
Wolfgang Denk
bf513c2d75 drivers/net/smc91111.c: fix warning: variable ... set but not used
Fix:
smc91111.c: In function 'smc_phy_configure':
smc91111.c:1194:6: warning: variable 'failed' set but not used [-Wunused-but-set-variable]
smc91111.c:1190:7: warning: variable 'phyaddr' set but not used [-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-10-09 23:24:49 +02:00
Michael Walle
1a9845b4f0 netconsole: support packets longer than 512 bytes
Esp. while printing the environment the output is usually longer than 512
bytes. Instead of cutting the message, send multiple 512 bytes packets.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-09 23:24:48 +02:00
Mike Frysinger
e2a53458a7 net: drop !NET_MULTI code
This is long over due.  All but two net drivers have been converted, but
those have now been dropped.

The only thing left to do is actually delete all references to NET_MULTI
and code that is compiled when that is not defined.  So here we scrub the
core code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05 22:22:16 +02:00
Mike Frysinger
d90f0c107b net: drop !NET_MULTI ns7520 driver
This driver was never converted to NET_MULTI, and no board uses it.
So punt it and be done.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05 22:22:15 +02:00
Mike Frysinger
029cf6b4b2 net: drop !NET_MULTI bcm570x/tigon3 drivers
These drivers have never been converted to NET_MULTI, and they are only
used by one board (BMW).  So drop the drivers until someone feels like
rewriting them for NET_MULTI support.

Rather than punting the BMW board completely, just disable net support
in its board config.  Seems to build fine without it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05 22:22:15 +02:00
Wolfgang Denk
1fed668b3f Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
* 'master' of git://git.denx.de/u-boot-mpc85xx:
  powerpc/p3060: Add SoC related support for P3060 platform
  powerpc/85xx: Add support for setting up RAID engine liodns on P5020
  powerpc/85xx: Refactor some defines out of corenet_ds.h
  fm-eth: Add ability for board code to disable a port
  powerpc/mpc8548: Add workaround for erratum NMG_LBC103
  powerpc/mpc8548: Add workaround for erratum NMG_DDR120
  powerpc/mpc85xxcds: Fix PCI speed
  powerpc/mpc8548cds: Fix booting message
  powerpc/p4080: Add support for secure boot flow
  powerpc/85xx: Add Secure Boot support on P1010RDB for NOR, NAND & SPIFLASH
  powerpc/85xx: Add PBL & SECUREBOOT support on P3041/P5020DS boards
  powerpc/p2041rdb: remove watch dog related codes
  powerpc/p2041rdb: updated description of cpld command
  powerpc/p2041rdb: add more ddr frequencies support
  powerpc/p2041rdb: set sysclk according to status of physical switch SW1
  powerpc/p2041rdb: update cpld reset command according to CPLD 2.0
  powerpc/mpc8349emds: Migrate from spd_sdram to unified DDR driver
  powerpc/mpc83xx: Migrate from spd_sdram to unified DDR driver
  powerpc/mpc8xxx: Add DDR2 to unified DDR driver
  powerpc/mpc8xxx: Fix picos_to_mclk() and get_memory_clk_period_ps()
  powerpc/mpc8xxx: Add SPD EEPROM address for single controller 2 slots
  powerpc/mpc8xxx: Fix DDR code for empty first DIMM slot and enable DQS_en
  powerpc/85xx: Refactor P2041RDB to use common p_corenet files
  powerpc/85xx: refactor common P-Series CoreNet files for FSL boards
  powerpc/85xx: Enable CMD_REGINFO on corenet boards
  powerpc/85xx: p2041rdb - Remove unused 'execute' perm in TLB entries
  powerpc/85xx: Fix USB protocol definitions for P1020RDB
  powerpc/corenet_ds: Use separated speed tables for UDIMM and RDIMM
  powerpc/mpc8xxx: Move DDR RCW overriding to common code
  powerpc/mpc8xxx: Extend CWL table
  powerpc/85xx: Cleanup how SVR_MAJ() is defined on MPC8536
  powerpc/85xx: Cleanup extern in corenet_ds board code
  powerpc/p2041rdb: Add ethernet support on P2041RDB board
  powerpc/85xx: Add networking support to P1023RDS
  powerpc/hydra: Add ethernet support on P5020/P3041 DS boards
  powerpc/85xx: Add FMan ethernet support to P4080DS
  powerpc/85xx: Add support for FMan ethernet in Independent mode
  powerpc/mpc8548cds: Cleanup mpc8548cds.c
  powerpc/mp: add support for discontiguous cores
  powerpc/85xx: corenet_ds - Remove unused 'execute' perm in TLB entries
  fdt: Add new fdt_create_phandle helper
  fdt: Rename fdt_create_phandle to fdt_set_phandle
  powerpc/85xx: Fix compile warnings/errors if CONFIG_SYS_DPAA_FMAN isn't set
  fsl_ifc: Add the workaround for erratum IFC A-003399(enabled on P1010)
  powerpc/P1010: Add workaround for erratum P1010-A003549 (related to IFC)
  fsl_ifc: Add the workaround for erratum IFC-A002769 (enable on P1010)
  powerpc/85xx: Expanding the window of CCSRBAR in AS=1 from 4k to 1M
  powerpc/85xx: Add NAND/NAND_SPL support to P1010RDB
  nand: Freescale Integrated Flash Controller NAND support
  powerpc/85xx: Add basic support for P1010RDB
  powerpc/85xx: Add support for new P102x/P2020 RDB style boards
  powerpc/85xx: relocate CCSR before creating the initial RAM area
  powerpc/85xx: introduce and document CONFIG_SYS_CCSRBAR macros
  powerpc/85xx: Enable internal USB UTMI PHY on p204x/p3041/p50x0
  powerpc/85xx: Add ULPI and UTMI USB Phy support for P1010/P1014
2011-10-04 22:08:13 +02:00
Shengzhou Liu
6d7b061af1 powerpc/p3060: Add SoC related support for P3060 platform
Add P3060 SoC specific information:cores setup, LIODN setup, etc

The P3060 SoC combines six e500mc Power Architecture processor cores with
high-performance datapath acceleration architecture(DPAA), CoreNet fabric
infrastructure, as well as network and peripheral interfaces.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-03 09:36:28 -05:00
Kumar Gala
69a8524258 fm-eth: Add ability for board code to disable a port
The SoC configuration may have more ports enabled than a given board
actually can utilize.  Add a routinue that allows the board code to
disable a port that it knows isn't being used.

fm_disable_port() needs to be called before cpu_eth_init().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-03 08:52:15 -05:00
Michal Simek
773cfa8d08 net: emaclite: Use dynamic allocation
Every emaclite instance use own setting.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-03 08:04:14 +02:00
Michal Simek
8d95ddbb5e net: emaclite: Remove baseaddress from xemaclite
Use dev->iobase instead of baseaddress.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-03 08:04:14 +02:00
Michal Simek
28ae02e5af net: emaclite: Use calloc instead of malloc
Simplify driver logic and clear eth_device structure
in one command.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-03 08:04:14 +02:00
Michal Simek
be98696741 net: emaclite: Remove deviceid property
Cleanup structure.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-03 08:04:13 +02:00
Michal Simek
25a025518b net: emaclite: Change driver name and add address
Current xilinx emaclite use net multi registration
but doesn't support several emaclites interfaces.
Changing driver name with adding address to name
is the first step how to distiguish several drivers.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-03 08:04:13 +02:00
Marek Vasut
8edcc6f221 FEC: Move imx_get_mac_from_fuse() definition to fec_mxc.h
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:03 +02:00
Marek Vasut
17fb268cf7 FEC: Squish "got MAC from fuse" message, make it debug()
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
e382fb4873 FEC: Add timeout for chip reset
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
2e5f44213f FEC: Allow registering MII postconfiguration callback
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
9e27e9dca1 FEC: Allow multiple FECes
This patch allows user to register multiple FEC controllers. To preserve
compatibility with older boards, the mxcfec_register() call is still in place.
To use multiple controllers, new macro is in place, the mxcfec_register_multi(),
which takes more arguments. The syntax is:

mxcfec_register_multi(bd, FEC ID, FEC PHY ID on the MII bus, base address);

To disable the fecmxc_register() compatibility stuff, define the macro
CONFIG_FEC_MXC_MULTI. This will remove the requirement for defining IMX_FEC_BASE
and CONFIG_FEC_MXC_PHYADDR.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
d133b881b9 FEC: Abstract access to fec->eth in MII operations
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
392b850233 FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPE
The default is MII100, which was hardcoded previously in the driver.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
a50a90c90e FEC: Add RMII mode support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
9eb3770b7b FEC: Kill mode select FIXME's
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
77dbd6ab7f FEC: Use defined constant instead of magic number
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
879cf26130 FEC: Use proper accessor to read register in debug call
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00