summaryrefslogtreecommitdiff
path: root/arch/microblaze/lib
Commit message (Collapse)AuthorAgeLines
* microblaze: bootm: Add support for loading initrdMichal Simek2013-05-09-0/+8
| | | | | | | fdt_initrd add additional information to DTB about initrd addresses which are later used by kernel. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: bootm: Fix coding style issuesMichal Simek2013-05-09-9/+11
| | | | | | Prepare place for new patch. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* lib: consolidate hang()Andreas Bießmann2013-05-01-7/+0
| | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* microblaze: fix style in board.cAndreas Bießmann2013-05-01-32/+31
| | | | | | | | Make microblaze's board.c checkpatch clean. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Michal Simek <monstr@monstr.eu>
* watchdog: Add support for Xilinx Microblaze watchdogMichal Simek2013-04-30-0/+3
| | | | | | | Watchdog can be used on Microblaze, PPC and Zynq hw designs. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* microblaze: Add muldi3.c which contains routines for _muldi3David Holsgrove2013-02-04-0/+92
| | | | | | | | | | | | | | | | | | | Referenced arch/blackfin/lib/muldi3.c and the linux kernel. Resolves issue seen when building u-boot for HW_MUL=0; PLATFORM_CPPFLAGS += -mxl-soft-mul PLATFORM_CPPFLAGS += -mno-xl-multiply-high which resulted in error while linking to libgcc.a without mul hw (bs / m); libgcc.a(_muldi3.o): In function `__muldi3': .... src/gcc-4.6.2/libgcc/libgcc2.c:550: undefined reference to `_GLOBAL_OFFSET_TABLE_' This link failure would not occur if we used gcc instead of ld directly, as gcc will correctly use the crt's to resolve this link. Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* env: Use getenv_yesno() more generallyJoe Hershberger2012-12-13-3/+1
| | | | | | | Move the getenv_yesno() to env_common.c and change most checks for 'y' or 'n' to use this helper. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* microblaze: Flush caches before enabling themMichal Simek2012-11-07-5/+0
| | | | | | | | Flushing caches is necessary because of soft reset which doesn't clear caches. Signed-off-by: Michal Simek <monstr@monstr.eu> Reviewed-by: Marek Vasut <marex@denx.de>
* serial: Remove CONFIG_SERIAL_MULTI from remaining sourcesMarek Vasut2012-10-15-2/+0
| | | | | | | | | | | | Remove the parts depending either on disabled CONFIG_SERIAL_MULTI or ifdefs around CONFIG_SERIAL_MULTI parts since CONFIG_SERIAL_MULTI is now enabled by default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de>
* microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASEMichal Simek2012-09-11-4/+6
| | | | | | | Prepare for device-tree driven configuration. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
* microblaze: Clean microblaze initializationMichal Simek2012-09-11-14/+3
| | | | | | | | | Move board specific function to board_init function in board/ folder Remove externs from generic board.c Use board_init_f function in board.c file. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
* microblaze: timer: Prepare for device-tree initializationMichal Simek2012-09-11-5/+0
| | | | | | | | | Fix CONFIG_SYS_HZ usage in board config. Do not use hardcoded value. Use CONFIG_SYS_HZ instead. Separate static configuration to single block. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: board: Remove compilation warningMichal Simek2012-09-11-1/+2
| | | | | | | | | | | Variable is used when CONFIG_SYS_FLASH_CHECKSUM is used. Warning log: board.c: In function 'board_init': board.c:101: warning: unused variable 's' Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
* microblaze: Add support for device tree driven board configurationMichal Simek2012-09-11-0/+24
| | | | | | | | | | | | | This is minimum code required to be able to use device-tree for u-boot initialization. Currently only for device driver initialization. Linker script change ensures DTB to be aligned for both options CONFIG_OF_EMBED and CONFIG_OF_SEPARATE. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net> CC: Simon Glass <sjg@chromium.org>
* microblaze: intc: Clear interrupt codeMichal Simek2012-07-10-5/+1
| | | | | | | | | Clear and prepare for device-tree driven configuration. Remove CONFIG_SYS_INTC_0 definition Use dynamic allocation instead of static. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* microblaze: Call serial multi initializationMichal Simek2012-07-10-0/+5
| | | | | Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* microblaze: Move __udelay implementationMichal Simek2012-07-10-43/+0
| | | | | | | | Move __udelay to the timer code because of unification. And clean coding style because of checkpatch.pl. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* microblaze: Remove extern from board.cMichal Simek2012-07-10-4/+0
| | | | | | | eth_init() is defined at include/net.h. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* net: move bootfile init into eth_initializeMike Frysinger2012-05-15-4/+0
| | | | | | | | All arches init this the same way, so move the logic into the core net code to avoid duplicating it everywhere else. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* net: punt bd->bi_ip_addrMike Frysinger2012-05-15-3/+0
| | | | | | | | | This field gets read in one place (by "bdinfo"), and we can replace that with getenv("ipaddr"). After all, the bi_ip_addr field is kept up-to-date implicitly with the value of the ipaddr env var. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* bootstage: Replace show_boot_progress/error() with bootstage_...()Simon Glass2012-03-18-1/+1
| | | | | | | These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()Simon Glass2012-03-18-1/+1
| | | | | | | | | This changes the number 15 as used in boot_stage_progress() to use the new name provided for it. This is a separate patch because it touches so many files. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* microblaze: Use getenv_ulong() in place of getenv(), strtoulSimon Glass2011-10-23-3/+2
| | | | | | This changes the board code to use the new getenv_ulong() function. Signed-off-by: Simon Glass <sjg@chromium.org>
* microblaze: Copy bootfile from variablesMichal Simek2011-10-10-0/+4
| | | | | | Setup bootfile. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Initialize jumptable and consoleMichal Simek2011-10-10-0/+6
| | | | | | This changes were done to get support for netconsole. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Support flashes on lower addressesMichal Simek2011-10-10-0/+5
| | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Call common console_init_f initialization functionMichal Simek2011-10-10-0/+1
| | | | | | Calling console_init_f enables CTRL+C usage. Signed-off-by: Michal Simek <monstr@monstr.eu>
* unify version_stringAndreas Bießmann2011-07-28-3/+0
| | | | | | | | | | | | This patch removes the architecture specific implementation of version_string where possible. Some architectures use a special place and therefore we provide U_BOOT_VERSION_STRING definition and a common weak symbol version_string. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> CC: Mike Frysinger <vapier@gentoo.org> CC: Peter Pan <pppeterpppan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Replace "FLASH" strings with "Flash" or "flash"Peter Tyser2011-01-19-1/+1
| | | | | | | | There's no compelling reason to have the output on bootup or the "flinfo" command print "flash" in uppercase, so use the proper case where appropriate. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* microblaze: Fix bd_info pointerMichal Simek2011-01-10-3/+5
| | | | | | | | | | | | | | | | | | | | | Patch "Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value" (sha1: 25ddd1fb0a2281b182529afbc8fda5de2dc16d96) introduce GENERATED_GBL_DATA_SIZE which is sizeof aligned gd_t (currently 0x40). Microblaze configs used 0x40(128) because this place also contained board info structure which lies on the top of ram. U-Boot is placed to the top of the ram (for example 0xd7ffffff) and bd structure was moved out of ram. This patch is fixing this scheme with GENERATED_BD_INFO_SIZE which swap global data and board info structures. For example: Current: gd 0xd7ffffc0, bd 0xd8000000 Fixed: gd 0xd7ffffc0, bd 0xd7ffff90 Signed-off-by: Michal Simek <monstr@monstr.eu>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26-1/+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>
* FDT: only call boot_get_fdt from generic codeJohn Rigby2010-10-18-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | All arches except nios2 and microblaze call boot_get_fdt from bootm_start in common/cmd_bootm.c. Having nios2 and microblaze do so as well removes code from their respective do_bootm_linux routines and allows removal of a nasty ifdef from bootm_start. In the case where boot_get_fdt returns an error bootm_start returns and the platform specific do_bootm_linux routines will never get called. Also only check argv[3] for an fdt addr if argc > 3 first. This is already the case for nios2. Signed-off-by: John Rigby <john.rigby@linaro.org> CC: Scott McNutt <smcnutt@psyent.com> CC: Michal Simek <monstr@monstr.eu> CC: Thomas Chou <thomas@wytron.com.tw> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> Tested-by: Thomas Chou <thomas@wytron.com.tw>
* Rename TEXT_BASE into CONFIG_SYS_TEXT_BASEWolfgang Denk2010-10-18-1/+1
| | | | | | | | | | | | The change is currently needed to be able to remove the board configuration scripting from the top level Makefile and replace it by a simple, table driven script. Moving this configuration setting into the "CONFIG_*" name space is also desirable because it is needed if we ever should move forward to a Kconfig driven configuration system. Signed-off-by: Wolfgang Denk <wd@denx.de>
* microblaze: Add support for NET_MULTI apiMichal Simek2010-10-12-2/+10
| | | | | | Microblaze hasn't supported NET_MULTI support. Signed-off-by: Michal Simek <monstr@monstr.eu>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-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>
* microblaze: Consolidate cache codeMichal Simek2010-04-16-44/+0
| | | | | | | Merge cpu and lib cache code. Flush cache before disabling. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Flush cache before jumping to kernelMichal Simek2010-04-16-0/+8
| | | | | | | There is used max cache size on system which doesn't define cache size. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Support system with WB cacheMichal Simek2010-04-16-1/+1
| | | | | | | | | | WB cache use different instruction that WT cache but the major code is that same. That means that wdc.flush on system with WT cache do the same thing as before. You need newer toolchain with wdc.flush support. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Change initialization sequenceMichal Simek2010-04-16-3/+12
| | | | | | | env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Change cache report messagesMichal Simek2010-04-16-2/+2
| | | | | | It is more accurate to show that caches are OFF instead of FAIL. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move FSL initialization to board.cMichal Simek2010-04-16-1/+6
| | | | | | Move FSL out of interrupt controller. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move timer initialization to board.cMichal Simek2010-04-16-0/+7
| | | | | | | I would like to handle case where system doesn't contain intc that's why I need timer initialization out of intc code. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add FDT supportArun Bhanu2010-04-16-5/+34
| | | | | | | | | | This patch adds FDT (flattened device tree) support to microblaze arch. Tested with Linux arch/microblaze kernels with and without compiled in FDT on Xilinx ML506 board. Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
* Move lib_$ARCH directories to arch/$ARCH/libPeter Tyser2010-04-13-0/+352
Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk This change is intended to clean up the top-level directory structure and more closely mimic Linux's directory organization. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>