summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* 83xx/85xx/86xx: add more MxMR local bus definitionsWolfgang Grandegger2008-06-10-5/+38
| | | | | | | | | | | | | | | | | | | | 83xx/85xx/86xx: add more MxMR local bus definitions This patch adds more macro definitions for the UPM Machine Mode Registers They are copied from "include/mpc82xx.h" to simplify the merge of all 8xxx common local bus definitions into include/asm-ppc/fsl_lbc.h. They are required for my forthcoming FSL NAND UPM driver re-write and the support for the TQM8548 module. This patch is based on the following two patches from Anton Vorontsov: http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06511.html http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06587.html I leave coding style violation fixes, code beautification and name corrections to somebody else ;-(. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
* 83xx/85xx: further localbus cleanupsAnton Vorontsov2008-06-10-45/+23
| | | | | | | Merge mpc85xx.h's LBC defines to fsl_lbc.h. Also, adopt ACS names from mpc85xx.h, so ACS_0b10 renamed to ACS_DIV4, ACS_0b11 to ACS_DIV2. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* 83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.hAnton Vorontsov2008-06-10-233/+256
| | | | | | | This patch moves Freescale Localbus defines out of mpc83xx.h, so we could use it on MPC85xx and MPC86xx processors. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* 85xx: Add setting of cache props in the device tree.Kumar Gala2008-06-10-0/+128
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* 85xx: expose cpu identificationKumar Gala2008-06-10-36/+51
| | | | | | | | | | | | | The current cpu identification code is used just to return the name of the processor at boot. There are some other locations that the name is useful (device tree setup). Expose the functionality to other bits of code. Also, drop the 'E' suffix and add it on by looking at the SVR version when we print this out. This is mainly to allow the most flexible use of the name. The device tree code tends to not care about the 'E' suffix. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* 85xx: Only use PORPLLSR[DDR_Ratio] on platforms that define itKumar Gala2008-06-09-2/+6
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* MPC85xx: Change traps.c to not reference non-addressable memoryBecky Bruce2008-06-09-3/+5
| | | | | | | | | | | 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>
* Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/masterWolfgang Denk2008-06-05-1279/+8590
|\
| * Socrates: Fix PCI bus frequency reportWolfgang Denk2008-06-03-3/+13
| | | | | | | | Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
| * Fix incorrect switch for IF_TYPE in part.cTor Krill2008-06-03-2/+2
| | | | | | | | | | | | | | | | | | Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b3195. Also added fix from Martin Krause Signed-off-by: Tor Krill <tor@excito.com>
| * Add size #defines for Altera Cyclone-II EP2C8 and EP2C20.Andre Schwarz2008-06-03-0/+2
| | | | | | | | Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
| * Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before ↵Peter Tyser2008-06-03-6/+0
| | | | | | | | | | | | | | | | | | | | | | relocating Removed unneeded command line history initialization. Also, the original code would access the 'initted' variable before relocation to SDRAM which resulted in erratic behavior since the bss is not initialized when executing from flash. Signed-off-by: Peter Tyser <ptyser@xes-inc.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>
| * DTT: Issue one-shot command on AD7414 (LM75 code) to read tempStefan Roese2008-06-03-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On AD7414 the first value upon bootup is not read correctly. This is most likely because of the 800ms update time of the temp register in normal update mode. To get current values each time we issue the "dtt" command including upon powerup we switch into one-short mode. This patch fixes the problem on AD7414 equipped boards (Sequoia, Canyonlands etc), that temp value printed in the bootup log was incorrect. Signed-off-by: Stefan Roese <sr@denx.de>
| * Add support for environment in SPI flashHaavard Skinnemoen2008-06-03-2/+136
| | | | | | | | | | | | | | | | | | This is pretty incomplete...it doesn't handle reading the environment before relocation, it doesn't support redundant environment, and it doesn't support embedded environment. But apart from that, it does seem to work. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * SPI Flash: Add "sf" commandHaavard Skinnemoen2008-06-03-0/+192
| | | | | | | | | | | | | | | | This adds a new command, "sf" which can be used to manipulate SPI flash. Currently, initialization, reading, writing and erasing is supported. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * SPI Flash subsystemHaavard Skinnemoen2008-06-03-0/+688
| | | | | | | | | | | | | | | | | | | | This adds a new SPI flash subsystem. Currently, only AT45 DataFlash in non-power-of-two mode is supported, but some preliminary support for other flash types is in place as well. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * atmel_spi: Driver for the Atmel SPI controllerHans-Christian Egtvedt2008-06-03-0/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-209/+584
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Move definition of container_of() to common.hHaavard Skinnemoen2008-06-03-22/+11
| | | | | | | | | | | | | | | | | | | | | | AVR32 and AT91SAM9 both have their own identical definitions of container_of() taken from the Linux kernel. Move it to common.h so that all architectures can use it. container_of() is already used by some drivers, and will be used extensively by the new and improved SPI API. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * soft_i2c: Pull SDA high before readingHaavard Skinnemoen2008-06-03-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Spotted by Dean Capindale. Systems that support open-drain GPIO properly are allowed provide an empty I2C_TRISTATE define. However, this means that we need to be careful not to drive SDA low when the slave is expected to respond. This patch adds a missing I2C_SDA(1) to read_byte() required to tristate the SDA line on systems that support open-drain GPIO. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| * Fix warnings from gcc-4.3.0 build on a ppc hostKumar Gala2008-06-03-1/+3
| | | | | | | | | | | | | | | | | | | | | | * The cfi_flash.c memset fix actual allows the board to boot so there is a bit more going on here than just resolving warnings associated with uninitialized variables. * include/asm/bitops.h:302: warning: '__swab32p' is static but used in inline function 'ext2_find_next_zero_bit' which is not static Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * 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>
| * Make sure common.h is the first include.Kumar Gala2008-06-03-1/+2
| | | | | | | | | | | | | | | | | | If common.h isn't first we can get CONFIG_ options defined in the board config file ignored. This can cause an issue if any of those config options impact the size of types of data structures (eg CONFIG_PHYS_64BIT). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * Avoid initrd and logbuffer area overlapsMarian Balakowicz2008-06-03-1/+25
| | | | | | | | | | | | | | | | | | Add logbuffer to reserved LMB areas to prevent initrd allocation from overlaping with it. Make sure to use correct logbuffer base address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * lwmon5: add memory-pattern-test to FPGA POST.Sascha Laue2008-06-03-0/+50
| |
| * PPC: 86xx Add bat registers to reginfo commandBecky Bruce2008-06-03-1/+3
| | | | | | | | Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
| * PPC: Add print_bats() to lib_ppc/bat_rw.cBecky Bruce2008-06-03-0/+42
| | | | | | | | | | | | | | | | | | This function prints the values of all the BAT register pairs - I needed this for debug earlier this week; adding it to lib_ppc so others can use it (and add it to reginfo commands if so desired). Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
| * PPC: Change lib_ppc/bat_rw.c to use high batsBecky Bruce2008-06-03-41/+97
| | | | | | | | | | | | | | | | Currently, this code only deals with BATs 0-3, which makes it useless on systems that support BATs 4-7. Add the support for these registers. Signed-off-by: Becky Bruce <Becky.bruce@freescale.com>
| * PPC: Create and use CONFIG_HIGH_BATSBecky Bruce2008-06-03-7/+84
| | | | | | | | | | | | | | | | | | | | | | 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-99/+3494
| |\
| | * MAKEALL: add at91 listJean-Christophe PLAGNIOL-VILLARD2008-05-24-1/+19
| | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Merging Stelian Pop AT91 patchesJean-Christophe PLAGNIOL-VILLARD2008-05-24-106/+3475
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * Cleanup nand_info[] declaration.Stelian Pop2008-05-13-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nand_info array is declared as extern in several .c files. Those days, nand.h contains a reference to the array, so there is no need to declare it elsewhere. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91: Cleanup unused config header file definitions.Stelian Pop2008-05-10-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_ENV_OVERWRITE is commented out in the config header files, so let's cleanup the files by removing the whole definition. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * Support AT91CAP9 revC CPUsStelian Pop2008-05-10-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AT91CAP9 revC CPU has a few differences over the previous, revB CPU which was distributed in small quantities only (revA was an internal Atmel product only). The revC silicon needs a special initialisation sequence to switch from the internal (imprecise) RC oscillator to the external 32k clock. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * Use custom logo for Atmel boardsStelian Pop2008-05-10-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a custom vendor logo for the Atmel AT91 boards. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9RLEK: hook up the ATMEL LCD driverStelian Pop2008-05-10-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the necessary adaptations (PIO configurations and defines in config header file) to hook up the Atmel LCD driver to the AT91SAM9RLEK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9263EK: hook up the ATMEL LCD driverStelian Pop2008-05-10-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the necessary adaptations (PIO configurations and defines in config header file) to hook up the Atmel LCD driver to the AT91SAM9263EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9261EK: hook up the ATMEL LCD driverStelian Pop2008-05-10-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the necessary adaptations (PIO configurations and defines in config header file) to hook up the Atmel LCD driver to the AT91SAM9261EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91CAP9ADK: hook up the ATMEL LCD driverStelian Pop2008-05-10-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the necessary adaptations (PIO configurations and defines in config header file) to hook up the Atmel LCD driver to the AT91CAP9ADK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * Add ATMEL LCD driverStelian Pop2008-05-10-13/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the ATMEL LCDC driver which is used on some AT91 and AVR platforms. Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9RLEK supportStelian Pop2008-05-10-0/+787
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AT91SAM9RL chip and the AT91SAM9RLEK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9263EK supportStelian Pop2008-05-10-3/+960
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AT91SAM9263 chip and the AT91SAM9263EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9261EK supportStelian Pop2008-05-10-0/+827
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMANDStelian Pop2008-05-10-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND in order to cope with the changes in DataFlash partitionning scheme (cset c3a60cb3). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9260EK: Normalize BOOTARGSStelian Pop2008-05-10-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adapts CONFIG_BOOTARGS to the chosen boot method (boot from DataFlash or from NAND), and gives to Linux a fully specified mtdparts variable. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9260EK: Normalize SPI timingsStelian Pop2008-05-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the SPI timings to closely match the ones used by the Linux kernel and the Atmel's own bootstrap project. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91SAM9260EK: Handle 8 or 16 bit NANDStelian Pop2008-05-10-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Atmel boards can handle 8 or 16 bit NAND memories. This patch makes the support configurable in the board config header file (CFG_NAND_DBW_8 or CFG_NAND_DBW_16). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | | * AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMANDStelian Pop2008-05-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND in order to cope with the changes in DataFlash partitionning scheme (cset c3a60cb3). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>