diff options
Diffstat (limited to 'include')
195 files changed, 4181 insertions, 1960 deletions
diff --git a/include/asm-arm/arch-pxa/pxa3xx_nand.h b/include/asm-arm/arch-pxa/pxa3xx_nand.h new file mode 100644 index 000000000000..81a8937486cb --- /dev/null +++ b/include/asm-arm/arch-pxa/pxa3xx_nand.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __ASM_ARCH_PXA3XX_NAND_H | ||
2 | #define __ASM_ARCH_PXA3XX_NAND_H | ||
3 | |||
4 | #include <linux/mtd/mtd.h> | ||
5 | #include <linux/mtd/partitions.h> | ||
6 | |||
7 | struct pxa3xx_nand_platform_data { | ||
8 | |||
9 | /* the data flash bus is shared between the Static Memory | ||
10 | * Controller and the Data Flash Controller, the arbiter | ||
11 | * controls the ownership of the bus | ||
12 | */ | ||
13 | int enable_arbiter; | ||
14 | |||
15 | struct mtd_partition *parts; | ||
16 | unsigned int nr_parts; | ||
17 | }; | ||
18 | #endif /* __ASM_ARCH_PXA3XX_NAND_H */ | ||
diff --git a/include/asm-arm/plat-s3c/nand.h b/include/asm-arm/plat-s3c/nand.h index 8816f7f9cee1..ad6bbe90616e 100644 --- a/include/asm-arm/plat-s3c/nand.h +++ b/include/asm-arm/plat-s3c/nand.h | |||
@@ -22,11 +22,14 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | struct s3c2410_nand_set { | 24 | struct s3c2410_nand_set { |
25 | unsigned int disable_ecc : 1; | ||
26 | |||
25 | int nr_chips; | 27 | int nr_chips; |
26 | int nr_partitions; | 28 | int nr_partitions; |
27 | char *name; | 29 | char *name; |
28 | int *nr_map; | 30 | int *nr_map; |
29 | struct mtd_partition *partitions; | 31 | struct mtd_partition *partitions; |
32 | struct nand_ecclayout *ecc_layout; | ||
30 | }; | 33 | }; |
31 | 34 | ||
32 | struct s3c2410_platform_nand { | 35 | struct s3c2410_platform_nand { |
@@ -36,6 +39,8 @@ struct s3c2410_platform_nand { | |||
36 | int twrph0; /* active time for nWE/nOE */ | 39 | int twrph0; /* active time for nWE/nOE */ |
37 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ | 40 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ |
38 | 41 | ||
42 | unsigned int ignore_unset_ecc : 1; | ||
43 | |||
39 | int nr_sets; | 44 | int nr_sets; |
40 | struct s3c2410_nand_set *sets; | 45 | struct s3c2410_nand_set *sets; |
41 | 46 | ||
diff --git a/include/asm-blackfin/.gitignore b/include/asm-blackfin/.gitignore new file mode 100644 index 000000000000..7858564a4466 --- /dev/null +++ b/include/asm-blackfin/.gitignore | |||
@@ -0,0 +1 @@ | |||
+mach | |||
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 5dba3a735596..716df7c85923 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -112,20 +112,10 @@ extern void init_leds(void); | |||
112 | 112 | ||
113 | extern const char bfin_board_name[]; | 113 | extern const char bfin_board_name[]; |
114 | extern unsigned long wall_jiffies; | 114 | extern unsigned long wall_jiffies; |
115 | extern unsigned long ipdt_table[]; | ||
116 | extern unsigned long dpdt_table[]; | ||
117 | extern unsigned long icplb_table[]; | ||
118 | extern unsigned long dcplb_table[]; | ||
119 | |||
120 | extern unsigned long ipdt_swapcount_table[]; | ||
121 | extern unsigned long dpdt_swapcount_table[]; | ||
122 | |||
123 | extern unsigned long table_start, table_end; | ||
124 | 115 | ||
125 | extern unsigned long bfin_sic_iwr[]; | 116 | extern unsigned long bfin_sic_iwr[]; |
126 | extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */ | 117 | extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */ |
127 | extern struct file_operations dpmc_fops; | 118 | extern struct file_operations dpmc_fops; |
128 | extern char _start; | ||
129 | extern unsigned long _ramstart, _ramend, _rambase; | 119 | extern unsigned long _ramstart, _ramend, _rambase; |
130 | extern unsigned long memory_start, memory_end, physical_mem_end; | 120 | extern unsigned long memory_start, memory_end, physical_mem_end; |
131 | extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], | 121 | extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], |
diff --git a/include/asm-blackfin/bug.h b/include/asm-blackfin/bug.h index 41e53b29f167..6d3e11b1fc57 100644 --- a/include/asm-blackfin/bug.h +++ b/include/asm-blackfin/bug.h | |||
@@ -1,4 +1,17 @@ | |||
1 | #ifndef _BLACKFIN_BUG_H | 1 | #ifndef _BLACKFIN_BUG_H |
2 | #define _BLACKFIN_BUG_H | 2 | #define _BLACKFIN_BUG_H |
3 | |||
4 | #ifdef CONFIG_BUG | ||
5 | #define HAVE_ARCH_BUG | ||
6 | |||
7 | #define BUG() do { \ | ||
8 | dump_bfin_trace_buffer(); \ | ||
9 | printk(KERN_EMERG "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ | ||
10 | panic("BUG!"); \ | ||
11 | } while (0) | ||
12 | |||
13 | #endif | ||
14 | |||
3 | #include <asm-generic/bug.h> | 15 | #include <asm-generic/bug.h> |
16 | |||
4 | #endif | 17 | #endif |
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h index 654375c2b746..5b0da9a69b67 100644 --- a/include/asm-blackfin/cplb.h +++ b/include/asm-blackfin/cplb.h | |||
@@ -74,32 +74,6 @@ | |||
74 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ | 74 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ |
75 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) | 75 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) |
76 | 76 | ||
77 | /* | ||
78 | * Number of required data CPLB switchtable entries | ||
79 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
80 | * approx 16 for smaller 1MB page size CPLBs for allignment purposes | ||
81 | * 1 for L1 Data Memory | ||
82 | * possibly 1 for L2 Data Memory | ||
83 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
84 | * 1 for ASYNC Memory | ||
85 | */ | ||
86 | |||
87 | |||
88 | #define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1 \ | ||
89 | + ASYNC_MEMORY_CPLB_COVERAGE) * 2) | ||
90 | |||
91 | /* | ||
92 | * Number of required instruction CPLB switchtable entries | ||
93 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
94 | * approx 12 for smaller 1MB page size CPLBs for allignment purposes | ||
95 | * 1 for L1 Instruction Memory | ||
96 | * possibly 1 for L2 Instruction Memory | ||
97 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
98 | */ | ||
99 | |||
100 | #define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1 + 1) * 2) | ||
101 | |||
102 | |||
103 | #define CPLB_ENABLE_ICACHE_P 0 | 77 | #define CPLB_ENABLE_ICACHE_P 0 |
104 | #define CPLB_ENABLE_DCACHE_P 1 | 78 | #define CPLB_ENABLE_DCACHE_P 1 |
105 | #define CPLB_ENABLE_DCACHE2_P 2 | 79 | #define CPLB_ENABLE_DCACHE2_P 2 |
diff --git a/include/asm-blackfin/dma-mapping.h b/include/asm-blackfin/dma-mapping.h index 282fabccf6a6..1a13c2fc3667 100644 --- a/include/asm-blackfin/dma-mapping.h +++ b/include/asm-blackfin/dma-mapping.h | |||
@@ -27,6 +27,14 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
27 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 27 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
28 | enum dma_data_direction direction); | 28 | enum dma_data_direction direction); |
29 | 29 | ||
30 | static inline dma_addr_t | ||
31 | dma_map_page(struct device *dev, struct page *page, | ||
32 | unsigned long offset, size_t size, | ||
33 | enum dma_data_direction dir) | ||
34 | { | ||
35 | return dma_map_single(dev, page_address(page) + offset, size, dir); | ||
36 | } | ||
37 | |||
30 | /* | 38 | /* |
31 | * Unmap a single streaming mode DMA translation. The dma_addr and size | 39 | * Unmap a single streaming mode DMA translation. The dma_addr and size |
32 | * must match what was provided for in a previous pci_map_single call. All | 40 | * must match what was provided for in a previous pci_map_single call. All |
@@ -38,6 +46,13 @@ extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
38 | extern void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 46 | extern void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
39 | enum dma_data_direction direction); | 47 | enum dma_data_direction direction); |
40 | 48 | ||
49 | static inline void | ||
50 | dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
51 | enum dma_data_direction dir) | ||
52 | { | ||
53 | dma_unmap_single(dev, dma_addr, size, dir); | ||
54 | } | ||
55 | |||
41 | /* | 56 | /* |
42 | * Map a set of buffers described by scatterlist in streaming | 57 | * Map a set of buffers described by scatterlist in streaming |
43 | * mode for DMA. This is the scather-gather version of the | 58 | * mode for DMA. This is the scather-gather version of the |
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index 16d493574ba8..c0d5259e315b 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
@@ -191,4 +191,7 @@ void clear_dma_irqstat(unsigned int channel); | |||
191 | void *dma_memcpy(void *dest, const void *src, size_t count); | 191 | void *dma_memcpy(void *dest, const void *src, size_t count); |
192 | void *safe_dma_memcpy(void *dest, const void *src, size_t count); | 192 | void *safe_dma_memcpy(void *dest, const void *src, size_t count); |
193 | 193 | ||
194 | extern int channel2irq(unsigned int channel); | ||
195 | extern struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL]; | ||
196 | |||
194 | #endif | 197 | #endif |
diff --git a/include/asm-blackfin/gptimers.h b/include/asm-blackfin/gptimers.h index 4f318f1fd2d9..0520d2aac8f3 100644 --- a/include/asm-blackfin/gptimers.h +++ b/include/asm-blackfin/gptimers.h | |||
@@ -22,6 +22,18 @@ | |||
22 | # define TIMER0_GROUP_REG TIMER_ENABLE | 22 | # define TIMER0_GROUP_REG TIMER_ENABLE |
23 | #endif | 23 | #endif |
24 | /* | 24 | /* |
25 | * BF54x: 11 timers (BF542: 8 timers): | ||
26 | */ | ||
27 | #if defined(BF548_FAMILY) | ||
28 | # ifdef CONFIG_BF542 | ||
29 | # define MAX_BLACKFIN_GPTIMERS 8 | ||
30 | # else | ||
31 | # define MAX_BLACKFIN_GPTIMERS 11 | ||
32 | # define TIMER8_GROUP_REG TIMER_ENABLE1 | ||
33 | # endif | ||
34 | # define TIMER0_GROUP_REG TIMER_ENABLE0 | ||
35 | #endif | ||
36 | /* | ||
25 | * BF561: 12 timers: | 37 | * BF561: 12 timers: |
26 | */ | 38 | */ |
27 | #if defined(CONFIG_BF561) | 39 | #if defined(CONFIG_BF561) |
@@ -44,40 +56,28 @@ | |||
44 | #define TIMER0bit 0x0001 /* 0001b */ | 56 | #define TIMER0bit 0x0001 /* 0001b */ |
45 | #define TIMER1bit 0x0002 /* 0010b */ | 57 | #define TIMER1bit 0x0002 /* 0010b */ |
46 | #define TIMER2bit 0x0004 /* 0100b */ | 58 | #define TIMER2bit 0x0004 /* 0100b */ |
47 | 59 | #define TIMER3bit 0x0008 | |
48 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 60 | #define TIMER4bit 0x0010 |
49 | # define TIMER3bit 0x0008 | 61 | #define TIMER5bit 0x0020 |
50 | # define TIMER4bit 0x0010 | 62 | #define TIMER6bit 0x0040 |
51 | # define TIMER5bit 0x0020 | 63 | #define TIMER7bit 0x0080 |
52 | # define TIMER6bit 0x0040 | 64 | #define TIMER8bit 0x0100 |
53 | # define TIMER7bit 0x0080 | 65 | #define TIMER9bit 0x0200 |
54 | #endif | 66 | #define TIMER10bit 0x0400 |
55 | 67 | #define TIMER11bit 0x0800 | |
56 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
57 | # define TIMER8bit 0x0100 | ||
58 | # define TIMER9bit 0x0200 | ||
59 | # define TIMER10bit 0x0400 | ||
60 | # define TIMER11bit 0x0800 | ||
61 | #endif | ||
62 | 68 | ||
63 | #define TIMER0_id 0 | 69 | #define TIMER0_id 0 |
64 | #define TIMER1_id 1 | 70 | #define TIMER1_id 1 |
65 | #define TIMER2_id 2 | 71 | #define TIMER2_id 2 |
66 | 72 | #define TIMER3_id 3 | |
67 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 73 | #define TIMER4_id 4 |
68 | # define TIMER3_id 3 | 74 | #define TIMER5_id 5 |
69 | # define TIMER4_id 4 | 75 | #define TIMER6_id 6 |
70 | # define TIMER5_id 5 | 76 | #define TIMER7_id 7 |
71 | # define TIMER6_id 6 | 77 | #define TIMER8_id 8 |
72 | # define TIMER7_id 7 | 78 | #define TIMER9_id 9 |
73 | #endif | 79 | #define TIMER10_id 10 |
74 | 80 | #define TIMER11_id 11 | |
75 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
76 | # define TIMER8_id 8 | ||
77 | # define TIMER9_id 9 | ||
78 | # define TIMER10_id 10 | ||
79 | # define TIMER11_id 11 | ||
80 | #endif | ||
81 | 81 | ||
82 | /* associated timers for ppi framesync: */ | 82 | /* associated timers for ppi framesync: */ |
83 | 83 | ||
@@ -124,45 +124,31 @@ | |||
124 | /* | 124 | /* |
125 | * Timer Status Register Bits | 125 | * Timer Status Register Bits |
126 | */ | 126 | */ |
127 | #define TIMER_STATUS_TIMIL0 0x0001 | 127 | #define TIMER_STATUS_TIMIL0 0x0001 |
128 | #define TIMER_STATUS_TIMIL1 0x0002 | 128 | #define TIMER_STATUS_TIMIL1 0x0002 |
129 | #define TIMER_STATUS_TIMIL2 0x0004 | 129 | #define TIMER_STATUS_TIMIL2 0x0004 |
130 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 130 | #define TIMER_STATUS_TIMIL3 0x00000008 |
131 | # define TIMER_STATUS_TIMIL3 0x00000008 | 131 | #define TIMER_STATUS_TIMIL4 0x00010000 |
132 | # define TIMER_STATUS_TIMIL4 0x00010000 | 132 | #define TIMER_STATUS_TIMIL5 0x00020000 |
133 | # define TIMER_STATUS_TIMIL5 0x00020000 | 133 | #define TIMER_STATUS_TIMIL6 0x00040000 |
134 | # define TIMER_STATUS_TIMIL6 0x00040000 | 134 | #define TIMER_STATUS_TIMIL7 0x00080000 |
135 | # define TIMER_STATUS_TIMIL7 0x00080000 | 135 | #define TIMER_STATUS_TIMIL8 0x0001 |
136 | # if (MAX_BLACKFIN_GPTIMERS > 8) | 136 | #define TIMER_STATUS_TIMIL9 0x0002 |
137 | # define TIMER_STATUS_TIMIL8 0x0001 | 137 | #define TIMER_STATUS_TIMIL10 0x0004 |
138 | # define TIMER_STATUS_TIMIL9 0x0002 | 138 | #define TIMER_STATUS_TIMIL11 0x0008 |
139 | # define TIMER_STATUS_TIMIL10 0x0004 | 139 | |
140 | # define TIMER_STATUS_TIMIL11 0x0008 | 140 | #define TIMER_STATUS_TOVF0 0x0010 /* timer 0 overflow error */ |
141 | # endif | 141 | #define TIMER_STATUS_TOVF1 0x0020 |
142 | # define TIMER_STATUS_INTR 0x000F000F | 142 | #define TIMER_STATUS_TOVF2 0x0040 |
143 | #else | 143 | #define TIMER_STATUS_TOVF3 0x00000080 |
144 | # define TIMER_STATUS_INTR 0x0007 /* any timer interrupt */ | 144 | #define TIMER_STATUS_TOVF4 0x00100000 |
145 | #endif | 145 | #define TIMER_STATUS_TOVF5 0x00200000 |
146 | 146 | #define TIMER_STATUS_TOVF6 0x00400000 | |
147 | #define TIMER_STATUS_TOVF0 0x0010 /* timer 0 overflow error */ | 147 | #define TIMER_STATUS_TOVF7 0x00800000 |
148 | #define TIMER_STATUS_TOVF1 0x0020 | 148 | #define TIMER_STATUS_TOVF8 0x0010 |
149 | #define TIMER_STATUS_TOVF2 0x0040 | 149 | #define TIMER_STATUS_TOVF9 0x0020 |
150 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 150 | #define TIMER_STATUS_TOVF10 0x0040 |
151 | # define TIMER_STATUS_TOVF3 0x00000080 | 151 | #define TIMER_STATUS_TOVF11 0x0080 |
152 | # define TIMER_STATUS_TOVF4 0x00100000 | ||
153 | # define TIMER_STATUS_TOVF5 0x00200000 | ||
154 | # define TIMER_STATUS_TOVF6 0x00400000 | ||
155 | # define TIMER_STATUS_TOVF7 0x00800000 | ||
156 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
157 | # define TIMER_STATUS_TOVF8 0x0010 | ||
158 | # define TIMER_STATUS_TOVF9 0x0020 | ||
159 | # define TIMER_STATUS_TOVF10 0x0040 | ||
160 | # define TIMER_STATUS_TOVF11 0x0080 | ||
161 | # endif | ||
162 | # define TIMER_STATUS_OFLOW 0x00F000F0 | ||
163 | #else | ||
164 | # define TIMER_STATUS_OFLOW 0x0070 /* any timer overflow */ | ||
165 | #endif | ||
166 | 152 | ||
167 | /* | 153 | /* |
168 | * Timer Slave Enable Status : write 1 to clear | 154 | * Timer Slave Enable Status : write 1 to clear |
@@ -170,22 +156,16 @@ | |||
170 | #define TIMER_STATUS_TRUN0 0x1000 | 156 | #define TIMER_STATUS_TRUN0 0x1000 |
171 | #define TIMER_STATUS_TRUN1 0x2000 | 157 | #define TIMER_STATUS_TRUN1 0x2000 |
172 | #define TIMER_STATUS_TRUN2 0x4000 | 158 | #define TIMER_STATUS_TRUN2 0x4000 |
173 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 159 | #define TIMER_STATUS_TRUN3 0x00008000 |
174 | # define TIMER_STATUS_TRUN3 0x00008000 | 160 | #define TIMER_STATUS_TRUN4 0x10000000 |
175 | # define TIMER_STATUS_TRUN4 0x10000000 | 161 | #define TIMER_STATUS_TRUN5 0x20000000 |
176 | # define TIMER_STATUS_TRUN5 0x20000000 | 162 | #define TIMER_STATUS_TRUN6 0x40000000 |
177 | # define TIMER_STATUS_TRUN6 0x40000000 | 163 | #define TIMER_STATUS_TRUN7 0x80000000 |
178 | # define TIMER_STATUS_TRUN7 0x80000000 | 164 | #define TIMER_STATUS_TRUN 0xF000F000 |
179 | # define TIMER_STATUS_TRUN 0xF000F000 | 165 | #define TIMER_STATUS_TRUN8 0x1000 |
180 | # if (MAX_BLACKFIN_GPTIMERS > 8) | 166 | #define TIMER_STATUS_TRUN9 0x2000 |
181 | # define TIMER_STATUS_TRUN8 0x1000 | 167 | #define TIMER_STATUS_TRUN10 0x4000 |
182 | # define TIMER_STATUS_TRUN9 0x2000 | 168 | #define TIMER_STATUS_TRUN11 0x8000 |
183 | # define TIMER_STATUS_TRUN10 0x4000 | ||
184 | # define TIMER_STATUS_TRUN11 0x8000 | ||
185 | # endif | ||
186 | #else | ||
187 | # define TIMER_STATUS_TRUN 0x7000 | ||
188 | #endif | ||
189 | 169 | ||
190 | /* The actual gptimer API */ | 170 | /* The actual gptimer API */ |
191 | 171 | ||
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h index a89120445be6..735fa02fafb2 100644 --- a/include/asm-blackfin/mach-bf527/anomaly.h +++ b/include/asm-blackfin/mach-bf527/anomaly.h | |||
@@ -2,12 +2,12 @@ | |||
2 | * File: include/asm-blackfin/mach-bf527/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf527/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision A, May 30, 2007; ADSP-BF527 Blackfin Processor Anomaly List | 10 | * - Revision C, 01/25/2008; ADSP-BF527 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -15,35 +15,85 @@ | |||
15 | 15 | ||
16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ | 16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ |
17 | #define ANOMALY_05000074 (1) | 17 | #define ANOMALY_05000074 (1) |
18 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ | ||
19 | #define ANOMALY_05000119 (1) | ||
20 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 18 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
21 | #define ANOMALY_05000122 (1) | 19 | #define ANOMALY_05000122 (1) |
22 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ | 20 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ |
23 | #define ANOMALY_05000245 (1) | 21 | #define ANOMALY_05000245 (1) |
24 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 22 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
25 | #define ANOMALY_05000265 (1) | 23 | #define ANOMALY_05000265 (1) |
26 | /* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */ | ||
27 | #define ANOMALY_05000301 (1) | ||
28 | /* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
29 | #define ANOMALY_05000312 (1) | ||
30 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 24 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
31 | #define ANOMALY_05000328 (1) | 25 | #define ANOMALY_05000328 (1) |
32 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 26 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
33 | #define ANOMALY_05000337 (1) | 27 | #define ANOMALY_05000337 (1) |
34 | /* TWI Does Not Operate Correctly Under Certain Signal Termination Conditions */ | 28 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
29 | #define ANOMALY_05000341 (1) | ||
30 | /* TWI May Not Operate Correctly Under Certain Signal Termination Conditions */ | ||
35 | #define ANOMALY_05000342 (1) | 31 | #define ANOMALY_05000342 (1) |
36 | /* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ | 32 | /* USB Calibration Value Is Not Initialized */ |
33 | #define ANOMALY_05000346 (1) | ||
34 | /* Preboot Routine Incorrectly Alters Reset Value of USB Register */ | ||
37 | #define ANOMALY_05000347 (1) | 35 | #define ANOMALY_05000347 (1) |
36 | /* Security Features Are Not Functional */ | ||
37 | #define ANOMALY_05000348 (__SILICON_REVISION__ < 1) | ||
38 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | ||
39 | #define ANOMALY_05000355 (1) | ||
40 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
41 | #define ANOMALY_05000357 (1) | ||
42 | /* Incorrect Revision Number in DSPID Register */ | ||
43 | #define ANOMALY_05000364 (__SILICON_REVISION__ > 0) | ||
44 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
45 | #define ANOMALY_05000366 (1) | ||
46 | /* New Feature: Higher Default CCLK Rate */ | ||
47 | #define ANOMALY_05000368 (1) | ||
48 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
49 | #define ANOMALY_05000371 (1) | ||
50 | /* Authentication Fails To Initiate */ | ||
51 | #define ANOMALY_05000376 (__SILICON_REVISION__ > 0) | ||
52 | /* Data Read From L3 Memory by USB DMA May be Corrupted */ | ||
53 | #define ANOMALY_05000380 (1) | ||
54 | /* USB Full-speed Mode not Fully Tested */ | ||
55 | #define ANOMALY_05000381 (1) | ||
56 | /* New Feature: Boot from OTP Memory */ | ||
57 | #define ANOMALY_05000385 (1) | ||
58 | /* New Feature: bfrom_SysControl() Routine */ | ||
59 | #define ANOMALY_05000386 (1) | ||
60 | /* New Feature: Programmable Preboot Settings */ | ||
61 | #define ANOMALY_05000387 (1) | ||
62 | /* Reset Vector Must Not Be in SDRAM Memory Space */ | ||
63 | #define ANOMALY_05000389 (1) | ||
64 | /* New Feature: pTempCurrent Added to ADI_BOOT_DATA Structure */ | ||
65 | #define ANOMALY_05000392 (1) | ||
66 | /* New Feature: dTempByteCount Value Increased in ADI_BOOT_DATA Structure */ | ||
67 | #define ANOMALY_05000393 (1) | ||
68 | /* New Feature: Log Buffer Functionality */ | ||
69 | #define ANOMALY_05000394 (1) | ||
70 | /* New Feature: Hook Routine Functionality */ | ||
71 | #define ANOMALY_05000395 (1) | ||
72 | /* New Feature: Header Indirect Bit */ | ||
73 | #define ANOMALY_05000396 (1) | ||
74 | /* New Feature: BK_ONES, BK_ZEROS, and BK_DATECODE Constants */ | ||
75 | #define ANOMALY_05000397 (1) | ||
76 | /* New Feature: SWRESET, DFRESET and WDRESET Bits Added to SYSCR Register */ | ||
77 | #define ANOMALY_05000398 (1) | ||
78 | /* New Feature: BCODE_NOBOOT Added to BCODE Field of SYSCR Register */ | ||
79 | #define ANOMALY_05000399 (1) | ||
80 | /* PPI Data Signals D0 and D8 do not Tristate After Disabling PPI */ | ||
81 | #define ANOMALY_05000401 (1) | ||
38 | 82 | ||
39 | /* Anomalies that don't exist on this proc */ | 83 | /* Anomalies that don't exist on this proc */ |
40 | #define ANOMALY_05000323 (0) | ||
41 | #define ANOMALY_05000244 (0) | ||
42 | #define ANOMALY_05000198 (0) | ||
43 | #define ANOMALY_05000125 (0) | 84 | #define ANOMALY_05000125 (0) |
44 | #define ANOMALY_05000158 (0) | 85 | #define ANOMALY_05000158 (0) |
45 | #define ANOMALY_05000273 (0) | 86 | #define ANOMALY_05000183 (0) |
87 | #define ANOMALY_05000198 (0) | ||
88 | #define ANOMALY_05000230 (0) | ||
89 | #define ANOMALY_05000244 (0) | ||
90 | #define ANOMALY_05000261 (0) | ||
46 | #define ANOMALY_05000263 (0) | 91 | #define ANOMALY_05000263 (0) |
92 | #define ANOMALY_05000266 (0) | ||
93 | #define ANOMALY_05000273 (0) | ||
47 | #define ANOMALY_05000311 (0) | 94 | #define ANOMALY_05000311 (0) |
48 | #define ANOMALY_05000230 (0) | 95 | #define ANOMALY_05000312 (0) |
96 | #define ANOMALY_05000323 (0) | ||
97 | #define ANOMALY_05000363 (0) | ||
98 | |||
49 | #endif | 99 | #endif |
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index c0694ecd2ecd..f0ab2736a680 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -1,22 +1,38 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * blackfin serial driver head file | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * | ||
14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * this program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the gnu general public license as published by | ||
18 | * the free software foundation; either version 2, or (at your option) | ||
19 | * any later version. | ||
20 | * | ||
21 | * this program is distributed in the hope that it will be useful, | ||
22 | * but without any warranty; without even the implied warranty of | ||
23 | * merchantability or fitness for a particular purpose. see the | ||
24 | * gnu general public license for more details. | ||
25 | * | ||
26 | * you should have received a copy of the gnu general public license | ||
27 | * along with this program; see the file copying. | ||
28 | * if not, write to the free software foundation, | ||
29 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
30 | */ | ||
31 | |||
1 | #include <linux/serial.h> | 32 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | 34 | #include <asm/portmux.h> |
4 | 35 | ||
5 | #define NR_PORTS 2 | ||
6 | |||
7 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
8 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
9 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
10 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
11 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
12 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
13 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
14 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
15 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
16 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
17 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
18 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
19 | |||
20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | 36 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) |
21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | 37 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) |
22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) | 38 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) |
@@ -92,7 +108,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart) | |||
92 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); | 108 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); |
93 | } | 109 | } |
94 | 110 | ||
95 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | 111 | struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS]; |
96 | struct bfin_serial_res { | 112 | struct bfin_serial_res { |
97 | unsigned long uart_base_addr; | 113 | unsigned long uart_base_addr; |
98 | int uart_irq; | 114 | int uart_irq; |
diff --git a/include/asm-blackfin/mach-bf527/bfin_sir.h b/include/asm-blackfin/mach-bf527/bfin_sir.h new file mode 100644 index 000000000000..0612d0c9501c --- /dev/null +++ b/include/asm-blackfin/mach-bf527/bfin_sir.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * Blackfin Infra-red Driver | ||
3 | * | ||
4 | * Copyright 2006-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial.h> | ||
13 | #include <asm/dma.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | #define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) | ||
17 | #define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) | ||
18 | #define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER) | ||
19 | #define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) | ||
20 | #define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR) | ||
21 | #define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) | ||
22 | #define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL) | ||
23 | |||
24 | #define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v) | ||
25 | #define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v) | ||
26 | #define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v) | ||
27 | #define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v) | ||
28 | #define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v) | ||
29 | #define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v) | ||
30 | |||
31 | #ifdef CONFIG_SIR_BFIN_DMA | ||
32 | struct dma_rx_buf { | ||
33 | char *buf; | ||
34 | int head; | ||
35 | int tail; | ||
36 | }; | ||
37 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
38 | |||
39 | struct bfin_sir_port { | ||
40 | unsigned char __iomem *membase; | ||
41 | unsigned int irq; | ||
42 | unsigned int lsr; | ||
43 | unsigned long clk; | ||
44 | struct net_device *dev; | ||
45 | #ifdef CONFIG_SIR_BFIN_DMA | ||
46 | int tx_done; | ||
47 | struct dma_rx_buf rx_dma_buf; | ||
48 | struct timer_list rx_dma_timer; | ||
49 | int rx_dma_nrows; | ||
50 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
51 | unsigned int tx_dma_channel; | ||
52 | unsigned int rx_dma_channel; | ||
53 | }; | ||
54 | |||
55 | struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS]; | ||
56 | |||
57 | struct bfin_sir_port_res { | ||
58 | unsigned long base_addr; | ||
59 | int irq; | ||
60 | unsigned int rx_dma_channel; | ||
61 | unsigned int tx_dma_channel; | ||
62 | }; | ||
63 | |||
64 | struct bfin_sir_port_res bfin_sir_port_resource[] = { | ||
65 | #ifdef CONFIG_BFIN_SIR0 | ||
66 | { | ||
67 | 0xFFC00400, | ||
68 | IRQ_UART0_RX, | ||
69 | CH_UART0_RX, | ||
70 | CH_UART0_TX, | ||
71 | }, | ||
72 | #endif | ||
73 | #ifdef CONFIG_BFIN_SIR1 | ||
74 | { | ||
75 | 0xFFC02000, | ||
76 | IRQ_UART1_RX, | ||
77 | CH_UART1_RX, | ||
78 | CH_UART1_TX, | ||
79 | }, | ||
80 | #endif | ||
81 | }; | ||
82 | |||
83 | int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource); | ||
84 | |||
85 | struct bfin_sir_self { | ||
86 | struct bfin_sir_port *sir_port; | ||
87 | spinlock_t lock; | ||
88 | unsigned int open; | ||
89 | int speed; | ||
90 | int newspeed; | ||
91 | |||
92 | struct sk_buff *txskb; | ||
93 | struct sk_buff *rxskb; | ||
94 | struct net_device_stats stats; | ||
95 | struct device *dev; | ||
96 | struct irlap_cb *irlap; | ||
97 | struct qos_info qos; | ||
98 | |||
99 | iobuff_t tx_buff; | ||
100 | iobuff_t rx_buff; | ||
101 | |||
102 | struct work_struct work; | ||
103 | int mtt; | ||
104 | }; | ||
105 | |||
106 | static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port) | ||
107 | { | ||
108 | unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR); | ||
109 | port->lsr |= (lsr & (BI|FE|PE|OE)); | ||
110 | return lsr | port->lsr; | ||
111 | } | ||
112 | |||
113 | static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port) | ||
114 | { | ||
115 | port->lsr = 0; | ||
116 | bfin_read16(port->membase + OFFSET_LSR); | ||
117 | } | ||
118 | |||
119 | #define DRIVER_NAME "bfin_sir" | ||
120 | |||
121 | static void bfin_sir_hw_init(void) | ||
122 | { | ||
123 | #ifdef CONFIG_BFIN_SIR0 | ||
124 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
125 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
126 | #endif | ||
127 | |||
128 | #ifdef CONFIG_BFIN_SIR1 | ||
129 | peripheral_request(P_UART1_TX, DRIVER_NAME); | ||
130 | peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
131 | #endif | ||
132 | SSYNC(); | ||
133 | } | ||
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h index 1bd07e30781c..2891727b6176 100644 --- a/include/asm-blackfin/mach-bf527/blackfin.h +++ b/include/asm-blackfin/mach-bf527/blackfin.h | |||
@@ -64,6 +64,21 @@ | |||
64 | #define STATUS_P1 0x02 | 64 | #define STATUS_P1 0x02 |
65 | #define STATUS_P0 0x01 | 65 | #define STATUS_P0 0x01 |
66 | 66 | ||
67 | #define BFIN_UART_NR_PORTS 2 | ||
68 | |||
69 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
70 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
71 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
72 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
73 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
74 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
75 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
76 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
77 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
78 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
79 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
80 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
81 | |||
67 | /* DPMC*/ | 82 | /* DPMC*/ |
68 | #define bfin_read_STOPCK_OFF() bfin_read_STOPCK() | 83 | #define bfin_read_STOPCK_OFF() bfin_read_STOPCK() |
69 | #define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val) | 84 | #define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val) |
diff --git a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h index 3f4de5d9d4cb..9dbdbec8ea1b 100644 --- a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h +++ b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h | |||
@@ -29,18 +29,71 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef _CDEF_BF52X_H | 31 | #ifndef _CDEF_BF52X_H |
32 | #define _CDEF_BF52X_H | ||
33 | |||
34 | #include <asm/system.h> | ||
35 | #include <asm/blackfin.h> | ||
32 | 36 | ||
33 | #include "defBF52x_base.h" | 37 | #include "defBF52x_base.h" |
34 | 38 | ||
39 | /* Include core specific register pointer definitions */ | ||
40 | #include <asm/mach-common/cdef_LPBlackfin.h> | ||
41 | |||
35 | /* ==== begin from cdefBF534.h ==== */ | 42 | /* ==== begin from cdefBF534.h ==== */ |
36 | 43 | ||
37 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ | 44 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ |
38 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) | 45 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) |
39 | #define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL, val) | 46 | /* Writing to PLL_CTL initiates a PLL relock sequence. */ |
47 | static __inline__ void bfin_write_PLL_CTL(unsigned int val) | ||
48 | { | ||
49 | unsigned long flags, iwr0, iwr1; | ||
50 | |||
51 | if (val == bfin_read_PLL_CTL()) | ||
52 | return; | ||
53 | |||
54 | local_irq_save(flags); | ||
55 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
56 | iwr0 = bfin_read32(SIC_IWR0); | ||
57 | iwr1 = bfin_read32(SIC_IWR1); | ||
58 | /* Only allow PPL Wakeup) */ | ||
59 | bfin_write32(SIC_IWR0, IWR_ENABLE(0)); | ||
60 | bfin_write32(SIC_IWR1, 0); | ||
61 | |||
62 | bfin_write16(PLL_CTL, val); | ||
63 | SSYNC(); | ||
64 | asm("IDLE;"); | ||
65 | |||
66 | bfin_write32(SIC_IWR0, iwr0); | ||
67 | bfin_write32(SIC_IWR1, iwr1); | ||
68 | local_irq_restore(flags); | ||
69 | } | ||
40 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 70 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
41 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) | 71 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) |
42 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 72 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
43 | #define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val) | 73 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
74 | static __inline__ void bfin_write_VR_CTL(unsigned int val) | ||
75 | { | ||
76 | unsigned long flags, iwr0, iwr1; | ||
77 | |||
78 | if (val == bfin_read_VR_CTL()) | ||
79 | return; | ||
80 | |||
81 | local_irq_save(flags); | ||
82 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
83 | iwr0 = bfin_read32(SIC_IWR0); | ||
84 | iwr1 = bfin_read32(SIC_IWR1); | ||
85 | /* Only allow PPL Wakeup) */ | ||
86 | bfin_write32(SIC_IWR0, IWR_ENABLE(0)); | ||
87 | bfin_write32(SIC_IWR1, 0); | ||
88 | |||
89 | bfin_write16(VR_CTL, val); | ||
90 | SSYNC(); | ||
91 | asm("IDLE;"); | ||
92 | |||
93 | bfin_write32(SIC_IWR0, iwr0); | ||
94 | bfin_write32(SIC_IWR1, iwr1); | ||
95 | local_irq_restore(flags); | ||
96 | } | ||
44 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 97 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
45 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) | 98 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) |
46 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) | 99 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) |
@@ -873,39 +926,6 @@ | |||
873 | 926 | ||
874 | 927 | ||
875 | /* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ | 928 | /* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ |
876 | #define bfin_read_TWI_CLKDIV() bfin_read16(TWI_CLKDIV) | ||
877 | #define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI_CLKDIV, val) | ||
878 | #define bfin_read_TWI_CONTROL() bfin_read16(TWI_CONTROL) | ||
879 | #define bfin_write_TWI_CONTROL(val) bfin_write16(TWI_CONTROL, val) | ||
880 | #define bfin_read_TWI_SLAVE_CTL() bfin_read16(TWI_SLAVE_CTL) | ||
881 | #define bfin_write_TWI_SLAVE_CTL(val) bfin_write16(TWI_SLAVE_CTL, val) | ||
882 | #define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI_SLAVE_STAT) | ||
883 | #define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI_SLAVE_STAT, val) | ||
884 | #define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI_SLAVE_ADDR) | ||
885 | #define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI_SLAVE_ADDR, val) | ||
886 | #define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI_MASTER_CTL) | ||
887 | #define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI_MASTER_CTL, val) | ||
888 | #define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI_MASTER_STAT) | ||
889 | #define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI_MASTER_STAT, val) | ||
890 | #define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI_MASTER_ADDR) | ||
891 | #define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI_MASTER_ADDR, val) | ||
892 | #define bfin_read_TWI_INT_STAT() bfin_read16(TWI_INT_STAT) | ||
893 | #define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI_INT_STAT, val) | ||
894 | #define bfin_read_TWI_INT_MASK() bfin_read16(TWI_INT_MASK) | ||
895 | #define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI_INT_MASK, val) | ||
896 | #define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI_FIFO_CTL) | ||
897 | #define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI_FIFO_CTL, val) | ||
898 | #define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI_FIFO_STAT) | ||
899 | #define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI_FIFO_STAT, val) | ||
900 | #define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI_XMT_DATA8) | ||
901 | #define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI_XMT_DATA8, val) | ||
902 | #define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI_XMT_DATA16) | ||
903 | #define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI_XMT_DATA16, val) | ||
904 | #define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI_RCV_DATA8) | ||
905 | #define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI_RCV_DATA8, val) | ||
906 | #define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI_RCV_DATA16) | ||
907 | #define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI_RCV_DATA16, val) | ||
908 | |||
909 | 929 | ||
910 | /* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ | 930 | /* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ |
911 | #define bfin_read_PORTGIO() bfin_read16(PORTGIO) | 931 | #define bfin_read_PORTGIO() bfin_read16(PORTGIO) |
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h index 2dfee12864f6..49dd693223e8 100644 --- a/include/asm-blackfin/mach-bf527/dma.h +++ b/include/asm-blackfin/mach-bf527/dma.h | |||
@@ -59,7 +59,4 @@ | |||
59 | #define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */ | 59 | #define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */ |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | extern int channel2irq(unsigned int channel); | ||
63 | extern struct dma_register *base_addr[]; | ||
64 | |||
65 | #endif | 62 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 98209d40abba..5a6dcc5fa36c 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision B, 12/10/2007; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List | 10 | * - Revision C, 02/08/2008; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -251,10 +251,18 @@ | |||
251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
253 | #define ANOMALY_05000357 (1) | 253 | #define ANOMALY_05000357 (1) |
254 | /* UART Break Signal Issues */ | ||
255 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
254 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | 256 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ |
255 | #define ANOMALY_05000366 (1) | 257 | #define ANOMALY_05000366 (1) |
256 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 258 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
257 | #define ANOMALY_05000371 (1) | 259 | #define ANOMALY_05000371 (1) |
260 | /* PPI Does Not Start Properly In Specific Mode */ | ||
261 | #define ANOMALY_05000400 (__SILICON_REVISION__ == 5) | ||
262 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
263 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 5) | ||
264 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
265 | #define ANOMALY_05000403 (1) | ||
258 | 266 | ||
259 | /* Anomalies that don't exist on this proc */ | 267 | /* Anomalies that don't exist on this proc */ |
260 | #define ANOMALY_05000266 (0) | 268 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index b6f513bee56e..fbe88dee3e2d 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -1,22 +1,38 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * blackfin serial driver head file | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * | ||
14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * this program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the gnu general public license as published by | ||
18 | * the free software foundation; either version 2, or (at your option) | ||
19 | * any later version. | ||
20 | * | ||
21 | * this program is distributed in the hope that it will be useful, | ||
22 | * but without any warranty; without even the implied warranty of | ||
23 | * merchantability or fitness for a particular purpose. see the | ||
24 | * gnu general public license for more details. | ||
25 | * | ||
26 | * you should have received a copy of the gnu general public license | ||
27 | * along with this program; see the file copying. | ||
28 | * if not, write to the free software foundation, | ||
29 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
30 | */ | ||
31 | |||
1 | #include <linux/serial.h> | 32 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | 34 | #include <asm/portmux.h> |
4 | 35 | ||
5 | #define NR_PORTS 1 | ||
6 | |||
7 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
8 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
9 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
10 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
11 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
12 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
13 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
14 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
15 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
16 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
17 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
18 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
19 | |||
20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | 36 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) |
21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | 37 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) |
22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) | 38 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) |
@@ -84,7 +100,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart) | |||
84 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); | 100 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); |
85 | } | 101 | } |
86 | 102 | ||
87 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | 103 | struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS]; |
88 | struct bfin_serial_res { | 104 | struct bfin_serial_res { |
89 | unsigned long uart_base_addr; | 105 | unsigned long uart_base_addr; |
90 | int uart_irq; | 106 | int uart_irq; |
@@ -115,7 +131,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
115 | 131 | ||
116 | #define DRIVER_NAME "bfin-uart" | 132 | #define DRIVER_NAME "bfin-uart" |
117 | 133 | ||
118 | int nr_ports = NR_PORTS; | 134 | int nr_ports = BFIN_UART_NR_PORTS; |
119 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | 135 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) |
120 | { | 136 | { |
121 | 137 | ||
diff --git a/include/asm-blackfin/mach-bf533/bfin_sir.h b/include/asm-blackfin/mach-bf533/bfin_sir.h new file mode 100644 index 000000000000..cefcf8bb505b --- /dev/null +++ b/include/asm-blackfin/mach-bf533/bfin_sir.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * Blackfin Infra-red Driver | ||
3 | * | ||
4 | * Copyright 2006-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial.h> | ||
13 | #include <asm/dma.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | #define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) | ||
17 | #define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) | ||
18 | #define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER) | ||
19 | #define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) | ||
20 | #define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR) | ||
21 | #define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) | ||
22 | #define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL) | ||
23 | |||
24 | #define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v) | ||
25 | #define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v) | ||
26 | #define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v) | ||
27 | #define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v) | ||
28 | #define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v) | ||
29 | #define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v) | ||
30 | |||
31 | #ifdef CONFIG_SIR_BFIN_DMA | ||
32 | struct dma_rx_buf { | ||
33 | char *buf; | ||
34 | int head; | ||
35 | int tail; | ||
36 | }; | ||
37 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
38 | |||
39 | struct bfin_sir_port { | ||
40 | unsigned char __iomem *membase; | ||
41 | unsigned int irq; | ||
42 | unsigned int lsr; | ||
43 | unsigned long clk; | ||
44 | struct net_device *dev; | ||
45 | #ifdef CONFIG_SIR_BFIN_DMA | ||
46 | int tx_done; | ||
47 | struct dma_rx_buf rx_dma_buf; | ||
48 | struct timer_list rx_dma_timer; | ||
49 | int rx_dma_nrows; | ||
50 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
51 | unsigned int tx_dma_channel; | ||
52 | unsigned int rx_dma_channel; | ||
53 | }; | ||
54 | |||
55 | struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS]; | ||
56 | |||
57 | struct bfin_sir_port_res { | ||
58 | unsigned long base_addr; | ||
59 | int irq; | ||
60 | unsigned int rx_dma_channel; | ||
61 | unsigned int tx_dma_channel; | ||
62 | }; | ||
63 | |||
64 | struct bfin_sir_port_res bfin_sir_port_resource[] = { | ||
65 | #ifdef CONFIG_BFIN_SIR0 | ||
66 | { | ||
67 | 0xFFC00400, | ||
68 | IRQ_UART_RX, | ||
69 | CH_UART_RX, | ||
70 | CH_UART_TX, | ||
71 | }, | ||
72 | #endif | ||
73 | }; | ||
74 | |||
75 | int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource); | ||
76 | |||
77 | struct bfin_sir_self { | ||
78 | struct bfin_sir_port *sir_port; | ||
79 | spinlock_t lock; | ||
80 | unsigned int open; | ||
81 | int speed; | ||
82 | int newspeed; | ||
83 | |||
84 | struct sk_buff *txskb; | ||
85 | struct sk_buff *rxskb; | ||
86 | struct net_device_stats stats; | ||
87 | struct device *dev; | ||
88 | struct irlap_cb *irlap; | ||
89 | struct qos_info qos; | ||
90 | |||
91 | iobuff_t tx_buff; | ||
92 | iobuff_t rx_buff; | ||
93 | |||
94 | struct work_struct work; | ||
95 | int mtt; | ||
96 | }; | ||
97 | |||
98 | static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port) | ||
99 | { | ||
100 | unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR); | ||
101 | port->lsr |= (lsr & (BI|FE|PE|OE)); | ||
102 | return lsr | port->lsr; | ||
103 | } | ||
104 | |||
105 | static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port) | ||
106 | { | ||
107 | port->lsr = 0; | ||
108 | bfin_read16(port->membase + OFFSET_LSR); | ||
109 | } | ||
110 | |||
111 | #define DRIVER_NAME "bfin_sir" | ||
112 | |||
113 | static void bfin_sir_hw_init(void) | ||
114 | { | ||
115 | #ifdef CONFIG_BFIN_SIR0 | ||
116 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
117 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
118 | #endif | ||
119 | SSYNC(); | ||
120 | } | ||
diff --git a/include/asm-blackfin/mach-bf533/blackfin.h b/include/asm-blackfin/mach-bf533/blackfin.h index f3b240abf170..d80971b4e3aa 100644 --- a/include/asm-blackfin/mach-bf533/blackfin.h +++ b/include/asm-blackfin/mach-bf533/blackfin.h | |||
@@ -42,4 +42,19 @@ | |||
42 | #include "cdefBF532.h" | 42 | #include "cdefBF532.h" |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #define BFIN_UART_NR_PORTS 1 | ||
46 | |||
47 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
48 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
49 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
50 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
51 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
52 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
53 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
54 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
55 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
56 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
57 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
58 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
59 | |||
45 | #endif /* _MACH_BLACKFIN_H_ */ | 60 | #endif /* _MACH_BLACKFIN_H_ */ |
diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h index c803e14b529c..154655452d4c 100644 --- a/include/asm-blackfin/mach-bf533/cdefBF532.h +++ b/include/asm-blackfin/mach-bf533/cdefBF532.h | |||
@@ -43,7 +43,27 @@ | |||
43 | 43 | ||
44 | /* Clock and System Control (0xFFC0 0400-0xFFC0 07FF) */ | 44 | /* Clock and System Control (0xFFC0 0400-0xFFC0 07FF) */ |
45 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) | 45 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) |
46 | #define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL,val) | 46 | /* Writing to PLL_CTL initiates a PLL relock sequence. */ |
47 | static __inline__ void bfin_write_PLL_CTL(unsigned int val) | ||
48 | { | ||
49 | unsigned long flags, iwr; | ||
50 | |||
51 | if (val == bfin_read_PLL_CTL()) | ||
52 | return; | ||
53 | |||
54 | local_irq_save(flags); | ||
55 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
56 | iwr = bfin_read32(SIC_IWR); | ||
57 | /* Only allow PPL Wakeup) */ | ||
58 | bfin_write32(SIC_IWR, IWR_ENABLE(0)); | ||
59 | |||
60 | bfin_write16(PLL_CTL, val); | ||
61 | SSYNC(); | ||
62 | asm("IDLE;"); | ||
63 | |||
64 | bfin_write32(SIC_IWR, iwr); | ||
65 | local_irq_restore(flags); | ||
66 | } | ||
47 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 67 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
48 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) | 68 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) |
49 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) | 69 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) |
@@ -57,6 +77,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
57 | { | 77 | { |
58 | unsigned long flags, iwr; | 78 | unsigned long flags, iwr; |
59 | 79 | ||
80 | if (val == bfin_read_VR_CTL()) | ||
81 | return; | ||
82 | |||
83 | local_irq_save(flags); | ||
60 | /* Enable the PLL Wakeup bit in SIC IWR */ | 84 | /* Enable the PLL Wakeup bit in SIC IWR */ |
61 | iwr = bfin_read32(SIC_IWR); | 85 | iwr = bfin_read32(SIC_IWR); |
62 | /* Only allow PPL Wakeup) */ | 86 | /* Only allow PPL Wakeup) */ |
@@ -64,11 +88,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
64 | 88 | ||
65 | bfin_write16(VR_CTL, val); | 89 | bfin_write16(VR_CTL, val); |
66 | SSYNC(); | 90 | SSYNC(); |
67 | |||
68 | local_irq_save(flags); | ||
69 | asm("IDLE;"); | 91 | asm("IDLE;"); |
70 | local_irq_restore(flags); | 92 | |
71 | bfin_write32(SIC_IWR, iwr); | 93 | bfin_write32(SIC_IWR, iwr); |
94 | local_irq_restore(flags); | ||
72 | } | 95 | } |
73 | 96 | ||
74 | /* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */ | 97 | /* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */ |
diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h index 37134aaf9954..17e1548cec08 100644 --- a/include/asm-blackfin/mach-bf533/defBF532.h +++ b/include/asm-blackfin/mach-bf533/defBF532.h | |||
@@ -88,20 +88,25 @@ | |||
88 | #define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Register (alternate macro) */ | 88 | #define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Register (alternate macro) */ |
89 | 89 | ||
90 | /* UART Controller (0xFFC00400 - 0xFFC004FF) */ | 90 | /* UART Controller (0xFFC00400 - 0xFFC004FF) */ |
91 | #define UART_THR 0xFFC00400 /* Transmit Holding register */ | 91 | |
92 | #define UART_RBR 0xFFC00400 /* Receive Buffer register */ | 92 | /* |
93 | #define UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */ | 93 | * Because include/linux/serial_reg.h have defined UART_*, |
94 | #define UART_IER 0xFFC00404 /* Interrupt Enable Register */ | 94 | * So we define blackfin uart regs to BFIN_UART_*. |
95 | #define UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */ | 95 | */ |
96 | #define UART_IIR 0xFFC00408 /* Interrupt Identification Register */ | 96 | #define BFIN_UART_THR 0xFFC00400 /* Transmit Holding register */ |
97 | #define UART_LCR 0xFFC0040C /* Line Control Register */ | 97 | #define BFIN_UART_RBR 0xFFC00400 /* Receive Buffer register */ |
98 | #define UART_MCR 0xFFC00410 /* Modem Control Register */ | 98 | #define BFIN_UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */ |
99 | #define UART_LSR 0xFFC00414 /* Line Status Register */ | 99 | #define BFIN_UART_IER 0xFFC00404 /* Interrupt Enable Register */ |
100 | #define BFIN_UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */ | ||
101 | #define BFIN_UART_IIR 0xFFC00408 /* Interrupt Identification Register */ | ||
102 | #define BFIN_UART_LCR 0xFFC0040C /* Line Control Register */ | ||
103 | #define BFIN_UART_MCR 0xFFC00410 /* Modem Control Register */ | ||
104 | #define BFIN_UART_LSR 0xFFC00414 /* Line Status Register */ | ||
100 | #if 0 | 105 | #if 0 |
101 | #define UART_MSR 0xFFC00418 /* Modem Status Register (UNUSED in ADSP-BF532) */ | 106 | #define BFIN_UART_MSR 0xFFC00418 /* Modem Status Register (UNUSED in ADSP-BF532) */ |
102 | #endif | 107 | #endif |
103 | #define UART_SCR 0xFFC0041C /* SCR Scratch Register */ | 108 | #define BFIN_UART_SCR 0xFFC0041C /* SCR Scratch Register */ |
104 | #define UART_GCTL 0xFFC00424 /* Global Control Register */ | 109 | #define BFIN_UART_GCTL 0xFFC00424 /* Global Control Register */ |
105 | 110 | ||
106 | /* SPI Controller (0xFFC00500 - 0xFFC005FF) */ | 111 | /* SPI Controller (0xFFC00500 - 0xFFC005FF) */ |
107 | #define SPI0_REGBASE 0xFFC00500 | 112 | #define SPI0_REGBASE 0xFFC00500 |
diff --git a/include/asm-blackfin/mach-bf533/dma.h b/include/asm-blackfin/mach-bf533/dma.h index 16c672c01d80..bd9d5e94307d 100644 --- a/include/asm-blackfin/mach-bf533/dma.h +++ b/include/asm-blackfin/mach-bf533/dma.h | |||
@@ -51,7 +51,4 @@ | |||
51 | #define CH_MEM_STREAM1_DEST 10 /* TX */ | 51 | #define CH_MEM_STREAM1_DEST 10 /* TX */ |
52 | #define CH_MEM_STREAM1_SRC 11 /* RX */ | 52 | #define CH_MEM_STREAM1_SRC 11 /* RX */ |
53 | 53 | ||
54 | extern int channel2irq(unsigned int channel); | ||
55 | extern struct dma_register *base_addr[]; | ||
56 | |||
57 | #endif | 54 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/mem_init.h b/include/asm-blackfin/mach-bf533/mem_init.h index 1620dae5254d..f8f31901fca9 100644 --- a/include/asm-blackfin/mach-bf533/mem_init.h +++ b/include/asm-blackfin/mach-bf533/mem_init.h | |||
@@ -29,7 +29,8 @@ | |||
29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #if (CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_GENERIC_BOARD) | 32 | #if (CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || \ |
33 | CONFIG_MEM_MT48LC32M16A2TG_75 || CONFIG_MEM_GENERIC_BOARD) | ||
33 | #if (CONFIG_SCLK_HZ > 119402985) | 34 | #if (CONFIG_SCLK_HZ > 119402985) |
34 | #define SDRAM_tRP TRP_2 | 35 | #define SDRAM_tRP TRP_2 |
35 | #define SDRAM_tRP_num 2 | 36 | #define SDRAM_tRP_num 2 |
@@ -118,6 +119,13 @@ | |||
118 | #define SDRAM_CL CL_3 | 119 | #define SDRAM_CL CL_3 |
119 | #endif | 120 | #endif |
120 | 121 | ||
122 | #if (CONFIG_MEM_MT48LC32M16A2TG_75) | ||
123 | /*SDRAM INFORMATION: */ | ||
124 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
125 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
126 | #define SDRAM_CL CL_3 | ||
127 | #endif | ||
128 | |||
121 | #if (CONFIG_MEM_GENERIC_BOARD) | 129 | #if (CONFIG_MEM_GENERIC_BOARD) |
122 | /*SDRAM INFORMATION: Modify this for your board */ | 130 | /*SDRAM INFORMATION: Modify this for your board */ |
123 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | 131 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index 746a794b3119..a6b08facb242 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision A, 09/04/2007; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List | 10 | * - Revision C, 02/08/2008; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -132,10 +132,24 @@ | |||
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | 134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) |
135 | /* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ | ||
136 | #define ANOMALY_05000350 (__SILICON_REVISION__ < 3) | ||
137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | ||
138 | #define ANOMALY_05000355 (1) | ||
135 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
136 | #define ANOMALY_05000357 (1) | 140 | #define ANOMALY_05000357 (1) |
137 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | 141 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ |
138 | #define ANOMALY_05000359 (1) | 142 | #define ANOMALY_05000359 (1) |
143 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
144 | #define ANOMALY_05000366 (1) | ||
145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
146 | #define ANOMALY_05000371 (1) | ||
147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) | ||
149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
150 | #define ANOMALY_05000403 (1) | ||
151 | |||
152 | |||
139 | 153 | ||
140 | /* Anomalies that don't exist on this proc */ | 154 | /* Anomalies that don't exist on this proc */ |
141 | #define ANOMALY_05000125 (0) | 155 | #define ANOMALY_05000125 (0) |
@@ -146,5 +160,6 @@ | |||
146 | #define ANOMALY_05000266 (0) | 160 | #define ANOMALY_05000266 (0) |
147 | #define ANOMALY_05000311 (0) | 161 | #define ANOMALY_05000311 (0) |
148 | #define ANOMALY_05000323 (0) | 162 | #define ANOMALY_05000323 (0) |
163 | #define ANOMALY_05000363 (0) | ||
149 | 164 | ||
150 | #endif | 165 | #endif |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index 8fc672d31057..fd100a415b98 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -1,22 +1,38 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * blackfin serial driver header files | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * | ||
14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * this program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the gnu general public license as published by | ||
18 | * the free software foundation; either version 2, or (at your option) | ||
19 | * any later version. | ||
20 | * | ||
21 | * this program is distributed in the hope that it will be useful, | ||
22 | * but without any warranty; without even the implied warranty of | ||
23 | * merchantability or fitness for a particular purpose. see the | ||
24 | * gnu general public license for more details. | ||
25 | * | ||
26 | * you should have received a copy of the gnu general public license | ||
27 | * along with this program; see the file copying. | ||
28 | * if not, write to the free software foundation, | ||
29 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
30 | */ | ||
31 | |||
1 | #include <linux/serial.h> | 32 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | 34 | #include <asm/portmux.h> |
4 | 35 | ||
5 | #define NR_PORTS 2 | ||
6 | |||
7 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
8 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
9 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
10 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
11 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
12 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
13 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
14 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
15 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
16 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
17 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
18 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
19 | |||
20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | 36 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) |
21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | 37 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) |
22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) | 38 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) |
@@ -92,7 +108,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart) | |||
92 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); | 108 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); |
93 | } | 109 | } |
94 | 110 | ||
95 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | 111 | struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS]; |
96 | struct bfin_serial_res { | 112 | struct bfin_serial_res { |
97 | unsigned long uart_base_addr; | 113 | unsigned long uart_base_addr; |
98 | int uart_irq; | 114 | int uart_irq; |
diff --git a/include/asm-blackfin/mach-bf537/bfin_sir.h b/include/asm-blackfin/mach-bf537/bfin_sir.h new file mode 100644 index 000000000000..0612d0c9501c --- /dev/null +++ b/include/asm-blackfin/mach-bf537/bfin_sir.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * Blackfin Infra-red Driver | ||
3 | * | ||
4 | * Copyright 2006-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial.h> | ||
13 | #include <asm/dma.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | #define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) | ||
17 | #define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) | ||
18 | #define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER) | ||
19 | #define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) | ||
20 | #define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR) | ||
21 | #define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) | ||
22 | #define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL) | ||
23 | |||
24 | #define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v) | ||
25 | #define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v) | ||
26 | #define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v) | ||
27 | #define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v) | ||
28 | #define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v) | ||
29 | #define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v) | ||
30 | |||
31 | #ifdef CONFIG_SIR_BFIN_DMA | ||
32 | struct dma_rx_buf { | ||
33 | char *buf; | ||
34 | int head; | ||
35 | int tail; | ||
36 | }; | ||
37 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
38 | |||
39 | struct bfin_sir_port { | ||
40 | unsigned char __iomem *membase; | ||
41 | unsigned int irq; | ||
42 | unsigned int lsr; | ||
43 | unsigned long clk; | ||
44 | struct net_device *dev; | ||
45 | #ifdef CONFIG_SIR_BFIN_DMA | ||
46 | int tx_done; | ||
47 | struct dma_rx_buf rx_dma_buf; | ||
48 | struct timer_list rx_dma_timer; | ||
49 | int rx_dma_nrows; | ||
50 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
51 | unsigned int tx_dma_channel; | ||
52 | unsigned int rx_dma_channel; | ||
53 | }; | ||
54 | |||
55 | struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS]; | ||
56 | |||
57 | struct bfin_sir_port_res { | ||
58 | unsigned long base_addr; | ||
59 | int irq; | ||
60 | unsigned int rx_dma_channel; | ||
61 | unsigned int tx_dma_channel; | ||
62 | }; | ||
63 | |||
64 | struct bfin_sir_port_res bfin_sir_port_resource[] = { | ||
65 | #ifdef CONFIG_BFIN_SIR0 | ||
66 | { | ||
67 | 0xFFC00400, | ||
68 | IRQ_UART0_RX, | ||
69 | CH_UART0_RX, | ||
70 | CH_UART0_TX, | ||
71 | }, | ||
72 | #endif | ||
73 | #ifdef CONFIG_BFIN_SIR1 | ||
74 | { | ||
75 | 0xFFC02000, | ||
76 | IRQ_UART1_RX, | ||
77 | CH_UART1_RX, | ||
78 | CH_UART1_TX, | ||
79 | }, | ||
80 | #endif | ||
81 | }; | ||
82 | |||
83 | int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource); | ||
84 | |||
85 | struct bfin_sir_self { | ||
86 | struct bfin_sir_port *sir_port; | ||
87 | spinlock_t lock; | ||
88 | unsigned int open; | ||
89 | int speed; | ||
90 | int newspeed; | ||
91 | |||
92 | struct sk_buff *txskb; | ||
93 | struct sk_buff *rxskb; | ||
94 | struct net_device_stats stats; | ||
95 | struct device *dev; | ||
96 | struct irlap_cb *irlap; | ||
97 | struct qos_info qos; | ||
98 | |||
99 | iobuff_t tx_buff; | ||
100 | iobuff_t rx_buff; | ||
101 | |||
102 | struct work_struct work; | ||
103 | int mtt; | ||
104 | }; | ||
105 | |||
106 | static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port) | ||
107 | { | ||
108 | unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR); | ||
109 | port->lsr |= (lsr & (BI|FE|PE|OE)); | ||
110 | return lsr | port->lsr; | ||
111 | } | ||
112 | |||
113 | static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port) | ||
114 | { | ||
115 | port->lsr = 0; | ||
116 | bfin_read16(port->membase + OFFSET_LSR); | ||
117 | } | ||
118 | |||
119 | #define DRIVER_NAME "bfin_sir" | ||
120 | |||
121 | static void bfin_sir_hw_init(void) | ||
122 | { | ||
123 | #ifdef CONFIG_BFIN_SIR0 | ||
124 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
125 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
126 | #endif | ||
127 | |||
128 | #ifdef CONFIG_BFIN_SIR1 | ||
129 | peripheral_request(P_UART1_TX, DRIVER_NAME); | ||
130 | peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
131 | #endif | ||
132 | SSYNC(); | ||
133 | } | ||
diff --git a/include/asm-blackfin/mach-bf537/blackfin.h b/include/asm-blackfin/mach-bf537/blackfin.h index 53fcfa3408d0..cffc786b2a2b 100644 --- a/include/asm-blackfin/mach-bf537/blackfin.h +++ b/include/asm-blackfin/mach-bf537/blackfin.h | |||
@@ -82,8 +82,6 @@ | |||
82 | #define STATUS_P1 0x02 | 82 | #define STATUS_P1 0x02 |
83 | #define STATUS_P0 0x01 | 83 | #define STATUS_P0 0x01 |
84 | 84 | ||
85 | /* UART 0*/ | ||
86 | |||
87 | /* DMA Channnel */ | 85 | /* DMA Channnel */ |
88 | #define bfin_read_CH_UART_RX() bfin_read_CH_UART0_RX() | 86 | #define bfin_read_CH_UART_RX() bfin_read_CH_UART0_RX() |
89 | #define bfin_write_CH_UART_RX(val) bfin_write_CH_UART0_RX(val) | 87 | #define bfin_write_CH_UART_RX(val) bfin_write_CH_UART0_RX(val) |
@@ -106,37 +104,52 @@ | |||
106 | /* MMR Registers*/ | 104 | /* MMR Registers*/ |
107 | #define bfin_read_UART_THR() bfin_read_UART0_THR() | 105 | #define bfin_read_UART_THR() bfin_read_UART0_THR() |
108 | #define bfin_write_UART_THR(val) bfin_write_UART0_THR(val) | 106 | #define bfin_write_UART_THR(val) bfin_write_UART0_THR(val) |
109 | #define UART_THR UART0_THR | 107 | #define BFIN_UART_THR UART0_THR |
110 | #define bfin_read_UART_RBR() bfin_read_UART0_RBR() | 108 | #define bfin_read_UART_RBR() bfin_read_UART0_RBR() |
111 | #define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val) | 109 | #define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val) |
112 | #define UART_RBR UART0_RBR | 110 | #define BFIN_UART_RBR UART0_RBR |
113 | #define bfin_read_UART_DLL() bfin_read_UART0_DLL() | 111 | #define bfin_read_UART_DLL() bfin_read_UART0_DLL() |
114 | #define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val) | 112 | #define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val) |
115 | #define UART_DLL UART0_DLL | 113 | #define BFIN_UART_DLL UART0_DLL |
116 | #define bfin_read_UART_IER() bfin_read_UART0_IER() | 114 | #define bfin_read_UART_IER() bfin_read_UART0_IER() |
117 | #define bfin_write_UART_IER(val) bfin_write_UART0_IER(val) | 115 | #define bfin_write_UART_IER(val) bfin_write_UART0_IER(val) |
118 | #define UART_IER UART0_IER | 116 | #define BFIN_UART_IER UART0_IER |
119 | #define bfin_read_UART_DLH() bfin_read_UART0_DLH() | 117 | #define bfin_read_UART_DLH() bfin_read_UART0_DLH() |
120 | #define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val) | 118 | #define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val) |
121 | #define UART_DLH UART0_DLH | 119 | #define BFIN_UART_DLH UART0_DLH |
122 | #define bfin_read_UART_IIR() bfin_read_UART0_IIR() | 120 | #define bfin_read_UART_IIR() bfin_read_UART0_IIR() |
123 | #define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val) | 121 | #define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val) |
124 | #define UART_IIR UART0_IIR | 122 | #define BFIN_UART_IIR UART0_IIR |
125 | #define bfin_read_UART_LCR() bfin_read_UART0_LCR() | 123 | #define bfin_read_UART_LCR() bfin_read_UART0_LCR() |
126 | #define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val) | 124 | #define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val) |
127 | #define UART_LCR UART0_LCR | 125 | #define BFIN_UART_LCR UART0_LCR |
128 | #define bfin_read_UART_MCR() bfin_read_UART0_MCR() | 126 | #define bfin_read_UART_MCR() bfin_read_UART0_MCR() |
129 | #define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val) | 127 | #define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val) |
130 | #define UART_MCR UART0_MCR | 128 | #define BFIN_UART_MCR UART0_MCR |
131 | #define bfin_read_UART_LSR() bfin_read_UART0_LSR() | 129 | #define bfin_read_UART_LSR() bfin_read_UART0_LSR() |
132 | #define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val) | 130 | #define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val) |
133 | #define UART_LSR UART0_LSR | 131 | #define BFIN_UART_LSR UART0_LSR |
134 | #define bfin_read_UART_SCR() bfin_read_UART0_SCR() | 132 | #define bfin_read_UART_SCR() bfin_read_UART0_SCR() |
135 | #define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val) | 133 | #define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val) |
136 | #define UART_SCR UART0_SCR | 134 | #define BFIN_UART_SCR UART0_SCR |
137 | #define bfin_read_UART_GCTL() bfin_read_UART0_GCTL() | 135 | #define bfin_read_UART_GCTL() bfin_read_UART0_GCTL() |
138 | #define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val) | 136 | #define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val) |
139 | #define UART_GCTL UART0_GCTL | 137 | #define BFIN_UART_GCTL UART0_GCTL |
138 | |||
139 | #define BFIN_UART_NR_PORTS 2 | ||
140 | |||
141 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
142 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
143 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
144 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
145 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
146 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
147 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
148 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
149 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
150 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
151 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
152 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
140 | 153 | ||
141 | /* DPMC*/ | 154 | /* DPMC*/ |
142 | #define bfin_read_STOPCK_OFF() bfin_read_STOPCK() | 155 | #define bfin_read_STOPCK_OFF() bfin_read_STOPCK() |
diff --git a/include/asm-blackfin/mach-bf537/cdefBF534.h b/include/asm-blackfin/mach-bf537/cdefBF534.h index 78227bc855df..82de526f8097 100644 --- a/include/asm-blackfin/mach-bf537/cdefBF534.h +++ b/include/asm-blackfin/mach-bf537/cdefBF534.h | |||
@@ -44,7 +44,27 @@ | |||
44 | 44 | ||
45 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ | 45 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ |
46 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) | 46 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) |
47 | #define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL,val) | 47 | /* Writing to PLL_CTL initiates a PLL relock sequence. */ |
48 | static __inline__ void bfin_write_PLL_CTL(unsigned int val) | ||
49 | { | ||
50 | unsigned long flags, iwr; | ||
51 | |||
52 | if (val == bfin_read_PLL_CTL()) | ||
53 | return; | ||
54 | |||
55 | local_irq_save(flags); | ||
56 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
57 | iwr = bfin_read32(SIC_IWR); | ||
58 | /* Only allow PPL Wakeup) */ | ||
59 | bfin_write32(SIC_IWR, IWR_ENABLE(0)); | ||
60 | |||
61 | bfin_write16(PLL_CTL, val); | ||
62 | SSYNC(); | ||
63 | asm("IDLE;"); | ||
64 | |||
65 | bfin_write32(SIC_IWR, iwr); | ||
66 | local_irq_restore(flags); | ||
67 | } | ||
48 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 68 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
49 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val) | 69 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val) |
50 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 70 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
@@ -53,6 +73,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
53 | { | 73 | { |
54 | unsigned long flags, iwr; | 74 | unsigned long flags, iwr; |
55 | 75 | ||
76 | if (val == bfin_read_VR_CTL()) | ||
77 | return; | ||
78 | |||
79 | local_irq_save(flags); | ||
56 | /* Enable the PLL Wakeup bit in SIC IWR */ | 80 | /* Enable the PLL Wakeup bit in SIC IWR */ |
57 | iwr = bfin_read32(SIC_IWR); | 81 | iwr = bfin_read32(SIC_IWR); |
58 | /* Only allow PPL Wakeup) */ | 82 | /* Only allow PPL Wakeup) */ |
@@ -60,11 +84,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
60 | 84 | ||
61 | bfin_write16(VR_CTL, val); | 85 | bfin_write16(VR_CTL, val); |
62 | SSYNC(); | 86 | SSYNC(); |
63 | |||
64 | local_irq_save(flags); | ||
65 | asm("IDLE;"); | 87 | asm("IDLE;"); |
66 | local_irq_restore(flags); | 88 | |
67 | bfin_write32(SIC_IWR, iwr); | 89 | bfin_write32(SIC_IWR, iwr); |
90 | local_irq_restore(flags); | ||
68 | } | 91 | } |
69 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 92 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
70 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) | 93 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) |
@@ -858,39 +881,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
858 | #define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME) | 881 | #define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME) |
859 | #define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME,val) | 882 | #define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME,val) |
860 | 883 | ||
861 | /* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ | 884 | /* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ |
862 | #define bfin_read_TWI_CLKDIV() bfin_read16(TWI_CLKDIV) | ||
863 | #define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI_CLKDIV,val) | ||
864 | #define bfin_read_TWI_CONTROL() bfin_read16(TWI_CONTROL) | ||
865 | #define bfin_write_TWI_CONTROL(val) bfin_write16(TWI_CONTROL,val) | ||
866 | #define bfin_read_TWI_SLAVE_CTL() bfin_read16(TWI_SLAVE_CTL) | ||
867 | #define bfin_write_TWI_SLAVE_CTL(val) bfin_write16(TWI_SLAVE_CTL,val) | ||
868 | #define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI_SLAVE_STAT) | ||
869 | #define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI_SLAVE_STAT,val) | ||
870 | #define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI_SLAVE_ADDR) | ||
871 | #define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI_SLAVE_ADDR,val) | ||
872 | #define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI_MASTER_CTL) | ||
873 | #define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI_MASTER_CTL,val) | ||
874 | #define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI_MASTER_STAT) | ||
875 | #define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI_MASTER_STAT,val) | ||
876 | #define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI_MASTER_ADDR) | ||
877 | #define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI_MASTER_ADDR,val) | ||
878 | #define bfin_read_TWI_INT_STAT() bfin_read16(TWI_INT_STAT) | ||
879 | #define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI_INT_STAT,val) | ||
880 | #define bfin_read_TWI_INT_MASK() bfin_read16(TWI_INT_MASK) | ||
881 | #define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI_INT_MASK,val) | ||
882 | #define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI_FIFO_CTL) | ||
883 | #define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI_FIFO_CTL,val) | ||
884 | #define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI_FIFO_STAT) | ||
885 | #define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI_FIFO_STAT,val) | ||
886 | #define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI_XMT_DATA8) | ||
887 | #define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI_XMT_DATA8,val) | ||
888 | #define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI_XMT_DATA16) | ||
889 | #define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI_XMT_DATA16,val) | ||
890 | #define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI_RCV_DATA8) | ||
891 | #define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI_RCV_DATA8,val) | ||
892 | #define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI_RCV_DATA16) | ||
893 | #define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI_RCV_DATA16,val) | ||
894 | 885 | ||
895 | /* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ | 886 | /* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ |
896 | #define bfin_read_PORTGIO() bfin_read16(PORTGIO) | 887 | #define bfin_read_PORTGIO() bfin_read16(PORTGIO) |
diff --git a/include/asm-blackfin/mach-bf537/dma.h b/include/asm-blackfin/mach-bf537/dma.h index 021991984e6e..7a964040870a 100644 --- a/include/asm-blackfin/mach-bf537/dma.h +++ b/include/asm-blackfin/mach-bf537/dma.h | |||
@@ -52,7 +52,4 @@ | |||
52 | #define CH_MEM_STREAM1_DEST 14 /* TX */ | 52 | #define CH_MEM_STREAM1_DEST 14 /* TX */ |
53 | #define CH_MEM_STREAM1_SRC 15 /* RX */ | 53 | #define CH_MEM_STREAM1_SRC 15 /* RX */ |
54 | 54 | ||
55 | extern int channel2irq(unsigned int channel); | ||
56 | extern struct dma_register *base_addr[]; | ||
57 | |||
58 | #endif | 55 | #endif |
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index 850dc12eb7f2..49d3cebc5293 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -93,5 +93,6 @@ | |||
93 | #define ANOMALY_05000273 (0) | 93 | #define ANOMALY_05000273 (0) |
94 | #define ANOMALY_05000311 (0) | 94 | #define ANOMALY_05000311 (0) |
95 | #define ANOMALY_05000323 (0) | 95 | #define ANOMALY_05000323 (0) |
96 | #define ANOMALY_05000363 (0) | ||
96 | 97 | ||
97 | #endif | 98 | #endif |
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index 7e6339f62a50..6547027cd3e6 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -1,22 +1,38 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * blackfin serial driver head file | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * | ||
14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * this program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the gnu general public license as published by | ||
18 | * the free software foundation; either version 2, or (at your option) | ||
19 | * any later version. | ||
20 | * | ||
21 | * this program is distributed in the hope that it will be useful, | ||
22 | * but without any warranty; without even the implied warranty of | ||
23 | * merchantability or fitness for a particular purpose. see the | ||
24 | * gnu general public license for more details. | ||
25 | * | ||
26 | * you should have received a copy of the gnu general public license | ||
27 | * along with this program; see the file copying. | ||
28 | * if not, write to the free software foundation, | ||
29 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
30 | */ | ||
31 | |||
1 | #include <linux/serial.h> | 32 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | 34 | #include <asm/portmux.h> |
4 | 35 | ||
5 | #define NR_PORTS 4 | ||
6 | |||
7 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
8 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
9 | #define OFFSET_GCTL 0x08 /* Global Control Register */ | ||
10 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
11 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
12 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
13 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
14 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
15 | #define OFFSET_IER_SET 0x20 /* Set Interrupt Enable Register */ | ||
16 | #define OFFSET_IER_CLEAR 0x24 /* Clear Interrupt Enable Register */ | ||
17 | #define OFFSET_THR 0x28 /* Transmit Holding register */ | ||
18 | #define OFFSET_RBR 0x2C /* Receive Buffer register */ | ||
19 | |||
20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | 36 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) |
21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | 37 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) |
22 | #define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) | 38 | #define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) |
@@ -80,7 +96,7 @@ struct bfin_serial_port { | |||
80 | #endif | 96 | #endif |
81 | }; | 97 | }; |
82 | 98 | ||
83 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | 99 | struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS]; |
84 | struct bfin_serial_res { | 100 | struct bfin_serial_res { |
85 | unsigned long uart_base_addr; | 101 | unsigned long uart_base_addr; |
86 | int uart_irq; | 102 | int uart_irq; |
diff --git a/include/asm-blackfin/mach-bf548/bfin_sir.h b/include/asm-blackfin/mach-bf548/bfin_sir.h new file mode 100644 index 000000000000..5e94271c7e3b --- /dev/null +++ b/include/asm-blackfin/mach-bf548/bfin_sir.h | |||
@@ -0,0 +1,149 @@ | |||
1 | /* | ||
2 | * Blackfin Infra-red Driver | ||
3 | * | ||
4 | * Copyright 2006-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial.h> | ||
13 | #include <asm/dma.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | #define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) | ||
17 | #define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) | ||
18 | #define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER_SET) | ||
19 | #define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) | ||
20 | #define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) | ||
21 | #define SIR_UART_GET_LSR(port) bfin_read16((port)->membase + OFFSET_LSR) | ||
22 | #define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL) | ||
23 | |||
24 | #define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v) | ||
25 | #define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v) | ||
26 | #define SIR_UART_SET_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_SET), v) | ||
27 | #define SIR_UART_CLEAR_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_CLEAR), v) | ||
28 | #define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v) | ||
29 | #define SIR_UART_PUT_LSR(port, v) bfin_write16(((port)->membase + OFFSET_LSR), v) | ||
30 | #define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v) | ||
31 | #define SIR_UART_CLEAR_LSR(port) bfin_write16(((port)->membase + OFFSET_LSR), -1) | ||
32 | #define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v) | ||
33 | |||
34 | #ifdef CONFIG_SIR_BFIN_DMA | ||
35 | struct dma_rx_buf { | ||
36 | char *buf; | ||
37 | int head; | ||
38 | int tail; | ||
39 | }; | ||
40 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
41 | |||
42 | struct bfin_sir_port { | ||
43 | unsigned char __iomem *membase; | ||
44 | unsigned int irq; | ||
45 | unsigned int lsr; | ||
46 | unsigned long clk; | ||
47 | struct net_device *dev; | ||
48 | #ifdef CONFIG_SIR_BFIN_DMA | ||
49 | int tx_done; | ||
50 | struct dma_rx_buf rx_dma_buf; | ||
51 | struct timer_list rx_dma_timer; | ||
52 | int rx_dma_nrows; | ||
53 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
54 | unsigned int tx_dma_channel; | ||
55 | unsigned int rx_dma_channel; | ||
56 | }; | ||
57 | |||
58 | struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS]; | ||
59 | |||
60 | struct bfin_sir_port_res { | ||
61 | unsigned long base_addr; | ||
62 | int irq; | ||
63 | unsigned int rx_dma_channel; | ||
64 | unsigned int tx_dma_channel; | ||
65 | }; | ||
66 | |||
67 | struct bfin_sir_port_res bfin_sir_port_resource[] = { | ||
68 | #ifdef CONFIG_BFIN_SIR0 | ||
69 | { | ||
70 | 0xFFC00400, | ||
71 | IRQ_UART0_RX, | ||
72 | CH_UART0_RX, | ||
73 | CH_UART0_TX, | ||
74 | }, | ||
75 | #endif | ||
76 | #ifdef CONFIG_BFIN_SIR1 | ||
77 | { | ||
78 | 0xFFC02000, | ||
79 | IRQ_UART1_RX, | ||
80 | CH_UART1_RX, | ||
81 | CH_UART1_TX, | ||
82 | }, | ||
83 | #endif | ||
84 | #ifdef CONFIG_BFIN_SIR2 | ||
85 | { | ||
86 | 0xFFC02100, | ||
87 | IRQ_UART2_RX, | ||
88 | CH_UART2_RX, | ||
89 | CH_UART2_TX, | ||
90 | }, | ||
91 | #endif | ||
92 | #ifdef CONFIG_BFIN_SIR3 | ||
93 | { | ||
94 | 0xFFC03100, | ||
95 | IRQ_UART3_RX, | ||
96 | CH_UART3_RX, | ||
97 | CH_UART3_TX, | ||
98 | }, | ||
99 | #endif | ||
100 | }; | ||
101 | |||
102 | int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource); | ||
103 | |||
104 | struct bfin_sir_self { | ||
105 | struct bfin_sir_port *sir_port; | ||
106 | spinlock_t lock; | ||
107 | unsigned int open; | ||
108 | int speed; | ||
109 | int newspeed; | ||
110 | |||
111 | struct sk_buff *txskb; | ||
112 | struct sk_buff *rxskb; | ||
113 | struct net_device_stats stats; | ||
114 | struct device *dev; | ||
115 | struct irlap_cb *irlap; | ||
116 | struct qos_info qos; | ||
117 | |||
118 | iobuff_t tx_buff; | ||
119 | iobuff_t rx_buff; | ||
120 | |||
121 | struct work_struct work; | ||
122 | int mtt; | ||
123 | }; | ||
124 | |||
125 | #define DRIVER_NAME "bfin_sir" | ||
126 | |||
127 | static void bfin_sir_hw_init(void) | ||
128 | { | ||
129 | #ifdef CONFIG_BFIN_SIR0 | ||
130 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
131 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
132 | #endif | ||
133 | |||
134 | #ifdef CONFIG_BFIN_SIR1 | ||
135 | peripheral_request(P_UART1_TX, DRIVER_NAME); | ||
136 | peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_BFIN_SIR2 | ||
140 | peripheral_request(P_UART2_TX, DRIVER_NAME); | ||
141 | peripheral_request(P_UART2_RX, DRIVER_NAME); | ||
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_BFIN_SIR3 | ||
145 | peripheral_request(P_UART3_TX, DRIVER_NAME); | ||
146 | peripheral_request(P_UART3_RX, DRIVER_NAME); | ||
147 | #endif | ||
148 | SSYNC(); | ||
149 | } | ||
diff --git a/include/asm-blackfin/mach-bf548/blackfin.h b/include/asm-blackfin/mach-bf548/blackfin.h index 3bd67da86053..d6ee74ac0460 100644 --- a/include/asm-blackfin/mach-bf548/blackfin.h +++ b/include/asm-blackfin/mach-bf548/blackfin.h | |||
@@ -153,17 +153,33 @@ | |||
153 | #define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val) | 153 | #define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val) |
154 | #define bfin_read_UART_GCTL() bfin_read_UART1_GCTL() | 154 | #define bfin_read_UART_GCTL() bfin_read_UART1_GCTL() |
155 | #define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val) | 155 | #define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val) |
156 | #define UART_THR UART1_THR | 156 | |
157 | #define UART_RBR UART1_RBR | 157 | #define BFIN_UART_THR UART1_THR |
158 | #define UART_DLL UART1_DLL | 158 | #define BFIN_UART_RBR UART1_RBR |
159 | #define UART_IER UART1_IER | 159 | #define BFIN_UART_DLL UART1_DLL |
160 | #define UART_DLH UART1_DLH | 160 | #define BFIN_UART_IER UART1_IER |
161 | #define UART_IIR UART1_IIR | 161 | #define BFIN_UART_DLH UART1_DLH |
162 | #define UART_LCR UART1_LCR | 162 | #define BFIN_UART_IIR UART1_IIR |
163 | #define UART_MCR UART1_MCR | 163 | #define BFIN_UART_LCR UART1_LCR |
164 | #define UART_LSR UART1_LSR | 164 | #define BFIN_UART_MCR UART1_MCR |
165 | #define UART_SCR UART1_SCR | 165 | #define BFIN_UART_LSR UART1_LSR |
166 | #define UART_GCTL UART1_GCTL | 166 | #define BFIN_UART_SCR UART1_SCR |
167 | #define BFIN_UART_GCTL UART1_GCTL | ||
168 | |||
169 | #define BFIN_UART_NR_PORTS 4 | ||
170 | |||
171 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
172 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
173 | #define OFFSET_GCTL 0x08 /* Global Control Register */ | ||
174 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
175 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
176 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
177 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
178 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
179 | #define OFFSET_IER_SET 0x20 /* Set Interrupt Enable Register */ | ||
180 | #define OFFSET_IER_CLEAR 0x24 /* Clear Interrupt Enable Register */ | ||
181 | #define OFFSET_THR 0x28 /* Transmit Holding register */ | ||
182 | #define OFFSET_RBR 0x2C /* Receive Buffer register */ | ||
167 | 183 | ||
168 | /* PLL_DIV Masks */ | 184 | /* PLL_DIV Masks */ |
169 | #define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ | 185 | #define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF542.h b/include/asm-blackfin/mach-bf548/cdefBF542.h index 308b33ab5311..60b9f77576f1 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF542.h +++ b/include/asm-blackfin/mach-bf548/cdefBF542.h | |||
@@ -123,12 +123,12 @@ | |||
123 | #define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val) | 123 | #define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val) |
124 | #define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL) | 124 | #define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL) |
125 | #define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val) | 125 | #define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val) |
126 | #define bfin_read_SDH_DATA_CNT() fin_read16(SDH_DATA_CNT) | 126 | #define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT) |
127 | #define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val) | 127 | #define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val) |
128 | #define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS) | 128 | #define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS) |
129 | #define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val) | 129 | #define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val) |
130 | #define bfin_read_SDH_STATUS_CLR() fin_read16(SDH_STATUS_CLR) | 130 | #define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR) |
131 | #define bfin_write_SDH_STATUS_CLR(val) fin_write16(SDH_STATUS_CLR, val) | 131 | #define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val) |
132 | #define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0) | 132 | #define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0) |
133 | #define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val) | 133 | #define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val) |
134 | #define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1) | 134 | #define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1) |
@@ -184,8 +184,8 @@ | |||
184 | #define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val) | 184 | #define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val) |
185 | #define bfin_read_USB_INDEX() bfin_read16(USB_INDEX) | 185 | #define bfin_read_USB_INDEX() bfin_read16(USB_INDEX) |
186 | #define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val) | 186 | #define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val) |
187 | #define bfin_read_USB_TESTMODE() fin_read16(USB_TESTMODE) | 187 | #define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE) |
188 | #define bfin_write_USB_TESTMODE(val) fin_write16(USB_TESTMODE, val) | 188 | #define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val) |
189 | #define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR) | 189 | #define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR) |
190 | #define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val) | 190 | #define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val) |
191 | #define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL) | 191 | #define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL) |
@@ -244,7 +244,7 @@ | |||
244 | #define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL) | 244 | #define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL) |
245 | #define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val) | 245 | #define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val) |
246 | #define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ) | 246 | #define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ) |
247 | #define bfin_write_USB_OTG_VBUS_IRQ(val) fin_write16(USB_OTG_VBUS_IRQ, val) | 247 | #define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val) |
248 | #define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK) | 248 | #define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK) |
249 | #define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val) | 249 | #define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val) |
250 | 250 | ||
diff --git a/include/asm-blackfin/mach-bf548/cdefBF544.h b/include/asm-blackfin/mach-bf548/cdefBF544.h index 7a2d177c8dc2..ea9b4ab496f3 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF544.h +++ b/include/asm-blackfin/mach-bf548/cdefBF544.h | |||
@@ -113,39 +113,6 @@ | |||
113 | 113 | ||
114 | /* Two Wire Interface Registers (TWI1) */ | 114 | /* Two Wire Interface Registers (TWI1) */ |
115 | 115 | ||
116 | #define bfin_read_TWI1_CLKDIV() bfin_read16(TWI1_CLKDIV) | ||
117 | #define bfin_write_TWI1_CLKDIV(val) bfin_write16(TWI1_CLKDIV, val) | ||
118 | #define bfin_read_TWI1_CONTROL() bfin_read16(TWI1_CONTROL) | ||
119 | #define bfin_write_TWI1_CONTROL(val) bfin_write16(TWI1_CONTROL, val) | ||
120 | #define bfin_read_TWI1_SLAVE_CTRL() bfin_read16(TWI1_SLAVE_CTRL) | ||
121 | #define bfin_write_TWI1_SLAVE_CTRL(val) bfin_write16(TWI1_SLAVE_CTRL, val) | ||
122 | #define bfin_read_TWI1_SLAVE_STAT() bfin_read16(TWI1_SLAVE_STAT) | ||
123 | #define bfin_write_TWI1_SLAVE_STAT(val) bfin_write16(TWI1_SLAVE_STAT, val) | ||
124 | #define bfin_read_TWI1_SLAVE_ADDR() bfin_read16(TWI1_SLAVE_ADDR) | ||
125 | #define bfin_write_TWI1_SLAVE_ADDR(val) bfin_write16(TWI1_SLAVE_ADDR, val) | ||
126 | #define bfin_read_TWI1_MASTER_CTRL() bfin_read16(TWI1_MASTER_CTRL) | ||
127 | #define bfin_write_TWI1_MASTER_CTRL(val) bfin_write16(TWI1_MASTER_CTRL, val) | ||
128 | #define bfin_read_TWI1_MASTER_STAT() bfin_read16(TWI1_MASTER_STAT) | ||
129 | #define bfin_write_TWI1_MASTER_STAT(val) bfin_write16(TWI1_MASTER_STAT, val) | ||
130 | #define bfin_read_TWI1_MASTER_ADDR() bfin_read16(TWI1_MASTER_ADDR) | ||
131 | #define bfin_write_TWI1_MASTER_ADDR(val) bfin_write16(TWI1_MASTER_ADDR, val) | ||
132 | #define bfin_read_TWI1_INT_STAT() bfin_read16(TWI1_INT_STAT) | ||
133 | #define bfin_write_TWI1_INT_STAT(val) bfin_write16(TWI1_INT_STAT, val) | ||
134 | #define bfin_read_TWI1_INT_MASK() bfin_read16(TWI1_INT_MASK) | ||
135 | #define bfin_write_TWI1_INT_MASK(val) bfin_write16(TWI1_INT_MASK, val) | ||
136 | #define bfin_read_TWI1_FIFO_CTRL() bfin_read16(TWI1_FIFO_CTRL) | ||
137 | #define bfin_write_TWI1_FIFO_CTRL(val) bfin_write16(TWI1_FIFO_CTRL, val) | ||
138 | #define bfin_read_TWI1_FIFO_STAT() bfin_read16(TWI1_FIFO_STAT) | ||
139 | #define bfin_write_TWI1_FIFO_STAT(val) bfin_write16(TWI1_FIFO_STAT, val) | ||
140 | #define bfin_read_TWI1_XMT_DATA8() bfin_read16(TWI1_XMT_DATA8) | ||
141 | #define bfin_write_TWI1_XMT_DATA8(val) bfin_write16(TWI1_XMT_DATA8, val) | ||
142 | #define bfin_read_TWI1_XMT_DATA16() bfin_read16(TWI1_XMT_DATA16) | ||
143 | #define bfin_write_TWI1_XMT_DATA16(val) bfin_write16(TWI1_XMT_DATA16, val) | ||
144 | #define bfin_read_TWI1_RCV_DATA8() bfin_read16(TWI1_RCV_DATA8) | ||
145 | #define bfin_write_TWI1_RCV_DATA8(val) bfin_write16(TWI1_RCV_DATA8, val) | ||
146 | #define bfin_read_TWI1_RCV_DATA16() bfin_read16(TWI1_RCV_DATA16) | ||
147 | #define bfin_write_TWI1_RCV_DATA16(val) bfin_write16(TWI1_RCV_DATA16, val) | ||
148 | |||
149 | /* CAN Controller 1 Config 1 Registers */ | 116 | /* CAN Controller 1 Config 1 Registers */ |
150 | 117 | ||
151 | #define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1) | 118 | #define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1) |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF547.h b/include/asm-blackfin/mach-bf548/cdefBF547.h index d0a200b08abd..ba716277c00d 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF547.h +++ b/include/asm-blackfin/mach-bf548/cdefBF547.h | |||
@@ -185,39 +185,6 @@ | |||
185 | 185 | ||
186 | /* Two Wire Interface Registers (TWI1) */ | 186 | /* Two Wire Interface Registers (TWI1) */ |
187 | 187 | ||
188 | #define bfin_read_TWI1_CLKDIV() bfin_read16(TWI1_CLKDIV) | ||
189 | #define bfin_write_TWI1_CLKDIV(val) bfin_write16(TWI1_CLKDIV, val) | ||
190 | #define bfin_read_TWI1_CONTROL() bfin_read16(TWI1_CONTROL) | ||
191 | #define bfin_write_TWI1_CONTROL(val) bfin_write16(TWI1_CONTROL, val) | ||
192 | #define bfin_read_TWI1_SLAVE_CTRL() bfin_read16(TWI1_SLAVE_CTRL) | ||
193 | #define bfin_write_TWI1_SLAVE_CTRL(val) bfin_write16(TWI1_SLAVE_CTRL, val) | ||
194 | #define bfin_read_TWI1_SLAVE_STAT() bfin_read16(TWI1_SLAVE_STAT) | ||
195 | #define bfin_write_TWI1_SLAVE_STAT(val) bfin_write16(TWI1_SLAVE_STAT, val) | ||
196 | #define bfin_read_TWI1_SLAVE_ADDR() bfin_read16(TWI1_SLAVE_ADDR) | ||
197 | #define bfin_write_TWI1_SLAVE_ADDR(val) bfin_write16(TWI1_SLAVE_ADDR, val) | ||
198 | #define bfin_read_TWI1_MASTER_CTRL() bfin_read16(TWI1_MASTER_CTRL) | ||
199 | #define bfin_write_TWI1_MASTER_CTRL(val) bfin_write16(TWI1_MASTER_CTRL, val) | ||
200 | #define bfin_read_TWI1_MASTER_STAT() bfin_read16(TWI1_MASTER_STAT) | ||
201 | #define bfin_write_TWI1_MASTER_STAT(val) bfin_write16(TWI1_MASTER_STAT, val) | ||
202 | #define bfin_read_TWI1_MASTER_ADDR() bfin_read16(TWI1_MASTER_ADDR) | ||
203 | #define bfin_write_TWI1_MASTER_ADDR(val) bfin_write16(TWI1_MASTER_ADDR, val) | ||
204 | #define bfin_read_TWI1_INT_STAT() bfin_read16(TWI1_INT_STAT) | ||
205 | #define bfin_write_TWI1_INT_STAT(val) bfin_write16(TWI1_INT_STAT, val) | ||
206 | #define bfin_read_TWI1_INT_MASK() bfin_read16(TWI1_INT_MASK) | ||
207 | #define bfin_write_TWI1_INT_MASK(val) bfin_write16(TWI1_INT_MASK, val) | ||
208 | #define bfin_read_TWI1_FIFO_CTRL() bfin_read16(TWI1_FIFO_CTRL) | ||
209 | #define bfin_write_TWI1_FIFO_CTRL(val) bfin_write16(TWI1_FIFO_CTRL, val) | ||
210 | #define bfin_read_TWI1_FIFO_STAT() bfin_read16(TWI1_FIFO_STAT) | ||
211 | #define bfin_write_TWI1_FIFO_STAT(val) bfin_write16(TWI1_FIFO_STAT, val) | ||
212 | #define bfin_read_TWI1_XMT_DATA8() bfin_read16(TWI1_XMT_DATA8) | ||
213 | #define bfin_write_TWI1_XMT_DATA8(val) bfin_write16(TWI1_XMT_DATA8, val) | ||
214 | #define bfin_read_TWI1_XMT_DATA16() bfin_read16(TWI1_XMT_DATA16) | ||
215 | #define bfin_write_TWI1_XMT_DATA16(val) bfin_write16(TWI1_XMT_DATA16, val) | ||
216 | #define bfin_read_TWI1_RCV_DATA8() bfin_read16(TWI1_RCV_DATA8) | ||
217 | #define bfin_write_TWI1_RCV_DATA8(val) bfin_write16(TWI1_RCV_DATA8, val) | ||
218 | #define bfin_read_TWI1_RCV_DATA16() bfin_read16(TWI1_RCV_DATA16) | ||
219 | #define bfin_write_TWI1_RCV_DATA16(val) bfin_write16(TWI1_RCV_DATA16, val) | ||
220 | |||
221 | /* SPI2 Registers */ | 188 | /* SPI2 Registers */ |
222 | 189 | ||
223 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) | 190 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF548.h b/include/asm-blackfin/mach-bf548/cdefBF548.h index 674be0216bff..ae971ebff6a0 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF548.h +++ b/include/asm-blackfin/mach-bf548/cdefBF548.h | |||
@@ -185,39 +185,6 @@ | |||
185 | 185 | ||
186 | /* Two Wire Interface Registers (TWI1) */ | 186 | /* Two Wire Interface Registers (TWI1) */ |
187 | 187 | ||
188 | #define bfin_read_TWI1_CLKDIV() bfin_read16(TWI1_CLKDIV) | ||
189 | #define bfin_write_TWI1_CLKDIV(val) bfin_write16(TWI1_CLKDIV, val) | ||
190 | #define bfin_read_TWI1_CONTROL() bfin_read16(TWI1_CONTROL) | ||
191 | #define bfin_write_TWI1_CONTROL(val) bfin_write16(TWI1_CONTROL, val) | ||
192 | #define bfin_read_TWI1_SLAVE_CTRL() bfin_read16(TWI1_SLAVE_CTRL) | ||
193 | #define bfin_write_TWI1_SLAVE_CTRL(val) bfin_write16(TWI1_SLAVE_CTRL, val) | ||
194 | #define bfin_read_TWI1_SLAVE_STAT() bfin_read16(TWI1_SLAVE_STAT) | ||
195 | #define bfin_write_TWI1_SLAVE_STAT(val) bfin_write16(TWI1_SLAVE_STAT, val) | ||
196 | #define bfin_read_TWI1_SLAVE_ADDR() bfin_read16(TWI1_SLAVE_ADDR) | ||
197 | #define bfin_write_TWI1_SLAVE_ADDR(val) bfin_write16(TWI1_SLAVE_ADDR, val) | ||
198 | #define bfin_read_TWI1_MASTER_CTRL() bfin_read16(TWI1_MASTER_CTRL) | ||
199 | #define bfin_write_TWI1_MASTER_CTRL(val) bfin_write16(TWI1_MASTER_CTRL, val) | ||
200 | #define bfin_read_TWI1_MASTER_STAT() bfin_read16(TWI1_MASTER_STAT) | ||
201 | #define bfin_write_TWI1_MASTER_STAT(val) bfin_write16(TWI1_MASTER_STAT, val) | ||
202 | #define bfin_read_TWI1_MASTER_ADDR() bfin_read16(TWI1_MASTER_ADDR) | ||
203 | #define bfin_write_TWI1_MASTER_ADDR(val) bfin_write16(TWI1_MASTER_ADDR, val) | ||
204 | #define bfin_read_TWI1_INT_STAT() bfin_read16(TWI1_INT_STAT) | ||
205 | #define bfin_write_TWI1_INT_STAT(val) bfin_write16(TWI1_INT_STAT, val) | ||
206 | #define bfin_read_TWI1_INT_MASK() bfin_read16(TWI1_INT_MASK) | ||
207 | #define bfin_write_TWI1_INT_MASK(val) bfin_write16(TWI1_INT_MASK, val) | ||
208 | #define bfin_read_TWI1_FIFO_CTRL() bfin_read16(TWI1_FIFO_CTRL) | ||
209 | #define bfin_write_TWI1_FIFO_CTRL(val) bfin_write16(TWI1_FIFO_CTRL, val) | ||
210 | #define bfin_read_TWI1_FIFO_STAT() bfin_read16(TWI1_FIFO_STAT) | ||
211 | #define bfin_write_TWI1_FIFO_STAT(val) bfin_write16(TWI1_FIFO_STAT, val) | ||
212 | #define bfin_read_TWI1_XMT_DATA8() bfin_read16(TWI1_XMT_DATA8) | ||
213 | #define bfin_write_TWI1_XMT_DATA8(val) bfin_write16(TWI1_XMT_DATA8, val) | ||
214 | #define bfin_read_TWI1_XMT_DATA16() bfin_read16(TWI1_XMT_DATA16) | ||
215 | #define bfin_write_TWI1_XMT_DATA16(val) bfin_write16(TWI1_XMT_DATA16, val) | ||
216 | #define bfin_read_TWI1_RCV_DATA8() bfin_read16(TWI1_RCV_DATA8) | ||
217 | #define bfin_write_TWI1_RCV_DATA8(val) bfin_write16(TWI1_RCV_DATA8, val) | ||
218 | #define bfin_read_TWI1_RCV_DATA16() bfin_read16(TWI1_RCV_DATA16) | ||
219 | #define bfin_write_TWI1_RCV_DATA16(val) bfin_write16(TWI1_RCV_DATA16, val) | ||
220 | |||
221 | /* SPI2 Registers */ | 188 | /* SPI2 Registers */ |
222 | 189 | ||
223 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) | 190 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF549.h b/include/asm-blackfin/mach-bf548/cdefBF549.h index 2ab5b7c00820..92d07d961999 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF549.h +++ b/include/asm-blackfin/mach-bf548/cdefBF549.h | |||
@@ -185,39 +185,6 @@ | |||
185 | 185 | ||
186 | /* Two Wire Interface Registers (TWI1) */ | 186 | /* Two Wire Interface Registers (TWI1) */ |
187 | 187 | ||
188 | #define bfin_read_TWI1_CLKDIV() bfin_read16(TWI1_CLKDIV) | ||
189 | #define bfin_write_TWI1_CLKDIV(val) bfin_write16(TWI1_CLKDIV, val) | ||
190 | #define bfin_read_TWI1_CONTROL() bfin_read16(TWI1_CONTROL) | ||
191 | #define bfin_write_TWI1_CONTROL(val) bfin_write16(TWI1_CONTROL, val) | ||
192 | #define bfin_read_TWI1_SLAVE_CTRL() bfin_read16(TWI1_SLAVE_CTRL) | ||
193 | #define bfin_write_TWI1_SLAVE_CTRL(val) bfin_write16(TWI1_SLAVE_CTRL, val) | ||
194 | #define bfin_read_TWI1_SLAVE_STAT() bfin_read16(TWI1_SLAVE_STAT) | ||
195 | #define bfin_write_TWI1_SLAVE_STAT(val) bfin_write16(TWI1_SLAVE_STAT, val) | ||
196 | #define bfin_read_TWI1_SLAVE_ADDR() bfin_read16(TWI1_SLAVE_ADDR) | ||
197 | #define bfin_write_TWI1_SLAVE_ADDR(val) bfin_write16(TWI1_SLAVE_ADDR, val) | ||
198 | #define bfin_read_TWI1_MASTER_CTRL() bfin_read16(TWI1_MASTER_CTRL) | ||
199 | #define bfin_write_TWI1_MASTER_CTRL(val) bfin_write16(TWI1_MASTER_CTRL, val) | ||
200 | #define bfin_read_TWI1_MASTER_STAT() bfin_read16(TWI1_MASTER_STAT) | ||
201 | #define bfin_write_TWI1_MASTER_STAT(val) bfin_write16(TWI1_MASTER_STAT, val) | ||
202 | #define bfin_read_TWI1_MASTER_ADDR() bfin_read16(TWI1_MASTER_ADDR) | ||
203 | #define bfin_write_TWI1_MASTER_ADDR(val) bfin_write16(TWI1_MASTER_ADDR, val) | ||
204 | #define bfin_read_TWI1_INT_STAT() bfin_read16(TWI1_INT_STAT) | ||
205 | #define bfin_write_TWI1_INT_STAT(val) bfin_write16(TWI1_INT_STAT, val) | ||
206 | #define bfin_read_TWI1_INT_MASK() bfin_read16(TWI1_INT_MASK) | ||
207 | #define bfin_write_TWI1_INT_MASK(val) bfin_write16(TWI1_INT_MASK, val) | ||
208 | #define bfin_read_TWI1_FIFO_CTRL() bfin_read16(TWI1_FIFO_CTRL) | ||
209 | #define bfin_write_TWI1_FIFO_CTRL(val) bfin_write16(TWI1_FIFO_CTRL, val) | ||
210 | #define bfin_read_TWI1_FIFO_STAT() bfin_read16(TWI1_FIFO_STAT) | ||
211 | #define bfin_write_TWI1_FIFO_STAT(val) bfin_write16(TWI1_FIFO_STAT, val) | ||
212 | #define bfin_read_TWI1_XMT_DATA8() bfin_read16(TWI1_XMT_DATA8) | ||
213 | #define bfin_write_TWI1_XMT_DATA8(val) bfin_write16(TWI1_XMT_DATA8, val) | ||
214 | #define bfin_read_TWI1_XMT_DATA16() bfin_read16(TWI1_XMT_DATA16) | ||
215 | #define bfin_write_TWI1_XMT_DATA16(val) bfin_write16(TWI1_XMT_DATA16, val) | ||
216 | #define bfin_read_TWI1_RCV_DATA8() bfin_read16(TWI1_RCV_DATA8) | ||
217 | #define bfin_write_TWI1_RCV_DATA8(val) bfin_write16(TWI1_RCV_DATA8, val) | ||
218 | #define bfin_read_TWI1_RCV_DATA16() bfin_read16(TWI1_RCV_DATA16) | ||
219 | #define bfin_write_TWI1_RCV_DATA16(val) bfin_write16(TWI1_RCV_DATA16, val) | ||
220 | |||
221 | /* SPI2 Registers */ | 188 | /* SPI2 Registers */ |
222 | 189 | ||
223 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) | 190 | #define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL) |
@@ -1773,7 +1740,7 @@ | |||
1773 | #define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH) | 1740 | #define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH) |
1774 | #define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val) | 1741 | #define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val) |
1775 | #define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW) | 1742 | #define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW) |
1776 | #define bfin_write_USB_DMA5COUNTLOW(val) fin_write16(USB_DMA5COUNTLOW, val) | 1743 | #define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val) |
1777 | #define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH) | 1744 | #define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH) |
1778 | #define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val) | 1745 | #define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val) |
1779 | 1746 | ||
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index 19ddcd83c71f..57ac8cb9b1f6 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -43,7 +43,33 @@ | |||
43 | /* PLL Registers */ | 43 | /* PLL Registers */ |
44 | 44 | ||
45 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) | 45 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) |
46 | #define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL, val) | 46 | /* Writing to PLL_CTL initiates a PLL relock sequence. */ |
47 | static __inline__ void bfin_write_PLL_CTL(unsigned int val) | ||
48 | { | ||
49 | unsigned long flags, iwr0, iwr1, iwr2; | ||
50 | |||
51 | if (val == bfin_read_PLL_CTL()) | ||
52 | return; | ||
53 | |||
54 | local_irq_save(flags); | ||
55 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
56 | iwr0 = bfin_read32(SIC_IWR0); | ||
57 | iwr1 = bfin_read32(SIC_IWR1); | ||
58 | iwr2 = bfin_read32(SIC_IWR2); | ||
59 | /* Only allow PPL Wakeup) */ | ||
60 | bfin_write32(SIC_IWR0, IWR_ENABLE(0)); | ||
61 | bfin_write32(SIC_IWR1, 0); | ||
62 | bfin_write32(SIC_IWR2, 0); | ||
63 | |||
64 | bfin_write16(PLL_CTL, val); | ||
65 | SSYNC(); | ||
66 | asm("IDLE;"); | ||
67 | |||
68 | bfin_write32(SIC_IWR0, iwr0); | ||
69 | bfin_write32(SIC_IWR1, iwr1); | ||
70 | bfin_write32(SIC_IWR2, iwr2); | ||
71 | local_irq_restore(flags); | ||
72 | } | ||
47 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 73 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
48 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) | 74 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) |
49 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 75 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
@@ -52,6 +78,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
52 | { | 78 | { |
53 | unsigned long flags, iwr0, iwr1, iwr2; | 79 | unsigned long flags, iwr0, iwr1, iwr2; |
54 | 80 | ||
81 | if (val == bfin_read_VR_CTL()) | ||
82 | return; | ||
83 | |||
84 | local_irq_save(flags); | ||
55 | /* Enable the PLL Wakeup bit in SIC IWR */ | 85 | /* Enable the PLL Wakeup bit in SIC IWR */ |
56 | iwr0 = bfin_read32(SIC_IWR0); | 86 | iwr0 = bfin_read32(SIC_IWR0); |
57 | iwr1 = bfin_read32(SIC_IWR1); | 87 | iwr1 = bfin_read32(SIC_IWR1); |
@@ -63,13 +93,12 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
63 | 93 | ||
64 | bfin_write16(VR_CTL, val); | 94 | bfin_write16(VR_CTL, val); |
65 | SSYNC(); | 95 | SSYNC(); |
66 | |||
67 | local_irq_save(flags); | ||
68 | asm("IDLE;"); | 96 | asm("IDLE;"); |
69 | local_irq_restore(flags); | 97 | |
70 | bfin_write32(SIC_IWR0, iwr0); | 98 | bfin_write32(SIC_IWR0, iwr0); |
71 | bfin_write32(SIC_IWR1, iwr1); | 99 | bfin_write32(SIC_IWR1, iwr1); |
72 | bfin_write32(SIC_IWR2, iwr2); | 100 | bfin_write32(SIC_IWR2, iwr2); |
101 | local_irq_restore(flags); | ||
73 | } | 102 | } |
74 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 103 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
75 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) | 104 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) |
@@ -211,39 +240,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
211 | 240 | ||
212 | /* Two Wire Interface Registers (TWI0) */ | 241 | /* Two Wire Interface Registers (TWI0) */ |
213 | 242 | ||
214 | #define bfin_read_TWI0_CLKDIV() bfin_read16(TWI0_CLKDIV) | ||
215 | #define bfin_write_TWI0_CLKDIV(val) bfin_write16(TWI0_CLKDIV, val) | ||
216 | #define bfin_read_TWI0_CONTROL() bfin_read16(TWI0_CONTROL) | ||
217 | #define bfin_write_TWI0_CONTROL(val) bfin_write16(TWI0_CONTROL, val) | ||
218 | #define bfin_read_TWI0_SLAVE_CTRL() bfin_read16(TWI0_SLAVE_CTRL) | ||
219 | #define bfin_write_TWI0_SLAVE_CTRL(val) bfin_write16(TWI0_SLAVE_CTRL, val) | ||
220 | #define bfin_read_TWI0_SLAVE_STAT() bfin_read16(TWI0_SLAVE_STAT) | ||
221 | #define bfin_write_TWI0_SLAVE_STAT(val) bfin_write16(TWI0_SLAVE_STAT, val) | ||
222 | #define bfin_read_TWI0_SLAVE_ADDR() bfin_read16(TWI0_SLAVE_ADDR) | ||
223 | #define bfin_write_TWI0_SLAVE_ADDR(val) bfin_write16(TWI0_SLAVE_ADDR, val) | ||
224 | #define bfin_read_TWI0_MASTER_CTRL() bfin_read16(TWI0_MASTER_CTRL) | ||
225 | #define bfin_write_TWI0_MASTER_CTRL(val) bfin_write16(TWI0_MASTER_CTRL, val) | ||
226 | #define bfin_read_TWI0_MASTER_STAT() bfin_read16(TWI0_MASTER_STAT) | ||
227 | #define bfin_write_TWI0_MASTER_STAT(val) bfin_write16(TWI0_MASTER_STAT, val) | ||
228 | #define bfin_read_TWI0_MASTER_ADDR() bfin_read16(TWI0_MASTER_ADDR) | ||
229 | #define bfin_write_TWI0_MASTER_ADDR(val) bfin_write16(TWI0_MASTER_ADDR, val) | ||
230 | #define bfin_read_TWI0_INT_STAT() bfin_read16(TWI0_INT_STAT) | ||
231 | #define bfin_write_TWI0_INT_STAT(val) bfin_write16(TWI0_INT_STAT, val) | ||
232 | #define bfin_read_TWI0_INT_MASK() bfin_read16(TWI0_INT_MASK) | ||
233 | #define bfin_write_TWI0_INT_MASK(val) bfin_write16(TWI0_INT_MASK, val) | ||
234 | #define bfin_read_TWI0_FIFO_CTRL() bfin_read16(TWI0_FIFO_CTRL) | ||
235 | #define bfin_write_TWI0_FIFO_CTRL(val) bfin_write16(TWI0_FIFO_CTRL, val) | ||
236 | #define bfin_read_TWI0_FIFO_STAT() bfin_read16(TWI0_FIFO_STAT) | ||
237 | #define bfin_write_TWI0_FIFO_STAT(val) bfin_write16(TWI0_FIFO_STAT, val) | ||
238 | #define bfin_read_TWI0_XMT_DATA8() bfin_read16(TWI0_XMT_DATA8) | ||
239 | #define bfin_write_TWI0_XMT_DATA8(val) bfin_write16(TWI0_XMT_DATA8, val) | ||
240 | #define bfin_read_TWI0_XMT_DATA16() bfin_read16(TWI0_XMT_DATA16) | ||
241 | #define bfin_write_TWI0_XMT_DATA16(val) bfin_write16(TWI0_XMT_DATA16, val) | ||
242 | #define bfin_read_TWI0_RCV_DATA8() bfin_read16(TWI0_RCV_DATA8) | ||
243 | #define bfin_write_TWI0_RCV_DATA8(val) bfin_write16(TWI0_RCV_DATA8, val) | ||
244 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | ||
245 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | ||
246 | |||
247 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ | 243 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ |
248 | 244 | ||
249 | /* SPORT1 Registers */ | 245 | /* SPORT1 Registers */ |
@@ -323,7 +319,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
323 | #define bfin_read_EBIU_DDRQUE() bfin_read32(EBIU_DDRQUE) | 319 | #define bfin_read_EBIU_DDRQUE() bfin_read32(EBIU_DDRQUE) |
324 | #define bfin_write_EBIU_DDRQUE(val) bfin_write32(EBIU_DDRQUE, val) | 320 | #define bfin_write_EBIU_DDRQUE(val) bfin_write32(EBIU_DDRQUE, val) |
325 | #define bfin_read_EBIU_ERRADD() bfin_read32(EBIU_ERRADD) | 321 | #define bfin_read_EBIU_ERRADD() bfin_read32(EBIU_ERRADD) |
326 | #define bfin_write_EBIU_ERRADD(val) bfin_write32(EBIU_ERRADD) | 322 | #define bfin_write_EBIU_ERRADD(val) bfin_write32(EBIU_ERRADD, val) |
327 | #define bfin_read_EBIU_ERRMST() bfin_read16(EBIU_ERRMST) | 323 | #define bfin_read_EBIU_ERRMST() bfin_read16(EBIU_ERRMST) |
328 | #define bfin_write_EBIU_ERRMST(val) bfin_write16(EBIU_ERRMST, val) | 324 | #define bfin_write_EBIU_ERRMST(val) bfin_write16(EBIU_ERRMST, val) |
329 | #define bfin_read_EBIU_RSTCTL() bfin_read16(EBIU_RSTCTL) | 325 | #define bfin_read_EBIU_RSTCTL() bfin_read16(EBIU_RSTCTL) |
@@ -392,23 +388,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
392 | /* DMA Channel 0 Registers */ | 388 | /* DMA Channel 0 Registers */ |
393 | 389 | ||
394 | #define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR) | 390 | #define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR) |
395 | #define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR) | 391 | #define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR, val) |
396 | #define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR) | 392 | #define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR) |
397 | #define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR) | 393 | #define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR, val) |
398 | #define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG) | 394 | #define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG) |
399 | #define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG, val) | 395 | #define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG, val) |
400 | #define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT) | 396 | #define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT) |
401 | #define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT, val) | 397 | #define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT, val) |
402 | #define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY) | 398 | #define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY) |
403 | #define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY) | 399 | #define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY, val) |
404 | #define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT) | 400 | #define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT) |
405 | #define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT, val) | 401 | #define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT, val) |
406 | #define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY) | 402 | #define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY) |
407 | #define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY) | 403 | #define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY, val) |
408 | #define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR) | 404 | #define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR) |
409 | #define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR) | 405 | #define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR, val) |
410 | #define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR) | 406 | #define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR) |
411 | #define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR) | 407 | #define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR, val) |
412 | #define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS) | 408 | #define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS) |
413 | #define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS, val) | 409 | #define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS, val) |
414 | #define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP) | 410 | #define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP) |
@@ -421,23 +417,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
421 | /* DMA Channel 1 Registers */ | 417 | /* DMA Channel 1 Registers */ |
422 | 418 | ||
423 | #define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR) | 419 | #define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR) |
424 | #define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR) | 420 | #define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR, val) |
425 | #define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR) | 421 | #define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR) |
426 | #define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR) | 422 | #define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR, val) |
427 | #define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG) | 423 | #define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG) |
428 | #define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG, val) | 424 | #define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG, val) |
429 | #define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT) | 425 | #define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT) |
430 | #define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT, val) | 426 | #define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT, val) |
431 | #define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY) | 427 | #define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY) |
432 | #define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY) | 428 | #define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY, val) |
433 | #define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT) | 429 | #define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT) |
434 | #define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT, val) | 430 | #define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT, val) |
435 | #define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY) | 431 | #define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY) |
436 | #define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY) | 432 | #define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY, val) |
437 | #define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR) | 433 | #define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR) |
438 | #define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR) | 434 | #define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR, val) |
439 | #define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR) | 435 | #define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR) |
440 | #define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR) | 436 | #define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR, val) |
441 | #define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS) | 437 | #define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS) |
442 | #define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS, val) | 438 | #define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS, val) |
443 | #define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP) | 439 | #define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP) |
@@ -450,23 +446,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
450 | /* DMA Channel 2 Registers */ | 446 | /* DMA Channel 2 Registers */ |
451 | 447 | ||
452 | #define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR) | 448 | #define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR) |
453 | #define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR) | 449 | #define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR, val) |
454 | #define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR) | 450 | #define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR) |
455 | #define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR) | 451 | #define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR, val) |
456 | #define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG) | 452 | #define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG) |
457 | #define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG, val) | 453 | #define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG, val) |
458 | #define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT) | 454 | #define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT) |
459 | #define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT, val) | 455 | #define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT, val) |
460 | #define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY) | 456 | #define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY) |
461 | #define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY) | 457 | #define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY, val) |
462 | #define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT) | 458 | #define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT) |
463 | #define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT, val) | 459 | #define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT, val) |
464 | #define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY) | 460 | #define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY) |
465 | #define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY) | 461 | #define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY, val) |
466 | #define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR) | 462 | #define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR) |
467 | #define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR) | 463 | #define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR, val) |
468 | #define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR) | 464 | #define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR) |
469 | #define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR) | 465 | #define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR, val) |
470 | #define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS) | 466 | #define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS) |
471 | #define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS, val) | 467 | #define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS, val) |
472 | #define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP) | 468 | #define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP) |
@@ -479,23 +475,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
479 | /* DMA Channel 3 Registers */ | 475 | /* DMA Channel 3 Registers */ |
480 | 476 | ||
481 | #define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR) | 477 | #define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR) |
482 | #define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR) | 478 | #define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR, val) |
483 | #define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR) | 479 | #define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR) |
484 | #define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR) | 480 | #define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR, val) |
485 | #define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG) | 481 | #define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG) |
486 | #define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG, val) | 482 | #define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG, val) |
487 | #define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT) | 483 | #define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT) |
488 | #define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT, val) | 484 | #define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT, val) |
489 | #define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY) | 485 | #define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY) |
490 | #define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY) | 486 | #define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY, val) |
491 | #define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT) | 487 | #define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT) |
492 | #define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT, val) | 488 | #define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT, val) |
493 | #define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY) | 489 | #define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY) |
494 | #define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY) | 490 | #define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY, val) |
495 | #define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR) | 491 | #define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR) |
496 | #define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR) | 492 | #define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR, val) |
497 | #define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR) | 493 | #define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR) |
498 | #define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR) | 494 | #define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR, val) |
499 | #define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS) | 495 | #define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS) |
500 | #define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS, val) | 496 | #define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS, val) |
501 | #define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP) | 497 | #define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP) |
@@ -508,23 +504,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
508 | /* DMA Channel 4 Registers */ | 504 | /* DMA Channel 4 Registers */ |
509 | 505 | ||
510 | #define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR) | 506 | #define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR) |
511 | #define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR) | 507 | #define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR, val) |
512 | #define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR) | 508 | #define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR) |
513 | #define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR) | 509 | #define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR, val) |
514 | #define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG) | 510 | #define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG) |
515 | #define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG, val) | 511 | #define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG, val) |
516 | #define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT) | 512 | #define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT) |
517 | #define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT, val) | 513 | #define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT, val) |
518 | #define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY) | 514 | #define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY) |
519 | #define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY) | 515 | #define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY, val) |
520 | #define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT) | 516 | #define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT) |
521 | #define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT, val) | 517 | #define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT, val) |
522 | #define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY) | 518 | #define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY) |
523 | #define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY) | 519 | #define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY, val) |
524 | #define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR) | 520 | #define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR) |
525 | #define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR) | 521 | #define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR, val) |
526 | #define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR) | 522 | #define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR) |
527 | #define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR) | 523 | #define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR, val) |
528 | #define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS) | 524 | #define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS) |
529 | #define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS, val) | 525 | #define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS, val) |
530 | #define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP) | 526 | #define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP) |
@@ -537,23 +533,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
537 | /* DMA Channel 5 Registers */ | 533 | /* DMA Channel 5 Registers */ |
538 | 534 | ||
539 | #define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR) | 535 | #define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR) |
540 | #define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR) | 536 | #define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR, val) |
541 | #define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR) | 537 | #define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR) |
542 | #define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR) | 538 | #define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR, val) |
543 | #define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG) | 539 | #define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG) |
544 | #define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG, val) | 540 | #define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG, val) |
545 | #define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT) | 541 | #define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT) |
546 | #define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT, val) | 542 | #define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT, val) |
547 | #define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY) | 543 | #define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY) |
548 | #define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY) | 544 | #define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY, val) |
549 | #define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT) | 545 | #define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT) |
550 | #define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT, val) | 546 | #define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT, val) |
551 | #define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY) | 547 | #define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY) |
552 | #define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY) | 548 | #define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY, val) |
553 | #define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR) | 549 | #define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR) |
554 | #define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR) | 550 | #define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR, val) |
555 | #define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR) | 551 | #define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR) |
556 | #define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR) | 552 | #define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR, val) |
557 | #define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS) | 553 | #define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS) |
558 | #define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS, val) | 554 | #define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS, val) |
559 | #define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP) | 555 | #define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP) |
@@ -566,23 +562,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
566 | /* DMA Channel 6 Registers */ | 562 | /* DMA Channel 6 Registers */ |
567 | 563 | ||
568 | #define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR) | 564 | #define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR) |
569 | #define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR) | 565 | #define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR, val) |
570 | #define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR) | 566 | #define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR) |
571 | #define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR) | 567 | #define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR, val) |
572 | #define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG) | 568 | #define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG) |
573 | #define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG, val) | 569 | #define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG, val) |
574 | #define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT) | 570 | #define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT) |
575 | #define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT, val) | 571 | #define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT, val) |
576 | #define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY) | 572 | #define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY) |
577 | #define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY) | 573 | #define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY, val) |
578 | #define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT) | 574 | #define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT) |
579 | #define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT, val) | 575 | #define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT, val) |
580 | #define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY) | 576 | #define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY) |
581 | #define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY) | 577 | #define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY, val) |
582 | #define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR) | 578 | #define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR) |
583 | #define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR) | 579 | #define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR, val) |
584 | #define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR) | 580 | #define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR) |
585 | #define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR) | 581 | #define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR, val) |
586 | #define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS) | 582 | #define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS) |
587 | #define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS, val) | 583 | #define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS, val) |
588 | #define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP) | 584 | #define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP) |
@@ -595,23 +591,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
595 | /* DMA Channel 7 Registers */ | 591 | /* DMA Channel 7 Registers */ |
596 | 592 | ||
597 | #define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR) | 593 | #define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR) |
598 | #define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR) | 594 | #define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR, val) |
599 | #define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR) | 595 | #define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR) |
600 | #define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR) | 596 | #define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR, val) |
601 | #define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG) | 597 | #define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG) |
602 | #define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG, val) | 598 | #define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG, val) |
603 | #define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT) | 599 | #define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT) |
604 | #define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT, val) | 600 | #define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT, val) |
605 | #define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY) | 601 | #define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY) |
606 | #define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY) | 602 | #define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY, val) |
607 | #define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT) | 603 | #define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT) |
608 | #define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT, val) | 604 | #define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT, val) |
609 | #define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY) | 605 | #define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY) |
610 | #define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY) | 606 | #define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY, val) |
611 | #define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR) | 607 | #define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR) |
612 | #define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR) | 608 | #define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR, val) |
613 | #define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR) | 609 | #define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR) |
614 | #define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR) | 610 | #define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR, val) |
615 | #define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS) | 611 | #define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS) |
616 | #define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS, val) | 612 | #define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS, val) |
617 | #define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP) | 613 | #define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP) |
@@ -624,23 +620,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
624 | /* DMA Channel 8 Registers */ | 620 | /* DMA Channel 8 Registers */ |
625 | 621 | ||
626 | #define bfin_read_DMA8_NEXT_DESC_PTR() bfin_read32(DMA8_NEXT_DESC_PTR) | 622 | #define bfin_read_DMA8_NEXT_DESC_PTR() bfin_read32(DMA8_NEXT_DESC_PTR) |
627 | #define bfin_write_DMA8_NEXT_DESC_PTR(val) bfin_write32(DMA8_NEXT_DESC_PTR) | 623 | #define bfin_write_DMA8_NEXT_DESC_PTR(val) bfin_write32(DMA8_NEXT_DESC_PTR, val) |
628 | #define bfin_read_DMA8_START_ADDR() bfin_read32(DMA8_START_ADDR) | 624 | #define bfin_read_DMA8_START_ADDR() bfin_read32(DMA8_START_ADDR) |
629 | #define bfin_write_DMA8_START_ADDR(val) bfin_write32(DMA8_START_ADDR) | 625 | #define bfin_write_DMA8_START_ADDR(val) bfin_write32(DMA8_START_ADDR, val) |
630 | #define bfin_read_DMA8_CONFIG() bfin_read16(DMA8_CONFIG) | 626 | #define bfin_read_DMA8_CONFIG() bfin_read16(DMA8_CONFIG) |
631 | #define bfin_write_DMA8_CONFIG(val) bfin_write16(DMA8_CONFIG, val) | 627 | #define bfin_write_DMA8_CONFIG(val) bfin_write16(DMA8_CONFIG, val) |
632 | #define bfin_read_DMA8_X_COUNT() bfin_read16(DMA8_X_COUNT) | 628 | #define bfin_read_DMA8_X_COUNT() bfin_read16(DMA8_X_COUNT) |
633 | #define bfin_write_DMA8_X_COUNT(val) bfin_write16(DMA8_X_COUNT, val) | 629 | #define bfin_write_DMA8_X_COUNT(val) bfin_write16(DMA8_X_COUNT, val) |
634 | #define bfin_read_DMA8_X_MODIFY() bfin_read16(DMA8_X_MODIFY) | 630 | #define bfin_read_DMA8_X_MODIFY() bfin_read16(DMA8_X_MODIFY) |
635 | #define bfin_write_DMA8_X_MODIFY(val) bfin_write16(DMA8_X_MODIFY) | 631 | #define bfin_write_DMA8_X_MODIFY(val) bfin_write16(DMA8_X_MODIFY, val) |
636 | #define bfin_read_DMA8_Y_COUNT() bfin_read16(DMA8_Y_COUNT) | 632 | #define bfin_read_DMA8_Y_COUNT() bfin_read16(DMA8_Y_COUNT) |
637 | #define bfin_write_DMA8_Y_COUNT(val) bfin_write16(DMA8_Y_COUNT, val) | 633 | #define bfin_write_DMA8_Y_COUNT(val) bfin_write16(DMA8_Y_COUNT, val) |
638 | #define bfin_read_DMA8_Y_MODIFY() bfin_read16(DMA8_Y_MODIFY) | 634 | #define bfin_read_DMA8_Y_MODIFY() bfin_read16(DMA8_Y_MODIFY) |
639 | #define bfin_write_DMA8_Y_MODIFY(val) bfin_write16(DMA8_Y_MODIFY) | 635 | #define bfin_write_DMA8_Y_MODIFY(val) bfin_write16(DMA8_Y_MODIFY, val) |
640 | #define bfin_read_DMA8_CURR_DESC_PTR() bfin_read32(DMA8_CURR_DESC_PTR) | 636 | #define bfin_read_DMA8_CURR_DESC_PTR() bfin_read32(DMA8_CURR_DESC_PTR) |
641 | #define bfin_write_DMA8_CURR_DESC_PTR(val) bfin_write32(DMA8_CURR_DESC_PTR) | 637 | #define bfin_write_DMA8_CURR_DESC_PTR(val) bfin_write32(DMA8_CURR_DESC_PTR, val) |
642 | #define bfin_read_DMA8_CURR_ADDR() bfin_read32(DMA8_CURR_ADDR) | 638 | #define bfin_read_DMA8_CURR_ADDR() bfin_read32(DMA8_CURR_ADDR) |
643 | #define bfin_write_DMA8_CURR_ADDR(val) bfin_write32(DMA8_CURR_ADDR) | 639 | #define bfin_write_DMA8_CURR_ADDR(val) bfin_write32(DMA8_CURR_ADDR, val) |
644 | #define bfin_read_DMA8_IRQ_STATUS() bfin_read16(DMA8_IRQ_STATUS) | 640 | #define bfin_read_DMA8_IRQ_STATUS() bfin_read16(DMA8_IRQ_STATUS) |
645 | #define bfin_write_DMA8_IRQ_STATUS(val) bfin_write16(DMA8_IRQ_STATUS, val) | 641 | #define bfin_write_DMA8_IRQ_STATUS(val) bfin_write16(DMA8_IRQ_STATUS, val) |
646 | #define bfin_read_DMA8_PERIPHERAL_MAP() bfin_read16(DMA8_PERIPHERAL_MAP) | 642 | #define bfin_read_DMA8_PERIPHERAL_MAP() bfin_read16(DMA8_PERIPHERAL_MAP) |
@@ -653,23 +649,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
653 | /* DMA Channel 9 Registers */ | 649 | /* DMA Channel 9 Registers */ |
654 | 650 | ||
655 | #define bfin_read_DMA9_NEXT_DESC_PTR() bfin_read32(DMA9_NEXT_DESC_PTR) | 651 | #define bfin_read_DMA9_NEXT_DESC_PTR() bfin_read32(DMA9_NEXT_DESC_PTR) |
656 | #define bfin_write_DMA9_NEXT_DESC_PTR(val) bfin_write32(DMA9_NEXT_DESC_PTR) | 652 | #define bfin_write_DMA9_NEXT_DESC_PTR(val) bfin_write32(DMA9_NEXT_DESC_PTR, val) |
657 | #define bfin_read_DMA9_START_ADDR() bfin_read32(DMA9_START_ADDR) | 653 | #define bfin_read_DMA9_START_ADDR() bfin_read32(DMA9_START_ADDR) |
658 | #define bfin_write_DMA9_START_ADDR(val) bfin_write32(DMA9_START_ADDR) | 654 | #define bfin_write_DMA9_START_ADDR(val) bfin_write32(DMA9_START_ADDR, val) |
659 | #define bfin_read_DMA9_CONFIG() bfin_read16(DMA9_CONFIG) | 655 | #define bfin_read_DMA9_CONFIG() bfin_read16(DMA9_CONFIG) |
660 | #define bfin_write_DMA9_CONFIG(val) bfin_write16(DMA9_CONFIG, val) | 656 | #define bfin_write_DMA9_CONFIG(val) bfin_write16(DMA9_CONFIG, val) |
661 | #define bfin_read_DMA9_X_COUNT() bfin_read16(DMA9_X_COUNT) | 657 | #define bfin_read_DMA9_X_COUNT() bfin_read16(DMA9_X_COUNT) |
662 | #define bfin_write_DMA9_X_COUNT(val) bfin_write16(DMA9_X_COUNT, val) | 658 | #define bfin_write_DMA9_X_COUNT(val) bfin_write16(DMA9_X_COUNT, val) |
663 | #define bfin_read_DMA9_X_MODIFY() bfin_read16(DMA9_X_MODIFY) | 659 | #define bfin_read_DMA9_X_MODIFY() bfin_read16(DMA9_X_MODIFY) |
664 | #define bfin_write_DMA9_X_MODIFY(val) bfin_write16(DMA9_X_MODIFY) | 660 | #define bfin_write_DMA9_X_MODIFY(val) bfin_write16(DMA9_X_MODIFY, val) |
665 | #define bfin_read_DMA9_Y_COUNT() bfin_read16(DMA9_Y_COUNT) | 661 | #define bfin_read_DMA9_Y_COUNT() bfin_read16(DMA9_Y_COUNT) |
666 | #define bfin_write_DMA9_Y_COUNT(val) bfin_write16(DMA9_Y_COUNT, val) | 662 | #define bfin_write_DMA9_Y_COUNT(val) bfin_write16(DMA9_Y_COUNT, val) |
667 | #define bfin_read_DMA9_Y_MODIFY() bfin_read16(DMA9_Y_MODIFY) | 663 | #define bfin_read_DMA9_Y_MODIFY() bfin_read16(DMA9_Y_MODIFY) |
668 | #define bfin_write_DMA9_Y_MODIFY(val) bfin_write16(DMA9_Y_MODIFY) | 664 | #define bfin_write_DMA9_Y_MODIFY(val) bfin_write16(DMA9_Y_MODIFY, val) |
669 | #define bfin_read_DMA9_CURR_DESC_PTR() bfin_read32(DMA9_CURR_DESC_PTR) | 665 | #define bfin_read_DMA9_CURR_DESC_PTR() bfin_read32(DMA9_CURR_DESC_PTR) |
670 | #define bfin_write_DMA9_CURR_DESC_PTR(val) bfin_write32(DMA9_CURR_DESC_PTR) | 666 | #define bfin_write_DMA9_CURR_DESC_PTR(val) bfin_write32(DMA9_CURR_DESC_PTR, val) |
671 | #define bfin_read_DMA9_CURR_ADDR() bfin_read32(DMA9_CURR_ADDR) | 667 | #define bfin_read_DMA9_CURR_ADDR() bfin_read32(DMA9_CURR_ADDR) |
672 | #define bfin_write_DMA9_CURR_ADDR(val) bfin_write32(DMA9_CURR_ADDR) | 668 | #define bfin_write_DMA9_CURR_ADDR(val) bfin_write32(DMA9_CURR_ADDR, val) |
673 | #define bfin_read_DMA9_IRQ_STATUS() bfin_read16(DMA9_IRQ_STATUS) | 669 | #define bfin_read_DMA9_IRQ_STATUS() bfin_read16(DMA9_IRQ_STATUS) |
674 | #define bfin_write_DMA9_IRQ_STATUS(val) bfin_write16(DMA9_IRQ_STATUS, val) | 670 | #define bfin_write_DMA9_IRQ_STATUS(val) bfin_write16(DMA9_IRQ_STATUS, val) |
675 | #define bfin_read_DMA9_PERIPHERAL_MAP() bfin_read16(DMA9_PERIPHERAL_MAP) | 671 | #define bfin_read_DMA9_PERIPHERAL_MAP() bfin_read16(DMA9_PERIPHERAL_MAP) |
@@ -682,23 +678,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
682 | /* DMA Channel 10 Registers */ | 678 | /* DMA Channel 10 Registers */ |
683 | 679 | ||
684 | #define bfin_read_DMA10_NEXT_DESC_PTR() bfin_read32(DMA10_NEXT_DESC_PTR) | 680 | #define bfin_read_DMA10_NEXT_DESC_PTR() bfin_read32(DMA10_NEXT_DESC_PTR) |
685 | #define bfin_write_DMA10_NEXT_DESC_PTR(val) bfin_write32(DMA10_NEXT_DESC_PTR) | 681 | #define bfin_write_DMA10_NEXT_DESC_PTR(val) bfin_write32(DMA10_NEXT_DESC_PTR, val) |
686 | #define bfin_read_DMA10_START_ADDR() bfin_read32(DMA10_START_ADDR) | 682 | #define bfin_read_DMA10_START_ADDR() bfin_read32(DMA10_START_ADDR) |
687 | #define bfin_write_DMA10_START_ADDR(val) bfin_write32(DMA10_START_ADDR) | 683 | #define bfin_write_DMA10_START_ADDR(val) bfin_write32(DMA10_START_ADDR, val) |
688 | #define bfin_read_DMA10_CONFIG() bfin_read16(DMA10_CONFIG) | 684 | #define bfin_read_DMA10_CONFIG() bfin_read16(DMA10_CONFIG) |
689 | #define bfin_write_DMA10_CONFIG(val) bfin_write16(DMA10_CONFIG, val) | 685 | #define bfin_write_DMA10_CONFIG(val) bfin_write16(DMA10_CONFIG, val) |
690 | #define bfin_read_DMA10_X_COUNT() bfin_read16(DMA10_X_COUNT) | 686 | #define bfin_read_DMA10_X_COUNT() bfin_read16(DMA10_X_COUNT) |
691 | #define bfin_write_DMA10_X_COUNT(val) bfin_write16(DMA10_X_COUNT, val) | 687 | #define bfin_write_DMA10_X_COUNT(val) bfin_write16(DMA10_X_COUNT, val) |
692 | #define bfin_read_DMA10_X_MODIFY() bfin_read16(DMA10_X_MODIFY) | 688 | #define bfin_read_DMA10_X_MODIFY() bfin_read16(DMA10_X_MODIFY) |
693 | #define bfin_write_DMA10_X_MODIFY(val) bfin_write16(DMA10_X_MODIFY) | 689 | #define bfin_write_DMA10_X_MODIFY(val) bfin_write16(DMA10_X_MODIFY, val) |
694 | #define bfin_read_DMA10_Y_COUNT() bfin_read16(DMA10_Y_COUNT) | 690 | #define bfin_read_DMA10_Y_COUNT() bfin_read16(DMA10_Y_COUNT) |
695 | #define bfin_write_DMA10_Y_COUNT(val) bfin_write16(DMA10_Y_COUNT, val) | 691 | #define bfin_write_DMA10_Y_COUNT(val) bfin_write16(DMA10_Y_COUNT, val) |
696 | #define bfin_read_DMA10_Y_MODIFY() bfin_read16(DMA10_Y_MODIFY) | 692 | #define bfin_read_DMA10_Y_MODIFY() bfin_read16(DMA10_Y_MODIFY) |
697 | #define bfin_write_DMA10_Y_MODIFY(val) bfin_write16(DMA10_Y_MODIFY) | 693 | #define bfin_write_DMA10_Y_MODIFY(val) bfin_write16(DMA10_Y_MODIFY, val) |
698 | #define bfin_read_DMA10_CURR_DESC_PTR() bfin_read32(DMA10_CURR_DESC_PTR) | 694 | #define bfin_read_DMA10_CURR_DESC_PTR() bfin_read32(DMA10_CURR_DESC_PTR) |
699 | #define bfin_write_DMA10_CURR_DESC_PTR(val) bfin_write32(DMA10_CURR_DESC_PTR) | 695 | #define bfin_write_DMA10_CURR_DESC_PTR(val) bfin_write32(DMA10_CURR_DESC_PTR, val) |
700 | #define bfin_read_DMA10_CURR_ADDR() bfin_read32(DMA10_CURR_ADDR) | 696 | #define bfin_read_DMA10_CURR_ADDR() bfin_read32(DMA10_CURR_ADDR) |
701 | #define bfin_write_DMA10_CURR_ADDR(val) bfin_write32(DMA10_CURR_ADDR) | 697 | #define bfin_write_DMA10_CURR_ADDR(val) bfin_write32(DMA10_CURR_ADDR, val) |
702 | #define bfin_read_DMA10_IRQ_STATUS() bfin_read16(DMA10_IRQ_STATUS) | 698 | #define bfin_read_DMA10_IRQ_STATUS() bfin_read16(DMA10_IRQ_STATUS) |
703 | #define bfin_write_DMA10_IRQ_STATUS(val) bfin_write16(DMA10_IRQ_STATUS, val) | 699 | #define bfin_write_DMA10_IRQ_STATUS(val) bfin_write16(DMA10_IRQ_STATUS, val) |
704 | #define bfin_read_DMA10_PERIPHERAL_MAP() bfin_read16(DMA10_PERIPHERAL_MAP) | 700 | #define bfin_read_DMA10_PERIPHERAL_MAP() bfin_read16(DMA10_PERIPHERAL_MAP) |
@@ -711,23 +707,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
711 | /* DMA Channel 11 Registers */ | 707 | /* DMA Channel 11 Registers */ |
712 | 708 | ||
713 | #define bfin_read_DMA11_NEXT_DESC_PTR() bfin_read32(DMA11_NEXT_DESC_PTR) | 709 | #define bfin_read_DMA11_NEXT_DESC_PTR() bfin_read32(DMA11_NEXT_DESC_PTR) |
714 | #define bfin_write_DMA11_NEXT_DESC_PTR(val) bfin_write32(DMA11_NEXT_DESC_PTR) | 710 | #define bfin_write_DMA11_NEXT_DESC_PTR(val) bfin_write32(DMA11_NEXT_DESC_PTR, val) |
715 | #define bfin_read_DMA11_START_ADDR() bfin_read32(DMA11_START_ADDR) | 711 | #define bfin_read_DMA11_START_ADDR() bfin_read32(DMA11_START_ADDR) |
716 | #define bfin_write_DMA11_START_ADDR(val) bfin_write32(DMA11_START_ADDR) | 712 | #define bfin_write_DMA11_START_ADDR(val) bfin_write32(DMA11_START_ADDR, val) |
717 | #define bfin_read_DMA11_CONFIG() bfin_read16(DMA11_CONFIG) | 713 | #define bfin_read_DMA11_CONFIG() bfin_read16(DMA11_CONFIG) |
718 | #define bfin_write_DMA11_CONFIG(val) bfin_write16(DMA11_CONFIG, val) | 714 | #define bfin_write_DMA11_CONFIG(val) bfin_write16(DMA11_CONFIG, val) |
719 | #define bfin_read_DMA11_X_COUNT() bfin_read16(DMA11_X_COUNT) | 715 | #define bfin_read_DMA11_X_COUNT() bfin_read16(DMA11_X_COUNT) |
720 | #define bfin_write_DMA11_X_COUNT(val) bfin_write16(DMA11_X_COUNT, val) | 716 | #define bfin_write_DMA11_X_COUNT(val) bfin_write16(DMA11_X_COUNT, val) |
721 | #define bfin_read_DMA11_X_MODIFY() bfin_read16(DMA11_X_MODIFY) | 717 | #define bfin_read_DMA11_X_MODIFY() bfin_read16(DMA11_X_MODIFY) |
722 | #define bfin_write_DMA11_X_MODIFY(val) bfin_write16(DMA11_X_MODIFY) | 718 | #define bfin_write_DMA11_X_MODIFY(val) bfin_write16(DMA11_X_MODIFY, val) |
723 | #define bfin_read_DMA11_Y_COUNT() bfin_read16(DMA11_Y_COUNT) | 719 | #define bfin_read_DMA11_Y_COUNT() bfin_read16(DMA11_Y_COUNT) |
724 | #define bfin_write_DMA11_Y_COUNT(val) bfin_write16(DMA11_Y_COUNT, val) | 720 | #define bfin_write_DMA11_Y_COUNT(val) bfin_write16(DMA11_Y_COUNT, val) |
725 | #define bfin_read_DMA11_Y_MODIFY() bfin_read16(DMA11_Y_MODIFY) | 721 | #define bfin_read_DMA11_Y_MODIFY() bfin_read16(DMA11_Y_MODIFY) |
726 | #define bfin_write_DMA11_Y_MODIFY(val) bfin_write16(DMA11_Y_MODIFY) | 722 | #define bfin_write_DMA11_Y_MODIFY(val) bfin_write16(DMA11_Y_MODIFY, val) |
727 | #define bfin_read_DMA11_CURR_DESC_PTR() bfin_read32(DMA11_CURR_DESC_PTR) | 723 | #define bfin_read_DMA11_CURR_DESC_PTR() bfin_read32(DMA11_CURR_DESC_PTR) |
728 | #define bfin_write_DMA11_CURR_DESC_PTR(val) bfin_write32(DMA11_CURR_DESC_PTR) | 724 | #define bfin_write_DMA11_CURR_DESC_PTR(val) bfin_write32(DMA11_CURR_DESC_PTR, val) |
729 | #define bfin_read_DMA11_CURR_ADDR() bfin_read32(DMA11_CURR_ADDR) | 725 | #define bfin_read_DMA11_CURR_ADDR() bfin_read32(DMA11_CURR_ADDR) |
730 | #define bfin_write_DMA11_CURR_ADDR(val) bfin_write32(DMA11_CURR_ADDR) | 726 | #define bfin_write_DMA11_CURR_ADDR(val) bfin_write32(DMA11_CURR_ADDR, val) |
731 | #define bfin_read_DMA11_IRQ_STATUS() bfin_read16(DMA11_IRQ_STATUS) | 727 | #define bfin_read_DMA11_IRQ_STATUS() bfin_read16(DMA11_IRQ_STATUS) |
732 | #define bfin_write_DMA11_IRQ_STATUS(val) bfin_write16(DMA11_IRQ_STATUS, val) | 728 | #define bfin_write_DMA11_IRQ_STATUS(val) bfin_write16(DMA11_IRQ_STATUS, val) |
733 | #define bfin_read_DMA11_PERIPHERAL_MAP() bfin_read16(DMA11_PERIPHERAL_MAP) | 729 | #define bfin_read_DMA11_PERIPHERAL_MAP() bfin_read16(DMA11_PERIPHERAL_MAP) |
@@ -740,7 +736,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
740 | /* MDMA Stream 0 Registers */ | 736 | /* MDMA Stream 0 Registers */ |
741 | 737 | ||
742 | #define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR) | 738 | #define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR) |
743 | #define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR) | 739 | #define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR, val) |
744 | #define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR) | 740 | #define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR) |
745 | #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val) | 741 | #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val) |
746 | #define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG) | 742 | #define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG) |
@@ -803,11 +799,11 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
803 | #define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT) | 799 | #define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT) |
804 | #define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT, val) | 800 | #define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT, val) |
805 | #define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY) | 801 | #define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY) |
806 | #define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY) | 802 | #define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY, val) |
807 | #define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT) | 803 | #define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT) |
808 | #define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT, val) | 804 | #define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT, val) |
809 | #define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY) | 805 | #define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY) |
810 | #define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY) | 806 | #define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY, val) |
811 | #define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR) | 807 | #define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR) |
812 | #define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val) | 808 | #define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val) |
813 | #define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR) | 809 | #define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR) |
@@ -829,11 +825,11 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
829 | #define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT) | 825 | #define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT) |
830 | #define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT, val) | 826 | #define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT, val) |
831 | #define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY) | 827 | #define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY) |
832 | #define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY) | 828 | #define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY, val) |
833 | #define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT) | 829 | #define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT) |
834 | #define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT, val) | 830 | #define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT, val) |
835 | #define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY) | 831 | #define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY) |
836 | #define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY) | 832 | #define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY, val) |
837 | #define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR) | 833 | #define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR) |
838 | #define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val) | 834 | #define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val) |
839 | #define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR) | 835 | #define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR) |
@@ -1246,23 +1242,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1246 | /* DMA Channel 12 Registers */ | 1242 | /* DMA Channel 12 Registers */ |
1247 | 1243 | ||
1248 | #define bfin_read_DMA12_NEXT_DESC_PTR() bfin_read32(DMA12_NEXT_DESC_PTR) | 1244 | #define bfin_read_DMA12_NEXT_DESC_PTR() bfin_read32(DMA12_NEXT_DESC_PTR) |
1249 | #define bfin_write_DMA12_NEXT_DESC_PTR(val) bfin_write32(DMA12_NEXT_DESC_PTR) | 1245 | #define bfin_write_DMA12_NEXT_DESC_PTR(val) bfin_write32(DMA12_NEXT_DESC_PTR, val) |
1250 | #define bfin_read_DMA12_START_ADDR() bfin_read32(DMA12_START_ADDR) | 1246 | #define bfin_read_DMA12_START_ADDR() bfin_read32(DMA12_START_ADDR) |
1251 | #define bfin_write_DMA12_START_ADDR(val) bfin_write32(DMA12_START_ADDR) | 1247 | #define bfin_write_DMA12_START_ADDR(val) bfin_write32(DMA12_START_ADDR, val) |
1252 | #define bfin_read_DMA12_CONFIG() bfin_read16(DMA12_CONFIG) | 1248 | #define bfin_read_DMA12_CONFIG() bfin_read16(DMA12_CONFIG) |
1253 | #define bfin_write_DMA12_CONFIG(val) bfin_write16(DMA12_CONFIG, val) | 1249 | #define bfin_write_DMA12_CONFIG(val) bfin_write16(DMA12_CONFIG, val) |
1254 | #define bfin_read_DMA12_X_COUNT() bfin_read16(DMA12_X_COUNT) | 1250 | #define bfin_read_DMA12_X_COUNT() bfin_read16(DMA12_X_COUNT) |
1255 | #define bfin_write_DMA12_X_COUNT(val) bfin_write16(DMA12_X_COUNT, val) | 1251 | #define bfin_write_DMA12_X_COUNT(val) bfin_write16(DMA12_X_COUNT, val) |
1256 | #define bfin_read_DMA12_X_MODIFY() bfin_read16(DMA12_X_MODIFY) | 1252 | #define bfin_read_DMA12_X_MODIFY() bfin_read16(DMA12_X_MODIFY) |
1257 | #define bfin_write_DMA12_X_MODIFY(val) bfin_write16(DMA12_X_MODIFY) | 1253 | #define bfin_write_DMA12_X_MODIFY(val) bfin_write16(DMA12_X_MODIFY, val) |
1258 | #define bfin_read_DMA12_Y_COUNT() bfin_read16(DMA12_Y_COUNT) | 1254 | #define bfin_read_DMA12_Y_COUNT() bfin_read16(DMA12_Y_COUNT) |
1259 | #define bfin_write_DMA12_Y_COUNT(val) bfin_write16(DMA12_Y_COUNT, val) | 1255 | #define bfin_write_DMA12_Y_COUNT(val) bfin_write16(DMA12_Y_COUNT, val) |
1260 | #define bfin_read_DMA12_Y_MODIFY() bfin_read16(DMA12_Y_MODIFY) | 1256 | #define bfin_read_DMA12_Y_MODIFY() bfin_read16(DMA12_Y_MODIFY) |
1261 | #define bfin_write_DMA12_Y_MODIFY(val) bfin_write16(DMA12_Y_MODIFY) | 1257 | #define bfin_write_DMA12_Y_MODIFY(val) bfin_write16(DMA12_Y_MODIFY, val) |
1262 | #define bfin_read_DMA12_CURR_DESC_PTR() bfin_read32(DMA12_CURR_DESC_PTR) | 1258 | #define bfin_read_DMA12_CURR_DESC_PTR() bfin_read32(DMA12_CURR_DESC_PTR) |
1263 | #define bfin_write_DMA12_CURR_DESC_PTR(val) bfin_write32(DMA12_CURR_DESC_PTR) | 1259 | #define bfin_write_DMA12_CURR_DESC_PTR(val) bfin_write32(DMA12_CURR_DESC_PTR, val) |
1264 | #define bfin_read_DMA12_CURR_ADDR() bfin_read32(DMA12_CURR_ADDR) | 1260 | #define bfin_read_DMA12_CURR_ADDR() bfin_read32(DMA12_CURR_ADDR) |
1265 | #define bfin_write_DMA12_CURR_ADDR(val) bfin_write32(DMA12_CURR_ADDR) | 1261 | #define bfin_write_DMA12_CURR_ADDR(val) bfin_write32(DMA12_CURR_ADDR, val) |
1266 | #define bfin_read_DMA12_IRQ_STATUS() bfin_read16(DMA12_IRQ_STATUS) | 1262 | #define bfin_read_DMA12_IRQ_STATUS() bfin_read16(DMA12_IRQ_STATUS) |
1267 | #define bfin_write_DMA12_IRQ_STATUS(val) bfin_write16(DMA12_IRQ_STATUS, val) | 1263 | #define bfin_write_DMA12_IRQ_STATUS(val) bfin_write16(DMA12_IRQ_STATUS, val) |
1268 | #define bfin_read_DMA12_PERIPHERAL_MAP() bfin_read16(DMA12_PERIPHERAL_MAP) | 1264 | #define bfin_read_DMA12_PERIPHERAL_MAP() bfin_read16(DMA12_PERIPHERAL_MAP) |
@@ -1275,23 +1271,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1275 | /* DMA Channel 13 Registers */ | 1271 | /* DMA Channel 13 Registers */ |
1276 | 1272 | ||
1277 | #define bfin_read_DMA13_NEXT_DESC_PTR() bfin_read32(DMA13_NEXT_DESC_PTR) | 1273 | #define bfin_read_DMA13_NEXT_DESC_PTR() bfin_read32(DMA13_NEXT_DESC_PTR) |
1278 | #define bfin_write_DMA13_NEXT_DESC_PTR(val) bfin_write32(DMA13_NEXT_DESC_PTR) | 1274 | #define bfin_write_DMA13_NEXT_DESC_PTR(val) bfin_write32(DMA13_NEXT_DESC_PTR, val) |
1279 | #define bfin_read_DMA13_START_ADDR() bfin_read32(DMA13_START_ADDR) | 1275 | #define bfin_read_DMA13_START_ADDR() bfin_read32(DMA13_START_ADDR) |
1280 | #define bfin_write_DMA13_START_ADDR(val) bfin_write32(DMA13_START_ADDR) | 1276 | #define bfin_write_DMA13_START_ADDR(val) bfin_write32(DMA13_START_ADDR, val) |
1281 | #define bfin_read_DMA13_CONFIG() bfin_read16(DMA13_CONFIG) | 1277 | #define bfin_read_DMA13_CONFIG() bfin_read16(DMA13_CONFIG) |
1282 | #define bfin_write_DMA13_CONFIG(val) bfin_write16(DMA13_CONFIG, val) | 1278 | #define bfin_write_DMA13_CONFIG(val) bfin_write16(DMA13_CONFIG, val) |
1283 | #define bfin_read_DMA13_X_COUNT() bfin_read16(DMA13_X_COUNT) | 1279 | #define bfin_read_DMA13_X_COUNT() bfin_read16(DMA13_X_COUNT) |
1284 | #define bfin_write_DMA13_X_COUNT(val) bfin_write16(DMA13_X_COUNT, val) | 1280 | #define bfin_write_DMA13_X_COUNT(val) bfin_write16(DMA13_X_COUNT, val) |
1285 | #define bfin_read_DMA13_X_MODIFY() bfin_read16(DMA13_X_MODIFY) | 1281 | #define bfin_read_DMA13_X_MODIFY() bfin_read16(DMA13_X_MODIFY) |
1286 | #define bfin_write_DMA13_X_MODIFY(val) bfin_write16(DMA13_X_MODIFY) | 1282 | #define bfin_write_DMA13_X_MODIFY(val) bfin_write16(DMA13_X_MODIFY, val) |
1287 | #define bfin_read_DMA13_Y_COUNT() bfin_read16(DMA13_Y_COUNT) | 1283 | #define bfin_read_DMA13_Y_COUNT() bfin_read16(DMA13_Y_COUNT) |
1288 | #define bfin_write_DMA13_Y_COUNT(val) bfin_write16(DMA13_Y_COUNT, val) | 1284 | #define bfin_write_DMA13_Y_COUNT(val) bfin_write16(DMA13_Y_COUNT, val) |
1289 | #define bfin_read_DMA13_Y_MODIFY() bfin_read16(DMA13_Y_MODIFY) | 1285 | #define bfin_read_DMA13_Y_MODIFY() bfin_read16(DMA13_Y_MODIFY) |
1290 | #define bfin_write_DMA13_Y_MODIFY(val) bfin_write16(DMA13_Y_MODIFY) | 1286 | #define bfin_write_DMA13_Y_MODIFY(val) bfin_write16(DMA13_Y_MODIFY, val) |
1291 | #define bfin_read_DMA13_CURR_DESC_PTR() bfin_read32(DMA13_CURR_DESC_PTR) | 1287 | #define bfin_read_DMA13_CURR_DESC_PTR() bfin_read32(DMA13_CURR_DESC_PTR) |
1292 | #define bfin_write_DMA13_CURR_DESC_PTR(val) bfin_write32(DMA13_CURR_DESC_PTR) | 1288 | #define bfin_write_DMA13_CURR_DESC_PTR(val) bfin_write32(DMA13_CURR_DESC_PTR, val) |
1293 | #define bfin_read_DMA13_CURR_ADDR() bfin_read32(DMA13_CURR_ADDR) | 1289 | #define bfin_read_DMA13_CURR_ADDR() bfin_read32(DMA13_CURR_ADDR) |
1294 | #define bfin_write_DMA13_CURR_ADDR(val) bfin_write32(DMA13_CURR_ADDR) | 1290 | #define bfin_write_DMA13_CURR_ADDR(val) bfin_write32(DMA13_CURR_ADDR, val) |
1295 | #define bfin_read_DMA13_IRQ_STATUS() bfin_read16(DMA13_IRQ_STATUS) | 1291 | #define bfin_read_DMA13_IRQ_STATUS() bfin_read16(DMA13_IRQ_STATUS) |
1296 | #define bfin_write_DMA13_IRQ_STATUS(val) bfin_write16(DMA13_IRQ_STATUS, val) | 1292 | #define bfin_write_DMA13_IRQ_STATUS(val) bfin_write16(DMA13_IRQ_STATUS, val) |
1297 | #define bfin_read_DMA13_PERIPHERAL_MAP() bfin_read16(DMA13_PERIPHERAL_MAP) | 1293 | #define bfin_read_DMA13_PERIPHERAL_MAP() bfin_read16(DMA13_PERIPHERAL_MAP) |
@@ -1304,23 +1300,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1304 | /* DMA Channel 14 Registers */ | 1300 | /* DMA Channel 14 Registers */ |
1305 | 1301 | ||
1306 | #define bfin_read_DMA14_NEXT_DESC_PTR() bfin_read32(DMA14_NEXT_DESC_PTR) | 1302 | #define bfin_read_DMA14_NEXT_DESC_PTR() bfin_read32(DMA14_NEXT_DESC_PTR) |
1307 | #define bfin_write_DMA14_NEXT_DESC_PTR(val) bfin_write32(DMA14_NEXT_DESC_PTR) | 1303 | #define bfin_write_DMA14_NEXT_DESC_PTR(val) bfin_write32(DMA14_NEXT_DESC_PTR, val) |
1308 | #define bfin_read_DMA14_START_ADDR() bfin_read32(DMA14_START_ADDR) | 1304 | #define bfin_read_DMA14_START_ADDR() bfin_read32(DMA14_START_ADDR) |
1309 | #define bfin_write_DMA14_START_ADDR(val) bfin_write32(DMA14_START_ADDR) | 1305 | #define bfin_write_DMA14_START_ADDR(val) bfin_write32(DMA14_START_ADDR, val) |
1310 | #define bfin_read_DMA14_CONFIG() bfin_read16(DMA14_CONFIG) | 1306 | #define bfin_read_DMA14_CONFIG() bfin_read16(DMA14_CONFIG) |
1311 | #define bfin_write_DMA14_CONFIG(val) bfin_write16(DMA14_CONFIG, val) | 1307 | #define bfin_write_DMA14_CONFIG(val) bfin_write16(DMA14_CONFIG, val) |
1312 | #define bfin_read_DMA14_X_COUNT() bfin_read16(DMA14_X_COUNT) | 1308 | #define bfin_read_DMA14_X_COUNT() bfin_read16(DMA14_X_COUNT) |
1313 | #define bfin_write_DMA14_X_COUNT(val) bfin_write16(DMA14_X_COUNT, val) | 1309 | #define bfin_write_DMA14_X_COUNT(val) bfin_write16(DMA14_X_COUNT, val) |
1314 | #define bfin_read_DMA14_X_MODIFY() bfin_read16(DMA14_X_MODIFY) | 1310 | #define bfin_read_DMA14_X_MODIFY() bfin_read16(DMA14_X_MODIFY) |
1315 | #define bfin_write_DMA14_X_MODIFY(val) bfin_write16(DMA14_X_MODIFY) | 1311 | #define bfin_write_DMA14_X_MODIFY(val) bfin_write16(DMA14_X_MODIFY, val) |
1316 | #define bfin_read_DMA14_Y_COUNT() bfin_read16(DMA14_Y_COUNT) | 1312 | #define bfin_read_DMA14_Y_COUNT() bfin_read16(DMA14_Y_COUNT) |
1317 | #define bfin_write_DMA14_Y_COUNT(val) bfin_write16(DMA14_Y_COUNT, val) | 1313 | #define bfin_write_DMA14_Y_COUNT(val) bfin_write16(DMA14_Y_COUNT, val) |
1318 | #define bfin_read_DMA14_Y_MODIFY() bfin_read16(DMA14_Y_MODIFY) | 1314 | #define bfin_read_DMA14_Y_MODIFY() bfin_read16(DMA14_Y_MODIFY) |
1319 | #define bfin_write_DMA14_Y_MODIFY(val) bfin_write16(DMA14_Y_MODIFY) | 1315 | #define bfin_write_DMA14_Y_MODIFY(val) bfin_write16(DMA14_Y_MODIFY, val) |
1320 | #define bfin_read_DMA14_CURR_DESC_PTR() bfin_read32(DMA14_CURR_DESC_PTR) | 1316 | #define bfin_read_DMA14_CURR_DESC_PTR() bfin_read32(DMA14_CURR_DESC_PTR) |
1321 | #define bfin_write_DMA14_CURR_DESC_PTR(val) bfin_write32(DMA14_CURR_DESC_PTR) | 1317 | #define bfin_write_DMA14_CURR_DESC_PTR(val) bfin_write32(DMA14_CURR_DESC_PTR, val) |
1322 | #define bfin_read_DMA14_CURR_ADDR() bfin_read32(DMA14_CURR_ADDR) | 1318 | #define bfin_read_DMA14_CURR_ADDR() bfin_read32(DMA14_CURR_ADDR) |
1323 | #define bfin_write_DMA14_CURR_ADDR(val) bfin_write32(DMA14_CURR_ADDR) | 1319 | #define bfin_write_DMA14_CURR_ADDR(val) bfin_write32(DMA14_CURR_ADDR, val) |
1324 | #define bfin_read_DMA14_IRQ_STATUS() bfin_read16(DMA14_IRQ_STATUS) | 1320 | #define bfin_read_DMA14_IRQ_STATUS() bfin_read16(DMA14_IRQ_STATUS) |
1325 | #define bfin_write_DMA14_IRQ_STATUS(val) bfin_write16(DMA14_IRQ_STATUS, val) | 1321 | #define bfin_write_DMA14_IRQ_STATUS(val) bfin_write16(DMA14_IRQ_STATUS, val) |
1326 | #define bfin_read_DMA14_PERIPHERAL_MAP() bfin_read16(DMA14_PERIPHERAL_MAP) | 1322 | #define bfin_read_DMA14_PERIPHERAL_MAP() bfin_read16(DMA14_PERIPHERAL_MAP) |
@@ -1333,23 +1329,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1333 | /* DMA Channel 15 Registers */ | 1329 | /* DMA Channel 15 Registers */ |
1334 | 1330 | ||
1335 | #define bfin_read_DMA15_NEXT_DESC_PTR() bfin_read32(DMA15_NEXT_DESC_PTR) | 1331 | #define bfin_read_DMA15_NEXT_DESC_PTR() bfin_read32(DMA15_NEXT_DESC_PTR) |
1336 | #define bfin_write_DMA15_NEXT_DESC_PTR(val) bfin_write32(DMA15_NEXT_DESC_PTR) | 1332 | #define bfin_write_DMA15_NEXT_DESC_PTR(val) bfin_write32(DMA15_NEXT_DESC_PTR, val) |
1337 | #define bfin_read_DMA15_START_ADDR() bfin_read32(DMA15_START_ADDR) | 1333 | #define bfin_read_DMA15_START_ADDR() bfin_read32(DMA15_START_ADDR) |
1338 | #define bfin_write_DMA15_START_ADDR(val) bfin_write32(DMA15_START_ADDR) | 1334 | #define bfin_write_DMA15_START_ADDR(val) bfin_write32(DMA15_START_ADDR, val) |
1339 | #define bfin_read_DMA15_CONFIG() bfin_read16(DMA15_CONFIG) | 1335 | #define bfin_read_DMA15_CONFIG() bfin_read16(DMA15_CONFIG) |
1340 | #define bfin_write_DMA15_CONFIG(val) bfin_write16(DMA15_CONFIG, val) | 1336 | #define bfin_write_DMA15_CONFIG(val) bfin_write16(DMA15_CONFIG, val) |
1341 | #define bfin_read_DMA15_X_COUNT() bfin_read16(DMA15_X_COUNT) | 1337 | #define bfin_read_DMA15_X_COUNT() bfin_read16(DMA15_X_COUNT) |
1342 | #define bfin_write_DMA15_X_COUNT(val) bfin_write16(DMA15_X_COUNT, val) | 1338 | #define bfin_write_DMA15_X_COUNT(val) bfin_write16(DMA15_X_COUNT, val) |
1343 | #define bfin_read_DMA15_X_MODIFY() bfin_read16(DMA15_X_MODIFY) | 1339 | #define bfin_read_DMA15_X_MODIFY() bfin_read16(DMA15_X_MODIFY) |
1344 | #define bfin_write_DMA15_X_MODIFY(val) bfin_write16(DMA15_X_MODIFY) | 1340 | #define bfin_write_DMA15_X_MODIFY(val) bfin_write16(DMA15_X_MODIFY, val) |
1345 | #define bfin_read_DMA15_Y_COUNT() bfin_read16(DMA15_Y_COUNT) | 1341 | #define bfin_read_DMA15_Y_COUNT() bfin_read16(DMA15_Y_COUNT) |
1346 | #define bfin_write_DMA15_Y_COUNT(val) bfin_write16(DMA15_Y_COUNT, val) | 1342 | #define bfin_write_DMA15_Y_COUNT(val) bfin_write16(DMA15_Y_COUNT, val) |
1347 | #define bfin_read_DMA15_Y_MODIFY() bfin_read16(DMA15_Y_MODIFY) | 1343 | #define bfin_read_DMA15_Y_MODIFY() bfin_read16(DMA15_Y_MODIFY) |
1348 | #define bfin_write_DMA15_Y_MODIFY(val) bfin_write16(DMA15_Y_MODIFY) | 1344 | #define bfin_write_DMA15_Y_MODIFY(val) bfin_write16(DMA15_Y_MODIFY, val) |
1349 | #define bfin_read_DMA15_CURR_DESC_PTR() bfin_read32(DMA15_CURR_DESC_PTR) | 1345 | #define bfin_read_DMA15_CURR_DESC_PTR() bfin_read32(DMA15_CURR_DESC_PTR) |
1350 | #define bfin_write_DMA15_CURR_DESC_PTR(val) bfin_write32(DMA15_CURR_DESC_PTR) | 1346 | #define bfin_write_DMA15_CURR_DESC_PTR(val) bfin_write32(DMA15_CURR_DESC_PTR, val) |
1351 | #define bfin_read_DMA15_CURR_ADDR() bfin_read32(DMA15_CURR_ADDR) | 1347 | #define bfin_read_DMA15_CURR_ADDR() bfin_read32(DMA15_CURR_ADDR) |
1352 | #define bfin_write_DMA15_CURR_ADDR(val) bfin_write32(DMA15_CURR_ADDR) | 1348 | #define bfin_write_DMA15_CURR_ADDR(val) bfin_write32(DMA15_CURR_ADDR, val) |
1353 | #define bfin_read_DMA15_IRQ_STATUS() bfin_read16(DMA15_IRQ_STATUS) | 1349 | #define bfin_read_DMA15_IRQ_STATUS() bfin_read16(DMA15_IRQ_STATUS) |
1354 | #define bfin_write_DMA15_IRQ_STATUS(val) bfin_write16(DMA15_IRQ_STATUS, val) | 1350 | #define bfin_write_DMA15_IRQ_STATUS(val) bfin_write16(DMA15_IRQ_STATUS, val) |
1355 | #define bfin_read_DMA15_PERIPHERAL_MAP() bfin_read16(DMA15_PERIPHERAL_MAP) | 1351 | #define bfin_read_DMA15_PERIPHERAL_MAP() bfin_read16(DMA15_PERIPHERAL_MAP) |
@@ -1362,23 +1358,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1362 | /* DMA Channel 16 Registers */ | 1358 | /* DMA Channel 16 Registers */ |
1363 | 1359 | ||
1364 | #define bfin_read_DMA16_NEXT_DESC_PTR() bfin_read32(DMA16_NEXT_DESC_PTR) | 1360 | #define bfin_read_DMA16_NEXT_DESC_PTR() bfin_read32(DMA16_NEXT_DESC_PTR) |
1365 | #define bfin_write_DMA16_NEXT_DESC_PTR(val) bfin_write32(DMA16_NEXT_DESC_PTR) | 1361 | #define bfin_write_DMA16_NEXT_DESC_PTR(val) bfin_write32(DMA16_NEXT_DESC_PTR, val) |
1366 | #define bfin_read_DMA16_START_ADDR() bfin_read32(DMA16_START_ADDR) | 1362 | #define bfin_read_DMA16_START_ADDR() bfin_read32(DMA16_START_ADDR) |
1367 | #define bfin_write_DMA16_START_ADDR(val) bfin_write32(DMA16_START_ADDR) | 1363 | #define bfin_write_DMA16_START_ADDR(val) bfin_write32(DMA16_START_ADDR, val) |
1368 | #define bfin_read_DMA16_CONFIG() bfin_read16(DMA16_CONFIG) | 1364 | #define bfin_read_DMA16_CONFIG() bfin_read16(DMA16_CONFIG) |
1369 | #define bfin_write_DMA16_CONFIG(val) bfin_write16(DMA16_CONFIG, val) | 1365 | #define bfin_write_DMA16_CONFIG(val) bfin_write16(DMA16_CONFIG, val) |
1370 | #define bfin_read_DMA16_X_COUNT() bfin_read16(DMA16_X_COUNT) | 1366 | #define bfin_read_DMA16_X_COUNT() bfin_read16(DMA16_X_COUNT) |
1371 | #define bfin_write_DMA16_X_COUNT(val) bfin_write16(DMA16_X_COUNT, val) | 1367 | #define bfin_write_DMA16_X_COUNT(val) bfin_write16(DMA16_X_COUNT, val) |
1372 | #define bfin_read_DMA16_X_MODIFY() bfin_read16(DMA16_X_MODIFY) | 1368 | #define bfin_read_DMA16_X_MODIFY() bfin_read16(DMA16_X_MODIFY) |
1373 | #define bfin_write_DMA16_X_MODIFY(val) bfin_write16(DMA16_X_MODIFY) | 1369 | #define bfin_write_DMA16_X_MODIFY(val) bfin_write16(DMA16_X_MODIFY, val) |
1374 | #define bfin_read_DMA16_Y_COUNT() bfin_read16(DMA16_Y_COUNT) | 1370 | #define bfin_read_DMA16_Y_COUNT() bfin_read16(DMA16_Y_COUNT) |
1375 | #define bfin_write_DMA16_Y_COUNT(val) bfin_write16(DMA16_Y_COUNT, val) | 1371 | #define bfin_write_DMA16_Y_COUNT(val) bfin_write16(DMA16_Y_COUNT, val) |
1376 | #define bfin_read_DMA16_Y_MODIFY() bfin_read16(DMA16_Y_MODIFY) | 1372 | #define bfin_read_DMA16_Y_MODIFY() bfin_read16(DMA16_Y_MODIFY) |
1377 | #define bfin_write_DMA16_Y_MODIFY(val) bfin_write16(DMA16_Y_MODIFY) | 1373 | #define bfin_write_DMA16_Y_MODIFY(val) bfin_write16(DMA16_Y_MODIFY, val) |
1378 | #define bfin_read_DMA16_CURR_DESC_PTR() bfin_read32(DMA16_CURR_DESC_PTR) | 1374 | #define bfin_read_DMA16_CURR_DESC_PTR() bfin_read32(DMA16_CURR_DESC_PTR) |
1379 | #define bfin_write_DMA16_CURR_DESC_PTR(val) bfin_write32(DMA16_CURR_DESC_PTR) | 1375 | #define bfin_write_DMA16_CURR_DESC_PTR(val) bfin_write32(DMA16_CURR_DESC_PTR, val) |
1380 | #define bfin_read_DMA16_CURR_ADDR() bfin_read32(DMA16_CURR_ADDR) | 1376 | #define bfin_read_DMA16_CURR_ADDR() bfin_read32(DMA16_CURR_ADDR) |
1381 | #define bfin_write_DMA16_CURR_ADDR(val) bfin_write32(DMA16_CURR_ADDR) | 1377 | #define bfin_write_DMA16_CURR_ADDR(val) bfin_write32(DMA16_CURR_ADDR, val) |
1382 | #define bfin_read_DMA16_IRQ_STATUS() bfin_read16(DMA16_IRQ_STATUS) | 1378 | #define bfin_read_DMA16_IRQ_STATUS() bfin_read16(DMA16_IRQ_STATUS) |
1383 | #define bfin_write_DMA16_IRQ_STATUS(val) bfin_write16(DMA16_IRQ_STATUS, val) | 1379 | #define bfin_write_DMA16_IRQ_STATUS(val) bfin_write16(DMA16_IRQ_STATUS, val) |
1384 | #define bfin_read_DMA16_PERIPHERAL_MAP() bfin_read16(DMA16_PERIPHERAL_MAP) | 1380 | #define bfin_read_DMA16_PERIPHERAL_MAP() bfin_read16(DMA16_PERIPHERAL_MAP) |
@@ -1391,23 +1387,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1391 | /* DMA Channel 17 Registers */ | 1387 | /* DMA Channel 17 Registers */ |
1392 | 1388 | ||
1393 | #define bfin_read_DMA17_NEXT_DESC_PTR() bfin_read32(DMA17_NEXT_DESC_PTR) | 1389 | #define bfin_read_DMA17_NEXT_DESC_PTR() bfin_read32(DMA17_NEXT_DESC_PTR) |
1394 | #define bfin_write_DMA17_NEXT_DESC_PTR(val) bfin_write32(DMA17_NEXT_DESC_PTR) | 1390 | #define bfin_write_DMA17_NEXT_DESC_PTR(val) bfin_write32(DMA17_NEXT_DESC_PTR, val) |
1395 | #define bfin_read_DMA17_START_ADDR() bfin_read32(DMA17_START_ADDR) | 1391 | #define bfin_read_DMA17_START_ADDR() bfin_read32(DMA17_START_ADDR) |
1396 | #define bfin_write_DMA17_START_ADDR(val) bfin_write32(DMA17_START_ADDR) | 1392 | #define bfin_write_DMA17_START_ADDR(val) bfin_write32(DMA17_START_ADDR, val) |
1397 | #define bfin_read_DMA17_CONFIG() bfin_read16(DMA17_CONFIG) | 1393 | #define bfin_read_DMA17_CONFIG() bfin_read16(DMA17_CONFIG) |
1398 | #define bfin_write_DMA17_CONFIG(val) bfin_write16(DMA17_CONFIG, val) | 1394 | #define bfin_write_DMA17_CONFIG(val) bfin_write16(DMA17_CONFIG, val) |
1399 | #define bfin_read_DMA17_X_COUNT() bfin_read16(DMA17_X_COUNT) | 1395 | #define bfin_read_DMA17_X_COUNT() bfin_read16(DMA17_X_COUNT) |
1400 | #define bfin_write_DMA17_X_COUNT(val) bfin_write16(DMA17_X_COUNT, val) | 1396 | #define bfin_write_DMA17_X_COUNT(val) bfin_write16(DMA17_X_COUNT, val) |
1401 | #define bfin_read_DMA17_X_MODIFY() bfin_read16(DMA17_X_MODIFY) | 1397 | #define bfin_read_DMA17_X_MODIFY() bfin_read16(DMA17_X_MODIFY) |
1402 | #define bfin_write_DMA17_X_MODIFY(val) bfin_write16(DMA17_X_MODIFY) | 1398 | #define bfin_write_DMA17_X_MODIFY(val) bfin_write16(DMA17_X_MODIFY, val) |
1403 | #define bfin_read_DMA17_Y_COUNT() bfin_read16(DMA17_Y_COUNT) | 1399 | #define bfin_read_DMA17_Y_COUNT() bfin_read16(DMA17_Y_COUNT) |
1404 | #define bfin_write_DMA17_Y_COUNT(val) bfin_write16(DMA17_Y_COUNT, val) | 1400 | #define bfin_write_DMA17_Y_COUNT(val) bfin_write16(DMA17_Y_COUNT, val) |
1405 | #define bfin_read_DMA17_Y_MODIFY() bfin_read16(DMA17_Y_MODIFY) | 1401 | #define bfin_read_DMA17_Y_MODIFY() bfin_read16(DMA17_Y_MODIFY) |
1406 | #define bfin_write_DMA17_Y_MODIFY(val) bfin_write16(DMA17_Y_MODIFY) | 1402 | #define bfin_write_DMA17_Y_MODIFY(val) bfin_write16(DMA17_Y_MODIFY, val) |
1407 | #define bfin_read_DMA17_CURR_DESC_PTR() bfin_read32(DMA17_CURR_DESC_PTR) | 1403 | #define bfin_read_DMA17_CURR_DESC_PTR() bfin_read32(DMA17_CURR_DESC_PTR) |
1408 | #define bfin_write_DMA17_CURR_DESC_PTR(val) bfin_write32(DMA17_CURR_DESC_PTR) | 1404 | #define bfin_write_DMA17_CURR_DESC_PTR(val) bfin_write32(DMA17_CURR_DESC_PTR, val) |
1409 | #define bfin_read_DMA17_CURR_ADDR() bfin_read32(DMA17_CURR_ADDR) | 1405 | #define bfin_read_DMA17_CURR_ADDR() bfin_read32(DMA17_CURR_ADDR) |
1410 | #define bfin_write_DMA17_CURR_ADDR(val) bfin_write32(DMA17_CURR_ADDR) | 1406 | #define bfin_write_DMA17_CURR_ADDR(val) bfin_write32(DMA17_CURR_ADDR, val) |
1411 | #define bfin_read_DMA17_IRQ_STATUS() bfin_read16(DMA17_IRQ_STATUS) | 1407 | #define bfin_read_DMA17_IRQ_STATUS() bfin_read16(DMA17_IRQ_STATUS) |
1412 | #define bfin_write_DMA17_IRQ_STATUS(val) bfin_write16(DMA17_IRQ_STATUS, val) | 1408 | #define bfin_write_DMA17_IRQ_STATUS(val) bfin_write16(DMA17_IRQ_STATUS, val) |
1413 | #define bfin_read_DMA17_PERIPHERAL_MAP() bfin_read16(DMA17_PERIPHERAL_MAP) | 1409 | #define bfin_read_DMA17_PERIPHERAL_MAP() bfin_read16(DMA17_PERIPHERAL_MAP) |
@@ -1420,23 +1416,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1420 | /* DMA Channel 18 Registers */ | 1416 | /* DMA Channel 18 Registers */ |
1421 | 1417 | ||
1422 | #define bfin_read_DMA18_NEXT_DESC_PTR() bfin_read32(DMA18_NEXT_DESC_PTR) | 1418 | #define bfin_read_DMA18_NEXT_DESC_PTR() bfin_read32(DMA18_NEXT_DESC_PTR) |
1423 | #define bfin_write_DMA18_NEXT_DESC_PTR(val) bfin_write32(DMA18_NEXT_DESC_PTR) | 1419 | #define bfin_write_DMA18_NEXT_DESC_PTR(val) bfin_write32(DMA18_NEXT_DESC_PTR, val) |
1424 | #define bfin_read_DMA18_START_ADDR() bfin_read32(DMA18_START_ADDR) | 1420 | #define bfin_read_DMA18_START_ADDR() bfin_read32(DMA18_START_ADDR) |
1425 | #define bfin_write_DMA18_START_ADDR(val) bfin_write32(DMA18_START_ADDR) | 1421 | #define bfin_write_DMA18_START_ADDR(val) bfin_write32(DMA18_START_ADDR, val) |
1426 | #define bfin_read_DMA18_CONFIG() bfin_read16(DMA18_CONFIG) | 1422 | #define bfin_read_DMA18_CONFIG() bfin_read16(DMA18_CONFIG) |
1427 | #define bfin_write_DMA18_CONFIG(val) bfin_write16(DMA18_CONFIG, val) | 1423 | #define bfin_write_DMA18_CONFIG(val) bfin_write16(DMA18_CONFIG, val) |
1428 | #define bfin_read_DMA18_X_COUNT() bfin_read16(DMA18_X_COUNT) | 1424 | #define bfin_read_DMA18_X_COUNT() bfin_read16(DMA18_X_COUNT) |
1429 | #define bfin_write_DMA18_X_COUNT(val) bfin_write16(DMA18_X_COUNT, val) | 1425 | #define bfin_write_DMA18_X_COUNT(val) bfin_write16(DMA18_X_COUNT, val) |
1430 | #define bfin_read_DMA18_X_MODIFY() bfin_read16(DMA18_X_MODIFY) | 1426 | #define bfin_read_DMA18_X_MODIFY() bfin_read16(DMA18_X_MODIFY) |
1431 | #define bfin_write_DMA18_X_MODIFY(val) bfin_write16(DMA18_X_MODIFY) | 1427 | #define bfin_write_DMA18_X_MODIFY(val) bfin_write16(DMA18_X_MODIFY, val) |
1432 | #define bfin_read_DMA18_Y_COUNT() bfin_read16(DMA18_Y_COUNT) | 1428 | #define bfin_read_DMA18_Y_COUNT() bfin_read16(DMA18_Y_COUNT) |
1433 | #define bfin_write_DMA18_Y_COUNT(val) bfin_write16(DMA18_Y_COUNT, val) | 1429 | #define bfin_write_DMA18_Y_COUNT(val) bfin_write16(DMA18_Y_COUNT, val) |
1434 | #define bfin_read_DMA18_Y_MODIFY() bfin_read16(DMA18_Y_MODIFY) | 1430 | #define bfin_read_DMA18_Y_MODIFY() bfin_read16(DMA18_Y_MODIFY) |
1435 | #define bfin_write_DMA18_Y_MODIFY(val) bfin_write16(DMA18_Y_MODIFY) | 1431 | #define bfin_write_DMA18_Y_MODIFY(val) bfin_write16(DMA18_Y_MODIFY, val) |
1436 | #define bfin_read_DMA18_CURR_DESC_PTR() bfin_read32(DMA18_CURR_DESC_PTR) | 1432 | #define bfin_read_DMA18_CURR_DESC_PTR() bfin_read32(DMA18_CURR_DESC_PTR) |
1437 | #define bfin_write_DMA18_CURR_DESC_PTR(val) bfin_write32(DMA18_CURR_DESC_PTR) | 1433 | #define bfin_write_DMA18_CURR_DESC_PTR(val) bfin_write32(DMA18_CURR_DESC_PTR, val) |
1438 | #define bfin_read_DMA18_CURR_ADDR() bfin_read32(DMA18_CURR_ADDR) | 1434 | #define bfin_read_DMA18_CURR_ADDR() bfin_read32(DMA18_CURR_ADDR) |
1439 | #define bfin_write_DMA18_CURR_ADDR(val) bfin_write32(DMA18_CURR_ADDR) | 1435 | #define bfin_write_DMA18_CURR_ADDR(val) bfin_write32(DMA18_CURR_ADDR, val) |
1440 | #define bfin_read_DMA18_IRQ_STATUS() bfin_read16(DMA18_IRQ_STATUS) | 1436 | #define bfin_read_DMA18_IRQ_STATUS() bfin_read16(DMA18_IRQ_STATUS) |
1441 | #define bfin_write_DMA18_IRQ_STATUS(val) bfin_write16(DMA18_IRQ_STATUS, val) | 1437 | #define bfin_write_DMA18_IRQ_STATUS(val) bfin_write16(DMA18_IRQ_STATUS, val) |
1442 | #define bfin_read_DMA18_PERIPHERAL_MAP() bfin_read16(DMA18_PERIPHERAL_MAP) | 1438 | #define bfin_read_DMA18_PERIPHERAL_MAP() bfin_read16(DMA18_PERIPHERAL_MAP) |
@@ -1449,23 +1445,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1449 | /* DMA Channel 19 Registers */ | 1445 | /* DMA Channel 19 Registers */ |
1450 | 1446 | ||
1451 | #define bfin_read_DMA19_NEXT_DESC_PTR() bfin_read32(DMA19_NEXT_DESC_PTR) | 1447 | #define bfin_read_DMA19_NEXT_DESC_PTR() bfin_read32(DMA19_NEXT_DESC_PTR) |
1452 | #define bfin_write_DMA19_NEXT_DESC_PTR(val) bfin_write32(DMA19_NEXT_DESC_PTR) | 1448 | #define bfin_write_DMA19_NEXT_DESC_PTR(val) bfin_write32(DMA19_NEXT_DESC_PTR, val) |
1453 | #define bfin_read_DMA19_START_ADDR() bfin_read32(DMA19_START_ADDR) | 1449 | #define bfin_read_DMA19_START_ADDR() bfin_read32(DMA19_START_ADDR) |
1454 | #define bfin_write_DMA19_START_ADDR(val) bfin_write32(DMA19_START_ADDR) | 1450 | #define bfin_write_DMA19_START_ADDR(val) bfin_write32(DMA19_START_ADDR, val) |
1455 | #define bfin_read_DMA19_CONFIG() bfin_read16(DMA19_CONFIG) | 1451 | #define bfin_read_DMA19_CONFIG() bfin_read16(DMA19_CONFIG) |
1456 | #define bfin_write_DMA19_CONFIG(val) bfin_write16(DMA19_CONFIG, val) | 1452 | #define bfin_write_DMA19_CONFIG(val) bfin_write16(DMA19_CONFIG, val) |
1457 | #define bfin_read_DMA19_X_COUNT() bfin_read16(DMA19_X_COUNT) | 1453 | #define bfin_read_DMA19_X_COUNT() bfin_read16(DMA19_X_COUNT) |
1458 | #define bfin_write_DMA19_X_COUNT(val) bfin_write16(DMA19_X_COUNT, val) | 1454 | #define bfin_write_DMA19_X_COUNT(val) bfin_write16(DMA19_X_COUNT, val) |
1459 | #define bfin_read_DMA19_X_MODIFY() bfin_read16(DMA19_X_MODIFY) | 1455 | #define bfin_read_DMA19_X_MODIFY() bfin_read16(DMA19_X_MODIFY) |
1460 | #define bfin_write_DMA19_X_MODIFY(val) bfin_write16(DMA19_X_MODIFY) | 1456 | #define bfin_write_DMA19_X_MODIFY(val) bfin_write16(DMA19_X_MODIFY, val) |
1461 | #define bfin_read_DMA19_Y_COUNT() bfin_read16(DMA19_Y_COUNT) | 1457 | #define bfin_read_DMA19_Y_COUNT() bfin_read16(DMA19_Y_COUNT) |
1462 | #define bfin_write_DMA19_Y_COUNT(val) bfin_write16(DMA19_Y_COUNT, val) | 1458 | #define bfin_write_DMA19_Y_COUNT(val) bfin_write16(DMA19_Y_COUNT, val) |
1463 | #define bfin_read_DMA19_Y_MODIFY() bfin_read16(DMA19_Y_MODIFY) | 1459 | #define bfin_read_DMA19_Y_MODIFY() bfin_read16(DMA19_Y_MODIFY) |
1464 | #define bfin_write_DMA19_Y_MODIFY(val) bfin_write16(DMA19_Y_MODIFY) | 1460 | #define bfin_write_DMA19_Y_MODIFY(val) bfin_write16(DMA19_Y_MODIFY, val) |
1465 | #define bfin_read_DMA19_CURR_DESC_PTR() bfin_read32(DMA19_CURR_DESC_PTR) | 1461 | #define bfin_read_DMA19_CURR_DESC_PTR() bfin_read32(DMA19_CURR_DESC_PTR) |
1466 | #define bfin_write_DMA19_CURR_DESC_PTR(val) bfin_write32(DMA19_CURR_DESC_PTR) | 1462 | #define bfin_write_DMA19_CURR_DESC_PTR(val) bfin_write32(DMA19_CURR_DESC_PTR, val) |
1467 | #define bfin_read_DMA19_CURR_ADDR() bfin_read32(DMA19_CURR_ADDR) | 1463 | #define bfin_read_DMA19_CURR_ADDR() bfin_read32(DMA19_CURR_ADDR) |
1468 | #define bfin_write_DMA19_CURR_ADDR(val) bfin_write32(DMA19_CURR_ADDR) | 1464 | #define bfin_write_DMA19_CURR_ADDR(val) bfin_write32(DMA19_CURR_ADDR, val) |
1469 | #define bfin_read_DMA19_IRQ_STATUS() bfin_read16(DMA19_IRQ_STATUS) | 1465 | #define bfin_read_DMA19_IRQ_STATUS() bfin_read16(DMA19_IRQ_STATUS) |
1470 | #define bfin_write_DMA19_IRQ_STATUS(val) bfin_write16(DMA19_IRQ_STATUS, val) | 1466 | #define bfin_write_DMA19_IRQ_STATUS(val) bfin_write16(DMA19_IRQ_STATUS, val) |
1471 | #define bfin_read_DMA19_PERIPHERAL_MAP() bfin_read16(DMA19_PERIPHERAL_MAP) | 1467 | #define bfin_read_DMA19_PERIPHERAL_MAP() bfin_read16(DMA19_PERIPHERAL_MAP) |
@@ -1478,23 +1474,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1478 | /* DMA Channel 20 Registers */ | 1474 | /* DMA Channel 20 Registers */ |
1479 | 1475 | ||
1480 | #define bfin_read_DMA20_NEXT_DESC_PTR() bfin_read32(DMA20_NEXT_DESC_PTR) | 1476 | #define bfin_read_DMA20_NEXT_DESC_PTR() bfin_read32(DMA20_NEXT_DESC_PTR) |
1481 | #define bfin_write_DMA20_NEXT_DESC_PTR(val) bfin_write32(DMA20_NEXT_DESC_PTR) | 1477 | #define bfin_write_DMA20_NEXT_DESC_PTR(val) bfin_write32(DMA20_NEXT_DESC_PTR, val) |
1482 | #define bfin_read_DMA20_START_ADDR() bfin_read32(DMA20_START_ADDR) | 1478 | #define bfin_read_DMA20_START_ADDR() bfin_read32(DMA20_START_ADDR) |
1483 | #define bfin_write_DMA20_START_ADDR(val) bfin_write32(DMA20_START_ADDR) | 1479 | #define bfin_write_DMA20_START_ADDR(val) bfin_write32(DMA20_START_ADDR, val) |
1484 | #define bfin_read_DMA20_CONFIG() bfin_read16(DMA20_CONFIG) | 1480 | #define bfin_read_DMA20_CONFIG() bfin_read16(DMA20_CONFIG) |
1485 | #define bfin_write_DMA20_CONFIG(val) bfin_write16(DMA20_CONFIG, val) | 1481 | #define bfin_write_DMA20_CONFIG(val) bfin_write16(DMA20_CONFIG, val) |
1486 | #define bfin_read_DMA20_X_COUNT() bfin_read16(DMA20_X_COUNT) | 1482 | #define bfin_read_DMA20_X_COUNT() bfin_read16(DMA20_X_COUNT) |
1487 | #define bfin_write_DMA20_X_COUNT(val) bfin_write16(DMA20_X_COUNT, val) | 1483 | #define bfin_write_DMA20_X_COUNT(val) bfin_write16(DMA20_X_COUNT, val) |
1488 | #define bfin_read_DMA20_X_MODIFY() bfin_read16(DMA20_X_MODIFY) | 1484 | #define bfin_read_DMA20_X_MODIFY() bfin_read16(DMA20_X_MODIFY) |
1489 | #define bfin_write_DMA20_X_MODIFY(val) bfin_write16(DMA20_X_MODIFY) | 1485 | #define bfin_write_DMA20_X_MODIFY(val) bfin_write16(DMA20_X_MODIFY, val) |
1490 | #define bfin_read_DMA20_Y_COUNT() bfin_read16(DMA20_Y_COUNT) | 1486 | #define bfin_read_DMA20_Y_COUNT() bfin_read16(DMA20_Y_COUNT) |
1491 | #define bfin_write_DMA20_Y_COUNT(val) bfin_write16(DMA20_Y_COUNT, val) | 1487 | #define bfin_write_DMA20_Y_COUNT(val) bfin_write16(DMA20_Y_COUNT, val) |
1492 | #define bfin_read_DMA20_Y_MODIFY() bfin_read16(DMA20_Y_MODIFY) | 1488 | #define bfin_read_DMA20_Y_MODIFY() bfin_read16(DMA20_Y_MODIFY) |
1493 | #define bfin_write_DMA20_Y_MODIFY(val) bfin_write16(DMA20_Y_MODIFY) | 1489 | #define bfin_write_DMA20_Y_MODIFY(val) bfin_write16(DMA20_Y_MODIFY, val) |
1494 | #define bfin_read_DMA20_CURR_DESC_PTR() bfin_read32(DMA20_CURR_DESC_PTR) | 1490 | #define bfin_read_DMA20_CURR_DESC_PTR() bfin_read32(DMA20_CURR_DESC_PTR) |
1495 | #define bfin_write_DMA20_CURR_DESC_PTR(val) bfin_write32(DMA20_CURR_DESC_PTR) | 1491 | #define bfin_write_DMA20_CURR_DESC_PTR(val) bfin_write32(DMA20_CURR_DESC_PTR, val) |
1496 | #define bfin_read_DMA20_CURR_ADDR() bfin_read32(DMA20_CURR_ADDR) | 1492 | #define bfin_read_DMA20_CURR_ADDR() bfin_read32(DMA20_CURR_ADDR) |
1497 | #define bfin_write_DMA20_CURR_ADDR(val) bfin_write32(DMA20_CURR_ADDR) | 1493 | #define bfin_write_DMA20_CURR_ADDR(val) bfin_write32(DMA20_CURR_ADDR, val) |
1498 | #define bfin_read_DMA20_IRQ_STATUS() bfin_read16(DMA20_IRQ_STATUS) | 1494 | #define bfin_read_DMA20_IRQ_STATUS() bfin_read16(DMA20_IRQ_STATUS) |
1499 | #define bfin_write_DMA20_IRQ_STATUS(val) bfin_write16(DMA20_IRQ_STATUS, val) | 1495 | #define bfin_write_DMA20_IRQ_STATUS(val) bfin_write16(DMA20_IRQ_STATUS, val) |
1500 | #define bfin_read_DMA20_PERIPHERAL_MAP() bfin_read16(DMA20_PERIPHERAL_MAP) | 1496 | #define bfin_read_DMA20_PERIPHERAL_MAP() bfin_read16(DMA20_PERIPHERAL_MAP) |
@@ -1507,23 +1503,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1507 | /* DMA Channel 21 Registers */ | 1503 | /* DMA Channel 21 Registers */ |
1508 | 1504 | ||
1509 | #define bfin_read_DMA21_NEXT_DESC_PTR() bfin_read32(DMA21_NEXT_DESC_PTR) | 1505 | #define bfin_read_DMA21_NEXT_DESC_PTR() bfin_read32(DMA21_NEXT_DESC_PTR) |
1510 | #define bfin_write_DMA21_NEXT_DESC_PTR(val) bfin_write32(DMA21_NEXT_DESC_PTR) | 1506 | #define bfin_write_DMA21_NEXT_DESC_PTR(val) bfin_write32(DMA21_NEXT_DESC_PTR, val) |
1511 | #define bfin_read_DMA21_START_ADDR() bfin_read32(DMA21_START_ADDR) | 1507 | #define bfin_read_DMA21_START_ADDR() bfin_read32(DMA21_START_ADDR) |
1512 | #define bfin_write_DMA21_START_ADDR(val) bfin_write32(DMA21_START_ADDR) | 1508 | #define bfin_write_DMA21_START_ADDR(val) bfin_write32(DMA21_START_ADDR, val) |
1513 | #define bfin_read_DMA21_CONFIG() bfin_read16(DMA21_CONFIG) | 1509 | #define bfin_read_DMA21_CONFIG() bfin_read16(DMA21_CONFIG) |
1514 | #define bfin_write_DMA21_CONFIG(val) bfin_write16(DMA21_CONFIG, val) | 1510 | #define bfin_write_DMA21_CONFIG(val) bfin_write16(DMA21_CONFIG, val) |
1515 | #define bfin_read_DMA21_X_COUNT() bfin_read16(DMA21_X_COUNT) | 1511 | #define bfin_read_DMA21_X_COUNT() bfin_read16(DMA21_X_COUNT) |
1516 | #define bfin_write_DMA21_X_COUNT(val) bfin_write16(DMA21_X_COUNT, val) | 1512 | #define bfin_write_DMA21_X_COUNT(val) bfin_write16(DMA21_X_COUNT, val) |
1517 | #define bfin_read_DMA21_X_MODIFY() bfin_read16(DMA21_X_MODIFY) | 1513 | #define bfin_read_DMA21_X_MODIFY() bfin_read16(DMA21_X_MODIFY) |
1518 | #define bfin_write_DMA21_X_MODIFY(val) bfin_write16(DMA21_X_MODIFY) | 1514 | #define bfin_write_DMA21_X_MODIFY(val) bfin_write16(DMA21_X_MODIFY, val) |
1519 | #define bfin_read_DMA21_Y_COUNT() bfin_read16(DMA21_Y_COUNT) | 1515 | #define bfin_read_DMA21_Y_COUNT() bfin_read16(DMA21_Y_COUNT) |
1520 | #define bfin_write_DMA21_Y_COUNT(val) bfin_write16(DMA21_Y_COUNT, val) | 1516 | #define bfin_write_DMA21_Y_COUNT(val) bfin_write16(DMA21_Y_COUNT, val) |
1521 | #define bfin_read_DMA21_Y_MODIFY() bfin_read16(DMA21_Y_MODIFY) | 1517 | #define bfin_read_DMA21_Y_MODIFY() bfin_read16(DMA21_Y_MODIFY) |
1522 | #define bfin_write_DMA21_Y_MODIFY(val) bfin_write16(DMA21_Y_MODIFY) | 1518 | #define bfin_write_DMA21_Y_MODIFY(val) bfin_write16(DMA21_Y_MODIFY, val) |
1523 | #define bfin_read_DMA21_CURR_DESC_PTR() bfin_read32(DMA21_CURR_DESC_PTR) | 1519 | #define bfin_read_DMA21_CURR_DESC_PTR() bfin_read32(DMA21_CURR_DESC_PTR) |
1524 | #define bfin_write_DMA21_CURR_DESC_PTR(val) bfin_write32(DMA21_CURR_DESC_PTR) | 1520 | #define bfin_write_DMA21_CURR_DESC_PTR(val) bfin_write32(DMA21_CURR_DESC_PTR, val) |
1525 | #define bfin_read_DMA21_CURR_ADDR() bfin_read32(DMA21_CURR_ADDR) | 1521 | #define bfin_read_DMA21_CURR_ADDR() bfin_read32(DMA21_CURR_ADDR) |
1526 | #define bfin_write_DMA21_CURR_ADDR(val) bfin_write32(DMA21_CURR_ADDR) | 1522 | #define bfin_write_DMA21_CURR_ADDR(val) bfin_write32(DMA21_CURR_ADDR, val) |
1527 | #define bfin_read_DMA21_IRQ_STATUS() bfin_read16(DMA21_IRQ_STATUS) | 1523 | #define bfin_read_DMA21_IRQ_STATUS() bfin_read16(DMA21_IRQ_STATUS) |
1528 | #define bfin_write_DMA21_IRQ_STATUS(val) bfin_write16(DMA21_IRQ_STATUS, val) | 1524 | #define bfin_write_DMA21_IRQ_STATUS(val) bfin_write16(DMA21_IRQ_STATUS, val) |
1529 | #define bfin_read_DMA21_PERIPHERAL_MAP() bfin_read16(DMA21_PERIPHERAL_MAP) | 1525 | #define bfin_read_DMA21_PERIPHERAL_MAP() bfin_read16(DMA21_PERIPHERAL_MAP) |
@@ -1536,23 +1532,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1536 | /* DMA Channel 22 Registers */ | 1532 | /* DMA Channel 22 Registers */ |
1537 | 1533 | ||
1538 | #define bfin_read_DMA22_NEXT_DESC_PTR() bfin_read32(DMA22_NEXT_DESC_PTR) | 1534 | #define bfin_read_DMA22_NEXT_DESC_PTR() bfin_read32(DMA22_NEXT_DESC_PTR) |
1539 | #define bfin_write_DMA22_NEXT_DESC_PTR(val) bfin_write32(DMA22_NEXT_DESC_PTR) | 1535 | #define bfin_write_DMA22_NEXT_DESC_PTR(val) bfin_write32(DMA22_NEXT_DESC_PTR, val) |
1540 | #define bfin_read_DMA22_START_ADDR() bfin_read32(DMA22_START_ADDR) | 1536 | #define bfin_read_DMA22_START_ADDR() bfin_read32(DMA22_START_ADDR) |
1541 | #define bfin_write_DMA22_START_ADDR(val) bfin_write32(DMA22_START_ADDR) | 1537 | #define bfin_write_DMA22_START_ADDR(val) bfin_write32(DMA22_START_ADDR, val) |
1542 | #define bfin_read_DMA22_CONFIG() bfin_read16(DMA22_CONFIG) | 1538 | #define bfin_read_DMA22_CONFIG() bfin_read16(DMA22_CONFIG) |
1543 | #define bfin_write_DMA22_CONFIG(val) bfin_write16(DMA22_CONFIG, val) | 1539 | #define bfin_write_DMA22_CONFIG(val) bfin_write16(DMA22_CONFIG, val) |
1544 | #define bfin_read_DMA22_X_COUNT() bfin_read16(DMA22_X_COUNT) | 1540 | #define bfin_read_DMA22_X_COUNT() bfin_read16(DMA22_X_COUNT) |
1545 | #define bfin_write_DMA22_X_COUNT(val) bfin_write16(DMA22_X_COUNT, val) | 1541 | #define bfin_write_DMA22_X_COUNT(val) bfin_write16(DMA22_X_COUNT, val) |
1546 | #define bfin_read_DMA22_X_MODIFY() bfin_read16(DMA22_X_MODIFY) | 1542 | #define bfin_read_DMA22_X_MODIFY() bfin_read16(DMA22_X_MODIFY) |
1547 | #define bfin_write_DMA22_X_MODIFY(val) bfin_write16(DMA22_X_MODIFY) | 1543 | #define bfin_write_DMA22_X_MODIFY(val) bfin_write16(DMA22_X_MODIFY, val) |
1548 | #define bfin_read_DMA22_Y_COUNT() bfin_read16(DMA22_Y_COUNT) | 1544 | #define bfin_read_DMA22_Y_COUNT() bfin_read16(DMA22_Y_COUNT) |
1549 | #define bfin_write_DMA22_Y_COUNT(val) bfin_write16(DMA22_Y_COUNT, val) | 1545 | #define bfin_write_DMA22_Y_COUNT(val) bfin_write16(DMA22_Y_COUNT, val) |
1550 | #define bfin_read_DMA22_Y_MODIFY() bfin_read16(DMA22_Y_MODIFY) | 1546 | #define bfin_read_DMA22_Y_MODIFY() bfin_read16(DMA22_Y_MODIFY) |
1551 | #define bfin_write_DMA22_Y_MODIFY(val) bfin_write16(DMA22_Y_MODIFY) | 1547 | #define bfin_write_DMA22_Y_MODIFY(val) bfin_write16(DMA22_Y_MODIFY, val) |
1552 | #define bfin_read_DMA22_CURR_DESC_PTR() bfin_read32(DMA22_CURR_DESC_PTR) | 1548 | #define bfin_read_DMA22_CURR_DESC_PTR() bfin_read32(DMA22_CURR_DESC_PTR) |
1553 | #define bfin_write_DMA22_CURR_DESC_PTR(val) bfin_write32(DMA22_CURR_DESC_PTR) | 1549 | #define bfin_write_DMA22_CURR_DESC_PTR(val) bfin_write32(DMA22_CURR_DESC_PTR, val) |
1554 | #define bfin_read_DMA22_CURR_ADDR() bfin_read32(DMA22_CURR_ADDR) | 1550 | #define bfin_read_DMA22_CURR_ADDR() bfin_read32(DMA22_CURR_ADDR) |
1555 | #define bfin_write_DMA22_CURR_ADDR(val) bfin_write32(DMA22_CURR_ADDR) | 1551 | #define bfin_write_DMA22_CURR_ADDR(val) bfin_write32(DMA22_CURR_ADDR, val) |
1556 | #define bfin_read_DMA22_IRQ_STATUS() bfin_read16(DMA22_IRQ_STATUS) | 1552 | #define bfin_read_DMA22_IRQ_STATUS() bfin_read16(DMA22_IRQ_STATUS) |
1557 | #define bfin_write_DMA22_IRQ_STATUS(val) bfin_write16(DMA22_IRQ_STATUS, val) | 1553 | #define bfin_write_DMA22_IRQ_STATUS(val) bfin_write16(DMA22_IRQ_STATUS, val) |
1558 | #define bfin_read_DMA22_PERIPHERAL_MAP() bfin_read16(DMA22_PERIPHERAL_MAP) | 1554 | #define bfin_read_DMA22_PERIPHERAL_MAP() bfin_read16(DMA22_PERIPHERAL_MAP) |
@@ -1565,23 +1561,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1565 | /* DMA Channel 23 Registers */ | 1561 | /* DMA Channel 23 Registers */ |
1566 | 1562 | ||
1567 | #define bfin_read_DMA23_NEXT_DESC_PTR() bfin_read32(DMA23_NEXT_DESC_PTR) | 1563 | #define bfin_read_DMA23_NEXT_DESC_PTR() bfin_read32(DMA23_NEXT_DESC_PTR) |
1568 | #define bfin_write_DMA23_NEXT_DESC_PTR(val) bfin_write32(DMA23_NEXT_DESC_PTR) | 1564 | #define bfin_write_DMA23_NEXT_DESC_PTR(val) bfin_write32(DMA23_NEXT_DESC_PTR, val) |
1569 | #define bfin_read_DMA23_START_ADDR() bfin_read32(DMA23_START_ADDR) | 1565 | #define bfin_read_DMA23_START_ADDR() bfin_read32(DMA23_START_ADDR) |
1570 | #define bfin_write_DMA23_START_ADDR(val) bfin_write32(DMA23_START_ADDR) | 1566 | #define bfin_write_DMA23_START_ADDR(val) bfin_write32(DMA23_START_ADDR, val) |
1571 | #define bfin_read_DMA23_CONFIG() bfin_read16(DMA23_CONFIG) | 1567 | #define bfin_read_DMA23_CONFIG() bfin_read16(DMA23_CONFIG) |
1572 | #define bfin_write_DMA23_CONFIG(val) bfin_write16(DMA23_CONFIG, val) | 1568 | #define bfin_write_DMA23_CONFIG(val) bfin_write16(DMA23_CONFIG, val) |
1573 | #define bfin_read_DMA23_X_COUNT() bfin_read16(DMA23_X_COUNT) | 1569 | #define bfin_read_DMA23_X_COUNT() bfin_read16(DMA23_X_COUNT) |
1574 | #define bfin_write_DMA23_X_COUNT(val) bfin_write16(DMA23_X_COUNT, val) | 1570 | #define bfin_write_DMA23_X_COUNT(val) bfin_write16(DMA23_X_COUNT, val) |
1575 | #define bfin_read_DMA23_X_MODIFY() bfin_read16(DMA23_X_MODIFY) | 1571 | #define bfin_read_DMA23_X_MODIFY() bfin_read16(DMA23_X_MODIFY) |
1576 | #define bfin_write_DMA23_X_MODIFY(val) bfin_write16(DMA23_X_MODIFY) | 1572 | #define bfin_write_DMA23_X_MODIFY(val) bfin_write16(DMA23_X_MODIFY, val) |
1577 | #define bfin_read_DMA23_Y_COUNT() bfin_read16(DMA23_Y_COUNT) | 1573 | #define bfin_read_DMA23_Y_COUNT() bfin_read16(DMA23_Y_COUNT) |
1578 | #define bfin_write_DMA23_Y_COUNT(val) bfin_write16(DMA23_Y_COUNT, val) | 1574 | #define bfin_write_DMA23_Y_COUNT(val) bfin_write16(DMA23_Y_COUNT, val) |
1579 | #define bfin_read_DMA23_Y_MODIFY() bfin_read16(DMA23_Y_MODIFY) | 1575 | #define bfin_read_DMA23_Y_MODIFY() bfin_read16(DMA23_Y_MODIFY) |
1580 | #define bfin_write_DMA23_Y_MODIFY(val) bfin_write16(DMA23_Y_MODIFY) | 1576 | #define bfin_write_DMA23_Y_MODIFY(val) bfin_write16(DMA23_Y_MODIFY, val) |
1581 | #define bfin_read_DMA23_CURR_DESC_PTR() bfin_read32(DMA23_CURR_DESC_PTR) | 1577 | #define bfin_read_DMA23_CURR_DESC_PTR() bfin_read32(DMA23_CURR_DESC_PTR) |
1582 | #define bfin_write_DMA23_CURR_DESC_PTR(val) bfin_write32(DMA23_CURR_DESC_PTR) | 1578 | #define bfin_write_DMA23_CURR_DESC_PTR(val) bfin_write32(DMA23_CURR_DESC_PTR, val) |
1583 | #define bfin_read_DMA23_CURR_ADDR() bfin_read32(DMA23_CURR_ADDR) | 1579 | #define bfin_read_DMA23_CURR_ADDR() bfin_read32(DMA23_CURR_ADDR) |
1584 | #define bfin_write_DMA23_CURR_ADDR(val) bfin_write32(DMA23_CURR_ADDR) | 1580 | #define bfin_write_DMA23_CURR_ADDR(val) bfin_write32(DMA23_CURR_ADDR, val) |
1585 | #define bfin_read_DMA23_IRQ_STATUS() bfin_read16(DMA23_IRQ_STATUS) | 1581 | #define bfin_read_DMA23_IRQ_STATUS() bfin_read16(DMA23_IRQ_STATUS) |
1586 | #define bfin_write_DMA23_IRQ_STATUS(val) bfin_write16(DMA23_IRQ_STATUS, val) | 1582 | #define bfin_write_DMA23_IRQ_STATUS(val) bfin_write16(DMA23_IRQ_STATUS, val) |
1587 | #define bfin_read_DMA23_PERIPHERAL_MAP() bfin_read16(DMA23_PERIPHERAL_MAP) | 1583 | #define bfin_read_DMA23_PERIPHERAL_MAP() bfin_read16(DMA23_PERIPHERAL_MAP) |
@@ -1594,23 +1590,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1594 | /* MDMA Stream 2 Registers */ | 1590 | /* MDMA Stream 2 Registers */ |
1595 | 1591 | ||
1596 | #define bfin_read_MDMA_D2_NEXT_DESC_PTR() bfin_read32(MDMA_D2_NEXT_DESC_PTR) | 1592 | #define bfin_read_MDMA_D2_NEXT_DESC_PTR() bfin_read32(MDMA_D2_NEXT_DESC_PTR) |
1597 | #define bfin_write_MDMA_D2_NEXT_DESC_PTR(val) bfin_write32(MDMA_D2_NEXT_DESC_PTR) | 1593 | #define bfin_write_MDMA_D2_NEXT_DESC_PTR(val) bfin_write32(MDMA_D2_NEXT_DESC_PTR, val) |
1598 | #define bfin_read_MDMA_D2_START_ADDR() bfin_read32(MDMA_D2_START_ADDR) | 1594 | #define bfin_read_MDMA_D2_START_ADDR() bfin_read32(MDMA_D2_START_ADDR) |
1599 | #define bfin_write_MDMA_D2_START_ADDR(val) bfin_write32(MDMA_D2_START_ADDR) | 1595 | #define bfin_write_MDMA_D2_START_ADDR(val) bfin_write32(MDMA_D2_START_ADDR, val) |
1600 | #define bfin_read_MDMA_D2_CONFIG() bfin_read16(MDMA_D2_CONFIG) | 1596 | #define bfin_read_MDMA_D2_CONFIG() bfin_read16(MDMA_D2_CONFIG) |
1601 | #define bfin_write_MDMA_D2_CONFIG(val) bfin_write16(MDMA_D2_CONFIG, val) | 1597 | #define bfin_write_MDMA_D2_CONFIG(val) bfin_write16(MDMA_D2_CONFIG, val) |
1602 | #define bfin_read_MDMA_D2_X_COUNT() bfin_read16(MDMA_D2_X_COUNT) | 1598 | #define bfin_read_MDMA_D2_X_COUNT() bfin_read16(MDMA_D2_X_COUNT) |
1603 | #define bfin_write_MDMA_D2_X_COUNT(val) bfin_write16(MDMA_D2_X_COUNT, val) | 1599 | #define bfin_write_MDMA_D2_X_COUNT(val) bfin_write16(MDMA_D2_X_COUNT, val) |
1604 | #define bfin_read_MDMA_D2_X_MODIFY() bfin_read16(MDMA_D2_X_MODIFY) | 1600 | #define bfin_read_MDMA_D2_X_MODIFY() bfin_read16(MDMA_D2_X_MODIFY) |
1605 | #define bfin_write_MDMA_D2_X_MODIFY(val) bfin_write16(MDMA_D2_X_MODIFY) | 1601 | #define bfin_write_MDMA_D2_X_MODIFY(val) bfin_write16(MDMA_D2_X_MODIFY, val) |
1606 | #define bfin_read_MDMA_D2_Y_COUNT() bfin_read16(MDMA_D2_Y_COUNT) | 1602 | #define bfin_read_MDMA_D2_Y_COUNT() bfin_read16(MDMA_D2_Y_COUNT) |
1607 | #define bfin_write_MDMA_D2_Y_COUNT(val) bfin_write16(MDMA_D2_Y_COUNT, val) | 1603 | #define bfin_write_MDMA_D2_Y_COUNT(val) bfin_write16(MDMA_D2_Y_COUNT, val) |
1608 | #define bfin_read_MDMA_D2_Y_MODIFY() bfin_read16(MDMA_D2_Y_MODIFY) | 1604 | #define bfin_read_MDMA_D2_Y_MODIFY() bfin_read16(MDMA_D2_Y_MODIFY) |
1609 | #define bfin_write_MDMA_D2_Y_MODIFY(val) bfin_write16(MDMA_D2_Y_MODIFY) | 1605 | #define bfin_write_MDMA_D2_Y_MODIFY(val) bfin_write16(MDMA_D2_Y_MODIFY, val) |
1610 | #define bfin_read_MDMA_D2_CURR_DESC_PTR() bfin_read32(MDMA_D2_CURR_DESC_PTR) | 1606 | #define bfin_read_MDMA_D2_CURR_DESC_PTR() bfin_read32(MDMA_D2_CURR_DESC_PTR) |
1611 | #define bfin_write_MDMA_D2_CURR_DESC_PTR(val) bfin_write32(MDMA_D2_CURR_DESC_PTR) | 1607 | #define bfin_write_MDMA_D2_CURR_DESC_PTR(val) bfin_write32(MDMA_D2_CURR_DESC_PTR, val) |
1612 | #define bfin_read_MDMA_D2_CURR_ADDR() bfin_read32(MDMA_D2_CURR_ADDR) | 1608 | #define bfin_read_MDMA_D2_CURR_ADDR() bfin_read32(MDMA_D2_CURR_ADDR) |
1613 | #define bfin_write_MDMA_D2_CURR_ADDR(val) bfin_write32(MDMA_D2_CURR_ADDR) | 1609 | #define bfin_write_MDMA_D2_CURR_ADDR(val) bfin_write32(MDMA_D2_CURR_ADDR, val) |
1614 | #define bfin_read_MDMA_D2_IRQ_STATUS() bfin_read16(MDMA_D2_IRQ_STATUS) | 1610 | #define bfin_read_MDMA_D2_IRQ_STATUS() bfin_read16(MDMA_D2_IRQ_STATUS) |
1615 | #define bfin_write_MDMA_D2_IRQ_STATUS(val) bfin_write16(MDMA_D2_IRQ_STATUS, val) | 1611 | #define bfin_write_MDMA_D2_IRQ_STATUS(val) bfin_write16(MDMA_D2_IRQ_STATUS, val) |
1616 | #define bfin_read_MDMA_D2_PERIPHERAL_MAP() bfin_read16(MDMA_D2_PERIPHERAL_MAP) | 1612 | #define bfin_read_MDMA_D2_PERIPHERAL_MAP() bfin_read16(MDMA_D2_PERIPHERAL_MAP) |
@@ -1620,23 +1616,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1620 | #define bfin_read_MDMA_D2_CURR_Y_COUNT() bfin_read16(MDMA_D2_CURR_Y_COUNT) | 1616 | #define bfin_read_MDMA_D2_CURR_Y_COUNT() bfin_read16(MDMA_D2_CURR_Y_COUNT) |
1621 | #define bfin_write_MDMA_D2_CURR_Y_COUNT(val) bfin_write16(MDMA_D2_CURR_Y_COUNT, val) | 1617 | #define bfin_write_MDMA_D2_CURR_Y_COUNT(val) bfin_write16(MDMA_D2_CURR_Y_COUNT, val) |
1622 | #define bfin_read_MDMA_S2_NEXT_DESC_PTR() bfin_read32(MDMA_S2_NEXT_DESC_PTR) | 1618 | #define bfin_read_MDMA_S2_NEXT_DESC_PTR() bfin_read32(MDMA_S2_NEXT_DESC_PTR) |
1623 | #define bfin_write_MDMA_S2_NEXT_DESC_PTR(val) bfin_write32(MDMA_S2_NEXT_DESC_PTR) | 1619 | #define bfin_write_MDMA_S2_NEXT_DESC_PTR(val) bfin_write32(MDMA_S2_NEXT_DESC_PTR, val) |
1624 | #define bfin_read_MDMA_S2_START_ADDR() bfin_read32(MDMA_S2_START_ADDR) | 1620 | #define bfin_read_MDMA_S2_START_ADDR() bfin_read32(MDMA_S2_START_ADDR) |
1625 | #define bfin_write_MDMA_S2_START_ADDR(val) bfin_write32(MDMA_S2_START_ADDR) | 1621 | #define bfin_write_MDMA_S2_START_ADDR(val) bfin_write32(MDMA_S2_START_ADDR, val) |
1626 | #define bfin_read_MDMA_S2_CONFIG() bfin_read16(MDMA_S2_CONFIG) | 1622 | #define bfin_read_MDMA_S2_CONFIG() bfin_read16(MDMA_S2_CONFIG) |
1627 | #define bfin_write_MDMA_S2_CONFIG(val) bfin_write16(MDMA_S2_CONFIG, val) | 1623 | #define bfin_write_MDMA_S2_CONFIG(val) bfin_write16(MDMA_S2_CONFIG, val) |
1628 | #define bfin_read_MDMA_S2_X_COUNT() bfin_read16(MDMA_S2_X_COUNT) | 1624 | #define bfin_read_MDMA_S2_X_COUNT() bfin_read16(MDMA_S2_X_COUNT) |
1629 | #define bfin_write_MDMA_S2_X_COUNT(val) bfin_write16(MDMA_S2_X_COUNT, val) | 1625 | #define bfin_write_MDMA_S2_X_COUNT(val) bfin_write16(MDMA_S2_X_COUNT, val) |
1630 | #define bfin_read_MDMA_S2_X_MODIFY() bfin_read16(MDMA_S2_X_MODIFY) | 1626 | #define bfin_read_MDMA_S2_X_MODIFY() bfin_read16(MDMA_S2_X_MODIFY) |
1631 | #define bfin_write_MDMA_S2_X_MODIFY(val) bfin_write16(MDMA_S2_X_MODIFY) | 1627 | #define bfin_write_MDMA_S2_X_MODIFY(val) bfin_write16(MDMA_S2_X_MODIFY, val) |
1632 | #define bfin_read_MDMA_S2_Y_COUNT() bfin_read16(MDMA_S2_Y_COUNT) | 1628 | #define bfin_read_MDMA_S2_Y_COUNT() bfin_read16(MDMA_S2_Y_COUNT) |
1633 | #define bfin_write_MDMA_S2_Y_COUNT(val) bfin_write16(MDMA_S2_Y_COUNT, val) | 1629 | #define bfin_write_MDMA_S2_Y_COUNT(val) bfin_write16(MDMA_S2_Y_COUNT, val) |
1634 | #define bfin_read_MDMA_S2_Y_MODIFY() bfin_read16(MDMA_S2_Y_MODIFY) | 1630 | #define bfin_read_MDMA_S2_Y_MODIFY() bfin_read16(MDMA_S2_Y_MODIFY) |
1635 | #define bfin_write_MDMA_S2_Y_MODIFY(val) bfin_write16(MDMA_S2_Y_MODIFY) | 1631 | #define bfin_write_MDMA_S2_Y_MODIFY(val) bfin_write16(MDMA_S2_Y_MODIFY, val) |
1636 | #define bfin_read_MDMA_S2_CURR_DESC_PTR() bfin_read32(MDMA_S2_CURR_DESC_PTR) | 1632 | #define bfin_read_MDMA_S2_CURR_DESC_PTR() bfin_read32(MDMA_S2_CURR_DESC_PTR) |
1637 | #define bfin_write_MDMA_S2_CURR_DESC_PTR(val) bfin_write32(MDMA_S2_CURR_DESC_PTR) | 1633 | #define bfin_write_MDMA_S2_CURR_DESC_PTR(val) bfin_write32(MDMA_S2_CURR_DESC_PTR, val) |
1638 | #define bfin_read_MDMA_S2_CURR_ADDR() bfin_read32(MDMA_S2_CURR_ADDR) | 1634 | #define bfin_read_MDMA_S2_CURR_ADDR() bfin_read32(MDMA_S2_CURR_ADDR) |
1639 | #define bfin_write_MDMA_S2_CURR_ADDR(val) bfin_write32(MDMA_S2_CURR_ADDR) | 1635 | #define bfin_write_MDMA_S2_CURR_ADDR(val) bfin_write32(MDMA_S2_CURR_ADDR, val) |
1640 | #define bfin_read_MDMA_S2_IRQ_STATUS() bfin_read16(MDMA_S2_IRQ_STATUS) | 1636 | #define bfin_read_MDMA_S2_IRQ_STATUS() bfin_read16(MDMA_S2_IRQ_STATUS) |
1641 | #define bfin_write_MDMA_S2_IRQ_STATUS(val) bfin_write16(MDMA_S2_IRQ_STATUS, val) | 1637 | #define bfin_write_MDMA_S2_IRQ_STATUS(val) bfin_write16(MDMA_S2_IRQ_STATUS, val) |
1642 | #define bfin_read_MDMA_S2_PERIPHERAL_MAP() bfin_read16(MDMA_S2_PERIPHERAL_MAP) | 1638 | #define bfin_read_MDMA_S2_PERIPHERAL_MAP() bfin_read16(MDMA_S2_PERIPHERAL_MAP) |
@@ -1649,23 +1645,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1649 | /* MDMA Stream 3 Registers */ | 1645 | /* MDMA Stream 3 Registers */ |
1650 | 1646 | ||
1651 | #define bfin_read_MDMA_D3_NEXT_DESC_PTR() bfin_read32(MDMA_D3_NEXT_DESC_PTR) | 1647 | #define bfin_read_MDMA_D3_NEXT_DESC_PTR() bfin_read32(MDMA_D3_NEXT_DESC_PTR) |
1652 | #define bfin_write_MDMA_D3_NEXT_DESC_PTR(val) bfin_write32(MDMA_D3_NEXT_DESC_PTR) | 1648 | #define bfin_write_MDMA_D3_NEXT_DESC_PTR(val) bfin_write32(MDMA_D3_NEXT_DESC_PTR, val) |
1653 | #define bfin_read_MDMA_D3_START_ADDR() bfin_read32(MDMA_D3_START_ADDR) | 1649 | #define bfin_read_MDMA_D3_START_ADDR() bfin_read32(MDMA_D3_START_ADDR) |
1654 | #define bfin_write_MDMA_D3_START_ADDR(val) bfin_write32(MDMA_D3_START_ADDR) | 1650 | #define bfin_write_MDMA_D3_START_ADDR(val) bfin_write32(MDMA_D3_START_ADDR, val) |
1655 | #define bfin_read_MDMA_D3_CONFIG() bfin_read16(MDMA_D3_CONFIG) | 1651 | #define bfin_read_MDMA_D3_CONFIG() bfin_read16(MDMA_D3_CONFIG) |
1656 | #define bfin_write_MDMA_D3_CONFIG(val) bfin_write16(MDMA_D3_CONFIG, val) | 1652 | #define bfin_write_MDMA_D3_CONFIG(val) bfin_write16(MDMA_D3_CONFIG, val) |
1657 | #define bfin_read_MDMA_D3_X_COUNT() bfin_read16(MDMA_D3_X_COUNT) | 1653 | #define bfin_read_MDMA_D3_X_COUNT() bfin_read16(MDMA_D3_X_COUNT) |
1658 | #define bfin_write_MDMA_D3_X_COUNT(val) bfin_write16(MDMA_D3_X_COUNT, val) | 1654 | #define bfin_write_MDMA_D3_X_COUNT(val) bfin_write16(MDMA_D3_X_COUNT, val) |
1659 | #define bfin_read_MDMA_D3_X_MODIFY() bfin_read16(MDMA_D3_X_MODIFY) | 1655 | #define bfin_read_MDMA_D3_X_MODIFY() bfin_read16(MDMA_D3_X_MODIFY) |
1660 | #define bfin_write_MDMA_D3_X_MODIFY(val) bfin_write16(MDMA_D3_X_MODIFY) | 1656 | #define bfin_write_MDMA_D3_X_MODIFY(val) bfin_write16(MDMA_D3_X_MODIFY, val) |
1661 | #define bfin_read_MDMA_D3_Y_COUNT() bfin_read16(MDMA_D3_Y_COUNT) | 1657 | #define bfin_read_MDMA_D3_Y_COUNT() bfin_read16(MDMA_D3_Y_COUNT) |
1662 | #define bfin_write_MDMA_D3_Y_COUNT(val) bfin_write16(MDMA_D3_Y_COUNT, val) | 1658 | #define bfin_write_MDMA_D3_Y_COUNT(val) bfin_write16(MDMA_D3_Y_COUNT, val) |
1663 | #define bfin_read_MDMA_D3_Y_MODIFY() bfin_read16(MDMA_D3_Y_MODIFY) | 1659 | #define bfin_read_MDMA_D3_Y_MODIFY() bfin_read16(MDMA_D3_Y_MODIFY) |
1664 | #define bfin_write_MDMA_D3_Y_MODIFY(val) bfin_write16(MDMA_D3_Y_MODIFY) | 1660 | #define bfin_write_MDMA_D3_Y_MODIFY(val) bfin_write16(MDMA_D3_Y_MODIFY, val) |
1665 | #define bfin_read_MDMA_D3_CURR_DESC_PTR() bfin_read32(MDMA_D3_CURR_DESC_PTR) | 1661 | #define bfin_read_MDMA_D3_CURR_DESC_PTR() bfin_read32(MDMA_D3_CURR_DESC_PTR) |
1666 | #define bfin_write_MDMA_D3_CURR_DESC_PTR(val) bfin_write32(MDMA_D3_CURR_DESC_PTR) | 1662 | #define bfin_write_MDMA_D3_CURR_DESC_PTR(val) bfin_write32(MDMA_D3_CURR_DESC_PTR, val) |
1667 | #define bfin_read_MDMA_D3_CURR_ADDR() bfin_read32(MDMA_D3_CURR_ADDR) | 1663 | #define bfin_read_MDMA_D3_CURR_ADDR() bfin_read32(MDMA_D3_CURR_ADDR) |
1668 | #define bfin_write_MDMA_D3_CURR_ADDR(val) bfin_write32(MDMA_D3_CURR_ADDR) | 1664 | #define bfin_write_MDMA_D3_CURR_ADDR(val) bfin_write32(MDMA_D3_CURR_ADDR, val) |
1669 | #define bfin_read_MDMA_D3_IRQ_STATUS() bfin_read16(MDMA_D3_IRQ_STATUS) | 1665 | #define bfin_read_MDMA_D3_IRQ_STATUS() bfin_read16(MDMA_D3_IRQ_STATUS) |
1670 | #define bfin_write_MDMA_D3_IRQ_STATUS(val) bfin_write16(MDMA_D3_IRQ_STATUS, val) | 1666 | #define bfin_write_MDMA_D3_IRQ_STATUS(val) bfin_write16(MDMA_D3_IRQ_STATUS, val) |
1671 | #define bfin_read_MDMA_D3_PERIPHERAL_MAP() bfin_read16(MDMA_D3_PERIPHERAL_MAP) | 1667 | #define bfin_read_MDMA_D3_PERIPHERAL_MAP() bfin_read16(MDMA_D3_PERIPHERAL_MAP) |
@@ -1675,23 +1671,23 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
1675 | #define bfin_read_MDMA_D3_CURR_Y_COUNT() bfin_read16(MDMA_D3_CURR_Y_COUNT) | 1671 | #define bfin_read_MDMA_D3_CURR_Y_COUNT() bfin_read16(MDMA_D3_CURR_Y_COUNT) |
1676 | #define bfin_write_MDMA_D3_CURR_Y_COUNT(val) bfin_write16(MDMA_D3_CURR_Y_COUNT, val) | 1672 | #define bfin_write_MDMA_D3_CURR_Y_COUNT(val) bfin_write16(MDMA_D3_CURR_Y_COUNT, val) |
1677 | #define bfin_read_MDMA_S3_NEXT_DESC_PTR() bfin_read32(MDMA_S3_NEXT_DESC_PTR) | 1673 | #define bfin_read_MDMA_S3_NEXT_DESC_PTR() bfin_read32(MDMA_S3_NEXT_DESC_PTR) |
1678 | #define bfin_write_MDMA_S3_NEXT_DESC_PTR(val) bfin_write32(MDMA_S3_NEXT_DESC_PTR) | 1674 | #define bfin_write_MDMA_S3_NEXT_DESC_PTR(val) bfin_write32(MDMA_S3_NEXT_DESC_PTR, val) |
1679 | #define bfin_read_MDMA_S3_START_ADDR() bfin_read32(MDMA_S3_START_ADDR) | 1675 | #define bfin_read_MDMA_S3_START_ADDR() bfin_read32(MDMA_S3_START_ADDR) |
1680 | #define bfin_write_MDMA_S3_START_ADDR(val) bfin_write32(MDMA_S3_START_ADDR) | 1676 | #define bfin_write_MDMA_S3_START_ADDR(val) bfin_write32(MDMA_S3_START_ADDR, val) |
1681 | #define bfin_read_MDMA_S3_CONFIG() bfin_read16(MDMA_S3_CONFIG) | 1677 | #define bfin_read_MDMA_S3_CONFIG() bfin_read16(MDMA_S3_CONFIG) |
1682 | #define bfin_write_MDMA_S3_CONFIG(val) bfin_write16(MDMA_S3_CONFIG, val) | 1678 | #define bfin_write_MDMA_S3_CONFIG(val) bfin_write16(MDMA_S3_CONFIG, val) |
1683 | #define bfin_read_MDMA_S3_X_COUNT() bfin_read16(MDMA_S3_X_COUNT) | 1679 | #define bfin_read_MDMA_S3_X_COUNT() bfin_read16(MDMA_S3_X_COUNT) |
1684 | #define bfin_write_MDMA_S3_X_COUNT(val) bfin_write16(MDMA_S3_X_COUNT, val) | 1680 | #define bfin_write_MDMA_S3_X_COUNT(val) bfin_write16(MDMA_S3_X_COUNT, val) |
1685 | #define bfin_read_MDMA_S3_X_MODIFY() bfin_read16(MDMA_S3_X_MODIFY) | 1681 | #define bfin_read_MDMA_S3_X_MODIFY() bfin_read16(MDMA_S3_X_MODIFY) |
1686 | #define bfin_write_MDMA_S3_X_MODIFY(val) bfin_write16(MDMA_S3_X_MODIFY) | 1682 | #define bfin_write_MDMA_S3_X_MODIFY(val) bfin_write16(MDMA_S3_X_MODIFY, val) |
1687 | #define bfin_read_MDMA_S3_Y_COUNT() bfin_read16(MDMA_S3_Y_COUNT) | 1683 | #define bfin_read_MDMA_S3_Y_COUNT() bfin_read16(MDMA_S3_Y_COUNT) |
1688 | #define bfin_write_MDMA_S3_Y_COUNT(val) bfin_write16(MDMA_S3_Y_COUNT, val) | 1684 | #define bfin_write_MDMA_S3_Y_COUNT(val) bfin_write16(MDMA_S3_Y_COUNT, val) |
1689 | #define bfin_read_MDMA_S3_Y_MODIFY() bfin_read16(MDMA_S3_Y_MODIFY) | 1685 | #define bfin_read_MDMA_S3_Y_MODIFY() bfin_read16(MDMA_S3_Y_MODIFY) |
1690 | #define bfin_write_MDMA_S3_Y_MODIFY(val) bfin_write16(MDMA_S3_Y_MODIFY) | 1686 | #define bfin_write_MDMA_S3_Y_MODIFY(val) bfin_write16(MDMA_S3_Y_MODIFY, val) |
1691 | #define bfin_read_MDMA_S3_CURR_DESC_PTR() bfin_read32(MDMA_S3_CURR_DESC_PTR) | 1687 | #define bfin_read_MDMA_S3_CURR_DESC_PTR() bfin_read32(MDMA_S3_CURR_DESC_PTR) |
1692 | #define bfin_write_MDMA_S3_CURR_DESC_PTR(val) bfin_write32(MDMA_S3_CURR_DESC_PTR) | 1688 | #define bfin_write_MDMA_S3_CURR_DESC_PTR(val) bfin_write32(MDMA_S3_CURR_DESC_PTR, val) |
1693 | #define bfin_read_MDMA_S3_CURR_ADDR() bfin_read32(MDMA_S3_CURR_ADDR) | 1689 | #define bfin_read_MDMA_S3_CURR_ADDR() bfin_read32(MDMA_S3_CURR_ADDR) |
1694 | #define bfin_write_MDMA_S3_CURR_ADDR(val) bfin_write32(MDMA_S3_CURR_ADDR) | 1690 | #define bfin_write_MDMA_S3_CURR_ADDR(val) bfin_write32(MDMA_S3_CURR_ADDR, val) |
1695 | #define bfin_read_MDMA_S3_IRQ_STATUS() bfin_read16(MDMA_S3_IRQ_STATUS) | 1691 | #define bfin_read_MDMA_S3_IRQ_STATUS() bfin_read16(MDMA_S3_IRQ_STATUS) |
1696 | #define bfin_write_MDMA_S3_IRQ_STATUS(val) bfin_write16(MDMA_S3_IRQ_STATUS, val) | 1692 | #define bfin_write_MDMA_S3_IRQ_STATUS(val) bfin_write16(MDMA_S3_IRQ_STATUS, val) |
1697 | #define bfin_read_MDMA_S3_PERIPHERAL_MAP() bfin_read16(MDMA_S3_PERIPHERAL_MAP) | 1693 | #define bfin_read_MDMA_S3_PERIPHERAL_MAP() bfin_read16(MDMA_S3_PERIPHERAL_MAP) |
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h index 46ff31f20ae5..36a2ef7e7849 100644 --- a/include/asm-blackfin/mach-bf548/dma.h +++ b/include/asm-blackfin/mach-bf548/dma.h | |||
@@ -73,6 +73,4 @@ | |||
73 | 73 | ||
74 | #define MAX_BLACKFIN_DMA_CHANNEL 32 | 74 | #define MAX_BLACKFIN_DMA_CHANNEL 32 |
75 | 75 | ||
76 | extern int channel2irq(unsigned int channel); | ||
77 | extern struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL]; | ||
78 | #endif | 76 | #endif |
diff --git a/include/asm-blackfin/mach-bf548/mem_init.h b/include/asm-blackfin/mach-bf548/mem_init.h index befc2903d5a5..ab0b863eee66 100644 --- a/include/asm-blackfin/mach-bf548/mem_init.h +++ b/include/asm-blackfin/mach-bf548/mem_init.h | |||
@@ -29,16 +29,19 @@ | |||
29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
30 | */ | 30 | */ |
31 | #define MIN_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000 + 1) | 31 | #define MIN_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000 + 1) |
32 | #define MAX_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000) | ||
33 | #define DDR_CLK_HZ(x) (1000*1000*1000/x) | ||
32 | 34 | ||
33 | #if (CONFIG_MEM_MT46V32M16_6T) | 35 | #if (CONFIG_MEM_MT46V32M16_6T) |
34 | #define DDR_SIZE DEVSZ_512 | 36 | #define DDR_SIZE DEVSZ_512 |
35 | #define DDR_WIDTH DEVWD_16 | 37 | #define DDR_WIDTH DEVWD_16 |
38 | #define DDR_MAX_tCK 13 | ||
36 | 39 | ||
37 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(60)) | 40 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(60)) |
38 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(42)) | 41 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(42)) |
39 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | 42 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) |
40 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(72)) | 43 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(72)) |
41 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | 44 | #define DDR_tREFI DDR_TREFI(MAX_DDR_SCLK(7800)) |
42 | 45 | ||
43 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | 46 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) |
44 | #define DDR_tWTR DDR_TWTR(1) | 47 | #define DDR_tWTR DDR_TWTR(1) |
@@ -49,12 +52,13 @@ | |||
49 | #if (CONFIG_MEM_MT46V32M16_5B) | 52 | #if (CONFIG_MEM_MT46V32M16_5B) |
50 | #define DDR_SIZE DEVSZ_512 | 53 | #define DDR_SIZE DEVSZ_512 |
51 | #define DDR_WIDTH DEVWD_16 | 54 | #define DDR_WIDTH DEVWD_16 |
55 | #define DDR_MAX_tCK 13 | ||
52 | 56 | ||
53 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(55)) | 57 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(55)) |
54 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(40)) | 58 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(40)) |
55 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | 59 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) |
56 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(70)) | 60 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(70)) |
57 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | 61 | #define DDR_tREFI DDR_TREFI(MAX_DDR_SCLK(7800)) |
58 | 62 | ||
59 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | 63 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) |
60 | #define DDR_tWTR DDR_TWTR(2) | 64 | #define DDR_tWTR DDR_TWTR(2) |
@@ -65,6 +69,7 @@ | |||
65 | #if (CONFIG_MEM_GENERIC_BOARD) | 69 | #if (CONFIG_MEM_GENERIC_BOARD) |
66 | #define DDR_SIZE DEVSZ_512 | 70 | #define DDR_SIZE DEVSZ_512 |
67 | #define DDR_WIDTH DEVWD_16 | 71 | #define DDR_WIDTH DEVWD_16 |
72 | #define DDR_MAX_tCK 13 | ||
68 | 73 | ||
69 | #define DDR_tRCD DDR_TRCD(3) | 74 | #define DDR_tRCD DDR_TRCD(3) |
70 | #define DDR_tWTR DDR_TWTR(2) | 75 | #define DDR_tWTR DDR_TWTR(2) |
@@ -77,14 +82,15 @@ | |||
77 | #define DDR_tREFI DDR_TREFI(1288) | 82 | #define DDR_tREFI DDR_TREFI(1288) |
78 | #endif | 83 | #endif |
79 | 84 | ||
80 | #if (CONFIG_SCLK_HZ <= 133333333) | 85 | #if (CONFIG_SCLK_HZ < DDR_CLK_HZ(DDR_MAX_tCK)) |
81 | #define DDR_CL CL_2 | 86 | # error "CONFIG_SCLK_HZ is too small (<DDR_CLK_HZ(DDR_MAX_tCK) Hz)." |
82 | #elif (CONFIG_SCLK_HZ <= 166666666) | 87 | #elif(CONFIG_SCLK_HZ <= 133333333) |
83 | #define DDR_CL CL_2_5 | 88 | # define DDR_CL CL_2 |
84 | #else | 89 | #else |
85 | #define DDR_CL CL_3 | 90 | # error "CONFIG_SCLK_HZ is too large (>133333333 Hz)." |
86 | #endif | 91 | #endif |
87 | 92 | ||
93 | |||
88 | #define mem_DDRCTL0 (DDR_tRP | DDR_tRAS | DDR_tRC | DDR_tRFC | DDR_tREFI) | 94 | #define mem_DDRCTL0 (DDR_tRP | DDR_tRAS | DDR_tRC | DDR_tRFC | DDR_tREFI) |
89 | #define mem_DDRCTL1 (DDR_DATWIDTH | EXTBANK_1 | DDR_SIZE | DDR_WIDTH | DDR_tWTR \ | 95 | #define mem_DDRCTL1 (DDR_DATWIDTH | EXTBANK_1 | DDR_SIZE | DDR_WIDTH | DDR_tWTR \ |
90 | | DDR_tMRD | DDR_tWR | DDR_tRCD) | 96 | | DDR_tMRD | DDR_tWR | DDR_tRCD) |
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index 0c1d46193939..82157caa96a2 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision O, 11/15/2007; ADSP-BF561 Blackfin Processor Anomaly List | 10 | * - Revision P, 02/08/2008; ADSP-BF561 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -256,10 +256,14 @@ | |||
256 | #define ANOMALY_05000357 (1) | 256 | #define ANOMALY_05000357 (1) |
257 | /* Conflicting Column Address Widths Causes SDRAM Errors */ | 257 | /* Conflicting Column Address Widths Causes SDRAM Errors */ |
258 | #define ANOMALY_05000362 (1) | 258 | #define ANOMALY_05000362 (1) |
259 | /* UART Break Signal Issues */ | ||
260 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
259 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | 261 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ |
260 | #define ANOMALY_05000366 (1) | 262 | #define ANOMALY_05000366 (1) |
261 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 263 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
262 | #define ANOMALY_05000371 (1) | 264 | #define ANOMALY_05000371 (1) |
265 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
266 | #define ANOMALY_05000403 (1) | ||
263 | 267 | ||
264 | /* Anomalies that don't exist on this proc */ | 268 | /* Anomalies that don't exist on this proc */ |
265 | #define ANOMALY_05000158 (0) | 269 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index b6f513bee56e..8a4e66d1db37 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -1,22 +1,38 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * blackfin serial driver head file | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * | ||
14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * this program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the gnu general public license as published by | ||
18 | * the free software foundation; either version 2, or (at your option) | ||
19 | * any later version. | ||
20 | * | ||
21 | * this program is distributed in the hope that it will be useful, | ||
22 | * but without any warranty; without even the implied warranty of | ||
23 | * merchantability or fitness for a particular purpose. see the | ||
24 | * gnu general public license for more details. | ||
25 | * | ||
26 | * you should have received a copy of the gnu general public license | ||
27 | * along with this program; see the file copying. | ||
28 | * if not, write to the free software foundation, | ||
29 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
30 | */ | ||
31 | |||
1 | #include <linux/serial.h> | 32 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | 34 | #include <asm/portmux.h> |
4 | 35 | ||
5 | #define NR_PORTS 1 | ||
6 | |||
7 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
8 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
9 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
10 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
11 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
12 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
13 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
14 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
15 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
16 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
17 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
18 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
19 | |||
20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | 36 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) |
21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | 37 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) |
22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) | 38 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) |
@@ -84,7 +100,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart) | |||
84 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); | 100 | bfin_write16(uart->port.membase + OFFSET_LSR, -1); |
85 | } | 101 | } |
86 | 102 | ||
87 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | 103 | struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS]; |
88 | struct bfin_serial_res { | 104 | struct bfin_serial_res { |
89 | unsigned long uart_base_addr; | 105 | unsigned long uart_base_addr; |
90 | int uart_irq; | 106 | int uart_irq; |
@@ -115,7 +131,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
115 | 131 | ||
116 | #define DRIVER_NAME "bfin-uart" | 132 | #define DRIVER_NAME "bfin-uart" |
117 | 133 | ||
118 | int nr_ports = NR_PORTS; | 134 | int nr_ports = BFIN_UART_NR_PORTS; |
119 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | 135 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) |
120 | { | 136 | { |
121 | 137 | ||
diff --git a/include/asm-blackfin/mach-bf561/bfin_sir.h b/include/asm-blackfin/mach-bf561/bfin_sir.h new file mode 100644 index 000000000000..cefcf8bb505b --- /dev/null +++ b/include/asm-blackfin/mach-bf561/bfin_sir.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * Blackfin Infra-red Driver | ||
3 | * | ||
4 | * Copyright 2006-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial.h> | ||
13 | #include <asm/dma.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | #define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) | ||
17 | #define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) | ||
18 | #define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER) | ||
19 | #define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) | ||
20 | #define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR) | ||
21 | #define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) | ||
22 | #define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL) | ||
23 | |||
24 | #define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v) | ||
25 | #define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v) | ||
26 | #define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v) | ||
27 | #define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v) | ||
28 | #define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v) | ||
29 | #define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v) | ||
30 | |||
31 | #ifdef CONFIG_SIR_BFIN_DMA | ||
32 | struct dma_rx_buf { | ||
33 | char *buf; | ||
34 | int head; | ||
35 | int tail; | ||
36 | }; | ||
37 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
38 | |||
39 | struct bfin_sir_port { | ||
40 | unsigned char __iomem *membase; | ||
41 | unsigned int irq; | ||
42 | unsigned int lsr; | ||
43 | unsigned long clk; | ||
44 | struct net_device *dev; | ||
45 | #ifdef CONFIG_SIR_BFIN_DMA | ||
46 | int tx_done; | ||
47 | struct dma_rx_buf rx_dma_buf; | ||
48 | struct timer_list rx_dma_timer; | ||
49 | int rx_dma_nrows; | ||
50 | #endif /* CONFIG_SIR_BFIN_DMA */ | ||
51 | unsigned int tx_dma_channel; | ||
52 | unsigned int rx_dma_channel; | ||
53 | }; | ||
54 | |||
55 | struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS]; | ||
56 | |||
57 | struct bfin_sir_port_res { | ||
58 | unsigned long base_addr; | ||
59 | int irq; | ||
60 | unsigned int rx_dma_channel; | ||
61 | unsigned int tx_dma_channel; | ||
62 | }; | ||
63 | |||
64 | struct bfin_sir_port_res bfin_sir_port_resource[] = { | ||
65 | #ifdef CONFIG_BFIN_SIR0 | ||
66 | { | ||
67 | 0xFFC00400, | ||
68 | IRQ_UART_RX, | ||
69 | CH_UART_RX, | ||
70 | CH_UART_TX, | ||
71 | }, | ||
72 | #endif | ||
73 | }; | ||
74 | |||
75 | int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource); | ||
76 | |||
77 | struct bfin_sir_self { | ||
78 | struct bfin_sir_port *sir_port; | ||
79 | spinlock_t lock; | ||
80 | unsigned int open; | ||
81 | int speed; | ||
82 | int newspeed; | ||
83 | |||
84 | struct sk_buff *txskb; | ||
85 | struct sk_buff *rxskb; | ||
86 | struct net_device_stats stats; | ||
87 | struct device *dev; | ||
88 | struct irlap_cb *irlap; | ||
89 | struct qos_info qos; | ||
90 | |||
91 | iobuff_t tx_buff; | ||
92 | iobuff_t rx_buff; | ||
93 | |||
94 | struct work_struct work; | ||
95 | int mtt; | ||
96 | }; | ||
97 | |||
98 | static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port) | ||
99 | { | ||
100 | unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR); | ||
101 | port->lsr |= (lsr & (BI|FE|PE|OE)); | ||
102 | return lsr | port->lsr; | ||
103 | } | ||
104 | |||
105 | static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port) | ||
106 | { | ||
107 | port->lsr = 0; | ||
108 | bfin_read16(port->membase + OFFSET_LSR); | ||
109 | } | ||
110 | |||
111 | #define DRIVER_NAME "bfin_sir" | ||
112 | |||
113 | static void bfin_sir_hw_init(void) | ||
114 | { | ||
115 | #ifdef CONFIG_BFIN_SIR0 | ||
116 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
117 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
118 | #endif | ||
119 | SSYNC(); | ||
120 | } | ||
diff --git a/include/asm-blackfin/mach-bf561/blackfin.h b/include/asm-blackfin/mach-bf561/blackfin.h index 3a16df2c86d8..0ea8666e6764 100644 --- a/include/asm-blackfin/mach-bf561/blackfin.h +++ b/include/asm-blackfin/mach-bf561/blackfin.h | |||
@@ -69,5 +69,19 @@ | |||
69 | #define bfin_read_SIC_ISR(x) bfin_read32(SICA_ISR0 + (x << 2)) | 69 | #define bfin_read_SIC_ISR(x) bfin_read32(SICA_ISR0 + (x << 2)) |
70 | #define bfin_write_SIC_ISR(x, val) bfin_write32((SICA_ISR0 + (x << 2)), val) | 70 | #define bfin_write_SIC_ISR(x, val) bfin_write32((SICA_ISR0 + (x << 2)), val) |
71 | 71 | ||
72 | #define BFIN_UART_NR_PORTS 1 | ||
73 | |||
74 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
75 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
76 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
77 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
78 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
79 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
80 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
81 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
82 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
83 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
84 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
85 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
72 | 86 | ||
73 | #endif /* _MACH_BLACKFIN_H_ */ | 87 | #endif /* _MACH_BLACKFIN_H_ */ |
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index 1bc8d2f89ccc..b07ffccd66dd 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h | |||
@@ -47,7 +47,30 @@ | |||
47 | 47 | ||
48 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ | 48 | /* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ |
49 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) | 49 | #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) |
50 | #define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL,val) | 50 | /* Writing to PLL_CTL initiates a PLL relock sequence. */ |
51 | static __inline__ void bfin_write_PLL_CTL(unsigned int val) | ||
52 | { | ||
53 | unsigned long flags, iwr0, iwr1; | ||
54 | |||
55 | if (val == bfin_read_PLL_CTL()) | ||
56 | return; | ||
57 | |||
58 | local_irq_save(flags); | ||
59 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
60 | iwr0 = bfin_read32(SICA_IWR0); | ||
61 | iwr1 = bfin_read32(SICA_IWR1); | ||
62 | /* Only allow PPL Wakeup) */ | ||
63 | bfin_write32(SICA_IWR0, IWR_ENABLE(0)); | ||
64 | bfin_write32(SICA_IWR1, 0); | ||
65 | |||
66 | bfin_write16(PLL_CTL, val); | ||
67 | SSYNC(); | ||
68 | asm("IDLE;"); | ||
69 | |||
70 | bfin_write32(SICA_IWR0, iwr0); | ||
71 | bfin_write32(SICA_IWR1, iwr1); | ||
72 | local_irq_restore(flags); | ||
73 | } | ||
51 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 74 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
52 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val) | 75 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val) |
53 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 76 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
@@ -56,6 +79,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
56 | { | 79 | { |
57 | unsigned long flags, iwr0, iwr1; | 80 | unsigned long flags, iwr0, iwr1; |
58 | 81 | ||
82 | if (val == bfin_read_VR_CTL()) | ||
83 | return; | ||
84 | |||
85 | local_irq_save(flags); | ||
59 | /* Enable the PLL Wakeup bit in SIC IWR */ | 86 | /* Enable the PLL Wakeup bit in SIC IWR */ |
60 | iwr0 = bfin_read32(SICA_IWR0); | 87 | iwr0 = bfin_read32(SICA_IWR0); |
61 | iwr1 = bfin_read32(SICA_IWR1); | 88 | iwr1 = bfin_read32(SICA_IWR1); |
@@ -65,12 +92,11 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
65 | 92 | ||
66 | bfin_write16(VR_CTL, val); | 93 | bfin_write16(VR_CTL, val); |
67 | SSYNC(); | 94 | SSYNC(); |
68 | |||
69 | local_irq_save(flags); | ||
70 | asm("IDLE;"); | 95 | asm("IDLE;"); |
71 | local_irq_restore(flags); | 96 | |
72 | bfin_write32(SICA_IWR0, iwr0); | 97 | bfin_write32(SICA_IWR0, iwr0); |
73 | bfin_write32(SICA_IWR1, iwr1); | 98 | bfin_write32(SICA_IWR1, iwr1); |
99 | local_irq_restore(flags); | ||
74 | } | 100 | } |
75 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 101 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
76 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) | 102 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) |
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index c3c0eb13c819..366c9b9a0cb7 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h | |||
@@ -110,18 +110,23 @@ | |||
110 | #define WDOGB_STAT 0xFFC01208 /* Watchdog Status register */ | 110 | #define WDOGB_STAT 0xFFC01208 /* Watchdog Status register */ |
111 | 111 | ||
112 | /* UART Controller (0xFFC00400 - 0xFFC004FF) */ | 112 | /* UART Controller (0xFFC00400 - 0xFFC004FF) */ |
113 | #define UART_THR 0xFFC00400 /* Transmit Holding register */ | 113 | |
114 | #define UART_RBR 0xFFC00400 /* Receive Buffer register */ | 114 | /* |
115 | #define UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */ | 115 | * Because include/linux/serial_reg.h have defined UART_*, |
116 | #define UART_IER 0xFFC00404 /* Interrupt Enable Register */ | 116 | * So we define blackfin uart regs to BFIN_UART0_*. |
117 | #define UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */ | 117 | */ |
118 | #define UART_IIR 0xFFC00408 /* Interrupt Identification Register */ | 118 | #define BFIN_UART_THR 0xFFC00400 /* Transmit Holding register */ |
119 | #define UART_LCR 0xFFC0040C /* Line Control Register */ | 119 | #define BFIN_UART_RBR 0xFFC00400 /* Receive Buffer register */ |
120 | #define UART_MCR 0xFFC00410 /* Modem Control Register */ | 120 | #define BFIN_UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */ |
121 | #define UART_LSR 0xFFC00414 /* Line Status Register */ | 121 | #define BFIN_UART_IER 0xFFC00404 /* Interrupt Enable Register */ |
122 | #define UART_MSR 0xFFC00418 /* Modem Status Register */ | 122 | #define BFIN_UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */ |
123 | #define UART_SCR 0xFFC0041C /* SCR Scratch Register */ | 123 | #define BFIN_UART_IIR 0xFFC00408 /* Interrupt Identification Register */ |
124 | #define UART_GCTL 0xFFC00424 /* Global Control Register */ | 124 | #define BFIN_UART_LCR 0xFFC0040C /* Line Control Register */ |
125 | #define BFIN_UART_MCR 0xFFC00410 /* Modem Control Register */ | ||
126 | #define BFIN_UART_LSR 0xFFC00414 /* Line Status Register */ | ||
127 | #define BFIN_UART_MSR 0xFFC00418 /* Modem Status Register */ | ||
128 | #define BFIN_UART_SCR 0xFFC0041C /* SCR Scratch Register */ | ||
129 | #define BFIN_UART_GCTL 0xFFC00424 /* Global Control Register */ | ||
125 | 130 | ||
126 | /* SPI Controller (0xFFC00500 - 0xFFC005FF) */ | 131 | /* SPI Controller (0xFFC00500 - 0xFFC005FF) */ |
127 | #define SPI0_REGBASE 0xFFC00500 | 132 | #define SPI0_REGBASE 0xFFC00500 |
@@ -866,6 +871,8 @@ | |||
866 | /* PLL_DIV Masks */ | 871 | /* PLL_DIV Masks */ |
867 | #define SCLK_DIV(x) (x) /* SCLK = VCO / x */ | 872 | #define SCLK_DIV(x) (x) /* SCLK = VCO / x */ |
868 | 873 | ||
874 | #define CSEL 0x30 /* Core Select */ | ||
875 | #define SSEL 0xf /* System Select */ | ||
869 | #define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */ | 876 | #define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */ |
870 | #define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */ | 877 | #define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */ |
871 | #define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */ | 878 | #define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */ |
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h index 766334b7d8ab..21d982003e75 100644 --- a/include/asm-blackfin/mach-bf561/dma.h +++ b/include/asm-blackfin/mach-bf561/dma.h | |||
@@ -32,7 +32,4 @@ | |||
32 | #define CH_IMEM_STREAM1_SRC 34 | 32 | #define CH_IMEM_STREAM1_SRC 34 |
33 | #define CH_IMEM_STREAM1_DEST 35 | 33 | #define CH_IMEM_STREAM1_DEST 35 |
34 | 34 | ||
35 | extern int channel2irq(unsigned int channel); | ||
36 | extern struct dma_register *base_addr[]; | ||
37 | |||
38 | #endif | 35 | #endif |
diff --git a/include/asm-blackfin/portmux.h b/include/asm-blackfin/portmux.h index 0d3f650d2d99..0807b286cd9e 100644 --- a/include/asm-blackfin/portmux.h +++ b/include/asm-blackfin/portmux.h | |||
@@ -17,8 +17,8 @@ | |||
17 | 17 | ||
18 | int peripheral_request(unsigned short per, const char *label); | 18 | int peripheral_request(unsigned short per, const char *label); |
19 | void peripheral_free(unsigned short per); | 19 | void peripheral_free(unsigned short per); |
20 | int peripheral_request_list(unsigned short per[], const char *label); | 20 | int peripheral_request_list(const unsigned short per[], const char *label); |
21 | void peripheral_free_list(unsigned short per[]); | 21 | void peripheral_free_list(const unsigned short per[]); |
22 | 22 | ||
23 | #include <asm/gpio.h> | 23 | #include <asm/gpio.h> |
24 | #include <asm/mach/portmux.h> | 24 | #include <asm/mach/portmux.h> |
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h index 1033e5c76011..1c0040724612 100644 --- a/include/asm-blackfin/processor.h +++ b/include/asm-blackfin/processor.h | |||
@@ -26,9 +26,10 @@ static inline void wrusp(unsigned long usp) | |||
26 | 26 | ||
27 | /* | 27 | /* |
28 | * User space process size: 1st byte beyond user address space. | 28 | * User space process size: 1st byte beyond user address space. |
29 | * Fairly meaningless on nommu. Parts of user programs can be scattered | ||
30 | * in a lot of places, so just disable this by setting it to 0xFFFFFFFF. | ||
29 | */ | 31 | */ |
30 | extern unsigned long memory_end; | 32 | #define TASK_SIZE 0xFFFFFFFF |
31 | #define TASK_SIZE (memory_end) | ||
32 | 33 | ||
33 | #ifdef __KERNEL__ | 34 | #ifdef __KERNEL__ |
34 | #define STACK_TOP TASK_SIZE | 35 | #define STACK_TOP TASK_SIZE |
diff --git a/include/asm-blackfin/signal.h b/include/asm-blackfin/signal.h index 0250429b736a..87951d251458 100644 --- a/include/asm-blackfin/signal.h +++ b/include/asm-blackfin/signal.h | |||
@@ -143,7 +143,7 @@ struct sigaction { | |||
143 | #endif /* __KERNEL__ */ | 143 | #endif /* __KERNEL__ */ |
144 | 144 | ||
145 | typedef struct sigaltstack { | 145 | typedef struct sigaltstack { |
146 | void *ss_sp; | 146 | void __user *ss_sp; |
147 | int ss_flags; | 147 | int ss_flags; |
148 | size_t ss_size; | 148 | size_t ss_size; |
149 | } stack_t; | 149 | } stack_t; |
diff --git a/include/asm-blackfin/thread_info.h b/include/asm-blackfin/thread_info.h index 15b99cf4f50b..bc2fe5accf20 100644 --- a/include/asm-blackfin/thread_info.h +++ b/include/asm-blackfin/thread_info.h | |||
@@ -81,14 +81,11 @@ struct thread_info { | |||
81 | #define init_thread_info (init_thread_union.thread_info) | 81 | #define init_thread_info (init_thread_union.thread_info) |
82 | #define init_stack (init_thread_union.stack) | 82 | #define init_stack (init_thread_union.stack) |
83 | 83 | ||
84 | /* How to get the thread information struct from C */ | 84 | /* Given a task stack pointer, you can find its corresponding |
85 | 85 | * thread_info structure just by masking it to the THREAD_SIZE | |
86 | static inline struct thread_info *current_thread_info(void) | 86 | * boundary (currently 8K as you can see above). |
87 | __attribute__ ((__const__)); | ||
88 | |||
89 | /* Given a task stack pointer, you can find it's task structure | ||
90 | * just by masking it to the 8K boundary. | ||
91 | */ | 87 | */ |
88 | __attribute_const__ | ||
92 | static inline struct thread_info *current_thread_info(void) | 89 | static inline struct thread_info *current_thread_info(void) |
93 | { | 90 | { |
94 | struct thread_info *ti; | 91 | struct thread_info *ti; |
diff --git a/include/asm-blackfin/time.h b/include/asm-blackfin/time.h new file mode 100644 index 000000000000..6e5859b6ea32 --- /dev/null +++ b/include/asm-blackfin/time.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * asm-blackfin/time.h: | ||
3 | * | ||
4 | * Copyright 2004-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_BLACKFIN_TIME_H | ||
10 | #define _ASM_BLACKFIN_TIME_H | ||
11 | |||
12 | /* | ||
13 | * The way that the Blackfin core timer works is: | ||
14 | * - CCLK is divided by a programmable 8-bit pre-scaler (TSCALE) | ||
15 | * - Every time TSCALE ticks, a 32bit is counted down (TCOUNT) | ||
16 | * | ||
17 | * If you take the fastest clock (1ns, or 1GHz to make the math work easier) | ||
18 | * 10ms is 10,000,000 clock ticks, which fits easy into a 32-bit counter | ||
19 | * (32 bit counter is 4,294,967,296ns or 4.2 seconds) so, we don't need | ||
20 | * to use TSCALE, and program it to zero (which is pass CCLK through). | ||
21 | * If you feel like using it, try to keep HZ * TIMESCALE to some | ||
22 | * value that divides easy (like power of 2). | ||
23 | */ | ||
24 | |||
25 | #ifndef CONFIG_CPU_FREQ | ||
26 | #define TIME_SCALE 1 | ||
27 | #else | ||
28 | /* | ||
29 | * Blackfin CPU frequency scaling supports max Core Clock 1, 1/2 and 1/4 . | ||
30 | * Whenever we change the Core Clock frequency changes we immediately | ||
31 | * adjust the Core Timer Presale Register. This way we don't lose time. | ||
32 | */ | ||
33 | #define TIME_SCALE 4 | ||
34 | #endif | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-blackfin/timex.h b/include/asm-blackfin/timex.h index 828590117f51..22b0806161bb 100644 --- a/include/asm-blackfin/timex.h +++ b/include/asm-blackfin/timex.h | |||
@@ -1,18 +1,23 @@ | |||
1 | /* blackfin architecture timex specifications: Lineo Inc. 2001 | 1 | /* |
2 | * asm-blackfin/timex.h: cpu cycles! | ||
2 | * | 3 | * |
3 | * Based on: include/asm-m68knommu/timex.h | 4 | * Copyright 2004-2008 Analog Devices Inc. |
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
4 | */ | 7 | */ |
5 | 8 | ||
6 | #ifndef _ASMBLACKFIN_TIMEX_H | 9 | #ifndef _ASM_BLACKFIN_TIMEX_H |
7 | #define _ASMBLACKFIN_TIMEX_H | 10 | #define _ASM_BLACKFIN_TIMEX_H |
8 | 11 | ||
9 | #define CLOCK_TICK_RATE 1000000 /* Underlying HZ */ | 12 | #define CLOCK_TICK_RATE 1000000 /* Underlying HZ */ |
10 | 13 | ||
11 | typedef unsigned long cycles_t; | 14 | typedef unsigned long long cycles_t; |
12 | 15 | ||
13 | static inline cycles_t get_cycles(void) | 16 | static inline cycles_t get_cycles(void) |
14 | { | 17 | { |
15 | return 0; | 18 | unsigned long tmp, tmp2; |
19 | __asm__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2)); | ||
20 | return tmp | ((cycles_t)tmp2 << 32); | ||
16 | } | 21 | } |
17 | 22 | ||
18 | #endif | 23 | #endif |
diff --git a/include/asm-blackfin/trace.h b/include/asm-blackfin/trace.h index ef18afbc2101..312b596b9731 100644 --- a/include/asm-blackfin/trace.h +++ b/include/asm-blackfin/trace.h | |||
@@ -62,14 +62,14 @@ extern unsigned long software_trace_buff[]; | |||
62 | preg.L = LO(TBUFCTL); \ | 62 | preg.L = LO(TBUFCTL); \ |
63 | preg.H = HI(TBUFCTL); \ | 63 | preg.H = HI(TBUFCTL); \ |
64 | dreg = [preg]; \ | 64 | dreg = [preg]; \ |
65 | [sp++] = dreg; \ | 65 | [--sp] = dreg; \ |
66 | dreg = 0x1; \ | 66 | dreg = 0x1; \ |
67 | [preg] = dreg; | 67 | [preg] = dreg; |
68 | 68 | ||
69 | #define trace_buffer_restore(preg, dreg) \ | 69 | #define trace_buffer_restore(preg, dreg) \ |
70 | preg.L = LO(TBUFCTL); \ | 70 | preg.L = LO(TBUFCTL); \ |
71 | preg.H = HI(TBUFCTL); \ | 71 | preg.H = HI(TBUFCTL); \ |
72 | dreg = [sp--]; \ | 72 | dreg = [sp++]; \ |
73 | [preg] = dreg; | 73 | [preg] = dreg; |
74 | 74 | ||
75 | #else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */ | 75 | #else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */ |
diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h index 22a410b8003b..d928b8099056 100644 --- a/include/asm-blackfin/uaccess.h +++ b/include/asm-blackfin/uaccess.h | |||
@@ -133,7 +133,7 @@ static inline int bad_user_access_length(void) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | #define __put_user_bad() (printk(KERN_INFO "put_user_bad %s:%d %s\n",\ | 135 | #define __put_user_bad() (printk(KERN_INFO "put_user_bad %s:%d %s\n",\ |
136 | __FILE__, __LINE__, __FUNCTION__),\ | 136 | __FILE__, __LINE__, __func__),\ |
137 | bad_user_access_length(), (-EFAULT)) | 137 | bad_user_access_length(), (-EFAULT)) |
138 | 138 | ||
139 | /* | 139 | /* |
@@ -177,7 +177,7 @@ static inline int bad_user_access_length(void) | |||
177 | default: \ | 177 | default: \ |
178 | x = 0; \ | 178 | x = 0; \ |
179 | printk(KERN_INFO "get_user_bad: %s:%d %s\n", \ | 179 | printk(KERN_INFO "get_user_bad: %s:%d %s\n", \ |
180 | __FILE__, __LINE__, __FUNCTION__); \ | 180 | __FILE__, __LINE__, __func__); \ |
181 | _err = __get_user_bad(); \ | 181 | _err = __get_user_bad(); \ |
182 | break; \ | 182 | break; \ |
183 | } \ | 183 | } \ |
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h index c18a399f6e3e..42955d0c439b 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -265,14 +265,14 @@ | |||
265 | /* 258 __NR_remap_file_pages */ | 265 | /* 258 __NR_remap_file_pages */ |
266 | #define __NR_set_tid_address 259 | 266 | #define __NR_set_tid_address 259 |
267 | #define __NR_timer_create 260 | 267 | #define __NR_timer_create 260 |
268 | #define __NR_timer_settime (__NR_timer_create+1) | 268 | #define __NR_timer_settime 261 |
269 | #define __NR_timer_gettime (__NR_timer_create+2) | 269 | #define __NR_timer_gettime 262 |
270 | #define __NR_timer_getoverrun (__NR_timer_create+3) | 270 | #define __NR_timer_getoverrun 263 |
271 | #define __NR_timer_delete (__NR_timer_create+4) | 271 | #define __NR_timer_delete 264 |
272 | #define __NR_clock_settime (__NR_timer_create+5) | 272 | #define __NR_clock_settime 265 |
273 | #define __NR_clock_gettime (__NR_timer_create+6) | 273 | #define __NR_clock_gettime 266 |
274 | #define __NR_clock_getres (__NR_timer_create+7) | 274 | #define __NR_clock_getres 267 |
275 | #define __NR_clock_nanosleep (__NR_timer_create+8) | 275 | #define __NR_clock_nanosleep 268 |
276 | #define __NR_statfs64 269 | 276 | #define __NR_statfs64 269 |
277 | #define __NR_fstatfs64 270 | 277 | #define __NR_fstatfs64 270 |
278 | #define __NR_tgkill 271 | 278 | #define __NR_tgkill 271 |
@@ -283,11 +283,11 @@ | |||
283 | /* 276 __NR_get_mempolicy */ | 283 | /* 276 __NR_get_mempolicy */ |
284 | /* 277 __NR_set_mempolicy */ | 284 | /* 277 __NR_set_mempolicy */ |
285 | #define __NR_mq_open 278 | 285 | #define __NR_mq_open 278 |
286 | #define __NR_mq_unlink (__NR_mq_open+1) | 286 | #define __NR_mq_unlink 279 |
287 | #define __NR_mq_timedsend (__NR_mq_open+2) | 287 | #define __NR_mq_timedsend 280 |
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 288 | #define __NR_mq_timedreceive 281 |
289 | #define __NR_mq_notify (__NR_mq_open+4) | 289 | #define __NR_mq_notify 282 |
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 290 | #define __NR_mq_getsetattr 283 |
291 | #define __NR_kexec_load 284 | 291 | #define __NR_kexec_load 284 |
292 | #define __NR_waitid 285 | 292 | #define __NR_waitid 285 |
293 | #define __NR_add_key 286 | 293 | #define __NR_add_key 286 |
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 67dc84cd1343..76b0cc5637f8 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h | |||
@@ -60,6 +60,10 @@ extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long cou | |||
60 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 60 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
61 | extern void ioport_unmap(void __iomem *); | 61 | extern void ioport_unmap(void __iomem *); |
62 | 62 | ||
63 | #ifndef ARCH_HAS_IOREMAP_WC | ||
64 | #define ioremap_wc ioremap_nocache | ||
65 | #endif | ||
66 | |||
63 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 67 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
64 | struct pci_dev; | 68 | struct pci_dev; |
65 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | 69 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index 680e51d87374..19790eb99cc6 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h | |||
@@ -16,6 +16,8 @@ struct dev_archdata { | |||
16 | 16 | ||
17 | struct device_node *prom_node; | 17 | struct device_node *prom_node; |
18 | struct of_device *op; | 18 | struct of_device *op; |
19 | |||
20 | int numa_node; | ||
19 | }; | 21 | }; |
20 | 22 | ||
21 | #endif /* _ASM_SPARC_DEVICE_H */ | 23 | #endif /* _ASM_SPARC_DEVICE_H */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index df5dc4422483..fd55522481cd 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -77,6 +77,11 @@ extern int of_getintprop_default(struct device_node *np, | |||
77 | const char *name, | 77 | const char *name, |
78 | int def); | 78 | int def); |
79 | extern int of_find_in_proplist(const char *list, const char *match, int len); | 79 | extern int of_find_in_proplist(const char *list, const char *match, int len); |
80 | #ifdef CONFIG_NUMA | ||
81 | extern int of_node_to_nid(struct device_node *dp); | ||
82 | #else | ||
83 | #define of_node_to_nid(dp) (-1) | ||
84 | #endif | ||
80 | 85 | ||
81 | extern void prom_build_devicetree(void); | 86 | extern void prom_build_devicetree(void); |
82 | 87 | ||
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 46325ddee23b..d7b9afcba08b 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -56,6 +56,7 @@ struct strbuf { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | extern int iommu_table_init(struct iommu *iommu, int tsbsize, | 58 | extern int iommu_table_init(struct iommu *iommu, int tsbsize, |
59 | u32 dma_offset, u32 dma_addr_mask); | 59 | u32 dma_offset, u32 dma_addr_mask, |
60 | int numa_node); | ||
60 | 61 | ||
61 | #endif /* !(_SPARC64_IOMMU_H) */ | 62 | #endif /* !(_SPARC64_IOMMU_H) */ |
diff --git a/include/asm-sparc64/mmzone.h b/include/asm-sparc64/mmzone.h new file mode 100644 index 000000000000..ebf5986c12ed --- /dev/null +++ b/include/asm-sparc64/mmzone.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _SPARC64_MMZONE_H | ||
2 | #define _SPARC64_MMZONE_H | ||
3 | |||
4 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
5 | |||
6 | extern struct pglist_data *node_data[]; | ||
7 | |||
8 | #define NODE_DATA(nid) (node_data[nid]) | ||
9 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
10 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn) | ||
11 | |||
12 | extern int numa_cpu_lookup_table[]; | ||
13 | extern cpumask_t numa_cpumask_lookup_table[]; | ||
14 | |||
15 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ | ||
16 | |||
17 | #endif /* _SPARC64_MMZONE_H */ | ||
diff --git a/include/asm-sparc64/numnodes.h b/include/asm-sparc64/numnodes.h deleted file mode 100644 index 017e7e74f5e7..000000000000 --- a/include/asm-sparc64/numnodes.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _SPARC64_NUMNODES_H | ||
2 | #define _SPARC64_NUMNODES_H | ||
3 | |||
4 | #define NODES_SHIFT 0 | ||
5 | |||
6 | #endif /* !(_SPARC64_NUMNODES_H) */ | ||
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 6da197803efc..b4b951d570bb 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -8,6 +8,8 @@ | |||
8 | * stack during a system call and basically all traps. | 8 | * stack during a system call and basically all traps. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define PT_REGS_MAGIC 0x57ac6c00 | ||
12 | |||
11 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
12 | 14 | ||
13 | struct pt_regs { | 15 | struct pt_regs { |
@@ -16,7 +18,19 @@ struct pt_regs { | |||
16 | unsigned long tpc; | 18 | unsigned long tpc; |
17 | unsigned long tnpc; | 19 | unsigned long tnpc; |
18 | unsigned int y; | 20 | unsigned int y; |
19 | unsigned int fprs; | 21 | |
22 | /* We encode a magic number, PT_REGS_MAGIC, along | ||
23 | * with the %tt (trap type) register value at trap | ||
24 | * entry time. The magic number allows us to identify | ||
25 | * accurately a trap stack frame in the stack | ||
26 | * unwinder, and the %tt value allows us to test | ||
27 | * things like "in a system call" etc. for an arbitray | ||
28 | * process. | ||
29 | * | ||
30 | * The PT_REGS_MAGIC is choosen such that it can be | ||
31 | * loaded completely using just a sethi instruction. | ||
32 | */ | ||
33 | unsigned int magic; | ||
20 | }; | 34 | }; |
21 | 35 | ||
22 | struct pt_regs32 { | 36 | struct pt_regs32 { |
@@ -147,7 +161,7 @@ extern void __show_regs(struct pt_regs *); | |||
147 | #define PT_V9_TPC 0x88 | 161 | #define PT_V9_TPC 0x88 |
148 | #define PT_V9_TNPC 0x90 | 162 | #define PT_V9_TNPC 0x90 |
149 | #define PT_V9_Y 0x98 | 163 | #define PT_V9_Y 0x98 |
150 | #define PT_V9_FPRS 0x9c | 164 | #define PT_V9_MAGIC 0x9c |
151 | #define PT_TSTATE PT_V9_TSTATE | 165 | #define PT_TSTATE PT_V9_TSTATE |
152 | #define PT_TPC PT_V9_TPC | 166 | #define PT_TPC PT_V9_TPC |
153 | #define PT_TNPC PT_V9_TNPC | 167 | #define PT_TNPC PT_V9_TNPC |
diff --git a/include/asm-sparc64/sparsemem.h b/include/asm-sparc64/sparsemem.h index 77bcd2bfa53c..b99d4e4b6d28 100644 --- a/include/asm-sparc64/sparsemem.h +++ b/include/asm-sparc64/sparsemem.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #define SECTION_SIZE_BITS 31 | 6 | #define SECTION_SIZE_BITS 30 |
7 | #define MAX_PHYSADDR_BITS 42 | 7 | #define MAX_PHYSADDR_BITS 42 |
8 | #define MAX_PHYSMEM_BITS 42 | 8 | #define MAX_PHYSMEM_BITS 42 |
9 | 9 | ||
diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h index c6b557034f68..001c04027c82 100644 --- a/include/asm-sparc64/topology.h +++ b/include/asm-sparc64/topology.h | |||
@@ -1,6 +1,77 @@ | |||
1 | #ifndef _ASM_SPARC64_TOPOLOGY_H | 1 | #ifndef _ASM_SPARC64_TOPOLOGY_H |
2 | #define _ASM_SPARC64_TOPOLOGY_H | 2 | #define _ASM_SPARC64_TOPOLOGY_H |
3 | 3 | ||
4 | #ifdef CONFIG_NUMA | ||
5 | |||
6 | #include <asm/mmzone.h> | ||
7 | |||
8 | static inline int cpu_to_node(int cpu) | ||
9 | { | ||
10 | return numa_cpu_lookup_table[cpu]; | ||
11 | } | ||
12 | |||
13 | #define parent_node(node) (node) | ||
14 | |||
15 | static inline cpumask_t node_to_cpumask(int node) | ||
16 | { | ||
17 | return numa_cpumask_lookup_table[node]; | ||
18 | } | ||
19 | |||
20 | /* Returns a pointer to the cpumask of CPUs on Node 'node'. */ | ||
21 | #define node_to_cpumask_ptr(v, node) \ | ||
22 | cpumask_t *v = &(numa_cpumask_lookup_table[node]) | ||
23 | |||
24 | #define node_to_cpumask_ptr_next(v, node) \ | ||
25 | v = &(numa_cpumask_lookup_table[node]) | ||
26 | |||
27 | static inline int node_to_first_cpu(int node) | ||
28 | { | ||
29 | cpumask_t tmp; | ||
30 | tmp = node_to_cpumask(node); | ||
31 | return first_cpu(tmp); | ||
32 | } | ||
33 | |||
34 | struct pci_bus; | ||
35 | #ifdef CONFIG_PCI | ||
36 | extern int pcibus_to_node(struct pci_bus *pbus); | ||
37 | #else | ||
38 | static inline int pcibus_to_node(struct pci_bus *pbus) | ||
39 | { | ||
40 | return -1; | ||
41 | } | ||
42 | #endif | ||
43 | |||
44 | #define pcibus_to_cpumask(bus) \ | ||
45 | (pcibus_to_node(bus) == -1 ? \ | ||
46 | CPU_MASK_ALL : \ | ||
47 | node_to_cpumask(pcibus_to_node(bus))) | ||
48 | |||
49 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
50 | .min_interval = 8, \ | ||
51 | .max_interval = 32, \ | ||
52 | .busy_factor = 32, \ | ||
53 | .imbalance_pct = 125, \ | ||
54 | .cache_nice_tries = 2, \ | ||
55 | .busy_idx = 3, \ | ||
56 | .idle_idx = 2, \ | ||
57 | .newidle_idx = 0, \ | ||
58 | .wake_idx = 1, \ | ||
59 | .forkexec_idx = 1, \ | ||
60 | .flags = SD_LOAD_BALANCE \ | ||
61 | | SD_BALANCE_FORK \ | ||
62 | | SD_BALANCE_EXEC \ | ||
63 | | SD_SERIALIZE \ | ||
64 | | SD_WAKE_BALANCE, \ | ||
65 | .last_balance = jiffies, \ | ||
66 | .balance_interval = 1, \ | ||
67 | } | ||
68 | |||
69 | #else /* CONFIG_NUMA */ | ||
70 | |||
71 | #include <asm-generic/topology.h> | ||
72 | |||
73 | #endif /* !(CONFIG_NUMA) */ | ||
74 | |||
4 | #ifdef CONFIG_SMP | 75 | #ifdef CONFIG_SMP |
5 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) | 76 | #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) |
6 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) | 77 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) |
@@ -10,8 +81,6 @@ | |||
10 | #define smt_capable() (sparc64_multi_core) | 81 | #define smt_capable() (sparc64_multi_core) |
11 | #endif /* CONFIG_SMP */ | 82 | #endif /* CONFIG_SMP */ |
12 | 83 | ||
13 | #include <asm-generic/topology.h> | ||
14 | |||
15 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) | 84 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) |
16 | 85 | ||
17 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ | 86 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ |
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index 7208a777750e..d3cc4eff39a6 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -28,7 +28,7 @@ | |||
28 | call routine; \ | 28 | call routine; \ |
29 | add %sp, PTREGS_OFF, %o0; \ | 29 | add %sp, PTREGS_OFF, %o0; \ |
30 | ba,pt %xcc, rtrap; \ | 30 | ba,pt %xcc, rtrap; \ |
31 | clr %l6; \ | 31 | nop; \ |
32 | nop; | 32 | nop; |
33 | 33 | ||
34 | #define TRAP_7INSNS(routine) \ | 34 | #define TRAP_7INSNS(routine) \ |
@@ -38,7 +38,7 @@ | |||
38 | call routine; \ | 38 | call routine; \ |
39 | add %sp, PTREGS_OFF, %o0; \ | 39 | add %sp, PTREGS_OFF, %o0; \ |
40 | ba,pt %xcc, rtrap; \ | 40 | ba,pt %xcc, rtrap; \ |
41 | clr %l6; | 41 | nop; |
42 | 42 | ||
43 | #define TRAP_SAVEFPU(routine) \ | 43 | #define TRAP_SAVEFPU(routine) \ |
44 | sethi %hi(109f), %g7; \ | 44 | sethi %hi(109f), %g7; \ |
@@ -47,7 +47,7 @@ | |||
47 | call routine; \ | 47 | call routine; \ |
48 | add %sp, PTREGS_OFF, %o0; \ | 48 | add %sp, PTREGS_OFF, %o0; \ |
49 | ba,pt %xcc, rtrap; \ | 49 | ba,pt %xcc, rtrap; \ |
50 | clr %l6; \ | 50 | nop; \ |
51 | nop; | 51 | nop; |
52 | 52 | ||
53 | #define TRAP_NOSAVE(routine) \ | 53 | #define TRAP_NOSAVE(routine) \ |
@@ -67,7 +67,7 @@ | |||
67 | call routine; \ | 67 | call routine; \ |
68 | add %sp, PTREGS_OFF, %o0; \ | 68 | add %sp, PTREGS_OFF, %o0; \ |
69 | ba,pt %xcc, rtrap; \ | 69 | ba,pt %xcc, rtrap; \ |
70 | clr %l6; \ | 70 | nop; \ |
71 | nop; | 71 | nop; |
72 | 72 | ||
73 | #define TRAP_ARG(routine, arg) \ | 73 | #define TRAP_ARG(routine, arg) \ |
@@ -78,7 +78,7 @@ | |||
78 | call routine; \ | 78 | call routine; \ |
79 | mov arg, %o1; \ | 79 | mov arg, %o1; \ |
80 | ba,pt %xcc, rtrap; \ | 80 | ba,pt %xcc, rtrap; \ |
81 | clr %l6; | 81 | nop; |
82 | 82 | ||
83 | #define TRAPTL1_ARG(routine, arg) \ | 83 | #define TRAPTL1_ARG(routine, arg) \ |
84 | sethi %hi(109f), %g7; \ | 84 | sethi %hi(109f), %g7; \ |
@@ -88,7 +88,7 @@ | |||
88 | call routine; \ | 88 | call routine; \ |
89 | mov arg, %o1; \ | 89 | mov arg, %o1; \ |
90 | ba,pt %xcc, rtrap; \ | 90 | ba,pt %xcc, rtrap; \ |
91 | clr %l6; | 91 | nop; |
92 | 92 | ||
93 | #define SYSCALL_TRAP(routine, systbl) \ | 93 | #define SYSCALL_TRAP(routine, systbl) \ |
94 | sethi %hi(109f), %g7; \ | 94 | sethi %hi(109f), %g7; \ |
@@ -166,7 +166,7 @@ | |||
166 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1; \ | 166 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1; \ |
167 | add %l1, 4, %l2; \ | 167 | add %l1, 4, %l2; \ |
168 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC]; \ | 168 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC]; \ |
169 | ba,pt %xcc, rtrap_clr_l6; \ | 169 | ba,pt %xcc, rtrap; \ |
170 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]; | 170 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]; |
171 | 171 | ||
172 | #ifdef CONFIG_KPROBES | 172 | #ifdef CONFIG_KPROBES |
diff --git a/include/asm-x86/fixmap.h b/include/asm-x86/fixmap.h index 382eb271a892..5bd206973dca 100644 --- a/include/asm-x86/fixmap.h +++ b/include/asm-x86/fixmap.h | |||
@@ -1,5 +1,13 @@ | |||
1 | #ifndef _ASM_FIXMAP_H | ||
2 | #define _ASM_FIXMAP_H | ||
3 | |||
1 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
2 | # include "fixmap_32.h" | 5 | # include "fixmap_32.h" |
3 | #else | 6 | #else |
4 | # include "fixmap_64.h" | 7 | # include "fixmap_64.h" |
5 | #endif | 8 | #endif |
9 | |||
10 | #define clear_fixmap(idx) \ | ||
11 | __set_fixmap(idx, 0, __pgprot(0)) | ||
12 | |||
13 | #endif | ||
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h index eb1665125c44..4b96148e90c1 100644 --- a/include/asm-x86/fixmap_32.h +++ b/include/asm-x86/fixmap_32.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | 10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _ASM_FIXMAP_H | 13 | #ifndef _ASM_FIXMAP_32_H |
14 | #define _ASM_FIXMAP_H | 14 | #define _ASM_FIXMAP_32_H |
15 | 15 | ||
16 | 16 | ||
17 | /* used by vmalloc.c, vsyscall.lds.S. | 17 | /* used by vmalloc.c, vsyscall.lds.S. |
@@ -121,9 +121,6 @@ extern void reserve_top_address(unsigned long reserve); | |||
121 | #define set_fixmap_nocache(idx, phys) \ | 121 | #define set_fixmap_nocache(idx, phys) \ |
122 | __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) | 122 | __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) |
123 | 123 | ||
124 | #define clear_fixmap(idx) \ | ||
125 | __set_fixmap(idx, 0, __pgprot(0)) | ||
126 | |||
127 | #define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) | 124 | #define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) |
128 | 125 | ||
129 | #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) | 126 | #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) |
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h index f3d76858c0e6..355d26a75a82 100644 --- a/include/asm-x86/fixmap_64.h +++ b/include/asm-x86/fixmap_64.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1998 Ingo Molnar | 8 | * Copyright (C) 1998 Ingo Molnar |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _ASM_FIXMAP_H | 11 | #ifndef _ASM_FIXMAP_64_H |
12 | #define _ASM_FIXMAP_H | 12 | #define _ASM_FIXMAP_64_H |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <asm/apicdef.h> | 15 | #include <asm/apicdef.h> |
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index 7b292d386713..d5b11f60dbd0 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _ASM_X86_IO_H | ||
2 | #define _ASM_X86_IO_H | ||
3 | |||
1 | #define ARCH_HAS_IOREMAP_WC | 4 | #define ARCH_HAS_IOREMAP_WC |
2 | 5 | ||
3 | #ifdef CONFIG_X86_32 | 6 | #ifdef CONFIG_X86_32 |
@@ -5,7 +8,12 @@ | |||
5 | #else | 8 | #else |
6 | # include "io_64.h" | 9 | # include "io_64.h" |
7 | #endif | 10 | #endif |
11 | |||
12 | extern void *xlate_dev_mem_ptr(unsigned long phys); | ||
13 | extern void unxlate_dev_mem_ptr(unsigned long phys, void *addr); | ||
14 | |||
8 | extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, | 15 | extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, |
9 | unsigned long prot_val); | 16 | unsigned long prot_val); |
10 | extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size); | 17 | extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size); |
11 | 18 | ||
19 | #endif /* _ASM_X86_IO_H */ | ||
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index 509045f5fda2..6e73467a4fb1 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -49,12 +49,6 @@ | |||
49 | #include <linux/vmalloc.h> | 49 | #include <linux/vmalloc.h> |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | ||
53 | * access | ||
54 | */ | ||
55 | #define xlate_dev_mem_ptr(p) __va(p) | ||
56 | |||
57 | /* | ||
58 | * Convert a virtual cached pointer to an uncached pointer | 52 | * Convert a virtual cached pointer to an uncached pointer |
59 | */ | 53 | */ |
60 | #define xlate_dev_kmem_ptr(p) p | 54 | #define xlate_dev_kmem_ptr(p) p |
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index c2f5eef47b88..0930bedf9e4d 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -308,12 +308,6 @@ extern int iommu_bio_merge; | |||
308 | #define BIO_VMERGE_BOUNDARY iommu_bio_merge | 308 | #define BIO_VMERGE_BOUNDARY iommu_bio_merge |
309 | 309 | ||
310 | /* | 310 | /* |
311 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | ||
312 | * access | ||
313 | */ | ||
314 | #define xlate_dev_mem_ptr(p) __va(p) | ||
315 | |||
316 | /* | ||
317 | * Convert a virtual cached pointer to an uncached pointer | 311 | * Convert a virtual cached pointer to an uncached pointer |
318 | */ | 312 | */ |
319 | #define xlate_dev_kmem_ptr(p) p | 313 | #define xlate_dev_kmem_ptr(p) p |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 6724a4bc6b7a..b381f4a5a0bd 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
48 | 48 | ||
49 | extern int page_is_ram(unsigned long pagenr); | 49 | extern int page_is_ram(unsigned long pagenr); |
50 | extern int devmem_is_allowed(unsigned long pagenr); | ||
50 | 51 | ||
51 | extern unsigned long max_pfn_mapped; | 52 | extern unsigned long max_pfn_mapped; |
52 | 53 | ||
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 3d419398499b..0f13b945e240 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -220,11 +220,13 @@ struct pv_mmu_ops { | |||
220 | unsigned long va); | 220 | unsigned long va); |
221 | 221 | ||
222 | /* Hooks for allocating/releasing pagetable pages */ | 222 | /* Hooks for allocating/releasing pagetable pages */ |
223 | void (*alloc_pt)(struct mm_struct *mm, u32 pfn); | 223 | void (*alloc_pte)(struct mm_struct *mm, u32 pfn); |
224 | void (*alloc_pd)(struct mm_struct *mm, u32 pfn); | 224 | void (*alloc_pmd)(struct mm_struct *mm, u32 pfn); |
225 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); | 225 | void (*alloc_pmd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); |
226 | void (*release_pt)(u32 pfn); | 226 | void (*alloc_pud)(struct mm_struct *mm, u32 pfn); |
227 | void (*release_pd)(u32 pfn); | 227 | void (*release_pte)(u32 pfn); |
228 | void (*release_pmd)(u32 pfn); | ||
229 | void (*release_pud)(u32 pfn); | ||
228 | 230 | ||
229 | /* Pagetable manipulation functions */ | 231 | /* Pagetable manipulation functions */ |
230 | void (*set_pte)(pte_t *ptep, pte_t pteval); | 232 | void (*set_pte)(pte_t *ptep, pte_t pteval); |
@@ -910,28 +912,37 @@ static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, | |||
910 | PVOP_VCALL3(pv_mmu_ops.flush_tlb_others, &cpumask, mm, va); | 912 | PVOP_VCALL3(pv_mmu_ops.flush_tlb_others, &cpumask, mm, va); |
911 | } | 913 | } |
912 | 914 | ||
913 | static inline void paravirt_alloc_pt(struct mm_struct *mm, unsigned pfn) | 915 | static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned pfn) |
914 | { | 916 | { |
915 | PVOP_VCALL2(pv_mmu_ops.alloc_pt, mm, pfn); | 917 | PVOP_VCALL2(pv_mmu_ops.alloc_pte, mm, pfn); |
916 | } | 918 | } |
917 | static inline void paravirt_release_pt(unsigned pfn) | 919 | static inline void paravirt_release_pte(unsigned pfn) |
918 | { | 920 | { |
919 | PVOP_VCALL1(pv_mmu_ops.release_pt, pfn); | 921 | PVOP_VCALL1(pv_mmu_ops.release_pte, pfn); |
920 | } | 922 | } |
921 | 923 | ||
922 | static inline void paravirt_alloc_pd(struct mm_struct *mm, unsigned pfn) | 924 | static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned pfn) |
923 | { | 925 | { |
924 | PVOP_VCALL2(pv_mmu_ops.alloc_pd, mm, pfn); | 926 | PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn); |
925 | } | 927 | } |
926 | 928 | ||
927 | static inline void paravirt_alloc_pd_clone(unsigned pfn, unsigned clonepfn, | 929 | static inline void paravirt_alloc_pmd_clone(unsigned pfn, unsigned clonepfn, |
928 | unsigned start, unsigned count) | 930 | unsigned start, unsigned count) |
929 | { | 931 | { |
930 | PVOP_VCALL4(pv_mmu_ops.alloc_pd_clone, pfn, clonepfn, start, count); | 932 | PVOP_VCALL4(pv_mmu_ops.alloc_pmd_clone, pfn, clonepfn, start, count); |
931 | } | 933 | } |
932 | static inline void paravirt_release_pd(unsigned pfn) | 934 | static inline void paravirt_release_pmd(unsigned pfn) |
933 | { | 935 | { |
934 | PVOP_VCALL1(pv_mmu_ops.release_pd, pfn); | 936 | PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn); |
937 | } | ||
938 | |||
939 | static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned pfn) | ||
940 | { | ||
941 | PVOP_VCALL2(pv_mmu_ops.alloc_pud, mm, pfn); | ||
942 | } | ||
943 | static inline void paravirt_release_pud(unsigned pfn) | ||
944 | { | ||
945 | PVOP_VCALL1(pv_mmu_ops.release_pud, pfn); | ||
935 | } | 946 | } |
936 | 947 | ||
937 | #ifdef CONFIG_HIGHPTE | 948 | #ifdef CONFIG_HIGHPTE |
diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h index 5886eed05886..91e4641f3f31 100644 --- a/include/asm-x86/pgalloc.h +++ b/include/asm-x86/pgalloc.h | |||
@@ -1,5 +1,110 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifndef _ASM_X86_PGALLOC_H |
2 | # include "pgalloc_32.h" | 2 | #define _ASM_X86_PGALLOC_H |
3 | |||
4 | #include <linux/threads.h> | ||
5 | #include <linux/mm.h> /* for struct page */ | ||
6 | #include <linux/pagemap.h> | ||
7 | |||
8 | #ifdef CONFIG_PARAVIRT | ||
9 | #include <asm/paravirt.h> | ||
3 | #else | 10 | #else |
4 | # include "pgalloc_64.h" | 11 | static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) {} |
12 | static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) {} | ||
13 | static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn, | ||
14 | unsigned long start, unsigned long count) {} | ||
15 | static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) {} | ||
16 | static inline void paravirt_release_pte(unsigned long pfn) {} | ||
17 | static inline void paravirt_release_pmd(unsigned long pfn) {} | ||
18 | static inline void paravirt_release_pud(unsigned long pfn) {} | ||
5 | #endif | 19 | #endif |
20 | |||
21 | /* | ||
22 | * Allocate and free page tables. | ||
23 | */ | ||
24 | extern pgd_t *pgd_alloc(struct mm_struct *); | ||
25 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); | ||
26 | |||
27 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); | ||
28 | extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long); | ||
29 | |||
30 | /* Should really implement gc for free page table pages. This could be | ||
31 | done with a reference count in struct page. */ | ||
32 | |||
33 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | ||
34 | { | ||
35 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | ||
36 | free_page((unsigned long)pte); | ||
37 | } | ||
38 | |||
39 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | ||
40 | { | ||
41 | __free_page(pte); | ||
42 | } | ||
43 | |||
44 | extern void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte); | ||
45 | |||
46 | static inline void pmd_populate_kernel(struct mm_struct *mm, | ||
47 | pmd_t *pmd, pte_t *pte) | ||
48 | { | ||
49 | paravirt_alloc_pte(mm, __pa(pte) >> PAGE_SHIFT); | ||
50 | set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); | ||
51 | } | ||
52 | |||
53 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | ||
54 | struct page *pte) | ||
55 | { | ||
56 | unsigned long pfn = page_to_pfn(pte); | ||
57 | |||
58 | paravirt_alloc_pte(mm, pfn); | ||
59 | set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); | ||
60 | } | ||
61 | |||
62 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
63 | |||
64 | #if PAGETABLE_LEVELS > 2 | ||
65 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | ||
66 | { | ||
67 | return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
68 | } | ||
69 | |||
70 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
71 | { | ||
72 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | ||
73 | free_page((unsigned long)pmd); | ||
74 | } | ||
75 | |||
76 | extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd); | ||
77 | |||
78 | #ifdef CONFIG_X86_PAE | ||
79 | extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); | ||
80 | #else /* !CONFIG_X86_PAE */ | ||
81 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) | ||
82 | { | ||
83 | paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); | ||
84 | set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd))); | ||
85 | } | ||
86 | #endif /* CONFIG_X86_PAE */ | ||
87 | |||
88 | #if PAGETABLE_LEVELS > 3 | ||
89 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | ||
90 | { | ||
91 | paravirt_alloc_pud(mm, __pa(pud) >> PAGE_SHIFT); | ||
92 | set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud))); | ||
93 | } | ||
94 | |||
95 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | ||
96 | { | ||
97 | return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
98 | } | ||
99 | |||
100 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | ||
101 | { | ||
102 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); | ||
103 | free_page((unsigned long)pud); | ||
104 | } | ||
105 | |||
106 | extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud); | ||
107 | #endif /* PAGETABLE_LEVELS > 3 */ | ||
108 | #endif /* PAGETABLE_LEVELS > 2 */ | ||
109 | |||
110 | #endif /* _ASM_X86_PGALLOC_H */ | ||
diff --git a/include/asm-x86/pgalloc_32.h b/include/asm-x86/pgalloc_32.h deleted file mode 100644 index 6bea6e5b5ee5..000000000000 --- a/include/asm-x86/pgalloc_32.h +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | #ifndef _I386_PGALLOC_H | ||
2 | #define _I386_PGALLOC_H | ||
3 | |||
4 | #include <linux/threads.h> | ||
5 | #include <linux/mm.h> /* for struct page */ | ||
6 | #include <linux/pagemap.h> | ||
7 | #include <asm/tlb.h> | ||
8 | #include <asm-generic/tlb.h> | ||
9 | |||
10 | #ifdef CONFIG_PARAVIRT | ||
11 | #include <asm/paravirt.h> | ||
12 | #else | ||
13 | #define paravirt_alloc_pt(mm, pfn) do { } while (0) | ||
14 | #define paravirt_alloc_pd(mm, pfn) do { } while (0) | ||
15 | #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0) | ||
16 | #define paravirt_release_pt(pfn) do { } while (0) | ||
17 | #define paravirt_release_pd(pfn) do { } while (0) | ||
18 | #endif | ||
19 | |||
20 | static inline void pmd_populate_kernel(struct mm_struct *mm, | ||
21 | pmd_t *pmd, pte_t *pte) | ||
22 | { | ||
23 | paravirt_alloc_pt(mm, __pa(pte) >> PAGE_SHIFT); | ||
24 | set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); | ||
25 | } | ||
26 | |||
27 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte) | ||
28 | { | ||
29 | unsigned long pfn = page_to_pfn(pte); | ||
30 | |||
31 | paravirt_alloc_pt(mm, pfn); | ||
32 | set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); | ||
33 | } | ||
34 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
35 | |||
36 | /* | ||
37 | * Allocate and free page tables. | ||
38 | */ | ||
39 | extern pgd_t *pgd_alloc(struct mm_struct *); | ||
40 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); | ||
41 | |||
42 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); | ||
43 | extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long); | ||
44 | |||
45 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | ||
46 | { | ||
47 | free_page((unsigned long)pte); | ||
48 | } | ||
49 | |||
50 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) | ||
51 | { | ||
52 | pgtable_page_dtor(pte); | ||
53 | __free_page(pte); | ||
54 | } | ||
55 | |||
56 | |||
57 | extern void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte); | ||
58 | |||
59 | #ifdef CONFIG_X86_PAE | ||
60 | /* | ||
61 | * In the PAE case we free the pmds as part of the pgd. | ||
62 | */ | ||
63 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | ||
64 | { | ||
65 | return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
66 | } | ||
67 | |||
68 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
69 | { | ||
70 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | ||
71 | free_page((unsigned long)pmd); | ||
72 | } | ||
73 | |||
74 | extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd); | ||
75 | |||
76 | static inline void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) | ||
77 | { | ||
78 | paravirt_alloc_pd(mm, __pa(pmd) >> PAGE_SHIFT); | ||
79 | |||
80 | /* Note: almost everything apart from _PAGE_PRESENT is | ||
81 | reserved at the pmd (PDPT) level. */ | ||
82 | set_pud(pudp, __pud(__pa(pmd) | _PAGE_PRESENT)); | ||
83 | |||
84 | /* | ||
85 | * According to Intel App note "TLBs, Paging-Structure Caches, | ||
86 | * and Their Invalidation", April 2007, document 317080-001, | ||
87 | * section 8.1: in PAE mode we explicitly have to flush the | ||
88 | * TLB via cr3 if the top-level pgd is changed... | ||
89 | */ | ||
90 | if (mm == current->active_mm) | ||
91 | write_cr3(read_cr3()); | ||
92 | } | ||
93 | #endif /* CONFIG_X86_PAE */ | ||
94 | |||
95 | #endif /* _I386_PGALLOC_H */ | ||
diff --git a/include/asm-x86/pgalloc_64.h b/include/asm-x86/pgalloc_64.h deleted file mode 100644 index 8d6722320dcc..000000000000 --- a/include/asm-x86/pgalloc_64.h +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | #ifndef _X86_64_PGALLOC_H | ||
2 | #define _X86_64_PGALLOC_H | ||
3 | |||
4 | #include <asm/pda.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/mm.h> | ||
7 | |||
8 | #define pmd_populate_kernel(mm, pmd, pte) \ | ||
9 | set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) | ||
10 | #define pud_populate(mm, pud, pmd) \ | ||
11 | set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd))) | ||
12 | #define pgd_populate(mm, pgd, pud) \ | ||
13 | set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud))) | ||
14 | |||
15 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
16 | |||
17 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte) | ||
18 | { | ||
19 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); | ||
20 | } | ||
21 | |||
22 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
23 | { | ||
24 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | ||
25 | free_page((unsigned long)pmd); | ||
26 | } | ||
27 | |||
28 | static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) | ||
29 | { | ||
30 | return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
31 | } | ||
32 | |||
33 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | ||
34 | { | ||
35 | return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
36 | } | ||
37 | |||
38 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | ||
39 | { | ||
40 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); | ||
41 | free_page((unsigned long)pud); | ||
42 | } | ||
43 | |||
44 | static inline void pgd_list_add(pgd_t *pgd) | ||
45 | { | ||
46 | struct page *page = virt_to_page(pgd); | ||
47 | unsigned long flags; | ||
48 | |||
49 | spin_lock_irqsave(&pgd_lock, flags); | ||
50 | list_add(&page->lru, &pgd_list); | ||
51 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
52 | } | ||
53 | |||
54 | static inline void pgd_list_del(pgd_t *pgd) | ||
55 | { | ||
56 | struct page *page = virt_to_page(pgd); | ||
57 | unsigned long flags; | ||
58 | |||
59 | spin_lock_irqsave(&pgd_lock, flags); | ||
60 | list_del(&page->lru); | ||
61 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
62 | } | ||
63 | |||
64 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | ||
65 | { | ||
66 | unsigned boundary; | ||
67 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); | ||
68 | if (!pgd) | ||
69 | return NULL; | ||
70 | pgd_list_add(pgd); | ||
71 | /* | ||
72 | * Copy kernel pointers in from init. | ||
73 | * Could keep a freelist or slab cache of those because the kernel | ||
74 | * part never changes. | ||
75 | */ | ||
76 | boundary = pgd_index(__PAGE_OFFSET); | ||
77 | memset(pgd, 0, boundary * sizeof(pgd_t)); | ||
78 | memcpy(pgd + boundary, | ||
79 | init_level4_pgt + boundary, | ||
80 | (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); | ||
81 | return pgd; | ||
82 | } | ||
83 | |||
84 | static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | ||
85 | { | ||
86 | BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); | ||
87 | pgd_list_del(pgd); | ||
88 | free_page((unsigned long)pgd); | ||
89 | } | ||
90 | |||
91 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | ||
92 | { | ||
93 | return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
94 | } | ||
95 | |||
96 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | ||
97 | { | ||
98 | struct page *page; | ||
99 | void *p; | ||
100 | |||
101 | p = (void *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | ||
102 | if (!p) | ||
103 | return NULL; | ||
104 | page = virt_to_page(p); | ||
105 | pgtable_page_ctor(page); | ||
106 | return page; | ||
107 | } | ||
108 | |||
109 | /* Should really implement gc for free page table pages. This could be | ||
110 | done with a reference count in struct page. */ | ||
111 | |||
112 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | ||
113 | { | ||
114 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | ||
115 | free_page((unsigned long)pte); | ||
116 | } | ||
117 | |||
118 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) | ||
119 | { | ||
120 | pgtable_page_dtor(pte); | ||
121 | __free_page(pte); | ||
122 | } | ||
123 | |||
124 | #define __pte_free_tlb(tlb,pte) \ | ||
125 | do { \ | ||
126 | pgtable_page_dtor((pte)); \ | ||
127 | tlb_remove_page((tlb), (pte)); \ | ||
128 | } while (0) | ||
129 | |||
130 | #define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) | ||
131 | #define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) | ||
132 | |||
133 | #endif /* _X86_64_PGALLOC_H */ | ||
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index f1d9f4a03f6f..a496d6335d3b 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_H | 1 | #ifndef _ASM_X86_PGTABLE_H |
2 | #define _ASM_X86_PGTABLE_H | 2 | #define _ASM_X86_PGTABLE_H |
3 | 3 | ||
4 | #define USER_PTRS_PER_PGD ((TASK_SIZE-1)/PGDIR_SIZE+1) | ||
5 | #define FIRST_USER_ADDRESS 0 | 4 | #define FIRST_USER_ADDRESS 0 |
6 | 5 | ||
7 | #define _PAGE_BIT_PRESENT 0 /* is present */ | 6 | #define _PAGE_BIT_PRESENT 0 /* is present */ |
@@ -289,6 +288,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
289 | 288 | ||
290 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 289 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) |
291 | 290 | ||
291 | #ifndef __ASSEMBLY__ | ||
292 | #define __HAVE_PHYS_MEM_ACCESS_PROT | ||
293 | struct file; | ||
294 | pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | ||
295 | unsigned long size, pgprot_t vma_prot); | ||
296 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | ||
297 | unsigned long size, pgprot_t *vma_prot); | ||
298 | #endif | ||
299 | |||
292 | #ifdef CONFIG_PARAVIRT | 300 | #ifdef CONFIG_PARAVIRT |
293 | #include <asm/paravirt.h> | 301 | #include <asm/paravirt.h> |
294 | #else /* !CONFIG_PARAVIRT */ | 302 | #else /* !CONFIG_PARAVIRT */ |
@@ -330,6 +338,9 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
330 | # include "pgtable_64.h" | 338 | # include "pgtable_64.h" |
331 | #endif | 339 | #endif |
332 | 340 | ||
341 | #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET) | ||
342 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) | ||
343 | |||
333 | #ifndef __ASSEMBLY__ | 344 | #ifndef __ASSEMBLY__ |
334 | 345 | ||
335 | enum { | 346 | enum { |
@@ -389,37 +400,17 @@ static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
389 | * bit at the same time. | 400 | * bit at the same time. |
390 | */ | 401 | */ |
391 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 402 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
392 | #define ptep_set_access_flags(vma, address, ptep, entry, dirty) \ | 403 | extern int ptep_set_access_flags(struct vm_area_struct *vma, |
393 | ({ \ | 404 | unsigned long address, pte_t *ptep, |
394 | int __changed = !pte_same(*(ptep), entry); \ | 405 | pte_t entry, int dirty); |
395 | if (__changed && dirty) { \ | ||
396 | *ptep = entry; \ | ||
397 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ | ||
398 | flush_tlb_page(vma, address); \ | ||
399 | } \ | ||
400 | __changed; \ | ||
401 | }) | ||
402 | 406 | ||
403 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 407 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
404 | #define ptep_test_and_clear_young(vma, addr, ptep) ({ \ | 408 | extern int ptep_test_and_clear_young(struct vm_area_struct *vma, |
405 | int __ret = 0; \ | 409 | unsigned long addr, pte_t *ptep); |
406 | if (pte_young(*(ptep))) \ | ||
407 | __ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, \ | ||
408 | &(ptep)->pte); \ | ||
409 | if (__ret) \ | ||
410 | pte_update((vma)->vm_mm, addr, ptep); \ | ||
411 | __ret; \ | ||
412 | }) | ||
413 | 410 | ||
414 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH | 411 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH |
415 | #define ptep_clear_flush_young(vma, address, ptep) \ | 412 | extern int ptep_clear_flush_young(struct vm_area_struct *vma, |
416 | ({ \ | 413 | unsigned long address, pte_t *ptep); |
417 | int __young; \ | ||
418 | __young = ptep_test_and_clear_young((vma), (address), (ptep)); \ | ||
419 | if (__young) \ | ||
420 | flush_tlb_page(vma, address); \ | ||
421 | __young; \ | ||
422 | }) | ||
423 | 414 | ||
424 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 415 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
425 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | 416 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |
@@ -456,6 +447,22 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, | |||
456 | pte_update(mm, addr, ptep); | 447 | pte_update(mm, addr, ptep); |
457 | } | 448 | } |
458 | 449 | ||
450 | /* | ||
451 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
452 | * | ||
453 | * dst - pointer to pgd range anwhere on a pgd page | ||
454 | * src - "" | ||
455 | * count - the number of pgds to copy. | ||
456 | * | ||
457 | * dst and src can be on the same page, but the range must not overlap, | ||
458 | * and must not cross a page boundary. | ||
459 | */ | ||
460 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
461 | { | ||
462 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
463 | } | ||
464 | |||
465 | |||
459 | #include <asm-generic/pgtable.h> | 466 | #include <asm-generic/pgtable.h> |
460 | #endif /* __ASSEMBLY__ */ | 467 | #endif /* __ASSEMBLY__ */ |
461 | 468 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index c4a643674458..168b6447cf18 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -48,9 +48,6 @@ void paging_init(void); | |||
48 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 48 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
49 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | 49 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) |
50 | 50 | ||
51 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) | ||
52 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) | ||
53 | |||
54 | /* Just any arbitrary offset to the start of the vmalloc VM area: the | 51 | /* Just any arbitrary offset to the start of the vmalloc VM area: the |
55 | * current 8MB value just means that there will be a 8MB "hole" after the | 52 | * current 8MB value just means that there will be a 8MB "hole" after the |
56 | * physical memory until the kernel virtual memory starts. That means that | 53 | * physical memory until the kernel virtual memory starts. That means that |
@@ -109,21 +106,6 @@ extern int pmd_bad(pmd_t pmd); | |||
109 | #endif | 106 | #endif |
110 | 107 | ||
111 | /* | 108 | /* |
112 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
113 | * | ||
114 | * dst - pointer to pgd range anwhere on a pgd page | ||
115 | * src - "" | ||
116 | * count - the number of pgds to copy. | ||
117 | * | ||
118 | * dst and src can be on the same page, but the range must not overlap, | ||
119 | * and must not cross a page boundary. | ||
120 | */ | ||
121 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
122 | { | ||
123 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * Macro to mark a page protection value as "uncacheable". | 109 | * Macro to mark a page protection value as "uncacheable". |
128 | * On processors which do not support it, this is a no-op. | 110 | * On processors which do not support it, this is a no-op. |
129 | */ | 111 | */ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 9fd87d0b6477..a3bbf8766c1d 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -24,7 +24,7 @@ extern void paging_init(void); | |||
24 | 24 | ||
25 | #endif /* !__ASSEMBLY__ */ | 25 | #endif /* !__ASSEMBLY__ */ |
26 | 26 | ||
27 | #define SHARED_KERNEL_PMD 1 | 27 | #define SHARED_KERNEL_PMD 0 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * PGDIR_SHIFT determines what a top-level page table entry can map | 30 | * PGDIR_SHIFT determines what a top-level page table entry can map |
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 62ebdec394b9..1ebaa5cd3112 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -199,7 +199,6 @@ static inline int hard_smp_processor_id(void) | |||
199 | #ifdef CONFIG_HOTPLUG_CPU | 199 | #ifdef CONFIG_HOTPLUG_CPU |
200 | extern void cpu_exit_clear(void); | 200 | extern void cpu_exit_clear(void); |
201 | extern void cpu_uninit(void); | 201 | extern void cpu_uninit(void); |
202 | extern void remove_siblinginfo(int cpu); | ||
203 | #endif | 202 | #endif |
204 | 203 | ||
205 | extern void smp_alloc_memory(void); | 204 | extern void smp_alloc_memory(void); |
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h index 0434bd8349a7..d2d8eb5b55f5 100644 --- a/include/asm-x86/tsc.h +++ b/include/asm-x86/tsc.h | |||
@@ -18,7 +18,6 @@ extern unsigned int cpu_khz; | |||
18 | extern unsigned int tsc_khz; | 18 | extern unsigned int tsc_khz; |
19 | 19 | ||
20 | extern void disable_TSC(void); | 20 | extern void disable_TSC(void); |
21 | extern void enable_TSC(void); | ||
22 | 21 | ||
23 | static inline cycles_t get_cycles(void) | 22 | static inline cycles_t get_cycles(void) |
24 | { | 23 | { |
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h new file mode 100644 index 000000000000..596312a7bfc9 --- /dev/null +++ b/include/asm-x86/xen/events.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef __XEN_EVENTS_H | ||
2 | #define __XEN_EVENTS_H | ||
3 | |||
4 | enum ipi_vector { | ||
5 | XEN_RESCHEDULE_VECTOR, | ||
6 | XEN_CALL_FUNCTION_VECTOR, | ||
7 | |||
8 | XEN_NR_IPIS, | ||
9 | }; | ||
10 | |||
11 | static inline int xen_irqs_disabled(struct pt_regs *regs) | ||
12 | { | ||
13 | return raw_irqs_disabled_flags(regs->flags); | ||
14 | } | ||
15 | |||
16 | static inline void xen_do_IRQ(int irq, struct pt_regs *regs) | ||
17 | { | ||
18 | regs->orig_ax = ~irq; | ||
19 | do_IRQ(regs); | ||
20 | } | ||
21 | |||
22 | #endif /* __XEN_EVENTS_H */ | ||
diff --git a/include/asm-x86/xen/grant_table.h b/include/asm-x86/xen/grant_table.h new file mode 100644 index 000000000000..2444d4593a3b --- /dev/null +++ b/include/asm-x86/xen/grant_table.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __XEN_GRANT_TABLE_H | ||
2 | #define __XEN_GRANT_TABLE_H | ||
3 | |||
4 | #define xen_alloc_vm_area(size) alloc_vm_area(size) | ||
5 | #define xen_free_vm_area(area) free_vm_area(area) | ||
6 | |||
7 | #endif /* __XEN_GRANT_TABLE_H */ | ||
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index bc0ee7d961ca..c2ccd997ed35 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h | |||
@@ -164,6 +164,12 @@ HYPERVISOR_set_callbacks(unsigned long event_selector, | |||
164 | } | 164 | } |
165 | 165 | ||
166 | static inline int | 166 | static inline int |
167 | HYPERVISOR_callback_op(int cmd, void *arg) | ||
168 | { | ||
169 | return _hypercall2(int, callback_op, cmd, arg); | ||
170 | } | ||
171 | |||
172 | static inline int | ||
167 | HYPERVISOR_fpu_taskswitch(int set) | 173 | HYPERVISOR_fpu_taskswitch(int set) |
168 | { | 174 | { |
169 | return _hypercall1(int, fpu_taskswitch, set); | 175 | return _hypercall1(int, fpu_taskswitch, set); |
diff --git a/include/asm-x86/xen/interface.h b/include/asm-x86/xen/interface.h index 165c3968e138..6227000a1e84 100644 --- a/include/asm-x86/xen/interface.h +++ b/include/asm-x86/xen/interface.h | |||
@@ -22,6 +22,30 @@ | |||
22 | #define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name) | 22 | #define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name) |
23 | #define GUEST_HANDLE(name) __guest_handle_ ## name | 23 | #define GUEST_HANDLE(name) __guest_handle_ ## name |
24 | 24 | ||
25 | #ifdef __XEN__ | ||
26 | #if defined(__i386__) | ||
27 | #define set_xen_guest_handle(hnd, val) \ | ||
28 | do { \ | ||
29 | if (sizeof(hnd) == 8) \ | ||
30 | *(uint64_t *)&(hnd) = 0; \ | ||
31 | (hnd).p = val; \ | ||
32 | } while (0) | ||
33 | #elif defined(__x86_64__) | ||
34 | #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) | ||
35 | #endif | ||
36 | #else | ||
37 | #if defined(__i386__) | ||
38 | #define set_xen_guest_handle(hnd, val) \ | ||
39 | do { \ | ||
40 | if (sizeof(hnd) == 8) \ | ||
41 | *(uint64_t *)&(hnd) = 0; \ | ||
42 | (hnd) = val; \ | ||
43 | } while (0) | ||
44 | #elif defined(__x86_64__) | ||
45 | #define set_xen_guest_handle(hnd, val) do { (hnd) = val; } while (0) | ||
46 | #endif | ||
47 | #endif | ||
48 | |||
25 | #ifndef __ASSEMBLY__ | 49 | #ifndef __ASSEMBLY__ |
26 | /* Guest handles for primitive C types. */ | 50 | /* Guest handles for primitive C types. */ |
27 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 51 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
@@ -171,6 +195,10 @@ struct arch_vcpu_info { | |||
171 | unsigned long pad[5]; /* sizeof(struct vcpu_info) == 64 */ | 195 | unsigned long pad[5]; /* sizeof(struct vcpu_info) == 64 */ |
172 | }; | 196 | }; |
173 | 197 | ||
198 | struct xen_callback { | ||
199 | unsigned long cs; | ||
200 | unsigned long eip; | ||
201 | }; | ||
174 | #endif /* !__ASSEMBLY__ */ | 202 | #endif /* !__ASSEMBLY__ */ |
175 | 203 | ||
176 | /* | 204 | /* |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h new file mode 100644 index 000000000000..01799305f02a --- /dev/null +++ b/include/asm-x86/xen/page.h | |||
@@ -0,0 +1,168 @@ | |||
1 | #ifndef __XEN_PAGE_H | ||
2 | #define __XEN_PAGE_H | ||
3 | |||
4 | #include <linux/pfn.h> | ||
5 | |||
6 | #include <asm/uaccess.h> | ||
7 | #include <asm/pgtable.h> | ||
8 | |||
9 | #include <xen/features.h> | ||
10 | |||
11 | /* Xen machine address */ | ||
12 | typedef struct xmaddr { | ||
13 | phys_addr_t maddr; | ||
14 | } xmaddr_t; | ||
15 | |||
16 | /* Xen pseudo-physical address */ | ||
17 | typedef struct xpaddr { | ||
18 | phys_addr_t paddr; | ||
19 | } xpaddr_t; | ||
20 | |||
21 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | ||
22 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | ||
23 | |||
24 | /**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/ | ||
25 | #define INVALID_P2M_ENTRY (~0UL) | ||
26 | #define FOREIGN_FRAME_BIT (1UL<<31) | ||
27 | #define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT) | ||
28 | |||
29 | extern unsigned long *phys_to_machine_mapping; | ||
30 | |||
31 | static inline unsigned long pfn_to_mfn(unsigned long pfn) | ||
32 | { | ||
33 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
34 | return pfn; | ||
35 | |||
36 | return phys_to_machine_mapping[(unsigned int)(pfn)] & | ||
37 | ~FOREIGN_FRAME_BIT; | ||
38 | } | ||
39 | |||
40 | static inline int phys_to_machine_mapping_valid(unsigned long pfn) | ||
41 | { | ||
42 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
43 | return 1; | ||
44 | |||
45 | return (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY); | ||
46 | } | ||
47 | |||
48 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | ||
49 | { | ||
50 | unsigned long pfn; | ||
51 | |||
52 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
53 | return mfn; | ||
54 | |||
55 | #if 0 | ||
56 | if (unlikely((mfn >> machine_to_phys_order) != 0)) | ||
57 | return max_mapnr; | ||
58 | #endif | ||
59 | |||
60 | pfn = 0; | ||
61 | /* | ||
62 | * The array access can fail (e.g., device space beyond end of RAM). | ||
63 | * In such cases it doesn't matter what we return (we return garbage), | ||
64 | * but we must handle the fault without crashing! | ||
65 | */ | ||
66 | __get_user(pfn, &machine_to_phys_mapping[mfn]); | ||
67 | |||
68 | return pfn; | ||
69 | } | ||
70 | |||
71 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | ||
72 | { | ||
73 | unsigned offset = phys.paddr & ~PAGE_MASK; | ||
74 | return XMADDR(PFN_PHYS((u64)pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); | ||
75 | } | ||
76 | |||
77 | static inline xpaddr_t machine_to_phys(xmaddr_t machine) | ||
78 | { | ||
79 | unsigned offset = machine.maddr & ~PAGE_MASK; | ||
80 | return XPADDR(PFN_PHYS((u64)mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); | ||
81 | } | ||
82 | |||
83 | /* | ||
84 | * We detect special mappings in one of two ways: | ||
85 | * 1. If the MFN is an I/O page then Xen will set the m2p entry | ||
86 | * to be outside our maximum possible pseudophys range. | ||
87 | * 2. If the MFN belongs to a different domain then we will certainly | ||
88 | * not have MFN in our p2m table. Conversely, if the page is ours, | ||
89 | * then we'll have p2m(m2p(MFN))==MFN. | ||
90 | * If we detect a special mapping then it doesn't have a 'struct page'. | ||
91 | * We force !pfn_valid() by returning an out-of-range pointer. | ||
92 | * | ||
93 | * NB. These checks require that, for any MFN that is not in our reservation, | ||
94 | * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if | ||
95 | * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN. | ||
96 | * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety. | ||
97 | * | ||
98 | * NB2. When deliberately mapping foreign pages into the p2m table, you *must* | ||
99 | * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we | ||
100 | * require. In all the cases we care about, the FOREIGN_FRAME bit is | ||
101 | * masked (e.g., pfn_to_mfn()) so behaviour there is correct. | ||
102 | */ | ||
103 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | ||
104 | { | ||
105 | extern unsigned long max_mapnr; | ||
106 | unsigned long pfn = mfn_to_pfn(mfn); | ||
107 | if ((pfn < max_mapnr) | ||
108 | && !xen_feature(XENFEAT_auto_translated_physmap) | ||
109 | && (phys_to_machine_mapping[pfn] != mfn)) | ||
110 | return max_mapnr; /* force !pfn_valid() */ | ||
111 | return pfn; | ||
112 | } | ||
113 | |||
114 | static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
115 | { | ||
116 | if (xen_feature(XENFEAT_auto_translated_physmap)) { | ||
117 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
118 | return; | ||
119 | } | ||
120 | phys_to_machine_mapping[pfn] = mfn; | ||
121 | } | ||
122 | |||
123 | /* VIRT <-> MACHINE conversion */ | ||
124 | #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) | ||
125 | #define virt_to_mfn(v) (pfn_to_mfn(PFN_DOWN(__pa(v)))) | ||
126 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | ||
127 | |||
128 | static inline unsigned long pte_mfn(pte_t pte) | ||
129 | { | ||
130 | return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; | ||
131 | } | ||
132 | |||
133 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | ||
134 | { | ||
135 | pte_t pte; | ||
136 | |||
137 | pte.pte = ((phys_addr_t)page_nr << PAGE_SHIFT) | | ||
138 | (pgprot_val(pgprot) & __supported_pte_mask); | ||
139 | |||
140 | return pte; | ||
141 | } | ||
142 | |||
143 | static inline pteval_t pte_val_ma(pte_t pte) | ||
144 | { | ||
145 | return pte.pte; | ||
146 | } | ||
147 | |||
148 | static inline pte_t __pte_ma(pteval_t x) | ||
149 | { | ||
150 | return (pte_t) { .pte = x }; | ||
151 | } | ||
152 | |||
153 | #ifdef CONFIG_X86_PAE | ||
154 | #define pmd_val_ma(v) ((v).pmd) | ||
155 | #define pud_val_ma(v) ((v).pgd.pgd) | ||
156 | #define __pmd_ma(x) ((pmd_t) { (x) } ) | ||
157 | #else /* !X86_PAE */ | ||
158 | #define pmd_val_ma(v) ((v).pud.pgd.pgd) | ||
159 | #endif /* CONFIG_X86_PAE */ | ||
160 | |||
161 | #define pgd_val_ma(x) ((x).pgd) | ||
162 | |||
163 | |||
164 | xmaddr_t arbitrary_virt_to_machine(unsigned long address); | ||
165 | void make_lowmem_page_readonly(void *vaddr); | ||
166 | void make_lowmem_page_readwrite(void *vaddr); | ||
167 | |||
168 | #endif /* __XEN_PAGE_H */ | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index fabd16d03a27..cfb1627ac51c 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -301,7 +301,9 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
301 | */ | 301 | */ |
302 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 302 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
303 | 303 | ||
304 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | ||
304 | extern char *d_path(struct path *, char *, int); | 305 | extern char *d_path(struct path *, char *, int); |
306 | extern char *dentry_path(struct dentry *, char *, int); | ||
305 | 307 | ||
306 | /* Allocation counts.. */ | 308 | /* Allocation counts.. */ |
307 | 309 | ||
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index cb784579956b..ad3b787479a4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Sistina Software (UK) Limited. | 2 | * Copyright (C) 2001 Sistina Software (UK) Limited. |
3 | * Copyright (C) 2004 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This file is released under the LGPL. | 5 | * This file is released under the LGPL. |
6 | */ | 6 | */ |
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #include <linux/bio.h> | ||
14 | |||
13 | struct dm_target; | 15 | struct dm_target; |
14 | struct dm_table; | 16 | struct dm_table; |
15 | struct dm_dev; | 17 | struct dm_dev; |
@@ -250,11 +252,97 @@ void dm_table_event(struct dm_table *t); | |||
250 | */ | 252 | */ |
251 | int dm_swap_table(struct mapped_device *md, struct dm_table *t); | 253 | int dm_swap_table(struct mapped_device *md, struct dm_table *t); |
252 | 254 | ||
255 | /*----------------------------------------------------------------- | ||
256 | * Macros. | ||
257 | *---------------------------------------------------------------*/ | ||
258 | #define DM_NAME "device-mapper" | ||
259 | |||
260 | #define DMERR(f, arg...) \ | ||
261 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
262 | #define DMERR_LIMIT(f, arg...) \ | ||
263 | do { \ | ||
264 | if (printk_ratelimit()) \ | ||
265 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " \ | ||
266 | f "\n", ## arg); \ | ||
267 | } while (0) | ||
268 | |||
269 | #define DMWARN(f, arg...) \ | ||
270 | printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
271 | #define DMWARN_LIMIT(f, arg...) \ | ||
272 | do { \ | ||
273 | if (printk_ratelimit()) \ | ||
274 | printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " \ | ||
275 | f "\n", ## arg); \ | ||
276 | } while (0) | ||
277 | |||
278 | #define DMINFO(f, arg...) \ | ||
279 | printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
280 | #define DMINFO_LIMIT(f, arg...) \ | ||
281 | do { \ | ||
282 | if (printk_ratelimit()) \ | ||
283 | printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f \ | ||
284 | "\n", ## arg); \ | ||
285 | } while (0) | ||
286 | |||
287 | #ifdef CONFIG_DM_DEBUG | ||
288 | # define DMDEBUG(f, arg...) \ | ||
289 | printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg) | ||
290 | # define DMDEBUG_LIMIT(f, arg...) \ | ||
291 | do { \ | ||
292 | if (printk_ratelimit()) \ | ||
293 | printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX ": " f \ | ||
294 | "\n", ## arg); \ | ||
295 | } while (0) | ||
296 | #else | ||
297 | # define DMDEBUG(f, arg...) do {} while (0) | ||
298 | # define DMDEBUG_LIMIT(f, arg...) do {} while (0) | ||
299 | #endif | ||
300 | |||
301 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ | ||
302 | 0 : scnprintf(result + sz, maxlen - sz, x)) | ||
303 | |||
304 | #define SECTOR_SHIFT 9 | ||
305 | |||
306 | /* | ||
307 | * Definitions of return values from target end_io function. | ||
308 | */ | ||
309 | #define DM_ENDIO_INCOMPLETE 1 | ||
310 | #define DM_ENDIO_REQUEUE 2 | ||
311 | |||
312 | /* | ||
313 | * Definitions of return values from target map function. | ||
314 | */ | ||
315 | #define DM_MAPIO_SUBMITTED 0 | ||
316 | #define DM_MAPIO_REMAPPED 1 | ||
317 | #define DM_MAPIO_REQUEUE DM_ENDIO_REQUEUE | ||
318 | |||
319 | /* | ||
320 | * Ceiling(n / sz) | ||
321 | */ | ||
322 | #define dm_div_up(n, sz) (((n) + (sz) - 1) / (sz)) | ||
323 | |||
324 | #define dm_sector_div_up(n, sz) ( \ | ||
325 | { \ | ||
326 | sector_t _r = ((n) + (sz) - 1); \ | ||
327 | sector_div(_r, (sz)); \ | ||
328 | _r; \ | ||
329 | } \ | ||
330 | ) | ||
331 | |||
253 | /* | 332 | /* |
254 | * Prepare a table for a device that will error all I/O. | 333 | * ceiling(n / size) * size |
255 | * To make it active, call dm_suspend(), dm_swap_table() then dm_resume(). | ||
256 | */ | 334 | */ |
257 | int dm_create_error_table(struct dm_table **result, struct mapped_device *md); | 335 | #define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz)) |
336 | |||
337 | static inline sector_t to_sector(unsigned long n) | ||
338 | { | ||
339 | return (n >> SECTOR_SHIFT); | ||
340 | } | ||
341 | |||
342 | static inline unsigned long to_bytes(sector_t n) | ||
343 | { | ||
344 | return (n << SECTOR_SHIFT); | ||
345 | } | ||
258 | 346 | ||
259 | #endif /* __KERNEL__ */ | 347 | #endif /* __KERNEL__ */ |
260 | #endif /* _LINUX_DEVICE_MAPPER_H */ | 348 | #endif /* _LINUX_DEVICE_MAPPER_H */ |
diff --git a/include/linux/dm-dirty-log.h b/include/linux/dm-dirty-log.h new file mode 100644 index 000000000000..600c5fb2daad --- /dev/null +++ b/include/linux/dm-dirty-log.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2003 Sistina Software | ||
3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * Device-Mapper dirty region log. | ||
6 | * | ||
7 | * This file is released under the LGPL. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_DM_DIRTY_LOG | ||
11 | #define _LINUX_DM_DIRTY_LOG | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/device-mapper.h> | ||
17 | |||
18 | typedef sector_t region_t; | ||
19 | |||
20 | struct dm_dirty_log_type; | ||
21 | |||
22 | struct dm_dirty_log { | ||
23 | struct dm_dirty_log_type *type; | ||
24 | void *context; | ||
25 | }; | ||
26 | |||
27 | struct dm_dirty_log_type { | ||
28 | const char *name; | ||
29 | struct module *module; | ||
30 | |||
31 | int (*ctr)(struct dm_dirty_log *log, struct dm_target *ti, | ||
32 | unsigned argc, char **argv); | ||
33 | void (*dtr)(struct dm_dirty_log *log); | ||
34 | |||
35 | /* | ||
36 | * There are times when we don't want the log to touch | ||
37 | * the disk. | ||
38 | */ | ||
39 | int (*presuspend)(struct dm_dirty_log *log); | ||
40 | int (*postsuspend)(struct dm_dirty_log *log); | ||
41 | int (*resume)(struct dm_dirty_log *log); | ||
42 | |||
43 | /* | ||
44 | * Retrieves the smallest size of region that the log can | ||
45 | * deal with. | ||
46 | */ | ||
47 | uint32_t (*get_region_size)(struct dm_dirty_log *log); | ||
48 | |||
49 | /* | ||
50 | * A predicate to say whether a region is clean or not. | ||
51 | * May block. | ||
52 | */ | ||
53 | int (*is_clean)(struct dm_dirty_log *log, region_t region); | ||
54 | |||
55 | /* | ||
56 | * Returns: 0, 1, -EWOULDBLOCK, < 0 | ||
57 | * | ||
58 | * A predicate function to check the area given by | ||
59 | * [sector, sector + len) is in sync. | ||
60 | * | ||
61 | * If -EWOULDBLOCK is returned the state of the region is | ||
62 | * unknown, typically this will result in a read being | ||
63 | * passed to a daemon to deal with, since a daemon is | ||
64 | * allowed to block. | ||
65 | */ | ||
66 | int (*in_sync)(struct dm_dirty_log *log, region_t region, | ||
67 | int can_block); | ||
68 | |||
69 | /* | ||
70 | * Flush the current log state (eg, to disk). This | ||
71 | * function may block. | ||
72 | */ | ||
73 | int (*flush)(struct dm_dirty_log *log); | ||
74 | |||
75 | /* | ||
76 | * Mark an area as clean or dirty. These functions may | ||
77 | * block, though for performance reasons blocking should | ||
78 | * be extremely rare (eg, allocating another chunk of | ||
79 | * memory for some reason). | ||
80 | */ | ||
81 | void (*mark_region)(struct dm_dirty_log *log, region_t region); | ||
82 | void (*clear_region)(struct dm_dirty_log *log, region_t region); | ||
83 | |||
84 | /* | ||
85 | * Returns: <0 (error), 0 (no region), 1 (region) | ||
86 | * | ||
87 | * The mirrord will need perform recovery on regions of | ||
88 | * the mirror that are in the NOSYNC state. This | ||
89 | * function asks the log to tell the caller about the | ||
90 | * next region that this machine should recover. | ||
91 | * | ||
92 | * Do not confuse this function with 'in_sync()', one | ||
93 | * tells you if an area is synchronised, the other | ||
94 | * assigns recovery work. | ||
95 | */ | ||
96 | int (*get_resync_work)(struct dm_dirty_log *log, region_t *region); | ||
97 | |||
98 | /* | ||
99 | * This notifies the log that the resync status of a region | ||
100 | * has changed. It also clears the region from the recovering | ||
101 | * list (if present). | ||
102 | */ | ||
103 | void (*set_region_sync)(struct dm_dirty_log *log, | ||
104 | region_t region, int in_sync); | ||
105 | |||
106 | /* | ||
107 | * Returns the number of regions that are in sync. | ||
108 | */ | ||
109 | region_t (*get_sync_count)(struct dm_dirty_log *log); | ||
110 | |||
111 | /* | ||
112 | * Support function for mirror status requests. | ||
113 | */ | ||
114 | int (*status)(struct dm_dirty_log *log, status_type_t status_type, | ||
115 | char *result, unsigned maxlen); | ||
116 | }; | ||
117 | |||
118 | int dm_dirty_log_type_register(struct dm_dirty_log_type *type); | ||
119 | int dm_dirty_log_type_unregister(struct dm_dirty_log_type *type); | ||
120 | |||
121 | /* | ||
122 | * Make sure you use these two functions, rather than calling | ||
123 | * type->constructor/destructor() directly. | ||
124 | */ | ||
125 | struct dm_dirty_log *dm_dirty_log_create(const char *type_name, | ||
126 | struct dm_target *ti, | ||
127 | unsigned argc, char **argv); | ||
128 | void dm_dirty_log_destroy(struct dm_dirty_log *log); | ||
129 | |||
130 | #endif /* __KERNEL__ */ | ||
131 | #endif /* _LINUX_DM_DIRTY_LOG_H */ | ||
diff --git a/include/linux/dm-io.h b/include/linux/dm-io.h new file mode 100644 index 000000000000..b6bf17ee2f61 --- /dev/null +++ b/include/linux/dm-io.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2003 Sistina Software | ||
3 | * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * Device-Mapper low-level I/O. | ||
6 | * | ||
7 | * This file is released under the GPL. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_DM_IO_H | ||
11 | #define _LINUX_DM_IO_H | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | |||
17 | struct dm_io_region { | ||
18 | struct block_device *bdev; | ||
19 | sector_t sector; | ||
20 | sector_t count; /* If this is zero the region is ignored. */ | ||
21 | }; | ||
22 | |||
23 | struct page_list { | ||
24 | struct page_list *next; | ||
25 | struct page *page; | ||
26 | }; | ||
27 | |||
28 | typedef void (*io_notify_fn)(unsigned long error, void *context); | ||
29 | |||
30 | enum dm_io_mem_type { | ||
31 | DM_IO_PAGE_LIST,/* Page list */ | ||
32 | DM_IO_BVEC, /* Bio vector */ | ||
33 | DM_IO_VMA, /* Virtual memory area */ | ||
34 | DM_IO_KMEM, /* Kernel memory */ | ||
35 | }; | ||
36 | |||
37 | struct dm_io_memory { | ||
38 | enum dm_io_mem_type type; | ||
39 | |||
40 | union { | ||
41 | struct page_list *pl; | ||
42 | struct bio_vec *bvec; | ||
43 | void *vma; | ||
44 | void *addr; | ||
45 | } ptr; | ||
46 | |||
47 | unsigned offset; | ||
48 | }; | ||
49 | |||
50 | struct dm_io_notify { | ||
51 | io_notify_fn fn; /* Callback for asynchronous requests */ | ||
52 | void *context; /* Passed to callback */ | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * IO request structure | ||
57 | */ | ||
58 | struct dm_io_client; | ||
59 | struct dm_io_request { | ||
60 | int bi_rw; /* READ|WRITE - not READA */ | ||
61 | struct dm_io_memory mem; /* Memory to use for io */ | ||
62 | struct dm_io_notify notify; /* Synchronous if notify.fn is NULL */ | ||
63 | struct dm_io_client *client; /* Client memory handler */ | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * For async io calls, users can alternatively use the dm_io() function below | ||
68 | * and dm_io_client_create() to create private mempools for the client. | ||
69 | * | ||
70 | * Create/destroy may block. | ||
71 | */ | ||
72 | struct dm_io_client *dm_io_client_create(unsigned num_pages); | ||
73 | int dm_io_client_resize(unsigned num_pages, struct dm_io_client *client); | ||
74 | void dm_io_client_destroy(struct dm_io_client *client); | ||
75 | |||
76 | /* | ||
77 | * IO interface using private per-client pools. | ||
78 | * Each bit in the optional 'sync_error_bits' bitset indicates whether an | ||
79 | * error occurred doing io to the corresponding region. | ||
80 | */ | ||
81 | int dm_io(struct dm_io_request *io_req, unsigned num_regions, | ||
82 | struct dm_io_region *region, unsigned long *sync_error_bits); | ||
83 | |||
84 | #endif /* __KERNEL__ */ | ||
85 | #endif /* _LINUX_DM_IO_H */ | ||
diff --git a/include/linux/dm-kcopyd.h b/include/linux/dm-kcopyd.h new file mode 100644 index 000000000000..5db216311695 --- /dev/null +++ b/include/linux/dm-kcopyd.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 - 2003 Sistina Software | ||
3 | * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * kcopyd provides a simple interface for copying an area of one | ||
6 | * block-device to one or more other block-devices, either synchronous | ||
7 | * or with an asynchronous completion notification. | ||
8 | * | ||
9 | * This file is released under the GPL. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_DM_KCOPYD_H | ||
13 | #define _LINUX_DM_KCOPYD_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/dm-io.h> | ||
18 | |||
19 | /* FIXME: make this configurable */ | ||
20 | #define DM_KCOPYD_MAX_REGIONS 8 | ||
21 | |||
22 | #define DM_KCOPYD_IGNORE_ERROR 1 | ||
23 | |||
24 | /* | ||
25 | * To use kcopyd you must first create a dm_kcopyd_client object. | ||
26 | */ | ||
27 | struct dm_kcopyd_client; | ||
28 | int dm_kcopyd_client_create(unsigned num_pages, | ||
29 | struct dm_kcopyd_client **result); | ||
30 | void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc); | ||
31 | |||
32 | /* | ||
33 | * Submit a copy job to kcopyd. This is built on top of the | ||
34 | * previous three fns. | ||
35 | * | ||
36 | * read_err is a boolean, | ||
37 | * write_err is a bitset, with 1 bit for each destination region | ||
38 | */ | ||
39 | typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err, | ||
40 | void *context); | ||
41 | |||
42 | int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from, | ||
43 | unsigned num_dests, struct dm_io_region *dests, | ||
44 | unsigned flags, dm_kcopyd_notify_fn fn, void *context); | ||
45 | |||
46 | #endif /* __KERNEL__ */ | ||
47 | #endif /* _LINUX_DM_KCOPYD_H */ | ||
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index c6a2353c4e68..402fb7a8d922 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h | |||
@@ -39,9 +39,10 @@ typedef enum | |||
39 | DMX_OUT_DECODER, /* Streaming directly to decoder. */ | 39 | DMX_OUT_DECODER, /* Streaming directly to decoder. */ |
40 | DMX_OUT_TAP, /* Output going to a memory buffer */ | 40 | DMX_OUT_TAP, /* Output going to a memory buffer */ |
41 | /* (to be retrieved via the read command).*/ | 41 | /* (to be retrieved via the read command).*/ |
42 | DMX_OUT_TS_TAP /* Output multiplexed into a new TS */ | 42 | DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */ |
43 | /* (to be retrieved by reading from the */ | 43 | /* (to be retrieved by reading from the */ |
44 | /* logical DVR device). */ | 44 | /* logical DVR device). */ |
45 | DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */ | ||
45 | } dmx_output_t; | 46 | } dmx_output_t; |
46 | 47 | ||
47 | 48 | ||
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index adcbb05b120b..de8387b7ceb6 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -43,7 +43,7 @@ struct fid { | |||
43 | u32 parent_ino; | 43 | u32 parent_ino; |
44 | u32 parent_gen; | 44 | u32 parent_gen; |
45 | } i32; | 45 | } i32; |
46 | __u32 raw[6]; | 46 | __u32 raw[0]; |
47 | }; | 47 | }; |
48 | }; | 48 | }; |
49 | 49 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index cc2be2cf7d41..6556f2f967e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -973,6 +973,7 @@ extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, | |||
973 | /* fs/locks.c */ | 973 | /* fs/locks.c */ |
974 | extern void locks_init_lock(struct file_lock *); | 974 | extern void locks_init_lock(struct file_lock *); |
975 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 975 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
976 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | ||
976 | extern void locks_remove_posix(struct file *, fl_owner_t); | 977 | extern void locks_remove_posix(struct file *, fl_owner_t); |
977 | extern void locks_remove_flock(struct file *); | 978 | extern void locks_remove_flock(struct file *); |
978 | extern void posix_test_lock(struct file *, struct file_lock *); | 979 | extern void posix_test_lock(struct file *, struct file_lock *); |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index b979112f74e0..32eb8bbe4831 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | 125 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ |
126 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ | 126 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ |
127 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | 127 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ |
128 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | ||
128 | 129 | ||
129 | /* --- PCF 8584 based algorithms */ | 130 | /* --- PCF 8584 based algorithms */ |
130 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ | 131 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index f27d11ab418b..529f301d9372 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -465,13 +465,19 @@ enum ieee80211_eid { | |||
465 | WLAN_EID_TS_DELAY = 43, | 465 | WLAN_EID_TS_DELAY = 43, |
466 | WLAN_EID_TCLAS_PROCESSING = 44, | 466 | WLAN_EID_TCLAS_PROCESSING = 44, |
467 | WLAN_EID_QOS_CAPA = 46, | 467 | WLAN_EID_QOS_CAPA = 46, |
468 | /* 802.11s */ | 468 | /* 802.11s |
469 | WLAN_EID_MESH_CONFIG = 36, /* Pending IEEE 802.11 ANA approval */ | 469 | * |
470 | WLAN_EID_MESH_ID = 37, /* Pending IEEE 802.11 ANA approval */ | 470 | * All mesh EID numbers are pending IEEE 802.11 ANA approval. |
471 | WLAN_EID_PEER_LINK = 40, /* Pending IEEE 802.11 ANA approval */ | 471 | * The numbers have been incremented from those suggested in |
472 | WLAN_EID_PREQ = 53, /* Pending IEEE 802.11 ANA approval */ | 472 | * 802.11s/D2.0 so that MESH_CONFIG does not conflict with |
473 | WLAN_EID_PREP = 54, /* Pending IEEE 802.11 ANA approval */ | 473 | * EXT_SUPP_RATES. |
474 | WLAN_EID_PERR = 55, /* Pending IEEE 802.11 ANA approval */ | 474 | */ |
475 | WLAN_EID_MESH_CONFIG = 51, | ||
476 | WLAN_EID_MESH_ID = 52, | ||
477 | WLAN_EID_PEER_LINK = 55, | ||
478 | WLAN_EID_PREQ = 68, | ||
479 | WLAN_EID_PREP = 69, | ||
480 | WLAN_EID_PERR = 70, | ||
475 | /* 802.11h */ | 481 | /* 802.11h */ |
476 | WLAN_EID_PWR_CONSTRAINT = 32, | 482 | WLAN_EID_PWR_CONSTRAINT = 32, |
477 | WLAN_EID_PWR_CAPABILITY = 33, | 483 | WLAN_EID_PWR_CAPABILITY = 33, |
diff --git a/include/linux/input.h b/include/linux/input.h index cae2c35d1206..28a094fcfe20 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1025,10 +1025,6 @@ struct ff_effect { | |||
1025 | * @node: used to place the device onto input_dev_list | 1025 | * @node: used to place the device onto input_dev_list |
1026 | */ | 1026 | */ |
1027 | struct input_dev { | 1027 | struct input_dev { |
1028 | /* private: */ | ||
1029 | void *private; /* do not use */ | ||
1030 | /* public: */ | ||
1031 | |||
1032 | const char *name; | 1028 | const char *name; |
1033 | const char *phys; | 1029 | const char *phys; |
1034 | const char *uniq; | 1030 | const char *uniq; |
@@ -1238,12 +1234,12 @@ static inline void input_put_device(struct input_dev *dev) | |||
1238 | 1234 | ||
1239 | static inline void *input_get_drvdata(struct input_dev *dev) | 1235 | static inline void *input_get_drvdata(struct input_dev *dev) |
1240 | { | 1236 | { |
1241 | return dev->private; | 1237 | return dev_get_drvdata(&dev->dev); |
1242 | } | 1238 | } |
1243 | 1239 | ||
1244 | static inline void input_set_drvdata(struct input_dev *dev, void *data) | 1240 | static inline void input_set_drvdata(struct input_dev *dev, void *data) |
1245 | { | 1241 | { |
1246 | dev->private = data; | 1242 | dev_set_drvdata(&dev->dev, data); |
1247 | } | 1243 | } |
1248 | 1244 | ||
1249 | int __must_check input_register_device(struct input_dev *); | 1245 | int __must_check input_register_device(struct input_dev *); |
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index 65c2d70853e9..a3c984d780f0 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -33,6 +33,7 @@ struct keyboard_notifier_param { | |||
33 | struct vc_data *vc; /* VC on which the keyboard press was done */ | 33 | struct vc_data *vc; /* VC on which the keyboard press was done */ |
34 | int down; /* Pressure of the key? */ | 34 | int down; /* Pressure of the key? */ |
35 | int shift; /* Current shift mask */ | 35 | int shift; /* Current shift mask */ |
36 | int ledstate; /* Current led state */ | ||
36 | unsigned int value; /* keycode, unicode value or keysym */ | 37 | unsigned int value; /* keycode, unicode value or keysym */ |
37 | }; | 38 | }; |
38 | 39 | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index b07e3d400bd6..519df72e939d 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -35,8 +35,11 @@ struct led_classdev { | |||
35 | #define LED_SUSPENDED (1 << 0) | 35 | #define LED_SUSPENDED (1 << 0) |
36 | 36 | ||
37 | /* Set LED brightness level */ | 37 | /* Set LED brightness level */ |
38 | /* Must not sleep, use a workqueue if needed */ | ||
38 | void (*brightness_set)(struct led_classdev *led_cdev, | 39 | void (*brightness_set)(struct led_classdev *led_cdev, |
39 | enum led_brightness brightness); | 40 | enum led_brightness brightness); |
41 | /* Get LED brightness level */ | ||
42 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | ||
40 | 43 | ||
41 | /* Activate hardware accelerated blink */ | 44 | /* Activate hardware accelerated blink */ |
42 | int (*blink_set)(struct led_classdev *led_cdev, | 45 | int (*blink_set)(struct led_classdev *led_cdev, |
@@ -126,6 +129,9 @@ struct gpio_led { | |||
126 | struct gpio_led_platform_data { | 129 | struct gpio_led_platform_data { |
127 | int num_leds; | 130 | int num_leds; |
128 | struct gpio_led *leds; | 131 | struct gpio_led *leds; |
132 | int (*gpio_blink_set)(unsigned gpio, | ||
133 | unsigned long *delay_on, | ||
134 | unsigned long *delay_off); | ||
129 | }; | 135 | }; |
130 | 136 | ||
131 | 137 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 07ed56f7a767..395a523d8c30 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -847,7 +847,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) | |||
847 | return ap->ops == &ata_dummy_port_ops; | 847 | return ap->ops == &ata_dummy_port_ops; |
848 | } | 848 | } |
849 | 849 | ||
850 | extern void sata_print_link_status(struct ata_link *link); | ||
851 | extern void ata_port_probe(struct ata_port *); | 850 | extern void ata_port_probe(struct ata_port *); |
852 | extern int sata_set_spd(struct ata_link *link); | 851 | extern int sata_set_spd(struct ata_link *link); |
853 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); | 852 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 4babb2a129ac..102d928f7206 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -91,6 +91,7 @@ struct nlm_wait; | |||
91 | */ | 91 | */ |
92 | #define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u) | 92 | #define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u) |
93 | struct nlm_rqst { | 93 | struct nlm_rqst { |
94 | atomic_t a_count; | ||
94 | unsigned int a_flags; /* initial RPC task flags */ | 95 | unsigned int a_flags; /* initial RPC task flags */ |
95 | struct nlm_host * a_host; /* host handle */ | 96 | struct nlm_host * a_host; /* host handle */ |
96 | struct nlm_args a_args; /* arguments */ | 97 | struct nlm_args a_args; /* arguments */ |
@@ -173,8 +174,10 @@ void nlmclnt_next_cookie(struct nlm_cookie *); | |||
173 | /* | 174 | /* |
174 | * Host cache | 175 | * Host cache |
175 | */ | 176 | */ |
176 | struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *, int, int, | 177 | struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *sin, |
177 | const char *, unsigned int); | 178 | int proto, u32 version, |
179 | const char *hostname, | ||
180 | unsigned int hostname_len); | ||
178 | struct nlm_host *nlmsvc_lookup_host(struct svc_rqst *, const char *, | 181 | struct nlm_host *nlmsvc_lookup_host(struct svc_rqst *, const char *, |
179 | unsigned int); | 182 | unsigned int); |
180 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); | 183 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); |
@@ -191,7 +194,7 @@ void nsm_release(struct nsm_handle *); | |||
191 | * This is used in garbage collection and resource reclaim | 194 | * This is used in garbage collection and resource reclaim |
192 | * A return value != 0 means destroy the lock/block/share | 195 | * A return value != 0 means destroy the lock/block/share |
193 | */ | 196 | */ |
194 | typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref); | 197 | typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); |
195 | 198 | ||
196 | /* | 199 | /* |
197 | * Server-side lock handling | 200 | * Server-side lock handling |
@@ -217,8 +220,13 @@ void nlmsvc_mark_resources(void); | |||
217 | void nlmsvc_free_host_resources(struct nlm_host *); | 220 | void nlmsvc_free_host_resources(struct nlm_host *); |
218 | void nlmsvc_invalidate_all(void); | 221 | void nlmsvc_invalidate_all(void); |
219 | 222 | ||
220 | static __inline__ struct inode * | 223 | /* |
221 | nlmsvc_file_inode(struct nlm_file *file) | 224 | * Cluster failover support |
225 | */ | ||
226 | int nlmsvc_unlock_all_by_sb(struct super_block *sb); | ||
227 | int nlmsvc_unlock_all_by_ip(__be32 server_addr); | ||
228 | |||
229 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) | ||
222 | { | 230 | { |
223 | return file->f_file->f_path.dentry->d_inode; | 231 | return file->f_file->f_path.dentry->d_inode; |
224 | } | 232 | } |
@@ -226,8 +234,8 @@ nlmsvc_file_inode(struct nlm_file *file) | |||
226 | /* | 234 | /* |
227 | * Compare two host addresses (needs modifying for ipv6) | 235 | * Compare two host addresses (needs modifying for ipv6) |
228 | */ | 236 | */ |
229 | static __inline__ int | 237 | static inline int nlm_cmp_addr(const struct sockaddr_in *sin1, |
230 | nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) | 238 | const struct sockaddr_in *sin2) |
231 | { | 239 | { |
232 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 240 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
233 | } | 241 | } |
@@ -236,8 +244,8 @@ nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) | |||
236 | * Compare two NLM locks. | 244 | * Compare two NLM locks. |
237 | * When the second lock is of type F_UNLCK, this acts like a wildcard. | 245 | * When the second lock is of type F_UNLCK, this acts like a wildcard. |
238 | */ | 246 | */ |
239 | static __inline__ int | 247 | static inline int nlm_compare_locks(const struct file_lock *fl1, |
240 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) | 248 | const struct file_lock *fl2) |
241 | { | 249 | { |
242 | return fl1->fl_pid == fl2->fl_pid | 250 | return fl1->fl_pid == fl2->fl_pid |
243 | && fl1->fl_owner == fl2->fl_owner | 251 | && fl1->fl_owner == fl2->fl_owner |
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/sm_inter.h index 22a645828f26..5a5448bdb17d 100644 --- a/include/linux/lockd/sm_inter.h +++ b/include/linux/lockd/sm_inter.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define SM_NOTIFY 6 | 19 | #define SM_NOTIFY 6 |
20 | 20 | ||
21 | #define SM_MAXSTRLEN 1024 | 21 | #define SM_MAXSTRLEN 1024 |
22 | #define SM_PRIV_SIZE 16 | ||
22 | 23 | ||
23 | /* | 24 | /* |
24 | * Arguments for all calls to statd | 25 | * Arguments for all calls to statd |
diff --git a/include/linux/meye.h b/include/linux/meye.h index 39fd9c8ddd4b..12010ace1f04 100644 --- a/include/linux/meye.h +++ b/include/linux/meye.h | |||
@@ -58,7 +58,7 @@ struct meye_params { | |||
58 | 58 | ||
59 | /* V4L2 private controls */ | 59 | /* V4L2 private controls */ |
60 | #define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE | 60 | #define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE |
61 | #define V4L2_CID_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1) | 61 | #define V4L2_CID_MEYE_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1) |
62 | #define V4L2_CID_PICTURE (V4L2_CID_PRIVATE_BASE + 2) | 62 | #define V4L2_CID_PICTURE (V4L2_CID_PRIVATE_BASE + 2) |
63 | #define V4L2_CID_JPEGQUAL (V4L2_CID_PRIVATE_BASE + 3) | 63 | #define V4L2_CID_JPEGQUAL (V4L2_CID_PRIVATE_BASE + 3) |
64 | #define V4L2_CID_FRAMERATE (V4L2_CID_PRIVATE_BASE + 4) | 64 | #define V4L2_CID_FRAMERATE (V4L2_CID_PRIVATE_BASE + 4) |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 8eed44f8ca73..830bbcd449d6 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/mount.h> | 5 | #include <linux/mount.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/nsproxy.h> | 7 | #include <linux/nsproxy.h> |
8 | #include <linux/seq_file.h> | ||
8 | 9 | ||
9 | struct mnt_namespace { | 10 | struct mnt_namespace { |
10 | atomic_t count; | 11 | atomic_t count; |
@@ -14,6 +15,13 @@ struct mnt_namespace { | |||
14 | int event; | 15 | int event; |
15 | }; | 16 | }; |
16 | 17 | ||
18 | struct proc_mounts { | ||
19 | struct seq_file m; /* must be the first element */ | ||
20 | struct mnt_namespace *ns; | ||
21 | struct path root; | ||
22 | int event; | ||
23 | }; | ||
24 | |||
17 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 25 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
18 | struct fs_struct *); | 26 | struct fs_struct *); |
19 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 27 | extern void __put_mnt_ns(struct mnt_namespace *ns); |
@@ -37,5 +45,9 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) | |||
37 | atomic_inc(&ns->count); | 45 | atomic_inc(&ns->count); |
38 | } | 46 | } |
39 | 47 | ||
48 | extern const struct seq_operations mounts_op; | ||
49 | extern const struct seq_operations mountinfo_op; | ||
50 | extern const struct seq_operations mountstats_op; | ||
51 | |||
40 | #endif | 52 | #endif |
41 | #endif | 53 | #endif |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 87b24cea1863..b4836d58f428 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -56,6 +56,8 @@ struct vfsmount { | |||
56 | struct list_head mnt_slave; /* slave list entry */ | 56 | struct list_head mnt_slave; /* slave list entry */ |
57 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 57 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
58 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 58 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
59 | int mnt_id; /* mount identifier */ | ||
60 | int mnt_group_id; /* peer group identifier */ | ||
59 | /* | 61 | /* |
60 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | 62 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount |
61 | * to let these frequently modified fields in a separate cache line | 63 | * to let these frequently modified fields in a separate cache line |
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index 6977780e548f..85fd041d44ad 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -57,6 +57,11 @@ extern char inftlmountrev[]; | |||
57 | void INFTL_dumptables(struct INFTLrecord *s); | 57 | void INFTL_dumptables(struct INFTLrecord *s); |
58 | void INFTL_dumpVUchains(struct INFTLrecord *s); | 58 | void INFTL_dumpVUchains(struct INFTLrecord *s); |
59 | 59 | ||
60 | int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
61 | size_t *retlen, uint8_t *buf); | ||
62 | int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
63 | size_t *retlen, uint8_t *buf); | ||
64 | |||
60 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
61 | 66 | ||
62 | #endif /* __MTD_INFTL_H__ */ | 67 | #endif /* __MTD_INFTL_H__ */ |
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h index bcf2fb3fa4a7..001eec50cac6 100644 --- a/include/linux/mtd/nftl.h +++ b/include/linux/mtd/nftl.h | |||
@@ -43,6 +43,11 @@ struct NFTLrecord { | |||
43 | int NFTL_mount(struct NFTLrecord *s); | 43 | int NFTL_mount(struct NFTLrecord *s); |
44 | int NFTL_formatblock(struct NFTLrecord *s, int block); | 44 | int NFTL_formatblock(struct NFTLrecord *s, int block); |
45 | 45 | ||
46 | int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
47 | size_t *retlen, uint8_t *buf); | ||
48 | int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
49 | size_t *retlen, uint8_t *buf); | ||
50 | |||
46 | #ifndef NFTL_MAJOR | 51 | #ifndef NFTL_MAJOR |
47 | #define NFTL_MAJOR 93 | 52 | #define NFTL_MAJOR 93 |
48 | #endif | 53 | #endif |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index fd0a260e070b..9aa2a9149b58 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -187,4 +187,7 @@ struct onenand_manufacturers { | |||
187 | char *name; | 187 | char *name; |
188 | }; | 188 | }; |
189 | 189 | ||
190 | int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, | ||
191 | struct mtd_oob_ops *ops); | ||
192 | |||
190 | #endif /* __LINUX_MTD_ONENAND_H */ | 193 | #endif /* __LINUX_MTD_ONENAND_H */ |
diff --git a/include/linux/mtd/plat-ram.h b/include/linux/mtd/plat-ram.h index 9667863bd7e3..0e37ad07bce2 100644 --- a/include/linux/mtd/plat-ram.h +++ b/include/linux/mtd/plat-ram.h | |||
@@ -21,8 +21,9 @@ | |||
21 | #define PLATRAM_RW (1) | 21 | #define PLATRAM_RW (1) |
22 | 22 | ||
23 | struct platdata_mtd_ram { | 23 | struct platdata_mtd_ram { |
24 | char *mapname; | 24 | const char *mapname; |
25 | char **probes; | 25 | const char **map_probes; |
26 | const char **probes; | ||
26 | struct mtd_partition *partitions; | 27 | struct mtd_partition *partitions; |
27 | int nr_partitions; | 28 | int nr_partitions; |
28 | int bankwidth; | 29 | int bankwidth; |
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h index 7f11fa589207..539f3b550eab 100644 --- a/include/linux/nfs3.h +++ b/include/linux/nfs3.h | |||
@@ -96,7 +96,7 @@ struct nfs3_fh { | |||
96 | #define MOUNTPROC3_UMNTALL 4 | 96 | #define MOUNTPROC3_UMNTALL 4 |
97 | 97 | ||
98 | 98 | ||
99 | #if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES) | 99 | #if defined(__KERNEL__) |
100 | 100 | ||
101 | /* Number of 32bit words in post_op_attr */ | 101 | /* Number of 32bit words in post_op_attr */ |
102 | #define NFS3_POST_OP_ATTR_WORDS 22 | 102 | #define NFS3_POST_OP_ATTR_WORDS 22 |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f4a0e4c218df..27d6a8d98cef 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -430,7 +430,6 @@ extern void nfs_unregister_sysctl(void); | |||
430 | /* | 430 | /* |
431 | * linux/fs/nfs/namespace.c | 431 | * linux/fs/nfs/namespace.c |
432 | */ | 432 | */ |
433 | extern struct list_head nfs_automount_list; | ||
434 | extern const struct inode_operations nfs_mountpoint_inode_operations; | 433 | extern const struct inode_operations nfs_mountpoint_inode_operations; |
435 | extern const struct inode_operations nfs_referral_inode_operations; | 434 | extern const struct inode_operations nfs_referral_inode_operations; |
436 | extern int nfs_mountpoint_expiry_timeout; | 435 | extern int nfs_mountpoint_expiry_timeout; |
@@ -466,9 +465,9 @@ extern int nfs_wb_page(struct inode *inode, struct page* page); | |||
466 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | 465 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); |
467 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 466 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
468 | extern int nfs_commit_inode(struct inode *, int); | 467 | extern int nfs_commit_inode(struct inode *, int); |
469 | extern struct nfs_write_data *nfs_commit_alloc(void); | 468 | extern struct nfs_write_data *nfs_commitdata_alloc(void); |
470 | extern void nfs_commit_free(struct nfs_write_data *wdata); | 469 | extern void nfs_commit_free(struct nfs_write_data *wdata); |
471 | extern void nfs_commit_release(void *wdata); | 470 | extern void nfs_commitdata_release(void *wdata); |
472 | #else | 471 | #else |
473 | static inline int | 472 | static inline int |
474 | nfs_commit_inode(struct inode *inode, int how) | 473 | nfs_commit_inode(struct inode *inode, int how) |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 3423c6761bf7..c9beacd16c00 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -32,6 +32,8 @@ struct nfs_client { | |||
32 | const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ | 32 | const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ |
33 | int cl_proto; /* Network transport protocol */ | 33 | int cl_proto; /* Network transport protocol */ |
34 | 34 | ||
35 | struct rpc_cred *cl_machine_cred; | ||
36 | |||
35 | #ifdef CONFIG_NFS_V4 | 37 | #ifdef CONFIG_NFS_V4 |
36 | u64 cl_clientid; /* constant */ | 38 | u64 cl_clientid; /* constant */ |
37 | nfs4_verifier cl_confirm; | 39 | nfs4_verifier cl_confirm; |
@@ -93,6 +95,7 @@ struct nfs_server { | |||
93 | unsigned int wpages; /* write size (in pages) */ | 95 | unsigned int wpages; /* write size (in pages) */ |
94 | unsigned int wtmult; /* server disk block size */ | 96 | unsigned int wtmult; /* server disk block size */ |
95 | unsigned int dtsize; /* readdir size */ | 97 | unsigned int dtsize; /* readdir size */ |
98 | unsigned short port; /* "port=" setting */ | ||
96 | unsigned int bsize; /* server block size */ | 99 | unsigned int bsize; /* server block size */ |
97 | unsigned int acregmin; /* attr cache timeouts */ | 100 | unsigned int acregmin; /* attr cache timeouts */ |
98 | unsigned int acregmax; | 101 | unsigned int acregmax; |
@@ -117,6 +120,13 @@ struct nfs_server { | |||
117 | 120 | ||
118 | atomic_t active; /* Keep trace of any activity to this server */ | 121 | atomic_t active; /* Keep trace of any activity to this server */ |
119 | wait_queue_head_t active_wq; /* Wait for any activity to stop */ | 122 | wait_queue_head_t active_wq; /* Wait for any activity to stop */ |
123 | |||
124 | /* mountd-related mount options */ | ||
125 | struct sockaddr_storage mountd_address; | ||
126 | size_t mountd_addrlen; | ||
127 | u32 mountd_version; | ||
128 | unsigned short mountd_port; | ||
129 | unsigned short mountd_protocol; | ||
120 | }; | 130 | }; |
121 | 131 | ||
122 | /* Server capabilities */ | 132 | /* Server capabilities */ |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index f301d0b8babc..24263bb8e0be 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -140,6 +140,7 @@ struct nfs_openres { | |||
140 | __u32 rflags; | 140 | __u32 rflags; |
141 | struct nfs_fattr * f_attr; | 141 | struct nfs_fattr * f_attr; |
142 | struct nfs_fattr * dir_attr; | 142 | struct nfs_fattr * dir_attr; |
143 | struct nfs_seqid * seqid; | ||
143 | const struct nfs_server *server; | 144 | const struct nfs_server *server; |
144 | int delegation_type; | 145 | int delegation_type; |
145 | nfs4_stateid delegation; | 146 | nfs4_stateid delegation; |
@@ -159,6 +160,7 @@ struct nfs_open_confirmargs { | |||
159 | 160 | ||
160 | struct nfs_open_confirmres { | 161 | struct nfs_open_confirmres { |
161 | nfs4_stateid stateid; | 162 | nfs4_stateid stateid; |
163 | struct nfs_seqid * seqid; | ||
162 | }; | 164 | }; |
163 | 165 | ||
164 | /* | 166 | /* |
@@ -175,6 +177,7 @@ struct nfs_closeargs { | |||
175 | struct nfs_closeres { | 177 | struct nfs_closeres { |
176 | nfs4_stateid stateid; | 178 | nfs4_stateid stateid; |
177 | struct nfs_fattr * fattr; | 179 | struct nfs_fattr * fattr; |
180 | struct nfs_seqid * seqid; | ||
178 | const struct nfs_server *server; | 181 | const struct nfs_server *server; |
179 | }; | 182 | }; |
180 | /* | 183 | /* |
@@ -199,7 +202,9 @@ struct nfs_lock_args { | |||
199 | }; | 202 | }; |
200 | 203 | ||
201 | struct nfs_lock_res { | 204 | struct nfs_lock_res { |
202 | nfs4_stateid stateid; | 205 | nfs4_stateid stateid; |
206 | struct nfs_seqid * lock_seqid; | ||
207 | struct nfs_seqid * open_seqid; | ||
203 | }; | 208 | }; |
204 | 209 | ||
205 | struct nfs_locku_args { | 210 | struct nfs_locku_args { |
@@ -210,7 +215,8 @@ struct nfs_locku_args { | |||
210 | }; | 215 | }; |
211 | 216 | ||
212 | struct nfs_locku_res { | 217 | struct nfs_locku_res { |
213 | nfs4_stateid stateid; | 218 | nfs4_stateid stateid; |
219 | struct nfs_seqid * seqid; | ||
214 | }; | 220 | }; |
215 | 221 | ||
216 | struct nfs_lockt_args { | 222 | struct nfs_lockt_args { |
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild index e726fc3a4375..fc972048e572 100644 --- a/include/linux/nfsd/Kbuild +++ b/include/linux/nfsd/Kbuild | |||
@@ -1,6 +1,6 @@ | |||
1 | unifdef-y += const.h | 1 | unifdef-y += const.h |
2 | unifdef-y += debug.h | ||
2 | unifdef-y += export.h | 3 | unifdef-y += export.h |
4 | unifdef-y += nfsfh.h | ||
3 | unifdef-y += stats.h | 5 | unifdef-y += stats.h |
4 | unifdef-y += syscall.h | 6 | unifdef-y += syscall.h |
5 | unifdef-y += nfsfh.h | ||
6 | unifdef-y += debug.h | ||
diff --git a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h index 7b5d784cc858..04b355c801d8 100644 --- a/include/linux/nfsd/cache.h +++ b/include/linux/nfsd/cache.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef NFSCACHE_H | 10 | #ifndef NFSCACHE_H |
11 | #define NFSCACHE_H | 11 | #define NFSCACHE_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/in.h> | 13 | #include <linux/in.h> |
15 | #include <linux/uio.h> | 14 | #include <linux/uio.h> |
16 | 15 | ||
@@ -77,5 +76,4 @@ void nfsd_reply_cache_shutdown(void); | |||
77 | int nfsd_cache_lookup(struct svc_rqst *, int); | 76 | int nfsd_cache_lookup(struct svc_rqst *, int); |
78 | void nfsd_cache_update(struct svc_rqst *, int, __be32 *); | 77 | void nfsd_cache_update(struct svc_rqst *, int, __be32 *); |
79 | 78 | ||
80 | #endif /* __KERNEL__ */ | ||
81 | #endif /* NFSCACHE_H */ | 79 | #endif /* NFSCACHE_H */ |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 8caf4c4f64e6..41d30c9c9de6 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #define NFSD_VERSION "0.5" | 27 | #define NFSD_VERSION "0.5" |
28 | #define NFSD_SUPPORTED_MINOR_VERSION 0 | 28 | #define NFSD_SUPPORTED_MINOR_VERSION 0 |
29 | 29 | ||
30 | #ifdef __KERNEL__ | ||
31 | /* | 30 | /* |
32 | * Special flags for nfsd_permission. These must be different from MAY_READ, | 31 | * Special flags for nfsd_permission. These must be different from MAY_READ, |
33 | * MAY_WRITE, and MAY_EXEC. | 32 | * MAY_WRITE, and MAY_EXEC. |
@@ -56,12 +55,20 @@ extern struct svc_program nfsd_program; | |||
56 | extern struct svc_version nfsd_version2, nfsd_version3, | 55 | extern struct svc_version nfsd_version2, nfsd_version3, |
57 | nfsd_version4; | 56 | nfsd_version4; |
58 | extern struct svc_serv *nfsd_serv; | 57 | extern struct svc_serv *nfsd_serv; |
58 | |||
59 | extern struct seq_operations nfs_exports_op; | ||
60 | |||
59 | /* | 61 | /* |
60 | * Function prototypes. | 62 | * Function prototypes. |
61 | */ | 63 | */ |
62 | int nfsd_svc(unsigned short port, int nrservs); | 64 | int nfsd_svc(unsigned short port, int nrservs); |
63 | int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp); | 65 | int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp); |
64 | 66 | ||
67 | int nfsd_nrthreads(void); | ||
68 | int nfsd_nrpools(void); | ||
69 | int nfsd_get_nrthreads(int n, int *); | ||
70 | int nfsd_set_nrthreads(int n, int *); | ||
71 | |||
65 | /* nfsd/vfs.c */ | 72 | /* nfsd/vfs.c */ |
66 | int fh_lock_parent(struct svc_fh *, struct dentry *); | 73 | int fh_lock_parent(struct svc_fh *, struct dentry *); |
67 | int nfsd_racache_init(int); | 74 | int nfsd_racache_init(int); |
@@ -322,10 +329,8 @@ extern struct timeval nfssvc_boot; | |||
322 | (FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL ) | 329 | (FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL ) |
323 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ | 330 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ |
324 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ | 331 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ |
325 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_METADATA | FATTR4_WORD1_TIME_MODIFY_SET) | 332 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) |
326 | 333 | ||
327 | #endif /* CONFIG_NFSD_V4 */ | 334 | #endif /* CONFIG_NFSD_V4 */ |
328 | 335 | ||
329 | #endif /* __KERNEL__ */ | ||
330 | |||
331 | #endif /* LINUX_NFSD_NFSD_H */ | 336 | #endif /* LINUX_NFSD_NFSD_H */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 779cbcd65f62..02df20f085fe 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -379,6 +379,18 @@ struct phy_driver { | |||
379 | }; | 379 | }; |
380 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) | 380 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) |
381 | 381 | ||
382 | #define PHY_ANY_ID "MATCH ANY PHY" | ||
383 | #define PHY_ANY_UID 0xffffffff | ||
384 | |||
385 | /* A Structure for boards to register fixups with the PHY Lib */ | ||
386 | struct phy_fixup { | ||
387 | struct list_head list; | ||
388 | char bus_id[BUS_ID_SIZE]; | ||
389 | u32 phy_uid; | ||
390 | u32 phy_uid_mask; | ||
391 | int (*run)(struct phy_device *phydev); | ||
392 | }; | ||
393 | |||
382 | int phy_read(struct phy_device *phydev, u16 regnum); | 394 | int phy_read(struct phy_device *phydev, u16 regnum); |
383 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); | 395 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); |
384 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); | 396 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); |
@@ -386,8 +398,8 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | |||
386 | int phy_clear_interrupt(struct phy_device *phydev); | 398 | int phy_clear_interrupt(struct phy_device *phydev); |
387 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | 399 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); |
388 | struct phy_device * phy_attach(struct net_device *dev, | 400 | struct phy_device * phy_attach(struct net_device *dev, |
389 | const char *phy_id, u32 flags, phy_interface_t interface); | 401 | const char *bus_id, u32 flags, phy_interface_t interface); |
390 | struct phy_device * phy_connect(struct net_device *dev, const char *phy_id, | 402 | struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, |
391 | void (*handler)(struct net_device *), u32 flags, | 403 | void (*handler)(struct net_device *), u32 flags, |
392 | phy_interface_t interface); | 404 | phy_interface_t interface); |
393 | void phy_disconnect(struct phy_device *phydev); | 405 | void phy_disconnect(struct phy_device *phydev); |
@@ -427,5 +439,13 @@ void phy_print_status(struct phy_device *phydev); | |||
427 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); | 439 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); |
428 | void phy_device_free(struct phy_device *phydev); | 440 | void phy_device_free(struct phy_device *phydev); |
429 | 441 | ||
442 | int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask, | ||
443 | int (*run)(struct phy_device *)); | ||
444 | int phy_register_fixup_for_id(const char *bus_id, | ||
445 | int (*run)(struct phy_device *)); | ||
446 | int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, | ||
447 | int (*run)(struct phy_device *)); | ||
448 | int phy_scan_fixups(struct phy_device *phydev); | ||
449 | |||
430 | extern struct bus_type mdio_bus_type; | 450 | extern struct bus_type mdio_bus_type; |
431 | #endif /* __PHY_H */ | 451 | #endif /* __PHY_H */ |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index b9e174079002..44c81c744538 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -740,13 +740,13 @@ extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change); | |||
740 | extern void rtnl_lock(void); | 740 | extern void rtnl_lock(void); |
741 | extern void rtnl_unlock(void); | 741 | extern void rtnl_unlock(void); |
742 | extern int rtnl_trylock(void); | 742 | extern int rtnl_trylock(void); |
743 | extern int rtnl_is_locked(void); | ||
743 | 744 | ||
744 | extern void rtnetlink_init(void); | 745 | extern void rtnetlink_init(void); |
745 | extern void __rtnl_unlock(void); | 746 | extern void __rtnl_unlock(void); |
746 | 747 | ||
747 | #define ASSERT_RTNL() do { \ | 748 | #define ASSERT_RTNL() do { \ |
748 | if (unlikely(rtnl_trylock())) { \ | 749 | if (unlikely(!rtnl_is_locked())) { \ |
749 | rtnl_unlock(); \ | ||
750 | printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \ | 750 | printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \ |
751 | __FILE__, __LINE__); \ | 751 | __FILE__, __LINE__); \ |
752 | dump_stack(); \ | 752 | dump_stack(); \ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index d65796dc26d9..5b5369c3c209 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -10,6 +10,7 @@ struct seq_operations; | |||
10 | struct file; | 10 | struct file; |
11 | struct path; | 11 | struct path; |
12 | struct inode; | 12 | struct inode; |
13 | struct dentry; | ||
13 | 14 | ||
14 | struct seq_file { | 15 | struct seq_file { |
15 | char *buf; | 16 | char *buf; |
@@ -44,6 +45,9 @@ int seq_printf(struct seq_file *, const char *, ...) | |||
44 | __attribute__ ((format (printf,2,3))); | 45 | __attribute__ ((format (printf,2,3))); |
45 | 46 | ||
46 | int seq_path(struct seq_file *, struct path *, char *); | 47 | int seq_path(struct seq_file *, struct path *, char *); |
48 | int seq_dentry(struct seq_file *, struct dentry *, char *); | ||
49 | int seq_path_root(struct seq_file *m, struct path *path, struct path *root, | ||
50 | char *esc); | ||
47 | 51 | ||
48 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | 52 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); |
49 | int single_release(struct inode *, struct file *); | 53 | int single_release(struct inode *, struct file *); |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 26e4925bc35b..632205ccc25d 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -85,23 +85,29 @@ static inline int write_tryseqlock(seqlock_t *sl) | |||
85 | /* Start of read calculation -- fetch last complete writer token */ | 85 | /* Start of read calculation -- fetch last complete writer token */ |
86 | static __always_inline unsigned read_seqbegin(const seqlock_t *sl) | 86 | static __always_inline unsigned read_seqbegin(const seqlock_t *sl) |
87 | { | 87 | { |
88 | unsigned ret = sl->sequence; | 88 | unsigned ret; |
89 | |||
90 | repeat: | ||
91 | ret = sl->sequence; | ||
89 | smp_rmb(); | 92 | smp_rmb(); |
93 | if (unlikely(ret & 1)) { | ||
94 | cpu_relax(); | ||
95 | goto repeat; | ||
96 | } | ||
97 | |||
90 | return ret; | 98 | return ret; |
91 | } | 99 | } |
92 | 100 | ||
93 | /* Test if reader processed invalid data. | 101 | /* |
94 | * If initial values is odd, | 102 | * Test if reader processed invalid data. |
95 | * then writer had already started when section was entered | 103 | * |
96 | * If sequence value changed | 104 | * If sequence value changed then writer changed data while in section. |
97 | * then writer changed data while in section | ||
98 | * | ||
99 | * Using xor saves one conditional branch. | ||
100 | */ | 105 | */ |
101 | static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv) | 106 | static __always_inline int read_seqretry(const seqlock_t *sl, unsigned start) |
102 | { | 107 | { |
103 | smp_rmb(); | 108 | smp_rmb(); |
104 | return (iv & 1) | (sl->sequence ^ iv); | 109 | |
110 | return (sl->sequence != start); | ||
105 | } | 111 | } |
106 | 112 | ||
107 | 113 | ||
@@ -122,20 +128,26 @@ typedef struct seqcount { | |||
122 | /* Start of read using pointer to a sequence counter only. */ | 128 | /* Start of read using pointer to a sequence counter only. */ |
123 | static inline unsigned read_seqcount_begin(const seqcount_t *s) | 129 | static inline unsigned read_seqcount_begin(const seqcount_t *s) |
124 | { | 130 | { |
125 | unsigned ret = s->sequence; | 131 | unsigned ret; |
132 | |||
133 | repeat: | ||
134 | ret = s->sequence; | ||
126 | smp_rmb(); | 135 | smp_rmb(); |
136 | if (unlikely(ret & 1)) { | ||
137 | cpu_relax(); | ||
138 | goto repeat; | ||
139 | } | ||
127 | return ret; | 140 | return ret; |
128 | } | 141 | } |
129 | 142 | ||
130 | /* Test if reader processed invalid data. | 143 | /* |
131 | * Equivalent to: iv is odd or sequence number has changed. | 144 | * Test if reader processed invalid data because sequence number has changed. |
132 | * (iv & 1) || (*s != iv) | ||
133 | * Using xor saves one conditional branch. | ||
134 | */ | 145 | */ |
135 | static inline int read_seqcount_retry(const seqcount_t *s, unsigned iv) | 146 | static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) |
136 | { | 147 | { |
137 | smp_rmb(); | 148 | smp_rmb(); |
138 | return (iv & 1) | (s->sequence ^ iv); | 149 | |
150 | return s->sequence != start; | ||
139 | } | 151 | } |
140 | 152 | ||
141 | 153 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index 9f3825014674..95674d97dabd 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -211,5 +211,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
211 | #define SERIO_TOUCHWIN 0x33 | 211 | #define SERIO_TOUCHWIN 0x33 |
212 | #define SERIO_TAOSEVM 0x34 | 212 | #define SERIO_TAOSEVM 0x34 |
213 | #define SERIO_FUJITSU 0x35 | 213 | #define SERIO_FUJITSU 0x35 |
214 | #define SERIO_ZHENHUA 0x36 | ||
214 | 215 | ||
215 | #endif | 216 | #endif |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 334d31411629..daf744017a31 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -14,7 +14,8 @@ enum ads7846_filter { | |||
14 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
15 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846. */ |
16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | int keep_vref_on:1; /* set to keep vref on for differential | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
18 | bool keep_vref_on; /* set to keep vref on for differential | ||
18 | * measurements as well */ | 19 | * measurements as well */ |
19 | 20 | ||
20 | /* Settling time of the analog signals; a function of Vcc and the | 21 | /* Settling time of the analog signals; a function of Vcc and the |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 7a69ca3bebaf..3f632182d8eb 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -26,6 +26,7 @@ struct auth_cred { | |||
26 | uid_t uid; | 26 | uid_t uid; |
27 | gid_t gid; | 27 | gid_t gid; |
28 | struct group_info *group_info; | 28 | struct group_info *group_info; |
29 | unsigned char machine_cred : 1; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | /* | 32 | /* |
@@ -59,8 +60,8 @@ struct rpc_cred { | |||
59 | /* | 60 | /* |
60 | * Client authentication handle | 61 | * Client authentication handle |
61 | */ | 62 | */ |
62 | #define RPC_CREDCACHE_NR 8 | 63 | #define RPC_CREDCACHE_HASHBITS 4 |
63 | #define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1) | 64 | #define RPC_CREDCACHE_NR (1 << RPC_CREDCACHE_HASHBITS) |
64 | struct rpc_cred_cache { | 65 | struct rpc_cred_cache { |
65 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; | 66 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; |
66 | spinlock_t lock; | 67 | spinlock_t lock; |
@@ -89,7 +90,6 @@ struct rpc_auth { | |||
89 | 90 | ||
90 | /* Flags for rpcauth_lookupcred() */ | 91 | /* Flags for rpcauth_lookupcred() */ |
91 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ | 92 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ |
92 | #define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */ | ||
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Client authentication ops | 95 | * Client authentication ops |
@@ -97,9 +97,7 @@ struct rpc_auth { | |||
97 | struct rpc_authops { | 97 | struct rpc_authops { |
98 | struct module *owner; | 98 | struct module *owner; |
99 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ | 99 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ |
100 | #ifdef RPC_DEBUG | ||
101 | char * au_name; | 100 | char * au_name; |
102 | #endif | ||
103 | struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); | 101 | struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); |
104 | void (*destroy)(struct rpc_auth *); | 102 | void (*destroy)(struct rpc_auth *); |
105 | 103 | ||
@@ -113,6 +111,7 @@ struct rpc_credops { | |||
113 | void (*crdestroy)(struct rpc_cred *); | 111 | void (*crdestroy)(struct rpc_cred *); |
114 | 112 | ||
115 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 113 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
114 | void (*crbind)(struct rpc_task *, struct rpc_cred *); | ||
116 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); | 115 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
117 | int (*crrefresh)(struct rpc_task *); | 116 | int (*crrefresh)(struct rpc_task *); |
118 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 117 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
@@ -126,9 +125,13 @@ extern const struct rpc_authops authunix_ops; | |||
126 | extern const struct rpc_authops authnull_ops; | 125 | extern const struct rpc_authops authnull_ops; |
127 | 126 | ||
128 | void __init rpc_init_authunix(void); | 127 | void __init rpc_init_authunix(void); |
128 | void __init rpc_init_generic_auth(void); | ||
129 | void __init rpcauth_init_module(void); | 129 | void __init rpcauth_init_module(void); |
130 | void __exit rpcauth_remove_module(void); | 130 | void __exit rpcauth_remove_module(void); |
131 | void __exit rpc_destroy_generic_auth(void); | ||
131 | 132 | ||
133 | struct rpc_cred * rpc_lookup_cred(void); | ||
134 | struct rpc_cred * rpc_lookup_machine_cred(void); | ||
132 | int rpcauth_register(const struct rpc_authops *); | 135 | int rpcauth_register(const struct rpc_authops *); |
133 | int rpcauth_unregister(const struct rpc_authops *); | 136 | int rpcauth_unregister(const struct rpc_authops *); |
134 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); | 137 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); |
@@ -136,8 +139,8 @@ void rpcauth_release(struct rpc_auth *); | |||
136 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 139 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); |
137 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); | 140 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); |
138 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); | 141 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); |
139 | struct rpc_cred * rpcauth_bindcred(struct rpc_task *); | 142 | void rpcauth_bindcred(struct rpc_task *, struct rpc_cred *, int); |
140 | void rpcauth_holdcred(struct rpc_task *); | 143 | void rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *); |
141 | void put_rpccred(struct rpc_cred *); | 144 | void put_rpccred(struct rpc_cred *); |
142 | void rpcauth_unbindcred(struct rpc_task *); | 145 | void rpcauth_unbindcred(struct rpc_task *); |
143 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); | 146 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index 67658e17a375..fec6899bf355 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
@@ -84,6 +84,7 @@ struct gss_cred { | |||
84 | enum rpc_gss_svc gc_service; | 84 | enum rpc_gss_svc gc_service; |
85 | struct gss_cl_ctx *gc_ctx; | 85 | struct gss_cl_ctx *gc_ctx; |
86 | struct gss_upcall_msg *gc_upcall; | 86 | struct gss_upcall_msg *gc_upcall; |
87 | unsigned char gc_machine_cred : 1; | ||
87 | }; | 88 | }; |
88 | 89 | ||
89 | #endif /* __KERNEL__ */ | 90 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 03547d6abee5..2d8b211b9324 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -120,7 +120,6 @@ struct cache_deferred_req { | |||
120 | struct list_head hash; /* on hash chain */ | 120 | struct list_head hash; /* on hash chain */ |
121 | struct list_head recent; /* on fifo */ | 121 | struct list_head recent; /* on fifo */ |
122 | struct cache_head *item; /* cache item we wait on */ | 122 | struct cache_head *item; /* cache item we wait on */ |
123 | time_t recv_time; | ||
124 | void *owner; /* we might need to discard all defered requests | 123 | void *owner; /* we might need to discard all defered requests |
125 | * owned by someone */ | 124 | * owned by someone */ |
126 | void (*revisit)(struct cache_deferred_req *req, | 125 | void (*revisit)(struct cache_deferred_req *req, |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 129a86e25d29..6fff7f82ef12 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -127,11 +127,12 @@ int rpcb_getport_sync(struct sockaddr_in *, u32, u32, int); | |||
127 | void rpcb_getport_async(struct rpc_task *); | 127 | void rpcb_getport_async(struct rpc_task *); |
128 | 128 | ||
129 | void rpc_call_start(struct rpc_task *); | 129 | void rpc_call_start(struct rpc_task *); |
130 | int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, | 130 | int rpc_call_async(struct rpc_clnt *clnt, |
131 | int flags, const struct rpc_call_ops *tk_ops, | 131 | const struct rpc_message *msg, int flags, |
132 | const struct rpc_call_ops *tk_ops, | ||
132 | void *calldata); | 133 | void *calldata); |
133 | int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, | 134 | int rpc_call_sync(struct rpc_clnt *clnt, |
134 | int flags); | 135 | const struct rpc_message *msg, int flags); |
135 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | 136 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, |
136 | int flags); | 137 | int flags); |
137 | void rpc_restart_call(struct rpc_task *); | 138 | void rpc_restart_call(struct rpc_task *); |
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index 5a4b1e0206e3..a10f1fb0bf7c 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -70,8 +70,6 @@ enum seal_alg { | |||
70 | SEAL_ALG_DES3KD = 0x0002 | 70 | SEAL_ALG_DES3KD = 0x0002 |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define KRB5_CKSUM_LENGTH 8 | ||
74 | |||
75 | #define CKSUMTYPE_CRC32 0x0001 | 73 | #define CKSUMTYPE_CRC32 0x0001 |
76 | #define CKSUMTYPE_RSA_MD4 0x0002 | 74 | #define CKSUMTYPE_RSA_MD4 0x0002 |
77 | #define CKSUMTYPE_RSA_MD4_DES 0x0003 | 75 | #define CKSUMTYPE_RSA_MD4_DES 0x0003 |
@@ -150,9 +148,9 @@ gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf, | |||
150 | s32 | 148 | s32 |
151 | krb5_make_seq_num(struct crypto_blkcipher *key, | 149 | krb5_make_seq_num(struct crypto_blkcipher *key, |
152 | int direction, | 150 | int direction, |
153 | s32 seqnum, unsigned char *cksum, unsigned char *buf); | 151 | u32 seqnum, unsigned char *cksum, unsigned char *buf); |
154 | 152 | ||
155 | s32 | 153 | s32 |
156 | krb5_get_seq_num(struct crypto_blkcipher *key, | 154 | krb5_get_seq_num(struct crypto_blkcipher *key, |
157 | unsigned char *cksum, | 155 | unsigned char *cksum, |
158 | unsigned char *buf, int *direction, s32 * seqnum); | 156 | unsigned char *buf, int *direction, u32 *seqnum); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index f689f02e6793..d1a5c8c1a0f1 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/sunrpc/types.h> | 13 | #include <linux/sunrpc/types.h> |
14 | #include <linux/rcupdate.h> | ||
15 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
16 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
17 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
@@ -33,7 +32,8 @@ struct rpc_wait_queue; | |||
33 | struct rpc_wait { | 32 | struct rpc_wait { |
34 | struct list_head list; /* wait queue links */ | 33 | struct list_head list; /* wait queue links */ |
35 | struct list_head links; /* Links to related tasks */ | 34 | struct list_head links; /* Links to related tasks */ |
36 | struct rpc_wait_queue * rpc_waitq; /* RPC wait queue we're on */ | 35 | struct list_head timer_list; /* Timer list */ |
36 | unsigned long expires; | ||
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* | 39 | /* |
@@ -57,33 +57,25 @@ struct rpc_task { | |||
57 | __u8 tk_cred_retry; | 57 | __u8 tk_cred_retry; |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * timeout_fn to be executed by timer bottom half | ||
61 | * callback to be executed after waking up | 60 | * callback to be executed after waking up |
62 | * action next procedure for async tasks | 61 | * action next procedure for async tasks |
63 | * tk_ops caller callbacks | 62 | * tk_ops caller callbacks |
64 | */ | 63 | */ |
65 | void (*tk_timeout_fn)(struct rpc_task *); | ||
66 | void (*tk_callback)(struct rpc_task *); | 64 | void (*tk_callback)(struct rpc_task *); |
67 | void (*tk_action)(struct rpc_task *); | 65 | void (*tk_action)(struct rpc_task *); |
68 | const struct rpc_call_ops *tk_ops; | 66 | const struct rpc_call_ops *tk_ops; |
69 | void * tk_calldata; | 67 | void * tk_calldata; |
70 | 68 | ||
71 | /* | ||
72 | * tk_timer is used for async processing by the RPC scheduling | ||
73 | * primitives. You should not access this directly unless | ||
74 | * you have a pathological interest in kernel oopses. | ||
75 | */ | ||
76 | struct timer_list tk_timer; /* kernel timer */ | ||
77 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ | 69 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ |
78 | unsigned short tk_flags; /* misc flags */ | 70 | unsigned short tk_flags; /* misc flags */ |
79 | unsigned long tk_runstate; /* Task run status */ | 71 | unsigned long tk_runstate; /* Task run status */ |
80 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could | 72 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could |
81 | * be any workqueue | 73 | * be any workqueue |
82 | */ | 74 | */ |
75 | struct rpc_wait_queue *tk_waitqueue; /* RPC wait queue we're on */ | ||
83 | union { | 76 | union { |
84 | struct work_struct tk_work; /* Async task work queue */ | 77 | struct work_struct tk_work; /* Async task work queue */ |
85 | struct rpc_wait tk_wait; /* RPC wait */ | 78 | struct rpc_wait tk_wait; /* RPC wait */ |
86 | struct rcu_head tk_rcu; /* for task deletion */ | ||
87 | } u; | 79 | } u; |
88 | 80 | ||
89 | unsigned short tk_timeouts; /* maj timeouts */ | 81 | unsigned short tk_timeouts; /* maj timeouts */ |
@@ -123,6 +115,7 @@ struct rpc_task_setup { | |||
123 | const struct rpc_message *rpc_message; | 115 | const struct rpc_message *rpc_message; |
124 | const struct rpc_call_ops *callback_ops; | 116 | const struct rpc_call_ops *callback_ops; |
125 | void *callback_data; | 117 | void *callback_data; |
118 | struct workqueue_struct *workqueue; | ||
126 | unsigned short flags; | 119 | unsigned short flags; |
127 | signed char priority; | 120 | signed char priority; |
128 | }; | 121 | }; |
@@ -147,9 +140,7 @@ struct rpc_task_setup { | |||
147 | 140 | ||
148 | #define RPC_TASK_RUNNING 0 | 141 | #define RPC_TASK_RUNNING 0 |
149 | #define RPC_TASK_QUEUED 1 | 142 | #define RPC_TASK_QUEUED 1 |
150 | #define RPC_TASK_WAKEUP 2 | 143 | #define RPC_TASK_ACTIVE 2 |
151 | #define RPC_TASK_HAS_TIMER 3 | ||
152 | #define RPC_TASK_ACTIVE 4 | ||
153 | 144 | ||
154 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 145 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
155 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 146 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
@@ -171,15 +162,6 @@ struct rpc_task_setup { | |||
171 | smp_mb__after_clear_bit(); \ | 162 | smp_mb__after_clear_bit(); \ |
172 | } while (0) | 163 | } while (0) |
173 | 164 | ||
174 | #define rpc_start_wakeup(t) \ | ||
175 | (test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0) | ||
176 | #define rpc_finish_wakeup(t) \ | ||
177 | do { \ | ||
178 | smp_mb__before_clear_bit(); \ | ||
179 | clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); \ | ||
180 | smp_mb__after_clear_bit(); \ | ||
181 | } while (0) | ||
182 | |||
183 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) | 165 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
184 | 166 | ||
185 | /* | 167 | /* |
@@ -192,6 +174,12 @@ struct rpc_task_setup { | |||
192 | #define RPC_PRIORITY_HIGH (1) | 174 | #define RPC_PRIORITY_HIGH (1) |
193 | #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_HIGH - RPC_PRIORITY_LOW) | 175 | #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_HIGH - RPC_PRIORITY_LOW) |
194 | 176 | ||
177 | struct rpc_timer { | ||
178 | struct timer_list timer; | ||
179 | struct list_head list; | ||
180 | unsigned long expires; | ||
181 | }; | ||
182 | |||
195 | /* | 183 | /* |
196 | * RPC synchronization objects | 184 | * RPC synchronization objects |
197 | */ | 185 | */ |
@@ -204,6 +192,7 @@ struct rpc_wait_queue { | |||
204 | unsigned char count; /* # task groups remaining serviced so far */ | 192 | unsigned char count; /* # task groups remaining serviced so far */ |
205 | unsigned char nr; /* # tasks remaining for cookie */ | 193 | unsigned char nr; /* # tasks remaining for cookie */ |
206 | unsigned short qlen; /* total # tasks waiting in queue */ | 194 | unsigned short qlen; /* total # tasks waiting in queue */ |
195 | struct rpc_timer timer_list; | ||
207 | #ifdef RPC_DEBUG | 196 | #ifdef RPC_DEBUG |
208 | const char * name; | 197 | const char * name; |
209 | #endif | 198 | #endif |
@@ -229,9 +218,11 @@ void rpc_killall_tasks(struct rpc_clnt *); | |||
229 | void rpc_execute(struct rpc_task *); | 218 | void rpc_execute(struct rpc_task *); |
230 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 219 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |
231 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 220 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
221 | void rpc_destroy_wait_queue(struct rpc_wait_queue *); | ||
232 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 222 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
233 | rpc_action action, rpc_action timer); | 223 | rpc_action action); |
234 | void rpc_wake_up_task(struct rpc_task *); | 224 | void rpc_wake_up_queued_task(struct rpc_wait_queue *, |
225 | struct rpc_task *); | ||
235 | void rpc_wake_up(struct rpc_wait_queue *); | 226 | void rpc_wake_up(struct rpc_wait_queue *); |
236 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); | 227 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); |
237 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 228 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64c97552964a..4b54c5fdcfd9 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -386,7 +386,6 @@ struct svc_serv * svc_create(struct svc_program *, unsigned int, | |||
386 | void (*shutdown)(struct svc_serv*)); | 386 | void (*shutdown)(struct svc_serv*)); |
387 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 387 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
388 | struct svc_pool *pool); | 388 | struct svc_pool *pool); |
389 | int svc_create_thread(svc_thread_fn, struct svc_serv *); | ||
390 | void svc_exit_thread(struct svc_rqst *); | 389 | void svc_exit_thread(struct svc_rqst *); |
391 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 390 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
392 | void (*shutdown)(struct svc_serv*), | 391 | void (*shutdown)(struct svc_serv*), |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 22e1ef8e200e..d39dbdc7b10f 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -24,6 +24,7 @@ struct svc_cred { | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | struct svc_rqst; /* forward decl */ | 26 | struct svc_rqst; /* forward decl */ |
27 | struct in6_addr; | ||
27 | 28 | ||
28 | /* Authentication is done in the context of a domain. | 29 | /* Authentication is done in the context of a domain. |
29 | * | 30 | * |
@@ -120,10 +121,10 @@ extern void svc_auth_unregister(rpc_authflavor_t flavor); | |||
120 | 121 | ||
121 | extern struct auth_domain *unix_domain_find(char *name); | 122 | extern struct auth_domain *unix_domain_find(char *name); |
122 | extern void auth_domain_put(struct auth_domain *item); | 123 | extern void auth_domain_put(struct auth_domain *item); |
123 | extern int auth_unix_add_addr(struct in_addr addr, struct auth_domain *dom); | 124 | extern int auth_unix_add_addr(struct in6_addr *addr, struct auth_domain *dom); |
124 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); | 125 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); |
125 | extern struct auth_domain *auth_domain_find(char *name); | 126 | extern struct auth_domain *auth_domain_find(char *name); |
126 | extern struct auth_domain *auth_unix_lookup(struct in_addr addr); | 127 | extern struct auth_domain *auth_unix_lookup(struct in6_addr *addr); |
127 | extern int auth_unix_forget_old(struct auth_domain *dom); | 128 | extern int auth_unix_forget_old(struct auth_domain *dom); |
128 | extern void svcauth_unix_purge(void); | 129 | extern void svcauth_unix_purge(void); |
129 | extern void svcauth_unix_info_release(void *); | 130 | extern void svcauth_unix_info_release(void *); |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 206f092ad4c7..8cff696dedf5 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -26,8 +26,8 @@ struct svc_sock { | |||
26 | void (*sk_owspace)(struct sock *); | 26 | void (*sk_owspace)(struct sock *); |
27 | 27 | ||
28 | /* private TCP part */ | 28 | /* private TCP part */ |
29 | int sk_reclen; /* length of record */ | 29 | u32 sk_reclen; /* length of record */ |
30 | int sk_tcplen; /* current read length */ | 30 | u32 sk_tcplen; /* current read length */ |
31 | }; | 31 | }; |
32 | 32 | ||
33 | /* | 33 | /* |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index b3ff9a815e6f..4d80a118d538 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -86,6 +86,10 @@ struct rpc_rqst { | |||
86 | unsigned long rq_majortimeo; /* major timeout alarm */ | 86 | unsigned long rq_majortimeo; /* major timeout alarm */ |
87 | unsigned long rq_timeout; /* Current timeout value */ | 87 | unsigned long rq_timeout; /* Current timeout value */ |
88 | unsigned int rq_retries; /* # of retries */ | 88 | unsigned int rq_retries; /* # of retries */ |
89 | unsigned int rq_connect_cookie; | ||
90 | /* A cookie used to track the | ||
91 | state of the transport | ||
92 | connection */ | ||
89 | 93 | ||
90 | /* | 94 | /* |
91 | * Partial send handling | 95 | * Partial send handling |
@@ -152,6 +156,9 @@ struct rpc_xprt { | |||
152 | unsigned long connect_timeout, | 156 | unsigned long connect_timeout, |
153 | bind_timeout, | 157 | bind_timeout, |
154 | reestablish_timeout; | 158 | reestablish_timeout; |
159 | unsigned int connect_cookie; /* A cookie that gets bumped | ||
160 | every time the transport | ||
161 | is reconnected */ | ||
155 | 162 | ||
156 | /* | 163 | /* |
157 | * Disconnection of idle transports | 164 | * Disconnection of idle transports |
@@ -232,7 +239,7 @@ int xprt_unregister_transport(struct xprt_class *type); | |||
232 | void xprt_set_retrans_timeout_def(struct rpc_task *task); | 239 | void xprt_set_retrans_timeout_def(struct rpc_task *task); |
233 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | 240 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); |
234 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 241 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |
235 | void xprt_wait_for_buffer_space(struct rpc_task *task); | 242 | void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action); |
236 | void xprt_write_space(struct rpc_xprt *xprt); | 243 | void xprt_write_space(struct rpc_xprt *xprt); |
237 | void xprt_update_rtt(struct rpc_task *task); | 244 | void xprt_update_rtt(struct rpc_task *task); |
238 | void xprt_adjust_cwnd(struct rpc_task *task, int result); | 245 | void xprt_adjust_cwnd(struct rpc_task *task, int result); |
@@ -241,6 +248,7 @@ void xprt_complete_rqst(struct rpc_task *task, int copied); | |||
241 | void xprt_release_rqst_cong(struct rpc_task *task); | 248 | void xprt_release_rqst_cong(struct rpc_task *task); |
242 | void xprt_disconnect_done(struct rpc_xprt *xprt); | 249 | void xprt_disconnect_done(struct rpc_xprt *xprt); |
243 | void xprt_force_disconnect(struct rpc_xprt *xprt); | 250 | void xprt_force_disconnect(struct rpc_xprt *xprt); |
251 | void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | ||
244 | 252 | ||
245 | /* | 253 | /* |
246 | * Reserved bit positions in xprt->state | 254 | * Reserved bit positions in xprt->state |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 583e0481dfa0..c08689ea9b4b 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | struct usb_device; | 24 | struct usb_device; |
25 | struct usb_driver; | 25 | struct usb_driver; |
26 | struct wusb_dev; | ||
26 | 27 | ||
27 | /*-------------------------------------------------------------------------*/ | 28 | /*-------------------------------------------------------------------------*/ |
28 | 29 | ||
@@ -341,103 +342,146 @@ struct usb_bus { | |||
341 | 342 | ||
342 | struct usb_tt; | 343 | struct usb_tt; |
343 | 344 | ||
344 | /* | 345 | /** |
345 | * struct usb_device - kernel's representation of a USB device | 346 | * struct usb_device - kernel's representation of a USB device |
346 | * | 347 | * @devnum: device number; address on a USB bus |
347 | * FIXME: Write the kerneldoc! | 348 | * @devpath: device ID string for use in messages (e.g., /port/...) |
348 | * | 349 | * @state: device state: configured, not attached, etc. |
350 | * @speed: device speed: high/full/low (or error) | ||
351 | * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub | ||
352 | * @ttport: device port on that tt hub | ||
353 | * @toggle: one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints | ||
354 | * @parent: our hub, unless we're the root | ||
355 | * @bus: bus we're part of | ||
356 | * @ep0: endpoint 0 data (default control pipe) | ||
357 | * @dev: generic device interface | ||
358 | * @descriptor: USB device descriptor | ||
359 | * @config: all of the device's configs | ||
360 | * @actconfig: the active configuration | ||
361 | * @ep_in: array of IN endpoints | ||
362 | * @ep_out: array of OUT endpoints | ||
363 | * @rawdescriptors: raw descriptors for each config | ||
364 | * @bus_mA: Current available from the bus | ||
365 | * @portnum: parent port number (origin 1) | ||
366 | * @level: number of USB hub ancestors | ||
367 | * @can_submit: URBs may be submitted | ||
368 | * @discon_suspended: disconnected while suspended | ||
369 | * @persist_enabled: USB_PERSIST enabled for this device | ||
370 | * @have_langid: whether string_langid is valid | ||
371 | * @authorized: policy has said we can use it; | ||
372 | * (user space) policy determines if we authorize this device to be | ||
373 | * used or not. By default, wired USB devices are authorized. | ||
374 | * WUSB devices are not, until we authorize them from user space. | ||
375 | * FIXME -- complete doc | ||
376 | * @authenticated: Crypto authentication passed | ||
377 | * @wusb: device is Wireless USB | ||
378 | * @string_langid: language ID for strings | ||
379 | * @product: iProduct string, if present (static) | ||
380 | * @manufacturer: iManufacturer string, if present (static) | ||
381 | * @serial: iSerialNumber string, if present (static) | ||
382 | * @filelist: usbfs files that are open to this device | ||
383 | * @usb_classdev: USB class device that was created for usbfs device | ||
384 | * access from userspace | ||
385 | * @usbfs_dentry: usbfs dentry entry for the device | ||
386 | * @maxchild: number of ports if hub | ||
387 | * @children: child devices - USB devices that are attached to this hub | ||
388 | * @pm_usage_cnt: usage counter for autosuspend | ||
389 | * @quirks: quirks of the whole device | ||
390 | * @urbnum: number of URBs submitted for the whole device | ||
391 | * @active_duration: total time device is not suspended | ||
392 | * @autosuspend: for delayed autosuspends | ||
393 | * @pm_mutex: protects PM operations | ||
394 | * @last_busy: time of last use | ||
395 | * @autosuspend_delay: in jiffies | ||
396 | * @connect_time: time device was first connected | ||
397 | * @auto_pm: autosuspend/resume in progress | ||
398 | * @do_remote_wakeup: remote wakeup should be enabled | ||
399 | * @reset_resume: needs reset instead of resume | ||
400 | * @autosuspend_disabled: autosuspend disabled by the user | ||
401 | * @autoresume_disabled: autoresume disabled by the user | ||
402 | * @skip_sys_resume: skip the next system resume | ||
403 | * | ||
404 | * Notes: | ||
349 | * Usbcore drivers should not set usbdev->state directly. Instead use | 405 | * Usbcore drivers should not set usbdev->state directly. Instead use |
350 | * usb_set_device_state(). | 406 | * usb_set_device_state(). |
351 | * | ||
352 | * @authorized: (user space) policy determines if we authorize this | ||
353 | * device to be used or not. By default, wired USB | ||
354 | * devices are authorized. WUSB devices are not, until we | ||
355 | * authorize them from user space. FIXME -- complete doc | ||
356 | */ | 407 | */ |
357 | struct usb_device { | 408 | struct usb_device { |
358 | int devnum; /* Address on USB bus */ | 409 | int devnum; |
359 | char devpath [16]; /* Use in messages: /port/port/... */ | 410 | char devpath [16]; |
360 | enum usb_device_state state; /* configured, not attached, etc */ | 411 | enum usb_device_state state; |
361 | enum usb_device_speed speed; /* high/full/low (or error) */ | 412 | enum usb_device_speed speed; |
362 | 413 | ||
363 | struct usb_tt *tt; /* low/full speed dev, highspeed hub */ | 414 | struct usb_tt *tt; |
364 | int ttport; /* device port on that tt hub */ | 415 | int ttport; |
365 | 416 | ||
366 | unsigned int toggle[2]; /* one bit for each endpoint | 417 | unsigned int toggle[2]; |
367 | * ([0] = IN, [1] = OUT) */ | ||
368 | 418 | ||
369 | struct usb_device *parent; /* our hub, unless we're the root */ | 419 | struct usb_device *parent; |
370 | struct usb_bus *bus; /* Bus we're part of */ | 420 | struct usb_bus *bus; |
371 | struct usb_host_endpoint ep0; | 421 | struct usb_host_endpoint ep0; |
372 | 422 | ||
373 | struct device dev; /* Generic device interface */ | 423 | struct device dev; |
374 | 424 | ||
375 | struct usb_device_descriptor descriptor;/* Descriptor */ | 425 | struct usb_device_descriptor descriptor; |
376 | struct usb_host_config *config; /* All of the configs */ | 426 | struct usb_host_config *config; |
377 | 427 | ||
378 | struct usb_host_config *actconfig;/* the active configuration */ | 428 | struct usb_host_config *actconfig; |
379 | struct usb_host_endpoint *ep_in[16]; | 429 | struct usb_host_endpoint *ep_in[16]; |
380 | struct usb_host_endpoint *ep_out[16]; | 430 | struct usb_host_endpoint *ep_out[16]; |
381 | 431 | ||
382 | char **rawdescriptors; /* Raw descriptors for each config */ | 432 | char **rawdescriptors; |
383 | 433 | ||
384 | unsigned short bus_mA; /* Current available from the bus */ | 434 | unsigned short bus_mA; |
385 | u8 portnum; /* Parent port number (origin 1) */ | 435 | u8 portnum; |
386 | u8 level; /* Number of USB hub ancestors */ | 436 | u8 level; |
387 | 437 | ||
388 | unsigned can_submit:1; /* URBs may be submitted */ | 438 | unsigned can_submit:1; |
389 | unsigned discon_suspended:1; /* Disconnected while suspended */ | 439 | unsigned discon_suspended:1; |
390 | unsigned have_langid:1; /* whether string_langid is valid */ | 440 | unsigned persist_enabled:1; |
391 | unsigned authorized:1; /* Policy has said we can use it */ | 441 | unsigned have_langid:1; |
392 | unsigned wusb:1; /* Device is Wireless USB */ | 442 | unsigned authorized:1; |
393 | int string_langid; /* language ID for strings */ | 443 | unsigned authenticated:1; |
444 | unsigned wusb:1; | ||
445 | int string_langid; | ||
394 | 446 | ||
395 | /* static strings from the device */ | 447 | /* static strings from the device */ |
396 | char *product; /* iProduct string, if present */ | 448 | char *product; |
397 | char *manufacturer; /* iManufacturer string, if present */ | 449 | char *manufacturer; |
398 | char *serial; /* iSerialNumber string, if present */ | 450 | char *serial; |
399 | 451 | ||
400 | struct list_head filelist; | 452 | struct list_head filelist; |
401 | #ifdef CONFIG_USB_DEVICE_CLASS | 453 | #ifdef CONFIG_USB_DEVICE_CLASS |
402 | struct device *usb_classdev; | 454 | struct device *usb_classdev; |
403 | #endif | 455 | #endif |
404 | #ifdef CONFIG_USB_DEVICEFS | 456 | #ifdef CONFIG_USB_DEVICEFS |
405 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 457 | struct dentry *usbfs_dentry; |
406 | #endif | 458 | #endif |
407 | /* | ||
408 | * Child devices - these can be either new devices | ||
409 | * (if this is a hub device), or different instances | ||
410 | * of this same device. | ||
411 | * | ||
412 | * Each instance needs its own set of data structures. | ||
413 | */ | ||
414 | 459 | ||
415 | int maxchild; /* Number of ports if hub */ | 460 | int maxchild; |
416 | struct usb_device *children[USB_MAXCHILDREN]; | 461 | struct usb_device *children[USB_MAXCHILDREN]; |
417 | 462 | ||
418 | int pm_usage_cnt; /* usage counter for autosuspend */ | 463 | int pm_usage_cnt; |
419 | u32 quirks; /* quirks of the whole device */ | 464 | u32 quirks; |
420 | atomic_t urbnum; /* number of URBs submitted for | 465 | atomic_t urbnum; |
421 | the whole device */ | ||
422 | 466 | ||
423 | unsigned long active_duration; /* total time device is not suspended */ | 467 | unsigned long active_duration; |
424 | 468 | ||
425 | #ifdef CONFIG_PM | 469 | #ifdef CONFIG_PM |
426 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 470 | struct delayed_work autosuspend; |
427 | struct mutex pm_mutex; /* protects PM operations */ | 471 | struct mutex pm_mutex; |
428 | 472 | ||
429 | unsigned long last_busy; /* time of last use */ | 473 | unsigned long last_busy; |
430 | int autosuspend_delay; /* in jiffies */ | 474 | int autosuspend_delay; |
431 | unsigned long connect_time; /* time device was first connected */ | 475 | unsigned long connect_time; |
432 | 476 | ||
433 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 477 | unsigned auto_pm:1; |
434 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 478 | unsigned do_remote_wakeup:1; |
435 | unsigned reset_resume:1; /* needs reset instead of resume */ | 479 | unsigned reset_resume:1; |
436 | unsigned persist_enabled:1; /* USB_PERSIST enabled for this dev */ | 480 | unsigned autosuspend_disabled:1; |
437 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | 481 | unsigned autoresume_disabled:1; |
438 | unsigned autoresume_disabled:1; /* disabled by the user */ | 482 | unsigned skip_sys_resume:1; |
439 | unsigned skip_sys_resume:1; /* skip the next system resume */ | ||
440 | #endif | 483 | #endif |
484 | struct wusb_dev *wusb_dev; | ||
441 | }; | 485 | }; |
442 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 486 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
443 | 487 | ||
@@ -898,10 +942,11 @@ struct usbdrv_wrap { | |||
898 | * and should normally be the same as the module name. | 942 | * and should normally be the same as the module name. |
899 | * @probe: Called to see if the driver is willing to manage a particular | 943 | * @probe: Called to see if the driver is willing to manage a particular |
900 | * interface on a device. If it is, probe returns zero and uses | 944 | * interface on a device. If it is, probe returns zero and uses |
901 | * dev_set_drvdata() to associate driver-specific data with the | 945 | * usb_set_intfdata() to associate driver-specific data with the |
902 | * interface. It may also use usb_set_interface() to specify the | 946 | * interface. It may also use usb_set_interface() to specify the |
903 | * appropriate altsetting. If unwilling to manage the interface, | 947 | * appropriate altsetting. If unwilling to manage the interface, |
904 | * return a negative errno value. | 948 | * return -ENODEV, if genuine IO errors occured, an appropriate |
949 | * negative errno value. | ||
905 | * @disconnect: Called when the interface is no longer accessible, usually | 950 | * @disconnect: Called when the interface is no longer accessible, usually |
906 | * because its device has been (or is being) disconnected or the | 951 | * because its device has been (or is being) disconnected or the |
907 | * driver module is being unloaded. | 952 | * driver module is being unloaded. |
@@ -916,10 +961,7 @@ struct usbdrv_wrap { | |||
916 | * @pre_reset: Called by usb_reset_composite_device() when the device | 961 | * @pre_reset: Called by usb_reset_composite_device() when the device |
917 | * is about to be reset. | 962 | * is about to be reset. |
918 | * @post_reset: Called by usb_reset_composite_device() after the device | 963 | * @post_reset: Called by usb_reset_composite_device() after the device |
919 | * has been reset, or in lieu of @resume following a reset-resume | 964 | * has been reset |
920 | * (i.e., the device is reset instead of being resumed, as might | ||
921 | * happen if power was lost). The second argument tells which is | ||
922 | * the reason. | ||
923 | * @id_table: USB drivers use ID table to support hotplugging. | 965 | * @id_table: USB drivers use ID table to support hotplugging. |
924 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 966 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
925 | * or your driver's probe function will never get called. | 967 | * or your driver's probe function will never get called. |
@@ -1411,6 +1453,7 @@ extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | |||
1411 | extern int usb_unlink_urb(struct urb *urb); | 1453 | extern int usb_unlink_urb(struct urb *urb); |
1412 | extern void usb_kill_urb(struct urb *urb); | 1454 | extern void usb_kill_urb(struct urb *urb); |
1413 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | 1455 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); |
1456 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); | ||
1414 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | 1457 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); |
1415 | extern void usb_unanchor_urb(struct urb *urb); | 1458 | extern void usb_unanchor_urb(struct urb *urb); |
1416 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | 1459 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, |
@@ -1661,13 +1704,12 @@ extern void usb_unregister_notify(struct notifier_block *nb); | |||
1661 | #define dbg(format, arg...) do {} while (0) | 1704 | #define dbg(format, arg...) do {} while (0) |
1662 | #endif | 1705 | #endif |
1663 | 1706 | ||
1664 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 1707 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ |
1665 | __FILE__ , ## arg) | 1708 | format "\n" , ## arg) |
1666 | #define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , \ | 1709 | #define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \ |
1667 | __FILE__ , ## arg) | 1710 | format "\n" , ## arg) |
1668 | #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \ | 1711 | #define warn(format, arg...) printk(KERN_WARNING KBUILD_MODNAME ": " \ |
1669 | __FILE__ , ## arg) | 1712 | format "\n" , ## arg) |
1670 | |||
1671 | 1713 | ||
1672 | #endif /* __KERNEL__ */ | 1714 | #endif /* __KERNEL__ */ |
1673 | 1715 | ||
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 2dfeef16b221..8cb025fef634 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -50,4 +50,4 @@ struct usb_ac_header_descriptor_##n { \ | |||
50 | __u8 baInterfaceNr[n]; \ | 50 | __u8 baInterfaceNr[n]; \ |
51 | } __attribute__ ((packed)) | 51 | } __attribute__ ((packed)) |
52 | 52 | ||
53 | #endif | 53 | #endif /* __LINUX_USB_AUDIO_H */ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 94ee4ecf0564..71e52f2f6a38 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -6,6 +6,9 @@ | |||
6 | * firmware based USB peripherals. | 6 | * firmware based USB peripherals. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __LINUX_USB_CDC_H | ||
10 | #define __LINUX_USB_CDC_H | ||
11 | |||
9 | #define USB_CDC_SUBCLASS_ACM 0x02 | 12 | #define USB_CDC_SUBCLASS_ACM 0x02 |
10 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 | 13 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 |
11 | #define USB_CDC_SUBCLASS_WHCM 0x08 | 14 | #define USB_CDC_SUBCLASS_WHCM 0x08 |
@@ -221,3 +224,4 @@ struct usb_cdc_notification { | |||
221 | __le16 wLength; | 224 | __le16 wLength; |
222 | } __attribute__ ((packed)); | 225 | } __attribute__ ((packed)); |
223 | 226 | ||
227 | #endif /* __LINUX_USB_CDC_H */ | ||
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 6169438ec5a2..7e0d3084f76c 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -66,8 +66,8 @@ | |||
66 | #define USB_RECIP_ENDPOINT 0x02 | 66 | #define USB_RECIP_ENDPOINT 0x02 |
67 | #define USB_RECIP_OTHER 0x03 | 67 | #define USB_RECIP_OTHER 0x03 |
68 | /* From Wireless USB 1.0 */ | 68 | /* From Wireless USB 1.0 */ |
69 | #define USB_RECIP_PORT 0x04 | 69 | #define USB_RECIP_PORT 0x04 |
70 | #define USB_RECIP_RPIPE 0x05 | 70 | #define USB_RECIP_RPIPE 0x05 |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Standard requests, for the bRequest field of a SETUP packet. | 73 | * Standard requests, for the bRequest field of a SETUP packet. |
@@ -102,10 +102,16 @@ | |||
102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
103 | #define USB_REQ_SET_INTERFACE_DS 0x17 | 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
104 | 104 | ||
105 | /* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, | ||
106 | * used by hubs to put ports into a new L1 suspend state, except that it | ||
107 | * forgot to define its number ... | ||
108 | */ | ||
109 | |||
105 | /* | 110 | /* |
106 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and | 111 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and |
107 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there | 112 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there |
108 | * are at most sixteen features of each type.) | 113 | * are at most sixteen features of each type.) Hubs may also support a |
114 | * new USB_REQ_TEST_AND_SET_FEATURE to put ports into L1 suspend. | ||
109 | */ | 115 | */ |
110 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ | 116 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ |
111 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ | 117 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ |
@@ -180,6 +186,7 @@ struct usb_ctrlrequest { | |||
180 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 | 186 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 |
181 | #define USB_DT_WIRE_ADAPTER 0x21 | 187 | #define USB_DT_WIRE_ADAPTER 0x21 |
182 | #define USB_DT_RPIPE 0x22 | 188 | #define USB_DT_RPIPE 0x22 |
189 | #define USB_DT_CS_RADIO_CONTROL 0x23 | ||
183 | 190 | ||
184 | /* Conventional codes for class-specific descriptors. The convention is | 191 | /* Conventional codes for class-specific descriptors. The convention is |
185 | * defined in the USB "Common Class" Spec (3.11). Individual class specs | 192 | * defined in the USB "Common Class" Spec (3.11). Individual class specs |
@@ -574,7 +581,9 @@ enum usb_device_state { | |||
574 | /* NOTE: there are actually four different SUSPENDED | 581 | /* NOTE: there are actually four different SUSPENDED |
575 | * states, returning to POWERED, DEFAULT, ADDRESS, or | 582 | * states, returning to POWERED, DEFAULT, ADDRESS, or |
576 | * CONFIGURED respectively when SOF tokens flow again. | 583 | * CONFIGURED respectively when SOF tokens flow again. |
584 | * At this level there's no difference between L1 and L2 | ||
585 | * suspend states. (L2 being original USB 1.1 suspend.) | ||
577 | */ | 586 | */ |
578 | }; | 587 | }; |
579 | 588 | ||
580 | #endif /* __LINUX_USB_CH9_H */ | 589 | #endif /* __LINUX_USB_CH9_H */ |
diff --git a/include/linux/usb/g_printer.h b/include/linux/usb/g_printer.h index 0c5ea1e3eb98..6178fde50f74 100644 --- a/include/linux/usb/g_printer.h +++ b/include/linux/usb/g_printer.h | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef __LINUX_USB_G_PRINTER_H | ||
22 | #define __LINUX_USB_G_PRINTER_H | ||
21 | 23 | ||
22 | #define PRINTER_NOT_ERROR 0x08 | 24 | #define PRINTER_NOT_ERROR 0x08 |
23 | #define PRINTER_SELECTED 0x10 | 25 | #define PRINTER_SELECTED 0x10 |
@@ -29,3 +31,5 @@ | |||
29 | */ | 31 | */ |
30 | #define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char) | 32 | #define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char) |
31 | #define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char) | 33 | #define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char) |
34 | |||
35 | #endif /* __LINUX_USB_G_PRINTER_H */ | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index f3295296b435..d8128f7102c9 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -846,4 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | |||
846 | 846 | ||
847 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; | 847 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; |
848 | 848 | ||
849 | #endif /* __LINUX_USB_GADGET_H */ | 849 | #endif /* __LINUX_USB_GADGET_H */ |
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h index c291ab1af747..ea45f265ec05 100644 --- a/include/linux/usb/gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -1,11 +1,3 @@ | |||
1 | #ifndef __LINUX_USB_GADGETFS_H | ||
2 | #define __LINUX_USB_GADGETFS_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | #include <asm/ioctl.h> | ||
6 | |||
7 | #include <linux/usb/ch9.h> | ||
8 | |||
9 | /* | 1 | /* |
10 | * Filesystem based user-mode API to USB Gadget controller hardware | 2 | * Filesystem based user-mode API to USB Gadget controller hardware |
11 | * | 3 | * |
@@ -23,6 +15,14 @@ | |||
23 | * then performing data transfers by reading or writing. | 15 | * then performing data transfers by reading or writing. |
24 | */ | 16 | */ |
25 | 17 | ||
18 | #ifndef __LINUX_USB_GADGETFS_H | ||
19 | #define __LINUX_USB_GADGETFS_H | ||
20 | |||
21 | #include <asm/types.h> | ||
22 | #include <asm/ioctl.h> | ||
23 | |||
24 | #include <linux/usb/ch9.h> | ||
25 | |||
26 | /* | 26 | /* |
27 | * Events are delivered on the ep0 file descriptor, when the user mode driver | 27 | * Events are delivered on the ep0 file descriptor, when the user mode driver |
28 | * reads from this file descriptor after writing the descriptors. Don't | 28 | * reads from this file descriptor after writing the descriptors. Don't |
diff --git a/include/linux/usb/input.h b/include/linux/usb/input.h index 716e0cc16043..0e010b220e85 100644 --- a/include/linux/usb/input.h +++ b/include/linux/usb/input.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef __USB_INPUT_H | ||
2 | #define __USB_INPUT_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 2005 Dmitry Torokhov | 2 | * Copyright (C) 2005 Dmitry Torokhov |
6 | * | 3 | * |
@@ -9,6 +6,9 @@ | |||
9 | * the Free Software Foundation. | 6 | * the Free Software Foundation. |
10 | */ | 7 | */ |
11 | 8 | ||
9 | #ifndef __LINUX_USB_INPUT_H | ||
10 | #define __LINUX_USB_INPUT_H | ||
11 | |||
12 | #include <linux/usb.h> | 12 | #include <linux/usb.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <asm/byteorder.h> | 14 | #include <asm/byteorder.h> |
@@ -22,4 +22,4 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id) | |||
22 | id->version = le16_to_cpu(dev->descriptor.bcdDevice); | 22 | id->version = le16_to_cpu(dev->descriptor.bcdDevice); |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif | 25 | #endif /* __LINUX_USB_INPUT_H */ |
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h index de6f380e17a2..4fd6513d564c 100644 --- a/include/linux/usb/iowarrior.h +++ b/include/linux/usb/iowarrior.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _IOWARRIOR_H_ | 1 | #ifndef __LINUX_USB_IOWARRIOR_H |
2 | #define _IOWARRIOR_H_ | 2 | #define __LINUX_USB_IOWARRIOR_H |
3 | 3 | ||
4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ | 4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ |
5 | 5 | ||
@@ -39,4 +39,4 @@ struct iowarrior_info { | |||
39 | */ | 39 | */ |
40 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) | 40 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) |
41 | 41 | ||
42 | #endif /* _IOWARRIOR_H_ */ | 42 | #endif /* __LINUX_USB_IOWARRIOR_H */ |
diff --git a/include/linux/usb/isp116x.h b/include/linux/usb/isp116x.h index 67d2826f34fe..96ca114e88d0 100644 --- a/include/linux/usb/isp116x.h +++ b/include/linux/usb/isp116x.h | |||
@@ -1,9 +1,11 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Board initialization code should put one of these into dev->platform_data | 2 | * Board initialization code should put one of these into dev->platform_data |
4 | * and place the isp116x onto platform_bus. | 3 | * and place the isp116x onto platform_bus. |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifndef __LINUX_USB_ISP116X_H | ||
7 | #define __LINUX_USB_ISP116X_H | ||
8 | |||
7 | struct isp116x_platform_data { | 9 | struct isp116x_platform_data { |
8 | /* Enable internal resistors on downstream ports */ | 10 | /* Enable internal resistors on downstream ports */ |
9 | unsigned sel15Kres:1; | 11 | unsigned sel15Kres:1; |
@@ -27,3 +29,5 @@ struct isp116x_platform_data { | |||
27 | */ | 29 | */ |
28 | void (*delay) (struct device *dev, int delay); | 30 | void (*delay) (struct device *dev, int delay); |
29 | }; | 31 | }; |
32 | |||
33 | #endif /* __LINUX_USB_ISP116X_H */ | ||
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h index 80624c562921..1d1040865661 100644 --- a/include/linux/usb/midi.h +++ b/include/linux/usb/midi.h | |||
@@ -109,4 +109,4 @@ struct usb_ms_endpoint_descriptor_##n { \ | |||
109 | __u8 baAssocJackID[n]; \ | 109 | __u8 baAssocJackID[n]; \ |
110 | } __attribute__ ((packed)) | 110 | } __attribute__ ((packed)) |
111 | 111 | ||
112 | #endif | 112 | #endif /* __LINUX_USB_MIDI_H */ |
diff --git a/include/linux/usb/net2280.h b/include/linux/usb/net2280.h index ec897cb844ab..96ca549a778d 100644 --- a/include/linux/usb/net2280.h +++ b/include/linux/usb/net2280.h | |||
@@ -1,11 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * NetChip 2280 high/full speed USB device controller. | 2 | * NetChip 2280 high/full speed USB device controller. |
3 | * Unlike many such controllers, this one talks PCI. | 3 | * Unlike many such controllers, this one talks PCI. |
4 | */ | 4 | * |
5 | #ifndef __LINUX_USB_NET2280_H | ||
6 | #define __LINUX_USB_NET2280_H | ||
7 | |||
8 | /* | ||
9 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) | 5 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) |
10 | * Copyright (C) 2003 David Brownell | 6 | * Copyright (C) 2003 David Brownell |
11 | * | 7 | * |
@@ -24,6 +20,9 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 21 | */ |
26 | 22 | ||
23 | #ifndef __LINUX_USB_NET2280_H | ||
24 | #define __LINUX_USB_NET2280_H | ||
25 | |||
27 | /*-------------------------------------------------------------------------*/ | 26 | /*-------------------------------------------------------------------------*/ |
28 | 27 | ||
29 | /* NET2280 MEMORY MAPPED REGISTERS | 28 | /* NET2280 MEMORY MAPPED REGISTERS |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index e007074ebe41..1db25d152ad8 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -1,11 +1,13 @@ | |||
1 | /* USB OTG (On The Go) defines */ | 1 | /* USB OTG (On The Go) defines */ |
2 | |||
3 | /* | 2 | /* |
3 | * | ||
4 | * These APIs may be used between USB controllers. USB device drivers | 4 | * These APIs may be used between USB controllers. USB device drivers |
5 | * (for either host or peripheral roles) don't use these calls; they | 5 | * (for either host or peripheral roles) don't use these calls; they |
6 | * continue to use just usb_device and usb_gadget. | 6 | * continue to use just usb_device and usb_gadget. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __LINUX_USB_OTG_H | ||
10 | #define __LINUX_USB_OTG_H | ||
9 | 11 | ||
10 | /* OTG defines lots of enumeration states before device reset */ | 12 | /* OTG defines lots of enumeration states before device reset */ |
11 | enum usb_otg_state { | 13 | enum usb_otg_state { |
@@ -129,3 +131,5 @@ otg_start_srp(struct otg_transceiver *otg) | |||
129 | 131 | ||
130 | /* for OTG controller drivers (and maybe other stuff) */ | 132 | /* for OTG controller drivers (and maybe other stuff) */ |
131 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); | 133 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
134 | |||
135 | #endif /* __LINUX_USB_OTG_H */ | ||
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 1f999ec8d08c..7f6c603db654 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -4,6 +4,9 @@ | |||
4 | * belong here. | 4 | * belong here. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __LINUX_USB_QUIRKS_H | ||
8 | #define __LINUX_USB_QUIRKS_H | ||
9 | |||
7 | /* string descriptors must not be fetched using a 255-byte read */ | 10 | /* string descriptors must not be fetched using a 255-byte read */ |
8 | #define USB_QUIRK_STRING_FETCH_255 0x00000001 | 11 | #define USB_QUIRK_STRING_FETCH_255 0x00000001 |
9 | 12 | ||
@@ -12,3 +15,5 @@ | |||
12 | 15 | ||
13 | /* device can't handle Set-Interface requests */ | 16 | /* device can't handle Set-Interface requests */ |
14 | #define USB_QUIRK_NO_SET_INTF 0x00000004 | 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 |
18 | |||
19 | #endif /* __LINUX_USB_QUIRKS_H */ | ||
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index edc1d4a0e272..29d6458ecb8d 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -17,10 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | #ifndef __LINUX_USB_RNDIS_HOST_H | |
21 | #ifndef __RNDIS_HOST_H | 21 | #define __LINUX_USB_RNDIS_HOST_H |
22 | #define __RNDIS_HOST_H | ||
23 | |||
24 | 22 | ||
25 | /* | 23 | /* |
26 | * CONTROL uses CDC "encapsulated commands" with funky notifications. | 24 | * CONTROL uses CDC "encapsulated commands" with funky notifications. |
@@ -270,5 +268,4 @@ extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb); | |||
270 | extern struct sk_buff * | 268 | extern struct sk_buff * |
271 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); | 269 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); |
272 | 270 | ||
273 | #endif /* __RNDIS_HOST_H */ | 271 | #endif /* __LINUX_USB_RNDIS_HOST_H */ |
274 | |||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 21b4a1c6f585..8f891cbaf9ab 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | |||
14 | #ifndef __LINUX_USB_SERIAL_H | 13 | #ifndef __LINUX_USB_SERIAL_H |
15 | #define __LINUX_USB_SERIAL_H | 14 | #define __LINUX_USB_SERIAL_H |
16 | 15 | ||
@@ -146,8 +145,6 @@ struct usb_serial { | |||
146 | }; | 145 | }; |
147 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) | 146 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) |
148 | 147 | ||
149 | #define NUM_DONT_CARE 99 | ||
150 | |||
151 | /* get and set the serial private data pointer helper functions */ | 148 | /* get and set the serial private data pointer helper functions */ |
152 | static inline void *usb_get_serial_data(struct usb_serial *serial) | 149 | static inline void *usb_get_serial_data(struct usb_serial *serial) |
153 | { | 150 | { |
@@ -165,18 +162,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
165 | * used in the syslog messages when a device is inserted or removed. | 162 | * used in the syslog messages when a device is inserted or removed. |
166 | * @id_table: pointer to a list of usb_device_id structures that define all | 163 | * @id_table: pointer to a list of usb_device_id structures that define all |
167 | * of the devices this structure can support. | 164 | * of the devices this structure can support. |
168 | * @num_interrupt_in: If a device doesn't have this many interrupt-in | ||
169 | * endpoints, it won't be sent to the driver's attach() method. | ||
170 | * (But it might still be sent to the probe() method.) | ||
171 | * @num_interrupt_out: If a device doesn't have this many interrupt-out | ||
172 | * endpoints, it won't be sent to the driver's attach() method. | ||
173 | * (But it might still be sent to the probe() method.) | ||
174 | * @num_bulk_in: If a device doesn't have this many bulk-in | ||
175 | * endpoints, it won't be sent to the driver's attach() method. | ||
176 | * (But it might still be sent to the probe() method.) | ||
177 | * @num_bulk_out: If a device doesn't have this many bulk-out | ||
178 | * endpoints, it won't be sent to the driver's attach() method. | ||
179 | * (But it might still be sent to the probe() method.) | ||
180 | * @num_ports: the number of different ports this device will have. | 165 | * @num_ports: the number of different ports this device will have. |
181 | * @calc_num_ports: pointer to a function to determine how many ports this | 166 | * @calc_num_ports: pointer to a function to determine how many ports this |
182 | * device has dynamically. It will be called after the probe() | 167 | * device has dynamically. It will be called after the probe() |
@@ -212,10 +197,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
212 | struct usb_serial_driver { | 197 | struct usb_serial_driver { |
213 | const char *description; | 198 | const char *description; |
214 | const struct usb_device_id *id_table; | 199 | const struct usb_device_id *id_table; |
215 | char num_interrupt_in; | ||
216 | char num_interrupt_out; | ||
217 | char num_bulk_in; | ||
218 | char num_bulk_out; | ||
219 | char num_ports; | 200 | char num_ports; |
220 | 201 | ||
221 | struct list_head driver_list; | 202 | struct list_head driver_list; |
@@ -340,5 +321,5 @@ static inline void usb_serial_debug_data(int debug, | |||
340 | 321 | ||
341 | 322 | ||
342 | 323 | ||
343 | #endif /* ifdef __LINUX_USB_SERIAL_H */ | 324 | #endif /* __LINUX_USB_SERIAL_H */ |
344 | 325 | ||
diff --git a/include/linux/usb/sl811.h b/include/linux/usb/sl811.h index 877373da410d..3afe4d16fcef 100644 --- a/include/linux/usb/sl811.h +++ b/include/linux/usb/sl811.h | |||
@@ -1,9 +1,11 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * board initialization should put one of these into dev->platform_data | 2 | * board initialization should put one of these into dev->platform_data |
4 | * and place the sl811hs onto platform_bus named "sl811-hcd". | 3 | * and place the sl811hs onto platform_bus named "sl811-hcd". |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifndef __LINUX_USB_SL811_H | ||
7 | #define __LINUX_USB_SL811_H | ||
8 | |||
7 | struct sl811_platform_data { | 9 | struct sl811_platform_data { |
8 | unsigned can_wakeup:1; | 10 | unsigned can_wakeup:1; |
9 | 11 | ||
@@ -24,3 +26,4 @@ struct sl811_platform_data { | |||
24 | /* void (*clock_enable)(struct device *dev, int is_on); */ | 26 | /* void (*clock_enable)(struct device *dev, int is_on); */ |
25 | }; | 27 | }; |
26 | 28 | ||
29 | #endif /* __LINUX_USB_SL811_H */ | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index e0501da3dd11..ba09fe88adda 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -19,10 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | #ifndef __LINUX_USB_USBNET_H | |
23 | #ifndef __USBNET_H | 23 | #define __LINUX_USB_USBNET_H |
24 | #define __USBNET_H | ||
25 | |||
26 | 24 | ||
27 | /* interface from usbnet core to each USB networking link we handle */ | 25 | /* interface from usbnet core to each USB networking link we handle */ |
28 | struct usbnet { | 26 | struct usbnet { |
@@ -211,4 +209,4 @@ extern int usbnet_nway_reset(struct net_device *net); | |||
211 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ | 209 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ |
212 | 210 | ||
213 | 211 | ||
214 | #endif /* __USBNET_H */ | 212 | #endif /* __LINUX_USB_USBNET_H */ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 0a40dfa44c9f..d9a3bbe38e6b 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -85,6 +85,7 @@ enum { US_DO_ALL_FLAGS }; | |||
85 | #define US_SC_LOCKABLE 0x07 /* Password-protected */ | 85 | #define US_SC_LOCKABLE 0x07 /* Password-protected */ |
86 | 86 | ||
87 | #define US_SC_ISD200 0xf0 /* ISD200 ATA */ | 87 | #define US_SC_ISD200 0xf0 /* ISD200 ATA */ |
88 | #define US_SC_CYP_ATACB 0xf1 /* Cypress ATACB */ | ||
88 | #define US_SC_DEVICE 0xff /* Use device's value */ | 89 | #define US_SC_DEVICE 0xff /* Use device's value */ |
89 | 90 | ||
90 | /* Protocols */ | 91 | /* Protocols */ |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 17cb108b7db0..3118ede2c67b 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -77,8 +77,11 @@ struct usbdevfs_connectinfo { | |||
77 | unsigned char slow; | 77 | unsigned char slow; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #define USBDEVFS_URB_SHORT_NOT_OK 1 | 80 | #define USBDEVFS_URB_SHORT_NOT_OK 0x01 |
81 | #define USBDEVFS_URB_ISO_ASAP 2 | 81 | #define USBDEVFS_URB_ISO_ASAP 0x02 |
82 | #define USBDEVFS_URB_NO_FSBR 0x20 | ||
83 | #define USBDEVFS_URB_ZERO_PACKET 0x40 | ||
84 | #define USBDEVFS_URB_NO_INTERRUPT 0x80 | ||
82 | 85 | ||
83 | #define USBDEVFS_URB_TYPE_ISO 0 | 86 | #define USBDEVFS_URB_TYPE_ISO 0 |
84 | #define USBDEVFS_URB_TYPE_INTERRUPT 1 | 87 | #define USBDEVFS_URB_TYPE_INTERRUPT 1 |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 17a80177a674..c1411189ba6c 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -282,6 +282,7 @@ struct v4l2_pix_format | |||
282 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ | 282 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ |
283 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ | 283 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ |
284 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ | 284 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ |
285 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y','1','6',' ') /* 16 Greyscale */ | ||
285 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P','A','L','8') /* 8 8-bit palette */ | 286 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P','A','L','8') /* 8 8-bit palette */ |
286 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ | 287 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ |
287 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ | 288 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ |
@@ -308,6 +309,7 @@ struct v4l2_pix_format | |||
308 | 309 | ||
309 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 310 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
310 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 311 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ |
312 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */ | ||
311 | 313 | ||
312 | /* compressed formats */ | 314 | /* compressed formats */ |
313 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ | 315 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ |
@@ -793,6 +795,7 @@ struct v4l2_ext_controls | |||
793 | /* Values for ctrl_class field */ | 795 | /* Values for ctrl_class field */ |
794 | #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ | 796 | #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ |
795 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ | 797 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ |
798 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ | ||
796 | 799 | ||
797 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | 800 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
798 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 801 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
@@ -849,21 +852,37 @@ struct v4l2_querymenu | |||
849 | #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) | 852 | #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) |
850 | #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) | 853 | #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) |
851 | #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) | 854 | #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) |
852 | #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) | 855 | #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */ |
853 | #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) | 856 | #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) |
854 | #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) | 857 | #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) |
855 | #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) | 858 | #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) |
856 | #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) | 859 | #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) |
857 | #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) | 860 | #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) |
858 | #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ | 861 | #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */ |
859 | #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) | 862 | #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) |
860 | #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) | 863 | #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) |
861 | #define V4L2_CID_GAIN (V4L2_CID_BASE+19) | 864 | #define V4L2_CID_GAIN (V4L2_CID_BASE+19) |
862 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) |
863 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | 866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) |
864 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) | 867 | |
865 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) | 868 | /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ |
866 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ | 869 | #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) |
870 | #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) | ||
871 | |||
872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | ||
873 | enum v4l2_power_line_frequency { | ||
874 | V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0, | ||
875 | V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1, | ||
876 | V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, | ||
877 | }; | ||
878 | #define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) | ||
879 | #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) | ||
880 | #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) | ||
881 | #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) | ||
882 | #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) | ||
883 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) | ||
884 | /* last CID + 1 */ | ||
885 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+31) | ||
867 | 886 | ||
868 | /* MPEG-class control IDs defined by V4L2 */ | 887 | /* MPEG-class control IDs defined by V4L2 */ |
869 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 888 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1051,6 +1070,32 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type { | |||
1051 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) | 1070 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) |
1052 | #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) | 1071 | #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) |
1053 | 1072 | ||
1073 | /* Camera class control IDs */ | ||
1074 | #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) | ||
1075 | #define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) | ||
1076 | |||
1077 | #define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) | ||
1078 | enum v4l2_exposure_auto_type { | ||
1079 | V4L2_EXPOSURE_AUTO = 0, | ||
1080 | V4L2_EXPOSURE_MANUAL = 1, | ||
1081 | V4L2_EXPOSURE_SHUTTER_PRIORITY = 2, | ||
1082 | V4L2_EXPOSURE_APERTURE_PRIORITY = 3 | ||
1083 | }; | ||
1084 | #define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) | ||
1085 | #define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) | ||
1086 | |||
1087 | #define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) | ||
1088 | #define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) | ||
1089 | #define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) | ||
1090 | #define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) | ||
1091 | |||
1092 | #define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) | ||
1093 | #define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) | ||
1094 | |||
1095 | #define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) | ||
1096 | #define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) | ||
1097 | #define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) | ||
1098 | |||
1054 | /* | 1099 | /* |
1055 | * T U N I N G | 1100 | * T U N I N G |
1056 | */ | 1101 | */ |
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h new file mode 100644 index 000000000000..4d13732e9cf0 --- /dev/null +++ b/include/linux/wm97xx.h | |||
@@ -0,0 +1,314 @@ | |||
1 | |||
2 | /* | ||
3 | * Register bits and API for Wolfson WM97xx series of codecs | ||
4 | */ | ||
5 | |||
6 | #ifndef _LINUX_WM97XX_H | ||
7 | #define _LINUX_WM97XX_H | ||
8 | |||
9 | #include <sound/core.h> | ||
10 | #include <sound/pcm.h> | ||
11 | #include <sound/ac97_codec.h> | ||
12 | #include <sound/initval.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/input.h> /* Input device layer */ | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | /* | ||
19 | * WM97xx AC97 Touchscreen registers | ||
20 | */ | ||
21 | #define AC97_WM97XX_DIGITISER1 0x76 | ||
22 | #define AC97_WM97XX_DIGITISER2 0x78 | ||
23 | #define AC97_WM97XX_DIGITISER_RD 0x7a | ||
24 | #define AC97_WM9713_DIG1 0x74 | ||
25 | #define AC97_WM9713_DIG2 AC97_WM97XX_DIGITISER1 | ||
26 | #define AC97_WM9713_DIG3 AC97_WM97XX_DIGITISER2 | ||
27 | |||
28 | /* | ||
29 | * WM97xx register bits | ||
30 | */ | ||
31 | #define WM97XX_POLL 0x8000 /* initiate a polling measurement */ | ||
32 | #define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */ | ||
33 | #define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */ | ||
34 | #define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */ | ||
35 | #define WM97XX_ADCSEL_MASK 0x7000 | ||
36 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ | ||
37 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ | ||
38 | #define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */ | ||
39 | #define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */ | ||
40 | #define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */ | ||
41 | #define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */ | ||
42 | #define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */ | ||
43 | #define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */ | ||
44 | #define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */ | ||
45 | #define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */ | ||
46 | #define WM97XX_CM_RATE_MASK 0x03f0 | ||
47 | #define WM97XX_RATE(i) (((i & 3) << 8) | ((i & 4) ? 0xf0 : 0)) | ||
48 | #define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */ | ||
49 | #define WM97XX_DELAY_MASK 0x00f0 | ||
50 | #define WM97XX_SLEN 0x0008 /* slot read back enable */ | ||
51 | #define WM97XX_SLT(i) ((i - 5) & 0x7) /* panel slot (5-11) */ | ||
52 | #define WM97XX_SLT_MASK 0x0007 | ||
53 | #define WM97XX_PRP_DETW 0x4000 /* detect on, digitise off, wake */ | ||
54 | #define WM97XX_PRP_DET 0x8000 /* detect on, digitise off, no wake */ | ||
55 | #define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */ | ||
56 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ | ||
57 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ | ||
58 | #define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */ | ||
59 | |||
60 | #define WM97XX_AUX_ID1 0x8001 | ||
61 | #define WM97XX_AUX_ID2 0x8002 | ||
62 | #define WM97XX_AUX_ID3 0x8003 | ||
63 | #define WM97XX_AUX_ID4 0x8004 | ||
64 | |||
65 | |||
66 | /* WM9712 Bits */ | ||
67 | #define WM9712_45W 0x1000 /* set for 5-wire touchscreen */ | ||
68 | #define WM9712_PDEN 0x0800 /* measure only when pen down */ | ||
69 | #define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */ | ||
70 | #define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */ | ||
71 | #define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */ | ||
72 | #define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */ | ||
73 | #define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */ | ||
74 | #define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */ | ||
75 | #define WM9712_PD(i) (0x1 << i) /* power management */ | ||
76 | |||
77 | /* WM9712 Registers */ | ||
78 | #define AC97_WM9712_POWER 0x24 | ||
79 | #define AC97_WM9712_REV 0x58 | ||
80 | |||
81 | /* WM9705 Bits */ | ||
82 | #define WM9705_PDEN 0x1000 /* measure only when pen is down */ | ||
83 | #define WM9705_PINV 0x0800 /* inverts sense of pen down output */ | ||
84 | #define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */ | ||
85 | #define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */ | ||
86 | #define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */ | ||
87 | #define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */ | ||
88 | #define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */ | ||
89 | #define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */ | ||
90 | #define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */ | ||
91 | #define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */ | ||
92 | #define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */ | ||
93 | |||
94 | |||
95 | /* WM9713 Bits */ | ||
96 | #define WM9713_PDPOL 0x0400 /* Pen down polarity */ | ||
97 | #define WM9713_POLL 0x0200 /* initiate a polling measurement */ | ||
98 | #define WM9713_CTC 0x0100 /* enable continuous mode */ | ||
99 | #define WM9713_ADCSEL_X 0x0002 /* X measurement */ | ||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | ||
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | ||
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | ||
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | ||
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | ||
106 | |||
107 | /* AUX ADC ID's */ | ||
108 | #define TS_COMP1 0x0 | ||
109 | #define TS_COMP2 0x1 | ||
110 | #define TS_BMON 0x2 | ||
111 | #define TS_WIPER 0x3 | ||
112 | |||
113 | /* ID numbers */ | ||
114 | #define WM97XX_ID1 0x574d | ||
115 | #define WM9712_ID2 0x4c12 | ||
116 | #define WM9705_ID2 0x4c05 | ||
117 | #define WM9713_ID2 0x4c13 | ||
118 | |||
119 | /* Codec GPIO's */ | ||
120 | #define WM97XX_MAX_GPIO 16 | ||
121 | #define WM97XX_GPIO_1 (1 << 1) | ||
122 | #define WM97XX_GPIO_2 (1 << 2) | ||
123 | #define WM97XX_GPIO_3 (1 << 3) | ||
124 | #define WM97XX_GPIO_4 (1 << 4) | ||
125 | #define WM97XX_GPIO_5 (1 << 5) | ||
126 | #define WM97XX_GPIO_6 (1 << 6) | ||
127 | #define WM97XX_GPIO_7 (1 << 7) | ||
128 | #define WM97XX_GPIO_8 (1 << 8) | ||
129 | #define WM97XX_GPIO_9 (1 << 9) | ||
130 | #define WM97XX_GPIO_10 (1 << 10) | ||
131 | #define WM97XX_GPIO_11 (1 << 11) | ||
132 | #define WM97XX_GPIO_12 (1 << 12) | ||
133 | #define WM97XX_GPIO_13 (1 << 13) | ||
134 | #define WM97XX_GPIO_14 (1 << 14) | ||
135 | #define WM97XX_GPIO_15 (1 << 15) | ||
136 | |||
137 | |||
138 | #define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */ | ||
139 | |||
140 | |||
141 | /*---------------- Return codes from sample reading functions ---------------*/ | ||
142 | |||
143 | /* More data is available; call the sample gathering function again */ | ||
144 | #define RC_AGAIN 0x00000001 | ||
145 | /* The returned sample is valid */ | ||
146 | #define RC_VALID 0x00000002 | ||
147 | /* The pen is up (the first RC_VALID without RC_PENUP means pen is down) */ | ||
148 | #define RC_PENUP 0x00000004 | ||
149 | /* The pen is down (RC_VALID implies RC_PENDOWN, but sometimes it is helpful | ||
150 | to tell the handler that the pen is down but we don't know yet his coords, | ||
151 | so the handler should not sleep or wait for pendown irq) */ | ||
152 | #define RC_PENDOWN 0x00000008 | ||
153 | |||
154 | /* | ||
155 | * The wm97xx driver provides a private API for writing platform-specific | ||
156 | * drivers. | ||
157 | */ | ||
158 | |||
159 | /* The structure used to return arch specific sampled data into */ | ||
160 | struct wm97xx_data { | ||
161 | int x; | ||
162 | int y; | ||
163 | int p; | ||
164 | }; | ||
165 | |||
166 | /* | ||
167 | * Codec GPIO status | ||
168 | */ | ||
169 | enum wm97xx_gpio_status { | ||
170 | WM97XX_GPIO_HIGH, | ||
171 | WM97XX_GPIO_LOW | ||
172 | }; | ||
173 | |||
174 | /* | ||
175 | * Codec GPIO direction | ||
176 | */ | ||
177 | enum wm97xx_gpio_dir { | ||
178 | WM97XX_GPIO_IN, | ||
179 | WM97XX_GPIO_OUT | ||
180 | }; | ||
181 | |||
182 | /* | ||
183 | * Codec GPIO polarity | ||
184 | */ | ||
185 | enum wm97xx_gpio_pol { | ||
186 | WM97XX_GPIO_POL_HIGH, | ||
187 | WM97XX_GPIO_POL_LOW | ||
188 | }; | ||
189 | |||
190 | /* | ||
191 | * Codec GPIO sticky | ||
192 | */ | ||
193 | enum wm97xx_gpio_sticky { | ||
194 | WM97XX_GPIO_STICKY, | ||
195 | WM97XX_GPIO_NOTSTICKY | ||
196 | }; | ||
197 | |||
198 | /* | ||
199 | * Codec GPIO wake | ||
200 | */ | ||
201 | enum wm97xx_gpio_wake { | ||
202 | WM97XX_GPIO_WAKE, | ||
203 | WM97XX_GPIO_NOWAKE | ||
204 | }; | ||
205 | |||
206 | /* | ||
207 | * Digitiser ioctl commands | ||
208 | */ | ||
209 | #define WM97XX_DIG_START 0x1 | ||
210 | #define WM97XX_DIG_STOP 0x2 | ||
211 | #define WM97XX_PHY_INIT 0x3 | ||
212 | #define WM97XX_AUX_PREPARE 0x4 | ||
213 | #define WM97XX_DIG_RESTORE 0x5 | ||
214 | |||
215 | struct wm97xx; | ||
216 | |||
217 | extern struct wm97xx_codec_drv wm9705_codec; | ||
218 | extern struct wm97xx_codec_drv wm9712_codec; | ||
219 | extern struct wm97xx_codec_drv wm9713_codec; | ||
220 | |||
221 | /* | ||
222 | * Codec driver interface - allows mapping to WM9705/12/13 and newer codecs | ||
223 | */ | ||
224 | struct wm97xx_codec_drv { | ||
225 | u16 id; | ||
226 | char *name; | ||
227 | |||
228 | /* read 1 sample */ | ||
229 | int (*poll_sample) (struct wm97xx *, int adcsel, int *sample); | ||
230 | |||
231 | /* read X,Y,[P] in poll */ | ||
232 | int (*poll_touch) (struct wm97xx *, struct wm97xx_data *); | ||
233 | |||
234 | int (*acc_enable) (struct wm97xx *, int enable); | ||
235 | void (*phy_init) (struct wm97xx *); | ||
236 | void (*dig_enable) (struct wm97xx *, int enable); | ||
237 | void (*dig_restore) (struct wm97xx *); | ||
238 | void (*aux_prepare) (struct wm97xx *); | ||
239 | }; | ||
240 | |||
241 | |||
242 | /* Machine specific and accelerated touch operations */ | ||
243 | struct wm97xx_mach_ops { | ||
244 | |||
245 | /* accelerated touch readback - coords are transmited on AC97 link */ | ||
246 | int acc_enabled; | ||
247 | void (*acc_pen_up) (struct wm97xx *); | ||
248 | int (*acc_pen_down) (struct wm97xx *); | ||
249 | int (*acc_startup) (struct wm97xx *); | ||
250 | void (*acc_shutdown) (struct wm97xx *); | ||
251 | |||
252 | /* interrupt mask control - required for accelerated operation */ | ||
253 | void (*irq_enable) (struct wm97xx *, int enable); | ||
254 | |||
255 | /* GPIO pin used for accelerated operation */ | ||
256 | int irq_gpio; | ||
257 | |||
258 | /* pre and post sample - can be used to minimise any analog noise */ | ||
259 | void (*pre_sample) (int); /* function to run before sampling */ | ||
260 | void (*post_sample) (int); /* function to run after sampling */ | ||
261 | }; | ||
262 | |||
263 | struct wm97xx { | ||
264 | u16 dig[3], id, gpio[6], misc; /* Cached codec registers */ | ||
265 | u16 dig_save[3]; /* saved during aux reading */ | ||
266 | struct wm97xx_codec_drv *codec; /* attached codec driver*/ | ||
267 | struct input_dev *input_dev; /* touchscreen input device */ | ||
268 | struct snd_ac97 *ac97; /* ALSA codec access */ | ||
269 | struct device *dev; /* ALSA device */ | ||
270 | struct platform_device *battery_dev; | ||
271 | struct platform_device *touch_dev; | ||
272 | struct wm97xx_mach_ops *mach_ops; | ||
273 | struct mutex codec_mutex; | ||
274 | struct delayed_work ts_reader; /* Used to poll touchscreen */ | ||
275 | unsigned long ts_reader_interval; /* Current interval for timer */ | ||
276 | unsigned long ts_reader_min_interval; /* Minimum interval */ | ||
277 | unsigned int pen_irq; /* Pen IRQ number in use */ | ||
278 | struct workqueue_struct *ts_workq; | ||
279 | struct work_struct pen_event_work; | ||
280 | u16 acc_slot; /* AC97 slot used for acc touch data */ | ||
281 | u16 acc_rate; /* acc touch data rate */ | ||
282 | unsigned pen_is_down:1; /* Pen is down */ | ||
283 | unsigned aux_waiting:1; /* aux measurement waiting */ | ||
284 | unsigned pen_probably_down:1; /* used in polling mode */ | ||
285 | u16 suspend_mode; /* PRP in suspend mode */ | ||
286 | }; | ||
287 | |||
288 | /* | ||
289 | * Codec GPIO access (not supported on WM9705) | ||
290 | * This can be used to set/get codec GPIO and Virtual GPIO status. | ||
291 | */ | ||
292 | enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio); | ||
293 | void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio, | ||
294 | enum wm97xx_gpio_status status); | ||
295 | void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, | ||
296 | enum wm97xx_gpio_dir dir, | ||
297 | enum wm97xx_gpio_pol pol, | ||
298 | enum wm97xx_gpio_sticky sticky, | ||
299 | enum wm97xx_gpio_wake wake); | ||
300 | |||
301 | void wm97xx_set_suspend_mode(struct wm97xx *wm, u16 mode); | ||
302 | |||
303 | /* codec AC97 IO access */ | ||
304 | int wm97xx_reg_read(struct wm97xx *wm, u16 reg); | ||
305 | void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val); | ||
306 | |||
307 | /* aux adc readback */ | ||
308 | int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel); | ||
309 | |||
310 | /* machine ops */ | ||
311 | int wm97xx_register_mach_ops(struct wm97xx *, struct wm97xx_mach_ops *); | ||
312 | void wm97xx_unregister_mach_ops(struct wm97xx *); | ||
313 | |||
314 | #endif | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 0c82c80b277f..2ca6bae88721 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -97,10 +97,10 @@ struct xfrm_algo { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | struct xfrm_algo_aead { | 99 | struct xfrm_algo_aead { |
100 | char alg_name[64]; | 100 | char alg_name[64]; |
101 | int alg_key_len; /* in bits */ | 101 | unsigned int alg_key_len; /* in bits */ |
102 | int alg_icv_len; /* in bits */ | 102 | unsigned int alg_icv_len; /* in bits */ |
103 | char alg_key[0]; | 103 | char alg_key[0]; |
104 | }; | 104 | }; |
105 | 105 | ||
106 | struct xfrm_stats { | 106 | struct xfrm_stats { |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index a4274203f252..bfee8be5d63f 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -107,6 +107,7 @@ extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; | |||
107 | extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; | 107 | extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; |
108 | extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; | 108 | extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; |
109 | extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; | 109 | extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; |
110 | extern IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE]; | ||
110 | extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; | 111 | extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; |
111 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; | 112 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; |
112 | extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; | 113 | extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; |
@@ -141,8 +142,10 @@ extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; | |||
141 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | 142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; |
142 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; | 143 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; |
143 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; | 144 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; |
145 | extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; | ||
144 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; | 146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; |
145 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; | 147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; |
148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; | ||
146 | 149 | ||
147 | #endif | 150 | #endif |
148 | 151 | ||
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h new file mode 100644 index 000000000000..6a8c8be7a1ae --- /dev/null +++ b/include/media/soc_camera.h | |||
@@ -0,0 +1,179 @@ | |||
1 | /* | ||
2 | * camera image capture (abstract) bus driver header | ||
3 | * | ||
4 | * Copyright (C) 2006, Sascha Hauer, Pengutronix | ||
5 | * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef SOC_CAMERA_H | ||
13 | #define SOC_CAMERA_H | ||
14 | |||
15 | #include <linux/videodev2.h> | ||
16 | #include <media/videobuf-dma-sg.h> | ||
17 | |||
18 | struct soc_camera_device { | ||
19 | struct list_head list; | ||
20 | struct device dev; | ||
21 | struct device *control; | ||
22 | unsigned short width; /* Current window */ | ||
23 | unsigned short height; /* sizes */ | ||
24 | unsigned short x_min; /* Camera capabilities */ | ||
25 | unsigned short y_min; | ||
26 | unsigned short x_current; /* Current window location */ | ||
27 | unsigned short y_current; | ||
28 | unsigned short width_min; | ||
29 | unsigned short width_max; | ||
30 | unsigned short height_min; | ||
31 | unsigned short height_max; | ||
32 | unsigned short y_skip_top; /* Lines to skip at the top */ | ||
33 | unsigned short gain; | ||
34 | unsigned short exposure; | ||
35 | unsigned char iface; /* Host number */ | ||
36 | unsigned char devnum; /* Device number per host */ | ||
37 | unsigned char buswidth; /* See comment in .c */ | ||
38 | struct soc_camera_ops *ops; | ||
39 | struct video_device *vdev; | ||
40 | const struct soc_camera_data_format *current_fmt; | ||
41 | const struct soc_camera_data_format *formats; | ||
42 | int num_formats; | ||
43 | struct module *owner; | ||
44 | /* soc_camera.c private count. Only accessed with video_lock held */ | ||
45 | int use_count; | ||
46 | }; | ||
47 | |||
48 | struct soc_camera_file { | ||
49 | struct soc_camera_device *icd; | ||
50 | struct videobuf_queue vb_vidq; | ||
51 | spinlock_t *lock; | ||
52 | }; | ||
53 | |||
54 | struct soc_camera_host { | ||
55 | struct list_head list; | ||
56 | struct device dev; | ||
57 | unsigned char nr; /* Host number */ | ||
58 | size_t msize; | ||
59 | struct videobuf_queue_ops *vbq_ops; | ||
60 | void *priv; | ||
61 | char *drv_name; | ||
62 | struct soc_camera_host_ops *ops; | ||
63 | }; | ||
64 | |||
65 | struct soc_camera_host_ops { | ||
66 | struct module *owner; | ||
67 | int (*add)(struct soc_camera_device *); | ||
68 | void (*remove)(struct soc_camera_device *); | ||
69 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | ||
70 | struct v4l2_rect *); | ||
71 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
72 | int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); | ||
73 | int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); | ||
74 | int (*try_bus_param)(struct soc_camera_device *, __u32); | ||
75 | int (*set_bus_param)(struct soc_camera_device *, __u32); | ||
76 | unsigned int (*poll)(struct file *, poll_table *); | ||
77 | spinlock_t* (*spinlock_alloc)(struct soc_camera_file *); | ||
78 | void (*spinlock_free)(spinlock_t *); | ||
79 | }; | ||
80 | |||
81 | struct soc_camera_link { | ||
82 | /* Camera bus id, used to match a camera and a bus */ | ||
83 | int bus_id; | ||
84 | /* GPIO number to switch between 8 and 10 bit modes */ | ||
85 | unsigned int gpio; | ||
86 | }; | ||
87 | |||
88 | static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) | ||
89 | { | ||
90 | return container_of(dev, struct soc_camera_device, dev); | ||
91 | } | ||
92 | |||
93 | static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) | ||
94 | { | ||
95 | return container_of(dev, struct soc_camera_host, dev); | ||
96 | } | ||
97 | |||
98 | extern int soc_camera_host_register(struct soc_camera_host *ici); | ||
99 | extern void soc_camera_host_unregister(struct soc_camera_host *ici); | ||
100 | extern int soc_camera_device_register(struct soc_camera_device *icd); | ||
101 | extern void soc_camera_device_unregister(struct soc_camera_device *icd); | ||
102 | |||
103 | extern int soc_camera_video_start(struct soc_camera_device *icd); | ||
104 | extern void soc_camera_video_stop(struct soc_camera_device *icd); | ||
105 | |||
106 | struct soc_camera_data_format { | ||
107 | char *name; | ||
108 | unsigned int depth; | ||
109 | __u32 fourcc; | ||
110 | enum v4l2_colorspace colorspace; | ||
111 | }; | ||
112 | |||
113 | struct soc_camera_ops { | ||
114 | struct module *owner; | ||
115 | int (*probe)(struct soc_camera_device *); | ||
116 | void (*remove)(struct soc_camera_device *); | ||
117 | int (*init)(struct soc_camera_device *); | ||
118 | int (*release)(struct soc_camera_device *); | ||
119 | int (*start_capture)(struct soc_camera_device *); | ||
120 | int (*stop_capture)(struct soc_camera_device *); | ||
121 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | ||
122 | struct v4l2_rect *); | ||
123 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
124 | unsigned long (*query_bus_param)(struct soc_camera_device *); | ||
125 | int (*set_bus_param)(struct soc_camera_device *, unsigned long); | ||
126 | int (*get_chip_id)(struct soc_camera_device *, | ||
127 | struct v4l2_chip_ident *); | ||
128 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
129 | int (*get_register)(struct soc_camera_device *, struct v4l2_register *); | ||
130 | int (*set_register)(struct soc_camera_device *, struct v4l2_register *); | ||
131 | #endif | ||
132 | int (*get_control)(struct soc_camera_device *, struct v4l2_control *); | ||
133 | int (*set_control)(struct soc_camera_device *, struct v4l2_control *); | ||
134 | const struct v4l2_queryctrl *controls; | ||
135 | int num_controls; | ||
136 | }; | ||
137 | |||
138 | static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( | ||
139 | struct soc_camera_ops *ops, int id) | ||
140 | { | ||
141 | int i; | ||
142 | |||
143 | for (i = 0; i < ops->num_controls; i++) | ||
144 | if (ops->controls[i].id == id) | ||
145 | return &ops->controls[i]; | ||
146 | |||
147 | return NULL; | ||
148 | } | ||
149 | |||
150 | #define SOCAM_MASTER (1 << 0) | ||
151 | #define SOCAM_SLAVE (1 << 1) | ||
152 | #define SOCAM_HSYNC_ACTIVE_HIGH (1 << 2) | ||
153 | #define SOCAM_HSYNC_ACTIVE_LOW (1 << 3) | ||
154 | #define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4) | ||
155 | #define SOCAM_VSYNC_ACTIVE_LOW (1 << 5) | ||
156 | #define SOCAM_DATAWIDTH_8 (1 << 6) | ||
157 | #define SOCAM_DATAWIDTH_9 (1 << 7) | ||
158 | #define SOCAM_DATAWIDTH_10 (1 << 8) | ||
159 | #define SOCAM_PCLK_SAMPLE_RISING (1 << 9) | ||
160 | #define SOCAM_PCLK_SAMPLE_FALLING (1 << 10) | ||
161 | |||
162 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \ | ||
163 | SOCAM_DATAWIDTH_10) | ||
164 | |||
165 | static inline unsigned long soc_camera_bus_param_compatible( | ||
166 | unsigned long camera_flags, unsigned long bus_flags) | ||
167 | { | ||
168 | unsigned long common_flags, hsync, vsync, pclk; | ||
169 | |||
170 | common_flags = camera_flags & bus_flags; | ||
171 | |||
172 | hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW); | ||
173 | vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW); | ||
174 | pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING); | ||
175 | |||
176 | return (!hsync || !vsync || !pclk) ? 0 : common_flags; | ||
177 | } | ||
178 | |||
179 | #endif | ||
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index b201371416a0..ab03c5344209 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h | |||
@@ -6,10 +6,11 @@ | |||
6 | #define __TUNER_TYPES_H__ | 6 | #define __TUNER_TYPES_H__ |
7 | 7 | ||
8 | enum param_type { | 8 | enum param_type { |
9 | TUNER_PARAM_TYPE_RADIO, \ | 9 | TUNER_PARAM_TYPE_RADIO, |
10 | TUNER_PARAM_TYPE_PAL, \ | 10 | TUNER_PARAM_TYPE_PAL, |
11 | TUNER_PARAM_TYPE_SECAM, \ | 11 | TUNER_PARAM_TYPE_SECAM, |
12 | TUNER_PARAM_TYPE_NTSC | 12 | TUNER_PARAM_TYPE_NTSC, |
13 | TUNER_PARAM_TYPE_DIGITAL, | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | struct tuner_range { | 16 | struct tuner_range { |
@@ -105,6 +106,7 @@ struct tuner_params { | |||
105 | the SECAM-L/L' standards. Range: -16:+15 */ | 106 | the SECAM-L/L' standards. Range: -16:+15 */ |
106 | signed int default_top_secam_high:5; | 107 | signed int default_top_secam_high:5; |
107 | 108 | ||
109 | u16 iffreq; | ||
108 | 110 | ||
109 | unsigned int count; | 111 | unsigned int count; |
110 | struct tuner_range *ranges; | 112 | struct tuner_range *ranges; |
@@ -114,6 +116,13 @@ struct tunertype { | |||
114 | char *name; | 116 | char *name; |
115 | unsigned int count; | 117 | unsigned int count; |
116 | struct tuner_params *params; | 118 | struct tuner_params *params; |
119 | |||
120 | u16 min; | ||
121 | u16 max; | ||
122 | u32 stepsize; | ||
123 | |||
124 | u8 *initdata; | ||
125 | u8 *sleepdata; | ||
117 | }; | 126 | }; |
118 | 127 | ||
119 | extern struct tunertype tuners[]; | 128 | extern struct tunertype tuners[]; |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 1bf24a6ed8f1..77068fcc86bd 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -78,7 +78,7 @@ | |||
78 | 78 | ||
79 | #define TUNER_HITACHI_NTSC 40 | 79 | #define TUNER_HITACHI_NTSC 40 |
80 | #define TUNER_PHILIPS_PAL_MK 41 | 80 | #define TUNER_PHILIPS_PAL_MK 41 |
81 | #define TUNER_PHILIPS_ATSC 42 | 81 | #define TUNER_PHILIPS_FCV1236D 42 |
82 | #define TUNER_PHILIPS_FM1236_MK3 43 | 82 | #define TUNER_PHILIPS_FM1236_MK3 43 |
83 | 83 | ||
84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ | 84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 032bb75f69c2..0ea0bd85c036 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -153,6 +153,12 @@ enum { | |||
153 | V4L2_IDENT_MSP4428G = 44287, | 153 | V4L2_IDENT_MSP4428G = 44287, |
154 | V4L2_IDENT_MSP4448G = 44487, | 154 | V4L2_IDENT_MSP4448G = 44487, |
155 | V4L2_IDENT_MSP4458G = 44587, | 155 | V4L2_IDENT_MSP4458G = 44587, |
156 | |||
157 | /* Micron CMOS sensor chips: 45000-45099 */ | ||
158 | V4L2_IDENT_MT9M001C12ST = 45000, | ||
159 | V4L2_IDENT_MT9M001C12STM = 45005, | ||
160 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ | ||
161 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ | ||
156 | }; | 162 | }; |
157 | 163 | ||
158 | #endif | 164 | #endif |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index f2114459995d..a807d2f86ee8 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -318,6 +318,10 @@ struct video_device | |||
318 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | 318 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, |
319 | struct v4l2_chip_ident *chip); | 319 | struct v4l2_chip_ident *chip); |
320 | 320 | ||
321 | /* For other private ioctls */ | ||
322 | int (*vidioc_default) (struct file *file, void *fh, | ||
323 | int cmd, void *arg); | ||
324 | |||
321 | 325 | ||
322 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 326 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
323 | /* obsolete -- fops->owner is used instead */ | 327 | /* obsolete -- fops->owner is used instead */ |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 99033945cdee..5b39a22533fe 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -13,6 +13,9 @@ | |||
13 | * the Free Software Foundation; either version 2 | 13 | * the Free Software Foundation; either version 2 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef _VIDEOBUF_CORE_H | ||
17 | #define _VIDEOBUF_CORE_H | ||
18 | |||
16 | #include <linux/poll.h> | 19 | #include <linux/poll.h> |
17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 20 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
18 | #include <linux/videodev.h> | 21 | #include <linux/videodev.h> |
@@ -123,7 +126,8 @@ struct videobuf_queue_ops { | |||
123 | struct videobuf_qtype_ops { | 126 | struct videobuf_qtype_ops { |
124 | u32 magic; | 127 | u32 magic; |
125 | 128 | ||
126 | void* (*alloc) (size_t size); | 129 | void *(*alloc) (size_t size); |
130 | void *(*vmalloc) (struct videobuf_buffer *buf); | ||
127 | int (*iolock) (struct videobuf_queue* q, | 131 | int (*iolock) (struct videobuf_queue* q, |
128 | struct videobuf_buffer *vb, | 132 | struct videobuf_buffer *vb, |
129 | struct v4l2_framebuffer *fbuf); | 133 | struct v4l2_framebuffer *fbuf); |
@@ -151,7 +155,9 @@ struct videobuf_qtype_ops { | |||
151 | struct videobuf_queue { | 155 | struct videobuf_queue { |
152 | struct mutex vb_lock; | 156 | struct mutex vb_lock; |
153 | spinlock_t *irqlock; | 157 | spinlock_t *irqlock; |
154 | void *dev; /* on pci, points to struct pci_dev */ | 158 | struct device *dev; |
159 | |||
160 | wait_queue_head_t wait; /* wait if queue is empty */ | ||
155 | 161 | ||
156 | enum v4l2_buf_type type; | 162 | enum v4l2_buf_type type; |
157 | unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ | 163 | unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ |
@@ -183,9 +189,13 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, | |||
183 | 189 | ||
184 | void *videobuf_alloc(struct videobuf_queue* q); | 190 | void *videobuf_alloc(struct videobuf_queue* q); |
185 | 191 | ||
192 | /* Used on videobuf-dvb */ | ||
193 | void *videobuf_queue_to_vmalloc (struct videobuf_queue* q, | ||
194 | struct videobuf_buffer *buf); | ||
195 | |||
186 | void videobuf_queue_core_init(struct videobuf_queue *q, | 196 | void videobuf_queue_core_init(struct videobuf_queue *q, |
187 | struct videobuf_queue_ops *ops, | 197 | struct videobuf_queue_ops *ops, |
188 | void *dev, | 198 | struct device *dev, |
189 | spinlock_t *irqlock, | 199 | spinlock_t *irqlock, |
190 | enum v4l2_buf_type type, | 200 | enum v4l2_buf_type type, |
191 | enum v4l2_field field, | 201 | enum v4l2_field field, |
@@ -231,10 +241,4 @@ int videobuf_mmap_free(struct videobuf_queue *q); | |||
231 | int videobuf_mmap_mapper(struct videobuf_queue *q, | 241 | int videobuf_mmap_mapper(struct videobuf_queue *q, |
232 | struct vm_area_struct *vma); | 242 | struct vm_area_struct *vma); |
233 | 243 | ||
234 | /* --------------------------------------------------------------------- */ | 244 | #endif |
235 | |||
236 | /* | ||
237 | * Local variables: | ||
238 | * c-basic-offset: 8 | ||
239 | * End: | ||
240 | */ | ||
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index 38105031db23..be8da269ee33 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * helper functions for PCI DMA video4linux capture buffers | 2 | * helper functions for SG DMA video4linux capture buffers |
3 | * | 3 | * |
4 | * The functions expect the hardware being able to scatter gatter | 4 | * The functions expect the hardware being able to scatter gatter |
5 | * (i.e. the buffers are not linear in physical memory, but fragmented | 5 | * (i.e. the buffers are not linear in physical memory, but fragmented |
@@ -68,9 +68,6 @@ struct videobuf_dmabuf { | |||
68 | /* for kernel buffers */ | 68 | /* for kernel buffers */ |
69 | void *vmalloc; | 69 | void *vmalloc; |
70 | 70 | ||
71 | /* Stores the userspace pointer to vmalloc area */ | ||
72 | void *varea; | ||
73 | |||
74 | /* for overlay buffers (pci-pci dma) */ | 71 | /* for overlay buffers (pci-pci dma) */ |
75 | dma_addr_t bus_addr; | 72 | dma_addr_t bus_addr; |
76 | 73 | ||
@@ -81,7 +78,7 @@ struct videobuf_dmabuf { | |||
81 | int direction; | 78 | int direction; |
82 | }; | 79 | }; |
83 | 80 | ||
84 | struct videbuf_pci_sg_memory | 81 | struct videobuf_dma_sg_memory |
85 | { | 82 | { |
86 | u32 magic; | 83 | u32 magic; |
87 | 84 | ||
@@ -103,11 +100,11 @@ int videobuf_dma_sync(struct videobuf_queue* q,struct videobuf_dmabuf *dma); | |||
103 | int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma); | 100 | int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma); |
104 | struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf); | 101 | struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf); |
105 | 102 | ||
106 | void *videobuf_pci_alloc (size_t size); | 103 | void *videobuf_sg_alloc(size_t size); |
107 | 104 | ||
108 | void videobuf_queue_pci_init(struct videobuf_queue* q, | 105 | void videobuf_queue_sg_init(struct videobuf_queue* q, |
109 | struct videobuf_queue_ops *ops, | 106 | struct videobuf_queue_ops *ops, |
110 | void *dev, | 107 | struct device *dev, |
111 | spinlock_t *irqlock, | 108 | spinlock_t *irqlock, |
112 | enum v4l2_buf_type type, | 109 | enum v4l2_buf_type type, |
113 | enum v4l2_field field, | 110 | enum v4l2_field field, |
@@ -117,6 +114,6 @@ void videobuf_queue_pci_init(struct videobuf_queue* q, | |||
117 | /*FIXME: these variants are used only on *-alsa code, where videobuf is | 114 | /*FIXME: these variants are used only on *-alsa code, where videobuf is |
118 | * used without queue | 115 | * used without queue |
119 | */ | 116 | */ |
120 | int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma); | 117 | int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma); |
121 | int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma); | 118 | int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); |
122 | 119 | ||
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h index 8233cafdeef6..b77748696329 100644 --- a/include/media/videobuf-dvb.h +++ b/include/media/videobuf-dvb.h | |||
@@ -27,7 +27,8 @@ struct videobuf_dvb { | |||
27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, | 27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, |
28 | struct module *module, | 28 | struct module *module, |
29 | void *adapter_priv, | 29 | void *adapter_priv, |
30 | struct device *device); | 30 | struct device *device, |
31 | short *adapter_nr); | ||
31 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); | 32 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); |
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h index ec63ab0fab93..aed39460c154 100644 --- a/include/media/videobuf-vmalloc.h +++ b/include/media/videobuf-vmalloc.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 | 13 | * the Free Software Foundation; either version 2 |
14 | */ | 14 | */ |
15 | #ifndef _VIDEOBUF_VMALLOC_H | ||
16 | #define _VIDEOBUF_VMALLOC_H | ||
15 | 17 | ||
16 | #include <media/videobuf-core.h> | 18 | #include <media/videobuf-core.h> |
17 | 19 | ||
@@ -39,3 +41,5 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q, | |||
39 | void *videobuf_to_vmalloc (struct videobuf_buffer *buf); | 41 | void *videobuf_to_vmalloc (struct videobuf_buffer *buf); |
40 | 42 | ||
41 | void videobuf_vmalloc_free (struct videobuf_buffer *buf); | 43 | void videobuf_vmalloc_free (struct videobuf_buffer *buf); |
44 | |||
45 | #endif | ||
diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild index 4d46b3bdebd8..8eb018f96002 100644 --- a/include/mtd/Kbuild +++ b/include/mtd/Kbuild | |||
@@ -3,5 +3,4 @@ header-y += jffs2-user.h | |||
3 | header-y += mtd-abi.h | 3 | header-y += mtd-abi.h |
4 | header-y += mtd-user.h | 4 | header-y += mtd-user.h |
5 | header-y += nftl-user.h | 5 | header-y += nftl-user.h |
6 | header-y += ubi-header.h | ||
7 | header-y += ubi-user.h | 6 | header-y += ubi-user.h |
diff --git a/include/mtd/ubi-header.h b/include/mtd/ubi-header.h deleted file mode 100644 index 292f916ea564..000000000000 --- a/include/mtd/ubi-header.h +++ /dev/null | |||
@@ -1,372 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) International Business Machines Corp., 2006 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
12 | * the GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | * Authors: Artem Bityutskiy (Битюцкий Артём) | ||
19 | * Thomas Gleixner | ||
20 | * Frank Haverkamp | ||
21 | * Oliver Lohmann | ||
22 | * Andreas Arnez | ||
23 | */ | ||
24 | |||
25 | /* | ||
26 | * This file defines the layout of UBI headers and all the other UBI on-flash | ||
27 | * data structures. May be included by user-space. | ||
28 | */ | ||
29 | |||
30 | #ifndef __UBI_HEADER_H__ | ||
31 | #define __UBI_HEADER_H__ | ||
32 | |||
33 | #include <asm/byteorder.h> | ||
34 | |||
35 | /* The version of UBI images supported by this implementation */ | ||
36 | #define UBI_VERSION 1 | ||
37 | |||
38 | /* The highest erase counter value supported by this implementation */ | ||
39 | #define UBI_MAX_ERASECOUNTER 0x7FFFFFFF | ||
40 | |||
41 | /* The initial CRC32 value used when calculating CRC checksums */ | ||
42 | #define UBI_CRC32_INIT 0xFFFFFFFFU | ||
43 | |||
44 | /* Erase counter header magic number (ASCII "UBI#") */ | ||
45 | #define UBI_EC_HDR_MAGIC 0x55424923 | ||
46 | /* Volume identifier header magic number (ASCII "UBI!") */ | ||
47 | #define UBI_VID_HDR_MAGIC 0x55424921 | ||
48 | |||
49 | /* | ||
50 | * Volume type constants used in the volume identifier header. | ||
51 | * | ||
52 | * @UBI_VID_DYNAMIC: dynamic volume | ||
53 | * @UBI_VID_STATIC: static volume | ||
54 | */ | ||
55 | enum { | ||
56 | UBI_VID_DYNAMIC = 1, | ||
57 | UBI_VID_STATIC = 2 | ||
58 | }; | ||
59 | |||
60 | /* | ||
61 | * Volume flags used in the volume table record. | ||
62 | * | ||
63 | * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume | ||
64 | * | ||
65 | * %UBI_VTBL_AUTORESIZE_FLG flag can be set only for one volume in the volume | ||
66 | * table. UBI automatically re-sizes the volume which has this flag and makes | ||
67 | * the volume to be of largest possible size. This means that if after the | ||
68 | * initialization UBI finds out that there are available physical eraseblocks | ||
69 | * present on the device, it automatically appends all of them to the volume | ||
70 | * (the physical eraseblocks reserved for bad eraseblocks handling and other | ||
71 | * reserved physical eraseblocks are not taken). So, if there is a volume with | ||
72 | * the %UBI_VTBL_AUTORESIZE_FLG flag set, the amount of available logical | ||
73 | * eraseblocks will be zero after UBI is loaded, because all of them will be | ||
74 | * reserved for this volume. Note, the %UBI_VTBL_AUTORESIZE_FLG bit is cleared | ||
75 | * after the volume had been initialized. | ||
76 | * | ||
77 | * The auto-resize feature is useful for device production purposes. For | ||
78 | * example, different NAND flash chips may have different amount of initial bad | ||
79 | * eraseblocks, depending of particular chip instance. Manufacturers of NAND | ||
80 | * chips usually guarantee that the amount of initial bad eraseblocks does not | ||
81 | * exceed certain percent, e.g. 2%. When one creates an UBI image which will be | ||
82 | * flashed to the end devices in production, he does not know the exact amount | ||
83 | * of good physical eraseblocks the NAND chip on the device will have, but this | ||
84 | * number is required to calculate the volume sized and put them to the volume | ||
85 | * table of the UBI image. In this case, one of the volumes (e.g., the one | ||
86 | * which will store the root file system) is marked as "auto-resizable", and | ||
87 | * UBI will adjust its size on the first boot if needed. | ||
88 | * | ||
89 | * Note, first UBI reserves some amount of physical eraseblocks for bad | ||
90 | * eraseblock handling, and then re-sizes the volume, not vice-versa. This | ||
91 | * means that the pool of reserved physical eraseblocks will always be present. | ||
92 | */ | ||
93 | enum { | ||
94 | UBI_VTBL_AUTORESIZE_FLG = 0x01, | ||
95 | }; | ||
96 | |||
97 | /* | ||
98 | * Compatibility constants used by internal volumes. | ||
99 | * | ||
100 | * @UBI_COMPAT_DELETE: delete this internal volume before anything is written | ||
101 | * to the flash | ||
102 | * @UBI_COMPAT_RO: attach this device in read-only mode | ||
103 | * @UBI_COMPAT_PRESERVE: preserve this internal volume - do not touch its | ||
104 | * physical eraseblocks, don't allow the wear-leveling unit to move them | ||
105 | * @UBI_COMPAT_REJECT: reject this UBI image | ||
106 | */ | ||
107 | enum { | ||
108 | UBI_COMPAT_DELETE = 1, | ||
109 | UBI_COMPAT_RO = 2, | ||
110 | UBI_COMPAT_PRESERVE = 4, | ||
111 | UBI_COMPAT_REJECT = 5 | ||
112 | }; | ||
113 | |||
114 | /* Sizes of UBI headers */ | ||
115 | #define UBI_EC_HDR_SIZE sizeof(struct ubi_ec_hdr) | ||
116 | #define UBI_VID_HDR_SIZE sizeof(struct ubi_vid_hdr) | ||
117 | |||
118 | /* Sizes of UBI headers without the ending CRC */ | ||
119 | #define UBI_EC_HDR_SIZE_CRC (UBI_EC_HDR_SIZE - sizeof(__be32)) | ||
120 | #define UBI_VID_HDR_SIZE_CRC (UBI_VID_HDR_SIZE - sizeof(__be32)) | ||
121 | |||
122 | /** | ||
123 | * struct ubi_ec_hdr - UBI erase counter header. | ||
124 | * @magic: erase counter header magic number (%UBI_EC_HDR_MAGIC) | ||
125 | * @version: version of UBI implementation which is supposed to accept this | ||
126 | * UBI image | ||
127 | * @padding1: reserved for future, zeroes | ||
128 | * @ec: the erase counter | ||
129 | * @vid_hdr_offset: where the VID header starts | ||
130 | * @data_offset: where the user data start | ||
131 | * @padding2: reserved for future, zeroes | ||
132 | * @hdr_crc: erase counter header CRC checksum | ||
133 | * | ||
134 | * The erase counter header takes 64 bytes and has a plenty of unused space for | ||
135 | * future usage. The unused fields are zeroed. The @version field is used to | ||
136 | * indicate the version of UBI implementation which is supposed to be able to | ||
137 | * work with this UBI image. If @version is greater then the current UBI | ||
138 | * version, the image is rejected. This may be useful in future if something | ||
139 | * is changed radically. This field is duplicated in the volume identifier | ||
140 | * header. | ||
141 | * | ||
142 | * The @vid_hdr_offset and @data_offset fields contain the offset of the the | ||
143 | * volume identifier header and user data, relative to the beginning of the | ||
144 | * physical eraseblock. These values have to be the same for all physical | ||
145 | * eraseblocks. | ||
146 | */ | ||
147 | struct ubi_ec_hdr { | ||
148 | __be32 magic; | ||
149 | __u8 version; | ||
150 | __u8 padding1[3]; | ||
151 | __be64 ec; /* Warning: the current limit is 31-bit anyway! */ | ||
152 | __be32 vid_hdr_offset; | ||
153 | __be32 data_offset; | ||
154 | __u8 padding2[36]; | ||
155 | __be32 hdr_crc; | ||
156 | } __attribute__ ((packed)); | ||
157 | |||
158 | /** | ||
159 | * struct ubi_vid_hdr - on-flash UBI volume identifier header. | ||
160 | * @magic: volume identifier header magic number (%UBI_VID_HDR_MAGIC) | ||
161 | * @version: UBI implementation version which is supposed to accept this UBI | ||
162 | * image (%UBI_VERSION) | ||
163 | * @vol_type: volume type (%UBI_VID_DYNAMIC or %UBI_VID_STATIC) | ||
164 | * @copy_flag: if this logical eraseblock was copied from another physical | ||
165 | * eraseblock (for wear-leveling reasons) | ||
166 | * @compat: compatibility of this volume (%0, %UBI_COMPAT_DELETE, | ||
167 | * %UBI_COMPAT_IGNORE, %UBI_COMPAT_PRESERVE, or %UBI_COMPAT_REJECT) | ||
168 | * @vol_id: ID of this volume | ||
169 | * @lnum: logical eraseblock number | ||
170 | * @leb_ver: version of this logical eraseblock (IMPORTANT: obsolete, to be | ||
171 | * removed, kept only for not breaking older UBI users) | ||
172 | * @data_size: how many bytes of data this logical eraseblock contains | ||
173 | * @used_ebs: total number of used logical eraseblocks in this volume | ||
174 | * @data_pad: how many bytes at the end of this physical eraseblock are not | ||
175 | * used | ||
176 | * @data_crc: CRC checksum of the data stored in this logical eraseblock | ||
177 | * @padding1: reserved for future, zeroes | ||
178 | * @sqnum: sequence number | ||
179 | * @padding2: reserved for future, zeroes | ||
180 | * @hdr_crc: volume identifier header CRC checksum | ||
181 | * | ||
182 | * The @sqnum is the value of the global sequence counter at the time when this | ||
183 | * VID header was created. The global sequence counter is incremented each time | ||
184 | * UBI writes a new VID header to the flash, i.e. when it maps a logical | ||
185 | * eraseblock to a new physical eraseblock. The global sequence counter is an | ||
186 | * unsigned 64-bit integer and we assume it never overflows. The @sqnum | ||
187 | * (sequence number) is used to distinguish between older and newer versions of | ||
188 | * logical eraseblocks. | ||
189 | * | ||
190 | * There are 2 situations when there may be more then one physical eraseblock | ||
191 | * corresponding to the same logical eraseblock, i.e., having the same @vol_id | ||
192 | * and @lnum values in the volume identifier header. Suppose we have a logical | ||
193 | * eraseblock L and it is mapped to the physical eraseblock P. | ||
194 | * | ||
195 | * 1. Because UBI may erase physical eraseblocks asynchronously, the following | ||
196 | * situation is possible: L is asynchronously erased, so P is scheduled for | ||
197 | * erasure, then L is written to,i.e. mapped to another physical eraseblock P1, | ||
198 | * so P1 is written to, then an unclean reboot happens. Result - there are 2 | ||
199 | * physical eraseblocks P and P1 corresponding to the same logical eraseblock | ||
200 | * L. But P1 has greater sequence number, so UBI picks P1 when it attaches the | ||
201 | * flash. | ||
202 | * | ||
203 | * 2. From time to time UBI moves logical eraseblocks to other physical | ||
204 | * eraseblocks for wear-leveling reasons. If, for example, UBI moves L from P | ||
205 | * to P1, and an unclean reboot happens before P is physically erased, there | ||
206 | * are two physical eraseblocks P and P1 corresponding to L and UBI has to | ||
207 | * select one of them when the flash is attached. The @sqnum field says which | ||
208 | * PEB is the original (obviously P will have lower @sqnum) and the copy. But | ||
209 | * it is not enough to select the physical eraseblock with the higher sequence | ||
210 | * number, because the unclean reboot could have happen in the middle of the | ||
211 | * copying process, so the data in P is corrupted. It is also not enough to | ||
212 | * just select the physical eraseblock with lower sequence number, because the | ||
213 | * data there may be old (consider a case if more data was added to P1 after | ||
214 | * the copying). Moreover, the unclean reboot may happen when the erasure of P | ||
215 | * was just started, so it result in unstable P, which is "mostly" OK, but | ||
216 | * still has unstable bits. | ||
217 | * | ||
218 | * UBI uses the @copy_flag field to indicate that this logical eraseblock is a | ||
219 | * copy. UBI also calculates data CRC when the data is moved and stores it at | ||
220 | * the @data_crc field of the copy (P1). So when UBI needs to pick one physical | ||
221 | * eraseblock of two (P or P1), the @copy_flag of the newer one (P1) is | ||
222 | * examined. If it is cleared, the situation* is simple and the newer one is | ||
223 | * picked. If it is set, the data CRC of the copy (P1) is examined. If the CRC | ||
224 | * checksum is correct, this physical eraseblock is selected (P1). Otherwise | ||
225 | * the older one (P) is selected. | ||
226 | * | ||
227 | * Note, there is an obsolete @leb_ver field which was used instead of @sqnum | ||
228 | * in the past. But it is not used anymore and we keep it in order to be able | ||
229 | * to deal with old UBI images. It will be removed at some point. | ||
230 | * | ||
231 | * There are 2 sorts of volumes in UBI: user volumes and internal volumes. | ||
232 | * Internal volumes are not seen from outside and are used for various internal | ||
233 | * UBI purposes. In this implementation there is only one internal volume - the | ||
234 | * layout volume. Internal volumes are the main mechanism of UBI extensions. | ||
235 | * For example, in future one may introduce a journal internal volume. Internal | ||
236 | * volumes have their own reserved range of IDs. | ||
237 | * | ||
238 | * The @compat field is only used for internal volumes and contains the "degree | ||
239 | * of their compatibility". It is always zero for user volumes. This field | ||
240 | * provides a mechanism to introduce UBI extensions and to be still compatible | ||
241 | * with older UBI binaries. For example, if someone introduced a journal in | ||
242 | * future, he would probably use %UBI_COMPAT_DELETE compatibility for the | ||
243 | * journal volume. And in this case, older UBI binaries, which know nothing | ||
244 | * about the journal volume, would just delete this volume and work perfectly | ||
245 | * fine. This is similar to what Ext2fs does when it is fed by an Ext3fs image | ||
246 | * - it just ignores the Ext3fs journal. | ||
247 | * | ||
248 | * The @data_crc field contains the CRC checksum of the contents of the logical | ||
249 | * eraseblock if this is a static volume. In case of dynamic volumes, it does | ||
250 | * not contain the CRC checksum as a rule. The only exception is when the | ||
251 | * data of the physical eraseblock was moved by the wear-leveling unit, then | ||
252 | * the wear-leveling unit calculates the data CRC and stores it in the | ||
253 | * @data_crc field. And of course, the @copy_flag is %in this case. | ||
254 | * | ||
255 | * The @data_size field is used only for static volumes because UBI has to know | ||
256 | * how many bytes of data are stored in this eraseblock. For dynamic volumes, | ||
257 | * this field usually contains zero. The only exception is when the data of the | ||
258 | * physical eraseblock was moved to another physical eraseblock for | ||
259 | * wear-leveling reasons. In this case, UBI calculates CRC checksum of the | ||
260 | * contents and uses both @data_crc and @data_size fields. In this case, the | ||
261 | * @data_size field contains data size. | ||
262 | * | ||
263 | * The @used_ebs field is used only for static volumes and indicates how many | ||
264 | * eraseblocks the data of the volume takes. For dynamic volumes this field is | ||
265 | * not used and always contains zero. | ||
266 | * | ||
267 | * The @data_pad is calculated when volumes are created using the alignment | ||
268 | * parameter. So, effectively, the @data_pad field reduces the size of logical | ||
269 | * eraseblocks of this volume. This is very handy when one uses block-oriented | ||
270 | * software (say, cramfs) on top of the UBI volume. | ||
271 | */ | ||
272 | struct ubi_vid_hdr { | ||
273 | __be32 magic; | ||
274 | __u8 version; | ||
275 | __u8 vol_type; | ||
276 | __u8 copy_flag; | ||
277 | __u8 compat; | ||
278 | __be32 vol_id; | ||
279 | __be32 lnum; | ||
280 | __be32 leb_ver; /* obsolete, to be removed, don't use */ | ||
281 | __be32 data_size; | ||
282 | __be32 used_ebs; | ||
283 | __be32 data_pad; | ||
284 | __be32 data_crc; | ||
285 | __u8 padding1[4]; | ||
286 | __be64 sqnum; | ||
287 | __u8 padding2[12]; | ||
288 | __be32 hdr_crc; | ||
289 | } __attribute__ ((packed)); | ||
290 | |||
291 | /* Internal UBI volumes count */ | ||
292 | #define UBI_INT_VOL_COUNT 1 | ||
293 | |||
294 | /* | ||
295 | * Starting ID of internal volumes. There is reserved room for 4096 internal | ||
296 | * volumes. | ||
297 | */ | ||
298 | #define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096) | ||
299 | |||
300 | /* The layout volume contains the volume table */ | ||
301 | |||
302 | #define UBI_LAYOUT_VOLUME_ID UBI_INTERNAL_VOL_START | ||
303 | #define UBI_LAYOUT_VOLUME_TYPE UBI_VID_DYNAMIC | ||
304 | #define UBI_LAYOUT_VOLUME_ALIGN 1 | ||
305 | #define UBI_LAYOUT_VOLUME_EBS 2 | ||
306 | #define UBI_LAYOUT_VOLUME_NAME "layout volume" | ||
307 | #define UBI_LAYOUT_VOLUME_COMPAT UBI_COMPAT_REJECT | ||
308 | |||
309 | /* The maximum number of volumes per one UBI device */ | ||
310 | #define UBI_MAX_VOLUMES 128 | ||
311 | |||
312 | /* The maximum volume name length */ | ||
313 | #define UBI_VOL_NAME_MAX 127 | ||
314 | |||
315 | /* Size of the volume table record */ | ||
316 | #define UBI_VTBL_RECORD_SIZE sizeof(struct ubi_vtbl_record) | ||
317 | |||
318 | /* Size of the volume table record without the ending CRC */ | ||
319 | #define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32)) | ||
320 | |||
321 | /** | ||
322 | * struct ubi_vtbl_record - a record in the volume table. | ||
323 | * @reserved_pebs: how many physical eraseblocks are reserved for this volume | ||
324 | * @alignment: volume alignment | ||
325 | * @data_pad: how many bytes are unused at the end of the each physical | ||
326 | * eraseblock to satisfy the requested alignment | ||
327 | * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) | ||
328 | * @upd_marker: if volume update was started but not finished | ||
329 | * @name_len: volume name length | ||
330 | * @name: the volume name | ||
331 | * @flags: volume flags (%UBI_VTBL_AUTORESIZE_FLG) | ||
332 | * @padding: reserved, zeroes | ||
333 | * @crc: a CRC32 checksum of the record | ||
334 | * | ||
335 | * The volume table records are stored in the volume table, which is stored in | ||
336 | * the layout volume. The layout volume consists of 2 logical eraseblock, each | ||
337 | * of which contains a copy of the volume table (i.e., the volume table is | ||
338 | * duplicated). The volume table is an array of &struct ubi_vtbl_record | ||
339 | * objects indexed by the volume ID. | ||
340 | * | ||
341 | * If the size of the logical eraseblock is large enough to fit | ||
342 | * %UBI_MAX_VOLUMES records, the volume table contains %UBI_MAX_VOLUMES | ||
343 | * records. Otherwise, it contains as many records as it can fit (i.e., size of | ||
344 | * logical eraseblock divided by sizeof(struct ubi_vtbl_record)). | ||
345 | * | ||
346 | * The @upd_marker flag is used to implement volume update. It is set to %1 | ||
347 | * before update and set to %0 after the update. So if the update operation was | ||
348 | * interrupted, UBI knows that the volume is corrupted. | ||
349 | * | ||
350 | * The @alignment field is specified when the volume is created and cannot be | ||
351 | * later changed. It may be useful, for example, when a block-oriented file | ||
352 | * system works on top of UBI. The @data_pad field is calculated using the | ||
353 | * logical eraseblock size and @alignment. The alignment must be multiple to the | ||
354 | * minimal flash I/O unit. If @alignment is 1, all the available space of | ||
355 | * the physical eraseblocks is used. | ||
356 | * | ||
357 | * Empty records contain all zeroes and the CRC checksum of those zeroes. | ||
358 | */ | ||
359 | struct ubi_vtbl_record { | ||
360 | __be32 reserved_pebs; | ||
361 | __be32 alignment; | ||
362 | __be32 data_pad; | ||
363 | __u8 vol_type; | ||
364 | __u8 upd_marker; | ||
365 | __be16 name_len; | ||
366 | __u8 name[UBI_VOL_NAME_MAX+1]; | ||
367 | __u8 flags; | ||
368 | __u8 padding[23]; | ||
369 | __be32 crc; | ||
370 | } __attribute__ ((packed)); | ||
371 | |||
372 | #endif /* !__UBI_HEADER_H__ */ | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 49c48983019f..e0a612bc9c4e 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -383,6 +383,15 @@ static inline int ipv6_addr_orchid(const struct in6_addr *a) | |||
383 | == htonl(0x20010010)); | 383 | == htonl(0x20010010)); |
384 | } | 384 | } |
385 | 385 | ||
386 | static inline void ipv6_addr_set_v4mapped(const __be32 addr, | ||
387 | struct in6_addr *v4mapped) | ||
388 | { | ||
389 | ipv6_addr_set(v4mapped, | ||
390 | 0, 0, | ||
391 | htonl(0x0000FFFF), | ||
392 | addr); | ||
393 | } | ||
394 | |||
386 | /* | 395 | /* |
387 | * find the first different bit between two addresses | 396 | * find the first different bit between two addresses |
388 | * length of address must be a multiple of 32bits | 397 | * length of address must be a multiple of 32bits |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index b56b6a10fe5e..baa9f372cfd1 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -436,6 +436,9 @@ struct xfrm_tmpl | |||
436 | /* May skip this transfomration if no SA is found */ | 436 | /* May skip this transfomration if no SA is found */ |
437 | __u8 optional; | 437 | __u8 optional; |
438 | 438 | ||
439 | /* Skip aalgos/ealgos/calgos checks. */ | ||
440 | __u8 allalgs; | ||
441 | |||
439 | /* Bit mask of algos allowed for acquisition */ | 442 | /* Bit mask of algos allowed for acquisition */ |
440 | __u32 aalgos; | 443 | __u32 aalgos; |
441 | __u32 ealgos; | 444 | __u32 ealgos; |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 01480581f825..049edc5e6461 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -397,6 +397,7 @@ | |||
397 | #define AC97_HAS_NO_TONE (1<<16) /* no Tone volume */ | 397 | #define AC97_HAS_NO_TONE (1<<16) /* no Tone volume */ |
398 | #define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */ | 398 | #define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */ |
399 | #define AC97_HAS_NO_AUX (1<<18) /* no standard AC97 AUX volume and mute */ | 399 | #define AC97_HAS_NO_AUX (1<<18) /* no standard AC97 AUX volume and mute */ |
400 | #define AC97_HAS_8CH (1<<19) /* supports 8-channel output */ | ||
400 | 401 | ||
401 | /* rates indexes */ | 402 | /* rates indexes */ |
402 | #define AC97_RATES_FRONT_DAC 0 | 403 | #define AC97_RATES_FRONT_DAC 0 |
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 4e80d3fe7381..d293d36a66b8 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
@@ -182,6 +182,7 @@ struct ak4114 { | |||
182 | unsigned char rcs0; | 182 | unsigned char rcs0; |
183 | unsigned char rcs1; | 183 | unsigned char rcs1; |
184 | struct delayed_work work; | 184 | struct delayed_work work; |
185 | unsigned int check_flags; | ||
185 | void *change_callback_private; | 186 | void *change_callback_private; |
186 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); | 187 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); |
187 | }; | 188 | }; |
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index 6153b91cdc3e..891cf1aea8b1 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h | |||
@@ -68,7 +68,7 @@ struct snd_akm4xxx { | |||
68 | enum { | 68 | enum { |
69 | SND_AK4524, SND_AK4528, SND_AK4529, | 69 | SND_AK4524, SND_AK4528, SND_AK4529, |
70 | SND_AK4355, SND_AK4358, SND_AK4381, | 70 | SND_AK4355, SND_AK4358, SND_AK4381, |
71 | SND_AK5365, NON_AKM | 71 | SND_AK5365 |
72 | } type; | 72 | } type; |
73 | 73 | ||
74 | /* (array) information of combined codecs */ | 74 | /* (array) information of combined codecs */ |
diff --git a/include/sound/asoundef.h b/include/sound/asoundef.h index 024ce62f7d16..a6e0facf8a37 100644 --- a/include/sound/asoundef.h +++ b/include/sound/asoundef.h | |||
@@ -112,6 +112,14 @@ | |||
112 | #define IEC958_AES3_CON_CLOCK_1000PPM (0<<4) /* 1000 ppm */ | 112 | #define IEC958_AES3_CON_CLOCK_1000PPM (0<<4) /* 1000 ppm */ |
113 | #define IEC958_AES3_CON_CLOCK_50PPM (1<<4) /* 50 ppm */ | 113 | #define IEC958_AES3_CON_CLOCK_50PPM (1<<4) /* 50 ppm */ |
114 | #define IEC958_AES3_CON_CLOCK_VARIABLE (2<<4) /* variable pitch */ | 114 | #define IEC958_AES3_CON_CLOCK_VARIABLE (2<<4) /* variable pitch */ |
115 | #define IEC958_AES4_CON_MAX_WORDLEN_24 (1<<0) /* 0 = 20-bit, 1 = 24-bit */ | ||
116 | #define IEC958_AES4_CON_WORDLEN (7<<1) /* mask - sample word length */ | ||
117 | #define IEC958_AES4_CON_WORDLEN_NOTID (0<<1) /* not indicated */ | ||
118 | #define IEC958_AES4_CON_WORDLEN_20_16 (1<<1) /* 20-bit or 16-bit */ | ||
119 | #define IEC958_AES4_CON_WORDLEN_22_18 (2<<1) /* 22-bit or 18-bit */ | ||
120 | #define IEC958_AES4_CON_WORDLEN_23_19 (4<<1) /* 23-bit or 19-bit */ | ||
121 | #define IEC958_AES4_CON_WORDLEN_24_20 (5<<1) /* 24-bit or 20-bit */ | ||
122 | #define IEC958_AES4_CON_WORDLEN_21_17 (6<<1) /* 21-bit or 17-bit */ | ||
115 | 123 | ||
116 | /***************************************************************************** | 124 | /***************************************************************************** |
117 | * * | 125 | * * |
diff --git a/include/sound/control.h b/include/sound/control.h index e79baa63912f..3dc1291f52db 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -169,4 +169,11 @@ int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, | |||
169 | int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, | 169 | int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, |
170 | struct snd_ctl_elem_info *uinfo); | 170 | struct snd_ctl_elem_info *uinfo); |
171 | 171 | ||
172 | /* | ||
173 | * virtual master control | ||
174 | */ | ||
175 | struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, | ||
176 | const unsigned int *tlv); | ||
177 | int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); | ||
178 | |||
172 | #endif /* __SOUND_CONTROL_H */ | 179 | #endif /* __SOUND_CONTROL_H */ |
diff --git a/include/sound/core.h b/include/sound/core.h index 4fc0235ad784..695ee53488a3 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -277,8 +277,8 @@ int snd_minor_info_done(void); | |||
277 | int snd_minor_info_oss_init(void); | 277 | int snd_minor_info_oss_init(void); |
278 | int snd_minor_info_oss_done(void); | 278 | int snd_minor_info_oss_done(void); |
279 | #else | 279 | #else |
280 | #define snd_minor_info_oss_init() /*NOP*/ | 280 | static inline int snd_minor_info_oss_init(void) { return 0; } |
281 | #define snd_minor_info_oss_done() /*NOP*/ | 281 | static inline int snd_minor_info_oss_done(void) { return 0; } |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | /* memory.c */ | 284 | /* memory.c */ |
@@ -310,7 +310,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file); | |||
310 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 310 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
311 | 311 | ||
312 | #ifndef snd_card_set_dev | 312 | #ifndef snd_card_set_dev |
313 | #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) | 313 | #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) |
314 | #endif | 314 | #endif |
315 | 315 | ||
316 | /* device.c */ | 316 | /* device.c */ |
@@ -373,7 +373,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
373 | * snd_printd - debug printk | 373 | * snd_printd - debug printk |
374 | * @fmt: format string | 374 | * @fmt: format string |
375 | * | 375 | * |
376 | * Compiled only when Works like snd_printk() for debugging purpose. | 376 | * Works like snd_printk() for debugging purposes. |
377 | * Ignored when CONFIG_SND_DEBUG is not set. | 377 | * Ignored when CONFIG_SND_DEBUG is not set. |
378 | */ | 378 | */ |
379 | #define snd_printd(fmt, args...) \ | 379 | #define snd_printd(fmt, args...) \ |
@@ -417,7 +417,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
417 | * snd_printdd - debug printk | 417 | * snd_printdd - debug printk |
418 | * @format: format string | 418 | * @format: format string |
419 | * | 419 | * |
420 | * Compiled only when Works like snd_printk() for debugging purpose. | 420 | * Works like snd_printk() for debugging purposes. |
421 | * Ignored when CONFIG_SND_DEBUG_DETECT is not set. | 421 | * Ignored when CONFIG_SND_DEBUG_DETECT is not set. |
422 | */ | 422 | */ |
423 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 423 | #define snd_printdd(format, args...) snd_printk(format, ##args) |
diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h index d45218b44dfe..68b634b75068 100644 --- a/include/sound/mpu401.h +++ b/include/sound/mpu401.h | |||
@@ -103,6 +103,21 @@ struct snd_mpu401 { | |||
103 | #define MPU401D(mpu) (mpu)->port | 103 | #define MPU401D(mpu) (mpu)->port |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * control register bits | ||
107 | */ | ||
108 | /* read MPU401C() */ | ||
109 | #define MPU401_RX_EMPTY 0x80 | ||
110 | #define MPU401_TX_FULL 0x40 | ||
111 | |||
112 | /* write MPU401C() */ | ||
113 | #define MPU401_RESET 0xff | ||
114 | #define MPU401_ENTER_UART 0x3f | ||
115 | |||
116 | /* read MPU401D() */ | ||
117 | #define MPU401_ACK 0xfe | ||
118 | |||
119 | |||
120 | /* | ||
106 | 121 | ||
107 | */ | 122 | */ |
108 | 123 | ||
diff --git a/include/sound/version.h b/include/sound/version.h index fac66c49445a..ed6fb2eb1eac 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.16rc2" | 2 | #define CONFIG_SND_VERSION "1.0.16" |
3 | #define CONFIG_SND_DATE " (Thu Jan 31 16:40:16 2008 UTC)" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/xen/balloon.h b/include/xen/balloon.h new file mode 100644 index 000000000000..fe43b0f3c86a --- /dev/null +++ b/include/xen/balloon.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /****************************************************************************** | ||
2 | * balloon.h | ||
3 | * | ||
4 | * Xen balloon driver - enables returning/claiming memory to/from Xen. | ||
5 | * | ||
6 | * Copyright (c) 2003, B Dragovic | ||
7 | * Copyright (c) 2003-2004, M Williamson, K Fraser | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License version 2 | ||
11 | * as published by the Free Software Foundation; or, when distributed | ||
12 | * separately from the Linux kernel or incorporated into other | ||
13 | * software packages, subject to the following license: | ||
14 | * | ||
15 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
16 | * of this source file (the "Software"), to deal in the Software without | ||
17 | * restriction, including without limitation the rights to use, copy, modify, | ||
18 | * merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
19 | * and to permit persons to whom the Software is furnished to do so, subject to | ||
20 | * the following conditions: | ||
21 | * | ||
22 | * The above copyright notice and this permission notice shall be included in | ||
23 | * all copies or substantial portions of the Software. | ||
24 | * | ||
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
26 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
28 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
29 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
30 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
31 | * IN THE SOFTWARE. | ||
32 | */ | ||
33 | |||
34 | #ifndef __XEN_BALLOON_H__ | ||
35 | #define __XEN_BALLOON_H__ | ||
36 | |||
37 | #include <linux/spinlock.h> | ||
38 | |||
39 | #if 0 | ||
40 | /* | ||
41 | * Inform the balloon driver that it should allow some slop for device-driver | ||
42 | * memory activities. | ||
43 | */ | ||
44 | void balloon_update_driver_allowance(long delta); | ||
45 | |||
46 | /* Allocate/free a set of empty pages in low memory (i.e., no RAM mapped). */ | ||
47 | struct page **alloc_empty_pages_and_pagevec(int nr_pages); | ||
48 | void free_empty_pages_and_pagevec(struct page **pagevec, int nr_pages); | ||
49 | |||
50 | void balloon_release_driver_page(struct page *page); | ||
51 | |||
52 | /* | ||
53 | * Prevent the balloon driver from changing the memory reservation during | ||
54 | * a driver critical region. | ||
55 | */ | ||
56 | extern spinlock_t balloon_lock; | ||
57 | #define balloon_lock(__flags) spin_lock_irqsave(&balloon_lock, __flags) | ||
58 | #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags) | ||
59 | #endif | ||
60 | |||
61 | #endif /* __XEN_BALLOON_H__ */ | ||
diff --git a/include/xen/events.h b/include/xen/events.h index 2bde54d29be5..acd8e062c85f 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -5,13 +5,7 @@ | |||
5 | 5 | ||
6 | #include <xen/interface/event_channel.h> | 6 | #include <xen/interface/event_channel.h> |
7 | #include <asm/xen/hypercall.h> | 7 | #include <asm/xen/hypercall.h> |
8 | 8 | #include <asm/xen/events.h> | |
9 | enum ipi_vector { | ||
10 | XEN_RESCHEDULE_VECTOR, | ||
11 | XEN_CALL_FUNCTION_VECTOR, | ||
12 | |||
13 | XEN_NR_IPIS, | ||
14 | }; | ||
15 | 9 | ||
16 | int bind_evtchn_to_irq(unsigned int evtchn); | 10 | int bind_evtchn_to_irq(unsigned int evtchn); |
17 | int bind_evtchn_to_irqhandler(unsigned int evtchn, | 11 | int bind_evtchn_to_irqhandler(unsigned int evtchn, |
@@ -37,6 +31,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi, | |||
37 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); | 31 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); |
38 | 32 | ||
39 | void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); | 33 | void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); |
34 | int resend_irq_on_evtchn(unsigned int irq); | ||
40 | 35 | ||
41 | static inline void notify_remote_via_evtchn(int port) | 36 | static inline void notify_remote_via_evtchn(int port) |
42 | { | 37 | { |
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 761c83498e03..466204846121 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include <asm/xen/hypervisor.h> | 40 | #include <asm/xen/hypervisor.h> |
41 | #include <xen/interface/grant_table.h> | 41 | #include <xen/interface/grant_table.h> |
42 | #include <asm/xen/grant_table.h> | ||
42 | 43 | ||
43 | /* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */ | 44 | /* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */ |
44 | #define NR_GRANT_FRAMES 4 | 45 | #define NR_GRANT_FRAMES 4 |
@@ -102,6 +103,12 @@ void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid, | |||
102 | void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, | 103 | void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, |
103 | unsigned long pfn); | 104 | unsigned long pfn); |
104 | 105 | ||
106 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | ||
107 | unsigned long max_nr_gframes, | ||
108 | struct grant_entry **__shared); | ||
109 | void arch_gnttab_unmap_shared(struct grant_entry *shared, | ||
110 | unsigned long nr_gframes); | ||
111 | |||
105 | #define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) | 112 | #define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) |
106 | 113 | ||
107 | #endif /* __ASM_GNTTAB_H__ */ | 114 | #endif /* __ASM_GNTTAB_H__ */ |
diff --git a/include/xen/interface/callback.h b/include/xen/interface/callback.h new file mode 100644 index 000000000000..4aadcba31af9 --- /dev/null +++ b/include/xen/interface/callback.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /****************************************************************************** | ||
2 | * callback.h | ||
3 | * | ||
4 | * Register guest OS callbacks with Xen. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
7 | * of this software and associated documentation files (the "Software"), to | ||
8 | * deal in the Software without restriction, including without limitation the | ||
9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
10 | * sell copies of the Software, and to permit persons to whom the Software is | ||
11 | * furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
22 | * DEALINGS IN THE SOFTWARE. | ||
23 | * | ||
24 | * Copyright (c) 2006, Ian Campbell | ||
25 | */ | ||
26 | |||
27 | #ifndef __XEN_PUBLIC_CALLBACK_H__ | ||
28 | #define __XEN_PUBLIC_CALLBACK_H__ | ||
29 | |||
30 | #include "xen.h" | ||
31 | |||
32 | /* | ||
33 | * Prototype for this hypercall is: | ||
34 | * long callback_op(int cmd, void *extra_args) | ||
35 | * @cmd == CALLBACKOP_??? (callback operation). | ||
36 | * @extra_args == Operation-specific extra arguments (NULL if none). | ||
37 | */ | ||
38 | |||
39 | /* ia64, x86: Callback for event delivery. */ | ||
40 | #define CALLBACKTYPE_event 0 | ||
41 | |||
42 | /* x86: Failsafe callback when guest state cannot be restored by Xen. */ | ||
43 | #define CALLBACKTYPE_failsafe 1 | ||
44 | |||
45 | /* x86/64 hypervisor: Syscall by 64-bit guest app ('64-on-64-on-64'). */ | ||
46 | #define CALLBACKTYPE_syscall 2 | ||
47 | |||
48 | /* | ||
49 | * x86/32 hypervisor: Only available on x86/32 when supervisor_mode_kernel | ||
50 | * feature is enabled. Do not use this callback type in new code. | ||
51 | */ | ||
52 | #define CALLBACKTYPE_sysenter_deprecated 3 | ||
53 | |||
54 | /* x86: Callback for NMI delivery. */ | ||
55 | #define CALLBACKTYPE_nmi 4 | ||
56 | |||
57 | /* | ||
58 | * x86: sysenter is only available as follows: | ||
59 | * - 32-bit hypervisor: with the supervisor_mode_kernel feature enabled | ||
60 | * - 64-bit hypervisor: 32-bit guest applications on Intel CPUs | ||
61 | * ('32-on-32-on-64', '32-on-64-on-64') | ||
62 | * [nb. also 64-bit guest applications on Intel CPUs | ||
63 | * ('64-on-64-on-64'), but syscall is preferred] | ||
64 | */ | ||
65 | #define CALLBACKTYPE_sysenter 5 | ||
66 | |||
67 | /* | ||
68 | * x86/64 hypervisor: Syscall by 32-bit guest app on AMD CPUs | ||
69 | * ('32-on-32-on-64', '32-on-64-on-64') | ||
70 | */ | ||
71 | #define CALLBACKTYPE_syscall32 7 | ||
72 | |||
73 | /* | ||
74 | * Disable event deliver during callback? This flag is ignored for event and | ||
75 | * NMI callbacks: event delivery is unconditionally disabled. | ||
76 | */ | ||
77 | #define _CALLBACKF_mask_events 0 | ||
78 | #define CALLBACKF_mask_events (1U << _CALLBACKF_mask_events) | ||
79 | |||
80 | /* | ||
81 | * Register a callback. | ||
82 | */ | ||
83 | #define CALLBACKOP_register 0 | ||
84 | struct callback_register { | ||
85 | uint16_t type; | ||
86 | uint16_t flags; | ||
87 | struct xen_callback address; | ||
88 | }; | ||
89 | |||
90 | /* | ||
91 | * Unregister a callback. | ||
92 | * | ||
93 | * Not all callbacks can be unregistered. -EINVAL will be returned if | ||
94 | * you attempt to unregister such a callback. | ||
95 | */ | ||
96 | #define CALLBACKOP_unregister 1 | ||
97 | struct callback_unregister { | ||
98 | uint16_t type; | ||
99 | uint16_t _unused; | ||
100 | }; | ||
101 | |||
102 | #endif /* __XEN_PUBLIC_CALLBACK_H__ */ | ||
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h index 219049802cf2..39da93c21de0 100644 --- a/include/xen/interface/grant_table.h +++ b/include/xen/interface/grant_table.h | |||
@@ -185,6 +185,7 @@ struct gnttab_map_grant_ref { | |||
185 | grant_handle_t handle; | 185 | grant_handle_t handle; |
186 | uint64_t dev_bus_addr; | 186 | uint64_t dev_bus_addr; |
187 | }; | 187 | }; |
188 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_map_grant_ref); | ||
188 | 189 | ||
189 | /* | 190 | /* |
190 | * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings | 191 | * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings |
@@ -206,6 +207,7 @@ struct gnttab_unmap_grant_ref { | |||
206 | /* OUT parameters. */ | 207 | /* OUT parameters. */ |
207 | int16_t status; /* GNTST_* */ | 208 | int16_t status; /* GNTST_* */ |
208 | }; | 209 | }; |
210 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_unmap_grant_ref); | ||
209 | 211 | ||
210 | /* | 212 | /* |
211 | * GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least | 213 | * GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least |
@@ -223,8 +225,9 @@ struct gnttab_setup_table { | |||
223 | uint32_t nr_frames; | 225 | uint32_t nr_frames; |
224 | /* OUT parameters. */ | 226 | /* OUT parameters. */ |
225 | int16_t status; /* GNTST_* */ | 227 | int16_t status; /* GNTST_* */ |
226 | ulong *frame_list; | 228 | GUEST_HANDLE(ulong) frame_list; |
227 | }; | 229 | }; |
230 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_setup_table); | ||
228 | 231 | ||
229 | /* | 232 | /* |
230 | * GNTTABOP_dump_table: Dump the contents of the grant table to the | 233 | * GNTTABOP_dump_table: Dump the contents of the grant table to the |
@@ -237,6 +240,7 @@ struct gnttab_dump_table { | |||
237 | /* OUT parameters. */ | 240 | /* OUT parameters. */ |
238 | int16_t status; /* GNTST_* */ | 241 | int16_t status; /* GNTST_* */ |
239 | }; | 242 | }; |
243 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_dump_table); | ||
240 | 244 | ||
241 | /* | 245 | /* |
242 | * GNTTABOP_transfer_grant_ref: Transfer <frame> to a foreign domain. The | 246 | * GNTTABOP_transfer_grant_ref: Transfer <frame> to a foreign domain. The |
@@ -255,7 +259,7 @@ struct gnttab_transfer { | |||
255 | /* OUT parameters. */ | 259 | /* OUT parameters. */ |
256 | int16_t status; | 260 | int16_t status; |
257 | }; | 261 | }; |
258 | 262 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_transfer); | |
259 | 263 | ||
260 | /* | 264 | /* |
261 | * GNTTABOP_copy: Hypervisor based copy | 265 | * GNTTABOP_copy: Hypervisor based copy |
@@ -296,6 +300,7 @@ struct gnttab_copy { | |||
296 | /* OUT parameters. */ | 300 | /* OUT parameters. */ |
297 | int16_t status; | 301 | int16_t status; |
298 | }; | 302 | }; |
303 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_copy); | ||
299 | 304 | ||
300 | /* | 305 | /* |
301 | * GNTTABOP_query_size: Query the current and maximum sizes of the shared | 306 | * GNTTABOP_query_size: Query the current and maximum sizes of the shared |
@@ -313,7 +318,7 @@ struct gnttab_query_size { | |||
313 | uint32_t max_nr_frames; | 318 | uint32_t max_nr_frames; |
314 | int16_t status; /* GNTST_* */ | 319 | int16_t status; /* GNTST_* */ |
315 | }; | 320 | }; |
316 | 321 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_size); | |
317 | 322 | ||
318 | /* | 323 | /* |
319 | * Bitfield values for update_pin_status.flags. | 324 | * Bitfield values for update_pin_status.flags. |
diff --git a/include/xen/interface/io/fbif.h b/include/xen/interface/io/fbif.h new file mode 100644 index 000000000000..5a934dd7796d --- /dev/null +++ b/include/xen/interface/io/fbif.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * fbif.h -- Xen virtual frame buffer device | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
5 | * of this software and associated documentation files (the "Software"), to | ||
6 | * deal in the Software without restriction, including without limitation the | ||
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
8 | * sell copies of the Software, and to permit persons to whom the Software is | ||
9 | * furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com> | ||
23 | * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com> | ||
24 | */ | ||
25 | |||
26 | #ifndef __XEN_PUBLIC_IO_FBIF_H__ | ||
27 | #define __XEN_PUBLIC_IO_FBIF_H__ | ||
28 | |||
29 | /* Out events (frontend -> backend) */ | ||
30 | |||
31 | /* | ||
32 | * Out events may be sent only when requested by backend, and receipt | ||
33 | * of an unknown out event is an error. | ||
34 | */ | ||
35 | |||
36 | /* Event type 1 currently not used */ | ||
37 | /* | ||
38 | * Framebuffer update notification event | ||
39 | * Capable frontend sets feature-update in xenstore. | ||
40 | * Backend requests it by setting request-update in xenstore. | ||
41 | */ | ||
42 | #define XENFB_TYPE_UPDATE 2 | ||
43 | |||
44 | struct xenfb_update { | ||
45 | uint8_t type; /* XENFB_TYPE_UPDATE */ | ||
46 | int32_t x; /* source x */ | ||
47 | int32_t y; /* source y */ | ||
48 | int32_t width; /* rect width */ | ||
49 | int32_t height; /* rect height */ | ||
50 | }; | ||
51 | |||
52 | #define XENFB_OUT_EVENT_SIZE 40 | ||
53 | |||
54 | union xenfb_out_event { | ||
55 | uint8_t type; | ||
56 | struct xenfb_update update; | ||
57 | char pad[XENFB_OUT_EVENT_SIZE]; | ||
58 | }; | ||
59 | |||
60 | /* In events (backend -> frontend) */ | ||
61 | |||
62 | /* | ||
63 | * Frontends should ignore unknown in events. | ||
64 | * No in events currently defined. | ||
65 | */ | ||
66 | |||
67 | #define XENFB_IN_EVENT_SIZE 40 | ||
68 | |||
69 | union xenfb_in_event { | ||
70 | uint8_t type; | ||
71 | char pad[XENFB_IN_EVENT_SIZE]; | ||
72 | }; | ||
73 | |||
74 | /* shared page */ | ||
75 | |||
76 | #define XENFB_IN_RING_SIZE 1024 | ||
77 | #define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE) | ||
78 | #define XENFB_IN_RING_OFFS 1024 | ||
79 | #define XENFB_IN_RING(page) \ | ||
80 | ((union xenfb_in_event *)((char *)(page) + XENFB_IN_RING_OFFS)) | ||
81 | #define XENFB_IN_RING_REF(page, idx) \ | ||
82 | (XENFB_IN_RING((page))[(idx) % XENFB_IN_RING_LEN]) | ||
83 | |||
84 | #define XENFB_OUT_RING_SIZE 2048 | ||
85 | #define XENFB_OUT_RING_LEN (XENFB_OUT_RING_SIZE / XENFB_OUT_EVENT_SIZE) | ||
86 | #define XENFB_OUT_RING_OFFS (XENFB_IN_RING_OFFS + XENFB_IN_RING_SIZE) | ||
87 | #define XENFB_OUT_RING(page) \ | ||
88 | ((union xenfb_out_event *)((char *)(page) + XENFB_OUT_RING_OFFS)) | ||
89 | #define XENFB_OUT_RING_REF(page, idx) \ | ||
90 | (XENFB_OUT_RING((page))[(idx) % XENFB_OUT_RING_LEN]) | ||
91 | |||
92 | struct xenfb_page { | ||
93 | uint32_t in_cons, in_prod; | ||
94 | uint32_t out_cons, out_prod; | ||
95 | |||
96 | int32_t width; /* width of the framebuffer (in pixels) */ | ||
97 | int32_t height; /* height of the framebuffer (in pixels) */ | ||
98 | uint32_t line_length; /* length of a row of pixels (in bytes) */ | ||
99 | uint32_t mem_length; /* length of the framebuffer (in bytes) */ | ||
100 | uint8_t depth; /* depth of a pixel (in bits) */ | ||
101 | |||
102 | /* | ||
103 | * Framebuffer page directory | ||
104 | * | ||
105 | * Each directory page holds PAGE_SIZE / sizeof(*pd) | ||
106 | * framebuffer pages, and can thus map up to PAGE_SIZE * | ||
107 | * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and | ||
108 | * sizeof(unsigned long) == 4, that's 4 Megs. Two directory | ||
109 | * pages should be enough for a while. | ||
110 | */ | ||
111 | unsigned long pd[2]; | ||
112 | }; | ||
113 | |||
114 | /* | ||
115 | * Wart: xenkbd needs to know resolution. Put it here until a better | ||
116 | * solution is found, but don't leak it to the backend. | ||
117 | */ | ||
118 | #ifdef __KERNEL__ | ||
119 | #define XENFB_WIDTH 800 | ||
120 | #define XENFB_HEIGHT 600 | ||
121 | #define XENFB_DEPTH 32 | ||
122 | #endif | ||
123 | |||
124 | #endif | ||
diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h new file mode 100644 index 000000000000..fb97f4284ffd --- /dev/null +++ b/include/xen/interface/io/kbdif.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * kbdif.h -- Xen virtual keyboard/mouse | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
5 | * of this software and associated documentation files (the "Software"), to | ||
6 | * deal in the Software without restriction, including without limitation the | ||
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
8 | * sell copies of the Software, and to permit persons to whom the Software is | ||
9 | * furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com> | ||
23 | * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com> | ||
24 | */ | ||
25 | |||
26 | #ifndef __XEN_PUBLIC_IO_KBDIF_H__ | ||
27 | #define __XEN_PUBLIC_IO_KBDIF_H__ | ||
28 | |||
29 | /* In events (backend -> frontend) */ | ||
30 | |||
31 | /* | ||
32 | * Frontends should ignore unknown in events. | ||
33 | */ | ||
34 | |||
35 | /* Pointer movement event */ | ||
36 | #define XENKBD_TYPE_MOTION 1 | ||
37 | /* Event type 2 currently not used */ | ||
38 | /* Key event (includes pointer buttons) */ | ||
39 | #define XENKBD_TYPE_KEY 3 | ||
40 | /* | ||
41 | * Pointer position event | ||
42 | * Capable backend sets feature-abs-pointer in xenstore. | ||
43 | * Frontend requests ot instead of XENKBD_TYPE_MOTION by setting | ||
44 | * request-abs-update in xenstore. | ||
45 | */ | ||
46 | #define XENKBD_TYPE_POS 4 | ||
47 | |||
48 | struct xenkbd_motion { | ||
49 | uint8_t type; /* XENKBD_TYPE_MOTION */ | ||
50 | int32_t rel_x; /* relative X motion */ | ||
51 | int32_t rel_y; /* relative Y motion */ | ||
52 | }; | ||
53 | |||
54 | struct xenkbd_key { | ||
55 | uint8_t type; /* XENKBD_TYPE_KEY */ | ||
56 | uint8_t pressed; /* 1 if pressed; 0 otherwise */ | ||
57 | uint32_t keycode; /* KEY_* from linux/input.h */ | ||
58 | }; | ||
59 | |||
60 | struct xenkbd_position { | ||
61 | uint8_t type; /* XENKBD_TYPE_POS */ | ||
62 | int32_t abs_x; /* absolute X position (in FB pixels) */ | ||
63 | int32_t abs_y; /* absolute Y position (in FB pixels) */ | ||
64 | }; | ||
65 | |||
66 | #define XENKBD_IN_EVENT_SIZE 40 | ||
67 | |||
68 | union xenkbd_in_event { | ||
69 | uint8_t type; | ||
70 | struct xenkbd_motion motion; | ||
71 | struct xenkbd_key key; | ||
72 | struct xenkbd_position pos; | ||
73 | char pad[XENKBD_IN_EVENT_SIZE]; | ||
74 | }; | ||
75 | |||
76 | /* Out events (frontend -> backend) */ | ||
77 | |||
78 | /* | ||
79 | * Out events may be sent only when requested by backend, and receipt | ||
80 | * of an unknown out event is an error. | ||
81 | * No out events currently defined. | ||
82 | */ | ||
83 | |||
84 | #define XENKBD_OUT_EVENT_SIZE 40 | ||
85 | |||
86 | union xenkbd_out_event { | ||
87 | uint8_t type; | ||
88 | char pad[XENKBD_OUT_EVENT_SIZE]; | ||
89 | }; | ||
90 | |||
91 | /* shared page */ | ||
92 | |||
93 | #define XENKBD_IN_RING_SIZE 2048 | ||
94 | #define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE) | ||
95 | #define XENKBD_IN_RING_OFFS 1024 | ||
96 | #define XENKBD_IN_RING(page) \ | ||
97 | ((union xenkbd_in_event *)((char *)(page) + XENKBD_IN_RING_OFFS)) | ||
98 | #define XENKBD_IN_RING_REF(page, idx) \ | ||
99 | (XENKBD_IN_RING((page))[(idx) % XENKBD_IN_RING_LEN]) | ||
100 | |||
101 | #define XENKBD_OUT_RING_SIZE 1024 | ||
102 | #define XENKBD_OUT_RING_LEN (XENKBD_OUT_RING_SIZE / XENKBD_OUT_EVENT_SIZE) | ||
103 | #define XENKBD_OUT_RING_OFFS (XENKBD_IN_RING_OFFS + XENKBD_IN_RING_SIZE) | ||
104 | #define XENKBD_OUT_RING(page) \ | ||
105 | ((union xenkbd_out_event *)((char *)(page) + XENKBD_OUT_RING_OFFS)) | ||
106 | #define XENKBD_OUT_RING_REF(page, idx) \ | ||
107 | (XENKBD_OUT_RING((page))[(idx) % XENKBD_OUT_RING_LEN]) | ||
108 | |||
109 | struct xenkbd_page { | ||
110 | uint32_t in_cons, in_prod; | ||
111 | uint32_t out_cons, out_prod; | ||
112 | }; | ||
113 | |||
114 | #endif | ||
diff --git a/include/xen/interface/io/protocols.h b/include/xen/interface/io/protocols.h new file mode 100644 index 000000000000..01fc8ae5f0b0 --- /dev/null +++ b/include/xen/interface/io/protocols.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __XEN_PROTOCOLS_H__ | ||
2 | #define __XEN_PROTOCOLS_H__ | ||
3 | |||
4 | #define XEN_IO_PROTO_ABI_X86_32 "x86_32-abi" | ||
5 | #define XEN_IO_PROTO_ABI_X86_64 "x86_64-abi" | ||
6 | #define XEN_IO_PROTO_ABI_IA64 "ia64-abi" | ||
7 | #define XEN_IO_PROTO_ABI_POWERPC64 "powerpc64-abi" | ||
8 | |||
9 | #if defined(__i386__) | ||
10 | # define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_32 | ||
11 | #elif defined(__x86_64__) | ||
12 | # define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_64 | ||
13 | #elif defined(__ia64__) | ||
14 | # define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_IA64 | ||
15 | #elif defined(__powerpc64__) | ||
16 | # define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_POWERPC64 | ||
17 | #else | ||
18 | # error arch fixup needed here | ||
19 | #endif | ||
20 | |||
21 | #endif | ||
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index af36ead16817..da768469aa92 100644 --- a/include/xen/interface/memory.h +++ b/include/xen/interface/memory.h | |||
@@ -29,7 +29,7 @@ struct xen_memory_reservation { | |||
29 | * OUT: GMFN bases of extents that were allocated | 29 | * OUT: GMFN bases of extents that were allocated |
30 | * (NB. This command also updates the mach_to_phys translation table) | 30 | * (NB. This command also updates the mach_to_phys translation table) |
31 | */ | 31 | */ |
32 | GUEST_HANDLE(ulong) extent_start; | 32 | ulong extent_start; |
33 | 33 | ||
34 | /* Number of extents, and size/alignment of each (2^extent_order pages). */ | 34 | /* Number of extents, and size/alignment of each (2^extent_order pages). */ |
35 | unsigned long nr_extents; | 35 | unsigned long nr_extents; |
@@ -50,7 +50,6 @@ struct xen_memory_reservation { | |||
50 | domid_t domid; | 50 | domid_t domid; |
51 | 51 | ||
52 | }; | 52 | }; |
53 | DEFINE_GUEST_HANDLE_STRUCT(xen_memory_reservation); | ||
54 | 53 | ||
55 | /* | 54 | /* |
56 | * Returns the maximum machine frame number of mapped RAM in this system. | 55 | * Returns the maximum machine frame number of mapped RAM in this system. |
@@ -86,7 +85,7 @@ struct xen_machphys_mfn_list { | |||
86 | * any large discontiguities in the machine address space, 2MB gaps in | 85 | * any large discontiguities in the machine address space, 2MB gaps in |
87 | * the machphys table will be represented by an MFN base of zero. | 86 | * the machphys table will be represented by an MFN base of zero. |
88 | */ | 87 | */ |
89 | GUEST_HANDLE(ulong) extent_start; | 88 | ulong extent_start; |
90 | 89 | ||
91 | /* | 90 | /* |
92 | * Number of extents written to the above array. This will be smaller | 91 | * Number of extents written to the above array. This will be smaller |
@@ -94,7 +93,6 @@ struct xen_machphys_mfn_list { | |||
94 | */ | 93 | */ |
95 | unsigned int nr_extents; | 94 | unsigned int nr_extents; |
96 | }; | 95 | }; |
97 | DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list); | ||
98 | 96 | ||
99 | /* | 97 | /* |
100 | * Sets the GPFN at which a particular page appears in the specified guest's | 98 | * Sets the GPFN at which a particular page appears in the specified guest's |
@@ -117,7 +115,6 @@ struct xen_add_to_physmap { | |||
117 | /* GPFN where the source mapping page should appear. */ | 115 | /* GPFN where the source mapping page should appear. */ |
118 | unsigned long gpfn; | 116 | unsigned long gpfn; |
119 | }; | 117 | }; |
120 | DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); | ||
121 | 118 | ||
122 | /* | 119 | /* |
123 | * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error | 120 | * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error |
@@ -132,14 +129,13 @@ struct xen_translate_gpfn_list { | |||
132 | unsigned long nr_gpfns; | 129 | unsigned long nr_gpfns; |
133 | 130 | ||
134 | /* List of GPFNs to translate. */ | 131 | /* List of GPFNs to translate. */ |
135 | GUEST_HANDLE(ulong) gpfn_list; | 132 | ulong gpfn_list; |
136 | 133 | ||
137 | /* | 134 | /* |
138 | * Output list to contain MFN translations. May be the same as the input | 135 | * Output list to contain MFN translations. May be the same as the input |
139 | * list (in which case each input GPFN is overwritten with the output MFN). | 136 | * list (in which case each input GPFN is overwritten with the output MFN). |
140 | */ | 137 | */ |
141 | GUEST_HANDLE(ulong) mfn_list; | 138 | ulong mfn_list; |
142 | }; | 139 | }; |
143 | DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list); | ||
144 | 140 | ||
145 | #endif /* __XEN_PUBLIC_MEMORY_H__ */ | 141 | #endif /* __XEN_PUBLIC_MEMORY_H__ */ |
diff --git a/include/xen/interface/vcpu.h b/include/xen/interface/vcpu.h index b05d8a6d9143..87e6f8a48661 100644 --- a/include/xen/interface/vcpu.h +++ b/include/xen/interface/vcpu.h | |||
@@ -85,6 +85,7 @@ struct vcpu_runstate_info { | |||
85 | */ | 85 | */ |
86 | uint64_t time[4]; | 86 | uint64_t time[4]; |
87 | }; | 87 | }; |
88 | DEFINE_GUEST_HANDLE_STRUCT(vcpu_runstate_info); | ||
88 | 89 | ||
89 | /* VCPU is currently running on a physical CPU. */ | 90 | /* VCPU is currently running on a physical CPU. */ |
90 | #define RUNSTATE_running 0 | 91 | #define RUNSTATE_running 0 |
@@ -119,6 +120,7 @@ struct vcpu_runstate_info { | |||
119 | #define VCPUOP_register_runstate_memory_area 5 | 120 | #define VCPUOP_register_runstate_memory_area 5 |
120 | struct vcpu_register_runstate_memory_area { | 121 | struct vcpu_register_runstate_memory_area { |
121 | union { | 122 | union { |
123 | GUEST_HANDLE(vcpu_runstate_info) h; | ||
122 | struct vcpu_runstate_info *v; | 124 | struct vcpu_runstate_info *v; |
123 | uint64_t p; | 125 | uint64_t p; |
124 | } addr; | 126 | } addr; |
@@ -134,6 +136,7 @@ struct vcpu_register_runstate_memory_area { | |||
134 | struct vcpu_set_periodic_timer { | 136 | struct vcpu_set_periodic_timer { |
135 | uint64_t period_ns; | 137 | uint64_t period_ns; |
136 | }; | 138 | }; |
139 | DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_periodic_timer); | ||
137 | 140 | ||
138 | /* | 141 | /* |
139 | * Set or stop a VCPU's single-shot timer. Every VCPU has one single-shot | 142 | * Set or stop a VCPU's single-shot timer. Every VCPU has one single-shot |
@@ -145,6 +148,7 @@ struct vcpu_set_singleshot_timer { | |||
145 | uint64_t timeout_abs_ns; | 148 | uint64_t timeout_abs_ns; |
146 | uint32_t flags; /* VCPU_SSHOTTMR_??? */ | 149 | uint32_t flags; /* VCPU_SSHOTTMR_??? */ |
147 | }; | 150 | }; |
151 | DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_singleshot_timer); | ||
148 | 152 | ||
149 | /* Flags to VCPUOP_set_singleshot_timer. */ | 153 | /* Flags to VCPUOP_set_singleshot_timer. */ |
150 | /* Require the timeout to be in the future (return -ETIME if it's passed). */ | 154 | /* Require the timeout to be in the future (return -ETIME if it's passed). */ |
@@ -164,5 +168,6 @@ struct vcpu_register_vcpu_info { | |||
164 | uint32_t offset; /* offset within page */ | 168 | uint32_t offset; /* offset within page */ |
165 | uint32_t rsvd; /* unused */ | 169 | uint32_t rsvd; /* unused */ |
166 | }; | 170 | }; |
171 | DEFINE_GUEST_HANDLE_STRUCT(vcpu_register_vcpu_info); | ||
167 | 172 | ||
168 | #endif /* __XEN_PUBLIC_VCPU_H__ */ | 173 | #endif /* __XEN_PUBLIC_VCPU_H__ */ |
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index 518a5bf79ed3..9b018da48cf3 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -58,6 +58,16 @@ | |||
58 | #define __HYPERVISOR_physdev_op 33 | 58 | #define __HYPERVISOR_physdev_op 33 |
59 | #define __HYPERVISOR_hvm_op 34 | 59 | #define __HYPERVISOR_hvm_op 34 |
60 | 60 | ||
61 | /* Architecture-specific hypercall definitions. */ | ||
62 | #define __HYPERVISOR_arch_0 48 | ||
63 | #define __HYPERVISOR_arch_1 49 | ||
64 | #define __HYPERVISOR_arch_2 50 | ||
65 | #define __HYPERVISOR_arch_3 51 | ||
66 | #define __HYPERVISOR_arch_4 52 | ||
67 | #define __HYPERVISOR_arch_5 53 | ||
68 | #define __HYPERVISOR_arch_6 54 | ||
69 | #define __HYPERVISOR_arch_7 55 | ||
70 | |||
61 | /* | 71 | /* |
62 | * VIRTUAL INTERRUPTS | 72 | * VIRTUAL INTERRUPTS |
63 | * | 73 | * |
@@ -68,8 +78,18 @@ | |||
68 | #define VIRQ_CONSOLE 2 /* (DOM0) Bytes received on emergency console. */ | 78 | #define VIRQ_CONSOLE 2 /* (DOM0) Bytes received on emergency console. */ |
69 | #define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */ | 79 | #define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */ |
70 | #define VIRQ_DEBUGGER 6 /* (DOM0) A domain has paused for debugging. */ | 80 | #define VIRQ_DEBUGGER 6 /* (DOM0) A domain has paused for debugging. */ |
71 | #define NR_VIRQS 8 | ||
72 | 81 | ||
82 | /* Architecture-specific VIRQ definitions. */ | ||
83 | #define VIRQ_ARCH_0 16 | ||
84 | #define VIRQ_ARCH_1 17 | ||
85 | #define VIRQ_ARCH_2 18 | ||
86 | #define VIRQ_ARCH_3 19 | ||
87 | #define VIRQ_ARCH_4 20 | ||
88 | #define VIRQ_ARCH_5 21 | ||
89 | #define VIRQ_ARCH_6 22 | ||
90 | #define VIRQ_ARCH_7 23 | ||
91 | |||
92 | #define NR_VIRQS 24 | ||
73 | /* | 93 | /* |
74 | * MMU-UPDATE REQUESTS | 94 | * MMU-UPDATE REQUESTS |
75 | * | 95 | * |
diff --git a/include/xen/interface/xencomm.h b/include/xen/interface/xencomm.h new file mode 100644 index 000000000000..ac45e0712afa --- /dev/null +++ b/include/xen/interface/xencomm.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
3 | * of this software and associated documentation files (the "Software"), to | ||
4 | * deal in the Software without restriction, including without limitation the | ||
5 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
6 | * sell copies of the Software, and to permit persons to whom the Software is | ||
7 | * furnished to do so, subject to the following conditions: | ||
8 | * | ||
9 | * The above copyright notice and this permission notice shall be included in | ||
10 | * all copies or substantial portions of the Software. | ||
11 | * | ||
12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
13 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
15 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
18 | * DEALINGS IN THE SOFTWARE. | ||
19 | * | ||
20 | * Copyright (C) IBM Corp. 2006 | ||
21 | */ | ||
22 | |||
23 | #ifndef _XEN_XENCOMM_H_ | ||
24 | #define _XEN_XENCOMM_H_ | ||
25 | |||
26 | /* A xencomm descriptor is a scatter/gather list containing physical | ||
27 | * addresses corresponding to a virtually contiguous memory area. The | ||
28 | * hypervisor translates these physical addresses to machine addresses to copy | ||
29 | * to and from the virtually contiguous area. | ||
30 | */ | ||
31 | |||
32 | #define XENCOMM_MAGIC 0x58434F4D /* 'XCOM' */ | ||
33 | #define XENCOMM_INVALID (~0UL) | ||
34 | |||
35 | struct xencomm_desc { | ||
36 | uint32_t magic; | ||
37 | uint32_t nr_addrs; /* the number of entries in address[] */ | ||
38 | uint64_t address[0]; | ||
39 | }; | ||
40 | |||
41 | #endif /* _XEN_XENCOMM_H_ */ | ||
diff --git a/include/xen/page.h b/include/xen/page.h index 031ef22a971e..eaf85fab1263 100644 --- a/include/xen/page.h +++ b/include/xen/page.h | |||
@@ -1,180 +1 @@ | |||
1 | #ifndef __XEN_PAGE_H | #include <asm/xen/page.h> | |
2 | #define __XEN_PAGE_H | ||
3 | |||
4 | #include <linux/pfn.h> | ||
5 | |||
6 | #include <asm/uaccess.h> | ||
7 | #include <asm/pgtable.h> | ||
8 | |||
9 | #include <xen/features.h> | ||
10 | |||
11 | #ifdef CONFIG_X86_PAE | ||
12 | /* Xen machine address */ | ||
13 | typedef struct xmaddr { | ||
14 | unsigned long long maddr; | ||
15 | } xmaddr_t; | ||
16 | |||
17 | /* Xen pseudo-physical address */ | ||
18 | typedef struct xpaddr { | ||
19 | unsigned long long paddr; | ||
20 | } xpaddr_t; | ||
21 | #else | ||
22 | /* Xen machine address */ | ||
23 | typedef struct xmaddr { | ||
24 | unsigned long maddr; | ||
25 | } xmaddr_t; | ||
26 | |||
27 | /* Xen pseudo-physical address */ | ||
28 | typedef struct xpaddr { | ||
29 | unsigned long paddr; | ||
30 | } xpaddr_t; | ||
31 | #endif | ||
32 | |||
33 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | ||
34 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | ||
35 | |||
36 | /**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/ | ||
37 | #define INVALID_P2M_ENTRY (~0UL) | ||
38 | #define FOREIGN_FRAME_BIT (1UL<<31) | ||
39 | #define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT) | ||
40 | |||
41 | extern unsigned long *phys_to_machine_mapping; | ||
42 | |||
43 | static inline unsigned long pfn_to_mfn(unsigned long pfn) | ||
44 | { | ||
45 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
46 | return pfn; | ||
47 | |||
48 | return phys_to_machine_mapping[(unsigned int)(pfn)] & | ||
49 | ~FOREIGN_FRAME_BIT; | ||
50 | } | ||
51 | |||
52 | static inline int phys_to_machine_mapping_valid(unsigned long pfn) | ||
53 | { | ||
54 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
55 | return 1; | ||
56 | |||
57 | return (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY); | ||
58 | } | ||
59 | |||
60 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | ||
61 | { | ||
62 | unsigned long pfn; | ||
63 | |||
64 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
65 | return mfn; | ||
66 | |||
67 | #if 0 | ||
68 | if (unlikely((mfn >> machine_to_phys_order) != 0)) | ||
69 | return max_mapnr; | ||
70 | #endif | ||
71 | |||
72 | pfn = 0; | ||
73 | /* | ||
74 | * The array access can fail (e.g., device space beyond end of RAM). | ||
75 | * In such cases it doesn't matter what we return (we return garbage), | ||
76 | * but we must handle the fault without crashing! | ||
77 | */ | ||
78 | __get_user(pfn, &machine_to_phys_mapping[mfn]); | ||
79 | |||
80 | return pfn; | ||
81 | } | ||
82 | |||
83 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | ||
84 | { | ||
85 | unsigned offset = phys.paddr & ~PAGE_MASK; | ||
86 | return XMADDR(PFN_PHYS((u64)pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); | ||
87 | } | ||
88 | |||
89 | static inline xpaddr_t machine_to_phys(xmaddr_t machine) | ||
90 | { | ||
91 | unsigned offset = machine.maddr & ~PAGE_MASK; | ||
92 | return XPADDR(PFN_PHYS((u64)mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * We detect special mappings in one of two ways: | ||
97 | * 1. If the MFN is an I/O page then Xen will set the m2p entry | ||
98 | * to be outside our maximum possible pseudophys range. | ||
99 | * 2. If the MFN belongs to a different domain then we will certainly | ||
100 | * not have MFN in our p2m table. Conversely, if the page is ours, | ||
101 | * then we'll have p2m(m2p(MFN))==MFN. | ||
102 | * If we detect a special mapping then it doesn't have a 'struct page'. | ||
103 | * We force !pfn_valid() by returning an out-of-range pointer. | ||
104 | * | ||
105 | * NB. These checks require that, for any MFN that is not in our reservation, | ||
106 | * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if | ||
107 | * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN. | ||
108 | * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety. | ||
109 | * | ||
110 | * NB2. When deliberately mapping foreign pages into the p2m table, you *must* | ||
111 | * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we | ||
112 | * require. In all the cases we care about, the FOREIGN_FRAME bit is | ||
113 | * masked (e.g., pfn_to_mfn()) so behaviour there is correct. | ||
114 | */ | ||
115 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | ||
116 | { | ||
117 | extern unsigned long max_mapnr; | ||
118 | unsigned long pfn = mfn_to_pfn(mfn); | ||
119 | if ((pfn < max_mapnr) | ||
120 | && !xen_feature(XENFEAT_auto_translated_physmap) | ||
121 | && (phys_to_machine_mapping[pfn] != mfn)) | ||
122 | return max_mapnr; /* force !pfn_valid() */ | ||
123 | return pfn; | ||
124 | } | ||
125 | |||
126 | static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
127 | { | ||
128 | if (xen_feature(XENFEAT_auto_translated_physmap)) { | ||
129 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
130 | return; | ||
131 | } | ||
132 | phys_to_machine_mapping[pfn] = mfn; | ||
133 | } | ||
134 | |||
135 | /* VIRT <-> MACHINE conversion */ | ||
136 | #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) | ||
137 | #define virt_to_mfn(v) (pfn_to_mfn(PFN_DOWN(__pa(v)))) | ||
138 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | ||
139 | |||
140 | #ifdef CONFIG_X86_PAE | ||
141 | #define pte_mfn(_pte) (((_pte).pte_low >> PAGE_SHIFT) | \ | ||
142 | (((_pte).pte_high & 0xfff) << (32-PAGE_SHIFT))) | ||
143 | |||
144 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | ||
145 | { | ||
146 | pte_t pte; | ||
147 | |||
148 | pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) | | ||
149 | (pgprot_val(pgprot) >> 32); | ||
150 | pte.pte_high &= (__supported_pte_mask >> 32); | ||
151 | pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot)); | ||
152 | pte.pte_low &= __supported_pte_mask; | ||
153 | |||
154 | return pte; | ||
155 | } | ||
156 | |||
157 | static inline unsigned long long pte_val_ma(pte_t x) | ||
158 | { | ||
159 | return x.pte; | ||
160 | } | ||
161 | #define pmd_val_ma(v) ((v).pmd) | ||
162 | #define pud_val_ma(v) ((v).pgd.pgd) | ||
163 | #define __pte_ma(x) ((pte_t) { .pte = (x) }) | ||
164 | #define __pmd_ma(x) ((pmd_t) { (x) } ) | ||
165 | #else /* !X86_PAE */ | ||
166 | #define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT) | ||
167 | #define mfn_pte(pfn, prot) __pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | ||
168 | #define pte_val_ma(x) ((x).pte) | ||
169 | #define pmd_val_ma(v) ((v).pud.pgd.pgd) | ||
170 | #define __pte_ma(x) ((pte_t) { (x) } ) | ||
171 | #endif /* CONFIG_X86_PAE */ | ||
172 | |||
173 | #define pgd_val_ma(x) ((x).pgd) | ||
174 | |||
175 | |||
176 | xmaddr_t arbitrary_virt_to_machine(unsigned long address); | ||
177 | void make_lowmem_page_readonly(void *vaddr); | ||
178 | void make_lowmem_page_readwrite(void *vaddr); | ||
179 | |||
180 | #endif /* __XEN_PAGE_H */ | ||
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h new file mode 100644 index 000000000000..10ddfe0142d0 --- /dev/null +++ b/include/xen/xen-ops.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef INCLUDE_XEN_OPS_H | ||
2 | #define INCLUDE_XEN_OPS_H | ||
3 | |||
4 | #include <linux/percpu.h> | ||
5 | |||
6 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); | ||
7 | |||
8 | #endif /* INCLUDE_XEN_OPS_H */ | ||
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index 6f7c290651ae..6369d89c25d5 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -97,6 +97,7 @@ struct xenbus_driver { | |||
97 | int (*uevent)(struct xenbus_device *, char **, int, char *, int); | 97 | int (*uevent)(struct xenbus_device *, char **, int, char *, int); |
98 | struct device_driver driver; | 98 | struct device_driver driver; |
99 | int (*read_otherend_details)(struct xenbus_device *dev); | 99 | int (*read_otherend_details)(struct xenbus_device *dev); |
100 | int (*is_ready)(struct xenbus_device *dev); | ||
100 | }; | 101 | }; |
101 | 102 | ||
102 | static inline struct xenbus_driver *to_xenbus_driver(struct device_driver *drv) | 103 | static inline struct xenbus_driver *to_xenbus_driver(struct device_driver *drv) |
diff --git a/include/xen/xencomm.h b/include/xen/xencomm.h new file mode 100644 index 000000000000..e43b039be112 --- /dev/null +++ b/include/xen/xencomm.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | * | ||
16 | * Copyright (C) IBM Corp. 2006 | ||
17 | * | ||
18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | ||
19 | * Jerone Young <jyoung5@us.ibm.com> | ||
20 | */ | ||
21 | |||
22 | #ifndef _LINUX_XENCOMM_H_ | ||
23 | #define _LINUX_XENCOMM_H_ | ||
24 | |||
25 | #include <xen/interface/xencomm.h> | ||
26 | |||
27 | #define XENCOMM_MINI_ADDRS 3 | ||
28 | struct xencomm_mini { | ||
29 | struct xencomm_desc _desc; | ||
30 | uint64_t address[XENCOMM_MINI_ADDRS]; | ||
31 | }; | ||
32 | |||
33 | /* To avoid additionnal virt to phys conversion, an opaque structure is | ||
34 | presented. */ | ||
35 | struct xencomm_handle; | ||
36 | |||
37 | extern void xencomm_free(struct xencomm_handle *desc); | ||
38 | extern struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes); | ||
39 | extern struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, | ||
40 | unsigned long bytes, struct xencomm_mini *xc_area); | ||
41 | |||
42 | #if 0 | ||
43 | #define XENCOMM_MINI_ALIGNED(xc_desc, n) \ | ||
44 | struct xencomm_mini xc_desc ## _base[(n)] \ | ||
45 | __attribute__((__aligned__(sizeof(struct xencomm_mini)))); \ | ||
46 | struct xencomm_mini *xc_desc = &xc_desc ## _base[0]; | ||
47 | #else | ||
48 | /* | ||
49 | * gcc bug workaround: | ||
50 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 | ||
51 | * gcc doesn't handle properly stack variable with | ||
52 | * __attribute__((__align__(sizeof(struct xencomm_mini)))) | ||
53 | */ | ||
54 | #define XENCOMM_MINI_ALIGNED(xc_desc, n) \ | ||
55 | unsigned char xc_desc ## _base[((n) + 1 ) * \ | ||
56 | sizeof(struct xencomm_mini)]; \ | ||
57 | struct xencomm_mini *xc_desc = (struct xencomm_mini *) \ | ||
58 | ((unsigned long)xc_desc ## _base + \ | ||
59 | (sizeof(struct xencomm_mini) - \ | ||
60 | ((unsigned long)xc_desc ## _base) % \ | ||
61 | sizeof(struct xencomm_mini))); | ||
62 | #endif | ||
63 | #define xencomm_map_no_alloc(ptr, bytes) \ | ||
64 | ({ XENCOMM_MINI_ALIGNED(xc_desc, 1); \ | ||
65 | __xencomm_map_no_alloc(ptr, bytes, xc_desc); }) | ||
66 | |||
67 | /* provided by architecture code: */ | ||
68 | extern unsigned long xencomm_vtop(unsigned long vaddr); | ||
69 | |||
70 | static inline void *xencomm_pa(void *ptr) | ||
71 | { | ||
72 | return (void *)xencomm_vtop((unsigned long)ptr); | ||
73 | } | ||
74 | |||
75 | #define xen_guest_handle(hnd) ((hnd).p) | ||
76 | |||
77 | #endif /* _LINUX_XENCOMM_H_ */ | ||