Commit Graph

7423 Commits

Author SHA1 Message Date
Stefan Roese 68d7d65100 Separate mtdparts command from jffs2
Currently the mtdparts commands are included in the jffs2 command support.
This doesn't make sense anymore since other commands (e.g. UBI) use this
infrastructure as well now. This patch separates the mtdparts commands from
the jffs2 commands making it possible to only select mtdparts when no JFFS2
support is needed.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-03-20 22:39:14 +01:00
Stefan Roese 02a301cd50 powerpc: Only use eth_getenv_enetaddr() if networking is enabled
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Grzegorz Bernacki 5c4fa9b474 Add support for the digsy MTC board.
This is the InterControl custom device based on the MPC5200B chip.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
2009-03-20 22:39:14 +01:00
Stefan Roese ff7dc06736 powerpc: Fix compilation warning in board.c
Fix this warning:

board.c: In function 'board_init_r':
board.c:653: warning: unused variable 'i'
board.c:651: warning: unused variable 'e'

Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Stefan Roese 9cd690160d ppc4xx: Don't write the MAC address into the internal SoC registers
Remove this code. It's not needed. The 4xx EMAC driver stores the MAC
addresses into the SoC registers instead.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Matthias Fuchs bb57ad4be7 ppc4xx: Use correct io accessors for esd 405/440 boards
This patch replaces in/out8/16/32 macros by in/out_8/_be16/_be32
macros. Also volatile pointer references are replaced by the
new accessors.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Matthias Fuchs 049216f045 ppc4xx: Use correct io accessors for esd 405 boards
This patch replaces in/out8/16/32 macros by in/out_8/_be16/_be32
macros. Also volatile pointer references are replaced by the
new accessors.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Matthias Fuchs a59205d151 ppc4xx: Cleanup linker scripts of esd 4xx boards
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:14 +01:00
Matthias Fuchs 2f103ee284 ppc4xx: Update TEXT_BASE for DASA_SIM boards
Fix building DASA_SIM boards by increasing U-Boot's size in flash.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:13 +01:00
Matthias Fuchs 09db8f4de6 ppc4xx: DU405 maintenance fix
-strip unused features
-fix resetting phy

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:13 +01:00
Matthias Fuchs 75511b47ac ppc4xx: Abort autoboot only by space key on CPCI405 boards
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:13 +01:00
Graeme Russ e17ee157ca Add basic relocation to i386 port
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2009-03-20 22:39:13 +01:00
Graeme Russ 8c63d47651 Implement SC520 timers
Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
2009-03-20 22:39:13 +01:00
Graeme Russ 6d7f610b09 Factor out SC520 sub-features
Moved sub-features of the SC520 code which is currently selectively compiled
using #ifdef out of sc520.c into individual files selectively compiled via
the makefile

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
2009-03-20 22:39:13 +01:00
Graeme Russ abf0cd3dff Rewrite i386 interrupt handling
Rewrite interrupt handling functionality for the i386 port. Separated
functionality into separate CPU and Architecture components.

It appears as if the i386 interrupt handler functionality was intended
to allow multiple handlers to be installed for a given interrupt.
Unfortunately, this functionality was not fully implemented and also
had the problem that irq_free_handler() does not allow the passing
of the handler function pointer and therefore could never be used to
free specific handlers that had been installed for a given IRQ.

There were also various issues with array bounds not being fully
tested.

I had two objectives in mind for the new implementation:

1) Keep the implementation as similar as possible to existing
   implementations. To that end, I have used the leon2/3
   implementations as the reference

2) Seperate CPU and Architecture specific elements. All specific i386
   interrupt functionality is now in cpu/i386/ with the high level
   API and architecture specific code in lib_i386. Functionality
   specific to the PC/AT architecture (i.e. cascaded i8259 PICs) has
   been further split out into an individual file to allow for the
   implementation of the PIC architecture of the SC520 CPU (supports
   more IRQs)

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
2009-03-20 22:39:13 +01:00
Graeme Russ ece444b42b Move ali512x.h
Moved ali512x.h from include/asm-i386/ic/ to /include

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
2009-03-20 22:39:13 +01:00
Graeme Russ 6d83e3ac61 Rename SC520 Configuration Options
Options are now all uniformly CONFIG_SYS_SC520_<option>

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
2009-03-20 22:39:12 +01:00
Trent Piepho f62fb99941 Fix all linker script to handle all rodata sections
A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
which needs to be added the the linker script.  Instead of just adding this
one section, we use a wildcard ".rodata*" to get all rodata linker section
gcc has now and might add in the future.

However, '*(.rodata*)' by itself will result in sub-optimal section
ordering.  The sections will be sorted by object file, which causes extra
padding between the unaligned rodata.str.1.1 of one object file and the
aligned rodata of the next object file.  This is easy to fix by using the
SORT_BY_ALIGNMENT command.

This patch has not be tested one most of the boards modified.  Some boards
have a linker script that looks something like this:

*(.text)
. = ALIGN(16);
*(.rodata)
*(.rodata.str1.4)
*(.eh_frame)

I change this to:

*(.text)
. = ALIGN(16);
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

This means the start of rodata will no longer be 16 bytes aligned.
However, the boundary between text and rodata/eh_frame is still aligned to
16 bytes, which is what I think the real purpose of the ALIGN call is.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-20 22:39:12 +01:00
Mike Frysinger 566b652c7c remove bi_enet*addr from global data for all arches
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Michal Simek <monstr@seznam.cz>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2009-03-20 22:39:12 +01:00
Mike Frysinger eb85aa594c ppc: mark global bi_enet*addr as legacy
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.

In the ppc case, these things are part of the legacy ABI, so keep them
around but mark them as legacy so no new code will touch them.

Also stop calling load_sernum_ethaddr() since all boards now implement
this as a stub.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:12 +01:00
Mike Frysinger 9c150102bc boards: get mac address from env and move load_sernum_ethaddr() to board init
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.

Rather than have common ppc code call a board-specific function like
load_sernum_ethaddr(), have each board call it in its own board-specific
misc_init_r() function.

The boards that get converted here are:
	- kup4k/kup4x
	- pcs440ep
	- tqm8xx

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Stefan Roese <sr@denx.de>
2009-03-20 22:39:12 +01:00
Mike Frysinger 92b50ffef9 cmc_pu2: 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 rename load_sernum_ethaddr() to misc_init_r() so we don't need to
handle this board specially in common ARM code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:12 +01:00
Mike Frysinger d8d21e699d boards: move board_get_enetaddr() into board-specific init
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.

Rather than have the common ppc code have board-specific hooks, move the
board_get_enetaddr() function into the board-specific init functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:12 +01:00
Mike Frysinger f11e6ff5b1 arm: 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.

Some warts are remaining and should be killed off (by moving the func to
the appropriate board init code):
	- davinci_eth_set_mac_addr
	- cs8900_get_enetaddr
	- smc_set_mac_addr

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:11 +01:00
Mike Frysinger 0107cf66f7 nx823: 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.

For the nx823, the serial number is moved out of load_sernum_ethaddr() and
into misc_init_r() as is the env setup.  This lets us kill off the former
function in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:11 +01:00
Mike Frysinger 19b5b533cc lib_*/board.c: do not initialize bi_enet*addr in global data
Since everyone is using the environment for mac address storage, there is
no point in seeding the global data.

The arches that are converted here:
	i386
	m68k
	microblaze
	mips
	nios
	nios2
	sh
	sparc

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Michal Simek <monstr@seznam.cz>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2009-03-20 22:39:11 +01:00
Mike Frysinger 740e8ba7d4 npe: 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 resulting code can also be simplified even further.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Stefan Roese <sr@denx.de>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:11 +01:00
Mike Frysinger 6bacfa6a8e cpu/: 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 cpus that get converted here:
	at91rm9200
	mpc512x
	mpc5xxx
	mpc8260
	mpc8xx
	ppc4xx

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: John Rigby <jrigby@freescale.com>
CC: Stefan Roese <sr@denx.de>
2009-03-20 22:39:11 +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 b6b4625d17 boards: get mac address from environment
The boards that get converted here to use the environment for the mac
address rather than global data:
	debris
	mgcoge
	mgsuvd
	muas3001
	netstal
	pn62
	sixnet
	vcma9
	xilinx (the ones that use xilinx_enet)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Sangmoon Kim <dogoil@etinsys.com>
CC: Heiko Schocher <hs@denx.de>
CC: David Mueller <d.mueller@elsoft.ch>
CC: Niklaus Giger <niklaus.giger@netstal.com>
CC: Wolfgang Grandegger <wg@denx.de>
CC: Dave Ellis <DGE@sixnetio.com>
CC: Ricardo Ribalda <ricardo.ribalda@uam.es>
2009-03-20 22:39:10 +01:00
Mike Frysinger 06a0c4381a AmigaOneG3SE/enet: get mac address from environment
Always use the MAC address that is stored in the environment first before
falling back to the ROM.  This also cuts out any comparison steps: if the
mac in the env is sane, the ROM is never consulted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Thomas Frieden <ThomasF@hyperion-entertainment.com>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 56b555a644 nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr()
Since the ethernet layer handles updating of device addresses itself from
the environment, there is no point in calling eth_set_enetaddr().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 5013533467 lynxkdi: get mac address from environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 62c93d92f1 bootvx: get mac address from environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Niklaus Giger <niklaus.giger@member.fsf.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger de2dff6ff8 bdinfo: get mac address from environment
Add a new print_eth() function to automate the eth*addr env var acquisition
and display.  Affects all arches.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Michal Simek <monstr@seznam.cz>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 95823ca077 net: get mac address from environment and use eth util funcs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +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
Mike Frysinger 6ff4137f2a doc/README.enetaddr: document proper MAC usage
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +01:00
Mike Frysinger 3f6e6993e9 net: new utility functions for working with enetaddr's
Declare new utility functions for converting between the environment
variables (eth*addr) and the binary MAC address representation.  This way
we can unify all the random places that already do this kind of thing.

The functions in question:
	eth_parse_enetaddr - "..." -> {...}
	eth_getenv_enetaddr - env -> {...}
	eth_setenv_enetaddr - {...} -> env

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +01:00
Mike Frysinger b6446b6775 convert print_IPaddr() to %pI4
Now that our printf functions support the %pI4 modifier like the kernel,
let's drop the inflexible print_IPaddr() function and covert over to the
%pI4 modifier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +01:00
Mike Frysinger 6c6166f529 vsprintf: pull updates from Linux kernel
This brings in support for the %p modifier which allows us to easily print
out things like ip addresses, mac addresses, and pointers.

It also converts the rarely used 'q' length modifier to the common 'L'
modifier when dealing with quad types.

While this new code is a bit larger (~1k .text), most of it should be made
up by converting the existing ip/mac address code to use format modifiers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-20 22:39:09 +01:00
Jon Smirl a43ea5cc6d .gitignore for generated files in api_examples directory
Add .gitignore for generated files in api_examples directory

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-03-20 22:37:38 +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
Anatolij Gustschin f8853d105d ppc4xx: Fix bug in PCI outbound map configuration for canyonlands
PCI outbound address map configuration doesn't match the
PCI memory address range covered by appropriate TLB entry
configuration for canyonlands causing machine check
exceptions while accessing PCI memory regions. This patch
provides a fix for this issue.

Kazuaki Ichinohe observed and reported this issue while
testing display output with PCI ATI video card on canyonlands.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 12:58:31 +01:00
Richard Retanubun 7a88601a34 CFI: geometry reversal for STMicro M29W320DT
Follow up to the flash_fixup_stm to fix geometry reversal
on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-19 15:00:32 +01:00
Mike Frysinger 069f4364d8 smc911x_eeprom: update register API
The smc911x driver changed the naming convention for its register funcs,
so update the eeprom code accordingly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-19 00:02:57 +01:00