Skip to content

Commit

Permalink
Blackfin arch: move bfin_addr_dcachable() and friends into the cachef…
Browse files Browse the repository at this point in the history
…lush header where it belongs

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Oct 16, 2008
1 parent a92946b commit 04be80e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
17 changes: 17 additions & 0 deletions arch/blackfin/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,21 @@ do { memcpy(dst, src, len); \
# define flush_dcache_page(page) do { } while (0)
#endif

extern unsigned long reserved_mem_dcache_on;
extern unsigned long reserved_mem_icache_on;

static inline int bfin_addr_dcachable(unsigned long addr)
{
#ifdef CONFIG_BFIN_DCACHE
if (addr < (_ramend - DMA_UNCACHED_REGION))
return 1;
#endif

if (reserved_mem_dcache_on &&
addr >= _ramend && addr < physical_mem_end)
return 1;

return 0;
}

#endif /* _BLACKFIN_ICACHEFLUSH_H */
17 changes: 0 additions & 17 deletions arch/blackfin/include/asm/cplbinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,6 @@ extern u_long dpdt_swapcount_table[];

#endif /* CONFIG_MPU */

extern unsigned long reserved_mem_dcache_on;
extern unsigned long reserved_mem_icache_on;

extern void generate_cplb_tables(void);

static inline int bfin_addr_dcachable(unsigned long addr)
{
#ifdef CONFIG_BFIN_DCACHE
if (addr < (_ramend - DMA_UNCACHED_REGION))
return 1;
#endif

if (reserved_mem_dcache_on &&
addr >= _ramend && addr < physical_mem_end)
return 1;

return 0;
}

#endif
1 change: 1 addition & 0 deletions arch/blackfin/kernel/cplb-nompu/cplbinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/module.h>

#include <asm/blackfin.h>
#include <asm/cacheflush.h>
#include <asm/cplb.h>
#include <asm/cplbinit.h>

Expand Down

0 comments on commit 04be80e

Please sign in to comment.