summaryrefslogtreecommitdiff
path: root/arch
Commit message (Collapse)AuthorAgeLines
* MX51: Register definitions cannot be included in board config fileStefano Babic2010-09-30-4/+6
| | | | | | | Due to wrong dependencies, it is not possible to include imx_regs.h inside the board configuration file. Signed-off-by: Stefano Babic <sbabic@denx.de>
* MX51: add structure to access System Reset ControllerStefano Babic2010-09-29-0/+10
| | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
* MX51: Added pins definition to set up padsStefano Babic2010-09-29-0/+44
| | | | | | | Add pins definitions to set up RAM pads. Pins have only a pad, there is no entry in the multiplexer. Signed-off-by: Stefano Babic <sbabic@denx.de>
* ARM: Use syslib functions for all CORTEXA8Stefano Babic2010-09-29-2/+3
| | | | | | | | The OMAP3 cpu directory contains a syslib file with some utilities that can be shared by all targets using arm cortexa8 processors, not only OMAP. Signed-off-by: Stefano Babic <sbabic@denx.de>
* Use common function to set GPIOs for MX3 and MX5Stefano Babic2010-09-29-28/+17
| | | | | | | | | The patch adds support for setting gpios to the MX51 processor and change name to the corresponding functions for MX31. In this way, it is possible to get rid of nasty #ifdef switches related to the processor type. Signed-off-by: Stefano Babic <sbabic@denx.de>
* Merge branch 'next' of /home/wd/git/u-boot/nextWolfgang Denk2010-09-28-1201/+7646
|\ | | | | | | | | | | | | Conflicts: include/ppc4xx.h Signed-off-by: Wolfgang Denk <wd@denx.de>
| * 83xx: Remove warmboot parameter from PCI init functionsPeter Tyser2010-09-23-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This change lays the groundwork for the BOOTFLAG_* flags being removed. This change has the small affect of delaying 100ms on PCI initialization after a warm boot as opposed to the optimal 1ms on some boards. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> included the mpc8308_p1m board. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * mpc83xx: fix pcie build warningKim Phillips2010-09-23-1/+1
| | | | | | | | | | | | | | | | Configuring for MPC8308RDB board... pcie.c: In function 'mpc83xx_pcie_register_hose': pcie.c:143: warning: assignment makes pointer from integer without a cast Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * mpc83xx: add support for setting PCIE clocksIlya Yanok2010-09-23-0/+12
| | | | | | | | | | | | | | | | This patch adds support for setting PCIE clocks in cpu_init.c by providing CONFIG_SYS_SCCR_PCIEXP{1,2} in configuration. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * mpc83xx/pcie: make it compile with PCIE2 unconfiguredIlya Yanok2010-09-23-13/+25
| | | | | | | | | | | | | | | | MPC8308 has only one PCIE host controller so we want it to compile without CONFIG_SYS_PCIE2_CFG_{BASE,SIZE} defined. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * ppc4xx: Disable trace broadcast for 44x non debug modeVictor Gallardo2010-09-23-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the trace broadcast is enabled on 44x systems. To reduce power consumption when instruction tracing is not needed, disable trace broadcast. Check External Debug Mode (EDM) bit to detect if it should be disabled or not. Resetting system via a debugger will set the DBCR0[EDM] bit. Resetting via u-boot or OS will not. Signed-off-by: Victor Gallardo <vgallardo@apm.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Cleanup of PVR detection code in cpu.cStefan Roese2010-09-23-71/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans the PVR detection code in check_cpu() up a bit. Basically the strings are better seperated, resulting in an easier to understand and maintain code version. The #ifdef's couldn't be removed easily because of two reasons: - Some SoC revisions have the same PVR, so need a way to differentiate between those two SoC's. - In some case statements registers only available in this SoC variant are referenced. Instead I moved the CONFIG_440 #ifdef a bit, so that 405 platforms don't add this 440 detection code and vice versa. Resulting in this U-Boot image size change: 405EX (Kilauea): 408 bytes less 440EPx (Sequoia): 604 bytes less 460EX (Canyonlands): 564 bytes less Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de>
| * Remove unused CONFIG_SERIAL_SOFTWARE_FIFO featureStefan Roese2010-09-23-22/+0
| | | | | | | | | | | | | | | | | | This patch removes the completely unused CONFIG_SERIAL_SOFTWARE_FIFO feature from U-Boot. It has only been implemented for PPC4xx and was not used at all. So let's remove it and make the code smaller and cleaner. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
| * ppc4xx: Use common NS16550 driver for PPC4xx UARTStefan Roese2010-09-23-716/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the PPC4xx UART driver. Instead the common NS16550 driver is used, since all PPC4xx SoC's use this peripheral device. The file 4xx_uart.c now only implements the UART clock calculation function which also sets the SoC internal UART divisors. All PPC4xx board config headers are changed to use this common NS16550 driver now. Tested on these boards: acadia, canyonlands, katmai, kilauea, sequoia, zeus Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Big header cleanup part 2, mostly PPC405 relatedStefan Roese2010-09-23-845/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleanup is done by creating header files for all SoC versions and moving the SoC specific defines into these special headers. This way the common header ppc405.h and ppc440.h can be cleaned up finally. As a part from this cleanup, the GPIO definitions for PPC405EP are corrected. The high and low parts of the registers (for example CONFIG_SYS_GPIO0_OSRL vs. CONFIG_SYS_GPIO0_OSRH) have been defined in the wrong order. This patch now fixes this issue by switching these xxxH and xxxL values. This brings the GPIO 405EP port in sync with all other PPC4xx ports. Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Big header cleanup, mostly PPC440 relatedStefan Roese2010-09-23-1934/+1722
| | | | | | | | | | | | | | | | | | | | | | This patch starts a bit PPC4xx header cleanup. First patch mostly touches PPC440 files. A later patch will touch the PPC405 files as well. This cleanup is done by creating header files for all SoC versions and moving the SoC specific defines into these special headers. This way the common header ppc405.h and ppc440.h can be cleaned up finally. Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Move gpio.h to ppc4xx-gpio.h since its ppc4xx specificStefan Roese2010-09-23-2/+2
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Move ppc4xx headers to powerpc include directoryStefan Roese2010-09-23-28/+3861
| | | | | | | | | | | | | | | | | | This patch moves some ppc4xx related headers from the common include directory (include/) to the powerpc specific one (arch/powerpc/include/asm/). This way to common include directory is not so cluttered with files. Signed-off-by: Stefan Roese <sr@denx.de>
| * fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo ↵Timur Tabi2010-09-21-66/+3
| | | | | | | | | | | | | | | | | | | | features The Freescale MPC8610 and MPC5121 DIU code had re-implement two features that already existed in U-Boot: bitmap drawing and top-of-screen logo (CONFIG_VIDEO_LOGO). So delete the 8610-specific code and use the built-in features instead. Signed-off-by: Timur Tabi <timur@freescale.com>
| * ARM: implement relocation for arm1176Heiko Schocher2010-09-19-1/+299
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm1176 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for arm720tHeiko Schocher2010-09-19-1/+183
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm720t to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for arm_intcmHeiko Schocher2010-09-19-1/+179
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm_intcm to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for lh7a40xHeiko Schocher2010-09-19-2/+199
| | | | | | | | | | | | | | | | | | | | Change the implementation for lh7a40x to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for s3c44b0Heiko Schocher2010-09-19-1/+187
| | | | | | | | | | | | | | | | | | | | Change the implementation for s3c44b0 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for sa1100Heiko Schocher2010-09-19-1/+175
| | | | | | | | | | | | | | | | | | | | Change the implementation for sa1100 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ixpHeiko Schocher2010-09-19-1/+293
| | | | | | | | | | | | | | | | | | | | Change the implementation for ixp to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for pxaHeiko Schocher2010-09-19-1/+181
| | | | | | | | | | | | | | | | | | | | Change the implementation for pxa to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ARM946Heiko Schocher2010-09-19-2/+180
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm946 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ARM925Heiko Schocher2010-09-19-2/+216
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm925 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ARM920Heiko Schocher2010-09-19-2/+237
| | | | | | | | | | | | | | | | | | | | Change the implementation for arm920 to relocate the code to an arbitrary address in RAM. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ARM926Heiko Schocher2010-09-19-4/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the implementation for arm926 to relocate the code to an arbitrary address in RAM. Adapt the TX25 (i.MX25), magnesium board to test the changes. On the tx25 board TEXT_BASE is set to the final relocation address to prevent one more copying of u-boot code when relocating. More info see: doc/README.arm-relocation da850 board: Tested-by: Ben Gardiner <bengardiner@nanometrics.ca> Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Ben Gardiner <bengardiner@nanometrics.ca>
| * ARM: implement relocation for ARM V7 (OMAP)Heiko Schocher2010-09-19-6/+285
| | | | | | | | | | | | | | | | | | | | | | | | Change the implementation for ARM V7 to relocate the code to an arbitrary address in RAM. Adapt the Beagle board (Cortex A8) to test the changes. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: implement relocation for ARM11Heiko Schocher2010-09-19-1/+214
| | | | | | | | | | | | | | | | | | | | | | | | Change the implementation for ARM11 to relocate the code to an arbitrary address in RAM. Tested on the qong board. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM: add relocation supportHeiko Schocher2010-09-19-7/+553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | !! This breaks support for all arm boards !! To compile in old style, you must define CONFIG_SYS_ARM_WITHOUT_RELOC or you can compile with "CONFIG_SYS_ARM_WITHOUT_RELOC=1 ./MAKEALL board" !! This define will be removed soon, so convert your board to use relocation support Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> Fix boot from NAND for non-ARM systems Signed-off-by: Wolfgang Denk <wd@denx.de>
| * common: move TOTAL_MALLOC_LEN to include/common.hHeiko Schocher2010-09-19-26/+0
| | | | | | | | | | | | | | Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * relocation: fixup cmdtableHeiko Schocher2010-09-19-92/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM (ARM11): add data cache support, test on Qong boardHeiko Schocher2010-09-19-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add data cache support for arm1136 systems. Enable "cache" command on Qong board and test performance. Test 1: Loading 127 MB of data from NAND flash into RAM: Instr. Cache off on on Data Cache off off on -------------------------------------------------- QONG (ARM11) 177s 95s 43s = x 4.1 Test 2: uncompressing a gzipped image from RAM to RAM (size compressed: 6.5 MiB, uncompressed: 35 MiB): Instr. Cache off on on Data Cache off off on -------------------------------------------------- QONG (ARM11) 1.54s 0.95s 0.18s = x 8.6 Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
| * ARM V7 (OMAP): add data cache support, test on Beagle boardHeiko Schocher2010-09-19-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add data cache support for ARM V7 systems. Used cache flush functions from linux:arch/arm/mm/cache-v7.S developed from Catalin Marinas. Enable "cache" command on Beagle board and test performance. Test 1: Loading 127 MB of data from NAND flash into RAM: Instr. Cache off on on Data Cache off off on -------------------------------------------------- Beagle (Cortex A8) 116s 106s 30.3s = x 3.8 Test 2: uncompressing a gzipped image from RAM to RAM (size compressed: 6.5 MiB, uncompressed: 35 MiB): Instr. Cache off on on Data Cache off off on -------------------------------------------------- Beagle (Cortex A8) 1.84s 1.64s 0.12s = x 15.3 Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Ben Gardiner<bengardiner@nanometrics.ca>
| * ARM (ARM926ejs): add data cache support, tested on magnesium and tx25 boardHeiko Schocher2010-09-19-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable "cache" command on tx25 and magnesium board and test performance. Test 1: Loading 127 MB of data from NAND flash into RAM: Instr. Cache off on on Data Cache off off on -------------------------------------------------- magnesium 32,6s 22,5s 30s = x 1,09 tx25 (29MB only) 9,69s 5,05s 8,16s = x 1,19 Test 2: uncompressing a gzipped image from RAM to RAM (size compressed: 6.5 MiB, uncompressed: 35 MiB): Instr. Cache off on on Data Cache off off on -------------------------------------------------- magnesium 4,25s 2,08s 1,72s = x 2,47 tx25 4,82s 2,04s 1,84s = x 2,62 Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Alessandro Rubini <rubini@gnudd.com>
| * ARM: cp15: setup mmu and enable dcacheHeiko Schocher2010-09-19-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been tested on at91sam9263 and STN8815. Again, I didn't check if it has bad effects on non-arm926 cores. Initially I had a "done" bit to only set up page tables at the beginning. However, since the aligmnent requirement was for the whole object file, this extra integer tool 16kB in BSS, so I chose to remove it. Also, note not all boards use PHYS_SDRAM, but it looks like it's the most used name (more than CONFIG_SYS_DRAM_BASE for example). Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Heiko Schocher <hs@denx.de>
| * arm: get rid of bi_envHeiko Schocher2010-09-19-11/+0
| | | | | | | | | | | | | | | | | | bi_env is nowhere used, so delete it! Signed-off-by: Heiko Schocher <hs@denx.de> similar patch posted from Dirk Behme Tue Jul 27 18:36:09 CEST 2010 http://lists.denx.de/pipermail/u-boot/2010-July/074542.html
| * New implementation for internal handling of environment variables.Wolfgang Denk2010-09-19-69/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: * Old environment code used a pessimizing implementation: - variable lookup used linear search => slow - changed/added variables were added at the end, i. e. most frequently used variables had the slowest access times => slow - each setenv() would calculate the CRC32 checksum over the whole environment block => slow * "redundant" envrionment was locked down to two copies * No easy way to implement features like "reset to factory defaults", or to select one out of several pre-defined (previously saved) sets of environment settings ("profiles") * No easy way to import or export environment settings ====================================================================== API Changes: - Variable names starting with '#' are no longer allowed I didn't find any such variable names being used; it is highly recommended to follow standard conventions and start variable names with an alphanumeric character - "printenv" will now print a backslash at the end of all but the last lines of a multi-line variable value. Multi-line variables have never been formally defined, allthough there is no reason not to use them. Now we define rules how to deal with them, allowing for import and export. - Function forceenv() and the related code in saveenv() was removed. At the moment this is causing build problems for the only user of this code (schmoogie - which has no entry in MAINTAINERS); may be fixed later by implementing the "env set -f" feature. Inconsistencies: - "printenv" will '\\'-escape the '\n' in multi-line variables, while "printenv var" will not do that. ====================================================================== Advantages: - "printenv" output much better readable (sorted) - faster! - extendable (additional variable properties can be added) - new, powerful features like "factory reset" or easy switching between several different environment settings ("profiles") Disadvantages: - Image size grows by typically 5...7 KiB (might shrink a bit again on systems with redundant environment with a following patch series) ====================================================================== Implemented: - env command with subcommands: - env print [arg ...] same as "printenv": print environment - env set [-f] name [arg ...] same as "setenv": set (and delete) environment variables ["-f" - force setting even for read-only variables - not implemented yet.] - end delete [-f] name not implemented yet ["-f" - force delete even for read-only variables] - env save same as "saveenv": save environment - env export [-t | -b | -c] addr [size] export internal representation (hash table) in formats usable for persistent storage or processing: -t: export as text format; if size is given, data will be padded with '\0' bytes; if not, one terminating '\0' will be added (which is included in the "filesize" setting so you can for exmple copy this to flash and keep the termination). -b: export as binary format (name=value pairs separated by '\0', list end marked by double "\0\0") -c: export as checksum protected environment format as used for example by "saveenv" command addr: memory address where environment gets stored size: size of output buffer With "-c" and size is NOT given, then the export command will format the data as currently used for the persistent storage, i. e. it will use CONFIG_ENV_SECT_SIZE as output block size and prepend a valid CRC32 checksum and, in case of resundant environment, a "current" redundancy flag. If size is given, this value will be used instead of CONFIG_ENV_SECT_SIZE; again, CRC32 checksum and redundancy flag will be inserted. With "-b" and "-t", always only the real data (including a terminating '\0' byte) will be written; here the optional size argument will be used to make sure not to overflow the user provided buffer; the command will abort if the size is not sufficient. Any remainign space will be '\0' padded. On successful return, the variable "filesize" will be set. Note that filesize includes the trailing/terminating '\0' byte(s). Usage szenario: create a text snapshot/backup of the current settings: => env export -t 100000 => era ${backup_addr} +${filesize} => cp.b 100000 ${backup_addr} ${filesize} Re-import this snapshot, deleting all other settings: => env import -d -t ${backup_addr} - env import [-d] [-t | -b | -c] addr [size] import external format (text or binary) into hash table, optionally deleting existing values: -d: delete existing environment before importing; otherwise overwrite / append to existion definitions -t: assume text format; either "size" must be given or the text data must be '\0' terminated -b: assume binary format ('\0' separated, "\0\0" terminated) -c: assume checksum protected environment format addr: memory address to read from size: length of input data; if missing, proper '\0' termination is mandatory - env default -f reset default environment: drop all environment settings and load default environment - env ask name [message] [size] same as "askenv": ask for environment variable - env edit name same as "editenv": edit environment variable - env run same as "run": run commands in an environment variable ====================================================================== TODO: - drop default env as implemented now; provide a text file based initialization instead (eventually using several text files to incrementally build it from common blocks) and a tool to convert it into a binary blob / object file. - It would be nice if we could add wildcard support for environment variables; this is needed for variable name auto-completion, but it would also be nice to be able to say "printenv ip*" or "printenv *addr*" - Some boards don't link any more due to the grown code size: DU405, canyonlands, sequoia, socrates. => cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>, Stefan Roese <sr@denx.de>, Heiko Schocher <hs@denx.de> - Dropping forceenv() causes build problems on schmoogie => cc: Sergey Kubushyn <ksi@koi8.net> - Build tested on PPC and ARM only; runtime tested with NOR and NAND flash only => needs testing!! Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>, Cc: Stefan Roese <sr@denx.de>, Cc: Heiko Schocher <hs@denx.de> Cc: Sergey Kubushyn <ksi@koi8.net>
| * Make getenv() work before relocation.Wolfgang Denk2010-09-19-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, getenv() would work before relocation is most cases, even though it was not intended to be used that way. When switching to a hash table based implementation, this would break a number of boards. For convenience, we make getenv() check if it's running before relocation and, if so, use getenv_f() internally. Note that this is limited to simple cases, as we use a small static buffer (32 bytes) in the global data for this purpose. For this reason, it is also not a good idea to convert all current uses of getenv_f() into getenv() - some of the existing use cases need to be able to deal with longer variable values, so getenv_f() is still needed and recommended for use before relocation. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Cleanup use of CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZEWolfgang Denk2010-09-19-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally many boards used local definitions for SRAM base address and size (like SRAM_BASE, SRAM_LEN and/or SRAM_SIZE), while the (now) "official" names are CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE. The corresponding code in arch/powerpc/lib/board.c was board specific, and has never actually been maintained well. Replace this by feature- specific code and adapt the boards that actually use this. NOTE: there is still a ton of boards using the old #defines, which therefor contain incorrect values in bi_sramstart and bi_sramsize. All respective board maintainers are requested to clean up their respective configurations. Thanks. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Josef Wagner <Wagner@Microsys.de> Cc: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de>
* | mpc512x: fix build issuesWolfgang Denk2010-09-28-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 800eb0964 "POST cleanup." removed file arch/powerpc/cpu/mpc512x/common.c but failed to remove the reference to it from arch/powerpc/cpu/mpc512x/Makefile which causes somewhat obscure build errors: make[1]: *** No rule to make target `/work/wd/tmp-ppc/arch/powerpc/cpu/mpc512x/.depend', needed by `_depend'. Stop. Fix these. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | ARMV7: OMAP4: Calculate SDRAM sizeAneesh V2010-09-28-1/+39
| | | | | | | | | | | | | | | | | | | | | | Calculate the SDRAM size from DMM configuration registers instead of using hard-coded values. This gives correct values for all different boards. It's assumed that DMM sections do not overlap memory areas. Signed-off-by: Aneesh V <aneesh@ti.com> Tested-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | ixp/npe: Remove duplicated commentThomas Weber2010-09-28-5/+0
| | | | | | | | Signed-off-by: Thomas Weber <weber@corscience.de>
* | ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs sizeStefan Roese2010-09-23-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the behaviour of the fdt_fixup_nor_flash_node() function. Now it doesn't patch the size of the "reg" property with the chip-select size, but with the size returned from the new function flash_get_bank_size(). This function will return per weak default the flash size of the bank (bank = chip-select numer) detected by the flash driver. If this does not fit your needs, this function may be overridden by a board specific one. For this the parameters needed to be changed. So I intentionally squashed the PPC4xx stuff using this routine into this patch. Otherwise it would not be git-bisectable anymore. The board specific function for the AMCC/APM Ebony eval board is now included in this patch version. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Detlev Zundel <dzu@denx.de> Cc: Gerald Van Baren <vanbaren@cideas.com> Cc: Wolfgang Denk <wd@denx.de>
* | Blackfin: bfin_spi: use same gpio cs define as LinuxMike Frysinger2010-09-21-0/+3
| | | | | | | | | | | | | | | | Linux uses an offset of 8 to switch from hardware cs to a gpio cs, so have u-boot use the same value. Also make sure it is public for boards to access. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | POST cleanup.Michael Zaidman2010-09-21-562/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | - Revives POST for blackfin arch; - Removes redundant code: arch/blackfin/lib/post.c arch/powerpc/cpu/ppc4xx/commproc.c arch/powerpc/cpu/mpc512x/common.c - fixes up the post_word_{load|store} usage. Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de> Tested-by: Anatolij Gustschin <agust@denx.de> List of the maintainers of the affected by patch boards: Cc: Stephan Linz <linz@li-pro.net> Cc: Denis Peter <d.peter@mpl.ch> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Niklaus Giger <niklaus.giger@netstal.com> Cc: Larry Johnson <lrj@acm.org> Cc: Feng Kan <fkan@amcc.com>