1
0
Fork 0
Commit Graph

26 Commits (1fd92db83d399ff7918e51ba84bc73d2466b5eb6)

Author SHA1 Message Date
Joe Hershberger 1fd92db83d net: cosmetic: Fix var naming net <-> eth drivers
Update the naming convention used in the network stack functions and
variables that Ethernet drivers use to interact with it.

This cleans up the temporary hacks that were added to this interface
along with the DM support.

This patch has a few remaining checkpatch.pl failures that would be out
of the scope of this patch to fix (drivers that are in gross violation
of checkpatch.pl).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:33 -06:00
Joe Hershberger d2eaec6006 net: Remove the bd* parameter from net stack functions
This value is not used by the network stack and is available in the
global data, so stop passing it around.  For the one legacy function
that still expects it (init op on old Ethernet drivers) pass in the
global pointer version directly to avoid changing that interface.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
2015-04-18 11:11:11 -06:00
Wolfgang Denk 1b387ef55c SPDX: fix IBM-pibs license identifier
The SPDX License List version 1.19 now contains an official entry for
the IBM-pibs license.  However, instead of our suggestion "ibm-pibs",
the SPDX License List uses "IBM-pibs", with the following rationale:
"The reason being that all other SPDX License List short identifiers
tend towards using capital letters unless spelling a word.  I'd prefer
to be consistent to this end".

Change the license IDs to use the official name.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-09-20 10:30:54 -04:00
Wolfgang Denk 46263f2de4 SPDX-License-Identifier: convert PIBS licensed files
This commit adapts the files that were derived from PIBS (PowerPC
Initialization and Boot Software) codeto using SPDX License
Identifiers.

So far, SPDX has not assigned an official License ID for the PIBS
license yet, so this should be considered preliminary.

Note that the following files contained incorrect license information:

	arch/powerpc/cpu/ppc4xx/4xx_uart.c
	arch/powerpc/cpu/ppc4xx/start.S
	arch/powerpc/include/asm/ppc440.h

These files included, in addition to the GPL-2.0 / ibm-pibs dual
license as inherited from PIBS, a GPL-2.0+ license header which was
obviously incorrect.  This has been removed.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>

Conflicts:
	Licenses/README
Acked-by: Stefan Roese <sr@denx.de>
2013-08-19 15:34:14 -04:00
Anatolij Gustschin 3f9eb617cb drivers/net/4xx_enet.c: Fix build warning
Fix:
4xx_enet.c: In function 'ppc_4xx_eth_initialize':
4xx_enet.c:2029: warning: assignment from incompatible pointer type

Tested on sequoia board.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
2012-05-22 10:18:14 -05:00
Stefan Roese f0813ab128 4xx_enet.c: Fix GCC 4.6 build warnings
Fix:
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:875:6: warning: variable 'ethgroup' set but not used [-Wunused-but-set-variable]

I used "__maybe_unused" here intentionally, since all other
alternatives to fix this compilation warning would result in more
ifdef's.

Signed-off-by: Stefan Roese <sr@denx.de>
2011-11-16 21:14:14 +01:00
Wolfgang Denk f4d9f2da2a 4xx_enet.c: fix GCC 4.6 build warnings
Fix:
4xx_enet.c: In function 'enet_rcv':
4xx_enet.c:1772:21: warning: variable 'ef_ptr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
2011-11-03 20:40:00 +01:00
Marek Vasut c97e74afcb GCC4.6: Squash warnings in 4xx_enet.c
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
2011-10-27 23:54:04 +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
Wolfgang Denk 0886eef9ba Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
* 'master' of git://git.denx.de/u-boot-ppc4xx:
  net/4xx: Install interrupt handler after driver registration
2011-08-02 21:52:21 +02:00
Mike Williams 1626308797 cleanup: Fix typos and misspellings in various files.
Recieve/Receive
recieve/receive
Interupt/Interrupt
interupt/interrupt
Addres/Address
addres/address

Signed-off-by: Mike Williams <mike@mikebwilliams.com>
2011-07-28 21:27:36 +02:00
Stefan Roese 3ce04d9bba net/4xx: Install interrupt handler after driver registration
Only install der 4xx-EMAC interrupt handlers *after* the core
network driver is registered.

This problem was noticed on the APM Taishan 440GX board, where
the board hung upon bootup after displaying "Net:".

Signed-off-by: Stefan Roese <sr@denx.de>
2011-07-28 19:16:16 +02:00
Mike Frysinger 8ef583a035 miiphy: convert to linux/mii.h
The include/miiphy.h header duplicates a lot of things from linux/mii.h.
So punt all the things that overlap to keep the API simple and to make
merging between U-Boot and Linux simpler.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:06:50 +01:00
Stefan Roese 5e7abce991 ppc4xx: Big header cleanup, mostly PPC440 related
This patch starts a bit PPC4xx header cleanup. First patch mostly
touches PPC440 files. A later patch will touch the PPC405 files as well.

This cleanup is done by creating header files for all SoC versions and
moving the SoC specific defines into these special headers. This way the
common header ppc405.h and ppc440.h can be cleaned up finally.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese b36df56115 ppc4xx: Move ppc4xx headers to powerpc include directory
This patch moves some ppc4xx related headers from the common include
directory (include/) to the powerpc specific one
(arch/powerpc/include/asm/). This way to common include directory is not
so cluttered with files.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Mike Frysinger 5700bb6352 miiphy: constify device name
The driver name does not need to be writable, so constify it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:29 -07:00
Stefan Roese ca08054e80 net: Add option to disable fiber on M88E1111 PHY for PPC4xx
By defining CONFIG_M88E1111_DISABLE_FIBER boards can configure the
M88E1111 PYH to disable fiber. This is needed for an upcoming PPC460GT
based board, which has fiber/copper auto-selection enabled by default.
This doesn't seem to work. So we disable fiber in the PHY register.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:02:11 -07:00
Niklaus Giger ddc922ff2c ppc_4xx: Apply new HW register names
Modify all existing *.c files to use the new register names
as seen in the AMCC manuals.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-07 09:15:20 +02:00
James Clough c0b46d8ead net: Fix problem with 405EZ ethernet interrupt
On 405EZ the RX-/TX-interrupts are coalesced into one IRQ bit in the
UIC. We need to acknowledge the RX-/TX-interrupts in the
SDR0_ICINTSTAT reg as well.

This problem was introduced with commit
d1631fe1 [ppc4xx: Consolidate PPC4xx UIC defines]

Signed-off-by: James Clough <james@rtetc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04 22:25:20 -07:00
Stefan Roese d1c3b27525 ppc4xx: Big cleanup of PPC4xx defines
This patch cleans up multiple issues of the 4xx register (mostly
DCR, SDR, CPR, etc) definitions:

- Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
- Change the defines to better match the names from the
  user's manuals (e.g. cprpllc -> CPR0_PLLC)
- Removal of some unused defines

Please test this patch intensive on your PPC4xx platform. Even though
I tried not to break anything and tested successfully on multiple
4xx AMCC platforms, testing on custom platforms is recommended.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-11 10:35:58 +02:00
Josh Boyer 317734966e Dual-license IBM code contributions
It was brought to our attention that U-Boot contains code derived from the
IBM OpenBIOS source code originally provided with some of the older PowerPC
4xx development boards.  As a result, the original license of this code has
been carried in the various files for a number of years in the U-Boot project.

IBM is dual-licensing the IBM code contributions already present in U-Boot
under either the terms of the GNU General Public License version 2, or the
original code license already present.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2009-08-09 23:15:33 +02:00
Alessio Centazzo 0544c63681 ppc4xx: Fixed compilation warning in 4xx_enet.c
This patch fixes a compilation warning for some Ethernet PHY-less
PPC4xx platforms (440SPE based ones) and a potential compilation
error for 440SP platforms (use of undefined 'ethgroup' variable).
In the original code and in case of 440SPE platforms, 'ethgroup'
is initialized to -1 and never modified.  Later in the function,
within an #ifdef statement, an 'if statement' executes code only
if 'ethgroup' is set to 4, therefore it is harmless to avoid
executing the 'if statement' by removing the CONFIG_440SPE from
the affected #ifdefs.  In case of 440SP platforms  with on-board
Ethernet PHY, 'ethgroup' is undefined but used (there are not such
platforms in the repository yet). All other architectures are not
affected by this change.

Signed-off-by: Alessio Centazzo acpatin@yahoo.com
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:45 -07:00
Ben Warren 6e0d2fc7fe Remove support for non-CONFIG_NET_MULTI on PPC4xx EMAC
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Felix Radensky 0c24dec550 ppc4xx/net: Fix MDIO clock setup
This patch fixes MDIO clock setup in case when OPB frequency is 100MHz.
Current code assumes that the value of sysinfo.freqOPB is 100000000
when OPB frequency is 100MHz. In reality it is 100000001. As a result
MDIO clock is set to incorrect value, larger than 2.5MHz, thus violating
the standard. This in not a problem on boards equipped with Marvell PHYs
(e.g. Canyonlands), since those PHYs support MDIO clocks up to 8.3MHz,
but can be a problem for other PHYs (e.g. Realtek ones).

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-08 22:57:21 -07: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
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