summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * | x86: Fix some bugs in the i8402 driver when no controller is presentGabe Black2011-11-29-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>
| * | x86: Make the i8042 driver checkpatch cleanGabe Black2011-11-29-498/+472
| | | | | | | | | | | | Signed-off-by: Gabe Black <gabeblack@chromium.org>
| * | x86: Wrap small helper functions from libgcc to avoid an ABI mismatchGabe Black2011-11-29-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>
| * | x86: Import the glibc memset implementationGabe Black2011-11-29-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>
| * | x86: Fix a few recently added bugsGabe Black2011-11-29-1/+6
| | | | | | | | | | | | | | | Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Don't relocate symbols which point to things that aren't relocatedGabe Black2011-11-29-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>
| * | x86: Fix how the location of the realmode and bios blobs are calculatedGabe Black2011-11-29-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>
| * | x86: Misc cleanupsGraeme Russ2011-11-29-2/+3
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Misc PCI touchupsGraeme Russ2011-11-29-7/+9
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Ensure IDT and GDT remain 16-byte aligned post relocationGraeme Russ2011-11-29-6/+13
| | | | | | | | | | | | | | | | | | Some CPUs have strict alignment requirements for these tables Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Provide more configuration granularityGraeme Russ2011-11-29-52/+63
| | | | | | | | | | | | | | | | | | Planned future ports requires more granularity for some options Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Add multiboot headerGraeme Russ2011-11-29-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>
| * | sc520: Create arch asm-offsetsGraeme Russ2011-11-29-49/+52
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Punt cold- and warm-boot flagsGraeme Russ2011-11-29-7/+0
| | | | | | | | | | | | | | | | | | | | | Nobody uses them anyway Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
| * | cosmetic: checkpatch cleanup of board/eNET/*.cGraeme Russ2011-11-29-14/+13
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | cosmetic: checkpatch cleanup of arch/x86/lib/*.cGraeme Russ2011-11-29-432/+516
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | cosmetic: checkpatch cleanup of arch/x86/cpu/sc520/*.cGraeme Russ2011-11-29-87/+39
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | cosmetic: checkpatch cleanup of arch/x86/cpu/*.cGraeme Russ2011-11-29-23/+30
| | | | | | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * | x86: Call hang() on unrecoverable exceptionGraeme Russ2011-11-29-10/+10
| |/ | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
| * menu.c: use puts() instead of printf() where possibleWolfgang Denk2011-11-28-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | common/menu.c used printf() in a number of places to print user provided, constant strings (like the "title" string). printf() is dangerous here for example in case the user unwittingly embeds some '%' caracters that printf() would interpret as formatting and then pick up random arguments. Use puts() instead. We also omit the trailing ':' in the title line - if a user wants this, he can provide it as part of the title string. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk2011-11-28-97/+88
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'agust@denx.de' of git://git.denx.de/u-boot-staging: MAKEALL: drop obsolete mx31pdk_nand target dataflash: fix parameters order in write_dataflash() hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK defines davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata board davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie board arm: a320evb: define mach-type in board config file OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that. Fix Stelian's email address
| | * MAKEALL: drop obsolete mx31pdk_nand targetStefano Babic2011-11-27-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The mx31pdk can boot only from NAND and the target was already updated in boards.cfg. mx31pdk_nand is obsolete and is dropped. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * dataflash: fix parameters order in write_dataflash()Igor Grinberg2011-11-27-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix parameters order in write_dataflash() function extern declaration in the header file. Parameters order, as in function definition, should be: addr_dest, addr_src, size. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
| | * hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK definesChristian Riesch2011-11-27-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the HAWKBOARD_KICK{0,1}_UNLOCK defines by DV_SYSCFG_KICK{0,1}_UNLOCK. The kick register values are not hawkboard specific but may be used for all davinci boards. In commit f3c149d6c6e5ba8dd72baa86fe527837e4fb0e9a new defines for these values wer introduced. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Syed Mohammed Khasim <sm.khasim@gmail.com> Cc: Sughosh Ganu <urwithsughosh@gmail.com> Cc: Sandeep Paulraj <s-paulraj@ti.com>
| | * davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata boardChristian Riesch2011-11-27-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build breakage for the davinci_sonata board. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Sergey Kubushyn <ksi@koi8.net> Cc: Sandeep Paulraj <s-paulraj@ti.com>
| | * davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie boardChristian Riesch2011-11-27-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build breakage for the davinci_schmoogie board. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Sergey Kubushyn <ksi@koi8.net> Cc: Sandeep Paulraj <s-paulraj@ti.com>
| | * arm: a320evb: define mach-type in board config fileYan-Pai Chen2011-11-27-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | MACH_TYPE_FARADAY was dropped from mach-types.h. Add it back to board config file. Signed-off-by: Yan-Pai Chen <ypchen@faraday-tech.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
| | * OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.Alexander Holler2011-11-27-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is no need to have such a function twice. Signed-off-by: Alexander Holler <holler@ahsoftware.de> Acked-by: Dirk Behme <dirk.behme@googlemail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| | * Fix Stelian's email addressStelian Pop2011-11-27-70/+70
| | | | | | | | | | | | | | | | | | | | | Change my old email address which is no longer valid. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | Merge branch 'master' of git://git.denx.de/u-boot-videoWolfgang Denk2011-11-28-1/+39
| |\ \ | | |/ | |/| | | | | | | | | | * 'master' of git://git.denx.de/u-boot-video: DIU: 1080P and 720P support CFB: Fix font rendering on mx5 framebuffer
| | * DIU: 1080P and 720P supportJerry Huang2011-11-24-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | Add the 1920x1080 and 1280x720 resolution support. Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> CC: Anatolij Gustschin <agust@denx.de>
| | * CFB: Fix font rendering on mx5 framebufferMarek Vasut2011-11-24-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* | | menu.c: use puts() instead of printf() where possibleWolfgang Denk2011-11-29-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common/menu.c used printf() in a number of places to print user provided, constant strings (like the "title" string). printf() is dangerous here for example in case the user unwittingly embeds some '%' caracters that printf() would interpret as formatting and then pick up random arguments. Use puts() instead. We also omit the trailing ':' in the title line - if a user wants this, he can provide it as part of the title string. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | MAKEALL: drop obsolete mx31pdk_nand targetStefano Babic2011-11-29-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The mx31pdk can boot only from NAND and the target was already updated in boards.cfg. mx31pdk_nand is obsolete and is dropped. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | | dataflash: fix parameters order in write_dataflash()Igor Grinberg2011-11-29-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix parameters order in write_dataflash() function extern declaration in the header file. Parameters order, as in function definition, should be: addr_dest, addr_src, size. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* | | hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK definesChristian Riesch2011-11-29-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the HAWKBOARD_KICK{0,1}_UNLOCK defines by DV_SYSCFG_KICK{0,1}_UNLOCK. The kick register values are not hawkboard specific but may be used for all davinci boards. In commit f3c149d6c6e5ba8dd72baa86fe527837e4fb0e9a new defines for these values wer introduced. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Syed Mohammed Khasim <sm.khasim@gmail.com> Cc: Sughosh Ganu <urwithsughosh@gmail.com> Cc: Sandeep Paulraj <s-paulraj@ti.com>
* | | davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata boardChristian Riesch2011-11-29-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build breakage for the davinci_sonata board. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Sergey Kubushyn <ksi@koi8.net> Cc: Sandeep Paulraj <s-paulraj@ti.com>
* | | davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie boardChristian Riesch2011-11-29-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build breakage for the davinci_schmoogie board. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Sergey Kubushyn <ksi@koi8.net> Cc: Sandeep Paulraj <s-paulraj@ti.com>
* | | arm: a320evb: define mach-type in board config fileYan-Pai Chen2011-11-29-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | MACH_TYPE_FARADAY was dropped from mach-types.h. Add it back to board config file. Signed-off-by: Yan-Pai Chen <ypchen@faraday-tech.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* | | OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.Alexander Holler2011-11-29-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is no need to have such a function twice. Signed-off-by: Alexander Holler <holler@ahsoftware.de> Acked-by: Dirk Behme <dirk.behme@googlemail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | Fix Stelian's email addressStelian Pop2011-11-29-70/+70
| | | | | | | | | | | | | | | | | | | | | Change my old email address which is no longer valid. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | DIU: 1080P and 720P supportJerry Huang2011-11-29-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | Add the 1920x1080 and 1280x720 resolution support. Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> CC: Anatolij Gustschin <agust@denx.de>
* | | CFB: Fix font rendering on mx5 framebufferMarek Vasut2011-11-29-1/+1
|/ / | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcWolfgang Denk2011-11-27-15/+7
|\ \ | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-mmc: Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec" mmc: mv_sdhci: Fix host version read for Armada100
| * | Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec"Macpaul Lin2011-11-25-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 02f3029f1810b99869254d0cf0a71946a008a728. This patch add 3 times retry to CMD8 because the Marvell mmc controller doesn't obey the power ramp up process in the SD specification 6.4.1. (Please refer to figure 6.1 and 6.2 in the specification.) The CMD0 should be send after power ramp up has been finished. However, the Marvell mmc contorller must do power ramp up after the first CMD0 command has been send. This patch also affect existing platforms like Nokia N900 and other platforms. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Lei Wen <leiwen@marvell.com> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * | mmc: mv_sdhci: Fix host version read for Armada100Ajay Bhargav2011-11-25-1/+5
| |/ | | | | | | | | | | | | | | sdhci_readw does not work for host version read in Armada100 series SoCs. This patch fix this issue by making a sdhci_readl call to get host version. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
* | microblaze: usable uart16550 for big endian systemsStephan Linz2011-11-27-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, not all U-Boot BSP will treat properly the 3 byte offset. This why prefer to mask out the 3 byte offset in general and setup correct _REG_SIZE value depending on edianess. Signed-off-by: Stephan Linz <linz@li-pro.net> Tested-by: Michal Simek <monstr@monstr.eu>
* | mvblx: punt unused clean/distclean targetsMichael Jones2011-11-27-6/+0
| | | | | | | | Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
* | cmd_nvedit.c: Fix compiler warning introduced by checkpatch cleanupKumar Gala2011-11-27-1/+1
| | | | | | | | | | | | | | | | | | cmd_nvedit.c: In function 'do_env_grep': cmd_nvedit.c:182:3: warning: suggest parentheses around assignment used as truth value Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* | drivers/bios_emulator/x86emu/ops2.c: Fix GCC 4.6 build warningKumar Gala2011-11-27-1/+2
| | | | | | | | | | | | | | | | | | Fix: x86emu/ops2.c: In function 'x86emuOp2_set_byte': x86emu/ops2.c:171:11: warning: variable 'name' set but not used [-Wunused-but-set-variable] Signed-off-by: Kumar Gala <galak@kernel.crashing.org>