summaryrefslogtreecommitdiffstats
path: root/include/common.h
Commit message (Collapse)AuthorAgeFilesLines
* ARM: Allow to compile in thumb-2 modeSascha Hauer2012-03-061-0/+6
| | | | | | | | | This shrinks the resulting binary size by ~25%. Exceptions are still handled in arm mode, so we have to explicitely put .arm directives into the exception code. Thumb-2 mode has been tested on i.MX51 Babbage board. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/debug' into nextSascha Hauer2012-01-271-0/+9
|\
| * Add dump_stack functionSascha Hauer2012-01-261-0/+9
| | | | | | | | | | | | | | | | | | | | At least ARM allows us to dump the stack, but we currently have no prototype for this. Add a dump_stack prototype and provide a static inline function for architectures without stack dump support. Also, call dump_stack() in panic() to provide more information in the case of a panic. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | banner: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-111-0/+4
|/ | | | | | this will allow to save 144 bytes Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* common.h: remove unused function declarationsSascha Hauer2011-12-151-5/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add kernel gunzip implementationSascha Hauer2011-11-291-2/+0
| | | | | | | The kernel uncompression functions have a unified API so use this implementation to get it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* compile in simple_strtoullSascha Hauer2011-11-291-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove irq support fragmentsSascha Hauer2011-11-281-19/+0
| | | | | | | | We never had interrupt support in barebox and we have no plans to add interrupt support. Even if we do I doubt the current fragments of irq support are helpful, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pcm030: use new functionalitySascha Hauer2011-09-271-1/+1
| | | | | | | | | | We introduced several new functions to ease our life on ppc, use themn on the pcm030: - setup iomux and bus clocks in board code - add sdram memory according to detected size Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rework MMU supportSascha Hauer2011-08-031-0/+1
| | | | | | | | | | | | | | | | | | In barebox we used 1MiB sections to map our SDRAM cachable. This has the drawback that we have to map our sdram twice: cached for normal sdram and uncached for DMA operations. As address space gets sparse on newer systems we are sometines unable to find a suitably big enough area for the dma coherent space. This patch changes the MMU code to use second level page tables. With it we can implement dma_alloc_coherent as normal malloc, we just have to remap the allocated area uncached afterwards and map it cached again after free(). This makes arm_create_section(), setup_dma_coherent() and mmu_enable() noops. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix: commands/bootm.c:346:2: warning: statement with no effectJean-Christophe PLAGNIOL-VILLARD2011-07-171-2/+8
| | | | | | | | convert enable_interrupts() and disable_interrupts() to static inline if no IRQ supoprt enable Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move version_string to seperate fileSascha Hauer2011-04-111-0/+1
| | | | | | | | | In a noninteractive environment barebox will be compiled without command support. So move version_string to a seperate file which is compiled unconditionally. Also, display the banner when the simple console support is used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add more useful generic macrosJuergen Beisert2010-12-211-0/+10
| | | | | | | Stolen from the Linux kernel. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add macro for correct rounding in integer devisionsJuergen Beisert2010-12-141-0/+7
| | | | | | | Just stolen from Linux. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make DIV_ROUND_UP macro globally availableJuergen Beisert2010-12-141-0/+2
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Add define for IOMEM helper macro.Marek Belisko2010-11-191-0/+2
| | | | | | | | IOMEM helper macro is used for address casting which then is used in read(bwl)/write(bwl) functions. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* version_string: sparse fixesSascha Hauer2010-10-211-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/mem.c: sparse fixesSascha Hauer2010-10-211-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add WARN_ON and WARN supportJean-Christophe PLAGNIOL-VILLARD2010-08-301-0/+25
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* crc32: activate crc32_no_comp (needed for jffs2 and UBI)Sascha Hauer2010-07-051-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove now unused arch_executeSascha Hauer2010-03-301-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce a arch_shutdown call and call it from shutdown_bareboxSascha Hauer2010-03-301-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make panic and hang __noreturn functionsSascha Hauer2010-03-301-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make reset_cpu a __noreturn functionSascha Hauer2010-03-301-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common.h: add compile time check helper functionsMarc Kleine-Budde2010-02-161-2/+29
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* Add EP93xx ethernet driverMatthias Kaehlcke2010-01-141-0/+1
| | | | | | | Added ethernet driver for EP93xx SoCs Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix arch_execute prototypeSascha Hauer2009-12-171-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add *_MAX and *_MIN macrosSascha Hauer2009-06-101-0/+13
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix pr_debugSascha Hauer2009-04-061-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Shutdown U-Boot before starting an OSSascha Hauer2009-03-191-0/+1
| | | | | | | | Some devices, especially the ones doing DMA should be disabled before giving control to an OS. We take the simple approach here: Just shutdown the devices in the reverse order they were activated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove unused stuff from include/common.hSascha Hauer2009-03-191-25/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce dev_* and pr_* functionsSascha Hauer2008-10-311-6/+14
| | | | | | | | Proven to be useful in linux kernel, U-Boot should have such a thing aswell. We do not distinguish between the various print levels others than debug and not debug. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add include/linux/kernel.hSascha Hauer2008-08-131-13/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add compiler header files from kernelSascha Hauer2008-08-131-1/+1
| | | | | | | Add include/linux/compiler*.h from Linux Kernel and remove old include/compiler.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fixed orphaned CONFIG_INTERRUPTSSascha Hauer2008-04-041-1/+1
| | | | | | | replace remaining CONFIG_INTERRUPTS with CONFIG_USE_IRQ Signed-off-by: Carsten Schlote <schlote@vahanus.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove traces of old tab completionSascha Hauer2008-03-011-4/+0
|
* Revert "separating memory commands"Marc Kleine-Budde2007-11-271-9/+0
| | | | | | | | | | | | This reverts commit d59c600c656d08410ea862c582fbd77432c3ca47. Conflicts: commands/Makefile common/Kconfig common/Makefile Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* separating memory commandsJuergen Beisert2007-11-121-0/+9
| | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* add container_of macro. Needed for list implementationSascha Hauer2007-10-111-0/+11
|
* export functionsSascha Hauer2007-10-041-1/+1
|
* move ARRAY_SIZE macro to include/common.hSascha Hauer2007-09-281-0/+2
|
* print_size() -> size_human_readable()Sascha Hauer2007-09-261-2/+1
| | | | return a pointer to a human readable string rather than printingit directly
* - teach hush to honour PATH variableSascha Hauer2007-09-241-0/+2
| | | | - remove common/main.c. This is now handled in the different shells.
* add the possibility to have a arch specific 'go' command. SomeSascha Hauer2007-09-161-1/+3
| | | | architectures need this (e.g. blackfin and i386)
* compile fixesSascha Hauer2007-07-051-0/+2
|
* svn_rev_693Sascha Hauer2007-07-051-1/+0
| | | | remove do_reset
* svn_rev_683Sascha Hauer2007-07-051-208/+6
| | | | more cleanups, fix compiler warnings
* svn_rev_677Sascha Hauer2007-07-051-30/+0
| | | | remove arm specific things
* svn_rev_653Sascha Hauer2007-07-051-8/+1
| | | | restructure tree, add reginfo command