diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/blackfin/include/mach-common | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/blackfin/include/mach-common')
-rw-r--r-- | arch/blackfin/include/mach-common/irq.h | 57 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/pll.h | 86 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-a.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-b.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-c.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-d.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-e.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-f.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-g.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-h.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-i.h | 25 | ||||
-rw-r--r-- | arch/blackfin/include/mach-common/ports-j.h | 25 |
12 files changed, 393 insertions, 0 deletions
diff --git a/arch/blackfin/include/mach-common/irq.h b/arch/blackfin/include/mach-common/irq.h new file mode 100644 index 000000000000..cab14e911dc2 --- /dev/null +++ b/arch/blackfin/include/mach-common/irq.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Common Blackfin IRQ definitions (i.e. the CEC) | ||
3 | * | ||
4 | * Copyright 2005-2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later | ||
7 | */ | ||
8 | |||
9 | #ifndef _MACH_COMMON_IRQ_H_ | ||
10 | #define _MACH_COMMON_IRQ_H_ | ||
11 | |||
12 | /* | ||
13 | * Core events interrupt source definitions | ||
14 | * | ||
15 | * Event Source Event Name | ||
16 | * Emulation EMU 0 (highest priority) | ||
17 | * Reset RST 1 | ||
18 | * NMI NMI 2 | ||
19 | * Exception EVX 3 | ||
20 | * Reserved -- 4 | ||
21 | * Hardware Error IVHW 5 | ||
22 | * Core Timer IVTMR 6 | ||
23 | * Peripherals IVG7 7 | ||
24 | * Peripherals IVG8 8 | ||
25 | * Peripherals IVG9 9 | ||
26 | * Peripherals IVG10 10 | ||
27 | * Peripherals IVG11 11 | ||
28 | * Peripherals IVG12 12 | ||
29 | * Peripherals IVG13 13 | ||
30 | * Softirq IVG14 14 | ||
31 | * System Call IVG15 15 (lowest priority) | ||
32 | */ | ||
33 | |||
34 | /* The ABSTRACT IRQ definitions */ | ||
35 | #define IRQ_EMU 0 /* Emulation */ | ||
36 | #define IRQ_RST 1 /* reset */ | ||
37 | #define IRQ_NMI 2 /* Non Maskable */ | ||
38 | #define IRQ_EVX 3 /* Exception */ | ||
39 | #define IRQ_UNUSED 4 /* - unused interrupt */ | ||
40 | #define IRQ_HWERR 5 /* Hardware Error */ | ||
41 | #define IRQ_CORETMR 6 /* Core timer */ | ||
42 | |||
43 | #define BFIN_IRQ(x) ((x) + 7) | ||
44 | |||
45 | #define IVG7 7 | ||
46 | #define IVG8 8 | ||
47 | #define IVG9 9 | ||
48 | #define IVG10 10 | ||
49 | #define IVG11 11 | ||
50 | #define IVG12 12 | ||
51 | #define IVG13 13 | ||
52 | #define IVG14 14 | ||
53 | #define IVG15 15 | ||
54 | |||
55 | #define NR_IRQS (NR_MACH_IRQS + NR_SPARE_IRQS) | ||
56 | |||
57 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/pll.h b/arch/blackfin/include/mach-common/pll.h new file mode 100644 index 000000000000..382178b361af --- /dev/null +++ b/arch/blackfin/include/mach-common/pll.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2010 Analog Devices Inc. | ||
3 | * | ||
4 | * Licensed under the GPL-2 or later. | ||
5 | */ | ||
6 | |||
7 | #ifndef _MACH_COMMON_PLL_H | ||
8 | #define _MACH_COMMON_PLL_H | ||
9 | |||
10 | #ifndef __ASSEMBLY__ | ||
11 | |||
12 | #include <asm/blackfin.h> | ||
13 | #include <asm/irqflags.h> | ||
14 | |||
15 | #ifndef bfin_iwr_restore | ||
16 | static inline void | ||
17 | bfin_iwr_restore(unsigned long iwr0, unsigned long iwr1, unsigned long iwr2) | ||
18 | { | ||
19 | #ifdef SIC_IWR | ||
20 | bfin_write_SIC_IWR(iwr0); | ||
21 | #else | ||
22 | bfin_write_SIC_IWR0(iwr0); | ||
23 | # ifdef SIC_IWR1 | ||
24 | bfin_write_SIC_IWR1(iwr1); | ||
25 | # endif | ||
26 | # ifdef SIC_IWR2 | ||
27 | bfin_write_SIC_IWR2(iwr2); | ||
28 | # endif | ||
29 | #endif | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | #ifndef bfin_iwr_save | ||
34 | static inline void | ||
35 | bfin_iwr_save(unsigned long niwr0, unsigned long niwr1, unsigned long niwr2, | ||
36 | unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2) | ||
37 | { | ||
38 | #ifdef SIC_IWR | ||
39 | *iwr0 = bfin_read_SIC_IWR(); | ||
40 | #else | ||
41 | *iwr0 = bfin_read_SIC_IWR0(); | ||
42 | # ifdef SIC_IWR1 | ||
43 | *iwr1 = bfin_read_SIC_IWR1(); | ||
44 | # endif | ||
45 | # ifdef SIC_IWR2 | ||
46 | *iwr2 = bfin_read_SIC_IWR2(); | ||
47 | # endif | ||
48 | #endif | ||
49 | bfin_iwr_restore(niwr0, niwr1, niwr2); | ||
50 | } | ||
51 | #endif | ||
52 | |||
53 | static inline void _bfin_write_pll_relock(u32 addr, unsigned int val) | ||
54 | { | ||
55 | unsigned long flags, iwr0, iwr1, iwr2; | ||
56 | |||
57 | if (val == bfin_read_PLL_CTL()) | ||
58 | return; | ||
59 | |||
60 | flags = hard_local_irq_save(); | ||
61 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
62 | bfin_iwr_save(IWR_ENABLE(0), 0, 0, &iwr0, &iwr1, &iwr2); | ||
63 | |||
64 | bfin_write16(addr, val); | ||
65 | SSYNC(); | ||
66 | asm("IDLE;"); | ||
67 | |||
68 | bfin_iwr_restore(iwr0, iwr1, iwr2); | ||
69 | hard_local_irq_restore(flags); | ||
70 | } | ||
71 | |||
72 | /* Writing to PLL_CTL initiates a PLL relock sequence */ | ||
73 | static inline void bfin_write_PLL_CTL(unsigned int val) | ||
74 | { | ||
75 | _bfin_write_pll_relock(PLL_CTL, val); | ||
76 | } | ||
77 | |||
78 | /* Writing to VR_CTL initiates a PLL relock sequence */ | ||
79 | static inline void bfin_write_VR_CTL(unsigned int val) | ||
80 | { | ||
81 | _bfin_write_pll_relock(VR_CTL, val); | ||
82 | } | ||
83 | |||
84 | #endif | ||
85 | |||
86 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-a.h b/arch/blackfin/include/mach-common/ports-a.h new file mode 100644 index 000000000000..9f78a761c40a --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-a.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port A Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_A__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_A__ | ||
7 | |||
8 | #define PA0 (1 << 0) | ||
9 | #define PA1 (1 << 1) | ||
10 | #define PA2 (1 << 2) | ||
11 | #define PA3 (1 << 3) | ||
12 | #define PA4 (1 << 4) | ||
13 | #define PA5 (1 << 5) | ||
14 | #define PA6 (1 << 6) | ||
15 | #define PA7 (1 << 7) | ||
16 | #define PA8 (1 << 8) | ||
17 | #define PA9 (1 << 9) | ||
18 | #define PA10 (1 << 10) | ||
19 | #define PA11 (1 << 11) | ||
20 | #define PA12 (1 << 12) | ||
21 | #define PA13 (1 << 13) | ||
22 | #define PA14 (1 << 14) | ||
23 | #define PA15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-b.h b/arch/blackfin/include/mach-common/ports-b.h new file mode 100644 index 000000000000..b81702f09ec6 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-b.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port B Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_B__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_B__ | ||
7 | |||
8 | #define PB0 (1 << 0) | ||
9 | #define PB1 (1 << 1) | ||
10 | #define PB2 (1 << 2) | ||
11 | #define PB3 (1 << 3) | ||
12 | #define PB4 (1 << 4) | ||
13 | #define PB5 (1 << 5) | ||
14 | #define PB6 (1 << 6) | ||
15 | #define PB7 (1 << 7) | ||
16 | #define PB8 (1 << 8) | ||
17 | #define PB9 (1 << 9) | ||
18 | #define PB10 (1 << 10) | ||
19 | #define PB11 (1 << 11) | ||
20 | #define PB12 (1 << 12) | ||
21 | #define PB13 (1 << 13) | ||
22 | #define PB14 (1 << 14) | ||
23 | #define PB15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-c.h b/arch/blackfin/include/mach-common/ports-c.h new file mode 100644 index 000000000000..3cc665e0ba08 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-c.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port C Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_C__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_C__ | ||
7 | |||
8 | #define PC0 (1 << 0) | ||
9 | #define PC1 (1 << 1) | ||
10 | #define PC2 (1 << 2) | ||
11 | #define PC3 (1 << 3) | ||
12 | #define PC4 (1 << 4) | ||
13 | #define PC5 (1 << 5) | ||
14 | #define PC6 (1 << 6) | ||
15 | #define PC7 (1 << 7) | ||
16 | #define PC8 (1 << 8) | ||
17 | #define PC9 (1 << 9) | ||
18 | #define PC10 (1 << 10) | ||
19 | #define PC11 (1 << 11) | ||
20 | #define PC12 (1 << 12) | ||
21 | #define PC13 (1 << 13) | ||
22 | #define PC14 (1 << 14) | ||
23 | #define PC15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-d.h b/arch/blackfin/include/mach-common/ports-d.h new file mode 100644 index 000000000000..868c6a01f1b2 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-d.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port D Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_D__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_D__ | ||
7 | |||
8 | #define PD0 (1 << 0) | ||
9 | #define PD1 (1 << 1) | ||
10 | #define PD2 (1 << 2) | ||
11 | #define PD3 (1 << 3) | ||
12 | #define PD4 (1 << 4) | ||
13 | #define PD5 (1 << 5) | ||
14 | #define PD6 (1 << 6) | ||
15 | #define PD7 (1 << 7) | ||
16 | #define PD8 (1 << 8) | ||
17 | #define PD9 (1 << 9) | ||
18 | #define PD10 (1 << 10) | ||
19 | #define PD11 (1 << 11) | ||
20 | #define PD12 (1 << 12) | ||
21 | #define PD13 (1 << 13) | ||
22 | #define PD14 (1 << 14) | ||
23 | #define PD15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-e.h b/arch/blackfin/include/mach-common/ports-e.h new file mode 100644 index 000000000000..c88b0d0dd443 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-e.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port E Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_E__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_E__ | ||
7 | |||
8 | #define PE0 (1 << 0) | ||
9 | #define PE1 (1 << 1) | ||
10 | #define PE2 (1 << 2) | ||
11 | #define PE3 (1 << 3) | ||
12 | #define PE4 (1 << 4) | ||
13 | #define PE5 (1 << 5) | ||
14 | #define PE6 (1 << 6) | ||
15 | #define PE7 (1 << 7) | ||
16 | #define PE8 (1 << 8) | ||
17 | #define PE9 (1 << 9) | ||
18 | #define PE10 (1 << 10) | ||
19 | #define PE11 (1 << 11) | ||
20 | #define PE12 (1 << 12) | ||
21 | #define PE13 (1 << 13) | ||
22 | #define PE14 (1 << 14) | ||
23 | #define PE15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-f.h b/arch/blackfin/include/mach-common/ports-f.h new file mode 100644 index 000000000000..d6af20633278 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-f.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port F Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_F__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_F__ | ||
7 | |||
8 | #define PF0 (1 << 0) | ||
9 | #define PF1 (1 << 1) | ||
10 | #define PF2 (1 << 2) | ||
11 | #define PF3 (1 << 3) | ||
12 | #define PF4 (1 << 4) | ||
13 | #define PF5 (1 << 5) | ||
14 | #define PF6 (1 << 6) | ||
15 | #define PF7 (1 << 7) | ||
16 | #define PF8 (1 << 8) | ||
17 | #define PF9 (1 << 9) | ||
18 | #define PF10 (1 << 10) | ||
19 | #define PF11 (1 << 11) | ||
20 | #define PF12 (1 << 12) | ||
21 | #define PF13 (1 << 13) | ||
22 | #define PF14 (1 << 14) | ||
23 | #define PF15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-g.h b/arch/blackfin/include/mach-common/ports-g.h new file mode 100644 index 000000000000..09355d333c0e --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-g.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port G Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_G__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_G__ | ||
7 | |||
8 | #define PG0 (1 << 0) | ||
9 | #define PG1 (1 << 1) | ||
10 | #define PG2 (1 << 2) | ||
11 | #define PG3 (1 << 3) | ||
12 | #define PG4 (1 << 4) | ||
13 | #define PG5 (1 << 5) | ||
14 | #define PG6 (1 << 6) | ||
15 | #define PG7 (1 << 7) | ||
16 | #define PG8 (1 << 8) | ||
17 | #define PG9 (1 << 9) | ||
18 | #define PG10 (1 << 10) | ||
19 | #define PG11 (1 << 11) | ||
20 | #define PG12 (1 << 12) | ||
21 | #define PG13 (1 << 13) | ||
22 | #define PG14 (1 << 14) | ||
23 | #define PG15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-h.h b/arch/blackfin/include/mach-common/ports-h.h new file mode 100644 index 000000000000..fa3910c6fbd4 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-h.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port H Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_H__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_H__ | ||
7 | |||
8 | #define PH0 (1 << 0) | ||
9 | #define PH1 (1 << 1) | ||
10 | #define PH2 (1 << 2) | ||
11 | #define PH3 (1 << 3) | ||
12 | #define PH4 (1 << 4) | ||
13 | #define PH5 (1 << 5) | ||
14 | #define PH6 (1 << 6) | ||
15 | #define PH7 (1 << 7) | ||
16 | #define PH8 (1 << 8) | ||
17 | #define PH9 (1 << 9) | ||
18 | #define PH10 (1 << 10) | ||
19 | #define PH11 (1 << 11) | ||
20 | #define PH12 (1 << 12) | ||
21 | #define PH13 (1 << 13) | ||
22 | #define PH14 (1 << 14) | ||
23 | #define PH15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-i.h b/arch/blackfin/include/mach-common/ports-i.h new file mode 100644 index 000000000000..f176f08af624 --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-i.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port I Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_I__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_I__ | ||
7 | |||
8 | #define PI0 (1 << 0) | ||
9 | #define PI1 (1 << 1) | ||
10 | #define PI2 (1 << 2) | ||
11 | #define PI3 (1 << 3) | ||
12 | #define PI4 (1 << 4) | ||
13 | #define PI5 (1 << 5) | ||
14 | #define PI6 (1 << 6) | ||
15 | #define PI7 (1 << 7) | ||
16 | #define PI8 (1 << 8) | ||
17 | #define PI9 (1 << 9) | ||
18 | #define PI10 (1 << 10) | ||
19 | #define PI11 (1 << 11) | ||
20 | #define PI12 (1 << 12) | ||
21 | #define PI13 (1 << 13) | ||
22 | #define PI14 (1 << 14) | ||
23 | #define PI15 (1 << 15) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/blackfin/include/mach-common/ports-j.h b/arch/blackfin/include/mach-common/ports-j.h new file mode 100644 index 000000000000..924123ecec5a --- /dev/null +++ b/arch/blackfin/include/mach-common/ports-j.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Port J Masks | ||
3 | */ | ||
4 | |||
5 | #ifndef __BFIN_PERIPHERAL_PORT_J__ | ||
6 | #define __BFIN_PERIPHERAL_PORT_J__ | ||
7 | |||
8 | #define PJ0 (1 << 0) | ||
9 | #define PJ1 (1 << 1) | ||
10 | #define PJ2 (1 << 2) | ||
11 | #define PJ3 (1 << 3) | ||
12 | #define PJ4 (1 << 4) | ||
13 | #define PJ5 (1 << 5) | ||
14 | #define PJ6 (1 << 6) | ||
15 | #define PJ7 (1 << 7) | ||
16 | #define PJ8 (1 << 8) | ||
17 | #define PJ9 (1 << 9) | ||
18 | #define PJ10 (1 << 10) | ||
19 | #define PJ11 (1 << 11) | ||
20 | #define PJ12 (1 << 12) | ||
21 | #define PJ13 (1 << 13) | ||
22 | #define PJ14 (1 << 14) | ||
23 | #define PJ15 (1 << 15) | ||
24 | |||
25 | #endif | ||