aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:45:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:45:08 -0400
commit1b821bfb034c5db5af62b463e3001243905179ba (patch)
treea5c1090f41716a6912742c9bc960dc2d3ae82899 /arch/blackfin/include
parenta45fbc33137b11e479ea8b7d478a1d7e6488971b (diff)
parent1390da4ee75168b6e4d8354e93e3b5f0a0291f2f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us Blackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files Blackfin arch: update cache flush prototypes with argument names to make them less mysterious Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs Blackfin arch: use the new bfin_addr_dcachable() function Blackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all platforms Blackfin arch: unify/cleanup cache code Blackfin arch: update AD7879 platform resources in board file Blackfin arch: Zero out bss region in L1/L2 memory. Blackfin arch: add read/write IO accessor functions to Blackfin Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r--arch/blackfin/include/asm/cacheflush.h27
-rw-r--r--arch/blackfin/include/asm/cplbinit.h17
-rw-r--r--arch/blackfin/include/asm/io.h30
-rw-r--r--arch/blackfin/include/asm/timex.h2
4 files changed, 53 insertions, 23 deletions
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h
index 5ef9e35e9c3b..4403415583fa 100644
--- a/arch/blackfin/include/asm/cacheflush.h
+++ b/arch/blackfin/include/asm/cacheflush.h
@@ -30,11 +30,11 @@
30#ifndef _BLACKFIN_CACHEFLUSH_H 30#ifndef _BLACKFIN_CACHEFLUSH_H
31#define _BLACKFIN_CACHEFLUSH_H 31#define _BLACKFIN_CACHEFLUSH_H
32 32
33extern void blackfin_icache_dcache_flush_range(unsigned int, unsigned int); 33extern void blackfin_icache_dcache_flush_range(unsigned long start_address, unsigned long end_address);
34extern void blackfin_icache_flush_range(unsigned int, unsigned int); 34extern void blackfin_icache_flush_range(unsigned long start_address, unsigned long end_address);
35extern void blackfin_dcache_flush_range(unsigned int, unsigned int); 35extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address);
36extern void blackfin_dcache_invalidate_range(unsigned int, unsigned int); 36extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address);
37extern void blackfin_dflush_page(void *); 37extern void blackfin_dflush_page(void *page);
38 38
39#define flush_dcache_mmap_lock(mapping) do { } while (0) 39#define flush_dcache_mmap_lock(mapping) do { } while (0)
40#define flush_dcache_mmap_unlock(mapping) do { } while (0) 40#define flush_dcache_mmap_unlock(mapping) do { } while (0)
@@ -85,4 +85,21 @@ do { memcpy(dst, src, len); \
85# define flush_dcache_page(page) do { } while (0) 85# define flush_dcache_page(page) do { } while (0)
86#endif 86#endif
87 87
88extern unsigned long reserved_mem_dcache_on;
89extern unsigned long reserved_mem_icache_on;
90
91static inline int bfin_addr_dcachable(unsigned long addr)
92{
93#ifdef CONFIG_BFIN_DCACHE
94 if (addr < (_ramend - DMA_UNCACHED_REGION))
95 return 1;
96#endif
97
98 if (reserved_mem_dcache_on &&
99 addr >= _ramend && addr < physical_mem_end)
100 return 1;
101
102 return 0;
103}
104
88#endif /* _BLACKFIN_ICACHEFLUSH_H */ 105#endif /* _BLACKFIN_ICACHEFLUSH_H */
diff --git a/arch/blackfin/include/asm/cplbinit.h b/arch/blackfin/include/asm/cplbinit.h
index d179b747ff03..f845b41147ba 100644
--- a/arch/blackfin/include/asm/cplbinit.h
+++ b/arch/blackfin/include/asm/cplbinit.h
@@ -87,23 +87,6 @@ extern u_long dpdt_swapcount_table[];
87 87
88#endif /* CONFIG_MPU */ 88#endif /* CONFIG_MPU */
89 89
90extern unsigned long reserved_mem_dcache_on;
91extern unsigned long reserved_mem_icache_on;
92
93extern void generate_cplb_tables(void); 90extern void generate_cplb_tables(void);
94 91
95static inline int bfin_addr_dcachable(unsigned long addr)
96{
97#ifdef CONFIG_BFIN_DCACHE
98 if (addr < (_ramend - DMA_UNCACHED_REGION))
99 return 1;
100#endif
101
102 if (reserved_mem_dcache_on &&
103 addr >= _ramend && addr < physical_mem_end)
104 return 1;
105
106 return 0;
107}
108
109#endif 92#endif
diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
index cbbf7ffdbbff..7dc77a21fdf3 100644
--- a/arch/blackfin/include/asm/io.h
+++ b/arch/blackfin/include/asm/io.h
@@ -134,6 +134,36 @@ extern void dma_insb(unsigned long port, void *addr, unsigned short count);
134extern void dma_insw(unsigned long port, void *addr, unsigned short count); 134extern void dma_insw(unsigned long port, void *addr, unsigned short count);
135extern void dma_insl(unsigned long port, void *addr, unsigned short count); 135extern void dma_insl(unsigned long port, void *addr, unsigned short count);
136 136
137static inline void readsl(const void __iomem *addr, void *buf, int len)
138{
139 insl((unsigned long)addr, buf, len);
140}
141
142static inline void readsw(const void __iomem *addr, void *buf, int len)
143{
144 insw((unsigned long)addr, buf, len);
145}
146
147static inline void readsb(const void __iomem *addr, void *buf, int len)
148{
149 insb((unsigned long)addr, buf, len);
150}
151
152static inline void writesl(const void __iomem *addr, const void *buf, int len)
153{
154 outsl((unsigned long)addr, buf, len);
155}
156
157static inline void writesw(const void __iomem *addr, const void *buf, int len)
158{
159 outsw((unsigned long)addr, buf, len);
160}
161
162static inline void writesb(const void __iomem *addr, const void *buf, int len)
163{
164 outsb((unsigned long)addr, buf, len);
165}
166
137/* 167/*
138 * Map some physical address range into the kernel address space. 168 * Map some physical address range into the kernel address space.
139 */ 169 */
diff --git a/arch/blackfin/include/asm/timex.h b/arch/blackfin/include/asm/timex.h
index 22b0806161bb..248aeb066805 100644
--- a/arch/blackfin/include/asm/timex.h
+++ b/arch/blackfin/include/asm/timex.h
@@ -16,7 +16,7 @@ typedef unsigned long long cycles_t;
16static inline cycles_t get_cycles(void) 16static inline cycles_t get_cycles(void)
17{ 17{
18 unsigned long tmp, tmp2; 18 unsigned long tmp, tmp2;
19 __asm__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2)); 19 __asm__ __volatile__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2));
20 return tmp | ((cycles_t)tmp2 << 32); 20 return tmp | ((cycles_t)tmp2 << 32);
21} 21}
22 22