aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)Author
2010-11-278xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2010-11-2786xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Acked-by: Stefan Roese <sr@denx.de>
2010-11-2783xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Haiying Wang <r54964@freescale.com>
2010-11-27ppc4xx: Cleanup for partial linking and --gc-sectionsWolfgang Denk
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>
2010-11-27POWERPC: enable --gc-sections and -ffunction-sections -fdata-sectionsWolfgang Denk
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>
2010-11-26arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings workWolfgang Denk
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>
2010-11-26cpu/ppc4xx/Makefile: build only needed object filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2010-11-26WINBOND_83C553: enable only on boards that actually use it.Wolfgang Denk
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>
2010-11-19Merge branch 'master' of git://git.denx.de/u-boot-i2cWolfgang Denk
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
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>
2010-11-17i2c, mpc5xxx: add multibus supportHeiko Schocher
Tested on upcoming hydra (mpc5200 based) board. Signed-off-by: Heiko Schocher <hs@denx.de>
2010-11-14PowerPC: Don't destroy fixup table while doing fixupsJoakim Tjernlund
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>
2010-11-11powerpc/85xx: rename CONFIG_SYS_TEXT_BASE to CONFIG_SYS_MONITOR_BASEHaiying Wang
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>
2010-11-11powerpc/85xx: Fix lds for nand buildHaiying Wang
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>
2010-10-29Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk
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>
2010-10-26Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated valueWolfgang Denk
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>
2010-10-26Rename CONFIG_SYS_INIT_RAM_END into CONFIG_SYS_INIT_RAM_SIZEWolfgang Denk
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>
2010-10-24MPC8315ERD: fix build errorWolfgang Denk
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>
2010-10-20ppc: Don't initialize write protected NOR flashesJohn Schmoller
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>
2010-10-20Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk
2010-10-20ppc4xx: Change tsr/tcr macros to upper caseStefan Roese
Remove uneccessary functions to access the TCR/TSR registers as well. Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-2085xx: Use gc-sections to reduce image sizePeter Tyser
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>
2010-10-2086xx: Use gc-sections to reduce image sizePeter Tyser
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>
2010-10-2086xx: Create common linker scriptKumar Gala
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20mpc8640: Update the io_sel fields for PCI ExpressPeter Tyser
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>
2010-10-2085xx: Add support for not releasing secondary cores via 'mp_holdoff'Aaron Sierra
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>
2010-10-20Disable unused chip-select for DDR controller interleavingYork Sun
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>
2010-10-20Adding fixed sdram setting for cornet_ds boardYork Sun
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>
2010-10-20Add memory test feature for mpc85xx POST.York Sun
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>
2010-10-20Adding more control to physical address mappingYork Sun
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>
2010-10-20powerpc/8xxx: Add fdt_fixup_phy_connection helperKumar Gala
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>
2010-10-20powerpc/fsl: Introduce common enum for PHY typesKumar Gala
Have a common enum for phy types that we use in the UCC driver. We will also use this enum for dealing with phy connection fixup in the device tree. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-18boot: change some arch ifdefs to feature ifdefsJohn Rigby
The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd are currently enabled by various combinations of CONFIG_M68K, CONFIG_POWERPC and CONFIG_SPARC. Use CONFIG_SYS_BOOT_<FEATURE> defines instead. CONFIG_SYS_BOOT_RAMDISK_HIGH CONFIG_SYS_BOOT_GET_CMDLINE CONFIG_SYS_BOOT_GET_KBD Define these as appropriate in arch/include/asm/config.h files. Signed-off-by: John Rigby <john.rigby@linaro.org> Acked-by: Wolfgang Denk <wd@denx.de>
2010-10-18powerpc: do not fixup NULL ptrsJoakim Tjernlund
The fixup routine must not fixup NULL pointers. Problem can be seen by char *testfun(void) __attribute__((weak)); char *(*myfun)(void) = testfun; Then add printf("myfun:%p, &myfun:%p\n", myfun, &myfun); before relocation and after relocation. myfun should be NULL in both cases but it is not. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2010-10-18powerpc: Cleanup BOOTFLAG_* referencesPeter Tyser
Now that warm booting is not supported, there isn't a need for the BOOTFLAG_COLD and BOOTFLAG_WARM defines, so remove them. Note that this change makes the board info bd_bootflags field useless. It will always be set to 0, but we leave it around so that we don't break the board info structure that some OSes are expecting to be passed from U-Boot. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-18MPC5121: Add USB EHCI supportDamien Dusha
Signed-off-by: Francesco Rendine <francesco.rendine@valueteam.com> Signed-off-by: Damien Dusha <d.dusha@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Coding style cleanup; slight file restructuring. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Remy Bohmer <linux@bohmer.net>
2010-10-18Rename TEXT_BASE into CONFIG_SYS_TEXT_BASEWolfgang Denk
The change is currently needed to be able to remove the board configuration scripting from the top level Makefile and replace it by a simple, table driven script. Moving this configuration setting into the "CONFIG_*" name space is also desirable because it is needed if we ever should move forward to a Kconfig driven configuration system. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-13ppc: Conditionally compile bat_rw.cPeter Tyser
Only a few PPC boards actually use the common BAT manipulation functions, so only compile it for them. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-12powerpc: Remove warm reset entry pointPeter Tyser
No boards utilize the warm reset entry point, so remove it. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-12powerpc: Zero out board info struct on bootupPeter Tyser
This puts the board info struct in a known state and allows the removal of other code which initialized board info fields to 0. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-11Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk
2010-10-07powerpc/85xx: fix rev.2 job queue LIODN error stormKim Phillips
pumping line-rate traffic though a p4080 rev.2, which is configured to encrypt packets prior to forwarding through an IPsec tunnel, gets this error: of_platform ffe302000.jq: DECO: desc idx 22: LIODN error. DECO was trying to share from itself or from another DECO but the two Non-SEQ LIODN values didn't match or the "shared from" DECO's Descriptor required that the SEQ LIODNs be the same and they aren't. Since high traffic rates cause DECOs to begin to start sharing shared descriptors amongst themselves, and DECOs inherit job queue LIODNs when accessing shared descriptors, and a recently discovered rev.2 h/w erratum requires all sharing job queues in a partition have same liodn assignment, reassign the first job queue's liodn assignment to the rest. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07powerpc/p4080: Add new CPC register - HDBCR0Kumar Gala
Manual was updated to add a new register for disabling CDQ speculation. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-06PowerPC: change board specific early pci_init() into generic.Andre Schwarz
Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
2010-10-06PCU_E: remove code for yet another corpseWolfgang Denk
The PCU_E board has long reached EOL, and support for it is no longer relevant in current versions of U-Boot. Remove it. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-05Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk
2010-10-05Merge branch 'next' of git://git.denx.de/u-boot-videoWolfgang Denk
2010-10-04ppc4xx: Remove some testing hacks from ppc4xx.hStefan Roese
I accidentally left these hacks in the code while doing the big header cleanup. Let's remove it now. Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-04ppc4xx: Add defines for COM3 & COM4 (UART2 & UART3) on 440EPx/GRxStefan Roese
Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-04APM821xx: Add CPU supportTirumala Marri
APM821XX is a new line of SoCs which are derivatives of PPC44X family of processors. This patch adds support of CPU, cache, tlb, 32k ocm, bootstraps, PLB and AHB bus. Signed-off-by: Tirumala R Marri <tmarri@apm.com> Signed-off-by: Stefan Roese <sr@denx.de>