diff options
author | Wolfgang Denk <wd@denx.de> | 2008-02-15 00:06:18 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-15 00:06:18 +0100 |
commit | 6f99eec3dc2285abfb93631003f7e5cadf2eab0f (patch) | |
tree | 1eaaa31eb768d8bfa68e9ff41eef53d37b64f21c /lib_blackfin | |
parent | f6921e3dc331293c873ec4d109fd5517a42a90b3 (diff) | |
parent | 30942b18b66f35f2ceedab39af10e9eccaa943cc (diff) | |
download | u-boot-imx-6f99eec3dc2285abfb93631003f7e5cadf2eab0f.zip u-boot-imx-6f99eec3dc2285abfb93631003f7e5cadf2eab0f.tar.gz u-boot-imx-6f99eec3dc2285abfb93631003f7e5cadf2eab0f.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-blackfin
Conflicts:
Makefile
doc/README.standalone
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'lib_blackfin')
-rw-r--r-- | lib_blackfin/bf533_string.c | 23 | ||||
-rw-r--r-- | lib_blackfin/cache.c | 6 |
2 files changed, 19 insertions, 10 deletions
diff --git a/lib_blackfin/bf533_string.c b/lib_blackfin/bf533_string.c index 1553f1b..9ceeeef 100644 --- a/lib_blackfin/bf533_string.c +++ b/lib_blackfin/bf533_string.c @@ -26,11 +26,11 @@ */ #include <common.h> -#include <asm/setup.h> #include <config.h> #include <asm/blackfin.h> #include <asm/io.h> #include "cache.h" +#include <asm/mach-common/bits/dma.h> char *strcpy(char *dest, const char *src) { @@ -112,6 +112,19 @@ int strncmp(const char *cs, const char *ct, size_t count) return __res1; } +#ifndef pMDMA_D0_IRQ_STATUS +# define pMDMA_D0_IRQ_STATUS pMDMA1_D0_IRQ_STATUS +# define pMDMA_D0_START_ADDR pMDMA1_D0_START_ADDR +# define pMDMA_D0_X_COUNT pMDMA1_D0_X_COUNT +# define pMDMA_D0_X_MODIFY pMDMA1_D0_X_MODIFY +# define pMDMA_D0_CONFIG pMDMA1_D0_CONFIG +# define pMDMA_S0_IRQ_STATUS pMDMA1_S0_IRQ_STATUS +# define pMDMA_S0_START_ADDR pMDMA1_S0_START_ADDR +# define pMDMA_S0_X_COUNT pMDMA1_S0_X_COUNT +# define pMDMA_S0_X_MODIFY pMDMA1_S0_X_MODIFY +# define pMDMA_S0_CONFIG pMDMA1_S0_CONFIG +#endif + static void *dma_memcpy(void *dest, const void *src, size_t count) { *pMDMA_D0_IRQ_STATUS = DMA_DONE | DMA_ERR; @@ -133,7 +146,7 @@ static void *dma_memcpy(void *dest, const void *src, size_t count) /* Enable source DMA */ *pMDMA_S0_CONFIG = (DMAEN); - sync(); + SSYNC(); *pMDMA_D0_CONFIG = (WNR | DMAEN); @@ -164,11 +177,11 @@ void *memcpy(void *dest, const void *src, size_t count) if (dcache_status()) { blackfin_dcache_flush_range(src, src+count); } - /* L1_ISRAM can only be accessed via dma */ - if ((tmp >= (char *)L1_ISRAM) && (tmp < (char *)L1_ISRAM_END)) { + /* L1_INST_SRAM can only be accessed via dma */ + if ((tmp >= (char *)L1_INST_SRAM) && (tmp < (char *)L1_INST_SRAM_END)) { /* L1 is the destination */ dma_memcpy(dest,src,count); - } else if ((s >= (char *)L1_ISRAM) && (s < (char *)L1_ISRAM_END)) { + } else if ((s >= (char *)L1_INST_SRAM) && (s < (char *)L1_INST_SRAM_END)) { /* L1 is the source */ dma_memcpy(dest,src,count); diff --git a/lib_blackfin/cache.c b/lib_blackfin/cache.c index 9d71bcb..6fc4983 100644 --- a/lib_blackfin/cache.c +++ b/lib_blackfin/cache.c @@ -33,11 +33,7 @@ void flush_cache(unsigned long dummy1, unsigned long dummy2) { - if ((dummy1 >= L1_ISRAM) && (dummy1 < L1_ISRAM_END)) - return; - if ((dummy1 >= DATA_BANKA_SRAM) && (dummy1 < DATA_BANKA_SRAM_END)) - return; - if ((dummy1 >= DATA_BANKB_SRAM) && (dummy1 < DATA_BANKB_SRAM_END)) + if (dummy1 >= 0xE0000000) return; if (icache_status()) |