summaryrefslogtreecommitdiff
path: root/cpu
Commit message (Collapse)AuthorAgeLines
* Remove the deprecated CONFIG_OF_FLAT_TREEGerald Van Baren2008-06-09-4/+0
| | | | | | | Use CONFIG_OF_LIBFDT instead to support flattened device trees. It is cleaner, has better functionality, and is better supported. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* Convert mpc7448hpc2 to CONFIG_OF_LIBFDTGerald Van Baren2008-06-09-20/+15
| | | | | | | | | | | | | This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change to CONFIG_OF_LIBFDT. WARNING: This conversion is untested because I do not have a board to test it on. NOTE: The FDT blob (DTS) must have an /aliases/ethernet0 and (optionally) /aliases/ethernet1 property for the ethernet to work. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* PPC4xx: Simplified post_word_{load, store}Grant Erickson2008-06-03-15/+11
| | | | | | | This patch simplifies post_word_{load,store} by using the preprocessor to eliminate redundant, copy-and-pasted code. Signed-off-by: Grant Erickson <gerickson@nuovations.com>
* atmel_spi: Driver for the Atmel SPI controllerHans-Christian Egtvedt2008-06-03-0/+43
| | | | | | | | | | | | | | | This adds a driver for the SPI controller found on most AT91 and AVR32 chips, implementing the new SPI API. Changed in v4: - Update to new API - Handle zero-length transfers appropriately. The user may send a zero-length SPI transfer with SPI_XFER_END set in order to deactivate the chip select after a series of transfers with chip select active. This is useful e.g. when polling the status register of DataFlash. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* SPI API improvementsHaavard Skinnemoen2008-06-03-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gets rid of the spi_chipsel table and adds a handful of new functions that makes the SPI layer cleaner and more flexible. Instead of the spi_chipsel table, each board that wants to use SPI gets to implement three hooks: * spi_cs_activate(): Activates the chipselect for a given slave * spi_cs_deactivate(): Deactivates the chipselect for a given slave * spi_cs_is_valid(): Determines if the given bus/chipselect combination can be activated. Not all drivers may need those extra functions however. If that's the case, the board code may just leave them out (assuming they know what the driver needs) or rely on the linker to strip them out (assuming --gc-sections is being used.) To set up communication parameters for a given slave, the driver needs to call spi_setup_slave(). This returns a pointer to an opaque spi_slave struct which must be passed as a parameter to subsequent SPI calls. This struct can be freed by calling spi_free_slave(), but most driver probably don't want to do this. Before starting one or more SPI transfers, the driver must call spi_claim_bus() to gain exclusive access to the SPI bus and initialize the hardware. When all transfers are done, the driver must call spi_release_bus() to make the bus available to others, and possibly shut down the SPI controller hardware. spi_xfer() behaves mostly the same as before, but it now takes a spi_slave parameter instead of a spi_chipsel function pointer. It also got a new parameter, flags, which is used to specify chip select behaviour. This may be extended with other flags in the future. This patch has been build-tested on all powerpc and arm boards involved. I have not tested NIOS since I don't have a toolchain for it installed, so I expect some breakage there even though I've tried fixing up everything I could find by visual inspection. I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and DataFlash drivers posted as a follow-up. I'd like some help testing other boards that use the existing SPI API. But most of all, I'd like some comments on the new API. Is this stuff usable for everyone? If not, why? Changed in v4: - Build fixes for various boards, drivers and commands - Provide common struct spi_slave definition that can be extended by drivers - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate - Make default bus and mode build-time configurable - Override default SPI bus ID and mode on mx32ads and imx31_litekit. Changed in v3: - Add opaque struct spi_slave for controller-specific data associated with a slave. - Add spi_claim_bus() and spi_release_bus() - Add spi_free_slave() - spi_setup() is now called spi_setup_slave() and returns a struct spi_slave - soft_spi now supports four SPI modes (CPOL|CPHA) - Add bus parameter to spi_setup_slave() - Convert the new i.MX32 SPI driver - Convert the new MC13783 RTC driver Changed in v2: - Convert the mpc8xxx_spi driver and the mpc8349emds board to the new API. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Tested-by: Guennadi Liakhovetski <lg@denx.de>
* MPC512x: Change traps.c to not reference non-addressable memoryBecky Bruce2008-06-03-1/+7
| | | | | | | | | | | Currently, END_OF_RAM is used by the trap code to determine if we should attempt to access the stack pointer or not. However, on systems with a lot of RAM, only a subset of the RAM is guaranteed to be mapped in and accessible. Change END_OF_RAM to use get_effective_memsize() instead of using the raw ram size out of the bd. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* PPC: 86xx Add bat registers to reginfo commandBecky Bruce2008-06-03-1/+3
| | | | Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* PPC: Create and use CONFIG_HIGH_BATSBecky Bruce2008-06-03-6/+6
| | | | | | | | | | | Change all code that conditionally operates on high bat registers (that is, BATs 4-7) to look at CONFIG_HIGH_BATS instead of the myriad ways this is done now. Define the option for every config for which high bats are supported (and enabled by early boot, on parts where they're not always enabled) Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* Merge remote branch 'u-boot-at91/for-1.3.4'Wolfgang Denk2008-06-03-0/+66
|\
| * Merging Stelian Pop AT91 patchesJean-Christophe PLAGNIOL-VILLARD2008-05-24-0/+66
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch 'testing-V2' Conflicts: board/atmel/at91cap9adk/Makefile Fixing copyright board/atmel/at91sam9260ek/Makefile Fixing copyright board/atmel/at91sam9260ek/u-boot.lds Delete no more needed ld script Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * AT91SAM9261EK supportStelian Pop2008-05-10-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AT91SAM9261 chip and the AT91SAM9261EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platformsStelian Pop2008-05-10-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | All the AT91CAP9/AT91SAM9 boards have the same linker script. The patch below avoids the duplication of u-boot.lds by putting the file in the cpu directory instead of the board one. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Fix @ -> <at> substitutionStelian Pop2008-05-08-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying the AT91CAP9 patches upstream, something transformed the '@' character into the ' <at> ' sequence. The patch below restores the original form in all the places where it has been modified (the AT91CAP9 files, the AT91SAM9260 files which were copied from AT91CAP9, and a couple of other files where the ' <at> ' sequence was present). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | Merge remote branch 'u-boot-avr32/master'Wolfgang Denk2008-06-03-248/+260
|\ \ \
| * | | avr32: Fix theoretical race in udelay()Haavard Skinnemoen2008-05-27-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the specified delay is very short, the cycle counter may go past the "end" time we are waiting for before we get around to reading it. Fix it by checking the different between the cycle count "now" and the cycle count at the beginning. This will work as long as the delay measured in number of cycles is below 2^31. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Compile atmel_mci.o conditionallyHaavard Skinnemoen2008-05-27-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove #ifdef CONFIG_MMC from the source file and use conditional compilation in the Makefile instead. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Fix wrong error flags in atmel_mci driverHaavard Skinnemoen2008-05-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we check for CRC errors when sending commands that use CRC checking. Reported-by: Gururaja Hebbar K R <gururajakr@sanyo.co.in> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Fix two warnings in atmel_mci.cHaavard Skinnemoen2008-05-27-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The warnings are harmless but annoying. Let's fix them. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Rework SDRAM initialization codeHaavard Skinnemoen2008-05-27-63/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up the SDRAM initialization and related code a bit, and allows faster booting. * Add definitions for EBI and internal SRAM to asm/arch/memory-map.h * Remove memory test from sdram_init() and make caller responsible for verifying the SDRAM and determining its size. * Remove base_address member from struct sdram_config (was sdram_info) * Add data_bits member to struct sdram_config and kill CFG_SDRAM_16BIT * Add support for a common STK1000 hack: 16MB SDRAM instead of 8. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Do stricter stack checking in the exception handlerHaavard Skinnemoen2008-05-27-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't do a stack dump if the stack pointer is outside the memory area reserved for stack. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Use the same entry point for reset and exception handlingHaavard Skinnemoen2008-05-27-74/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the reset vector is always aligned to a very large boundary, we can save a couple of KB worth of alignment padding by placing the exception vectors at the same address. Deciding which one it is is easy: If we're handling an exception, the CPU is in Exception mode. If we're starting up after reset, the CPU is in Supervisor mode. So this adds a very minimal overhead to the reset path (only executed once) and the exception handling path (normally never executed at all.) Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Rename pm_init() as clk_init() and make SoC-specificHaavard Skinnemoen2008-05-27-44/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pm_init() was always more about clock initialization than anything else. Dealing with PLLs, clock gating and such is also inherently SoC-specific, so move it into a SoC-specific directory. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Use new-style Makefile for the at32ap platformHaavard Skinnemoen2008-05-27-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to avoid compiling certain files later. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Remove unused file cpu/at32ap/pm.cHaavard Skinnemoen2008-05-27-42/+0
| | | | | | | | | | | | | | | | Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Get rid of the .flashprog sectionHaavard Skinnemoen2008-05-27-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .flashprog section was only needed back when we were running directly from flash, and it's even more useless on NGW100 since it uses the CFI flash driver which never used this workaround in the first place. Remove it on STK1000 as well, and get rid of all the associated code and annotations. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * | | avr32: Disable the AP7000 internal watchdog on startupDavid Brownell2008-05-27-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This patch forces the watchdog off in all cases. That will at least get rid of the constant reboot cycle, though it won't let the watchdog actually run in the new kernels: its probe() comes up with a polite warning. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* | | [MIPS] <asm/mipsregs.h>: Update coprocessor register access macrosShinya Kuribayashi2008-05-30-5/+5
|/ / | | | | | | Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* | Merge branch 'master' of git://git.denx.de/u-boot-testingWolfgang Denk2008-05-21-3/+3
|\ \
| * | Fix some whitespace issuesWolfgang Denk2008-05-21-3/+3
| | | | | | | | | | | | | | | | | | introduced by 53677ef18 "Big white-space cleanup." Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | Merge branch 'socrates' of /home/wd/git/u-boot/projectsWolfgang Denk2008-05-21-9/+14
|\ \ \ | |/ / |/| |
| * | Fixed reset for socratesSergei Poselenov2008-05-20-9/+14
| | | | | | | | | | | | Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
* | | Big white-space cleanup.Wolfgang Denk2008-05-21-748/+748
|/ / | | | | | | | | | | | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | i386: Fix multiple definitions of __show_boot_progressJean-Christophe PLAGNIOL-VILLARD2008-05-19-10/+10
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | ppc4xx: Add 405EX(r) revision C PVR definitions and detection codeStefan Roese2008-05-13-0/+20
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
* | Fix @ -> <at> substitutionStelian Pop2008-05-10-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | When applying the AT91CAP9 patches upstream, something transformed the '@' character into the ' <at> ' sequence. The patch below restores the original form in all the places where it has been modified (the AT91CAP9 files, the AT91SAM9260 files which were copied from AT91CAP9, and a couple of other files where the ' <at> ' sequence was present). Signed-off-by: Stelian Pop <stelian@popies.net>
* | mx31ads: fix 32kHz clock handlingGuennadi Liakhovetski2008-05-10-2/+2
| | | | | | | | | | | | | | | | | | According to schematics and to RedBoot sources, the MX31ADS uses a 32768Hz oscillator as a SKIL source. Fix previously wrongly assumed 32000Hz value. Also fix a typo when verifying a jumper configuration. While at it, make two needlessly global functions static. Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
* | Merge branch 'master' of git://www.denx.de/git/u-boot-mipsWolfgang Denk2008-05-09-2/+4
|\ \
| * | [MIPS] cpu/mips/cache.S: Fix build warningShinya Kuribayashi2008-05-06-2/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some old GNU assemblers, such as v2.14 (ELDK 3.1.1), v2.16 (ELDK 4.1.0), warns illegal global symbol references by bal (and jal also) instruction. This does not happen with the latest binutils v2.18. Here's an example on gth2_config: mips_4KC-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0x90000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isy stem /opt/eldk311/usr/bin/../lib/gcc-lib/mips-linux/3.3.3/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4k c -EB -c -o cache.o cache.S cache.S: Assembler messages: cache.S:243: Warning: Pretending global symbol used as branch target is local. cache.S:250: Warning: Pretending global symbol used as branch target is local. In principle, gas might be sensitive to global symbol references in PIC code because they should be processed through GOT (global offset table). But if `bal' instruction is used, it results in PC-based offset jump. This is the cause of this warning. In practice, we know it doesn't matter whether PC-based reference or GOT- based. As for this case, both will work before/after relocation. But let's fix the code. This patch explicitly sets up a target address, then jump there. Here's an example of disassembled code with/without this patch. 90000668: 1485ffef bne a0,a1,90000628 <mips_cache_reset+0x20> 9000066c: ac80fffc sw zero,-4(a0) 90000670: 01402821 move a1,t2 -90000674: 0411ffba bal 90000560 <mips_init_icache> -90000678: 01803021 move a2,t4 -9000067c: 01602821 move a1,t3 -90000680: 0411ffcc bal 900005b4 <mips_init_dcache> -90000684: 01a03021 move a2,t5 -90000688: 03000008 jr t8 -9000068c: 00000000 nop +90000674: 01803021 move a2,t4 +90000678: 8f8f83ec lw t7,-31764(gp) +9000067c: 01e0f809 jalr t7 +90000680: 00000000 nop +90000684: 01602821 move a1,t3 +90000688: 01a03021 move a2,t5 +9000068c: 8f8f81e0 lw t7,-32288(gp) +90000690: 01e0f809 jalr t7 +90000694: 00000000 nop +90000698: 03000008 jr t8 +9000069c: 00000000 nop Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* | Merge branch 'master' of /home/wd/git/u-boot/master/Wolfgang Denk2008-05-09-3/+22
|\ \
| * | Fix some typosAdrian Filipi2008-05-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes three typos. The first is a repetition of CONFIG_CMD_BSP. The second makes the #endif comment match its #if. The third is a spelling error. Signed-off-by: Adrian Filipi <adrian.filipi@eurotech.com>
| * | 7450 and 86xx L2 cache invalidate bug correctionsWheatley Travis2008-05-09-2/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The 7610 and related parts have an L2IP bit in the L2CR that is monitored to signal when the L2 cache invalidate is complete whereas the 7450 and related parts utilize L2I for this purpose. However, the current code does not account for this difference. Additionally the 86xx L2 cache invalidate code used an "andi" instruction where an "andis" instruction should have been used. This patch addresses both of these bugs. Signed-off-by: Travis Wheatley <travis.wheatley@freescale.com> Acked-By: Jon Loeliger <jdl@freescale.com>
* | ppc4xx: Add weak default ft_board_setup() routineStefan Roese2008-05-08-3/+23
| | | | | | | | | | | | | | | | This patch adds a default ft_board_setup() routine to the 4xx fdt code. This routine is defined as weak and can be overwritten by a board specific one if needed. Signed-off-by: Stefan Roese <sr@denx.de>
* | ppc4xx: Fix typos in 460GT/EX FBDV arrayDave Mitchell2008-05-08-1/+1
|/ | | | | | | Corrected two typos in the 460GT/EX FBDV array. Signed-off-by: Dave Mitchell <dmitchell@amcc.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/masterWolfgang Denk2008-05-05-3/+6
|\
| * Allow building mips versions with ELDK 3.1.1Vlad Lungu2008-05-05-3/+6
| | | | | | | | | | | | .gpword works only with local symbols on certain binutils versions Signed-off-by: Vlad Lungu <vlad.lungu@windrvier.com>
* | Merge branch 'master' of /home/wd/git/u-boot/master/Wolfgang Denk2008-05-04-1/+17
|\ \ | |/
| * Merge branch 'master' of git://www.denx.de/git/u-boot-mipsWolfgang Denk2008-05-04-1/+17
| |\
| | * [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version pickerShinya Kuribayashi2008-05-03-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current trick to pick up GNU assembler minor version uses a dot(.) as a delimiter, and take the second field to obtain minor version number. But as can be expected, this doesn't work with a version string which has dots more than needs. Here's an example: $ mips-linux-gnu-as --version | grep 'GNU assembler' GNU assembler (Sourcery G++ Lite 4.2-129) 2.18.50.20080215 $ mips-linux-gnu-as --version | grep 'GNU assembler' | cut -d. -f2 2-129) 2 $ This patch restricts the version format to 2.XX.XX... This will work in most cases. $ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' 2.18.50.20080215 $ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2 18 $ Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
| | * [MIPS] cpu/mips/cache.S: Add dcache_enableShinya Kuribayashi2008-05-03-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Recent bootelf command fixes (017e9b7925f74878d0e9475388cca9bda5ef9482, "allow ports to override bootelf behavior") requires ports to have this function. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | Revert "ColdFire: Get information from the correct GCC"Wolfgang Denk2008-05-03-6/+6
|/ / | | | | | | | | This reverts commit b7166e05a513c0806b63b9dfb6f1d77645cede2a (replaced by commit c4e5f52a58d278eebb87f476e353972c5dacea40).