aboutsummaryrefslogtreecommitdiff
path: root/lib_ppc
AgeCommit message (Collapse)Author
2009-06-1283xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xxPeter Tyser
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-12make MODEM SUPPORT generic instead of duplicate itJean-Christophe PLAGNIOL-VILLARD
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-12lib_arch/board.c: Move malloc initialization before flash_init()Stefan Roese
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-04-05Update CHANGELOG, coding style cleanup.Wolfgang Denk
2009-04-04rename include/zlib.h to include/u-boot/zlib.hJean-Christophe PLAGNIOL-VILLARD
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-0185xx/86xx: Ensure MP boot page is not usedKumar Gala
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-03-20powerpc: Only use eth_getenv_enetaddr() if networking is enabledStefan Roese
Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20powerpc: Fix compilation warning in board.cStefan Roese
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-20ppc: mark global bi_enet*addr as legacyMike Frysinger
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-20boards: get mac address from env and move load_sernum_ethaddr() to board initMike Frysinger
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-20boards: move board_get_enetaddr() into board-specific initMike Frysinger
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-20nx823: get mac address from environmentMike Frysinger
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-188xx, icache: enabling ICache not before running from RAMHeiko Schocher
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-02i2c, dtt: move dtt_init () to board_init_r ()Heiko Schocher
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-02-16Add MMC FrameworkAndy Fleming
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-10ppc: Fix roll over bug in flush_cache()Kumar Gala
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-10ppc: Move CONFIG_MAX_MEM_MAPPED to common config.hKumar Gala
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-10mpc86xx: Add support to populate addr map based on BATsBecky Bruce
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-01-27SATA: do not auto-initialize during bootMike Frysinger
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>
2008-12-1985xx: Add support to populate addr map based on TLB settingsKumar Gala
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-15lib_ppc: rework the flush_cacheDave Liu
- 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-11-10lib_ppc: Move trap_init to occur earlierBecky Bruce
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-02ppc: Fix compile warnings when !CONFIG_OF_LIBFDTPeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-11-02Coding Style cleanup, update CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-29bootm: support subcommands in linux ppc bootmKumar Gala
Add support for 'bdt', 'cmdline', 'prep' to the linux PPC bootm. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29bootm: Add subcommandsKumar Gala
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-18Added arch_lmb_reserve to allow arch specific memory regions protectionKumar Gala
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-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18Adds two more ethernet interface to 83xxrichardretanubun
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-15Fix compiler warning in lib_ppc/board.cHeiko Schocher
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-14Do not init SATA when disabled on 8536DS.Jason Jin
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-01fdt: Overwrite /chosen node in bootm if it already exists in the dtbStefan Roese
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-09-13powerpc: Fix bootm to boot up again with a RamdiskHeiko Schocher
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-10rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_NOWHERE in CONFIG_ENV_IS_NOWHEREJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_IN_NVRAM in CONFIG_ENV_IS_IN_NVRAMJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROMJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10cmd_mac: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM start in commit ad8f8687b78c3e917b173f038926695383c55555 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09lib_ppc/interrupts.c: make board_show_activity() a weak functionWolfgang Denk
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-08-26bootm: refactor do_reset and os boot function argsKumar Gala
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-26fdt: refactor initrd related codeKumar Gala
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-26fdt: refactor fdt resize codeKumar Gala
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-26bootm: move lmb into the bootm_headers_t structureKumar Gala
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-26bootm: refactor fdt locating and relocation codeKumar Gala
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-26bootm: refactor ramdisk locating codeKumar Gala
Move determing if we have a ramdisk and where its located into the common code. Keep track of the ramdisk start and end in the bootm_headers_t image struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26bootm: refactor entry point codeKumar Gala
Move entry point code out of each arch and into common code. Keep the entry point in the bootm_headers_t images struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21Consolidate strmhz() implementationHaavard Skinnemoen
ARM, i386, m68k and ppc all have identical implementations of strmhz(). Other architectures don't provide this function at all. This patch moves strmhz() into lib_generic, reducing code duplication and providing a more unified API across architectures. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-19Update linux bootm to support ePAPR client interfaceKumar Gala
The ePAPR spec has some subtle differences from the current device tree based boot interface to the powerpc linux kernel. The powerpc linux kernel currently ignores the differences that ePAPR specifies. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-12NAND boot: MPC8313ERDB supportScott Wood
Note that with older board revisions, NAND boot may only work after a power-on reset, and not after a warm reset. I don't have a newer board to test on; if you have a board with a 33MHz crystal, please let me know if it works after a warm reset. Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12Fix fallout from autostart revertKumar Gala
The autostart revert caused a bit of duplicated code as well as code that was using images->autostart that needs to get removed so we can build again. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>