summaryrefslogtreecommitdiff
path: root/lib_blackfin
Commit message (Collapse)AuthorAgeLines
* push LOAD_ADDR out to arch mk filesMike Frysinger2009-09-04-0/+2
| | | | | | | | | | Rather than maintain/extend the current ifeq($(ARCH)) mess that exists in the standalone Makefile, push the setting up of LOAD_ADDR out to the arch config.mk (and rename to STANDALONE_LOAD_ADDR in the process). This keeps the common code clean and lets the arch do whatever crazy crap it wants in its own area. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Consolidate arch-specific mem_malloc_init() implementationsPeter Tyser2009-09-04-9/+0
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Standardize mem_malloc_init() implementationPeter Tyser2009-09-04-6/+6
| | | | | | | | | | This lays the groundwork to allow architectures to share a common mem_malloc_init(). Note that the x86 implementation was not modified as it did not fit the mold of all other architectures. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Consolidate arch-specific sbrk() implementationsPeter Tyser2009-09-04-17/+3
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Blackfin: fix debug printf modifiersMike Frysinger2009-09-02-18/+18
| | | | | | | The display_global_data() function generated warnings with pretty much every variable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: change global data register from P5 to P3Robin Getz2009-09-02-1/+1
| | | | | | | | | | | Since the Blackfin ABI favors higher scratch registers by default, use the last scratch register (P3) for global data rather than the first (P5). This allows the compiler's register allocator to use higher number scratch P registers, which in turn better matches the Blackfin instruction set, which reduces the size of U-Boot by more than 1024 bytes... Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use common code to preprocess linker scriptMike Frysinger2009-08-23-5/+2
| | | | | | | Now that the common code preprocesses the linker script, the Blackfin code no longer needs to do it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: restore EVT1 handling in linker scriptMike Frysinger2009-07-24-1/+8
| | | | | | | Sadly, the Blackfin linker script unification lost a small #ifdef logic needed on older parts. Restore that CONFIG_BFIN_BOOTROM_USES_EVT1 logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Move architecture specific config.mk files into subdirsPeter Tyser2009-07-21-0/+66
| | | | | | | | This cleans up U-Boot's toplevel directory a bit and makes the architecture 'config.mk' file naming and location similar to board and cpu 'config.mk' files Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Blackfin: add os log functionsMike Frysinger2009-07-18-0/+6
| | | | | | | | Part of the mini Blackfin ABI with operating systems is that they can use 0x4f0-0x4f8 to pass log buffers to/from bootloaders. So add support to U-Boot for reading the log buffer. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-18-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Blackfin: add cache_dump commandsMike Frysinger2009-07-10-0/+146
| | | | | | | A few debug-type commands used to dump the raw icache/dcache data. Useful when trying to track down cache-related bugs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: unify u-boot linker scriptsMike Frysinger2009-06-14-1/+137
| | | | | | | | | | | All the Blackfin linker scripts were duplicated across the board dirs with no difference save from the semi-often used ENV_IS_EMBEDDED option. So unify all of them in the lib_blackfin/ dir and for the few boards that need to embedded the environment directly, add a LDS_BOARD_TEXT define for them to customize via their board config file. This is much simpler than forcing them to duplicate the rest of the linker script. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lib_arch/board.c: Move malloc initialization before flash_init()Stefan Roese2009-06-12-3/+4
| | | | | | | | | | | | | | | | | | | This patch moves the malloc initialization before calling flash_init(). Upcoming changes to the NOR FLASH common CFI driver with optional MTD infrastructure and MTD concatenation support will call malloc(). And nothing really speaks against enabling malloc just a little earlier in the boot stage. Some architectures already enable malloc before calling flash_init() so they don't need any changes here. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott McNutt <smcnutt@psyent.com> Cc: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: John Rigby <jcrigby@gmail.com>
* Blackfin: print out Flash: before checking itMike Frysinger2009-03-23-1/+1
| | | | | | | | If there is some problem in the flash init/checking code, it's nicer to see the message "Flash:" before crashing. This way the source of the problem is a bit more straightforward. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: safely flush data caches when in writeback modeMike Frysinger2009-03-23-0/+42
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: unify net-related init codeMike Frysinger2009-03-23-10/+20
| | | | | | | Unify all of the net-related init code in the common Blackfin board init code to clean up the ifdef mess a bit. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bfin_mac: force boards to setup the MAC themselvesMike Frysinger2009-03-20-46/+2
| | | | | | | | | Since the on-chip MAC does not have an eeprom or similar interface, force all Blackfin boards that use this driver to setup the board data with a proper MAC. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* Blackfin: output booting source when bootingMike Frysinger2009-02-02-1/+5
| | | | | | | Knowing the booting source of the part is useful, especially when the part can switch dynamically between sources. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use 8/16/32 bit transfer widths in dma_memcpy()Mike Frysinger2009-02-02-4/+19
| | | | | | | Rather than using 8bit transfers for everything, use 8/16/32 bit transfers as usable with the source/destination addresses and the count size. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: dma_memcpy(): fix random failuresMike Frysinger2009-02-02-8/+11
| | | | | | | | We have to make sure the DMA channel is actually disabled in hardware before attempting to reprogram it. Otherwise the new settings are ignored and we end up with random hangs/failures. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: rewrite cache handling functionsMike Frysinger2009-02-02-4/+14
| | | | | | | Take the cache flush functions from the kernel as they use hardware loops in order to get optimal performance. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: setup bi_enetaddr for single netsMike Frysinger2009-02-02-1/+10
| | | | | | | For systems with CONFIG_NET_MULTI disabled, bi_enetaddr does not get setup based on $ethaddr, so set it up. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: cache core/system clock valuesMike Frysinger2009-02-02-44/+78
| | | | | | | | Calculating the clocks requires a bit of calls to gcc math functions, so cache the values after the first run since they'll most likely never change once U-Boot is up and running. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: only build post code when CONFIG_POSTMike Frysinger2009-02-02-9/+1
| | | | | | Save some time by using CONFIG_POST in the Makefile rather than C files. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: fixup misc warnings such as printf's and missing castsMike Frysinger2009-01-28-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: pass RETX to LinuxMike Frysinger2009-01-28-1/+8
| | | | | | | Make sure we save the value of RETX at power on and then pass it on to the kernel so that it can nicely debug a "double-fault-caused-a-reset" crash. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: respect CONFIG_SYS_MONITOR_LEN for default flash protectionMike Frysinger2009-01-28-3/+3
| | | | | | | | Respect the CONFIG_SYS_MONITOR_LEN define rather than assuming a size of 128kB when setting up the default flash protection region for U-Boot itself. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: respect/check CONFIG_SYS_GBL_DATA_SIZEMike Frysinger2009-01-28-1/+5
| | | | | | | When setting up the global data, rather than relying on sizeof(), use the common CONFIG_SYS_GBL_DATA_SIZE define. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: implement general support for CONFIG_STATUS_LEDMike Frysinger2009-01-28-0/+10
| | | | | | Here are the Blackfin-specific and board-independent pieces for status leds. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: do not init i2c in Blackfin board initMike Frysinger2009-01-28-15/+0
| | | | | | | The common code takes care of calling i2c_init() when needed, so no point in us doing it as well. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: fix dcache handling when doing dma memcpy'sMike Frysinger2009-01-28-4/+7
| | | | | | | | Our dcache invalidate function doesn't just invalidate, it also flushes. So rename the function accordingly and fix the dma_memcpy() function so it doesn't inadvertently corrupt the data destination. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: split cache handling out of dma_memcpy()Mike Frysinger2009-01-28-8/+17
| | | | | | | Creating a new dma_memcpy() function that skips all cache checks allows us to use the function in very early init where the cache is not yet setup. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: abort dma_memcpy() for L1 scratchpadMike Frysinger2009-01-28-1/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: rename bootm.c to boot.cMike Frysinger2009-01-28-2/+2
| | | | | | | The boot file contains functions for more than just "bootm", so rename it accordingly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert CMD_LINE_ADDR to CONFIG_LINUX_CMDLINE_{ADDR,SIZE}Mike Frysinger2009-01-28-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use common strmhz() in system outputMike Frysinger2009-01-23-2/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: drop CONFIG_SPI handling in board initMike Frysinger2009-01-07-7/+0
| | | | | | | The eeprom SPI init functions are duplicated as the common code already executes these for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Update U-Boot's build timestamp on every compilePeter Tyser2008-12-06-1/+2
| | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk2008-11-01-9/+40
|\
| * Blackfin: init NAND before relocating envMike Frysinger2008-10-23-5/+5
| | | | | | | | | | | | | | If booting out of NAND, we need to make sure we initialize it properly before attempting to relocate the environment. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: check cache bits, not cplb bitsMike Frysinger2008-10-23-2/+2
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: unify cache handling codeMike Frysinger2008-10-23-0/+35
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: only initialize the RTC when actually usedMike Frysinger2008-10-23-4/+0
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | bootm: Add subcommandsKumar Gala2008-10-29-0/+3
|/ | | | | | | | | | | | | | 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>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-55/+55
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* bootm arm/avr32/blackfin/microblaze/nios2/sh: remove no more need 'error' labelJean-Christophe PLAGNIOL-VILLARD2008-09-10-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROMJean-Christophe PLAGNIOL-VILLARD2008-09-10-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* bootm: refactor do_reset and os boot function argsKumar Gala2008-08-26-8/+3
| | | | | | | | | | | | 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>
* bootm: refactor entry point codeKumar Gala2008-08-26-18/+1
| | | | | | | 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>