aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/bfin-global.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/include/asm/bfin-global.h')
-rw-r--r--arch/blackfin/include/asm/bfin-global.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin-global.h b/arch/blackfin/include/asm/bfin-global.h
new file mode 100644
index 000000000000..7ba70de66f2b
--- /dev/null
+++ b/arch/blackfin/include/asm/bfin-global.h
@@ -0,0 +1,117 @@
1/*
2 * File: include/asm-blackfin/bfin-global.h
3 * Based on:
4 * Author: *
5 * Created:
6 * Description: Global extern defines for blackfin
7 *
8 * Modified:
9 * Copyright 2004-2006 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see the file COPYING, or write
25 * to the Free Software Foundation, Inc.,
26 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29#ifndef _BFIN_GLOBAL_H_
30#define _BFIN_GLOBAL_H_
31
32#ifndef __ASSEMBLY__
33
34#include <asm-generic/sections.h>
35#include <asm/ptrace.h>
36#include <asm/user.h>
37#include <linux/linkage.h>
38#include <linux/types.h>
39
40#if defined(CONFIG_DMA_UNCACHED_4M)
41# define DMA_UNCACHED_REGION (4 * 1024 * 1024)
42#elif defined(CONFIG_DMA_UNCACHED_2M)
43# define DMA_UNCACHED_REGION (2 * 1024 * 1024)
44#elif defined(CONFIG_DMA_UNCACHED_1M)
45# define DMA_UNCACHED_REGION (1024 * 1024)
46#else
47# define DMA_UNCACHED_REGION (0)
48#endif
49
50extern unsigned long get_cclk(void);
51extern unsigned long get_sclk(void);
52extern unsigned long sclk_to_usecs(unsigned long sclk);
53extern unsigned long usecs_to_sclk(unsigned long usecs);
54
55extern void dump_bfin_process(struct pt_regs *regs);
56extern void dump_bfin_mem(struct pt_regs *regs);
57extern void dump_bfin_trace_buffer(void);
58
59/* init functions only */
60extern int init_arch_irq(void);
61extern void bfin_icache_init(void);
62extern void bfin_dcache_init(void);
63extern void init_exception_vectors(void);
64extern void program_IAR(void);
65
66extern void bfin_reset(void);
67extern asmlinkage void lower_to_irq14(void);
68extern asmlinkage void bfin_return_from_exception(void);
69extern asmlinkage void evt14_softirq(void);
70extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
71extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
72
73extern void *l1_data_A_sram_alloc(size_t);
74extern void *l1_data_B_sram_alloc(size_t);
75extern void *l1_inst_sram_alloc(size_t);
76extern void *l1_data_sram_alloc(size_t);
77extern void *l1_data_sram_zalloc(size_t);
78extern void *l2_sram_alloc(size_t);
79extern void *l2_sram_zalloc(size_t);
80extern int l1_data_A_sram_free(const void*);
81extern int l1_data_B_sram_free(const void*);
82extern int l1_inst_sram_free(const void*);
83extern int l1_data_sram_free(const void*);
84extern int l2_sram_free(const void *);
85extern int sram_free(const void*);
86
87#define L1_INST_SRAM 0x00000001
88#define L1_DATA_A_SRAM 0x00000002
89#define L1_DATA_B_SRAM 0x00000004
90#define L1_DATA_SRAM 0x00000006
91#define L2_SRAM 0x00000008
92extern void *sram_alloc_with_lsl(size_t, unsigned long);
93extern int sram_free_with_lsl(const void*);
94
95extern const char bfin_board_name[];
96
97extern unsigned long bfin_sic_iwr[];
98extern unsigned vr_wakeup;
99extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
100extern unsigned long _ramstart, _ramend, _rambase;
101extern unsigned long memory_start, memory_end, physical_mem_end;
102extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
103 _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[],
104 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
105 _ebss_l2[], _l2_lma_start[];
106
107/* only used when CONFIG_MTD_UCLINUX */
108extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
109
110#ifdef CONFIG_BFIN_ICACHE_LOCK
111extern void cache_grab_lock(int way);
112extern void cache_lock(int way);
113#endif
114
115#endif
116
117#endif /* _BLACKFIN_H_ */