Commit Graph

273 Commits

Author SHA1 Message Date
Heiko Schocher 7ff66bb0be ppc: trigger WDT before starting Linux
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-08-18 21:30:34 +02:00
Kumar Gala 4c2e3da82d Update Freescale copyrights to remove "All Rights Reserved"
"All Rights Reserved" conflicts with the GPL.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
2009-07-29 09:59:22 +02:00
Wolfgang Denk 9c67352f72 Revert "ppc: Unlock cache-as-ram in a consistent manner"
This reverts commit 982adfc610.

This patch causes problems on MPC83xx boards - flash recognition stops
working.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-26 23:28:02 +02:00
Peter Tyser 982adfc610 ppc: Unlock cache-as-ram in a consistent manner
Previously, non-e500 architectures only unlocked their data cache which
was used as early RAM when booting to Linux using the "bootm" command.
This change causes all PPC boards with CONFIG_SYS_INIT_RAM_LOCK defined
to unlock their data cache during U-Boot's initialization.  This
improves U-Boot performance and provides a common cache state when
booting to different OSes.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-07-23 20:45:49 +02:00
Peter Tyser b220c64d86 Move architecture specific config.mk files into subdirs
This cleans up U-Boot's toplevel directory a bit and makes the
architecture 'config.mk' file naming and location similar to board
and cpu 'config.mk' files

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-07-21 00:12:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
So far the console API uses the following naming convention:

	======Extract======
	typedef struct device_t;

	int	device_register (device_t * dev);
	int	devices_init (void);
	int	device_deregister(char *devname);
	struct list_head* device_get_list(void);
	device_t* device_get_by_name(char* name);
	device_t* device_clone(device_t *dev);
	=======

which is too generic and confusing.

Instead of using device_XX and device_t we change this
into stdio_XX and stdio_dev

This will also allow to add later a generic device mechanism in order
to have support for multiple devices and driver instances.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 00:27:46 +02:00
Peter Tyser 0f89860494 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx
Use the standard lowercase "xx" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55e0ed6078 make MODEM SUPPORT generic instead of duplicate it
and fix comment

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Adjusted Copyright message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:47 +02:00
Stefan Roese c790b04d23 lib_arch/board.c: Move malloc initialization before flash_init()
This patch moves the malloc initialization before calling flash_init().
Upcoming changes to the NOR FLASH common CFI driver with optional
MTD infrastructure and MTD concatenation support will call malloc().
And nothing really speaks against enabling malloc just a little earlier
in the boot stage. Some architectures already enable malloc before
calling flash_init() so they don't need any changes here.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott McNutt <smcnutt@psyent.com>
Cc: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:39:47 +02:00
Wolfgang Denk c0a14aedc3 Update CHANGELOG, coding style cleanup. 2009-04-05 00:27:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD a31e091ad7 rename include/zlib.h to include/u-boot/zlib.h
Some systems have zlib.h installed in /usr/include/. This isn't the
desired file for u-boot code - we want the one in include/zlib.h.
This rename will avoid the conflict.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 15:37:54 +02:00
Kumar Gala fc39c2fd51 85xx/86xx: Ensure MP boot page is not used
We had a bug on 86xx in which the boot page used to bring up secondary
cores was being overwritten and used for the malloc region in u-boot.

We need to reserve the region of memory that the boot page is going to
be put at so nothing uses it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
2009-04-01 15:29:49 -05: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
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
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 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 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
Heiko Schocher 506f391888 8xx, icache: enabling ICache not before running from RAM
with the new CONFIG_SYS_DELAYED_ICACHE config option, ICache
is not enabled before code runs from RAM.

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-03-18 20:48:29 +01:00
Heiko Schocher 9c2d63ec0e i2c, dtt: move dtt_init () to board_init_r ()
it is not necessary to init the DTTs so early,
so move this init to board_init_r ().

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-03-02 09:21:20 +01:00
Andy Fleming 272cc70b21 Add MMC Framework
Here's a new framework (based roughly off the linux one) for managing
MMC controllers.  It handles all of the standard SD/MMC transactions,
leaving the host drivers to implement only what is necessary to
deal with their specific hardware.

This also hooks the infrastructure into the PowerPC board code
(similar to how the ethernet infrastructure now hooks in)

Some of this code was contributed by Dave Liu <daveliu@freescale.com>

Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16 18:07:41 -06:00
Kumar Gala bced7ccefa ppc: Fix roll over bug in flush_cache()
If we call flush_cache(0xfffff000, 0x1000) it would never
terminate the loop since end = 0xffffffff and we'd roll over
our counter from 0xfffffe0 to 0 (assuming a 32-byte cache line)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-10 00:47:18 +01:00
Kumar Gala 87c9063963 ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h
Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent
between the two current users (lib_ppc/board.c, 44x SPD DDR2).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
2009-02-10 00:44:13 +01:00
Becky Bruce c9315e6b4f mpc86xx: Add support to populate addr map based on BATs
If CONFIG_ADDR_MAP is enabled, update the address map
whenever we write a bat.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
2009-02-10 00:29:49 +01:00
Mike Frysinger cf7e399fb3 SATA: do not auto-initialize during boot
Rather than have the board code initialize SATA automatically during boot,
make the user manually run "sata init".  This brings the SATA subsystem in
line with common U-Boot policy.

Rather than having a dedicated weak function "is_sata_supported", people
can override sata_initialize() to do their weird board stuff.  Then they
can call the actual __sata_initialize().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-27 23:42:39 +01:00
Kumar Gala ecf5b98c7a 85xx: Add support to populate addr map based on TLB settings
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-19 18:20:08 -06:00
Dave Liu e39cd81c44 lib_ppc: rework the flush_cache
- It is possible to miss flush/invalidate the last
  cache line, we fix it at here.
- add the volatile and memory clobber.

They are pointed by Scott Wood.

Signed-off-by: Dave Liu <daveliu@freescale.com>
2008-12-15 22:31:39 +01:00
Becky Bruce d025aa4b20 lib_ppc: Move trap_init to occur earlier
Doing trap_init immediately once we're running from RAM
means we're no longer dependent on the physical location of
the flash on non-BookE platforms. Before trap_init, those
platforms switch to real mode and go to 0xfff00100 on exception.
After the switch, they go to 0x00000100  This makes it easier to
move the flash location.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:06 -06:00
Peter Tyser 0829323073 ppc: Fix compile warnings when !CONFIG_OF_LIBFDT
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-11-02 16:39:31 +01:00
Wolfgang Denk 3cbd823116 Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-11-02 16:14:22 +01:00
Kumar Gala 5a98127d81 bootm: support subcommands in linux ppc bootm
Add support for 'bdt', 'cmdline', 'prep' to the linux PPC bootm.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29 01:00:17 +01:00
Kumar Gala 49c3a861d1 bootm: Add subcommands
Add the ability to break the steps of the bootm command into several
subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go.

This allows us to do things like manipulate device trees before
they are passed to a booting kernel or setup memory for a secondary
core in multicore situations.

Not all OS types support all subcommands (currently only start, loados,
ramdisk, fdt, and go are supported).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29 00:59:50 +01:00
Kumar Gala 76da19df5b Added arch_lmb_reserve to allow arch specific memory regions protection
Each architecture has different ways of determine what regions of memory
might not be valid to get overwritten when we boot.  This provides a
hook to allow them to reserve any regions they care about.  Currently
only ppc, m68k and sparc need/use this.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-18 21:54:04 +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
richardretanubun c68a05feeb Adds two more ethernet interface to 83xx
Added as a convenience for other platforms that uses MPC8360 (has 8 UCC).
Six eth interface is chosen because the platform I am using combines
UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth.

Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18 21:54:00 +02:00
Heiko Schocher 374b903829 Fix compiler warning in lib_ppc/board.c
Fix compiler warning introduced by commit 0f8cbc18

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-15 10:38:14 +02:00
Jason Jin 0f8cbc1829 Do not init SATA when disabled on 8536DS.
SGMII and SATA share the serdes on MPC8536 CPU, When SATA disabled and the
driver still try to access the SATA registers, the cpu will hangup.
This patch try to fix this by reading the serdes status before the SATA
initialize.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-14 17:57:27 +02:00
Stefan Roese 3e38577208 fdt: Overwrite /chosen node in bootm if it already exists in the dtb
Set force parameter in fdt_chosen() call in do_bootm_linux() call.
Without this, the chosen node is not overwritten if it already
exists.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-10-01 22:01:52 -04:00
Heiko Schocher 56844a22b7 powerpc: Fix bootm to boot up again with a Ramdisk
Commit 2a1a2cb6 didnt remove the dummy mem reservation in fdt_chosen,
and this stopped Linux from booting with a Ramdisk. This patch fixes
this, by deleting the useless dummy mem reservation.

When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD is now
added to of_size, so we dont need anymore a dummy mem reservation.

I measured the value of FDT_RAMDISK_OVERHEAD on a MPC8270 based
system (=0x44 bytes) and rounded it up to 0x80).

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-13 02:03:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0e8d158664 rename CFG_ENV macros to CONFIG_ENV
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 93f6d72544 rename CFG_ENV_IS_NOWHERE in CONFIG_ENV_IS_NOWHERE
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9314cee691 rename CFG_ENV_IS_IN_NVRAM in CONFIG_ENV_IS_IN_NVRAM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD bb1f8b4f8b rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32628c5008 cmd_mac: Move conditional compilation to Makefile
finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM
start in commit ad8f8687b7

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Wolfgang Denk aab2bf0202 lib_ppc/interrupts.c: make board_show_activity() a weak function
This allows to use show_activity() without having to
define an empty board_show_activity() function.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-09 10:08:02 +02:00
Kumar Gala 40d7e99d37 bootm: refactor do_reset and os boot function args
There is no need for each OS specific function to call do_reset() we
can just do it once in bootm. This means its feasible on an error for
the OS boot function to return.

Also, remove passing in cmd_tbl_t as its not needed by the OS boot
functions.  flag isn't currently used but might be in the future so
we left it alone.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:48:01 +02:00
Kumar Gala 2a1a2cb6e2 fdt: refactor initrd related code
Created a new fdt_initrd() to deal with setting the initrd properties
in the device tree and fixing up the mem reserve.  We can use this
both in the choosen node handling and lets us remove some duplicated
code when we fixup the initrd info in bootm on PPC.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:20 +02:00
Kumar Gala 3082d2348c fdt: refactor fdt resize code
Move the fdt resizing code out of ppc specific boot code and into
common fdt support code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:43:36 +02:00
Kumar Gala e906cfae08 bootm: move lmb into the bootm_headers_t structure
To allow for persistent state between future bootm subcommands we
need the lmb to exist in a global state.
Moving it into the bootm_headers_t allows us to do that.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:38:48 +02:00
Kumar Gala 06a09918f3 bootm: refactor fdt locating and relocation code
Move the code that handles finding a device tree blob and relocating
it (if needed) into common code so all arch's have access to it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:12 +02:00