summaryrefslogtreecommitdiffstats
path: root/arch/avr32/cpu
Commit message (Collapse)AuthorAgeFilesLines
* avr32: add generic board supportAndreas Bießmann2015-02-171-0/+2
| | | | Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* avr32: use generic gd->start_addr_spAndreas Bießmann2015-02-171-3/+3
| | | | | | | | Before avr32 had an extra storage for stack end to have a nice stack printout on exception. Remove this extra storage and use generic gd->start_addr_sp instead. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* avr32: rename mmu.h definitionsAndreas Bießmann2015-02-171-4/+4
| | | | | | | Prefix mmu.h PAGE_xxx definitions with MMU_ in order to prevent a naming conflict with other definitions. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* avr32: factor out cpu_mmc_init()Andreas Bießmann2015-02-172-0/+17
| | | | | | | | cpu_mmc_init() is required by the init sequence to have a working MMC interface on avr32. This will not be included in the binary if we omit the avr32 board.c when building the generic board. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* avr32: rename cpu_init() -> arch_cpu_init()Andreas Bießmann2015-02-171-1/+1
| | | | | Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: use SoC-specific CONFIG to descend into SoC directoryMasahiro Yamada2014-11-231-1/+1
| | | | | | Use "obj-$(CONFIG_FOO) += foo/" where it is possible. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: Descend into SOC directory from CPU directoryMasahiro Yamada2014-11-231-0/+2
| | | | | | | | | Some CPUs of some architectures have SOC directories. At present, the build system directly descends into SOC directories from the top Makefile, but it should generally descend into each directory from its parent directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* avr32: migrate cache functionsAndreas Bießmann2014-06-141-10/+10
| | | | | | | | | Unfortunately the avr32 cache implementation has another API than the one described in common.h. Migrate the flush/invalidate dcache functions to the common API to be usable in device drivers. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> CC: Josh Wu <josh.wu@atmel.com>
* avr32: delete unused header filesMasahiro Yamada2014-01-241-44/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* avr32: convert makefiles to Kbuild styleMasahiro Yamada2013-10-312-52/+10
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2414-238/+14
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-03-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Albert's rework of the linker scripts conflicted with Simon's making everyone use __bss_end. We also had a minor conflict over README.scrapyard being added to in mainline and enhanced in u-boot-arm/master with proper formatting. Conflicts: arch/arm/cpu/ixp/u-boot.lds arch/arm/cpu/u-boot.lds arch/arm/lib/Makefile board/actux1/u-boot.lds board/actux2/u-boot.lds board/actux3/u-boot.lds board/dvlhost/u-boot.lds board/freescale/mx31ads/u-boot.lds doc/README.scrapyard include/configs/tegra-common.h Build tested for all of ARM and run-time tested on am335x_evm. Signed-off-by: Tom Rini <trini@ti.com>
| * Refactor linker-generated arraysAlbert ARIBAUD2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* | Replace __bss_end__ with __bss_endSimon Glass2013-03-152-2/+2
|/ | | | | | | | | | | | | Note this is a tree-wide change affecting multiple architectures. At present we use __bss_start, but mostly __bss_end__. This seems inconsistent and in a number of places __bss_end is used instead. Change to use __bss_end for the BSS end symbol throughout U-Boot. This makes it possible to use the asm-generic/sections.h file on all archs. Signed-off-by: Simon Glass <sjg@chromium.org>
* avr32: Move cpu_hz to arch_global_dataSimon Glass2013-02-042-5/+5
| | | | | | Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* avr32: Move stack_end to arch_global_dataSimon Glass2013-02-041-3/+3
| | | | | | Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Discard the __u_boot_cmd sectionMarek Vasut2012-10-221-5/+0
| | | | | | | | | | | The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Add .u_boot_list into all linker filesMarek Vasut2012-10-221-0/+5
| | | | | | | | | | Add section for the linker-generated lists into all possible linker files, so that everyone can easily use these lists. This is mostly a mechanical adjustment. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* avr32:portmux: fix setup for macb1Andreas Bießmann2012-09-031-1/+1
| | | | | | Use portd_mask instead of portc_mask to setup the pins for port D. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* Merge branch 'next' of ../nextWolfgang Denk2011-12-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of ../next: mkenvimage: Add version info switch (-V) mkenvimage: Fix getopt() error handling mkenvimage: Fix some typos phy: add Micrel KS8721BL phy definition net: introduce per device index mvgbe: remove setting of ethaddr within the driver x86: Add support for specifying an initrd with the zboot command x86: Refactor the zboot innards so they can be reused with a vboot image x86: Add infrastructure to extract an e820 table from the coreboot tables x86: Add support for booting Linux using the 32 bit boot protocol x86: Clean up the x86 zimage code in preparation to extend it x86: Import code from coreboot's libpayload to parse the coreboot table x86: Initial commit for running as a coreboot payload CHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/hh405/fpgadata.c CHECKPATCH: ./board/esd/pci405/fpgadata.c CHECKPATCH: ./board/esd/tasreg/fpgadata.c CHECKPATCH: ./board/esd/apc405/fpgadata.c CHECKPATCH: ./board/esd/voh405/fpgadata.c CHECKPATCH: ./board/esd/ash405/fpgadata.c CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c CHECKPATCH: ./board/esd/ar405/fpgadata.c CHECKPATCH: ./board/esd/plu405/fpgadata.c CHECKPATCH: ./board/esd/wuh405/fpgadata.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c CHECKPATCH: ./board/esd/canbt/fpgadata.c CHECKPATCH: ./board/esd/du405/fpgadata.c CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c avr32:mmu.c: fix printf() length modifier fat.c: fix printf() length modifier cmd_sf.c: fix printf() length modifier Make printf and vprintf safe from buffer overruns vsprintf: Move function documentation into header file Add safe vsnprintf and snprintf library functions Move vsprintf functions into their own header Conflicts: tools/mkenvimage.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * avr32:mmu.c: fix printf() length modifierAndreas Bießmann2011-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avr32 uses unsigned long addresses, fix the printf() length modifier for that fact. Before this patch following warning occours: ---8<--- mmu.c: In function 'mmu_init_r': mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t' --->8--- Signed-off-by: Andreas Bießmann <biessmann@corscience.de> cc: Mike Frysinger <vapier@gentoo.org> cc: Thomas Chou <thomas@wytron.com.tw> cc: Reinhard Meyer <u-boot@emk-elektronik.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | AVR32: fix timer_init() functionSven Schnelle2011-12-201-2/+3
|/ | | | | | | | | | | | | | timer_init() now returns an int (the error code) instead of void. This makes compilation fail with: interrupts.c:111: error: conflicting types for 'timer_init' /home/svens/u-boot/u-boot/include/common.h:246: error: previous declaration of 'timer_init' was here make[1]: *** [interrupts.o] Error 1 Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Timer: Remove reset_timer() for non-Nios2 archesGraeme Russ2011-07-261-7/+0
|
* Timer: Remove set_timer completelyGraeme Russ2011-07-261-16/+0
|
* avr32: use single linker scriptAndreas Bießmann2011-05-181-0/+72
| | | | | | | This patch move the atstk100x linker script to $(CPUDIR) and delete other pure copies of this file in each board directory. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* avr32: fixup definitions to ATMEL_BASE_xxxAndreas Bießmann2011-05-184-7/+7
| | | | Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* avr32: rename memory-map.h -> hardware.hAndreas Bießmann2011-05-187-7/+7
| | | | Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* rename _end to __bss_end__Po-Yu Chuang2011-03-271-1/+1
| | | | | | | Currently, _end is used for end of BSS section. We want _end to mean end of u-boot image, so we rename _end to __bss_end__ first. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated valueWolfgang Denk2010-10-261-0/+1
| | | | | | | | | | | | | | | | | | CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not being able to use "sizeof(struct global_data)" in assembler files. Recent experience has shown that manual synchronization is not reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into GENERATED_GBL_DATA_SIZE which gets automatically generated by the asm-offsets tool. In the result, all definitions of this value can be deleted from the board config files. We have to make sure that all files that reference such data include the new <asm-offsets.h> file. No other changes have been done yet, but it is obvious that similar changes / simplifications can be done for other, related macro definitions as well. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* avr32: Add simple paging supportHaavard Skinnemoen2010-09-033-7/+92
| | | | | | | | | | | | | | | | | | Use the MMU hardware to set up 1:1 mappings between physical and virtual addresses. This allows us to bypass the cache when accessing the flash without having to do any physical-to-virtual address mapping in the CFI driver. The virtual memory mappings are defined at compile time through a sorted array of virtual memory range objects. When a TLB miss exception happens, the exception handler does a binary search through the array until it finds a matching entry and loads it into the TLB. The u-boot image itself is covered by a fixed TLB entry which is never replaced. This makes the 'saveenv' command work again on ATNGW100 and other boards using the CFI driver, hopefully without breaking any rules. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* avr32: Print unrelocated PC on exceptionHaavard Skinnemoen2010-09-031-1/+2
| | | | | | | | In addition to the real PC value, also print the value of PC after subtracting the relocation offset. This value will match the address in the ELF file so it's much easier to figure out where things went wrong. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* avr32: disable branch foldingAndreas Bießmann2010-06-291-3/+4
| | | | | | | | Due to a hardware bug mentioned in latest AP7000 datasheet errata (revision M from 09.09) branch folding is unreliable. This patch disables CPUCR.FE bitfield as stated in datasheet. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* avr32: Move cpu/at32ap/* to arch/avr32/cpu/*Peter Tyser2010-04-1317-0/+2078
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud