summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS] Rename Alchemy processor configs into CONFIG_SOC_*Shinya Kuribayashi2008-06-078-26/+26
| | | | | | | | | | | | | | CONFIG_SOC_AU1X00 Common Alchemy Au1x00 stuff. All Alchemy processor based machines need to have this config as a system type specifier. CONFIG_SOC_AU1000, CONFIG_SOC_AU1100, CONFIG_SOC_AU1200, CONFIG_SOC_AU1500, CONFIG_SOC_AU1550 Machine type specifiers. Each port should have one of aboves. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] Update <asm/addrspace.h> headerShinya Kuribayashi2008-06-058-98/+181
| | | | | | | - Fix traditional KSEG names - Replace PHYSADDR with CPHYSADDR Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] mips_config.mk: Misc fixesShinya Kuribayashi2008-06-051-4/+3
| | | | | | | - Kill redundant `-pipe' (this will be added by $(TOPDIR)/config.mk) - Modify comments Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] Kill unused <version.h> inclusionsShinya Kuribayashi2008-06-0510-10/+0
| | | | Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] lib_mips/time.c: Fix CP0 count register usage and timer routinesShinya Kuribayashi2008-06-058-13/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MIPS port has two problems in timer routines. One is now we assume CFG_HZ equals to CP0 counter frequency, but this is wrong. CFG_HZ has to be 1000 in the U-Boot system. The other is we don't have a proper time management counter like timestamp other ARCHs have. We need the 32-bit millisecond clock counter. This patch introduces timestamp and CYCLES_PER_JIFFY. timestamp is a 32-bit non-overflowing CFG_HZ counter, and CYCLES_PER_JIFFY is the number of calculated CP0 counter cycles in a CFG_HZ. STRATEGY: * Fix improper CFG_HZ value to have 1000 * Use CFG_MIPS_TIMER_FREQ for timer counter frequency, instead. * timer_init: initialize timestamp and set up the first timer expiration. Note that we don't need to initialize CP0 count/compare registers here as they have been already zeroed out on the system reset. Leave them as they are. * get_timer: calculate how many timestamps have been passed, then return base-relative timestamp. Make sure we can easily count missed timestamps regardless of CP0 count/compare value. * get_ticks: return the current timestamp, that is get_timer(0). Most parts are from good old Linux v2.6.16 kernel. v2: - Remove FIXME comments as they turned out to be trivial. - Use CP0 compare register as a global variable for expirelo. - Kill a global variable 'cycles_per_jiffy'. Use #define CYCLES_PER_JIFFY instead. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] lib_mips/time.c: Fix udelayShinya Kuribayashi2008-06-051-5/+4
| | | | | | | What we have to do is just to wait for given micro-seconds. No need to take into account current time, get_timer and CFG_HZ. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* [MIPS] lib_mips/time.c: Replace CP0 access functions with existing macrosShinya Kuribayashi2008-06-051-27/+8
| | | | | | | | We already have many pre-defined CP0 access macros in <asm/mipsregs.h>. This patch replaces mips_{compare,count}_set and mips_count_get with existing macros. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
* Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/masterWolfgang Denk2008-06-05207-1279/+8590
|\
| * Socrates: Fix PCI bus frequency reportWolfgang Denk2008-06-032-3/+13
| | | | | | | | Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
| * Fix incorrect switch for IF_TYPE in part.cTor Krill2008-06-031-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-031-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-031-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-031-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-031-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-034-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-032-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-036-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-037-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-0315-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-033-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-031-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-032-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-031-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-031-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-034-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-031-0/+50
| |
| * PPC: 86xx Add bat registers to reginfo commandBecky Bruce2008-06-031-1/+3
| | | | | | | | Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
| * PPC: Add print_bats() to lib_ppc/bat_rw.cBecky Bruce2008-06-032-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-032-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-0347-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-0359-99/+3494
| |\
| | * MAKEALL: add at91 listJean-Christophe PLAGNIOL-VILLARD2008-05-241-1/+19
| | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Merging Stelian Pop AT91 patchesJean-Christophe PLAGNIOL-VILLARD2008-05-2462-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-134-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-105-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-103-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-102-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-102-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-102-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-102-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-102-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-108-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-1013-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-1015-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-1015-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-101-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-101-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-101-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-103-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-101-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>
OpenPOWER on IntegriCloud