summaryrefslogtreecommitdiff
path: root/arch/powerpc
Commit message (Collapse)AuthorAgeLines
* 74xx_7xx/mpc86xx/ppmc7xx: Fix do_reset() declarationPeter Tyser2010-12-17-5/+10
| | | | | | | | | | | | | | | | | The following commit: commit 882b7d726febe65579d6502c271412ecb05821d7 Author: Mike Frysinger <vapier@gentoo.org> Date: Wed Oct 20 03:41:17 2010 -0400 do_reset: unify duplicate prototypes missed the 74xx_7xx and mpc86xx arches and the ppmc7xx board do_reset() functions which resulted in build errors such as: cpu.c:128: error: conflicting types for 'do_reset' include/command.h:102: error: previous declaration of 'do_reset' was here Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* PowerPC: Add relocation support for -fpicJoakim Tjernlund2010-12-17-22/+33
| | | | | | | | | By rearranging the linker script we get support for relocation of -fpic for free. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Scott Wood <scottwood@freescale.com> Acked-by: Kim Phillips <kim.phillips@freescale.com>
* xilinx-ppc4xx-generic: Use common u-boot.ldsRicardo Ribalda Delgado2010-12-17-1/+9
| | | | | | | Use common ppc4xx linker script for xilinx ppc440 and ppc405 related boards. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Clarify comment about boot chip-select in start.SStefan Roese2010-12-17-12/+14
| | | | | | | Ths old comment was quite screwed up. Replace it with a new version that should be a bit more descriptive. Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of ../master into nextWolfgang Denk2010-12-16-7/+26
|\
| * mpc83xx: fix pcie enumerationBaidu Boy2010-12-13-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch fix a problem for the pcie enumeration for mpc83xx cpus. Without this we will not get correct value in hose->regions[...]. The pointer *reg in function mpc83xx_pcie_init_bus() shall not be changed. Because we will use this pointer as a parameter to call function mpc83xx_pcie_register_hose(). Signed-off-by: Baidu Boy <liucai.lfn@gmail.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not definedHaiying Wang2010-12-01-1/+1
| | | | | | | | | | | | | | | | This fixes the compiling error for the board which doesn't have NOR flash (so CONFIG_FLASH_BASE is not defined) Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/85xx: Introduce CONFIG_SYS_EXTRA_ENV_RELOCKumar Gala2010-11-30-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems need to relocate the env_addr pointer early because the location it points to will get invalidated before env_relocate is called. One example is on systems that might use a L2 or L3 cache in SRAM mode and initialize that cache from SRAM mode back to being a cache in cpu_init_r. We set this on the 85xx boards that have support for NAND, SPI, or SDHC/MMC boot support as they use a secondary cache in SRAM mode and need the env_addr pointer relocated since we change from SRAM to normal cache mode in cpu_init_r. Also removed CONFIG_SYS_SPL as its not used anywhere. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * mpc83xx: Make it boot againJoakim Tjernlund2010-11-30-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | After the removal of COLD/WARM start flags my mpc8321 board didn't boot anymore. Trial and error suggests that map/remap_flash_by_xxx needs to wait after updating LBLAWAR1 to make sure the the change has reached the HW before continuing with the code that depends on it. Final fix suggested by Scott Wood. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* | do_reset: unify duplicate prototypesMike Frysinger2010-11-28-3/+1
|/ | | | | | | The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ppc4xx: Flush complete dcache in relocate_code()Stefan Roese2010-11-28-6/+7
| | | | | | | | | When the cache is enabled in SDRAM we need to flush not only the global data area but also the bd_info struct in relocate_code. This patch now flushed the complete dcache (all dcache lines) via flush_dcache() instead of adding a flush_dcache_range() call for bd_info since this is faster. Signed-off-by: Stefan Roese <sr@denx.de>
* powerpc: cmd_ecctest: Use return value of cmd_usageThomas Weber2010-11-27-4/+2
| | | | | | | | Use the return value of cmd_usage instead of ignoring this and returning a 1. Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* 74xx_7xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-0/+91
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 8260: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-45/+11
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 824x: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-43/+10
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 8220: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-45/+11
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 5xxx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-102/+43
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 512x: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-44/+10
| | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Timur Tabi <timur@freescale.com> Acked-by: Stefan Roese <sr@denx.de>
* 5xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-53/+16
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 8xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-6/+6
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* 86xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-36/+6
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Acked-by: Stefan Roese <sr@denx.de>
* 83xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-43/+10
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Haiying Wang <r54964@freescale.com>
* ppc4xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk2010-11-27-43/+10
| | | | | | | | | | | | | | | | | This commit adapts 4xx boards for partial linking with --gc-sections. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Tirumala Marri <tmarri@apm.com> Cc: David Updegraff <dave@cray.com> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Larry Johnson <lrj@acm.org> Cc: Peter De Schrijver <p2@mind.be> Cc: Niklaus Giger <niklaus.giger@netstal.com> Cc: Daniel Poirot <dan.poirot@windriver.com> Acked-by: Stefan Roese <sr@denx.de>
* POWERPC: enable --gc-sections and -ffunction-sections -fdata-sectionsWolfgang Denk2010-11-27-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries. The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -fdata-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM). Unfortunately, this requires changes to a lot of linker scripts. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Cc: Kumar Gala <galak@kernel.crashing.org> Acked-by: Stefan Roese <sr@denx.de>
* arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings workWolfgang Denk2010-11-26-50/+20
| | | | | | | | | | | | | | | | | | | | | | | | | As we try to get rid of board specific config.mk files we must provide a way for board specific settings of the LDSCRIPT variable (path to the linker script) where needed. We now implement the following hierarchy: - Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board config file. - If CONFIG_SYS_LDCONFIG is not set, and the system is booting from NAND (CONFIG_NAND_SPL is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets used. - If we are not booting from NAND, we test if a processor specific linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we use that. - As default, arch/powerpc/config.mk gets used. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Kumar Gala <kumar.gala@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Acked-by: Stefan Roese <sr@denx.de>
* cpu/ppc4xx/Makefile: build only needed object filesWolfgang Denk2010-11-26-22/+10
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* WINBOND_83C553: enable only on boards that actually use it.Wolfgang Denk2010-11-26-1/+1
| | | | | | | | | | | | | | | | | | | | So far, only the BAB7xx board would call the initialise_w83c553f() function for the WINBOND 83C553 chip, even though some other boards (HIDDEN_DRAGON, Sandpoint8240, Sandpoint8245) enabled it in their board configuration. These boards were also missing other config settings needed for that, which resulted in build errors like this: drivers/pci/libpci.o:(.got2+0x84): undefined reference to `ide_bus_offset' Switch arch/powerpc/lib/board.c to call initialise_w83c553f() not on a per-board base, but when a WINBOND_83C553 in enabled in a configuration (like BAB7xx), and disable it in the boards that had this set so far. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Yusdi Santoso <yusdi_santoso@adaptec.com> Cc: Jim Thompson <jim@musenki.com> Acked-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cWolfgang Denk2010-11-19-0/+43
|\
| * i2c, mpc5xxx: add multibus supportHeiko Schocher2010-11-17-0/+43
| | | | | | | | | | | | Tested on upcoming hydra (mpc5200 based) board. Signed-off-by: Heiko Schocher <hs@denx.de>
* | Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-30/+30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* PowerPC: Don't destroy fixup table while doing fixupsJoakim Tjernlund2010-11-14-12/+12
| | | | | | | | | The fixup procedure just stored a constant value in the fixup table rather than just adjusting the table. Although that doesn't seem to do any harm, it prevents relocation more that once. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* powerpc/85xx: rename CONFIG_SYS_TEXT_BASE to CONFIG_SYS_MONITOR_BASEHaiying Wang2010-11-11-9/+9
| | | | | | | | | Use CONFIG_SYS_MONITOR_BASE instead of CONFIG_SYS_TEXT_BASE in early init code so we can share the same code with NAND or NOR boot and not have additional ifdefs in here. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: Fix lds for nand buildHaiying Wang2010-11-11-46/+15
| | | | | | | | | | | | Fix u-boot-nand.lds and u-boot-nand_spl.lds according to: Author: Peter Tyser <ptyser@xes-inc.com> Date: Wed Sep 29 14:05:56 2010 -0500 commit fbe53f59bd40b3b1ab66dc98859e26589d64d1b7 85xx: Use gc-sections to reduce image size Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-29-3/+0
| | | | | | | | | | | By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated valueWolfgang Denk2010-10-26-2/+15
| | | | | | | | | | | | | | | | | | CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not being able to use "sizeof(struct global_data)" in assembler files. Recent experience has shown that manual synchronization is not reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into GENERATED_GBL_DATA_SIZE which gets automatically generated by the asm-offsets tool. In the result, all definitions of this value can be deleted from the board config files. We have to make sure that all files that reference such data include the new <asm-offsets.h> file. No other changes have been done yet, but it is obvious that similar changes / simplifications can be done for other, related macro definitions as well. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* Rename CONFIG_SYS_INIT_RAM_END into CONFIG_SYS_INIT_RAM_SIZEWolfgang Denk2010-10-26-17/+17
| | | | | | | | | | | | | | | | | | CONFIG_SYS_INIT_RAM_END was a misnomer as it suggests this might be some end address; to make the meaning more clear we rename it into CONFIG_SYS_INIT_RAM_SIZE No other code changes are performed in this patch, only minor editing of white space (due to the changed length) and the comments was done, where noticed. Note that the code for the PATI and cmi_mpc5xx board configurations looks seriously broken. Last known maintainers on Cc: Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Denis Peter <d.peter@mpl.ch> Cc: Martin Winistoerfer <martinwinistoerfer@gmx.ch> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* MPC8315ERD: fix build errorWolfgang Denk2010-10-24-1/+1
| | | | | | | | | | | | | | | | | Commit 29c6fbe "MPC5121: Add USB EHCI support" renamed CONFIG_SYS_MPC8xxx_USB_ADDR into CONFIG_SYS_FSL_USB_ADDR but missed to update arch/powerpc/cpu/mpc83xx/cpu_init.c, resulting in: cpu_init.c: In function 'cpu_init_f': cpu_init.c:332: error: 'CONFIG_SYS_MPC8xxx_USB_ADDR' undeclared (first use in this function) cpu_init.c:332: error: (Each undeclared identifier is reported only once cpu_init.c:332: error: for each function it appears in.) make[1]: *** [/work/wd/tmp-ppc/arch/powerpc/cpu/mpc83xx/cpu_init.o] Error 1 Fix this. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com>
* ppc: Don't initialize write protected NOR flashesJohn Schmoller2010-10-20-1/+15
| | | | | | | | | | | | If a NOR flash is write protected it can not be initialized/detected so add the ability for boards to skip NOR initialization on bootup. A board can skip NOR initialization by implementing the board_flash_wp_on() function. Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> CC: sr@denx.de Acked-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk2010-10-20-21/+5
|\
| * ppc4xx: Change tsr/tcr macros to upper caseStefan Roese2010-10-20-21/+5
| | | | | | | | | | | | Remove uneccessary functions to access the TCR/TSR registers as well. Signed-off-by: Stefan Roese <sr@denx.de>
* | 85xx: Use gc-sections to reduce image sizePeter Tyser2010-10-20-42/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On an XPedite5370 over 11KBytes were saved: Before: text data bss dec hex filename 332456 33364 33476 399296 617c0 ./u-boot After: text data bss dec hex filename 321075 33836 33476 388387 5ed23 ./u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | 86xx: Use gc-sections to reduce image sizePeter Tyser2010-10-20-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On an XPedite5170 over 11KBytes were saved: Before: text data bss dec hex filename 319488 28700 33204 381392 5d1d0 ./u-boot After: text data bss dec hex filename 307663 29144 33204 370011 5a55b ./u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | 86xx: Create common linker scriptKumar Gala2010-10-20-0/+135
| | | | | | | | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | mpc8640: Update the io_sel fields for PCI ExpressPeter Tyser2010-10-20-1/+4
| | | | | | | | | | | | | | | | Previously io_sel=0xe incorrect stated PCIE1 was enabled. Also add support for the mpc8640's PCIE2 interface. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | 85xx: Add support for not releasing secondary cores via 'mp_holdoff'Aaron Sierra2010-10-20-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Some OSes require that secondary cores not be initialized when they are booted (eg VxWorks). By default when U-Boot is compiled with the CONFIG_MP option all secondary cores are brought out of reset and held in spinloops. Setting the "mp_holdoff" environment variable to 'yes' or '1' will cause U-Boot to leave secondary cores in their default state. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Disable unused chip-select for DDR controller interleavingYork Sun2010-10-20-3/+14
| | | | | | | | | | | | | | | | When DDR controller interleaving is eabled and less than all bank (chip-select) interleaving is seletected, the unused chip-select should be disabled. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Adding fixed sdram setting for cornet_ds boardYork Sun2010-10-20-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 800, 900, 1000, 1200MT/s data rate parameters are added for fixed sdram setting. SPD based parameters and fixed parameters can be toggled by hwconfig. To use fixed parameters, hwconfig=fsl_ddr:sdram=fixed To use SPD parameters, hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1 Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Add memory test feature for mpc85xx POST.York Sun2010-10-20-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory test is performed after DDR initialization when U-boot stills runs in flash and cache. On recent mpc85xx platforms, the total memory can be more than 2GB. To cover whole memory, it needs be mapped 2GB at a time using a sliding TLB window. After the testing, DDR is remapped with up to 2GB memory from the lowest address as normal. If memory test fails, DDR DIMM SPD and DDR controller registers are dumped for further debugging. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Adding more control to physical address mappingYork Sun2010-10-20-6/+10
| | | | | | | | | | | | | | | | A worker function setup_ddr_tlbs_phys() is introduced to implement more control on physical address mapping. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | powerpc/8xxx: Add fdt_fixup_phy_connection helperKumar Gala2010-10-20-0/+26
| | | | | | | | | | | | | | Add a common helper that will set the PHY connection type based on enum. We use this on eTSEC, UCC, and will with Fman in the future. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>