summaryrefslogtreecommitdiff
path: root/lib_avr32
AgeCommit message (Collapse)Author
2009-02-23AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ESOlav Morken
The AT32UC3A0512ES chip has a bug when disabling interrupts. As a workaround, two NOPs can be inserted. Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com> Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com> Signed-off-by: Olav Morken <olavmrk@gmail.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-02-23AVR32: Move addrspace.h to arch-directory, and move some functions from io.h ↵Olav Morken
to addrspace.h The AVR32A architecture (which AT32UC3A-series is based on) has a different memory layout than the AVR32B-architecture. This patch moves addrspace.h to an arch-dependent directory in preparation for AT32UC3A-support. It also moves some address-space manipulation functions from io.h to addrspace.h. Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com> Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com> Signed-off-by: Olav Morken <olavmrk@gmail.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-02-23AVR32: Make cacheflush cpu-dependentOlav Morken
The AT32UC3A series of processors doesn't contain any cache, and issuing cache control instructions on those will cause an exception. This commit makes cacheflush.h arch-dependent in preparation for the AT32UC3A-support. Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com> Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com> Signed-off-by: Olav Morken <olavmrk@gmail.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-17Merge branch 'fixes' into cleanupsHaavard Skinnemoen
Conflicts: board/atmel/atngw100/atngw100.c board/atmel/atstk1000/atstk1000.c cpu/at32ap/at32ap700x/gpio.c include/asm-avr32/arch-at32ap700x/clk.h include/configs/atngw100.h include/configs/atstk1002.h include/configs/atstk1003.h include/configs/atstk1004.h include/configs/atstk1006.h include/configs/favr-32-ezkit.h include/configs/hammerhead.h include/configs/mimc200.h
2008-12-08avr32/bootm: remove unused variable 'ret'Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-06Update U-Boot's build timestamp on every compilePeter Tyser
Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-10-29bootm: Add subcommandsKumar Gala
Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10bootm arm/avr32/blackfin/microblaze/nios2/sh: remove no more need 'error' labelJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_NOWHERE in CONFIG_ENV_IS_NOWHEREJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-01avr32: use board_early_init_r instead of board_init_infoHaavard Skinnemoen
Replace the avr32-specific board_init_info hook by the standard board_early_init_r hook and make it optional. board_early_init_r() runs somewhat earlier than board_init_info used to do, but this isn't a problem for any of the in-tree boards. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-01avr32: Use board_postclk_init instead of gclk_initHaavard Skinnemoen
Replace the avr32-specific gclk_init() board hook with the standard board_postclk_init() hook which is supposed to run at the same point during initialization. Provide a dummy weak alias for boards not implementing this hook. The cost of this is: - 2 bytes for the dummy function (retal 0) - 2 bytes for each unnecessary function call (short rcall) which is a pretty small price to pay for avoiding lots of #ifdef clutter. In this particular case, all boards probably end up slightly smaller because we avoid the conditional checking if the gclk_init symbol is NULL. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-26bootm: refactor do_reset and os boot function argsKumar Gala
There is no need for each OS specific function to call do_reset() we can just do it once in bootm. This means its feasible on an error for the OS boot function to return. Also, remove passing in cmd_tbl_t as its not needed by the OS boot functions. flag isn't currently used but might be in the future so we left it alone. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26bootm: refactor ramdisk locating codeKumar Gala
Move determing if we have a ramdisk and where its located into the common code. Keep track of the ramdisk start and end in the bootm_headers_t image struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26bootm: refactor entry point codeKumar Gala
Move entry point code out of each arch and into common code. Keep the entry point in the bootm_headers_t images struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-12Fix fallout from autostart revertKumar Gala
The autostart revert caused a bit of duplicated code as well as code that was using images->autostart that needs to get removed so we can build again. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-05-27avr32: Put memset in its own sectionHaavard Skinnemoen
All C code is compiled with -ffunction-sections -fdata-sections. Assembly functions should get their own sections as well so that everything looks consistent. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-04-17Restore the ability to continue booting after legacy image overwriteMarian Balakowicz
Before new uImage code was merged, bootm code allowed for the kernel image to get overwritten during decompresion. new uImage introduced a check for image overwrites and refused to boot the image that got overwritten. This patch restores the old behavior. It also adds a warning when the image overwriten is a multi-image file, because in such case accessing componentes other than the first one will fail. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12[new uImage] Add new uImage format support to arch specific do_bootm_linux() ↵Marian Balakowicz
routines This patch updates architecture specific implementations of do_bootm_linux() adding new uImage format handling for operations like get kernel entry point address, get kernel image data start address. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12[new uImage] Remove unnecessary arguments passed to ramdisk routinesMarian Balakowicz
boot_get_ramdisk() and image_get_ramdisk() do not need all cmdtp, flag, argc and argv arguments. Simplify routines definition. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29[new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz
This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29[new uImage] Respect autostart setting in linux bootmKumar Gala
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-27[new uImage] Move image verify flag to bootm_headers structureMarian Balakowicz
Do not pass image verification flag directly to related routines. Simplify argument passing and move it to the bootm_header structure which contains curently processed image specific data and is already being passed on the argument list. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-27[Makefile] Sort COBJS in lib_<arch> MakefilesMarian Balakowicz
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-25[new uImage] Add dual format uImage support frameworkMarian Balakowicz
This patch adds framework for dual format images. Format detection is added and the bootm controll flow is updated to include cases for new FIT format uImages. When the legacy (image_header based) format is detected appropriate legacy specific handling is invoked. For the new (FIT based) format uImages dual boot framework has a minial support, that will only print out a corresponding debug messages. Implementation of the FIT specific handling will be added in following patches. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07[new uImage] Factor out common image_get_ramdisk() routineMarian Balakowicz
Architecture specific do_bootm_linux() routines share common ramdisk image processing code. Move this code to a common helper routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07[new uImage] Rename architecture specific bootm code filesMarian Balakowicz
Implementation of the do_bootm_linux() and other bootm helper routines is architecture specific code. As such it resides in lib_<arch> directories in files named <arch>_linux.c This patch renames those files to a more clear and accurate lib_<arch>/bootm.c form. List of the renamed files: lib_arm/armlinux.c -> lib_arm/bootm.c lib_avr32/avr32_linux.c -> lib_avr32/bootm.c lib_blackfin/bf533_linux.c -> lib_blackfin/bootm.c lib_i386/i386_linux.c -> lib_i386/bootm.c lib_m68k/m68k_linux.c -> lib_m68k/bootm.c lib_microblaze/microblaze_linux.c -> lib_microblaze/bootm.c lib_mips/mips_linux.c -> lib_mips/bootm.c lib_nios/nios_linux.c -> lib_nios/bootm.c lib_nios2/nios_linux.c -> lib_nios2/bootm.c lib_ppc/ppc_linux.c -> lib_ppc/bootm.c lib_sh/sh_linux.c -> lib_sh/bootm.c Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07[new uImage] Cleanup image header pointer use in bootm codeMarian Balakowicz
- use single image header pointer instead of a set of auxilliary variables. - add multi component image helper routines: get component size/data address Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07[new uImage] Define a API for image handling operationsMarian Balakowicz
- Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-01-18AVR32: Initialize ipaddr, loadaddr and bootfile at startupHaavard Skinnemoen
I don't know why the relevant layers can't do this by itself, but this is what ppc does. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17AVR32: Fix logic inversion in disable_interrupts()Haavard Skinnemoen
disable_interrupts() should return nonzero if interrupts were _enabled_ before, not disabled. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17AVR32: Enable interrupts at bootupHaavard Skinnemoen
The timer code depends on the timer interrupt to keep track of the upper 32 bits of the cycle counter. This obviously doesn't work when interrupts are disabled the whole time. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-06AVR32: Initialize bi_flash* in board_init_rHaavard Skinnemoen
The ATSTK1000-specific flash driver intializes bi_flashstart, bi_flashsize and bi_flashoffset, but other flash drivers, like the CFI driver, don't. Initialize these in board_init_r instead so that things will still be set up correctly when we switch to the CFI driver. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-08-10Move 64bit division from avr32 to generic libDirk Behme
Move the 64bit division from lib_avr32 to lib_generic. With this, all boards can do_div/__div64_32 if needed, not only avr one. Code is put to lib_generic, so no larger memory footprint if not used. No code modifications. Thanks for proposal by Håvard Skinnemoen. Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
2007-08-06Merge with /home/wd/git/u-boot/custodian/u-boot-testingWolfgang Denk
2007-07-13make show_boot_progress () weak.Heiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de>
2007-07-09lib_{arm,avr32,blackfin,generic,i386}/: Remove obsolete references to ↵Jon Loeliger
CONFIG_COMMANDS Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04lib_*/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-04-14AVR32: Enable networkingHaavard Skinnemoen
Implement MACB initialization for AVR32 and ATSTK1000, and turn everything on, including the MACB driver. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-14AVR32: Implement simple DMA memory allocatorHaavard Skinnemoen
Implement dma_alloc_coherent() which returns cache-aligned uncacheable memory. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-14AVR32: Use initdram() instead of board_init_memories()Haavard Skinnemoen
Conform to the "standard" interface and use initdram() instead of board_init_memories() on AVR32. This enables us to get rid of the sdram_size member of the global_data struct as well. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-14AVR32: Relocate u-boot to SDRAMHaavard Skinnemoen
Relocate the u-boot image into SDRAM like everyone else does. This means that we can handle much larger .data and .bss than we used to. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-14AVR32: Resource management rewriteHaavard Skinnemoen
Rewrite the resource management code (i.e. I/O memory, clock gating, gpio) so it doesn't depend on any global state. This is necessary because this code is heavily used before relocation to RAM, so we can't write to any global variables. As an added bonus, this makes u-boot's memory footprint a bit smaller, although some functionality has been left out; all clocks are enabled all the time, and there's no checking for gpio line conflicts. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-14AVR32: Split start_u_boot into board_init_f and board_init_rHaavard Skinnemoen
Split the avr32 initialization code into a function to run before relocation, board_init_f and a function to run after relocation, board_init_r. For now, board_init_f simply calls board_init_r at the end. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-10-27Fix "ar" flags in some Makefiles to allow for silent "make -s"Wolfgang Denk
2006-10-24Add AVR32 architecture supportWolfgang Denk
Patch by Haavard Skinnemoen, 6 Sep 2006 16:23:02 +0200 This patch adds common infrastructure code for the Atmel AVR32 architecture. See doc/README.AVR32 for details. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>