summaryrefslogtreecommitdiff
path: root/lib_ppc
AgeCommit message (Collapse)Author
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>
2008-08-11POWERPC: Add synchronization to write_bat in lib_ppc/bat_rw.cBecky Bruce
Perform sync/isync as required by the architecture. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-by: Jon Loeliger <jdl@freescale.com>
2008-07-14Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-10Fix some more print() format errors.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-10Fix LMB type issuesAndy Fleming
The LMB code now uses phys_addr_t and phys_size_t. Also, there were a couple of casting problems in the bootm code that called the LMB functions. Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-07-10Fix compiler warningsKumar Gala
gcc-4.3.x generates the following: bootm.c: In function 'do_bootm_linux': bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different size Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-09Fix printf errors.Andrew Klossner
The compiler will help find mismatches between printf formats and arguments if you let it. This patch adds the necessary attributes to declarations in include/common.h, then begins to correct the resulting compiler warnings. Some of these were bugs, e.g., "$d" instead of "%d" and incorrect arguments. Others were just annoying, like int-long mismatches on a system where both are 32 bits. It's worth fixing the annoying errors to catch the real ones. Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
2008-07-06ppc4xx: Rename CONFIG_XILINX_ML300 to CONFIG_XILINX_405Michal Simek
This change helps with better handling with others Xilinx based platform. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stefan Roese <sr@denx.de>
2008-07-03lmb: fix "implicit declaration of function 'lmb_free'" warningWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-01Move conditional compilation of MPC8XXX SPI driver to MakefileBen Warren
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-06-28Resize device tree to allow space for board changes and the chosen nodeAndy Fleming
Current code requires that a compiled device tree have space added to the end to leave room for extra nodes added by board code (and the chosen node). This requires that device tree creators anticipate how much space U-Boot will add to the tree, which is absurd. Ideally, the code would resize and/or relocate the tree when it needed more space, but this would require a systemic change to the fdt code, which is non-trivial. Instead, we resize the tree inside boot_relocate_fdt, reserving either the remainder of the bootmap (in the case where the fdt is inside the bootmap), or adding CFG_FDT_PAD bytes to the size. Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-06-12Change lmb to use phys_size_t/phys_addr_tBecky Bruce
This updates the lmb code to use phys_size_t and phys_addr_t instead of unsigned long. Other code which interacts with this code, like getenv_bootm_size() is also updated. Booted on MPC8641HPCN, build-tested ppc, arm, mips. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-11Merge branch 'master' of git://www.denx.de/git/u-boot-fdtWolfgang Denk
2008-06-11FSL LAW: Keep track of LAW allocationsKumar Gala
Make it so we keep track of which LAWs have allocated and provide a function (set_next_law) which can allocate a LAW for us if one is free. In the future we will move to doing more "dynamic" LAW allocation since the majority of users dont really care about what LAW number they are at. Also, add CONFIG_MPC8540 or CONFIG_MPC8560 to those boards which needed them Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-06-10fdt: unshadow global working fdt variableKim Phillips
differentiate with local variables of the same name by renaming the global 'fdt' variable 'working_fdt'. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-06-03Avoid initrd and logbuffer area overlapsMarian Balakowicz
Add logbuffer to reserved LMB areas to prevent initrd allocation from overlaping with it. Make sure to use correct logbuffer base address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-06-03PPC: Add print_bats() to lib_ppc/bat_rw.cBecky Bruce
This function prints the values of all the BAT register pairs - I needed this for debug earlier this week; adding it to lib_ppc so others can use it (and add it to reginfo commands if so desired). Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-03PPC: Change lib_ppc/bat_rw.c to use high batsBecky Bruce
Currently, this code only deals with BATs 0-3, which makes it useless on systems that support BATs 4-7. Add the support for these registers. Signed-off-by: Becky Bruce <Becky.bruce@freescale.com>
2008-05-28Remove prototypes of nand_init() in favor of including nand.h.Scott Wood
Likewise with onenand_init(). Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-05-21Big white-space cleanup.Wolfgang Denk
This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-12Revert "Avoid initrd and logbuffer area overlaps"Wolfgang Denk
This reverts commit 1b5605ca57fbb364f4d78eeee28b974ed875e888 which breaks building on all PPC boards that don't use a log buffer.
2008-05-10Support legacy multi-type images without FDT section.Nick Spence
This patch enables legacy multi-type images containing only a Linux kernel and root file system to be loaded, maintaining compatibility with previous versions of u-boot. This is required when using old image files such as a Linux 2.4 kernel / filesystem. Signed-off-by: Nick Spence <nick.spence@freescale.com> Acked-by: Bartlomiej Sieka <tur@semihalf.com>
2008-05-10Avoid initrd and logbuffer area overlapsMarian Balakowicz
Add logbuffer to reserved LMB areas to prevent initrd allocation from overlaping with it. Make sure to use correct logbuffer base address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10ppc: Cleanup get_effective_memsize() useMarian Balakowicz
Removed duplicated effective memory size calculation code. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-04-29ppc flush_cache: add watch-dog triggering into the loops.Yuri Tikhonov
Some boards (e.g. lwmon5) need rather a frequent watch-dog kicking. Since the time it takes for the flush_cache() function to complete its job depends on the size of data being flushed, one may encounter watch-dog resets on such boards when, for example, download big files over ethernet. Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-25lib_ppc: Revert "Make MPC83xx one step closer to full relocation."Kim Phillips
This reverts commit 70431e8a7393b6b793f77957f95b999fc9a269b8 which has proven problematic getting right from the start at least on 83xx and 4xx. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-04-17Restore the ability to continue booting after legacy image overwriteMarian Balakowicz
Before new uImage code was merged, bootm code allowed for the kernel image to get overwritten during decompresion. new uImage introduced a check for image overwrites and refused to boot the image that got overwritten. This patch restores the old behavior. It also adds a warning when the image overwriten is a multi-image file, because in such case accessing componentes other than the first one will fail. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-04-17ppc: Fix ftd_blob variable init when processing raw blobMarian Balakowicz
Set fdt_blob variable before its value is printed out. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-04-09ppc: Revert patch 70431e8a that used _start instead of CFG_MONITOR_BASEStefan Roese
The patch 70431e8a7393b6b793f77957f95b999fc9a269b8 (Make MPC83xx one step closer to full relocation.) doesn't use CFG_MONITOR_BASE anymore. But on 4xx systems _start currently cannot be used for this calculation. So revert back to the original version for now. Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-08Merge branch 'master' of git://www.denx.de/git/u-boot-fdtWolfgang Denk
2008-04-07Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xxWolfgang Denk
Conflicts: lib_ppc/board.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-01remove remaining CONFIG_OF_HAS_{UBOOT_ENV,BD_T} codeKim Phillips
finish off what commit 43ddd9c820fec44816188f53346b464e20b3142d, "Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_T" started. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-28Make MPC83xx one step closer to full relocation.Joakim Tjernlund
Remove a few absolute references to CFG_MONITOR_BASE for ppc/mpc83xx and use GOT relative reference. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-28mpc8323erdb: fix EEPROM page size and get MAC from EEPROMMichael Barkowski
This patch fixes eeprom page size so that you can now write more than 64 bytes at a time. It also makes the board take MAC addresses, if found, from EEPROM. User should place up to 4 addresses at offset 0x7f00, for eth{,1,2,3}addr. Any unused addresses should be zero. This group of four six-byte values should have it's CRC at the end. crc32 and eeprom commands can be used to accomplish this. If CRC fails, MAC addresses come from the environment. If CRC succeeds, the environment is overwritten at startup. Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-27ppc: Set CFG_MEM_TOP_HIDE to 0 if not already definedStefan Roese
Signed-off-by: Stefan Roese <sr@denx.de>