aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-02board/sbc405/strataflash.c: Fix GCC 4.6 build warningWolfgang Denk1-3/+0
Fix: strataflash.c: In function 'flash_write_cfiword': strataflash.c:673:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warningWolfgang Denk1-3/+0
Fix: cpu.c: In function 'checkcpu': cpu.c:51:7: warning: variable 'ver' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Acked-by: Kumar Gala <galak@kernel.crashing.org>
2011-12-02board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warningWolfgang Denk1-2/+1
Fix: mpc8610hpcd.c: In function 'pci_init_board': mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Acked-by: Kumar Gala <galak@kernel.crashing.org>
2011-12-02board/mpl/common/flash.c: Fix GCC 4.6 build warningWolfgang Denk1-2/+1
Fix: ../common/flash.c: In function 'flash_init': ../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Denis Peter <d.peter@mpl.ch> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02post/board/lwmon5/gdc.c: Fix GCC 4.6 build warningWolfgang Denk1-2/+1
Fix: gdc.c: In function 'gdc_test_reg_one': gdc.c:66:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2011-12-02drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warningWolfgang Denk1-7/+5
Fix: sl811-hcd.c: In function 'sl811_rh_submit_urb': sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net>
2011-12-02board/sandburst/common/flash.c: Fix GCC 4.6 build warningWolfgang Denk1-4/+1
Fix: ../common/flash.c: In function 'flash_erase': ../common/flash.c:307:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Travis Sawyer <travis.sawyer@sandburst.com> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02DB64460: Fix GCC 4.6 build warningsWolfgang Denk3-296/+255
Fix: db64460.c: In function 'debug_led': db64460.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_real_open': mv_eth.c:423:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_stop': mv_eth.c:641:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_xmit': mv_eth.c:717:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_receive': mv_eth.c:802:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_get_stats': mv_eth.c:901:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_update_stat': mv_eth.c:929:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:928:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_print_stat': mv_eth.c:1010:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'eth_clear_mib_counters': mv_eth.c:2067:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'check_dimm': sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'setup_sdram': sdram_init.c:1255:13: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'initdram': sdram_init.c:1744:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:6: warning: variable 's0' set but not used [-Wunused-but-set-variable] Note: no attempt was make to clean up the mess coding style and other issues in sdram_init.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-02DB64360: Fix GCC 4.6 build warningsWolfgang Denk3-299/+254
Fix: db64360.c: In function 'debug_led': db64360.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_real_open': mv_eth.c:424:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_stop': mv_eth.c:642:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_xmit': mv_eth.c:718:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_receive': mv_eth.c:803:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_get_stats': mv_eth.c:902:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_update_stat': mv_eth.c:930:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:929:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_print_stat': mv_eth.c:1011:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'eth_clear_mib_counters': mv_eth.c:2068:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'check_dimm': sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'setup_sdram': sdram_init.c:1256:13: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'initdram': sdram_init.c:1735:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:6: warning: variable 's0' set but not used [-Wunused-but-set-variable] Note: no attempt was make to clean up the mess coding style and other issues in sdram_init.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-02board/cray/L1/flash.c: Fix GCC 4.6 build warningWolfgang Denk1-14/+11
Fix: flash.c: In function 'flash_erase': flash.c:276:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02drivers/block/sata_dwc.c: Fix GCC 4.6 build warningWolfgang Denk1-5/+1
Fix: sata_dwc.c: In function 'scan_sata': sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kazuaki Ichinohe <kazuichi@fsi.co.jp>
2011-12-02board/amirix/ap1000/flash.c: Fix GCC 4.6 build warningWolfgang Denk1-3/+0
Fix: flash.c: In function 'flash_write_cfiword': flash.c:778:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02alpr board: Fix GCC 4.6 build warningsWolfgang Denk2-6/+1
Fix: fpga.c: In function 'fpga_pre_fn': fpga.c:88:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable] nand.c: In function 'alpr_nand_dev_ready': nand.c:125:18: warning: variable 'val' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2011-12-02Merge branch 'sr@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk4-3/+16
* 'sr@denx.de' of git://git.denx.de/u-boot-staging: image: Don't detect XIP images as overlapping. image: Implement IH_TYPE_KERNEL_NOLOAD
2011-12-02Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk14-27/+1448
* 'master' of git://git.denx.de/u-boot-ppc4xx: ppc4xx: Add Io64 board support ppc4xx: fix PMC440 painit command ppc4xx: remove invalid access to PCI_BRDGOPT2 register ppc4xx: use CONFIG_PCI_BOOTDELAY instead of private implementation
2011-12-01Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk46-97/+3231
* 'master' of git://git.denx.de/u-boot-mpc85xx: mpc85xx: support for Freescale COM Express P2020 arch/powerpc/cpu/mpc8xxx/ddr/interactive.c: Fix GCC 4.6 build warning mpc85xx: support board-specific reset function powerpc/85xx: verify the localbus device tree address before booting the OS mpc8xxx: update module_type values from JEDEC DDR3 SPD Specification powerpc/p3060qds: Add board related support for P3060QDS platform powerpc/85xx: clean up and document the QE/FMAN microcode macros powerpc/85xx: always implement the work-around for Erratum SATA_A001 powerpc/85xx: CONFIG_FSL_SATA_V2 should be defined in config_mpc85xx.h powerpc/85xx: Add workaround for erratum A-003474 powerpc/85xx: fixup flexcan device tree clock-frequency powerpc/85xx: Add workaround for erratum CPU-A003999
2011-12-01image: Don't detect XIP images as overlapping.Stephen Warren1-1/+3
bootm_load_os() detects when it writes the decompressed image over the top of the compressed image. If this happens, the original image is corrupted. When the original image is a multi-component legacy image, or a (potentially multi-component) FIT image, this implies that other components may be corrupted. In turn, this means that booting is unlikely to be successful. However, in the case of no image compresssion coupled with an image with load address equal to where the image is already located (e.g. an XIP kernel, or IH_TYPE_KERNEL_ANYLOAD), there has been no copy and hence no corruption, no matter whether it's a single-component legacy image, a multi-component legacy image, or a FIT image. In this case, disable the overlap detection, and allow boot to continue. Without this change, when booting a single-component legacy image that contains an IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned BOOTM_ERR_OVERLAP, but the caller ignores this, and boot continues and succeeds. Now, the false error is no longer even returned. Without this change, when booting a FIT image that contains an IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned BOOTM_ERR_OVERLAP, which would then cause the caller to reset the board. Now, the false error is no longer returned, and boot succeeds. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01image: Implement IH_TYPE_KERNEL_NOLOADStephen Warren4-2/+13
The legacy uImage format includes an absolute load and entry-point address. When bootm operates on a kernel uImage in memory that isn't loaded at the address in the image's load address, U-Boot will copy the image to its address in the header. Some kernel images can actually be loaded and used at any arbitrary address. An example is an ARM Linux kernel zImage file. To represent this capability, IH_TYPE_KERNEL_NOLOAD is implemented, which operates just like IH_TYPE_KERNEL, except that the load address header is ignored, and U-Boot does not copy the image to its load address, but rather uses it in-place. This is useful when sharing a single (uImage-wrapped) zImage across multiple boards with different memory layouts; in this case, a specific load address need not be picked when creating the uImage, but instead is selected by the board-specific U-Boot environment used to load and boot that image. v2: Rename from IH_TYPE_KERNEL_ANYLOAD to IH_TYPE_KERNEL_NOLOAD. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01ppc4xx: Add Io64 board supportDirk Eibach11-8/+1431
Board support for the Guntermann & Drunck Io64. Signed-off-by: Dirk Eibach <eibach@gdsys.de> Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01ppc4xx: fix PMC440 painit commandMatthias Fuchs1-2/+15
This patch fixes the PMC440 BSP command painit. The implementation was broken since the step to the new environment handling. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01ppc4xx: remove invalid access to PCI_BRDGOPT2 registerMatthias Fuchs1-2/+0
This patch removes an invalid call to pci_write_config_dword to PCI_BRDGOPT2 register. This function must not be used from pci_target_init and is also at the wrong place. The correct call is done later in pci_target_init via pci_hose_write_config_dword. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01ppc4xx: use CONFIG_PCI_BOOTDELAY instead of private implementationMatthias Fuchs2-15/+2
This patch switches PMC440 board code to the CONFIG_PCI_BOOTDELAY option instead of using a private implemention. This relies on Anatolji's patch that moves the pcidelay handling behind pci_target_init. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de>
2011-11-29mpc85xx: support for Freescale COM Express P2020Ira W. Snyder9-0/+1099
This adds support for the Freescale COM Express P2020 board. This board is similar to the P1_P2_RDB, but has some extra (as well as missing) peripherals. Unlike all other mpc85xx boards, it uses a watchdog timeout to reset. Using the HRESET_REQ register does not work. This board has no NOR flash, and can only be booted via SD or SPI. This procedure is documented in Freescale Document Number AN3659 "Booting from On-Chip ROM (eSDHC or eSPI)." Some alternative documentation is provided in Freescale Document Number P2020RM "P2020 QorIQ Integrated Processor Reference Manual" (section 4.5). Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29arch/powerpc/cpu/mpc8xxx/ddr/interactive.c: Fix GCC 4.6 build warningKumar Gala1-2/+1
Fix: interactive.c: In function 'fsl_ddr_interactive': interactive.c:1357:15: warning: variable 'len' set but not used [-Wunused-but-set-variable] Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29mpc85xx: support board-specific reset functionIra W. Snyder1-1/+16
This is useful for boards which cannot be reset in the usual way for the 85xx CPU. An example is a board which can only be reset by a hardware watchdog. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: verify the localbus device tree address before booting the OSTimur Tabi1-9/+39
The localbus controller node in the device tree is typically a root node, even though the controller is part of CCSR. If we were to put the lbc node under the SOC node, then the 'ranges' property in the lbc node would translate through the 'ranges' property of the parent SOC node, and we don't want that. Since the lbc is a separate node, it's possible for the 'reg' property to be wrong. This happened with the original version of p1022ds.dts, which used a 32-bit value in the 'reg' address, instead of a 36-bit address. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29mpc8xxx: update module_type values from JEDEC DDR3 SPD SpecificationIra W. Snyder2-0/+14
Newer JEDEC DDR3 SPD Specifications define several additional values for the DDR3 module_type field which were undefined when this code was written. Update the code to handle the newer module types. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Cc: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/p3060qds: Add board related support for P3060QDS platformShengzhou Liu15-9/+1878
The P3060QDS is a Freescale reference board for the six-core P3060 SOC. P3060QDS Board Overview: Memory subsystem: - 2G Bytes unbuffered DDR3 SDRAM SO-DIMM(64bit bus) - 128M Bytes NOR flash single-chip memory - 16M Bytes SPI flash - 8K Bytes AT24C64 I2C EEPROM for RCW Ethernet: - Eight Ethernet controllers (4x1G + 4x1G/2.5G) - Three VSC8641 PHYs on board (2xRGMII + 1xMII) - Suport multiple Vitesse VSC8234 SGMII Cards in Slot1/2/3 PCIe: Two PCI Express 2.0 controllers/ports USB: Two USB2.0, USB1(TYPE-A) and USB2(TYPE-AB) on board I2C: Four I2C controllers UART: Supports two dUARTs up to 115200 bps for console RapidIO: Two RapidIO, sRIO1 and sRIO2 Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: clean up and document the QE/FMAN microcode macrosTimur Tabi10-44/+94
Several macros are used to identify and locate the microcode binary image that U-boot needs to upload to the QE or Fman. Both the QE and the Fman use the QE Firmware binary format to package their respective microcode data, which is why the same macros are used for both. A given SOC will only have a QE or an Fman, so this is safe. Unfortunately, the current macro definition and usage has inconsistencies. For example, CONFIG_SYS_FMAN_FW_ADDR was used to define the address of Fman firmware in NOR flash, but CONFIG_SYS_QE_FW_IN_NAND contains the address of NAND. There's no way to know by looking at a variable how it's supposed to be used. In the future, the code which uploads QE firmware and Fman firmware will be merged. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: always implement the work-around for Erratum SATA_A001Timur Tabi3-25/+34
On the P1022/P1013, the work-around for erratum SATA_A001 was implemented only if U-Boot initializes SATA, but SATA is not initialized by default. So move the work-around to the CPU initialization function, so that it's always executed on the SOCs that need it. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: CONFIG_FSL_SATA_V2 should be defined in config_mpc85xx.hTimur Tabi5-6/+8
Macro CONFIG_FSL_SATA_V2 is defined if the SOC has a V2 Freescale SATA controller, so it should be defined in config_mpc85xx.h instead of the various board header files. So now CONFIG_FSL_SATA_V2 is always defined on the P1013, P1022, P2041, P3041, P5010, and P5020. It was already defined for the P1010 and P1014. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: Add workaround for erratum A-003474York Sun3-0/+15
Erratum A-003474: Internal DDR calibration circuit is not supported Impact: Experience shows no significant benefit to device operation with auto-calibration enabled versus it disabled. To ensure consistent timing results, Freescale recommends this feature be disabled in future customer products. There should be no impact to parts that are already operating in the field. Workaround: Prior to setting DDR_SDRAM_CFG[MEM_EN]=1, do the following: 1. Write a value of 0x0000_0015 to the register at offset CCSRBAR + DDR OFFSET + 0xf30 2. Write a value of 0x2400_0000 to the register at offset CCSRBAR + DDR OFFSET + 0xf54 Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: fixup flexcan device tree clock-frequencyJia Hongtao1-1/+12
Make the fixup matchable with dts and kernel. Update the compatible from "fsl,flexcan-v1.0" to "fsl,p1010-flexcan" and Change the "clock-freq" property to "clock-frequency". We also change flexcan frequency from CCB-clock to CCB-clock/2 according to P1010 spec. We now keep the old interfaces to make previous kernel work. They should be removed in the future. Signed-off-by: Jia Hongtao <B38951@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29powerpc/85xx: Add workaround for erratum CPU-A003999Kumar Gala4-0/+21
Erratum A-003999: Running Floating Point instructions requires special initialization. Impact: Floating point arithmetic operations may result in an incorrect value. Workaround: Perform a read modify write to set bit 7 to a 1 in SPR 977 before executing any floating point arithmetic operation. This bit can be set when setting MSR[FP], and can be cleared when clearing MSR[FP]. Alternatively, the bit can be set once at boot time, and never cleared. There will be no performance degradation due to setting this bit. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29x86: Fix some bugs in the i8402 driver when no controller is presentGabe Black1-1/+11
If no controller is present, the i8402 driver should return immediately and not attempt to operate on the missing hardware. In kbd_input_empty, the status register is checked every millisecond to see whether the input buffer is empty, up to a timeout which is tracked by decrimenting a counter each time the check is performed. The decrement is performed with a postfix -- operator, and the value of the counter is checked in place. That means that when the counter reaches zero and the loop terminates, it will actually be decrimented one more time and become -1. That value is returned as the return value of the function. That would give the right answer if it wasn't for that extra decrement because a timeout would indicate that the buffer never became empty. This change fixes both of those bugs. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Make the i8042 driver checkpatch cleanGabe Black1-498/+472
Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Wrap small helper functions from libgcc to avoid an ABI mismatchGabe Black3-0/+51
When gcc compiles some 64 bit operations on a 32 bit machine, it generates calls to small functions instead of instructions which do the job directly. Those functions are defined in libgcc and transparently provide whatever functionality was necessary. Unfortunately, u-boot can be built with a non-standard ABI when libgcc isn't. More specifically, u-boot uses -mregparm. When the u-boot and libgcc are linked together, very confusing bugs can crop up, for instance seemingly normal integer division or modulus getting the wrong answer or even raising a spurious divide by zero exception. This change borrows (steals) a technique and some code from coreboot which solves this problem by creating wrappers which translate the calling convention when calling the functions in libgcc. Unfortunately that means that these instructions which had already been turned into functions have even more overhead, but more importantly it makes them work properly. To find all of the functions that needed wrapping, u-boot was compiled without linking in libgcc. All the symbols the linker complained were undefined were presumed to be the symbols that are needed from libgcc. These were a subset of the symbols covered by the coreboot code, so it was used unmodified. To prevent symbols which are provided by libgcc but not currently wrapped (or even known about) from being silently linked against by code generated by libgcc, a new copy of libgcc is created where all the symbols are prefixed with __normal_. Without being purposefully wrapped, these symbols will cause linker errors instead of silently introducing very subtle, confusing bugs. Another approach would be to whitelist symbols from libgcc and strip out all the others. The problem with this approach is that it requires the white listed symbols to be specified three times, once for objcopy, once so the linker inserts the wrapped, and once to generate the wrapper itself, while this implementation needs it to be listed only twice. There isn't much tangible difference in what each approach produces, so this one was preferred. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Import the glibc memset implementationGabe Black3-1/+89
The new implementation is about twice as fast as the old. This is from glibc-2.14, sysdeps/i386/memset.c. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Fix a few recently added bugsGabe Black2-1/+6
Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Don't relocate symbols which point to things that aren't relocatedGabe Black3-11/+8
This change adds an upper bound for symbols which are fixed up after u-boot is relocated into RAM. This way portions that are left at their original location can be referred to without having to manually fix up any pointers. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Fix how the location of the realmode and bios blobs are calculatedGabe Black2-2/+10
There are two blobs embedded into the u-boot image which are linked to run at an address which is different from where they actually end up in the ROM, one called "realmode" and one called "bios". There are realmode_setup and bios_setup functions which prepare those blobs by copying them into the location they're supposed to run from, among other things. During u-boot relocation from ROM to RAM, the text and a few data segments are copied over. The realmode and bios sections are not copied, and so the only place they can be read from is their original location in the ROM. Looking specifically at the bios blob, there are symbols defined in the linker script called __bios_start and __bios_size which are defined to be the start and size of the blob in the ROM. In the bios_setup function, there seem to be two mistakes happening. First, the offset from ROM to RAM is being added to __bios_start which implies that this code expects to use the copy moved to RAM. No such copy is made, so that's wrong. More subtly, when u-boot relocates itself, it goes through all of the relocations stored in .rel.dyn and fixes them up. This has the effect of transforming the __bios_start reference in bios_setup so that it refers to the version in RAM (if one existed) instead of the one in ROM. To correct for that, the offset actually needs to be subtracted out again to translate the address back into the ROM. The net effect is that for both blobs, a + needs to be changed to a -. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Misc cleanupsGraeme Russ1-2/+3
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Misc PCI touchupsGraeme Russ3-7/+9
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Ensure IDT and GDT remain 16-byte aligned post relocationGraeme Russ2-6/+13
Some CPUs have strict alignment requirements for these tables Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Provide more configuration granularityGraeme Russ7-52/+63
Planned future ports requires more granularity for some options Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Add multiboot headerGraeme Russ1-0/+20
By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to bootstrap U-Boot is useful for using an existing BIOS to get an initial U-Boot port up and running before implementing the low-level reset vector code, SDRAM init, etc. and overwriting the BIOS Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29sc520: Create arch asm-offsetsGraeme Russ6-49/+52
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29x86: Punt cold- and warm-boot flagsGraeme Russ3-7/+0
Nobody uses them anyway Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-29cosmetic: checkpatch cleanup of board/eNET/*.cGraeme Russ2-14/+13
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29cosmetic: checkpatch cleanup of arch/x86/lib/*.cGraeme Russ18-432/+516
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>