summaryrefslogtreecommitdiff
path: root/lib_ppc
Commit message (Collapse)AuthorAgeLines
* Fix some more print() format errors.Wolfgang Denk2008-07-10-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix LMB type issuesAndy Fleming2008-07-10-1/+2
| | | | | | | 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>
* Fix compiler warningsKumar Gala2008-07-10-2/+2
| | | | | | | | | | 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>
* Fix printf errors.Andrew Klossner2008-07-09-4/+4
| | | | | | | | | | | | 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>
* ppc4xx: Rename CONFIG_XILINX_ML300 to CONFIG_XILINX_405Michal Simek2008-07-06-1/+1
| | | | | | | | 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>
* lmb: fix "implicit declaration of function 'lmb_free'" warningWolfgang Denk2008-07-03-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Move conditional compilation of MPC8XXX SPI driver to MakefileBen Warren2008-07-01-2/+0
| | | | Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Resize device tree to allow space for board changes and the chosen nodeAndy Fleming2008-06-28-8/+58
| | | | | | | | | | | | | 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>
* Change lmb to use phys_size_t/phys_addr_tBecky Bruce2008-06-12-7/+9
| | | | | | | | | | | 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>
* Merge branch 'master' of git://www.denx.de/git/u-boot-fdtWolfgang Denk2008-06-11-1/+1
|\
| * fdt: unshadow global working fdt variableKim Phillips2008-06-10-1/+1
| | | | | | | | | | | | | | 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>
* | FSL LAW: Keep track of LAW allocationsKumar Gala2008-06-11-1/+2
|/ | | | | | | | | | | | | | | 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>
* Avoid initrd and logbuffer area overlapsMarian Balakowicz2008-06-03-0/+7
| | | | | | | | | 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>
* PPC: Add print_bats() to lib_ppc/bat_rw.cBecky Bruce2008-06-03-0/+41
| | | | | | | | | 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>
* PPC: Change lib_ppc/bat_rw.c to use high batsBecky Bruce2008-06-03-40/+92
| | | | | | | | 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>
* Remove prototypes of nand_init() in favor of including nand.h.Scott Wood2008-05-28-3/+1
| | | | | | Likewise with onenand_init(). Signed-off-by: Scott Wood <scottwood@freescale.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-1/+1
| | | | | | | | | | | 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>
* Revert "Avoid initrd and logbuffer area overlaps"Wolfgang Denk2008-05-12-5/+0
| | | | | This reverts commit 1b5605ca57fbb364f4d78eeee28b974ed875e888 which breaks building on all PPC boards that don't use a log buffer.
* Support legacy multi-type images without FDT section.Nick Spence2008-05-10-3/+2
| | | | | | | | | | | | 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>
* Avoid initrd and logbuffer area overlapsMarian Balakowicz2008-05-10-0/+5
| | | | | | | | | 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>
* ppc: Cleanup get_effective_memsize() useMarian Balakowicz2008-05-10-11/+0
| | | | | | Removed duplicated effective memory size calculation code. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* ppc flush_cache: add watch-dog triggering into the loops.Yuri Tikhonov2008-04-29-0/+3
| | | | | | | | | | 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>
* lib_ppc: Revert "Make MPC83xx one step closer to full relocation."Kim Phillips2008-04-25-1/+0
| | | | | | | | 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>
* Restore the ability to continue booting after legacy image overwriteMarian Balakowicz2008-04-17-2/+2
| | | | | | | | | | | 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>
* ppc: Fix ftd_blob variable init when processing raw blobMarian Balakowicz2008-04-17-1/+1
| | | | | | Set fdt_blob variable before its value is printed out. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* ppc: Revert patch 70431e8a that used _start instead of CFG_MONITOR_BASEStefan Roese2008-04-09-1/+1
| | | | | | | | | 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>
* Merge branch 'master' of git://www.denx.de/git/u-boot-fdtWolfgang Denk2008-04-08-12/+0
|\
| * remove remaining CONFIG_OF_HAS_{UBOOT_ENV,BD_T} codeKim Phillips2008-04-01-12/+0
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xxWolfgang Denk2008-04-07-2/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: lib_ppc/board.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | Make MPC83xx one step closer to full relocation.Joakim Tjernlund2008-03-28-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | mpc8323erdb: fix EEPROM page size and get MAC from EEPROMMichael Barkowski2008-03-28-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ppc: Set CFG_MEM_TOP_HIDE to 0 if not already definedStefan Roese2008-03-27-0/+4
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
* | ppc: Add CFG_MEM_TOP_HIDE option to hide memory area that doesn't get "touched"Stefan Roese2008-03-27-0/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CFG_MEM_TOP_HIDE is defined in the board config header, this specified memory area will get subtracted from the top (end) of ram and won't get "touched" at all by U-Boot. By fixing up gd->ram_size the Linux kernel should gets passed the now "corrected" memory size and won't touch it either. This should work for arch/ppc and arch/powerpc. Only Linux board ports in arch/powerpc with bootwrapper support, which recalculate the memory size from the SDRAM controller setup, will have to get fixed in Linux additionally. This patch enables this config option on some PPC440EPx boards as a workaround for the CHIP 11 errata. Here the description from the AMCC documentation: CHIP_11: End of memory range area restricted access. Category: 3 Overview: The 440EPx DDR controller does not acknowledge any transaction which is determined to be crossing over the end-of-memory-range boundary, even if the starting address is within valid memory space. Any such transaction from any PLB4 master will result in a PLB time-out on PLB4 bus. Impact: In case of such misaligned bursts, PLB4 masters will not retrieve any data at all, just the available data up to the end of memory, especially the 440 CPU. For example, if a CPU instruction required an operand located in memory within the last 7 words of memory, the DCU master would burst read 8 words to update the data cache and cross over the end-of-memory-range boundary. Such a DCU read would not be answered by the DDR controller, resulting in a PLB4 time-out and ultimately in a Machine Check interrupt. The data would be inaccessible to the CPU. Workaround: Forbid any application to access the last 256 bytes of DDR memory. For example, make your operating system believe that the last 256 bytes of DDR memory are absent. AMCC has a patch that does this, available for Linux. This patch sets CFG_MEM_TOP_HIDE for the following 440EPx boards: lwmon5, korat, sequoia The other remaining 440EPx board were intentionally not included since it is not clear to me, if they use the end of ram for some other purpose. This is unclear, since these boards have CONFIG_PRAM defined and even comments like this: PMC440.h: /* esd expects pram at end of physical memory. * So no logbuffer at the moment. */ It is strongly recommended to not use the last 256 bytes on those boards too. Patches from the board maintainers are welcome. Signed-off-by: Stefan Roese <sr@denx.de>
* ata: enable the sata initialize on boot upDave Liu2008-03-26-0/+8
| | | | Signed-off-by: Dave Liu <daveliu@freescale.com>
* Cleanup coding style, update CHANGELOGWolfgang Denk2008-03-26-4/+4
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'new-image' of git://www.denx.de/git/u-boot-testingBartlomiej Sieka2008-03-26-7/+789
|\ | | | | | | | | | | | | | | | | Conflicts: common/cmd_bootm.c cpu/mpc8xx/cpu.c Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * [new uImage] Disable debuging output in preparation for merge with masterBartlomiej Sieka2008-03-20-1/+0
| | | | | | | | Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * [new uImage] Add proper ramdisk/FDT handling when FIT configuration is usedMarian Balakowicz2008-03-12-31/+73
| | | | | | | | | | | | | | | | Save FIT configuration provied in the first bootm argument and use it when to get ramdisk/FDT subimages when second and third (ramdisk/FDT) arguments are not specified. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add new uImage format support to arch specific do_bootm_linux() ↵Marian Balakowicz2008-03-12-2/+6
| | | | | | | | | | | | | | | | | | | | | | routines This patch updates architecture specific implementations of do_bootm_linux() adding new uImage format handling for operations like get kernel entry point address, get kernel image data start address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add node offsets for FIT images listed in struct bootm_headersMarian Balakowicz2008-03-12-0/+1
| | | | | | | | | | | | | | | | This patch adds new node offset fields to struct bootm_headers and updates bootm_headers processing code to make use of them. Saved node offsets allow to avoid repeating fit_image_get_node() calls. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] ppc: Add new uImage format support to FDT handling routinesMarian Balakowicz2008-03-12-23/+151
| | | | | | | | | | | | | | | | Support for new (FIT) format uImages is added to powerpc specific boot_get_fdt() routine which now recognizes, sanity checks FIT image and is able to access data sections of the requested component image. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Remove unnecessary arguments passed to ramdisk routinesMarian Balakowicz2008-03-12-3/+2
| | | | | | | | | | | | | | boot_get_ramdisk() and image_get_ramdisk() do not need all cmdtp, flag, argc and argv arguments. Simplify routines definition. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Fix FDT blob totalsize calculation in boot_relocate_fdt()Marian Balakowicz2008-02-29-1/+1
| | | | | | | | | | | | | | Do not use global fdt blob pointer, calculate blob size from routine argument blob pointer. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz2008-02-29-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * Merge branch 'master' of git://www.denx.de/git/u-boot into new-imageMarian Balakowicz2008-02-29-3/+11
| |\
| * | [new uImage] Respect autostart setting in linux bootmKumar Gala2008-02-29-1/+4
| | | | | | | | | | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
| * | [new uImage] Provide ability to restrict region used for boot imagesKumar Gala2008-02-29-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | Allow the user to set 'bootm_low' and 'bootm_size' env vars as a way to restrict what memory range is used for bootm. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
| * | [new uImage] Use lmb for bootm allocationsKumar Gala2008-02-29-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert generic ramdisk_high(), get_boot_cmdline(), get_boot_kbd() functions over to using lmb for allocation of the ramdisk, command line and kernel bd info. Convert PPC specific fdt_relocate() to use lmb for allocation of the device tree. Provided a weak function that board code can call to do additional lmb reserves if needed. Also introduce the concept of bootmap_base to specify the offset in physical memory that the bootmap is located at. This is used for allocations of the cmdline, kernel bd, and device tree as they should be contained within bootmap_base and bootmap_base + CFG_BOOTMAPSZ. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * | [new uImage] ppc: Allow boards to specify effective amount of memoryKumar Gala2008-02-29-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | For historical reasons we limited the stack to 256M because some boards could only map that much via BATS. However newer boards are capable of mapping more memory (for example 85xx is capable of doing up to 2G). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
| * | [new uImage] rework error handling so common functions don't resetKumar Gala2008-02-29-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed image_get_ramdisk() to just return NULL on error and have get_ramdisk() propogate that error to the caller. It's left to the caller to call do_reset() if it wants to. Also moved calling do_reset() in get_fdt() and fdt_relocate() on ppc to a common location. In the future we will change get_fdt() and fdt_relocate() to return success/failure and not call do_reset() at all. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>