Full support for Ginger Console
[linux-ginger.git] / arch / blackfin / include / asm / bfin-global.h
blob10064f902d201849f5f1c09b0e494b2230aee6d6
1 /*
2 * Global extern defines for blackfin
4 * Copyright 2006-2009 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
9 #ifndef _BFIN_GLOBAL_H_
10 #define _BFIN_GLOBAL_H_
12 #ifndef __ASSEMBLY__
14 #include <asm/sections.h>
15 #include <asm/ptrace.h>
16 #include <asm/user.h>
17 #include <linux/linkage.h>
18 #include <linux/types.h>
20 #if defined(CONFIG_DMA_UNCACHED_4M)
21 # define DMA_UNCACHED_REGION (4 * 1024 * 1024)
22 #elif defined(CONFIG_DMA_UNCACHED_2M)
23 # define DMA_UNCACHED_REGION (2 * 1024 * 1024)
24 #elif defined(CONFIG_DMA_UNCACHED_1M)
25 # define DMA_UNCACHED_REGION (1024 * 1024)
26 #else
27 # define DMA_UNCACHED_REGION (0)
28 #endif
30 extern void bfin_setup_caches(unsigned int cpu);
31 extern void bfin_setup_cpudata(unsigned int cpu);
33 extern unsigned long get_cclk(void);
34 extern unsigned long get_sclk(void);
35 extern unsigned long sclk_to_usecs(unsigned long sclk);
36 extern unsigned long usecs_to_sclk(unsigned long usecs);
38 extern void dump_bfin_process(struct pt_regs *regs);
39 extern void dump_bfin_mem(struct pt_regs *regs);
40 extern void dump_bfin_trace_buffer(void);
42 /* init functions only */
43 extern int init_arch_irq(void);
44 extern void init_exception_vectors(void);
45 extern void program_IAR(void);
47 extern asmlinkage void lower_to_irq14(void);
48 extern asmlinkage void bfin_return_from_exception(void);
49 extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
50 extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
52 extern void *l1_data_A_sram_alloc(size_t);
53 extern void *l1_data_B_sram_alloc(size_t);
54 extern void *l1_inst_sram_alloc(size_t);
55 extern void *l1_data_sram_alloc(size_t);
56 extern void *l1_data_sram_zalloc(size_t);
57 extern void *l2_sram_alloc(size_t);
58 extern void *l2_sram_zalloc(size_t);
59 extern int l1_data_A_sram_free(const void*);
60 extern int l1_data_B_sram_free(const void*);
61 extern int l1_inst_sram_free(const void*);
62 extern int l1_data_sram_free(const void*);
63 extern int l2_sram_free(const void *);
64 extern int sram_free(const void*);
66 #define L1_INST_SRAM 0x00000001
67 #define L1_DATA_A_SRAM 0x00000002
68 #define L1_DATA_B_SRAM 0x00000004
69 #define L1_DATA_SRAM 0x00000006
70 #define L2_SRAM 0x00000008
71 extern void *sram_alloc_with_lsl(size_t, unsigned long);
72 extern int sram_free_with_lsl(const void*);
74 extern void *isram_memcpy(void *dest, const void *src, size_t n);
76 extern const char bfin_board_name[];
78 extern unsigned long bfin_sic_iwr[];
79 extern unsigned vr_wakeup;
80 extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
82 #endif
84 #endif /* _BLACKFIN_H_ */