diff options
Diffstat (limited to 'include')
430 files changed, 11551 insertions, 5804 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 21a86f1a05b3..ab5b60dcef19 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/mm.h> | ||
7 | #include <asm/compiler.h> | 8 | #include <asm/compiler.h> |
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | #include <asm/pgtable.h> | 10 | #include <asm/pgtable.h> |
@@ -90,6 +91,11 @@ static inline void * phys_to_virt(unsigned long address) | |||
90 | 91 | ||
91 | #define page_to_phys(page) page_to_pa(page) | 92 | #define page_to_phys(page) page_to_pa(page) |
92 | 93 | ||
94 | static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page) | ||
95 | { | ||
96 | return page_to_phys(page); | ||
97 | } | ||
98 | |||
93 | /* This depends on working iommu. */ | 99 | /* This depends on working iommu. */ |
94 | #define BIO_VMERGE_BOUNDARY (alpha_mv.mv_pci_tbi ? PAGE_SIZE : 0) | 100 | #define BIO_VMERGE_BOUNDARY (alpha_mv.mv_pci_tbi ? PAGE_SIZE : 0) |
95 | 101 | ||
@@ -102,12 +108,12 @@ static inline void * phys_to_virt(unsigned long address) | |||
102 | * | 108 | * |
103 | * Note that this only works for a limited range of kernel addresses, | 109 | * Note that this only works for a limited range of kernel addresses, |
104 | * and very well may not span all memory. Consider this interface | 110 | * and very well may not span all memory. Consider this interface |
105 | * deprecated in favour of the mapping functions in <asm/pci.h>. | 111 | * deprecated in favour of the DMA-mapping API. |
106 | */ | 112 | */ |
107 | extern unsigned long __direct_map_base; | 113 | extern unsigned long __direct_map_base; |
108 | extern unsigned long __direct_map_size; | 114 | extern unsigned long __direct_map_size; |
109 | 115 | ||
110 | static inline unsigned long virt_to_bus(void *address) | 116 | static inline unsigned long __deprecated virt_to_bus(void *address) |
111 | { | 117 | { |
112 | unsigned long phys = virt_to_phys(address); | 118 | unsigned long phys = virt_to_phys(address); |
113 | unsigned long bus = phys + __direct_map_base; | 119 | unsigned long bus = phys + __direct_map_base; |
@@ -115,7 +121,7 @@ static inline unsigned long virt_to_bus(void *address) | |||
115 | } | 121 | } |
116 | #define isa_virt_to_bus virt_to_bus | 122 | #define isa_virt_to_bus virt_to_bus |
117 | 123 | ||
118 | static inline void *bus_to_virt(unsigned long address) | 124 | static inline void * __deprecated bus_to_virt(unsigned long address) |
119 | { | 125 | { |
120 | void *virt; | 126 | void *virt; |
121 | 127 | ||
@@ -126,6 +132,7 @@ static inline void *bus_to_virt(unsigned long address) | |||
126 | virt = phys_to_virt(address); | 132 | virt = phys_to_virt(address); |
127 | return (long)address <= 0 ? NULL : virt; | 133 | return (long)address <= 0 ? NULL : virt; |
128 | } | 134 | } |
135 | #define isa_bus_to_virt bus_to_virt | ||
129 | 136 | ||
130 | /* | 137 | /* |
131 | * There are different chipsets to interface the Alpha CPUs to the world. | 138 | * There are different chipsets to interface the Alpha CPUs to the world. |
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h index 85aa1127c903..30ee7669b19f 100644 --- a/include/asm-alpha/pci.h +++ b/include/asm-alpha/pci.h | |||
@@ -199,30 +199,6 @@ pci_dma_sync_sg_for_device(struct pci_dev *dev, struct scatterlist *sg, | |||
199 | 199 | ||
200 | extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); | 200 | extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); |
201 | 201 | ||
202 | /* True if the machine supports DAC addressing, and DEV can | ||
203 | make use of it given MASK. */ | ||
204 | extern int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask); | ||
205 | |||
206 | /* Convert to/from DAC dma address and struct page. */ | ||
207 | extern dma64_addr_t pci_dac_page_to_dma(struct pci_dev *, struct page *, | ||
208 | unsigned long, int); | ||
209 | extern struct page *pci_dac_dma_to_page(struct pci_dev *, dma64_addr_t); | ||
210 | extern unsigned long pci_dac_dma_to_offset(struct pci_dev *, dma64_addr_t); | ||
211 | |||
212 | static inline void | ||
213 | pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, dma64_addr_t dma_addr, | ||
214 | size_t len, int direction) | ||
215 | { | ||
216 | /* Nothing to do. */ | ||
217 | } | ||
218 | |||
219 | static inline void | ||
220 | pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, | ||
221 | size_t len, int direction) | ||
222 | { | ||
223 | /* Nothing to do. */ | ||
224 | } | ||
225 | |||
226 | #ifdef CONFIG_PCI | 202 | #ifdef CONFIG_PCI |
227 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 203 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
228 | enum pci_dma_burst_strategy *strat, | 204 | enum pci_dma_burst_strategy *strat, |
@@ -275,11 +251,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
275 | return hose->need_domain_info; | 251 | return hose->need_domain_info; |
276 | } | 252 | } |
277 | 253 | ||
278 | static inline void | ||
279 | pcibios_add_platform_entries(struct pci_dev *dev) | ||
280 | { | ||
281 | } | ||
282 | |||
283 | struct pci_dev *alpha_gendev_to_pci(struct device *dev); | 254 | struct pci_dev *alpha_gendev_to_pci(struct device *dev); |
284 | 255 | ||
285 | #endif /* __KERNEL__ */ | 256 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 616d20662ff3..99037b032357 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h | |||
@@ -264,21 +264,15 @@ extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; } | |||
264 | * The following only work if pte_present() is true. | 264 | * The following only work if pte_present() is true. |
265 | * Undefined behaviour if not.. | 265 | * Undefined behaviour if not.. |
266 | */ | 266 | */ |
267 | extern inline int pte_read(pte_t pte) { return !(pte_val(pte) & _PAGE_FOR); } | ||
268 | extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); } | 267 | extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); } |
269 | extern inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_FOE); } | ||
270 | extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 268 | extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
271 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 269 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
272 | extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 270 | extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
273 | 271 | ||
274 | extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; } | 272 | extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; } |
275 | extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOR; return pte; } | ||
276 | extern inline pte_t pte_exprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOE; return pte; } | ||
277 | extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; } | 273 | extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; } |
278 | extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); return pte; } | 274 | extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); return pte; } |
279 | extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; } | 275 | extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; } |
280 | extern inline pte_t pte_mkread(pte_t pte) { pte_val(pte) &= ~_PAGE_FOR; return pte; } | ||
281 | extern inline pte_t pte_mkexec(pte_t pte) { pte_val(pte) &= ~_PAGE_FOE; return pte; } | ||
282 | extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; } | 276 | extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; } |
283 | extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; } | 277 | extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; } |
284 | 278 | ||
diff --git a/include/asm-arm/Kbuild b/include/asm-arm/Kbuild index c68e1680da01..73237bd130a2 100644 --- a/include/asm-arm/Kbuild +++ b/include/asm-arm/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | unifdef-y += hwcap.h | ||
diff --git a/include/asm-arm/arch-at91/at91_dbgu.h b/include/asm-arm/arch-at91/at91_dbgu.h index b0369e176f7b..8019ffd0ad3b 100644 --- a/include/asm-arm/arch-at91/at91_dbgu.h +++ b/include/asm-arm/arch-at91/at91_dbgu.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #ifndef AT91_DBGU_H | 16 | #ifndef AT91_DBGU_H |
17 | #define AT91_DBGU_H | 17 | #define AT91_DBGU_H |
18 | 18 | ||
19 | #ifdef AT91_DBGU | ||
19 | #define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */ | 20 | #define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */ |
20 | #define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */ | 21 | #define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */ |
21 | #define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */ | 22 | #define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */ |
@@ -30,6 +31,15 @@ | |||
30 | 31 | ||
31 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ | 32 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ |
32 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ | 33 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ |
34 | #define AT91_DBGU_FNR (AT91_DBGU + 0x48) /* Force NTRST Register [SAM9 only] */ | ||
35 | #define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */ | ||
36 | |||
37 | #endif /* AT91_DBGU */ | ||
38 | |||
39 | /* | ||
40 | * Some AT91 parts that don't have full DEBUG units still support the ID | ||
41 | * and extensions register. | ||
42 | */ | ||
33 | #define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ | 43 | #define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ |
34 | #define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ | 44 | #define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ |
35 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ | 45 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ |
@@ -53,7 +63,4 @@ | |||
53 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ | 63 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ |
54 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ | 64 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ |
55 | 65 | ||
56 | #define AT91_DBGU_FNR (AT91_DBGU + 0x48) /* Force NTRST Register [SAM9 only] */ | ||
57 | #define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */ | ||
58 | |||
59 | #endif | 66 | #endif |
diff --git a/include/asm-arm/arch-at91/at91x40.h b/include/asm-arm/arch-at91/at91x40.h new file mode 100644 index 000000000000..612203e0177f --- /dev/null +++ b/include/asm-arm/arch-at91/at91x40.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91x40.h | ||
3 | * | ||
4 | * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef AT91X40_H | ||
13 | #define AT91X40_H | ||
14 | |||
15 | /* | ||
16 | * IRQ list. | ||
17 | */ | ||
18 | #define AT91_ID_FIQ 0 /* FIQ */ | ||
19 | #define AT91_ID_SYS 1 /* System Peripheral */ | ||
20 | #define AT91X40_ID_USART0 2 /* USART port 0 */ | ||
21 | #define AT91X40_ID_USART1 3 /* USART port 1 */ | ||
22 | #define AT91X40_ID_TC0 4 /* Timer/Counter 0 */ | ||
23 | #define AT91X40_ID_TC1 5 /* Timer/Counter 1*/ | ||
24 | #define AT91X40_ID_TC2 6 /* Timer/Counter 2*/ | ||
25 | #define AT91X40_ID_WD 7 /* Watchdog? */ | ||
26 | #define AT91X40_ID_PIOA 8 /* Parallel IO Controller A */ | ||
27 | |||
28 | #define AT91X40_ID_IRQ0 16 /* External IRQ 0 */ | ||
29 | #define AT91X40_ID_IRQ1 17 /* External IRQ 1 */ | ||
30 | #define AT91X40_ID_IRQ2 18 /* External IRQ 2 */ | ||
31 | |||
32 | /* | ||
33 | * System Peripherals (offset from AT91_BASE_SYS) | ||
34 | */ | ||
35 | #define AT91_BASE_SYS 0xffc00000 | ||
36 | |||
37 | #define AT91_EBI (0xffe00000 - AT91_BASE_SYS) /* External Bus Interface */ | ||
38 | #define AT91_SF (0xfff00000 - AT91_BASE_SYS) /* Special Function */ | ||
39 | #define AT91_USART1 (0xfffcc000 - AT91_BASE_SYS) /* USART 1 */ | ||
40 | #define AT91_USART0 (0xfffd0000 - AT91_BASE_SYS) /* USART 0 */ | ||
41 | #define AT91_TC (0xfffe0000 - AT91_BASE_SYS) /* Timer Counter */ | ||
42 | #define AT91_PIOA (0xffff0000 - AT91_BASE_SYS) /* PIO Controller A */ | ||
43 | #define AT91_PS (0xffff4000 - AT91_BASE_SYS) /* Power Save */ | ||
44 | #define AT91_WD (0xffff8000 - AT91_BASE_SYS) /* Watchdog Timer */ | ||
45 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */ | ||
46 | |||
47 | /* | ||
48 | * The AT91x40 series doesn't have a debug unit like the other AT91 parts. | ||
49 | * But it does have a chip identify register and extension ID, so define at | ||
50 | * least these here. | ||
51 | */ | ||
52 | #define AT91_DBGU_CIDR (AT91_SF + 0) /* CIDR in PS segment */ | ||
53 | #define AT91_DBGU_EXID (AT91_SF + 4) /* EXID in PS segment */ | ||
54 | |||
55 | #endif /* AT91X40_H */ | ||
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h index ef93c30a9c5f..080cbb401a87 100644 --- a/include/asm-arm/arch-at91/cpu.h +++ b/include/asm-arm/arch-at91/cpu.h | |||
@@ -28,6 +28,11 @@ | |||
28 | 28 | ||
29 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 | 29 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 |
30 | 30 | ||
31 | #define ARCH_ID_AT91M40800 0x14080044 | ||
32 | #define ARCH_ID_AT91R40807 0x44080746 | ||
33 | #define ARCH_ID_AT91M40807 0x14080745 | ||
34 | #define ARCH_ID_AT91R40008 0x44000840 | ||
35 | |||
31 | static inline unsigned long at91_cpu_identify(void) | 36 | static inline unsigned long at91_cpu_identify(void) |
32 | { | 37 | { |
33 | return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION); | 38 | return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION); |
diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h index 46835e945aea..8f1cdd38a969 100644 --- a/include/asm-arm/arch-at91/hardware.h +++ b/include/asm-arm/arch-at91/hardware.h | |||
@@ -26,18 +26,29 @@ | |||
26 | #include <asm/arch/at91sam9263.h> | 26 | #include <asm/arch/at91sam9263.h> |
27 | #elif defined(CONFIG_ARCH_AT91SAM9RL) | 27 | #elif defined(CONFIG_ARCH_AT91SAM9RL) |
28 | #include <asm/arch/at91sam9rl.h> | 28 | #include <asm/arch/at91sam9rl.h> |
29 | #elif defined(CONFIG_ARCH_AT91X40) | ||
30 | #include <asm/arch/at91x40.h> | ||
29 | #else | 31 | #else |
30 | #error "Unsupported AT91 processor" | 32 | #error "Unsupported AT91 processor" |
31 | #endif | 33 | #endif |
32 | 34 | ||
33 | 35 | ||
36 | #ifdef CONFIG_MMU | ||
34 | /* | 37 | /* |
35 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF | 38 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF |
36 | * to 0xFEF78000 .. 0xFF000000. (544Kb) | 39 | * to 0xFEF78000 .. 0xFF000000. (544Kb) |
37 | */ | 40 | */ |
38 | #define AT91_IO_PHYS_BASE 0xFFF78000 | 41 | #define AT91_IO_PHYS_BASE 0xFFF78000 |
39 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | ||
40 | #define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE) | 42 | #define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE) |
43 | #else | ||
44 | /* | ||
45 | * Identity mapping for the non MMU case. | ||
46 | */ | ||
47 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS | ||
48 | #define AT91_IO_VIRT_BASE AT91_IO_PHYS_BASE | ||
49 | #endif | ||
50 | |||
51 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | ||
41 | 52 | ||
42 | /* Convert a physical IO address to virtual IO address */ | 53 | /* Convert a physical IO address to virtual IO address */ |
43 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) | 54 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) |
@@ -66,7 +77,11 @@ | |||
66 | #define AT91_CHIPSELECT_7 0x80000000 | 77 | #define AT91_CHIPSELECT_7 0x80000000 |
67 | 78 | ||
68 | /* SDRAM */ | 79 | /* SDRAM */ |
80 | #ifdef CONFIG_DRAM_BASE | ||
81 | #define AT91_SDRAM_BASE CONFIG_DRAM_BASE | ||
82 | #else | ||
69 | #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 | 83 | #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 |
84 | #endif | ||
70 | 85 | ||
71 | /* Clocks */ | 86 | /* Clocks */ |
72 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | 87 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ |
diff --git a/include/asm-arm/arch-at91/timex.h b/include/asm-arm/arch-at91/timex.h index 2df1ee12dfb7..a310698fb4da 100644 --- a/include/asm-arm/arch-at91/timex.h +++ b/include/asm-arm/arch-at91/timex.h | |||
@@ -42,6 +42,11 @@ | |||
42 | #define AT91SAM9_MASTER_CLOCK 100000000 | 42 | #define AT91SAM9_MASTER_CLOCK 100000000 |
43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
44 | 44 | ||
45 | #elif defined(CONFIG_ARCH_AT91X40) | ||
46 | |||
47 | #define AT91X40_MASTER_CLOCK 40000000 | ||
48 | #define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK) | ||
49 | |||
45 | #endif | 50 | #endif |
46 | 51 | ||
47 | #endif | 52 | #endif |
diff --git a/include/asm-arm/arch-at91/uncompress.h b/include/asm-arm/arch-at91/uncompress.h index 30ac587b3b41..272a7e0dc6cf 100644 --- a/include/asm-arm/arch-at91/uncompress.h +++ b/include/asm-arm/arch-at91/uncompress.h | |||
@@ -33,20 +33,24 @@ | |||
33 | */ | 33 | */ |
34 | static void putc(int c) | 34 | static void putc(int c) |
35 | { | 35 | { |
36 | #ifdef AT91_DBGU | ||
36 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ | 37 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ |
37 | 38 | ||
38 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) | 39 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) |
39 | barrier(); | 40 | barrier(); |
40 | __raw_writel(c, sys + AT91_DBGU_THR); | 41 | __raw_writel(c, sys + AT91_DBGU_THR); |
42 | #endif | ||
41 | } | 43 | } |
42 | 44 | ||
43 | static inline void flush(void) | 45 | static inline void flush(void) |
44 | { | 46 | { |
47 | #ifdef AT91_DBGU | ||
45 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ | 48 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ |
46 | 49 | ||
47 | /* wait for transmission to complete */ | 50 | /* wait for transmission to complete */ |
48 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) | 51 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) |
49 | barrier(); | 52 | barrier(); |
53 | #endif | ||
50 | } | 54 | } |
51 | 55 | ||
52 | #define arch_decomp_setup() | 56 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-davinci/clock.h b/include/asm-arm/arch-davinci/clock.h new file mode 100644 index 000000000000..cc168b7a14f2 --- /dev/null +++ b/include/asm-arm/arch-davinci/clock.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-davinci/clock.h | ||
3 | * | ||
4 | * Clock control driver for DaVinci - header file | ||
5 | * | ||
6 | * Authors: Vladimir Barinov <source@mvista.com> | ||
7 | * | ||
8 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef __ASM_ARCH_DAVINCI_CLOCK_H | ||
14 | #define __ASM_ARCH_DAVINCI_CLOCK_H | ||
15 | |||
16 | struct clk; | ||
17 | |||
18 | extern int clk_register(struct clk *clk); | ||
19 | extern void clk_unregister(struct clk *clk); | ||
20 | extern int davinci_clk_init(void); | ||
21 | |||
22 | #endif | ||
diff --git a/include/asm-arm/arch-davinci/gpio.h b/include/asm-arm/arch-davinci/gpio.h new file mode 100644 index 000000000000..ea24a0e0bfd6 --- /dev/null +++ b/include/asm-arm/arch-davinci/gpio.h | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * TI DaVinci GPIO Support | ||
3 | * | ||
4 | * Copyright (c) 2006 David Brownell | ||
5 | * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __DAVINCI_GPIO_H | ||
14 | #define __DAVINCI_GPIO_H | ||
15 | |||
16 | /* | ||
17 | * basic gpio routines | ||
18 | * | ||
19 | * board-specific init should be done by arch/.../.../board-XXX.c (maybe | ||
20 | * initializing banks together) rather than boot loaders; kexec() won't | ||
21 | * go through boot loaders. | ||
22 | * | ||
23 | * the gpio clock will be turned on when gpios are used, and you may also | ||
24 | * need to pay attention to PINMUX0 and PINMUX1 to be sure those pins are | ||
25 | * used as gpios, not with other peripherals. | ||
26 | * | ||
27 | * GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation, and maybe | ||
28 | * for later updates, code should write GPIO(N) or: | ||
29 | * - GPIOV18(N) for 1.8V pins, N in 0..53; same as GPIO(0)..GPIO(53) | ||
30 | * - GPIOV33(N) for 3.3V pins, N in 0..17; same as GPIO(54)..GPIO(70) | ||
31 | * | ||
32 | * For GPIO IRQs use gpio_to_irq(GPIO(N)) or gpio_to_irq(GPIOV33(N)) etc | ||
33 | * for now, that's != GPIO(N) | ||
34 | */ | ||
35 | #define GPIO(X) (X) /* 0 <= X <= 70 */ | ||
36 | #define GPIOV18(X) (X) /* 1.8V i/o; 0 <= X <= 53 */ | ||
37 | #define GPIOV33(X) ((X)+54) /* 3.3V i/o; 0 <= X <= 17 */ | ||
38 | |||
39 | struct gpio_controller { | ||
40 | u32 dir; | ||
41 | u32 out_data; | ||
42 | u32 set_data; | ||
43 | u32 clr_data; | ||
44 | u32 in_data; | ||
45 | u32 set_rising; | ||
46 | u32 clr_rising; | ||
47 | u32 set_falling; | ||
48 | u32 clr_falling; | ||
49 | u32 intstat; | ||
50 | }; | ||
51 | |||
52 | /* The __gpio_to_controller() and __gpio_mask() functions inline to constants | ||
53 | * with constant parameters; or in outlined code they execute at runtime. | ||
54 | * | ||
55 | * You'd access the controller directly when reading or writing more than | ||
56 | * one gpio value at a time, and to support wired logic where the value | ||
57 | * being driven by the cpu need not match the value read back. | ||
58 | * | ||
59 | * These are NOT part of the cross-platform GPIO interface | ||
60 | */ | ||
61 | static inline struct gpio_controller *__iomem | ||
62 | __gpio_to_controller(unsigned gpio) | ||
63 | { | ||
64 | void *__iomem ptr; | ||
65 | |||
66 | if (gpio < 32) | ||
67 | ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x10); | ||
68 | else if (gpio < 64) | ||
69 | ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x38); | ||
70 | else if (gpio < DAVINCI_N_GPIO) | ||
71 | ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x60); | ||
72 | else | ||
73 | ptr = NULL; | ||
74 | return ptr; | ||
75 | } | ||
76 | |||
77 | static inline u32 __gpio_mask(unsigned gpio) | ||
78 | { | ||
79 | return 1 << (gpio % 32); | ||
80 | } | ||
81 | |||
82 | /* The get/set/clear functions will inline when called with constant | ||
83 | * parameters, for low-overhead bitbanging. Illegal constant parameters | ||
84 | * cause link-time errors. | ||
85 | * | ||
86 | * Otherwise, calls with variable parameters use outlined functions. | ||
87 | */ | ||
88 | extern int __error_inval_gpio(void); | ||
89 | |||
90 | extern void __gpio_set(unsigned gpio, int value); | ||
91 | extern int __gpio_get(unsigned gpio); | ||
92 | |||
93 | static inline void gpio_set_value(unsigned gpio, int value) | ||
94 | { | ||
95 | if (__builtin_constant_p(value)) { | ||
96 | struct gpio_controller *__iomem g; | ||
97 | u32 mask; | ||
98 | |||
99 | if (gpio >= DAVINCI_N_GPIO) | ||
100 | __error_inval_gpio(); | ||
101 | |||
102 | g = __gpio_to_controller(gpio); | ||
103 | mask = __gpio_mask(gpio); | ||
104 | if (value) | ||
105 | __raw_writel(mask, &g->set_data); | ||
106 | else | ||
107 | __raw_writel(mask, &g->clr_data); | ||
108 | return; | ||
109 | } | ||
110 | |||
111 | __gpio_set(gpio, value); | ||
112 | } | ||
113 | |||
114 | /* Returns zero or nonzero; works for gpios configured as inputs OR | ||
115 | * as outputs. | ||
116 | * | ||
117 | * NOTE: changes in reported values are synchronized to the GPIO clock. | ||
118 | * This is most easily seen after calling gpio_set_value() and then immediatly | ||
119 | * gpio_get_value(), where the gpio_get_value() would return the old value | ||
120 | * until the GPIO clock ticks and the new value gets latched. | ||
121 | */ | ||
122 | |||
123 | static inline int gpio_get_value(unsigned gpio) | ||
124 | { | ||
125 | struct gpio_controller *__iomem g; | ||
126 | |||
127 | if (!__builtin_constant_p(gpio)) | ||
128 | return __gpio_get(gpio); | ||
129 | |||
130 | if (gpio >= DAVINCI_N_GPIO) | ||
131 | return __error_inval_gpio(); | ||
132 | |||
133 | g = __gpio_to_controller(gpio); | ||
134 | return !!(__gpio_mask(gpio) & __raw_readl(&g->in_data)); | ||
135 | } | ||
136 | |||
137 | /* powerup default direction is IN */ | ||
138 | extern int gpio_direction_input(unsigned gpio); | ||
139 | extern int gpio_direction_output(unsigned gpio, int value); | ||
140 | |||
141 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
142 | |||
143 | extern int gpio_request(unsigned gpio, const char *tag); | ||
144 | extern void gpio_free(unsigned gpio); | ||
145 | |||
146 | static inline int gpio_to_irq(unsigned gpio) | ||
147 | { | ||
148 | return DAVINCI_N_AINTC_IRQ + gpio; | ||
149 | } | ||
150 | |||
151 | static inline int irq_to_gpio(unsigned irq) | ||
152 | { | ||
153 | return irq - DAVINCI_N_AINTC_IRQ; | ||
154 | } | ||
155 | |||
156 | #endif /* __DAVINCI_GPIO_H */ | ||
diff --git a/include/asm-arm/arch-davinci/hardware.h b/include/asm-arm/arch-davinci/hardware.h index 60362d80229e..a2e8969afaca 100644 --- a/include/asm-arm/arch-davinci/hardware.h +++ b/include/asm-arm/arch-davinci/hardware.h | |||
@@ -11,4 +11,42 @@ | |||
11 | #ifndef __ASM_ARCH_HARDWARE_H | 11 | #ifndef __ASM_ARCH_HARDWARE_H |
12 | #define __ASM_ARCH_HARDWARE_H | 12 | #define __ASM_ARCH_HARDWARE_H |
13 | 13 | ||
14 | /* | ||
15 | * Base register addresses | ||
16 | */ | ||
17 | #define DAVINCI_DMA_3PCC_BASE (0x01C00000) | ||
18 | #define DAVINCI_DMA_3PTC0_BASE (0x01C10000) | ||
19 | #define DAVINCI_DMA_3PTC1_BASE (0x01C10400) | ||
20 | #define DAVINCI_I2C_BASE (0x01C21000) | ||
21 | #define DAVINCI_PWM0_BASE (0x01C22000) | ||
22 | #define DAVINCI_PWM1_BASE (0x01C22400) | ||
23 | #define DAVINCI_PWM2_BASE (0x01C22800) | ||
24 | #define DAVINCI_SYSTEM_MODULE_BASE (0x01C40000) | ||
25 | #define DAVINCI_PLL_CNTRL0_BASE (0x01C40800) | ||
26 | #define DAVINCI_PLL_CNTRL1_BASE (0x01C40C00) | ||
27 | #define DAVINCI_PWR_SLEEP_CNTRL_BASE (0x01C41000) | ||
28 | #define DAVINCI_SYSTEM_DFT_BASE (0x01C42000) | ||
29 | #define DAVINCI_IEEE1394_BASE (0x01C60000) | ||
30 | #define DAVINCI_USB_OTG_BASE (0x01C64000) | ||
31 | #define DAVINCI_CFC_ATA_BASE (0x01C66000) | ||
32 | #define DAVINCI_SPI_BASE (0x01C66800) | ||
33 | #define DAVINCI_GPIO_BASE (0x01C67000) | ||
34 | #define DAVINCI_UHPI_BASE (0x01C67800) | ||
35 | #define DAVINCI_VPSS_REGS_BASE (0x01C70000) | ||
36 | #define DAVINCI_EMAC_CNTRL_REGS_BASE (0x01C80000) | ||
37 | #define DAVINCI_EMAC_WRAPPER_CNTRL_REGS_BASE (0x01C81000) | ||
38 | #define DAVINCI_EMAC_WRAPPER_RAM_BASE (0x01C82000) | ||
39 | #define DAVINCI_MDIO_CNTRL_REGS_BASE (0x01C84000) | ||
40 | #define DAVINCI_IMCOP_BASE (0x01CC0000) | ||
41 | #define DAVINCI_ASYNC_EMIF_CNTRL_BASE (0x01E00000) | ||
42 | #define DAVINCI_VLYNQ_BASE (0x01E01000) | ||
43 | #define DAVINCI_MCBSP_BASE (0x01E02000) | ||
44 | #define DAVINCI_MMC_SD_BASE (0x01E10000) | ||
45 | #define DAVINCI_MS_BASE (0x01E20000) | ||
46 | #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE (0x02000000) | ||
47 | #define DAVINCI_ASYNC_EMIF_DATA_CE1_BASE (0x04000000) | ||
48 | #define DAVINCI_ASYNC_EMIF_DATA_CE2_BASE (0x06000000) | ||
49 | #define DAVINCI_ASYNC_EMIF_DATA_CE3_BASE (0x08000000) | ||
50 | #define DAVINCI_VLYNQ_REMOTE_BASE (0x0C000000) | ||
51 | |||
14 | #endif /* __ASM_ARCH_HARDWARE_H */ | 52 | #endif /* __ASM_ARCH_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-davinci/mux.h b/include/asm-arm/arch-davinci/mux.h new file mode 100644 index 000000000000..c24b6782804d --- /dev/null +++ b/include/asm-arm/arch-davinci/mux.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * DaVinci pin multiplexing defines | ||
3 | * | ||
4 | * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MUX_H | ||
12 | #define __ASM_ARCH_MUX_H | ||
13 | |||
14 | #define DAVINCI_MUX_AEAW0 0 | ||
15 | #define DAVINCI_MUX_AEAW1 1 | ||
16 | #define DAVINCI_MUX_AEAW2 2 | ||
17 | #define DAVINCI_MUX_AEAW3 3 | ||
18 | #define DAVINCI_MUX_AEAW4 4 | ||
19 | #define DAVINCI_MUX_AECS4 10 | ||
20 | #define DAVINCI_MUX_AECS5 11 | ||
21 | #define DAVINCI_MUX_VLYNQWD0 12 | ||
22 | #define DAVINCI_MUX_VLYNQWD1 13 | ||
23 | #define DAVINCI_MUX_VLSCREN 14 | ||
24 | #define DAVINCI_MUX_VLYNQEN 15 | ||
25 | #define DAVINCI_MUX_HDIREN 16 | ||
26 | #define DAVINCI_MUX_ATAEN 17 | ||
27 | #define DAVINCI_MUX_RGB666 22 | ||
28 | #define DAVINCI_MUX_RGB888 23 | ||
29 | #define DAVINCI_MUX_LOEEN 24 | ||
30 | #define DAVINCI_MUX_LFLDEN 25 | ||
31 | #define DAVINCI_MUX_CWEN 26 | ||
32 | #define DAVINCI_MUX_CFLDEN 27 | ||
33 | #define DAVINCI_MUX_HPIEN 29 | ||
34 | #define DAVINCI_MUX_1394EN 30 | ||
35 | #define DAVINCI_MUX_EMACEN 31 | ||
36 | |||
37 | #define DAVINCI_MUX_LEVEL2 32 | ||
38 | #define DAVINCI_MUX_UART0 (DAVINCI_MUX_LEVEL2 + 0) | ||
39 | #define DAVINCI_MUX_UART1 (DAVINCI_MUX_LEVEL2 + 1) | ||
40 | #define DAVINCI_MUX_UART2 (DAVINCI_MUX_LEVEL2 + 2) | ||
41 | #define DAVINCI_MUX_U2FLO (DAVINCI_MUX_LEVEL2 + 3) | ||
42 | #define DAVINCI_MUX_PWM0 (DAVINCI_MUX_LEVEL2 + 4) | ||
43 | #define DAVINCI_MUX_PWM1 (DAVINCI_MUX_LEVEL2 + 5) | ||
44 | #define DAVINCI_MUX_PWM2 (DAVINCI_MUX_LEVEL2 + 6) | ||
45 | #define DAVINCI_MUX_I2C (DAVINCI_MUX_LEVEL2 + 7) | ||
46 | #define DAVINCI_MUX_SPI (DAVINCI_MUX_LEVEL2 + 8) | ||
47 | #define DAVINCI_MUX_MSTK (DAVINCI_MUX_LEVEL2 + 9) | ||
48 | #define DAVINCI_MUX_ASP (DAVINCI_MUX_LEVEL2 + 10) | ||
49 | #define DAVINCI_MUX_CLK0 (DAVINCI_MUX_LEVEL2 + 16) | ||
50 | #define DAVINCI_MUX_CLK1 (DAVINCI_MUX_LEVEL2 + 17) | ||
51 | #define DAVINCI_MUX_TIMIN (DAVINCI_MUX_LEVEL2 + 18) | ||
52 | |||
53 | extern void davinci_mux_peripheral(unsigned int mux, unsigned int enable); | ||
54 | |||
55 | #endif /* __ASM_ARCH_MUX_H */ | ||
diff --git a/include/asm-arm/arch-imx/gpio.h b/include/asm-arm/arch-imx/gpio.h new file mode 100644 index 000000000000..486023263f32 --- /dev/null +++ b/include/asm-arm/arch-imx/gpio.h | |||
@@ -0,0 +1,102 @@ | |||
1 | #ifndef _IMX_GPIO_H | ||
2 | |||
3 | #include <asm/arch/imx-regs.h> | ||
4 | |||
5 | #define IMX_GPIO_ALLOC_MODE_NORMAL 0 | ||
6 | #define IMX_GPIO_ALLOC_MODE_NO_ALLOC 1 | ||
7 | #define IMX_GPIO_ALLOC_MODE_TRY_ALLOC 2 | ||
8 | #define IMX_GPIO_ALLOC_MODE_ALLOC_ONLY 4 | ||
9 | #define IMX_GPIO_ALLOC_MODE_RELEASE 8 | ||
10 | |||
11 | extern int imx_gpio_request(unsigned gpio, const char *label); | ||
12 | |||
13 | extern void imx_gpio_free(unsigned gpio); | ||
14 | |||
15 | extern int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
16 | int alloc_mode, const char *label); | ||
17 | |||
18 | extern int imx_gpio_direction_input(unsigned gpio); | ||
19 | |||
20 | extern int imx_gpio_direction_output(unsigned gpio, int value); | ||
21 | |||
22 | extern void __imx_gpio_set_value(unsigned gpio, int value); | ||
23 | |||
24 | static inline int imx_gpio_get_value(unsigned gpio) | ||
25 | { | ||
26 | return SSR(gpio >> GPIO_PORT_SHIFT) & (1 << (gpio & GPIO_PIN_MASK)); | ||
27 | } | ||
28 | |||
29 | static inline void imx_gpio_set_value_inline(unsigned gpio, int value) | ||
30 | { | ||
31 | unsigned long flags; | ||
32 | |||
33 | raw_local_irq_save(flags); | ||
34 | if(value) | ||
35 | DR(gpio >> GPIO_PORT_SHIFT) |= (1 << (gpio & GPIO_PIN_MASK)); | ||
36 | else | ||
37 | DR(gpio >> GPIO_PORT_SHIFT) &= ~(1 << (gpio & GPIO_PIN_MASK)); | ||
38 | raw_local_irq_restore(flags); | ||
39 | } | ||
40 | |||
41 | static inline void imx_gpio_set_value(unsigned gpio, int value) | ||
42 | { | ||
43 | if(__builtin_constant_p(gpio)) | ||
44 | imx_gpio_set_value_inline(gpio, value); | ||
45 | else | ||
46 | __imx_gpio_set_value(gpio, value); | ||
47 | } | ||
48 | |||
49 | extern int imx_gpio_to_irq(unsigned gpio); | ||
50 | |||
51 | extern int imx_irq_to_gpio(unsigned irq); | ||
52 | |||
53 | /*-------------------------------------------------------------------------*/ | ||
54 | |||
55 | /* Wrappers for "new style" GPIO calls. These calls i.MX specific versions | ||
56 | * to allow future extension of GPIO logic. | ||
57 | */ | ||
58 | |||
59 | static inline int gpio_request(unsigned gpio, const char *label) | ||
60 | { | ||
61 | return imx_gpio_request(gpio, label); | ||
62 | } | ||
63 | |||
64 | static inline void gpio_free(unsigned gpio) | ||
65 | { | ||
66 | imx_gpio_free(gpio); | ||
67 | } | ||
68 | |||
69 | static inline int gpio_direction_input(unsigned gpio) | ||
70 | { | ||
71 | return imx_gpio_direction_input(gpio); | ||
72 | } | ||
73 | |||
74 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
75 | { | ||
76 | return imx_gpio_direction_output(gpio, value); | ||
77 | } | ||
78 | |||
79 | static inline int gpio_get_value(unsigned gpio) | ||
80 | { | ||
81 | return imx_gpio_get_value(gpio); | ||
82 | } | ||
83 | |||
84 | static inline void gpio_set_value(unsigned gpio, int value) | ||
85 | { | ||
86 | imx_gpio_set_value(gpio, value); | ||
87 | } | ||
88 | |||
89 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
90 | |||
91 | static inline int gpio_to_irq(unsigned gpio) | ||
92 | { | ||
93 | return imx_gpio_to_irq(gpio); | ||
94 | } | ||
95 | |||
96 | static inline int irq_to_gpio(unsigned irq) | ||
97 | { | ||
98 | return imx_irq_to_gpio(irq); | ||
99 | } | ||
100 | |||
101 | |||
102 | #endif | ||
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h index 30de404c61f5..fb9de2733879 100644 --- a/include/asm-arm/arch-imx/imx-regs.h +++ b/include/asm-arm/arch-imx/imx-regs.h | |||
@@ -77,6 +77,8 @@ | |||
77 | #define SWR(x) __REG2(IMX_GPIO_BASE + 0x3c, ((x) & 3) << 8) | 77 | #define SWR(x) __REG2(IMX_GPIO_BASE + 0x3c, ((x) & 3) << 8) |
78 | #define PUEN(x) __REG2(IMX_GPIO_BASE + 0x40, ((x) & 3) << 8) | 78 | #define PUEN(x) __REG2(IMX_GPIO_BASE + 0x40, ((x) & 3) << 8) |
79 | 79 | ||
80 | #define GPIO_PORT_MAX 3 | ||
81 | |||
80 | #define GPIO_PIN_MASK 0x1f | 82 | #define GPIO_PIN_MASK 0x1f |
81 | #define GPIO_PORT_MASK (0x3 << 5) | 83 | #define GPIO_PORT_MASK (0x3 << 5) |
82 | 84 | ||
diff --git a/include/asm-arm/arch-iop13xx/adma.h b/include/asm-arm/arch-iop13xx/adma.h new file mode 100644 index 000000000000..04006c1c5fd7 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/adma.h | |||
@@ -0,0 +1,544 @@ | |||
1 | /* | ||
2 | * Copyright(c) 2006, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef _ADMA_H | ||
19 | #define _ADMA_H | ||
20 | #include <linux/types.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/hardware/iop_adma.h> | ||
24 | |||
25 | #define ADMA_ACCR(chan) (chan->mmr_base + 0x0) | ||
26 | #define ADMA_ACSR(chan) (chan->mmr_base + 0x4) | ||
27 | #define ADMA_ADAR(chan) (chan->mmr_base + 0x8) | ||
28 | #define ADMA_IIPCR(chan) (chan->mmr_base + 0x18) | ||
29 | #define ADMA_IIPAR(chan) (chan->mmr_base + 0x1c) | ||
30 | #define ADMA_IIPUAR(chan) (chan->mmr_base + 0x20) | ||
31 | #define ADMA_ANDAR(chan) (chan->mmr_base + 0x24) | ||
32 | #define ADMA_ADCR(chan) (chan->mmr_base + 0x28) | ||
33 | #define ADMA_CARMD(chan) (chan->mmr_base + 0x2c) | ||
34 | #define ADMA_ABCR(chan) (chan->mmr_base + 0x30) | ||
35 | #define ADMA_DLADR(chan) (chan->mmr_base + 0x34) | ||
36 | #define ADMA_DUADR(chan) (chan->mmr_base + 0x38) | ||
37 | #define ADMA_SLAR(src, chan) (chan->mmr_base + (0x3c + (src << 3))) | ||
38 | #define ADMA_SUAR(src, chan) (chan->mmr_base + (0x40 + (src << 3))) | ||
39 | |||
40 | struct iop13xx_adma_src { | ||
41 | u32 src_addr; | ||
42 | union { | ||
43 | u32 upper_src_addr; | ||
44 | struct { | ||
45 | unsigned int pq_upper_src_addr:24; | ||
46 | unsigned int pq_dmlt:8; | ||
47 | }; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | struct iop13xx_adma_desc_ctrl { | ||
52 | unsigned int int_en:1; | ||
53 | unsigned int xfer_dir:2; | ||
54 | unsigned int src_select:4; | ||
55 | unsigned int zero_result:1; | ||
56 | unsigned int block_fill_en:1; | ||
57 | unsigned int crc_gen_en:1; | ||
58 | unsigned int crc_xfer_dis:1; | ||
59 | unsigned int crc_seed_fetch_dis:1; | ||
60 | unsigned int status_write_back_en:1; | ||
61 | unsigned int endian_swap_en:1; | ||
62 | unsigned int reserved0:2; | ||
63 | unsigned int pq_update_xfer_en:1; | ||
64 | unsigned int dual_xor_en:1; | ||
65 | unsigned int pq_xfer_en:1; | ||
66 | unsigned int p_xfer_dis:1; | ||
67 | unsigned int reserved1:10; | ||
68 | unsigned int relax_order_en:1; | ||
69 | unsigned int no_snoop_en:1; | ||
70 | }; | ||
71 | |||
72 | struct iop13xx_adma_byte_count { | ||
73 | unsigned int byte_count:24; | ||
74 | unsigned int host_if:3; | ||
75 | unsigned int reserved:2; | ||
76 | unsigned int zero_result_err_q:1; | ||
77 | unsigned int zero_result_err:1; | ||
78 | unsigned int tx_complete:1; | ||
79 | }; | ||
80 | |||
81 | struct iop13xx_adma_desc_hw { | ||
82 | u32 next_desc; | ||
83 | union { | ||
84 | u32 desc_ctrl; | ||
85 | struct iop13xx_adma_desc_ctrl desc_ctrl_field; | ||
86 | }; | ||
87 | union { | ||
88 | u32 crc_addr; | ||
89 | u32 block_fill_data; | ||
90 | u32 q_dest_addr; | ||
91 | }; | ||
92 | union { | ||
93 | u32 byte_count; | ||
94 | struct iop13xx_adma_byte_count byte_count_field; | ||
95 | }; | ||
96 | union { | ||
97 | u32 dest_addr; | ||
98 | u32 p_dest_addr; | ||
99 | }; | ||
100 | union { | ||
101 | u32 upper_dest_addr; | ||
102 | u32 pq_upper_dest_addr; | ||
103 | }; | ||
104 | struct iop13xx_adma_src src[1]; | ||
105 | }; | ||
106 | |||
107 | struct iop13xx_adma_desc_dual_xor { | ||
108 | u32 next_desc; | ||
109 | u32 desc_ctrl; | ||
110 | u32 reserved; | ||
111 | u32 byte_count; | ||
112 | u32 h_dest_addr; | ||
113 | u32 h_upper_dest_addr; | ||
114 | u32 src0_addr; | ||
115 | u32 upper_src0_addr; | ||
116 | u32 src1_addr; | ||
117 | u32 upper_src1_addr; | ||
118 | u32 h_src_addr; | ||
119 | u32 h_upper_src_addr; | ||
120 | u32 d_src_addr; | ||
121 | u32 d_upper_src_addr; | ||
122 | u32 d_dest_addr; | ||
123 | u32 d_upper_dest_addr; | ||
124 | }; | ||
125 | |||
126 | struct iop13xx_adma_desc_pq_update { | ||
127 | u32 next_desc; | ||
128 | u32 desc_ctrl; | ||
129 | u32 reserved; | ||
130 | u32 byte_count; | ||
131 | u32 p_dest_addr; | ||
132 | u32 p_upper_dest_addr; | ||
133 | u32 src0_addr; | ||
134 | u32 upper_src0_addr; | ||
135 | u32 src1_addr; | ||
136 | u32 upper_src1_addr; | ||
137 | u32 p_src_addr; | ||
138 | u32 p_upper_src_addr; | ||
139 | u32 q_src_addr; | ||
140 | struct { | ||
141 | unsigned int q_upper_src_addr:24; | ||
142 | unsigned int q_dmlt:8; | ||
143 | }; | ||
144 | u32 q_dest_addr; | ||
145 | u32 q_upper_dest_addr; | ||
146 | }; | ||
147 | |||
148 | static inline int iop_adma_get_max_xor(void) | ||
149 | { | ||
150 | return 16; | ||
151 | } | ||
152 | |||
153 | static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan) | ||
154 | { | ||
155 | return __raw_readl(ADMA_ADAR(chan)); | ||
156 | } | ||
157 | |||
158 | static inline void iop_chan_set_next_descriptor(struct iop_adma_chan *chan, | ||
159 | u32 next_desc_addr) | ||
160 | { | ||
161 | __raw_writel(next_desc_addr, ADMA_ANDAR(chan)); | ||
162 | } | ||
163 | |||
164 | #define ADMA_STATUS_BUSY (1 << 13) | ||
165 | |||
166 | static inline char iop_chan_is_busy(struct iop_adma_chan *chan) | ||
167 | { | ||
168 | if (__raw_readl(ADMA_ACSR(chan)) & | ||
169 | ADMA_STATUS_BUSY) | ||
170 | return 1; | ||
171 | else | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static inline int | ||
176 | iop_chan_get_desc_align(struct iop_adma_chan *chan, int num_slots) | ||
177 | { | ||
178 | return 1; | ||
179 | } | ||
180 | #define iop_desc_is_aligned(x, y) 1 | ||
181 | |||
182 | static inline int | ||
183 | iop_chan_memcpy_slot_count(size_t len, int *slots_per_op) | ||
184 | { | ||
185 | *slots_per_op = 1; | ||
186 | return 1; | ||
187 | } | ||
188 | |||
189 | #define iop_chan_interrupt_slot_count(s, c) iop_chan_memcpy_slot_count(0, s) | ||
190 | |||
191 | static inline int | ||
192 | iop_chan_memset_slot_count(size_t len, int *slots_per_op) | ||
193 | { | ||
194 | *slots_per_op = 1; | ||
195 | return 1; | ||
196 | } | ||
197 | |||
198 | static inline int | ||
199 | iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op) | ||
200 | { | ||
201 | int num_slots; | ||
202 | /* slots_to_find = 1 for basic descriptor + 1 per 4 sources above 1 | ||
203 | * (1 source => 8 bytes) (1 slot => 32 bytes) | ||
204 | */ | ||
205 | num_slots = 1 + (((src_cnt - 1) << 3) >> 5); | ||
206 | if (((src_cnt - 1) << 3) & 0x1f) | ||
207 | num_slots++; | ||
208 | |||
209 | *slots_per_op = num_slots; | ||
210 | |||
211 | return num_slots; | ||
212 | } | ||
213 | |||
214 | #define ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024) | ||
215 | #define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT | ||
216 | #define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT | ||
217 | #define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT | ||
218 | #define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o) | ||
219 | |||
220 | static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, | ||
221 | struct iop_adma_chan *chan) | ||
222 | { | ||
223 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
224 | return hw_desc->dest_addr; | ||
225 | } | ||
226 | |||
227 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, | ||
228 | struct iop_adma_chan *chan) | ||
229 | { | ||
230 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
231 | return hw_desc->byte_count_field.byte_count; | ||
232 | } | ||
233 | |||
234 | static inline u32 iop_desc_get_src_addr(struct iop_adma_desc_slot *desc, | ||
235 | struct iop_adma_chan *chan, | ||
236 | int src_idx) | ||
237 | { | ||
238 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
239 | return hw_desc->src[src_idx].src_addr; | ||
240 | } | ||
241 | |||
242 | static inline u32 iop_desc_get_src_count(struct iop_adma_desc_slot *desc, | ||
243 | struct iop_adma_chan *chan) | ||
244 | { | ||
245 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
246 | return hw_desc->desc_ctrl_field.src_select + 1; | ||
247 | } | ||
248 | |||
249 | static inline void | ||
250 | iop_desc_init_memcpy(struct iop_adma_desc_slot *desc, int int_en) | ||
251 | { | ||
252 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
253 | union { | ||
254 | u32 value; | ||
255 | struct iop13xx_adma_desc_ctrl field; | ||
256 | } u_desc_ctrl; | ||
257 | |||
258 | u_desc_ctrl.value = 0; | ||
259 | u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */ | ||
260 | u_desc_ctrl.field.int_en = int_en; | ||
261 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
262 | hw_desc->crc_addr = 0; | ||
263 | } | ||
264 | |||
265 | static inline void | ||
266 | iop_desc_init_memset(struct iop_adma_desc_slot *desc, int int_en) | ||
267 | { | ||
268 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
269 | union { | ||
270 | u32 value; | ||
271 | struct iop13xx_adma_desc_ctrl field; | ||
272 | } u_desc_ctrl; | ||
273 | |||
274 | u_desc_ctrl.value = 0; | ||
275 | u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */ | ||
276 | u_desc_ctrl.field.block_fill_en = 1; | ||
277 | u_desc_ctrl.field.int_en = int_en; | ||
278 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
279 | hw_desc->crc_addr = 0; | ||
280 | } | ||
281 | |||
282 | /* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */ | ||
283 | static inline void | ||
284 | iop_desc_init_xor(struct iop_adma_desc_slot *desc, int src_cnt, int int_en) | ||
285 | { | ||
286 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
287 | union { | ||
288 | u32 value; | ||
289 | struct iop13xx_adma_desc_ctrl field; | ||
290 | } u_desc_ctrl; | ||
291 | |||
292 | u_desc_ctrl.value = 0; | ||
293 | u_desc_ctrl.field.src_select = src_cnt - 1; | ||
294 | u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */ | ||
295 | u_desc_ctrl.field.int_en = int_en; | ||
296 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
297 | hw_desc->crc_addr = 0; | ||
298 | |||
299 | } | ||
300 | #define iop_desc_init_null_xor(d, s, i) iop_desc_init_xor(d, s, i) | ||
301 | |||
302 | /* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */ | ||
303 | static inline int | ||
304 | iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt, int int_en) | ||
305 | { | ||
306 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
307 | union { | ||
308 | u32 value; | ||
309 | struct iop13xx_adma_desc_ctrl field; | ||
310 | } u_desc_ctrl; | ||
311 | |||
312 | u_desc_ctrl.value = 0; | ||
313 | u_desc_ctrl.field.src_select = src_cnt - 1; | ||
314 | u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */ | ||
315 | u_desc_ctrl.field.zero_result = 1; | ||
316 | u_desc_ctrl.field.status_write_back_en = 1; | ||
317 | u_desc_ctrl.field.int_en = int_en; | ||
318 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
319 | hw_desc->crc_addr = 0; | ||
320 | |||
321 | return 1; | ||
322 | } | ||
323 | |||
324 | static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc, | ||
325 | struct iop_adma_chan *chan, | ||
326 | u32 byte_count) | ||
327 | { | ||
328 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
329 | hw_desc->byte_count = byte_count; | ||
330 | } | ||
331 | |||
332 | static inline void | ||
333 | iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len) | ||
334 | { | ||
335 | int slots_per_op = desc->slots_per_op; | ||
336 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter; | ||
337 | int i = 0; | ||
338 | |||
339 | if (len <= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) { | ||
340 | hw_desc->byte_count = len; | ||
341 | } else { | ||
342 | do { | ||
343 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
344 | iter->byte_count = IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
345 | len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
346 | i += slots_per_op; | ||
347 | } while (len > IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT); | ||
348 | |||
349 | if (len) { | ||
350 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
351 | iter->byte_count = len; | ||
352 | } | ||
353 | } | ||
354 | } | ||
355 | |||
356 | |||
357 | static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc, | ||
358 | struct iop_adma_chan *chan, | ||
359 | dma_addr_t addr) | ||
360 | { | ||
361 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
362 | hw_desc->dest_addr = addr; | ||
363 | hw_desc->upper_dest_addr = 0; | ||
364 | } | ||
365 | |||
366 | static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc, | ||
367 | dma_addr_t addr) | ||
368 | { | ||
369 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
370 | hw_desc->src[0].src_addr = addr; | ||
371 | hw_desc->src[0].upper_src_addr = 0; | ||
372 | } | ||
373 | |||
374 | static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc, | ||
375 | int src_idx, dma_addr_t addr) | ||
376 | { | ||
377 | int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op; | ||
378 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter; | ||
379 | int i = 0; | ||
380 | |||
381 | do { | ||
382 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
383 | iter->src[src_idx].src_addr = addr; | ||
384 | iter->src[src_idx].upper_src_addr = 0; | ||
385 | slot_cnt -= slots_per_op; | ||
386 | if (slot_cnt) { | ||
387 | i += slots_per_op; | ||
388 | addr += IOP_ADMA_XOR_MAX_BYTE_COUNT; | ||
389 | } | ||
390 | } while (slot_cnt); | ||
391 | } | ||
392 | |||
393 | static inline void | ||
394 | iop_desc_init_interrupt(struct iop_adma_desc_slot *desc, | ||
395 | struct iop_adma_chan *chan) | ||
396 | { | ||
397 | iop_desc_init_memcpy(desc, 1); | ||
398 | iop_desc_set_byte_count(desc, chan, 0); | ||
399 | iop_desc_set_dest_addr(desc, chan, 0); | ||
400 | iop_desc_set_memcpy_src_addr(desc, 0); | ||
401 | } | ||
402 | |||
403 | #define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr | ||
404 | |||
405 | static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc, | ||
406 | u32 next_desc_addr) | ||
407 | { | ||
408 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
409 | BUG_ON(hw_desc->next_desc); | ||
410 | hw_desc->next_desc = next_desc_addr; | ||
411 | } | ||
412 | |||
413 | static inline u32 iop_desc_get_next_desc(struct iop_adma_desc_slot *desc) | ||
414 | { | ||
415 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
416 | return hw_desc->next_desc; | ||
417 | } | ||
418 | |||
419 | static inline void iop_desc_clear_next_desc(struct iop_adma_desc_slot *desc) | ||
420 | { | ||
421 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
422 | hw_desc->next_desc = 0; | ||
423 | } | ||
424 | |||
425 | static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc, | ||
426 | u32 val) | ||
427 | { | ||
428 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
429 | hw_desc->block_fill_data = val; | ||
430 | } | ||
431 | |||
432 | static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | ||
433 | { | ||
434 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
435 | struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; | ||
436 | struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field; | ||
437 | |||
438 | BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result)); | ||
439 | |||
440 | if (desc_ctrl.pq_xfer_en) | ||
441 | return byte_count.zero_result_err_q; | ||
442 | else | ||
443 | return byte_count.zero_result_err; | ||
444 | } | ||
445 | |||
446 | static inline void iop_chan_append(struct iop_adma_chan *chan) | ||
447 | { | ||
448 | u32 adma_accr; | ||
449 | |||
450 | adma_accr = __raw_readl(ADMA_ACCR(chan)); | ||
451 | adma_accr |= 0x2; | ||
452 | __raw_writel(adma_accr, ADMA_ACCR(chan)); | ||
453 | } | ||
454 | |||
455 | static inline void iop_chan_idle(int busy, struct iop_adma_chan *chan) | ||
456 | { | ||
457 | do { } while (0); | ||
458 | } | ||
459 | |||
460 | static inline u32 iop_chan_get_status(struct iop_adma_chan *chan) | ||
461 | { | ||
462 | return __raw_readl(ADMA_ACSR(chan)); | ||
463 | } | ||
464 | |||
465 | static inline void iop_chan_disable(struct iop_adma_chan *chan) | ||
466 | { | ||
467 | u32 adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan)); | ||
468 | adma_chan_ctrl &= ~0x1; | ||
469 | __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan)); | ||
470 | } | ||
471 | |||
472 | static inline void iop_chan_enable(struct iop_adma_chan *chan) | ||
473 | { | ||
474 | u32 adma_chan_ctrl; | ||
475 | |||
476 | adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan)); | ||
477 | adma_chan_ctrl |= 0x1; | ||
478 | __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan)); | ||
479 | } | ||
480 | |||
481 | static inline void iop_adma_device_clear_eot_status(struct iop_adma_chan *chan) | ||
482 | { | ||
483 | u32 status = __raw_readl(ADMA_ACSR(chan)); | ||
484 | status &= (1 << 12); | ||
485 | __raw_writel(status, ADMA_ACSR(chan)); | ||
486 | } | ||
487 | |||
488 | static inline void iop_adma_device_clear_eoc_status(struct iop_adma_chan *chan) | ||
489 | { | ||
490 | u32 status = __raw_readl(ADMA_ACSR(chan)); | ||
491 | status &= (1 << 11); | ||
492 | __raw_writel(status, ADMA_ACSR(chan)); | ||
493 | } | ||
494 | |||
495 | static inline void iop_adma_device_clear_err_status(struct iop_adma_chan *chan) | ||
496 | { | ||
497 | u32 status = __raw_readl(ADMA_ACSR(chan)); | ||
498 | status &= (1 << 9) | (1 << 5) | (1 << 4) | (1 << 3); | ||
499 | __raw_writel(status, ADMA_ACSR(chan)); | ||
500 | } | ||
501 | |||
502 | static inline int | ||
503 | iop_is_err_int_parity(unsigned long status, struct iop_adma_chan *chan) | ||
504 | { | ||
505 | return test_bit(9, &status); | ||
506 | } | ||
507 | |||
508 | static inline int | ||
509 | iop_is_err_mcu_abort(unsigned long status, struct iop_adma_chan *chan) | ||
510 | { | ||
511 | return test_bit(5, &status); | ||
512 | } | ||
513 | |||
514 | static inline int | ||
515 | iop_is_err_int_tabort(unsigned long status, struct iop_adma_chan *chan) | ||
516 | { | ||
517 | return test_bit(4, &status); | ||
518 | } | ||
519 | |||
520 | static inline int | ||
521 | iop_is_err_int_mabort(unsigned long status, struct iop_adma_chan *chan) | ||
522 | { | ||
523 | return test_bit(3, &status); | ||
524 | } | ||
525 | |||
526 | static inline int | ||
527 | iop_is_err_pci_tabort(unsigned long status, struct iop_adma_chan *chan) | ||
528 | { | ||
529 | return 0; | ||
530 | } | ||
531 | |||
532 | static inline int | ||
533 | iop_is_err_pci_mabort(unsigned long status, struct iop_adma_chan *chan) | ||
534 | { | ||
535 | return 0; | ||
536 | } | ||
537 | |||
538 | static inline int | ||
539 | iop_is_err_split_tx(unsigned long status, struct iop_adma_chan *chan) | ||
540 | { | ||
541 | return 0; | ||
542 | } | ||
543 | |||
544 | #endif /* _ADMA_H */ | ||
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h index e6736c3d1f7f..d4e4f828577c 100644 --- a/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -166,12 +166,22 @@ static inline int iop13xx_cpu_id(void) | |||
166 | #define IOP13XX_INIT_I2C_1 (1 << 1) | 166 | #define IOP13XX_INIT_I2C_1 (1 << 1) |
167 | #define IOP13XX_INIT_I2C_2 (1 << 2) | 167 | #define IOP13XX_INIT_I2C_2 (1 << 2) |
168 | 168 | ||
169 | #define IQ81340_NUM_UART 2 | 169 | /* ADMA selection flags */ |
170 | #define IQ81340_NUM_I2C 3 | 170 | /* INIT_ADMA_DEFAULT = Rely on CONFIG_IOP13XX_ADMA* */ |
171 | #define IQ81340_NUM_PHYS_MAP_FLASH 1 | 171 | #define IOP13XX_INIT_ADMA_DEFAULT (0) |
172 | #define IQ81340_MAX_PLAT_DEVICES (IQ81340_NUM_UART +\ | 172 | #define IOP13XX_INIT_ADMA_0 (1 << 0) |
173 | IQ81340_NUM_I2C +\ | 173 | #define IOP13XX_INIT_ADMA_1 (1 << 1) |
174 | IQ81340_NUM_PHYS_MAP_FLASH) | 174 | #define IOP13XX_INIT_ADMA_2 (1 << 2) |
175 | |||
176 | /* Platform devices */ | ||
177 | #define IQ81340_NUM_UART 2 | ||
178 | #define IQ81340_NUM_I2C 3 | ||
179 | #define IQ81340_NUM_PHYS_MAP_FLASH 1 | ||
180 | #define IQ81340_NUM_ADMA 3 | ||
181 | #define IQ81340_MAX_PLAT_DEVICES (IQ81340_NUM_UART + \ | ||
182 | IQ81340_NUM_I2C + \ | ||
183 | IQ81340_NUM_PHYS_MAP_FLASH + \ | ||
184 | IQ81340_NUM_ADMA) | ||
175 | 185 | ||
176 | /*========================== PMMR offsets for key registers ============*/ | 186 | /*========================== PMMR offsets for key registers ============*/ |
177 | #define IOP13XX_ATU0_PMMR_OFFSET 0x00048000 | 187 | #define IOP13XX_ATU0_PMMR_OFFSET 0x00048000 |
@@ -444,22 +454,6 @@ static inline int iop13xx_cpu_id(void) | |||
444 | /*==============================ADMA UNITS===============================*/ | 454 | /*==============================ADMA UNITS===============================*/ |
445 | #define IOP13XX_ADMA_PHYS_BASE(chan) IOP13XX_REG_ADDR32_PHYS((chan << 9)) | 455 | #define IOP13XX_ADMA_PHYS_BASE(chan) IOP13XX_REG_ADDR32_PHYS((chan << 9)) |
446 | #define IOP13XX_ADMA_UPPER_PA(chan) (IOP13XX_ADMA_PHYS_BASE(chan) + 0xc0) | 456 | #define IOP13XX_ADMA_UPPER_PA(chan) (IOP13XX_ADMA_PHYS_BASE(chan) + 0xc0) |
447 | #define IOP13XX_ADMA_OFFSET(chan, ofs) IOP13XX_REG_ADDR32((chan << 9) + (ofs)) | ||
448 | |||
449 | #define IOP13XX_ADMA_ACCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x0) | ||
450 | #define IOP13XX_ADMA_ACSR(chan) IOP13XX_ADMA_OFFSET(chan, 0x4) | ||
451 | #define IOP13XX_ADMA_ADAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x8) | ||
452 | #define IOP13XX_ADMA_IIPCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x18) | ||
453 | #define IOP13XX_ADMA_IIPAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x1c) | ||
454 | #define IOP13XX_ADMA_IIPUAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x20) | ||
455 | #define IOP13XX_ADMA_ANDAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x24) | ||
456 | #define IOP13XX_ADMA_ADCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x28) | ||
457 | #define IOP13XX_ADMA_CARMD(chan) IOP13XX_ADMA_OFFSET(chan, 0x2c) | ||
458 | #define IOP13XX_ADMA_ABCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x30) | ||
459 | #define IOP13XX_ADMA_DLADR(chan) IOP13XX_ADMA_OFFSET(chan, 0x34) | ||
460 | #define IOP13XX_ADMA_DUADR(chan) IOP13XX_ADMA_OFFSET(chan, 0x38) | ||
461 | #define IOP13XX_ADMA_SLAR(src, chan) IOP13XX_ADMA_OFFSET(chan, 0x3c + (src <<3)) | ||
462 | #define IOP13XX_ADMA_SUAR(src, chan) IOP13XX_ADMA_OFFSET(chan, 0x40 + (src <<3)) | ||
463 | 457 | ||
464 | /*==============================XSI BRIDGE===============================*/ | 458 | /*==============================XSI BRIDGE===============================*/ |
465 | #define IOP13XX_XBG_BECSR IOP13XX_REG_ADDR32(0x178c) | 459 | #define IOP13XX_XBG_BECSR IOP13XX_REG_ADDR32(0x178c) |
diff --git a/include/asm-arm/arch-iop32x/adma.h b/include/asm-arm/arch-iop32x/adma.h new file mode 100644 index 000000000000..5ed92037dd10 --- /dev/null +++ b/include/asm-arm/arch-iop32x/adma.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #ifndef IOP32X_ADMA_H | ||
2 | #define IOP32X_ADMA_H | ||
3 | #include <asm/hardware/iop3xx-adma.h> | ||
4 | #endif | ||
5 | |||
diff --git a/include/asm-arm/arch-iop33x/adma.h b/include/asm-arm/arch-iop33x/adma.h new file mode 100644 index 000000000000..4b92f795f90e --- /dev/null +++ b/include/asm-arm/arch-iop33x/adma.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #ifndef IOP33X_ADMA_H | ||
2 | #define IOP33X_ADMA_H | ||
3 | #include <asm/hardware/iop3xx-adma.h> | ||
4 | #endif | ||
5 | |||
diff --git a/include/asm-arm/arch-ixp4xx/ixdp425.h b/include/asm-arm/arch-ixp4xx/ixdp425.h index 3d3820d7ba09..e0791af3bfea 100644 --- a/include/asm-arm/arch-ixp4xx/ixdp425.h +++ b/include/asm-arm/arch-ixp4xx/ixdp425.h | |||
@@ -32,4 +32,8 @@ | |||
32 | #define IXDP425_PCI_INTC_PIN 9 | 32 | #define IXDP425_PCI_INTC_PIN 9 |
33 | #define IXDP425_PCI_INTD_PIN 8 | 33 | #define IXDP425_PCI_INTD_PIN 8 |
34 | 34 | ||
35 | /* NAND Flash pins */ | ||
36 | #define IXDP425_NAND_NCE_PIN 12 | ||
35 | 37 | ||
38 | #define IXDP425_NAND_CMD_BYTE 0x01 | ||
39 | #define IXDP425_NAND_ADDR_BYTE 0x02 | ||
diff --git a/include/asm-arm/arch-ixp4xx/udc.h b/include/asm-arm/arch-ixp4xx/udc.h index 79b850a3be47..dbdec36ff0d1 100644 --- a/include/asm-arm/arch-ixp4xx/udc.h +++ b/include/asm-arm/arch-ixp4xx/udc.h | |||
@@ -6,25 +6,3 @@ | |||
6 | 6 | ||
7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); | 7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); |
8 | 8 | ||
9 | static inline int udc_gpio_to_irq(unsigned gpio) | ||
10 | { | ||
11 | return 0; | ||
12 | } | ||
13 | |||
14 | static inline void udc_gpio_init_vbus(unsigned gpio) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | static inline void udc_gpio_init_pullup(unsigned gpio) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | static inline int udc_gpio_get(unsigned gpio) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | static inline void udc_gpio_set(unsigned gpio, int is_on) | ||
28 | { | ||
29 | } | ||
30 | |||
diff --git a/include/asm-arm/arch-ixp4xx/uncompress.h b/include/asm-arm/arch-ixp4xx/uncompress.h index 09ae6c91be60..f7a35b78823f 100644 --- a/include/asm-arm/arch-ixp4xx/uncompress.h +++ b/include/asm-arm/arch-ixp4xx/uncompress.h | |||
@@ -38,9 +38,10 @@ static void flush(void) | |||
38 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | 38 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) |
39 | { | 39 | { |
40 | /* | 40 | /* |
41 | * Coyote and gtwx5715 only have UART2 connected | 41 | * Some boards are using UART2 as console |
42 | */ | 42 | */ |
43 | if (machine_is_adi_coyote() || machine_is_gtwx5715()) | 43 | if (machine_is_adi_coyote() || machine_is_gtwx5715() || |
44 | machine_is_gateway7001() || machine_is_wg302v2()) | ||
44 | uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; | 45 | uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; |
45 | else | 46 | else |
46 | uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; | 47 | uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; |
diff --git a/include/asm-arm/arch-ks8695/gpio.h b/include/asm-arm/arch-ks8695/gpio.h new file mode 100644 index 000000000000..65ceea28607b --- /dev/null +++ b/include/asm-arm/arch-ks8695/gpio.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ks8695/gpio.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Andrew Victor | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_GPIO_H_ | ||
12 | #define __ASM_ARCH_GPIO_H_ | ||
13 | |||
14 | #define KS8695_GPIO_0 0 | ||
15 | #define KS8695_GPIO_1 1 | ||
16 | #define KS8695_GPIO_2 2 | ||
17 | #define KS8695_GPIO_3 3 | ||
18 | #define KS8695_GPIO_4 4 | ||
19 | #define KS8695_GPIO_5 5 | ||
20 | #define KS8695_GPIO_6 6 | ||
21 | #define KS8695_GPIO_7 7 | ||
22 | #define KS8695_GPIO_8 8 | ||
23 | #define KS8695_GPIO_9 9 | ||
24 | #define KS8695_GPIO_10 10 | ||
25 | #define KS8695_GPIO_11 11 | ||
26 | #define KS8695_GPIO_12 12 | ||
27 | #define KS8695_GPIO_13 13 | ||
28 | #define KS8695_GPIO_14 14 | ||
29 | #define KS8695_GPIO_15 15 | ||
30 | |||
31 | |||
32 | /* | ||
33 | * Configure GPIO pin as external interrupt source. | ||
34 | */ | ||
35 | int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | ||
36 | |||
37 | /* | ||
38 | * Configure the GPIO line as an input. | ||
39 | */ | ||
40 | int __init_or_module gpio_direction_input(unsigned int pin); | ||
41 | |||
42 | /* | ||
43 | * Configure the GPIO line as an output, with default state. | ||
44 | */ | ||
45 | int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state); | ||
46 | |||
47 | /* | ||
48 | * Set the state of an output GPIO line. | ||
49 | */ | ||
50 | void gpio_set_value(unsigned int pin, unsigned int state); | ||
51 | |||
52 | /* | ||
53 | * Read the state of a GPIO line. | ||
54 | */ | ||
55 | int gpio_get_value(unsigned int pin); | ||
56 | |||
57 | /* | ||
58 | * Map GPIO line to IRQ number. | ||
59 | */ | ||
60 | int gpio_to_irq(unsigned int pin); | ||
61 | |||
62 | /* | ||
63 | * Map IRQ number to GPIO line. | ||
64 | */ | ||
65 | int irq_to_gpio(unsigned int irq); | ||
66 | |||
67 | |||
68 | #include <asm-generic/gpio.h> | ||
69 | |||
70 | static inline int gpio_request(unsigned int pin, const char *label) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static inline void gpio_free(unsigned int pin) | ||
76 | { | ||
77 | } | ||
78 | |||
79 | #endif | ||
diff --git a/include/asm-arm/arch-pxa/dma.h b/include/asm-arm/arch-pxa/dma.h index bed042d71d68..3280ee2ddfa5 100644 --- a/include/asm-arm/arch-pxa/dma.h +++ b/include/asm-arm/arch-pxa/dma.h | |||
@@ -30,30 +30,12 @@ typedef enum { | |||
30 | DMA_PRIO_LOW = 2 | 30 | DMA_PRIO_LOW = 2 |
31 | } pxa_dma_prio; | 31 | } pxa_dma_prio; |
32 | 32 | ||
33 | #if defined(CONFIG_PXA27x) | ||
34 | |||
35 | #define PXA_DMA_CHANNELS 32 | ||
36 | |||
37 | #define pxa_for_each_dma_prio(ch, prio) \ | ||
38 | for ( \ | ||
39 | ch = prio * 4; \ | ||
40 | ch != (4 << prio) + 16; \ | ||
41 | ch = (ch + 1 == (4 << prio)) ? (prio * 4 + 16) : (ch + 1) \ | ||
42 | ) | ||
43 | |||
44 | #elif defined(CONFIG_PXA25x) | ||
45 | |||
46 | #define PXA_DMA_CHANNELS 16 | ||
47 | |||
48 | #define pxa_for_each_dma_prio(ch, prio) \ | ||
49 | for (ch = prio * 4; ch != (4 << prio); ch++) | ||
50 | |||
51 | #endif | ||
52 | |||
53 | /* | 33 | /* |
54 | * DMA registration | 34 | * DMA registration |
55 | */ | 35 | */ |
56 | 36 | ||
37 | int __init pxa_init_dma(int num_ch); | ||
38 | |||
57 | int pxa_request_dma (char *name, | 39 | int pxa_request_dma (char *name, |
58 | pxa_dma_prio prio, | 40 | pxa_dma_prio prio, |
59 | void (*irq_handler)(int, void *), | 41 | void (*irq_handler)(int, void *), |
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S index 1d5fbb9b379a..b7e730851461 100644 --- a/include/asm-arm/arch-pxa/entry-macro.S +++ b/include/asm-arm/arch-pxa/entry-macro.S | |||
@@ -20,20 +20,38 @@ | |||
20 | .endm | 20 | .endm |
21 | 21 | ||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
23 | #ifdef CONFIG_PXA27x | 23 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID |
24 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP | 24 | mov \tmp, \tmp, lsr #13 |
25 | mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR | 25 | and \tmp, \tmp, #0x7 @ Core G |
26 | #else | 26 | cmp \tmp, #1 |
27 | bhi 1004f | ||
28 | |||
27 | mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 | 29 | mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 |
28 | add \base, \base, #0x00d00000 | 30 | add \base, \base, #0x00d00000 |
29 | ldr \irqstat, [\base, #0] @ ICIP | 31 | ldr \irqstat, [\base, #0] @ ICIP |
30 | ldr \irqnr, [\base, #4] @ ICMR | 32 | ldr \irqnr, [\base, #4] @ ICMR |
31 | #endif | 33 | b 1002f |
34 | |||
35 | 1004: | ||
36 | mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2 | ||
37 | mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2 | ||
38 | ands \irqstat, \irqstat, \irqnr | ||
39 | beq 1003f | ||
40 | rsb \irqstat, \irqnr, #0 | ||
41 | and \irqstat, \irqstat, \irqnr | ||
42 | clz \irqnr, \irqstat | ||
43 | rsb \irqnr, \irqnr, #31 | ||
44 | add \irqnr, \irqnr, #32 | ||
45 | b 1001f | ||
46 | 1003: | ||
47 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP | ||
48 | mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR | ||
49 | 1002: | ||
32 | ands \irqnr, \irqstat, \irqnr | 50 | ands \irqnr, \irqstat, \irqnr |
33 | beq 1001f | 51 | beq 1001f |
34 | rsb \irqstat, \irqnr, #0 | 52 | rsb \irqstat, \irqnr, #0 |
35 | and \irqstat, \irqstat, \irqnr | 53 | and \irqstat, \irqstat, \irqnr |
36 | clz \irqnr, \irqstat | 54 | clz \irqnr, \irqstat |
37 | rsb \irqnr, \irqnr, #(31 - PXA_IRQ_SKIP) | 55 | rsb \irqnr, \irqnr, #31 |
38 | 1001: | 56 | 1001: |
39 | .endm | 57 | .endm |
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index e2bdc2fbede1..386121746417 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -62,6 +62,42 @@ | |||
62 | 62 | ||
63 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
64 | 64 | ||
65 | #define __cpu_is_pxa21x(id) \ | ||
66 | ({ \ | ||
67 | unsigned int _id = (id) >> 4 & 0xf3f; \ | ||
68 | _id == 0x212; \ | ||
69 | }) | ||
70 | |||
71 | #define __cpu_is_pxa25x(id) \ | ||
72 | ({ \ | ||
73 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
74 | _id == 0x2d0 || _id == 0x290; \ | ||
75 | }) | ||
76 | |||
77 | #define __cpu_is_pxa27x(id) \ | ||
78 | ({ \ | ||
79 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
80 | _id == 0x411; \ | ||
81 | }) | ||
82 | |||
83 | #define cpu_is_pxa21x() \ | ||
84 | ({ \ | ||
85 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
86 | __cpu_is_pxa21x(id); \ | ||
87 | }) | ||
88 | |||
89 | #define cpu_is_pxa25x() \ | ||
90 | ({ \ | ||
91 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
92 | __cpu_is_pxa25x(id); \ | ||
93 | }) | ||
94 | |||
95 | #define cpu_is_pxa27x() \ | ||
96 | ({ \ | ||
97 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
98 | __cpu_is_pxa27x(id); \ | ||
99 | }) | ||
100 | |||
65 | /* | 101 | /* |
66 | * Handy routine to set GPIO alternate functions | 102 | * Handy routine to set GPIO alternate functions |
67 | */ | 103 | */ |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index 67ed43674c63..a07fe0f928cd 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -11,14 +11,9 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | 13 | ||
14 | #ifdef CONFIG_PXA27x | 14 | #define PXA_IRQ(x) (x) |
15 | #define PXA_IRQ_SKIP 0 | ||
16 | #else | ||
17 | #define PXA_IRQ_SKIP 7 | ||
18 | #endif | ||
19 | |||
20 | #define PXA_IRQ(x) ((x) - PXA_IRQ_SKIP) | ||
21 | 15 | ||
16 | #ifdef CONFIG_PXA27x | ||
22 | #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ | 17 | #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ |
23 | #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */ | 18 | #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */ |
24 | #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */ | 19 | #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */ |
@@ -26,6 +21,8 @@ | |||
26 | #define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */ | 21 | #define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */ |
27 | #define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */ | 22 | #define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */ |
28 | #define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */ | 23 | #define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */ |
24 | #endif | ||
25 | |||
29 | #define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */ | 26 | #define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */ |
30 | #define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */ | 27 | #define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */ |
31 | #define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */ | 28 | #define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */ |
@@ -58,18 +55,15 @@ | |||
58 | #ifdef CONFIG_PXA27x | 55 | #ifdef CONFIG_PXA27x |
59 | #define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */ | 56 | #define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */ |
60 | #define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */ | 57 | #define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */ |
61 | |||
62 | #define PXA_INTERNAL_IRQS 34 | ||
63 | #else | ||
64 | #define PXA_INTERNAL_IRQS 32 | ||
65 | #endif | 58 | #endif |
66 | 59 | ||
67 | #define GPIO_2_x_TO_IRQ(x) \ | 60 | #define PXA_GPIO_IRQ_BASE (64) |
68 | PXA_IRQ((x) - 2 + PXA_INTERNAL_IRQS) | 61 | #define PXA_GPIO_IRQ_NUM (128) |
62 | |||
63 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | ||
69 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) | 64 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) |
70 | 65 | ||
71 | #define IRQ_TO_GPIO_2_x(i) \ | 66 | #define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE) |
72 | ((i) - IRQ_GPIO(2) + 2) | ||
73 | #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) | 67 | #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) |
74 | 68 | ||
75 | #if defined(CONFIG_PXA25x) | 69 | #if defined(CONFIG_PXA25x) |
@@ -84,7 +78,7 @@ | |||
84 | * these. If you need more, increase IRQ_BOARD_END, but keep it | 78 | * these. If you need more, increase IRQ_BOARD_END, but keep it |
85 | * within sensible limits. | 79 | * within sensible limits. |
86 | */ | 80 | */ |
87 | #define IRQ_BOARD_START (IRQ_GPIO(PXA_LAST_GPIO) + 1) | 81 | #define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM) |
88 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) | 82 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) |
89 | 83 | ||
90 | #define IRQ_SA1111_START (IRQ_BOARD_END) | 84 | #define IRQ_SA1111_START (IRQ_BOARD_END) |
diff --git a/include/asm-arm/arch-pxa/pm.h b/include/asm-arm/arch-pxa/pm.h index 7a8a1cdf430d..52243a62c4e7 100644 --- a/include/asm-arm/arch-pxa/pm.h +++ b/include/asm-arm/arch-pxa/pm.h | |||
@@ -9,4 +9,3 @@ | |||
9 | 9 | ||
10 | extern int pxa_pm_prepare(suspend_state_t state); | 10 | extern int pxa_pm_prepare(suspend_state_t state); |
11 | extern int pxa_pm_enter(suspend_state_t state); | 11 | extern int pxa_pm_enter(suspend_state_t state); |
12 | extern int pxa_pm_finish(suspend_state_t state); | ||
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index dbcc9298b0c8..e68b593d69da 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1765,29 +1765,9 @@ | |||
1765 | #define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL)) | 1765 | #define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL)) |
1766 | 1766 | ||
1767 | /* | 1767 | /* |
1768 | * MultiMediaCard (MMC) controller | 1768 | * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h |
1769 | */ | 1769 | */ |
1770 | 1770 | ||
1771 | #define MMC_STRPCL __REG(0x41100000) /* Control to start and stop MMC clock */ | ||
1772 | #define MMC_STAT __REG(0x41100004) /* MMC Status Register (read only) */ | ||
1773 | #define MMC_CLKRT __REG(0x41100008) /* MMC clock rate */ | ||
1774 | #define MMC_SPI __REG(0x4110000c) /* SPI mode control bits */ | ||
1775 | #define MMC_CMDAT __REG(0x41100010) /* Command/response/data sequence control */ | ||
1776 | #define MMC_RESTO __REG(0x41100014) /* Expected response time out */ | ||
1777 | #define MMC_RDTO __REG(0x41100018) /* Expected data read time out */ | ||
1778 | #define MMC_BLKLEN __REG(0x4110001c) /* Block length of data transaction */ | ||
1779 | #define MMC_NOB __REG(0x41100020) /* Number of blocks, for block mode */ | ||
1780 | #define MMC_PRTBUF __REG(0x41100024) /* Partial MMC_TXFIFO FIFO written */ | ||
1781 | #define MMC_I_MASK __REG(0x41100028) /* Interrupt Mask */ | ||
1782 | #define MMC_I_REG __REG(0x4110002c) /* Interrupt Register (read only) */ | ||
1783 | #define MMC_CMD __REG(0x41100030) /* Index of current command */ | ||
1784 | #define MMC_ARGH __REG(0x41100034) /* MSW part of the current command argument */ | ||
1785 | #define MMC_ARGL __REG(0x41100038) /* LSW part of the current command argument */ | ||
1786 | #define MMC_RES __REG(0x4110003c) /* Response FIFO (read only) */ | ||
1787 | #define MMC_RXFIFO __REG(0x41100040) /* Receive FIFO (read only) */ | ||
1788 | #define MMC_TXFIFO __REG(0x41100044) /* Transmit FIFO (write only) */ | ||
1789 | |||
1790 | |||
1791 | /* | 1771 | /* |
1792 | * Core Clock | 1772 | * Core Clock |
1793 | */ | 1773 | */ |
diff --git a/include/asm-arm/arch-pxa/udc.h b/include/asm-arm/arch-pxa/udc.h index 8bc6f9c3e3ea..27aa3a91012f 100644 --- a/include/asm-arm/arch-pxa/udc.h +++ b/include/asm-arm/arch-pxa/udc.h | |||
@@ -1,41 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-pxa/udc.h | 2 | * linux/include/asm-arm/arch-pxa/udc.h |
3 | * | 3 | * |
4 | * This supports machine-specific differences in how the PXA2xx | ||
5 | * USB Device Controller (UDC) is wired. | ||
6 | * | ||
7 | */ | 4 | */ |
8 | #include <asm/mach/udc_pxa2xx.h> | 5 | #include <asm/mach/udc_pxa2xx.h> |
9 | 6 | ||
10 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); | 7 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); |
11 | 8 | ||
12 | static inline int udc_gpio_to_irq(unsigned gpio) | ||
13 | { | ||
14 | return IRQ_GPIO(gpio & GPIO_MD_MASK_NR); | ||
15 | } | ||
16 | |||
17 | static inline void udc_gpio_init_vbus(unsigned gpio) | ||
18 | { | ||
19 | pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_IN); | ||
20 | } | ||
21 | |||
22 | static inline void udc_gpio_init_pullup(unsigned gpio) | ||
23 | { | ||
24 | pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_OUT | GPIO_DFLT_LOW); | ||
25 | } | ||
26 | |||
27 | static inline int udc_gpio_get(unsigned gpio) | ||
28 | { | ||
29 | return (GPLR(gpio) & GPIO_bit(gpio)) != 0; | ||
30 | } | ||
31 | |||
32 | static inline void udc_gpio_set(unsigned gpio, int is_on) | ||
33 | { | ||
34 | int mask = GPIO_bit(gpio); | ||
35 | |||
36 | if (is_on) | ||
37 | GPSR(gpio) = mask; | ||
38 | else | ||
39 | GPCR(gpio) = mask; | ||
40 | } | ||
41 | |||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 3679a8a8922e..d7a777f05088 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
9 | #include <asm/user.h> | 9 | #include <asm/user.h> |
10 | #include <asm/hwcap.h> | ||
10 | 11 | ||
11 | typedef unsigned long elf_greg_t; | 12 | typedef unsigned long elf_greg_t; |
12 | typedef unsigned long elf_freg_t[3]; | 13 | typedef unsigned long elf_freg_t[3]; |
@@ -39,31 +40,9 @@ typedef struct user_fp elf_fpregset_t; | |||
39 | #endif | 40 | #endif |
40 | #define ELF_ARCH EM_ARM | 41 | #define ELF_ARCH EM_ARM |
41 | 42 | ||
42 | /* | ||
43 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
44 | */ | ||
45 | #define HWCAP_SWP 1 | ||
46 | #define HWCAP_HALF 2 | ||
47 | #define HWCAP_THUMB 4 | ||
48 | #define HWCAP_26BIT 8 /* Play it safe */ | ||
49 | #define HWCAP_FAST_MULT 16 | ||
50 | #define HWCAP_FPA 32 | ||
51 | #define HWCAP_VFP 64 | ||
52 | #define HWCAP_EDSP 128 | ||
53 | #define HWCAP_JAVA 256 | ||
54 | #define HWCAP_IWMMXT 512 | ||
55 | #define HWCAP_CRUNCH 1024 | ||
56 | |||
57 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
58 | #ifndef __ASSEMBLY__ | 44 | #ifndef __ASSEMBLY__ |
59 | /* | 45 | /* |
60 | * This yields a mask that user programs can use to figure out what | ||
61 | * instruction set this cpu supports. | ||
62 | */ | ||
63 | #define ELF_HWCAP (elf_hwcap) | ||
64 | extern unsigned int elf_hwcap; | ||
65 | |||
66 | /* | ||
67 | * This yields a string that ld.so will use to load implementation | 46 | * This yields a string that ld.so will use to load implementation |
68 | * specific libraries for optimization. This is more specific in | 47 | * specific libraries for optimization. This is more specific in |
69 | * intent than poking at uname or /proc/cpuinfo. | 48 | * intent than poking at uname or /proc/cpuinfo. |
diff --git a/include/asm-arm/hardware/iop3xx-adma.h b/include/asm-arm/hardware/iop3xx-adma.h new file mode 100644 index 000000000000..10834b54f681 --- /dev/null +++ b/include/asm-arm/hardware/iop3xx-adma.h | |||
@@ -0,0 +1,892 @@ | |||
1 | /* | ||
2 | * Copyright © 2006, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef _ADMA_H | ||
19 | #define _ADMA_H | ||
20 | #include <linux/types.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/hardware/iop_adma.h> | ||
24 | |||
25 | /* Memory copy units */ | ||
26 | #define DMA_CCR(chan) (chan->mmr_base + 0x0) | ||
27 | #define DMA_CSR(chan) (chan->mmr_base + 0x4) | ||
28 | #define DMA_DAR(chan) (chan->mmr_base + 0xc) | ||
29 | #define DMA_NDAR(chan) (chan->mmr_base + 0x10) | ||
30 | #define DMA_PADR(chan) (chan->mmr_base + 0x14) | ||
31 | #define DMA_PUADR(chan) (chan->mmr_base + 0x18) | ||
32 | #define DMA_LADR(chan) (chan->mmr_base + 0x1c) | ||
33 | #define DMA_BCR(chan) (chan->mmr_base + 0x20) | ||
34 | #define DMA_DCR(chan) (chan->mmr_base + 0x24) | ||
35 | |||
36 | /* Application accelerator unit */ | ||
37 | #define AAU_ACR(chan) (chan->mmr_base + 0x0) | ||
38 | #define AAU_ASR(chan) (chan->mmr_base + 0x4) | ||
39 | #define AAU_ADAR(chan) (chan->mmr_base + 0x8) | ||
40 | #define AAU_ANDAR(chan) (chan->mmr_base + 0xc) | ||
41 | #define AAU_SAR(src, chan) (chan->mmr_base + (0x10 + ((src) << 2))) | ||
42 | #define AAU_DAR(chan) (chan->mmr_base + 0x20) | ||
43 | #define AAU_ABCR(chan) (chan->mmr_base + 0x24) | ||
44 | #define AAU_ADCR(chan) (chan->mmr_base + 0x28) | ||
45 | #define AAU_SAR_EDCR(src_edc) (chan->mmr_base + (0x02c + ((src_edc-4) << 2))) | ||
46 | #define AAU_EDCR0_IDX 8 | ||
47 | #define AAU_EDCR1_IDX 17 | ||
48 | #define AAU_EDCR2_IDX 26 | ||
49 | |||
50 | #define DMA0_ID 0 | ||
51 | #define DMA1_ID 1 | ||
52 | #define AAU_ID 2 | ||
53 | |||
54 | struct iop3xx_aau_desc_ctrl { | ||
55 | unsigned int int_en:1; | ||
56 | unsigned int blk1_cmd_ctrl:3; | ||
57 | unsigned int blk2_cmd_ctrl:3; | ||
58 | unsigned int blk3_cmd_ctrl:3; | ||
59 | unsigned int blk4_cmd_ctrl:3; | ||
60 | unsigned int blk5_cmd_ctrl:3; | ||
61 | unsigned int blk6_cmd_ctrl:3; | ||
62 | unsigned int blk7_cmd_ctrl:3; | ||
63 | unsigned int blk8_cmd_ctrl:3; | ||
64 | unsigned int blk_ctrl:2; | ||
65 | unsigned int dual_xor_en:1; | ||
66 | unsigned int tx_complete:1; | ||
67 | unsigned int zero_result_err:1; | ||
68 | unsigned int zero_result_en:1; | ||
69 | unsigned int dest_write_en:1; | ||
70 | }; | ||
71 | |||
72 | struct iop3xx_aau_e_desc_ctrl { | ||
73 | unsigned int reserved:1; | ||
74 | unsigned int blk1_cmd_ctrl:3; | ||
75 | unsigned int blk2_cmd_ctrl:3; | ||
76 | unsigned int blk3_cmd_ctrl:3; | ||
77 | unsigned int blk4_cmd_ctrl:3; | ||
78 | unsigned int blk5_cmd_ctrl:3; | ||
79 | unsigned int blk6_cmd_ctrl:3; | ||
80 | unsigned int blk7_cmd_ctrl:3; | ||
81 | unsigned int blk8_cmd_ctrl:3; | ||
82 | unsigned int reserved2:7; | ||
83 | }; | ||
84 | |||
85 | struct iop3xx_dma_desc_ctrl { | ||
86 | unsigned int pci_transaction:4; | ||
87 | unsigned int int_en:1; | ||
88 | unsigned int dac_cycle_en:1; | ||
89 | unsigned int mem_to_mem_en:1; | ||
90 | unsigned int crc_data_tx_en:1; | ||
91 | unsigned int crc_gen_en:1; | ||
92 | unsigned int crc_seed_dis:1; | ||
93 | unsigned int reserved:21; | ||
94 | unsigned int crc_tx_complete:1; | ||
95 | }; | ||
96 | |||
97 | struct iop3xx_desc_dma { | ||
98 | u32 next_desc; | ||
99 | union { | ||
100 | u32 pci_src_addr; | ||
101 | u32 pci_dest_addr; | ||
102 | u32 src_addr; | ||
103 | }; | ||
104 | union { | ||
105 | u32 upper_pci_src_addr; | ||
106 | u32 upper_pci_dest_addr; | ||
107 | }; | ||
108 | union { | ||
109 | u32 local_pci_src_addr; | ||
110 | u32 local_pci_dest_addr; | ||
111 | u32 dest_addr; | ||
112 | }; | ||
113 | u32 byte_count; | ||
114 | union { | ||
115 | u32 desc_ctrl; | ||
116 | struct iop3xx_dma_desc_ctrl desc_ctrl_field; | ||
117 | }; | ||
118 | u32 crc_addr; | ||
119 | }; | ||
120 | |||
121 | struct iop3xx_desc_aau { | ||
122 | u32 next_desc; | ||
123 | u32 src[4]; | ||
124 | u32 dest_addr; | ||
125 | u32 byte_count; | ||
126 | union { | ||
127 | u32 desc_ctrl; | ||
128 | struct iop3xx_aau_desc_ctrl desc_ctrl_field; | ||
129 | }; | ||
130 | union { | ||
131 | u32 src_addr; | ||
132 | u32 e_desc_ctrl; | ||
133 | struct iop3xx_aau_e_desc_ctrl e_desc_ctrl_field; | ||
134 | } src_edc[31]; | ||
135 | }; | ||
136 | |||
137 | struct iop3xx_aau_gfmr { | ||
138 | unsigned int gfmr1:8; | ||
139 | unsigned int gfmr2:8; | ||
140 | unsigned int gfmr3:8; | ||
141 | unsigned int gfmr4:8; | ||
142 | }; | ||
143 | |||
144 | struct iop3xx_desc_pq_xor { | ||
145 | u32 next_desc; | ||
146 | u32 src[3]; | ||
147 | union { | ||
148 | u32 data_mult1; | ||
149 | struct iop3xx_aau_gfmr data_mult1_field; | ||
150 | }; | ||
151 | u32 dest_addr; | ||
152 | u32 byte_count; | ||
153 | union { | ||
154 | u32 desc_ctrl; | ||
155 | struct iop3xx_aau_desc_ctrl desc_ctrl_field; | ||
156 | }; | ||
157 | union { | ||
158 | u32 src_addr; | ||
159 | u32 e_desc_ctrl; | ||
160 | struct iop3xx_aau_e_desc_ctrl e_desc_ctrl_field; | ||
161 | u32 data_multiplier; | ||
162 | struct iop3xx_aau_gfmr data_mult_field; | ||
163 | u32 reserved; | ||
164 | } src_edc_gfmr[19]; | ||
165 | }; | ||
166 | |||
167 | struct iop3xx_desc_dual_xor { | ||
168 | u32 next_desc; | ||
169 | u32 src0_addr; | ||
170 | u32 src1_addr; | ||
171 | u32 h_src_addr; | ||
172 | u32 d_src_addr; | ||
173 | u32 h_dest_addr; | ||
174 | u32 byte_count; | ||
175 | union { | ||
176 | u32 desc_ctrl; | ||
177 | struct iop3xx_aau_desc_ctrl desc_ctrl_field; | ||
178 | }; | ||
179 | u32 d_dest_addr; | ||
180 | }; | ||
181 | |||
182 | union iop3xx_desc { | ||
183 | struct iop3xx_desc_aau *aau; | ||
184 | struct iop3xx_desc_dma *dma; | ||
185 | struct iop3xx_desc_pq_xor *pq_xor; | ||
186 | struct iop3xx_desc_dual_xor *dual_xor; | ||
187 | void *ptr; | ||
188 | }; | ||
189 | |||
190 | static inline int iop_adma_get_max_xor(void) | ||
191 | { | ||
192 | return 32; | ||
193 | } | ||
194 | |||
195 | static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan) | ||
196 | { | ||
197 | int id = chan->device->id; | ||
198 | |||
199 | switch (id) { | ||
200 | case DMA0_ID: | ||
201 | case DMA1_ID: | ||
202 | return __raw_readl(DMA_DAR(chan)); | ||
203 | case AAU_ID: | ||
204 | return __raw_readl(AAU_ADAR(chan)); | ||
205 | default: | ||
206 | BUG(); | ||
207 | } | ||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | static inline void iop_chan_set_next_descriptor(struct iop_adma_chan *chan, | ||
212 | u32 next_desc_addr) | ||
213 | { | ||
214 | int id = chan->device->id; | ||
215 | |||
216 | switch (id) { | ||
217 | case DMA0_ID: | ||
218 | case DMA1_ID: | ||
219 | __raw_writel(next_desc_addr, DMA_NDAR(chan)); | ||
220 | break; | ||
221 | case AAU_ID: | ||
222 | __raw_writel(next_desc_addr, AAU_ANDAR(chan)); | ||
223 | break; | ||
224 | } | ||
225 | |||
226 | } | ||
227 | |||
228 | #define IOP_ADMA_STATUS_BUSY (1 << 10) | ||
229 | #define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT (1024) | ||
230 | #define IOP_ADMA_XOR_MAX_BYTE_COUNT (16 * 1024 * 1024) | ||
231 | #define IOP_ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024) | ||
232 | |||
233 | static inline int iop_chan_is_busy(struct iop_adma_chan *chan) | ||
234 | { | ||
235 | u32 status = __raw_readl(DMA_CSR(chan)); | ||
236 | return (status & IOP_ADMA_STATUS_BUSY) ? 1 : 0; | ||
237 | } | ||
238 | |||
239 | static inline int iop_desc_is_aligned(struct iop_adma_desc_slot *desc, | ||
240 | int num_slots) | ||
241 | { | ||
242 | /* num_slots will only ever be 1, 2, 4, or 8 */ | ||
243 | return (desc->idx & (num_slots - 1)) ? 0 : 1; | ||
244 | } | ||
245 | |||
246 | /* to do: support large (i.e. > hw max) buffer sizes */ | ||
247 | static inline int iop_chan_memcpy_slot_count(size_t len, int *slots_per_op) | ||
248 | { | ||
249 | *slots_per_op = 1; | ||
250 | return 1; | ||
251 | } | ||
252 | |||
253 | /* to do: support large (i.e. > hw max) buffer sizes */ | ||
254 | static inline int iop_chan_memset_slot_count(size_t len, int *slots_per_op) | ||
255 | { | ||
256 | *slots_per_op = 1; | ||
257 | return 1; | ||
258 | } | ||
259 | |||
260 | static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt, | ||
261 | int *slots_per_op) | ||
262 | { | ||
263 | const static int slot_count_table[] = { 0, | ||
264 | 1, 1, 1, 1, /* 01 - 04 */ | ||
265 | 2, 2, 2, 2, /* 05 - 08 */ | ||
266 | 4, 4, 4, 4, /* 09 - 12 */ | ||
267 | 4, 4, 4, 4, /* 13 - 16 */ | ||
268 | 8, 8, 8, 8, /* 17 - 20 */ | ||
269 | 8, 8, 8, 8, /* 21 - 24 */ | ||
270 | 8, 8, 8, 8, /* 25 - 28 */ | ||
271 | 8, 8, 8, 8, /* 29 - 32 */ | ||
272 | }; | ||
273 | *slots_per_op = slot_count_table[src_cnt]; | ||
274 | return *slots_per_op; | ||
275 | } | ||
276 | |||
277 | static inline int | ||
278 | iop_chan_interrupt_slot_count(int *slots_per_op, struct iop_adma_chan *chan) | ||
279 | { | ||
280 | switch (chan->device->id) { | ||
281 | case DMA0_ID: | ||
282 | case DMA1_ID: | ||
283 | return iop_chan_memcpy_slot_count(0, slots_per_op); | ||
284 | case AAU_ID: | ||
285 | return iop3xx_aau_xor_slot_count(0, 2, slots_per_op); | ||
286 | default: | ||
287 | BUG(); | ||
288 | } | ||
289 | return 0; | ||
290 | } | ||
291 | |||
292 | static inline int iop_chan_xor_slot_count(size_t len, int src_cnt, | ||
293 | int *slots_per_op) | ||
294 | { | ||
295 | int slot_cnt = iop3xx_aau_xor_slot_count(len, src_cnt, slots_per_op); | ||
296 | |||
297 | if (len <= IOP_ADMA_XOR_MAX_BYTE_COUNT) | ||
298 | return slot_cnt; | ||
299 | |||
300 | len -= IOP_ADMA_XOR_MAX_BYTE_COUNT; | ||
301 | while (len > IOP_ADMA_XOR_MAX_BYTE_COUNT) { | ||
302 | len -= IOP_ADMA_XOR_MAX_BYTE_COUNT; | ||
303 | slot_cnt += *slots_per_op; | ||
304 | } | ||
305 | |||
306 | if (len) | ||
307 | slot_cnt += *slots_per_op; | ||
308 | |||
309 | return slot_cnt; | ||
310 | } | ||
311 | |||
312 | /* zero sum on iop3xx is limited to 1k at a time so it requires multiple | ||
313 | * descriptors | ||
314 | */ | ||
315 | static inline int iop_chan_zero_sum_slot_count(size_t len, int src_cnt, | ||
316 | int *slots_per_op) | ||
317 | { | ||
318 | int slot_cnt = iop3xx_aau_xor_slot_count(len, src_cnt, slots_per_op); | ||
319 | |||
320 | if (len <= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) | ||
321 | return slot_cnt; | ||
322 | |||
323 | len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
324 | while (len > IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) { | ||
325 | len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
326 | slot_cnt += *slots_per_op; | ||
327 | } | ||
328 | |||
329 | if (len) | ||
330 | slot_cnt += *slots_per_op; | ||
331 | |||
332 | return slot_cnt; | ||
333 | } | ||
334 | |||
335 | static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, | ||
336 | struct iop_adma_chan *chan) | ||
337 | { | ||
338 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
339 | |||
340 | switch (chan->device->id) { | ||
341 | case DMA0_ID: | ||
342 | case DMA1_ID: | ||
343 | return hw_desc.dma->dest_addr; | ||
344 | case AAU_ID: | ||
345 | return hw_desc.aau->dest_addr; | ||
346 | default: | ||
347 | BUG(); | ||
348 | } | ||
349 | return 0; | ||
350 | } | ||
351 | |||
352 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, | ||
353 | struct iop_adma_chan *chan) | ||
354 | { | ||
355 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
356 | |||
357 | switch (chan->device->id) { | ||
358 | case DMA0_ID: | ||
359 | case DMA1_ID: | ||
360 | return hw_desc.dma->byte_count; | ||
361 | case AAU_ID: | ||
362 | return hw_desc.aau->byte_count; | ||
363 | default: | ||
364 | BUG(); | ||
365 | } | ||
366 | return 0; | ||
367 | } | ||
368 | |||
369 | /* translate the src_idx to a descriptor word index */ | ||
370 | static inline int __desc_idx(int src_idx) | ||
371 | { | ||
372 | const static int desc_idx_table[] = { 0, 0, 0, 0, | ||
373 | 0, 1, 2, 3, | ||
374 | 5, 6, 7, 8, | ||
375 | 9, 10, 11, 12, | ||
376 | 14, 15, 16, 17, | ||
377 | 18, 19, 20, 21, | ||
378 | 23, 24, 25, 26, | ||
379 | 27, 28, 29, 30, | ||
380 | }; | ||
381 | |||
382 | return desc_idx_table[src_idx]; | ||
383 | } | ||
384 | |||
385 | static inline u32 iop_desc_get_src_addr(struct iop_adma_desc_slot *desc, | ||
386 | struct iop_adma_chan *chan, | ||
387 | int src_idx) | ||
388 | { | ||
389 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
390 | |||
391 | switch (chan->device->id) { | ||
392 | case DMA0_ID: | ||
393 | case DMA1_ID: | ||
394 | return hw_desc.dma->src_addr; | ||
395 | case AAU_ID: | ||
396 | break; | ||
397 | default: | ||
398 | BUG(); | ||
399 | } | ||
400 | |||
401 | if (src_idx < 4) | ||
402 | return hw_desc.aau->src[src_idx]; | ||
403 | else | ||
404 | return hw_desc.aau->src_edc[__desc_idx(src_idx)].src_addr; | ||
405 | } | ||
406 | |||
407 | static inline void iop3xx_aau_desc_set_src_addr(struct iop3xx_desc_aau *hw_desc, | ||
408 | int src_idx, dma_addr_t addr) | ||
409 | { | ||
410 | if (src_idx < 4) | ||
411 | hw_desc->src[src_idx] = addr; | ||
412 | else | ||
413 | hw_desc->src_edc[__desc_idx(src_idx)].src_addr = addr; | ||
414 | } | ||
415 | |||
416 | static inline void | ||
417 | iop_desc_init_memcpy(struct iop_adma_desc_slot *desc, int int_en) | ||
418 | { | ||
419 | struct iop3xx_desc_dma *hw_desc = desc->hw_desc; | ||
420 | union { | ||
421 | u32 value; | ||
422 | struct iop3xx_dma_desc_ctrl field; | ||
423 | } u_desc_ctrl; | ||
424 | |||
425 | u_desc_ctrl.value = 0; | ||
426 | u_desc_ctrl.field.mem_to_mem_en = 1; | ||
427 | u_desc_ctrl.field.pci_transaction = 0xe; /* memory read block */ | ||
428 | u_desc_ctrl.field.int_en = int_en; | ||
429 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
430 | hw_desc->upper_pci_src_addr = 0; | ||
431 | hw_desc->crc_addr = 0; | ||
432 | } | ||
433 | |||
434 | static inline void | ||
435 | iop_desc_init_memset(struct iop_adma_desc_slot *desc, int int_en) | ||
436 | { | ||
437 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; | ||
438 | union { | ||
439 | u32 value; | ||
440 | struct iop3xx_aau_desc_ctrl field; | ||
441 | } u_desc_ctrl; | ||
442 | |||
443 | u_desc_ctrl.value = 0; | ||
444 | u_desc_ctrl.field.blk1_cmd_ctrl = 0x2; /* memory block fill */ | ||
445 | u_desc_ctrl.field.dest_write_en = 1; | ||
446 | u_desc_ctrl.field.int_en = int_en; | ||
447 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
448 | } | ||
449 | |||
450 | static inline u32 | ||
451 | iop3xx_desc_init_xor(struct iop3xx_desc_aau *hw_desc, int src_cnt, int int_en) | ||
452 | { | ||
453 | int i, shift; | ||
454 | u32 edcr; | ||
455 | union { | ||
456 | u32 value; | ||
457 | struct iop3xx_aau_desc_ctrl field; | ||
458 | } u_desc_ctrl; | ||
459 | |||
460 | u_desc_ctrl.value = 0; | ||
461 | switch (src_cnt) { | ||
462 | case 25 ... 32: | ||
463 | u_desc_ctrl.field.blk_ctrl = 0x3; /* use EDCR[2:0] */ | ||
464 | edcr = 0; | ||
465 | shift = 1; | ||
466 | for (i = 24; i < src_cnt; i++) { | ||
467 | edcr |= (1 << shift); | ||
468 | shift += 3; | ||
469 | } | ||
470 | hw_desc->src_edc[AAU_EDCR2_IDX].e_desc_ctrl = edcr; | ||
471 | src_cnt = 24; | ||
472 | /* fall through */ | ||
473 | case 17 ... 24: | ||
474 | if (!u_desc_ctrl.field.blk_ctrl) { | ||
475 | hw_desc->src_edc[AAU_EDCR2_IDX].e_desc_ctrl = 0; | ||
476 | u_desc_ctrl.field.blk_ctrl = 0x3; /* use EDCR[2:0] */ | ||
477 | } | ||
478 | edcr = 0; | ||
479 | shift = 1; | ||
480 | for (i = 16; i < src_cnt; i++) { | ||
481 | edcr |= (1 << shift); | ||
482 | shift += 3; | ||
483 | } | ||
484 | hw_desc->src_edc[AAU_EDCR1_IDX].e_desc_ctrl = edcr; | ||
485 | src_cnt = 16; | ||
486 | /* fall through */ | ||
487 | case 9 ... 16: | ||
488 | if (!u_desc_ctrl.field.blk_ctrl) | ||
489 | u_desc_ctrl.field.blk_ctrl = 0x2; /* use EDCR0 */ | ||
490 | edcr = 0; | ||
491 | shift = 1; | ||
492 | for (i = 8; i < src_cnt; i++) { | ||
493 | edcr |= (1 << shift); | ||
494 | shift += 3; | ||
495 | } | ||
496 | hw_desc->src_edc[AAU_EDCR0_IDX].e_desc_ctrl = edcr; | ||
497 | src_cnt = 8; | ||
498 | /* fall through */ | ||
499 | case 2 ... 8: | ||
500 | shift = 1; | ||
501 | for (i = 0; i < src_cnt; i++) { | ||
502 | u_desc_ctrl.value |= (1 << shift); | ||
503 | shift += 3; | ||
504 | } | ||
505 | |||
506 | if (!u_desc_ctrl.field.blk_ctrl && src_cnt > 4) | ||
507 | u_desc_ctrl.field.blk_ctrl = 0x1; /* use mini-desc */ | ||
508 | } | ||
509 | |||
510 | u_desc_ctrl.field.dest_write_en = 1; | ||
511 | u_desc_ctrl.field.blk1_cmd_ctrl = 0x7; /* direct fill */ | ||
512 | u_desc_ctrl.field.int_en = int_en; | ||
513 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
514 | |||
515 | return u_desc_ctrl.value; | ||
516 | } | ||
517 | |||
518 | static inline void | ||
519 | iop_desc_init_xor(struct iop_adma_desc_slot *desc, int src_cnt, int int_en) | ||
520 | { | ||
521 | iop3xx_desc_init_xor(desc->hw_desc, src_cnt, int_en); | ||
522 | } | ||
523 | |||
524 | /* return the number of operations */ | ||
525 | static inline int | ||
526 | iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt, int int_en) | ||
527 | { | ||
528 | int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op; | ||
529 | struct iop3xx_desc_aau *hw_desc, *prev_hw_desc, *iter; | ||
530 | union { | ||
531 | u32 value; | ||
532 | struct iop3xx_aau_desc_ctrl field; | ||
533 | } u_desc_ctrl; | ||
534 | int i, j; | ||
535 | |||
536 | hw_desc = desc->hw_desc; | ||
537 | |||
538 | for (i = 0, j = 0; (slot_cnt -= slots_per_op) >= 0; | ||
539 | i += slots_per_op, j++) { | ||
540 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
541 | u_desc_ctrl.value = iop3xx_desc_init_xor(iter, src_cnt, int_en); | ||
542 | u_desc_ctrl.field.dest_write_en = 0; | ||
543 | u_desc_ctrl.field.zero_result_en = 1; | ||
544 | u_desc_ctrl.field.int_en = int_en; | ||
545 | iter->desc_ctrl = u_desc_ctrl.value; | ||
546 | |||
547 | /* for the subsequent descriptors preserve the store queue | ||
548 | * and chain them together | ||
549 | */ | ||
550 | if (i) { | ||
551 | prev_hw_desc = | ||
552 | iop_hw_desc_slot_idx(hw_desc, i - slots_per_op); | ||
553 | prev_hw_desc->next_desc = | ||
554 | (u32) (desc->async_tx.phys + (i << 5)); | ||
555 | } | ||
556 | } | ||
557 | |||
558 | return j; | ||
559 | } | ||
560 | |||
561 | static inline void | ||
562 | iop_desc_init_null_xor(struct iop_adma_desc_slot *desc, int src_cnt, int int_en) | ||
563 | { | ||
564 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; | ||
565 | union { | ||
566 | u32 value; | ||
567 | struct iop3xx_aau_desc_ctrl field; | ||
568 | } u_desc_ctrl; | ||
569 | |||
570 | u_desc_ctrl.value = 0; | ||
571 | switch (src_cnt) { | ||
572 | case 25 ... 32: | ||
573 | u_desc_ctrl.field.blk_ctrl = 0x3; /* use EDCR[2:0] */ | ||
574 | hw_desc->src_edc[AAU_EDCR2_IDX].e_desc_ctrl = 0; | ||
575 | /* fall through */ | ||
576 | case 17 ... 24: | ||
577 | if (!u_desc_ctrl.field.blk_ctrl) { | ||
578 | hw_desc->src_edc[AAU_EDCR2_IDX].e_desc_ctrl = 0; | ||
579 | u_desc_ctrl.field.blk_ctrl = 0x3; /* use EDCR[2:0] */ | ||
580 | } | ||
581 | hw_desc->src_edc[AAU_EDCR1_IDX].e_desc_ctrl = 0; | ||
582 | /* fall through */ | ||
583 | case 9 ... 16: | ||
584 | if (!u_desc_ctrl.field.blk_ctrl) | ||
585 | u_desc_ctrl.field.blk_ctrl = 0x2; /* use EDCR0 */ | ||
586 | hw_desc->src_edc[AAU_EDCR0_IDX].e_desc_ctrl = 0; | ||
587 | /* fall through */ | ||
588 | case 1 ... 8: | ||
589 | if (!u_desc_ctrl.field.blk_ctrl && src_cnt > 4) | ||
590 | u_desc_ctrl.field.blk_ctrl = 0x1; /* use mini-desc */ | ||
591 | } | ||
592 | |||
593 | u_desc_ctrl.field.dest_write_en = 0; | ||
594 | u_desc_ctrl.field.int_en = int_en; | ||
595 | hw_desc->desc_ctrl = u_desc_ctrl.value; | ||
596 | } | ||
597 | |||
598 | static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc, | ||
599 | struct iop_adma_chan *chan, | ||
600 | u32 byte_count) | ||
601 | { | ||
602 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
603 | |||
604 | switch (chan->device->id) { | ||
605 | case DMA0_ID: | ||
606 | case DMA1_ID: | ||
607 | hw_desc.dma->byte_count = byte_count; | ||
608 | break; | ||
609 | case AAU_ID: | ||
610 | hw_desc.aau->byte_count = byte_count; | ||
611 | break; | ||
612 | default: | ||
613 | BUG(); | ||
614 | } | ||
615 | } | ||
616 | |||
617 | static inline void | ||
618 | iop_desc_init_interrupt(struct iop_adma_desc_slot *desc, | ||
619 | struct iop_adma_chan *chan) | ||
620 | { | ||
621 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
622 | |||
623 | switch (chan->device->id) { | ||
624 | case DMA0_ID: | ||
625 | case DMA1_ID: | ||
626 | iop_desc_init_memcpy(desc, 1); | ||
627 | hw_desc.dma->byte_count = 0; | ||
628 | hw_desc.dma->dest_addr = 0; | ||
629 | hw_desc.dma->src_addr = 0; | ||
630 | break; | ||
631 | case AAU_ID: | ||
632 | iop_desc_init_null_xor(desc, 2, 1); | ||
633 | hw_desc.aau->byte_count = 0; | ||
634 | hw_desc.aau->dest_addr = 0; | ||
635 | hw_desc.aau->src[0] = 0; | ||
636 | hw_desc.aau->src[1] = 0; | ||
637 | break; | ||
638 | default: | ||
639 | BUG(); | ||
640 | } | ||
641 | } | ||
642 | |||
643 | static inline void | ||
644 | iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len) | ||
645 | { | ||
646 | int slots_per_op = desc->slots_per_op; | ||
647 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc, *iter; | ||
648 | int i = 0; | ||
649 | |||
650 | if (len <= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) { | ||
651 | hw_desc->byte_count = len; | ||
652 | } else { | ||
653 | do { | ||
654 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
655 | iter->byte_count = IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
656 | len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT; | ||
657 | i += slots_per_op; | ||
658 | } while (len > IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT); | ||
659 | |||
660 | if (len) { | ||
661 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
662 | iter->byte_count = len; | ||
663 | } | ||
664 | } | ||
665 | } | ||
666 | |||
667 | static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc, | ||
668 | struct iop_adma_chan *chan, | ||
669 | dma_addr_t addr) | ||
670 | { | ||
671 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
672 | |||
673 | switch (chan->device->id) { | ||
674 | case DMA0_ID: | ||
675 | case DMA1_ID: | ||
676 | hw_desc.dma->dest_addr = addr; | ||
677 | break; | ||
678 | case AAU_ID: | ||
679 | hw_desc.aau->dest_addr = addr; | ||
680 | break; | ||
681 | default: | ||
682 | BUG(); | ||
683 | } | ||
684 | } | ||
685 | |||
686 | static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc, | ||
687 | dma_addr_t addr) | ||
688 | { | ||
689 | struct iop3xx_desc_dma *hw_desc = desc->hw_desc; | ||
690 | hw_desc->src_addr = addr; | ||
691 | } | ||
692 | |||
693 | static inline void | ||
694 | iop_desc_set_zero_sum_src_addr(struct iop_adma_desc_slot *desc, int src_idx, | ||
695 | dma_addr_t addr) | ||
696 | { | ||
697 | |||
698 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc, *iter; | ||
699 | int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op; | ||
700 | int i; | ||
701 | |||
702 | for (i = 0; (slot_cnt -= slots_per_op) >= 0; | ||
703 | i += slots_per_op, addr += IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) { | ||
704 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
705 | iop3xx_aau_desc_set_src_addr(iter, src_idx, addr); | ||
706 | } | ||
707 | } | ||
708 | |||
709 | static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc, | ||
710 | int src_idx, dma_addr_t addr) | ||
711 | { | ||
712 | |||
713 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc, *iter; | ||
714 | int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op; | ||
715 | int i; | ||
716 | |||
717 | for (i = 0; (slot_cnt -= slots_per_op) >= 0; | ||
718 | i += slots_per_op, addr += IOP_ADMA_XOR_MAX_BYTE_COUNT) { | ||
719 | iter = iop_hw_desc_slot_idx(hw_desc, i); | ||
720 | iop3xx_aau_desc_set_src_addr(iter, src_idx, addr); | ||
721 | } | ||
722 | } | ||
723 | |||
724 | static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc, | ||
725 | u32 next_desc_addr) | ||
726 | { | ||
727 | /* hw_desc->next_desc is the same location for all channels */ | ||
728 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
729 | BUG_ON(hw_desc.dma->next_desc); | ||
730 | hw_desc.dma->next_desc = next_desc_addr; | ||
731 | } | ||
732 | |||
733 | static inline u32 iop_desc_get_next_desc(struct iop_adma_desc_slot *desc) | ||
734 | { | ||
735 | /* hw_desc->next_desc is the same location for all channels */ | ||
736 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
737 | return hw_desc.dma->next_desc; | ||
738 | } | ||
739 | |||
740 | static inline void iop_desc_clear_next_desc(struct iop_adma_desc_slot *desc) | ||
741 | { | ||
742 | /* hw_desc->next_desc is the same location for all channels */ | ||
743 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
744 | hw_desc.dma->next_desc = 0; | ||
745 | } | ||
746 | |||
747 | static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc, | ||
748 | u32 val) | ||
749 | { | ||
750 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; | ||
751 | hw_desc->src[0] = val; | ||
752 | } | ||
753 | |||
754 | static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | ||
755 | { | ||
756 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; | ||
757 | struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; | ||
758 | |||
759 | BUG_ON(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en)); | ||
760 | return desc_ctrl.zero_result_err; | ||
761 | } | ||
762 | |||
763 | static inline void iop_chan_append(struct iop_adma_chan *chan) | ||
764 | { | ||
765 | u32 dma_chan_ctrl; | ||
766 | /* workaround dropped interrupts on 3xx */ | ||
767 | mod_timer(&chan->cleanup_watchdog, jiffies + msecs_to_jiffies(3)); | ||
768 | |||
769 | dma_chan_ctrl = __raw_readl(DMA_CCR(chan)); | ||
770 | dma_chan_ctrl |= 0x2; | ||
771 | __raw_writel(dma_chan_ctrl, DMA_CCR(chan)); | ||
772 | } | ||
773 | |||
774 | static inline void iop_chan_idle(int busy, struct iop_adma_chan *chan) | ||
775 | { | ||
776 | if (!busy) | ||
777 | del_timer(&chan->cleanup_watchdog); | ||
778 | } | ||
779 | |||
780 | static inline u32 iop_chan_get_status(struct iop_adma_chan *chan) | ||
781 | { | ||
782 | return __raw_readl(DMA_CSR(chan)); | ||
783 | } | ||
784 | |||
785 | static inline void iop_chan_disable(struct iop_adma_chan *chan) | ||
786 | { | ||
787 | u32 dma_chan_ctrl = __raw_readl(DMA_CCR(chan)); | ||
788 | dma_chan_ctrl &= ~1; | ||
789 | __raw_writel(dma_chan_ctrl, DMA_CCR(chan)); | ||
790 | } | ||
791 | |||
792 | static inline void iop_chan_enable(struct iop_adma_chan *chan) | ||
793 | { | ||
794 | u32 dma_chan_ctrl = __raw_readl(DMA_CCR(chan)); | ||
795 | |||
796 | dma_chan_ctrl |= 1; | ||
797 | __raw_writel(dma_chan_ctrl, DMA_CCR(chan)); | ||
798 | } | ||
799 | |||
800 | static inline void iop_adma_device_clear_eot_status(struct iop_adma_chan *chan) | ||
801 | { | ||
802 | u32 status = __raw_readl(DMA_CSR(chan)); | ||
803 | status &= (1 << 9); | ||
804 | __raw_writel(status, DMA_CSR(chan)); | ||
805 | } | ||
806 | |||
807 | static inline void iop_adma_device_clear_eoc_status(struct iop_adma_chan *chan) | ||
808 | { | ||
809 | u32 status = __raw_readl(DMA_CSR(chan)); | ||
810 | status &= (1 << 8); | ||
811 | __raw_writel(status, DMA_CSR(chan)); | ||
812 | } | ||
813 | |||
814 | static inline void iop_adma_device_clear_err_status(struct iop_adma_chan *chan) | ||
815 | { | ||
816 | u32 status = __raw_readl(DMA_CSR(chan)); | ||
817 | |||
818 | switch (chan->device->id) { | ||
819 | case DMA0_ID: | ||
820 | case DMA1_ID: | ||
821 | status &= (1 << 5) | (1 << 3) | (1 << 2) | (1 << 1); | ||
822 | break; | ||
823 | case AAU_ID: | ||
824 | status &= (1 << 5); | ||
825 | break; | ||
826 | default: | ||
827 | BUG(); | ||
828 | } | ||
829 | |||
830 | __raw_writel(status, DMA_CSR(chan)); | ||
831 | } | ||
832 | |||
833 | static inline int | ||
834 | iop_is_err_int_parity(unsigned long status, struct iop_adma_chan *chan) | ||
835 | { | ||
836 | return 0; | ||
837 | } | ||
838 | |||
839 | static inline int | ||
840 | iop_is_err_mcu_abort(unsigned long status, struct iop_adma_chan *chan) | ||
841 | { | ||
842 | return 0; | ||
843 | } | ||
844 | |||
845 | static inline int | ||
846 | iop_is_err_int_tabort(unsigned long status, struct iop_adma_chan *chan) | ||
847 | { | ||
848 | return 0; | ||
849 | } | ||
850 | |||
851 | static inline int | ||
852 | iop_is_err_int_mabort(unsigned long status, struct iop_adma_chan *chan) | ||
853 | { | ||
854 | return test_bit(5, &status); | ||
855 | } | ||
856 | |||
857 | static inline int | ||
858 | iop_is_err_pci_tabort(unsigned long status, struct iop_adma_chan *chan) | ||
859 | { | ||
860 | switch (chan->device->id) { | ||
861 | case DMA0_ID: | ||
862 | case DMA1_ID: | ||
863 | return test_bit(2, &status); | ||
864 | default: | ||
865 | return 0; | ||
866 | } | ||
867 | } | ||
868 | |||
869 | static inline int | ||
870 | iop_is_err_pci_mabort(unsigned long status, struct iop_adma_chan *chan) | ||
871 | { | ||
872 | switch (chan->device->id) { | ||
873 | case DMA0_ID: | ||
874 | case DMA1_ID: | ||
875 | return test_bit(3, &status); | ||
876 | default: | ||
877 | return 0; | ||
878 | } | ||
879 | } | ||
880 | |||
881 | static inline int | ||
882 | iop_is_err_split_tx(unsigned long status, struct iop_adma_chan *chan) | ||
883 | { | ||
884 | switch (chan->device->id) { | ||
885 | case DMA0_ID: | ||
886 | case DMA1_ID: | ||
887 | return test_bit(1, &status); | ||
888 | default: | ||
889 | return 0; | ||
890 | } | ||
891 | } | ||
892 | #endif /* _ADMA_H */ | ||
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 63feceb7ede5..81ca5d3e2bff 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -144,24 +144,9 @@ extern int init_atu; | |||
144 | #define IOP3XX_IAR (volatile u32 *)IOP3XX_REG_ADDR(0x0380) | 144 | #define IOP3XX_IAR (volatile u32 *)IOP3XX_REG_ADDR(0x0380) |
145 | 145 | ||
146 | /* DMA Controller */ | 146 | /* DMA Controller */ |
147 | #define IOP3XX_DMA0_CCR (volatile u32 *)IOP3XX_REG_ADDR(0x0400) | 147 | #define IOP3XX_DMA_PHYS_BASE(chan) (IOP3XX_PERIPHERAL_PHYS_BASE + \ |
148 | #define IOP3XX_DMA0_CSR (volatile u32 *)IOP3XX_REG_ADDR(0x0404) | 148 | (0x400 + (chan << 6))) |
149 | #define IOP3XX_DMA0_DAR (volatile u32 *)IOP3XX_REG_ADDR(0x040c) | 149 | #define IOP3XX_DMA_UPPER_PA(chan) (IOP3XX_DMA_PHYS_BASE(chan) + 0x27) |
150 | #define IOP3XX_DMA0_NDAR (volatile u32 *)IOP3XX_REG_ADDR(0x0410) | ||
151 | #define IOP3XX_DMA0_PADR (volatile u32 *)IOP3XX_REG_ADDR(0x0414) | ||
152 | #define IOP3XX_DMA0_PUADR (volatile u32 *)IOP3XX_REG_ADDR(0x0418) | ||
153 | #define IOP3XX_DMA0_LADR (volatile u32 *)IOP3XX_REG_ADDR(0x041c) | ||
154 | #define IOP3XX_DMA0_BCR (volatile u32 *)IOP3XX_REG_ADDR(0x0420) | ||
155 | #define IOP3XX_DMA0_DCR (volatile u32 *)IOP3XX_REG_ADDR(0x0424) | ||
156 | #define IOP3XX_DMA1_CCR (volatile u32 *)IOP3XX_REG_ADDR(0x0440) | ||
157 | #define IOP3XX_DMA1_CSR (volatile u32 *)IOP3XX_REG_ADDR(0x0444) | ||
158 | #define IOP3XX_DMA1_DAR (volatile u32 *)IOP3XX_REG_ADDR(0x044c) | ||
159 | #define IOP3XX_DMA1_NDAR (volatile u32 *)IOP3XX_REG_ADDR(0x0450) | ||
160 | #define IOP3XX_DMA1_PADR (volatile u32 *)IOP3XX_REG_ADDR(0x0454) | ||
161 | #define IOP3XX_DMA1_PUADR (volatile u32 *)IOP3XX_REG_ADDR(0x0458) | ||
162 | #define IOP3XX_DMA1_LADR (volatile u32 *)IOP3XX_REG_ADDR(0x045c) | ||
163 | #define IOP3XX_DMA1_BCR (volatile u32 *)IOP3XX_REG_ADDR(0x0460) | ||
164 | #define IOP3XX_DMA1_DCR (volatile u32 *)IOP3XX_REG_ADDR(0x0464) | ||
165 | 150 | ||
166 | /* Peripheral bus interface */ | 151 | /* Peripheral bus interface */ |
167 | #define IOP3XX_PBCR (volatile u32 *)IOP3XX_REG_ADDR(0x0680) | 152 | #define IOP3XX_PBCR (volatile u32 *)IOP3XX_REG_ADDR(0x0680) |
@@ -210,48 +195,8 @@ extern int init_atu; | |||
210 | #define IOP_TMR_RATIO_1_1 0x00 | 195 | #define IOP_TMR_RATIO_1_1 0x00 |
211 | 196 | ||
212 | /* Application accelerator unit */ | 197 | /* Application accelerator unit */ |
213 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) | 198 | #define IOP3XX_AAU_PHYS_BASE (IOP3XX_PERIPHERAL_PHYS_BASE + 0x800) |
214 | #define IOP3XX_AAU_ASR (volatile u32 *)IOP3XX_REG_ADDR(0x0804) | 199 | #define IOP3XX_AAU_UPPER_PA (IOP3XX_AAU_PHYS_BASE + 0xa7) |
215 | #define IOP3XX_AAU_ADAR (volatile u32 *)IOP3XX_REG_ADDR(0x0808) | ||
216 | #define IOP3XX_AAU_ANDAR (volatile u32 *)IOP3XX_REG_ADDR(0x080c) | ||
217 | #define IOP3XX_AAU_SAR1 (volatile u32 *)IOP3XX_REG_ADDR(0x0810) | ||
218 | #define IOP3XX_AAU_SAR2 (volatile u32 *)IOP3XX_REG_ADDR(0x0814) | ||
219 | #define IOP3XX_AAU_SAR3 (volatile u32 *)IOP3XX_REG_ADDR(0x0818) | ||
220 | #define IOP3XX_AAU_SAR4 (volatile u32 *)IOP3XX_REG_ADDR(0x081c) | ||
221 | #define IOP3XX_AAU_DAR (volatile u32 *)IOP3XX_REG_ADDR(0x0820) | ||
222 | #define IOP3XX_AAU_ABCR (volatile u32 *)IOP3XX_REG_ADDR(0x0824) | ||
223 | #define IOP3XX_AAU_ADCR (volatile u32 *)IOP3XX_REG_ADDR(0x0828) | ||
224 | #define IOP3XX_AAU_SAR5 (volatile u32 *)IOP3XX_REG_ADDR(0x082c) | ||
225 | #define IOP3XX_AAU_SAR6 (volatile u32 *)IOP3XX_REG_ADDR(0x0830) | ||
226 | #define IOP3XX_AAU_SAR7 (volatile u32 *)IOP3XX_REG_ADDR(0x0834) | ||
227 | #define IOP3XX_AAU_SAR8 (volatile u32 *)IOP3XX_REG_ADDR(0x0838) | ||
228 | #define IOP3XX_AAU_EDCR0 (volatile u32 *)IOP3XX_REG_ADDR(0x083c) | ||
229 | #define IOP3XX_AAU_SAR9 (volatile u32 *)IOP3XX_REG_ADDR(0x0840) | ||
230 | #define IOP3XX_AAU_SAR10 (volatile u32 *)IOP3XX_REG_ADDR(0x0844) | ||
231 | #define IOP3XX_AAU_SAR11 (volatile u32 *)IOP3XX_REG_ADDR(0x0848) | ||
232 | #define IOP3XX_AAU_SAR12 (volatile u32 *)IOP3XX_REG_ADDR(0x084c) | ||
233 | #define IOP3XX_AAU_SAR13 (volatile u32 *)IOP3XX_REG_ADDR(0x0850) | ||
234 | #define IOP3XX_AAU_SAR14 (volatile u32 *)IOP3XX_REG_ADDR(0x0854) | ||
235 | #define IOP3XX_AAU_SAR15 (volatile u32 *)IOP3XX_REG_ADDR(0x0858) | ||
236 | #define IOP3XX_AAU_SAR16 (volatile u32 *)IOP3XX_REG_ADDR(0x085c) | ||
237 | #define IOP3XX_AAU_EDCR1 (volatile u32 *)IOP3XX_REG_ADDR(0x0860) | ||
238 | #define IOP3XX_AAU_SAR17 (volatile u32 *)IOP3XX_REG_ADDR(0x0864) | ||
239 | #define IOP3XX_AAU_SAR18 (volatile u32 *)IOP3XX_REG_ADDR(0x0868) | ||
240 | #define IOP3XX_AAU_SAR19 (volatile u32 *)IOP3XX_REG_ADDR(0x086c) | ||
241 | #define IOP3XX_AAU_SAR20 (volatile u32 *)IOP3XX_REG_ADDR(0x0870) | ||
242 | #define IOP3XX_AAU_SAR21 (volatile u32 *)IOP3XX_REG_ADDR(0x0874) | ||
243 | #define IOP3XX_AAU_SAR22 (volatile u32 *)IOP3XX_REG_ADDR(0x0878) | ||
244 | #define IOP3XX_AAU_SAR23 (volatile u32 *)IOP3XX_REG_ADDR(0x087c) | ||
245 | #define IOP3XX_AAU_SAR24 (volatile u32 *)IOP3XX_REG_ADDR(0x0880) | ||
246 | #define IOP3XX_AAU_EDCR2 (volatile u32 *)IOP3XX_REG_ADDR(0x0884) | ||
247 | #define IOP3XX_AAU_SAR25 (volatile u32 *)IOP3XX_REG_ADDR(0x0888) | ||
248 | #define IOP3XX_AAU_SAR26 (volatile u32 *)IOP3XX_REG_ADDR(0x088c) | ||
249 | #define IOP3XX_AAU_SAR27 (volatile u32 *)IOP3XX_REG_ADDR(0x0890) | ||
250 | #define IOP3XX_AAU_SAR28 (volatile u32 *)IOP3XX_REG_ADDR(0x0894) | ||
251 | #define IOP3XX_AAU_SAR29 (volatile u32 *)IOP3XX_REG_ADDR(0x0898) | ||
252 | #define IOP3XX_AAU_SAR30 (volatile u32 *)IOP3XX_REG_ADDR(0x089c) | ||
253 | #define IOP3XX_AAU_SAR31 (volatile u32 *)IOP3XX_REG_ADDR(0x08a0) | ||
254 | #define IOP3XX_AAU_SAR32 (volatile u32 *)IOP3XX_REG_ADDR(0x08a4) | ||
255 | 200 | ||
256 | /* I2C bus interface unit */ | 201 | /* I2C bus interface unit */ |
257 | #define IOP3XX_ICR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1680) | 202 | #define IOP3XX_ICR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1680) |
@@ -329,6 +274,9 @@ static inline void write_tisr(u32 val) | |||
329 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); | 274 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); |
330 | } | 275 | } |
331 | 276 | ||
277 | extern struct platform_device iop3xx_dma_0_channel; | ||
278 | extern struct platform_device iop3xx_dma_1_channel; | ||
279 | extern struct platform_device iop3xx_aau_channel; | ||
332 | extern struct platform_device iop3xx_i2c0_device; | 280 | extern struct platform_device iop3xx_i2c0_device; |
333 | extern struct platform_device iop3xx_i2c1_device; | 281 | extern struct platform_device iop3xx_i2c1_device; |
334 | 282 | ||
diff --git a/include/asm-arm/hardware/iop_adma.h b/include/asm-arm/hardware/iop_adma.h new file mode 100644 index 000000000000..ca8e71f44346 --- /dev/null +++ b/include/asm-arm/hardware/iop_adma.h | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * Copyright © 2006, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef IOP_ADMA_H | ||
19 | #define IOP_ADMA_H | ||
20 | #include <linux/types.h> | ||
21 | #include <linux/dmaengine.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | |||
24 | #define IOP_ADMA_SLOT_SIZE 32 | ||
25 | #define IOP_ADMA_THRESHOLD 4 | ||
26 | |||
27 | /** | ||
28 | * struct iop_adma_device - internal representation of an ADMA device | ||
29 | * @pdev: Platform device | ||
30 | * @id: HW ADMA Device selector | ||
31 | * @dma_desc_pool: base of DMA descriptor region (DMA address) | ||
32 | * @dma_desc_pool_virt: base of DMA descriptor region (CPU address) | ||
33 | * @common: embedded struct dma_device | ||
34 | */ | ||
35 | struct iop_adma_device { | ||
36 | struct platform_device *pdev; | ||
37 | int id; | ||
38 | dma_addr_t dma_desc_pool; | ||
39 | void *dma_desc_pool_virt; | ||
40 | struct dma_device common; | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * struct iop_adma_chan - internal representation of an ADMA device | ||
45 | * @pending: allows batching of hardware operations | ||
46 | * @completed_cookie: identifier for the most recently completed operation | ||
47 | * @lock: serializes enqueue/dequeue operations to the slot pool | ||
48 | * @mmr_base: memory mapped register base | ||
49 | * @chain: device chain view of the descriptors | ||
50 | * @device: parent device | ||
51 | * @common: common dmaengine channel object members | ||
52 | * @last_used: place holder for allocation to continue from where it left off | ||
53 | * @all_slots: complete domain of slots usable by the channel | ||
54 | * @cleanup_watchdog: workaround missed interrupts on iop3xx | ||
55 | * @slots_allocated: records the actual size of the descriptor slot pool | ||
56 | * @irq_tasklet: bottom half where iop_adma_slot_cleanup runs | ||
57 | */ | ||
58 | struct iop_adma_chan { | ||
59 | int pending; | ||
60 | dma_cookie_t completed_cookie; | ||
61 | spinlock_t lock; /* protects the descriptor slot pool */ | ||
62 | void __iomem *mmr_base; | ||
63 | struct list_head chain; | ||
64 | struct iop_adma_device *device; | ||
65 | struct dma_chan common; | ||
66 | struct iop_adma_desc_slot *last_used; | ||
67 | struct list_head all_slots; | ||
68 | struct timer_list cleanup_watchdog; | ||
69 | int slots_allocated; | ||
70 | struct tasklet_struct irq_tasklet; | ||
71 | }; | ||
72 | |||
73 | /** | ||
74 | * struct iop_adma_desc_slot - IOP-ADMA software descriptor | ||
75 | * @slot_node: node on the iop_adma_chan.all_slots list | ||
76 | * @chain_node: node on the op_adma_chan.chain list | ||
77 | * @hw_desc: virtual address of the hardware descriptor chain | ||
78 | * @phys: hardware address of the hardware descriptor chain | ||
79 | * @group_head: first operation in a transaction | ||
80 | * @slot_cnt: total slots used in an transaction (group of operations) | ||
81 | * @slots_per_op: number of slots per operation | ||
82 | * @idx: pool index | ||
83 | * @unmap_src_cnt: number of xor sources | ||
84 | * @unmap_len: transaction bytecount | ||
85 | * @async_tx: support for the async_tx api | ||
86 | * @group_list: list of slots that make up a multi-descriptor transaction | ||
87 | * for example transfer lengths larger than the supported hw max | ||
88 | * @xor_check_result: result of zero sum | ||
89 | * @crc32_result: result crc calculation | ||
90 | */ | ||
91 | struct iop_adma_desc_slot { | ||
92 | struct list_head slot_node; | ||
93 | struct list_head chain_node; | ||
94 | void *hw_desc; | ||
95 | struct iop_adma_desc_slot *group_head; | ||
96 | u16 slot_cnt; | ||
97 | u16 slots_per_op; | ||
98 | u16 idx; | ||
99 | u16 unmap_src_cnt; | ||
100 | size_t unmap_len; | ||
101 | struct dma_async_tx_descriptor async_tx; | ||
102 | union { | ||
103 | u32 *xor_check_result; | ||
104 | u32 *crc32_result; | ||
105 | }; | ||
106 | }; | ||
107 | |||
108 | struct iop_adma_platform_data { | ||
109 | int hw_id; | ||
110 | dma_cap_mask_t cap_mask; | ||
111 | size_t pool_size; | ||
112 | }; | ||
113 | |||
114 | #define to_iop_sw_desc(addr_hw_desc) \ | ||
115 | container_of(addr_hw_desc, struct iop_adma_desc_slot, hw_desc) | ||
116 | #define iop_hw_desc_slot_idx(hw_desc, idx) \ | ||
117 | ( (void *) (((unsigned long) hw_desc) + ((idx) << 5)) ) | ||
118 | #endif | ||
diff --git a/include/asm-arm/hwcap.h b/include/asm-arm/hwcap.h new file mode 100644 index 000000000000..01a1391d3014 --- /dev/null +++ b/include/asm-arm/hwcap.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __ASMARM_HWCAP_H | ||
2 | #define __ASMARM_HWCAP_H | ||
3 | |||
4 | /* | ||
5 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
6 | */ | ||
7 | #define HWCAP_SWP 1 | ||
8 | #define HWCAP_HALF 2 | ||
9 | #define HWCAP_THUMB 4 | ||
10 | #define HWCAP_26BIT 8 /* Play it safe */ | ||
11 | #define HWCAP_FAST_MULT 16 | ||
12 | #define HWCAP_FPA 32 | ||
13 | #define HWCAP_VFP 64 | ||
14 | #define HWCAP_EDSP 128 | ||
15 | #define HWCAP_JAVA 256 | ||
16 | #define HWCAP_IWMMXT 512 | ||
17 | #define HWCAP_CRUNCH 1024 | ||
18 | |||
19 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | ||
20 | /* | ||
21 | * This yields a mask that user programs can use to figure out what | ||
22 | * instruction set this cpu supports. | ||
23 | */ | ||
24 | #define ELF_HWCAP (elf_hwcap) | ||
25 | extern unsigned int elf_hwcap; | ||
26 | #endif | ||
27 | |||
28 | #endif | ||
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index f21abd4ddac6..ed3f898191f4 100644 --- a/include/asm-arm/pci.h +++ b/include/asm-arm/pci.h | |||
@@ -26,11 +26,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
26 | #define PCI_DMA_BUS_IS_PHYS (0) | 26 | #define PCI_DMA_BUS_IS_PHYS (0) |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * We don't support DAC DMA cycles. | ||
30 | */ | ||
31 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
32 | |||
33 | /* | ||
34 | * Whether pci_unmap_{single,page} is a nop depends upon the | 29 | * Whether pci_unmap_{single,page} is a nop depends upon the |
35 | * configuration. | 30 | * configuration. |
36 | */ | 31 | */ |
@@ -76,10 +71,6 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
76 | return root; | 71 | return root; |
77 | } | 72 | } |
78 | 73 | ||
79 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
80 | { | ||
81 | } | ||
82 | |||
83 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
84 | 75 | ||
85 | #endif | 76 | #endif |
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 21dec9f258d8..cb4c2c9d000a 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -257,9 +257,7 @@ extern struct page *empty_zero_page; | |||
257 | * Undefined behaviour if not.. | 257 | * Undefined behaviour if not.. |
258 | */ | 258 | */ |
259 | #define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) | 259 | #define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) |
260 | #define pte_read(pte) (pte_val(pte) & L_PTE_USER) | ||
261 | #define pte_write(pte) (pte_val(pte) & L_PTE_WRITE) | 260 | #define pte_write(pte) (pte_val(pte) & L_PTE_WRITE) |
262 | #define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC) | ||
263 | #define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) | 261 | #define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) |
264 | #define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) | 262 | #define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) |
265 | 263 | ||
@@ -275,12 +273,8 @@ extern struct page *empty_zero_page; | |||
275 | #define PTE_BIT_FUNC(fn,op) \ | 273 | #define PTE_BIT_FUNC(fn,op) \ |
276 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } | 274 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } |
277 | 275 | ||
278 | /*PTE_BIT_FUNC(rdprotect, &= ~L_PTE_USER);*/ | ||
279 | /*PTE_BIT_FUNC(mkread, |= L_PTE_USER);*/ | ||
280 | PTE_BIT_FUNC(wrprotect, &= ~L_PTE_WRITE); | 276 | PTE_BIT_FUNC(wrprotect, &= ~L_PTE_WRITE); |
281 | PTE_BIT_FUNC(mkwrite, |= L_PTE_WRITE); | 277 | PTE_BIT_FUNC(mkwrite, |= L_PTE_WRITE); |
282 | PTE_BIT_FUNC(exprotect, &= ~L_PTE_EXEC); | ||
283 | PTE_BIT_FUNC(mkexec, |= L_PTE_EXEC); | ||
284 | PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY); | 278 | PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY); |
285 | PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY); | 279 | PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY); |
286 | PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG); | 280 | PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG); |
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index ee3d93c281d8..7aaa206cb54e 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __ASM_ARM_PTRACE_H | 10 | #ifndef __ASM_ARM_PTRACE_H |
11 | #define __ASM_ARM_PTRACE_H | 11 | #define __ASM_ARM_PTRACE_H |
12 | 12 | ||
13 | #include <asm/hwcap.h> | ||
14 | |||
13 | #define PTRACE_GETREGS 12 | 15 | #define PTRACE_GETREGS 12 |
14 | #define PTRACE_SETREGS 13 | 16 | #define PTRACE_SETREGS 13 |
15 | #define PTRACE_GETFPREGS 14 | 17 | #define PTRACE_GETFPREGS 14 |
@@ -45,6 +47,7 @@ | |||
45 | #define PSR_T_BIT 0x00000020 | 47 | #define PSR_T_BIT 0x00000020 |
46 | #define PSR_F_BIT 0x00000040 | 48 | #define PSR_F_BIT 0x00000040 |
47 | #define PSR_I_BIT 0x00000080 | 49 | #define PSR_I_BIT 0x00000080 |
50 | #define PSR_A_BIT 0x00000100 | ||
48 | #define PSR_J_BIT 0x01000000 | 51 | #define PSR_J_BIT 0x01000000 |
49 | #define PSR_Q_BIT 0x08000000 | 52 | #define PSR_Q_BIT 0x08000000 |
50 | #define PSR_V_BIT 0x10000000 | 53 | #define PSR_V_BIT 0x10000000 |
@@ -103,6 +106,10 @@ struct pt_regs { | |||
103 | #define thumb_mode(regs) (0) | 106 | #define thumb_mode(regs) (0) |
104 | #endif | 107 | #endif |
105 | 108 | ||
109 | #define isa_mode(regs) \ | ||
110 | ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \ | ||
111 | (((regs)->ARM_cpsr & PSR_T_BIT) >> 5)) | ||
112 | |||
106 | #define processor_mode(regs) \ | 113 | #define processor_mode(regs) \ |
107 | ((regs)->ARM_cpsr & MODE_MASK) | 114 | ((regs)->ARM_cpsr & MODE_MASK) |
108 | 115 | ||
@@ -117,14 +124,17 @@ struct pt_regs { | |||
117 | */ | 124 | */ |
118 | static inline int valid_user_regs(struct pt_regs *regs) | 125 | static inline int valid_user_regs(struct pt_regs *regs) |
119 | { | 126 | { |
120 | if (user_mode(regs) && | 127 | if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) { |
121 | (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0) | 128 | regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); |
122 | return 1; | 129 | return 1; |
130 | } | ||
123 | 131 | ||
124 | /* | 132 | /* |
125 | * Force CPSR to something logical... | 133 | * Force CPSR to something logical... |
126 | */ | 134 | */ |
127 | regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; | 135 | regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT; |
136 | if (!(elf_hwcap & HWCAP_26BIT)) | ||
137 | regs->ARM_cpsr |= USR_MODE; | ||
128 | 138 | ||
129 | return 0; | 139 | return 0; |
130 | } | 140 | } |
diff --git a/include/asm-arm26/dma-mapping.h b/include/asm-arm26/dma-mapping.h deleted file mode 100644 index a95eae0aeb77..000000000000 --- a/include/asm-arm26/dma-mapping.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #include <asm-generic/dma-mapping-broken.h> | ||
2 | |||
diff --git a/include/asm-arm26/ioctls.h b/include/asm-arm26/ioctls.h index ba9c7d81d24e..8a3296200be1 100644 --- a/include/asm-arm26/ioctls.h +++ b/include/asm-arm26/ioctls.h | |||
@@ -47,6 +47,10 @@ | |||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
50 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
51 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
52 | 56 | ||
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 2b20e9f08857..55a1a697d12b 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h | |||
@@ -218,9 +218,7 @@ extern struct page *empty_zero_page; | |||
218 | * The following only work if pte_present() is true. | 218 | * The following only work if pte_present() is true. |
219 | * Undefined behaviour if not.. | 219 | * Undefined behaviour if not.. |
220 | */ | 220 | */ |
221 | #define pte_read(pte) (!(pte_val(pte) & _PAGE_NOT_USER)) | ||
222 | #define pte_write(pte) (!(pte_val(pte) & _PAGE_READONLY)) | 221 | #define pte_write(pte) (!(pte_val(pte) & _PAGE_READONLY)) |
223 | #define pte_exec(pte) (!(pte_val(pte) & _PAGE_NOT_USER)) | ||
224 | #define pte_dirty(pte) (!(pte_val(pte) & _PAGE_CLEAN)) | 222 | #define pte_dirty(pte) (!(pte_val(pte) & _PAGE_CLEAN)) |
225 | #define pte_young(pte) (!(pte_val(pte) & _PAGE_OLD)) | 223 | #define pte_young(pte) (!(pte_val(pte) & _PAGE_OLD)) |
226 | //ONLY when !pte_present() I think. nicked from arm32 (FIXME!) | 224 | //ONLY when !pte_present() I think. nicked from arm32 (FIXME!) |
@@ -231,8 +229,6 @@ static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } | |||
231 | 229 | ||
232 | PTE_BIT_FUNC(wrprotect, |= _PAGE_READONLY); | 230 | PTE_BIT_FUNC(wrprotect, |= _PAGE_READONLY); |
233 | PTE_BIT_FUNC(mkwrite, &= ~_PAGE_READONLY); | 231 | PTE_BIT_FUNC(mkwrite, &= ~_PAGE_READONLY); |
234 | PTE_BIT_FUNC(exprotect, |= _PAGE_NOT_USER); | ||
235 | PTE_BIT_FUNC(mkexec, &= ~_PAGE_NOT_USER); | ||
236 | PTE_BIT_FUNC(mkclean, |= _PAGE_CLEAN); | 232 | PTE_BIT_FUNC(mkclean, |= _PAGE_CLEAN); |
237 | PTE_BIT_FUNC(mkdirty, &= ~_PAGE_CLEAN); | 233 | PTE_BIT_FUNC(mkdirty, &= ~_PAGE_CLEAN); |
238 | PTE_BIT_FUNC(mkold, |= _PAGE_OLD); | 234 | PTE_BIT_FUNC(mkold, |= _PAGE_OLD); |
diff --git a/include/asm-arm26/termbits.h b/include/asm-arm26/termbits.h index a3f4fe1742d0..48d2f5c7bcb8 100644 --- a/include/asm-arm26/termbits.h +++ b/include/asm-arm26/termbits.h | |||
@@ -15,7 +15,7 @@ struct termios { | |||
15 | cc_t c_cc[NCCS]; /* control characters */ | 15 | cc_t c_cc[NCCS]; /* control characters */ |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct ktermios { | 18 | struct termios2 { |
19 | tcflag_t c_iflag; /* input mode flags */ | 19 | tcflag_t c_iflag; /* input mode flags */ |
20 | tcflag_t c_oflag; /* output mode flags */ | 20 | tcflag_t c_oflag; /* output mode flags */ |
21 | tcflag_t c_cflag; /* control mode flags */ | 21 | tcflag_t c_cflag; /* control mode flags */ |
@@ -26,6 +26,16 @@ struct ktermios { | |||
26 | speed_t c_ospeed; /* output speed */ | 26 | speed_t c_ospeed; /* output speed */ |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct ktermios { | ||
30 | tcflag_t c_iflag; /* input mode flags */ | ||
31 | tcflag_t c_oflag; /* output mode flags */ | ||
32 | tcflag_t c_cflag; /* control mode flags */ | ||
33 | tcflag_t c_lflag; /* local mode flags */ | ||
34 | cc_t c_line; /* line discipline */ | ||
35 | cc_t c_cc[NCCS]; /* control characters */ | ||
36 | speed_t c_ispeed; /* input speed */ | ||
37 | speed_t c_ospeed; /* output speed */ | ||
38 | }; | ||
29 | 39 | ||
30 | /* c_cc characters */ | 40 | /* c_cc characters */ |
31 | #define VINTR 0 | 41 | #define VINTR 0 |
@@ -128,6 +138,7 @@ struct ktermios { | |||
128 | #define HUPCL 0002000 | 138 | #define HUPCL 0002000 |
129 | #define CLOCAL 0004000 | 139 | #define CLOCAL 0004000 |
130 | #define CBAUDEX 0010000 | 140 | #define CBAUDEX 0010000 |
141 | #define BOTHER 0010000 | ||
131 | #define B57600 0010001 | 142 | #define B57600 0010001 |
132 | #define B115200 0010002 | 143 | #define B115200 0010002 |
133 | #define B230400 0010003 | 144 | #define B230400 0010003 |
@@ -143,10 +154,12 @@ struct ktermios { | |||
143 | #define B3000000 0010015 | 154 | #define B3000000 0010015 |
144 | #define B3500000 0010016 | 155 | #define B3500000 0010016 |
145 | #define B4000000 0010017 | 156 | #define B4000000 0010017 |
146 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 157 | #define CIBAUD 002003600000 /* input baud rate */ |
147 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 158 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
148 | #define CRTSCTS 020000000000 /* flow control */ | 159 | #define CRTSCTS 020000000000 /* flow control */ |
149 | 160 | ||
161 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
162 | |||
150 | /* c_lflag bits */ | 163 | /* c_lflag bits */ |
151 | #define ISIG 0000001 | 164 | #define ISIG 0000001 |
152 | #define ICANON 0000002 | 165 | #define ICANON 0000002 |
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h index 329c324c4040..293e3f1bc3f2 100644 --- a/include/asm-arm26/termios.h +++ b/include/asm-arm26/termios.h | |||
@@ -82,8 +82,10 @@ struct termio { | |||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
83 | }) | 83 | }) |
84 | 84 | ||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
87 | 89 | ||
88 | #endif /* __KERNEL__ */ | 90 | #endif /* __KERNEL__ */ |
89 | 91 | ||
diff --git a/include/asm-avr32/pgtable.h b/include/asm-avr32/pgtable.h index f6cc2b0f75c3..c07bdd10b891 100644 --- a/include/asm-avr32/pgtable.h +++ b/include/asm-avr32/pgtable.h | |||
@@ -201,18 +201,10 @@ extern struct page *empty_zero_page; | |||
201 | * The following only work if pte_present() is true. | 201 | * The following only work if pte_present() is true. |
202 | * Undefined behaviour if not.. | 202 | * Undefined behaviour if not.. |
203 | */ | 203 | */ |
204 | static inline int pte_read(pte_t pte) | ||
205 | { | ||
206 | return pte_val(pte) & _PAGE_USER; | ||
207 | } | ||
208 | static inline int pte_write(pte_t pte) | 204 | static inline int pte_write(pte_t pte) |
209 | { | 205 | { |
210 | return pte_val(pte) & _PAGE_RW; | 206 | return pte_val(pte) & _PAGE_RW; |
211 | } | 207 | } |
212 | static inline int pte_exec(pte_t pte) | ||
213 | { | ||
214 | return pte_val(pte) & _PAGE_EXECUTE; | ||
215 | } | ||
216 | static inline int pte_dirty(pte_t pte) | 208 | static inline int pte_dirty(pte_t pte) |
217 | { | 209 | { |
218 | return pte_val(pte) & _PAGE_DIRTY; | 210 | return pte_val(pte) & _PAGE_DIRTY; |
@@ -231,21 +223,11 @@ static inline int pte_file(pte_t pte) | |||
231 | } | 223 | } |
232 | 224 | ||
233 | /* Mutator functions for PTE bits */ | 225 | /* Mutator functions for PTE bits */ |
234 | static inline pte_t pte_rdprotect(pte_t pte) | ||
235 | { | ||
236 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); | ||
237 | return pte; | ||
238 | } | ||
239 | static inline pte_t pte_wrprotect(pte_t pte) | 226 | static inline pte_t pte_wrprotect(pte_t pte) |
240 | { | 227 | { |
241 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); | 228 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); |
242 | return pte; | 229 | return pte; |
243 | } | 230 | } |
244 | static inline pte_t pte_exprotect(pte_t pte) | ||
245 | { | ||
246 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_EXECUTE)); | ||
247 | return pte; | ||
248 | } | ||
249 | static inline pte_t pte_mkclean(pte_t pte) | 231 | static inline pte_t pte_mkclean(pte_t pte) |
250 | { | 232 | { |
251 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); | 233 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); |
@@ -256,21 +238,11 @@ static inline pte_t pte_mkold(pte_t pte) | |||
256 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); | 238 | set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); |
257 | return pte; | 239 | return pte; |
258 | } | 240 | } |
259 | static inline pte_t pte_mkread(pte_t pte) | ||
260 | { | ||
261 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); | ||
262 | return pte; | ||
263 | } | ||
264 | static inline pte_t pte_mkwrite(pte_t pte) | 241 | static inline pte_t pte_mkwrite(pte_t pte) |
265 | { | 242 | { |
266 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); | 243 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); |
267 | return pte; | 244 | return pte; |
268 | } | 245 | } |
269 | static inline pte_t pte_mkexec(pte_t pte) | ||
270 | { | ||
271 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_EXECUTE)); | ||
272 | return pte; | ||
273 | } | ||
274 | static inline pte_t pte_mkdirty(pte_t pte) | 246 | static inline pte_t pte_mkdirty(pte_t pte) |
275 | { | 247 | { |
276 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); | 248 | set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); |
diff --git a/include/asm-avr32/termbits.h b/include/asm-avr32/termbits.h index c215fafdae4d..db2daab31fdb 100644 --- a/include/asm-avr32/termbits.h +++ b/include/asm-avr32/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-blackfin/Kbuild b/include/asm-blackfin/Kbuild index c68e1680da01..71f8fe783258 100644 --- a/include/asm-blackfin/Kbuild +++ b/include/asm-blackfin/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | header-y += fixed_code.h | ||
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 57f37ccdcdf1..c4d6cbbf96d4 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -67,6 +67,18 @@ extern void evt14_softirq(void); | |||
67 | extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs); | 67 | extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs); |
68 | extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type); | 68 | extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type); |
69 | 69 | ||
70 | extern asmlinkage void finish_atomic_sections (struct pt_regs *regs); | ||
71 | extern char fixed_code_start; | ||
72 | extern char fixed_code_end; | ||
73 | extern int atomic_xchg32(void); | ||
74 | extern int atomic_cas32(void); | ||
75 | extern int atomic_add32(void); | ||
76 | extern int atomic_sub32(void); | ||
77 | extern int atomic_ior32(void); | ||
78 | extern int atomic_and32(void); | ||
79 | extern int atomic_xor32(void); | ||
80 | extern void sigreturn_stub(void); | ||
81 | |||
70 | extern void *l1_data_A_sram_alloc(size_t); | 82 | extern void *l1_data_A_sram_alloc(size_t); |
71 | extern void *l1_data_B_sram_alloc(size_t); | 83 | extern void *l1_data_B_sram_alloc(size_t); |
72 | extern void *l1_inst_sram_alloc(size_t); | 84 | extern void *l1_inst_sram_alloc(size_t); |
diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h index 3bad2d1e6a8c..bec6ecdf1bdb 100644 --- a/include/asm-blackfin/cplbinit.h +++ b/include/asm-blackfin/cplbinit.h | |||
@@ -57,8 +57,8 @@ struct cplb_tab { | |||
57 | u16 size; | 57 | u16 size; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | u_long icplb_table[MAX_CPLBS+1]; | 60 | extern u_long icplb_table[MAX_CPLBS+1]; |
61 | u_long dcplb_table[MAX_CPLBS+1]; | 61 | extern u_long dcplb_table[MAX_CPLBS+1]; |
62 | 62 | ||
63 | /* Till here we are discussing about the static memory management model. | 63 | /* Till here we are discussing about the static memory management model. |
64 | * However, the operating envoronments commonly define more CPLB | 64 | * However, the operating envoronments commonly define more CPLB |
@@ -70,134 +70,27 @@ u_long dcplb_table[MAX_CPLBS+1]; | |||
70 | */ | 70 | */ |
71 | 71 | ||
72 | #ifdef CONFIG_CPLB_SWITCH_TAB_L1 | 72 | #ifdef CONFIG_CPLB_SWITCH_TAB_L1 |
73 | u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); | 73 | extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); |
74 | u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); | 74 | extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); |
75 | 75 | ||
76 | #ifdef CONFIG_CPLB_INFO | 76 | #ifdef CONFIG_CPLB_INFO |
77 | u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); | 77 | extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); |
78 | u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); | 78 | extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); |
79 | #endif /* CONFIG_CPLB_INFO */ | 79 | #endif /* CONFIG_CPLB_INFO */ |
80 | 80 | ||
81 | #else | 81 | #else |
82 | 82 | ||
83 | u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; | 83 | extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; |
84 | u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; | 84 | extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; |
85 | 85 | ||
86 | #ifdef CONFIG_CPLB_INFO | 86 | #ifdef CONFIG_CPLB_INFO |
87 | u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; | 87 | extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; |
88 | u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; | 88 | extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; |
89 | #endif /* CONFIG_CPLB_INFO */ | 89 | #endif /* CONFIG_CPLB_INFO */ |
90 | 90 | ||
91 | #endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ | 91 | #endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ |
92 | 92 | ||
93 | struct s_cplb { | 93 | extern unsigned long reserved_mem_dcache_on; |
94 | struct cplb_tab init_i; | 94 | extern unsigned long reserved_mem_icache_on; |
95 | struct cplb_tab init_d; | ||
96 | struct cplb_tab switch_i; | ||
97 | struct cplb_tab switch_d; | ||
98 | }; | ||
99 | 95 | ||
100 | #if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) | 96 | extern void generate_cpl_tables(void); |
101 | static struct cplb_desc cplb_data[] = { | ||
102 | { | ||
103 | .start = 0, | ||
104 | .end = SIZE_4K, | ||
105 | .psize = SIZE_4K, | ||
106 | .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB, | ||
107 | .i_conf = SDRAM_OOPS, | ||
108 | .d_conf = SDRAM_OOPS, | ||
109 | #if defined(CONFIG_DEBUG_HUNT_FOR_ZERO) | ||
110 | .valid = 1, | ||
111 | #else | ||
112 | .valid = 0, | ||
113 | #endif | ||
114 | .name = "ZERO Pointer Saveguard", | ||
115 | }, | ||
116 | { | ||
117 | .start = L1_CODE_START, | ||
118 | .end = L1_CODE_START + L1_CODE_LENGTH, | ||
119 | .psize = SIZE_4M, | ||
120 | .attr = INITIAL_T | SWITCH_T | I_CPLB, | ||
121 | .i_conf = L1_IMEMORY, | ||
122 | .d_conf = 0, | ||
123 | .valid = 1, | ||
124 | .name = "L1 I-Memory", | ||
125 | }, | ||
126 | { | ||
127 | .start = L1_DATA_A_START, | ||
128 | .end = L1_DATA_B_START + L1_DATA_B_LENGTH, | ||
129 | .psize = SIZE_4M, | ||
130 | .attr = INITIAL_T | SWITCH_T | D_CPLB, | ||
131 | .i_conf = 0, | ||
132 | .d_conf = L1_DMEMORY, | ||
133 | #if ((L1_DATA_A_LENGTH > 0) || (L1_DATA_B_LENGTH > 0)) | ||
134 | .valid = 1, | ||
135 | #else | ||
136 | .valid = 0, | ||
137 | #endif | ||
138 | .name = "L1 D-Memory", | ||
139 | }, | ||
140 | { | ||
141 | .start = 0, | ||
142 | .end = 0, /* dynamic */ | ||
143 | .psize = 0, | ||
144 | .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB, | ||
145 | .i_conf = SDRAM_IGENERIC, | ||
146 | .d_conf = SDRAM_DGENERIC, | ||
147 | .valid = 1, | ||
148 | .name = "SDRAM Kernel", | ||
149 | }, | ||
150 | { | ||
151 | .start = 0, /* dynamic */ | ||
152 | .end = 0, /* dynamic */ | ||
153 | .psize = 0, | ||
154 | .attr = INITIAL_T | SWITCH_T | D_CPLB, | ||
155 | .i_conf = SDRAM_IGENERIC, | ||
156 | .d_conf = SDRAM_DNON_CHBL, | ||
157 | .valid = 1, | ||
158 | .name = "SDRAM RAM MTD", | ||
159 | }, | ||
160 | { | ||
161 | .start = 0, /* dynamic */ | ||
162 | .end = 0, /* dynamic */ | ||
163 | .psize = SIZE_1M, | ||
164 | .attr = INITIAL_T | SWITCH_T | D_CPLB, | ||
165 | .d_conf = SDRAM_DNON_CHBL, | ||
166 | .valid = 1,//(DMA_UNCACHED_REGION > 0), | ||
167 | .name = "SDRAM Uncached DMA ZONE", | ||
168 | }, | ||
169 | { | ||
170 | .start = 0, /* dynamic */ | ||
171 | .end = 0, /* dynamic */ | ||
172 | .psize = 0, | ||
173 | .attr = SWITCH_T | D_CPLB, | ||
174 | .i_conf = 0, /* dynamic */ | ||
175 | .d_conf = 0, /* dynamic */ | ||
176 | .valid = 1, | ||
177 | .name = "SDRAM Reserved Memory", | ||
178 | }, | ||
179 | { | ||
180 | .start = ASYNC_BANK0_BASE, | ||
181 | .end = ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE, | ||
182 | .psize = 0, | ||
183 | .attr = SWITCH_T | D_CPLB, | ||
184 | .d_conf = SDRAM_EBIU, | ||
185 | .valid = 1, | ||
186 | .name = "ASYNC Memory", | ||
187 | }, | ||
188 | { | ||
189 | #if defined(CONFIG_BF561) | ||
190 | .start = L2_SRAM, | ||
191 | .end = L2_SRAM_END, | ||
192 | .psize = SIZE_1M, | ||
193 | .attr = SWITCH_T | D_CPLB, | ||
194 | .i_conf = L2_MEMORY, | ||
195 | .d_conf = L2_MEMORY, | ||
196 | .valid = 1, | ||
197 | #else | ||
198 | .valid = 0, | ||
199 | #endif | ||
200 | .name = "L2 Memory", | ||
201 | } | ||
202 | }; | ||
203 | #endif | ||
diff --git a/include/asm-blackfin/fixed_code.h b/include/asm-blackfin/fixed_code.h new file mode 100644 index 000000000000..e6df84ee1557 --- /dev/null +++ b/include/asm-blackfin/fixed_code.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* This file defines the fixed addresses where userspace programs can find | ||
2 | atomic code sequences. */ | ||
3 | |||
4 | #define FIXED_CODE_START 0x400 | ||
5 | |||
6 | #define SIGRETURN_STUB 0x400 | ||
7 | |||
8 | #define ATOMIC_SEQS_START 0x410 | ||
9 | |||
10 | #define ATOMIC_XCHG32 0x410 | ||
11 | #define ATOMIC_CAS32 0x420 | ||
12 | #define ATOMIC_ADD32 0x430 | ||
13 | #define ATOMIC_SUB32 0x440 | ||
14 | #define ATOMIC_IOR32 0x450 | ||
15 | #define ATOMIC_AND32 0x460 | ||
16 | #define ATOMIC_XOR32 0x470 | ||
17 | |||
18 | #define ATOMIC_SEQS_END 0x480 | ||
19 | |||
20 | #define FIXED_CODE_END 0x480 | ||
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index d98d77ad71f7..7480cfa7e2d6 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -204,8 +204,62 @@ | |||
204 | 204 | ||
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | #ifdef BF548_FAMILY | ||
208 | #include <asm-blackfin/mach-bf548/gpio.h> | ||
209 | #endif | ||
210 | |||
207 | #ifdef BF561_FAMILY | 211 | #ifdef BF561_FAMILY |
208 | #define MAX_BLACKFIN_GPIOS 48 | 212 | #define MAX_BLACKFIN_GPIOS 48 |
213 | |||
214 | #define GPIO_PF0 0 | ||
215 | #define GPIO_PF1 1 | ||
216 | #define GPIO_PF2 2 | ||
217 | #define GPIO_PF3 3 | ||
218 | #define GPIO_PF4 4 | ||
219 | #define GPIO_PF5 5 | ||
220 | #define GPIO_PF6 6 | ||
221 | #define GPIO_PF7 7 | ||
222 | #define GPIO_PF8 8 | ||
223 | #define GPIO_PF9 9 | ||
224 | #define GPIO_PF10 10 | ||
225 | #define GPIO_PF11 11 | ||
226 | #define GPIO_PF12 12 | ||
227 | #define GPIO_PF13 13 | ||
228 | #define GPIO_PF14 14 | ||
229 | #define GPIO_PF15 15 | ||
230 | #define GPIO_PF16 16 | ||
231 | #define GPIO_PF17 17 | ||
232 | #define GPIO_PF18 18 | ||
233 | #define GPIO_PF19 19 | ||
234 | #define GPIO_PF20 20 | ||
235 | #define GPIO_PF21 21 | ||
236 | #define GPIO_PF22 22 | ||
237 | #define GPIO_PF23 23 | ||
238 | #define GPIO_PF24 24 | ||
239 | #define GPIO_PF25 25 | ||
240 | #define GPIO_PF26 26 | ||
241 | #define GPIO_PF27 27 | ||
242 | #define GPIO_PF28 28 | ||
243 | #define GPIO_PF29 29 | ||
244 | #define GPIO_PF30 30 | ||
245 | #define GPIO_PF31 31 | ||
246 | #define GPIO_PF32 32 | ||
247 | #define GPIO_PF33 33 | ||
248 | #define GPIO_PF34 34 | ||
249 | #define GPIO_PF35 35 | ||
250 | #define GPIO_PF36 36 | ||
251 | #define GPIO_PF37 37 | ||
252 | #define GPIO_PF38 38 | ||
253 | #define GPIO_PF39 39 | ||
254 | #define GPIO_PF40 40 | ||
255 | #define GPIO_PF41 41 | ||
256 | #define GPIO_PF42 42 | ||
257 | #define GPIO_PF43 43 | ||
258 | #define GPIO_PF44 44 | ||
259 | #define GPIO_PF45 45 | ||
260 | #define GPIO_PF46 46 | ||
261 | #define GPIO_PF47 47 | ||
262 | |||
209 | #define PORT_FIO0 GPIO_0 | 263 | #define PORT_FIO0 GPIO_0 |
210 | #define PORT_FIO1 GPIO_16 | 264 | #define PORT_FIO1 GPIO_16 |
211 | #define PORT_FIO2 GPIO_32 | 265 | #define PORT_FIO2 GPIO_32 |
@@ -230,6 +284,7 @@ | |||
230 | * MODIFICATION HISTORY : | 284 | * MODIFICATION HISTORY : |
231 | **************************************************************/ | 285 | **************************************************************/ |
232 | 286 | ||
287 | #ifndef BF548_FAMILY | ||
233 | void set_gpio_dir(unsigned short, unsigned short); | 288 | void set_gpio_dir(unsigned short, unsigned short); |
234 | void set_gpio_inen(unsigned short, unsigned short); | 289 | void set_gpio_inen(unsigned short, unsigned short); |
235 | void set_gpio_polar(unsigned short, unsigned short); | 290 | void set_gpio_polar(unsigned short, unsigned short); |
@@ -299,6 +354,7 @@ struct gpio_port_t { | |||
299 | unsigned short dummy16; | 354 | unsigned short dummy16; |
300 | unsigned short inen; | 355 | unsigned short inen; |
301 | }; | 356 | }; |
357 | #endif | ||
302 | 358 | ||
303 | #ifdef CONFIG_PM | 359 | #ifdef CONFIG_PM |
304 | #define PM_WAKE_RISING 0x1 | 360 | #define PM_WAKE_RISING 0x1 |
@@ -357,8 +413,10 @@ void gpio_free(unsigned short); | |||
357 | void gpio_set_value(unsigned short gpio, unsigned short arg); | 413 | void gpio_set_value(unsigned short gpio, unsigned short arg); |
358 | unsigned short gpio_get_value(unsigned short gpio); | 414 | unsigned short gpio_get_value(unsigned short gpio); |
359 | 415 | ||
416 | #ifndef BF548_FAMILY | ||
360 | #define gpio_get_value(gpio) get_gpio_data(gpio) | 417 | #define gpio_get_value(gpio) get_gpio_data(gpio) |
361 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 418 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
419 | #endif | ||
362 | 420 | ||
363 | void gpio_direction_input(unsigned short gpio); | 421 | void gpio_direction_input(unsigned short gpio); |
364 | void gpio_direction_output(unsigned short gpio); | 422 | void gpio_direction_output(unsigned short gpio); |
diff --git a/include/asm-blackfin/hardirq.h b/include/asm-blackfin/hardirq.h index 0cab0d35badc..b6b19f1b9dab 100644 --- a/include/asm-blackfin/hardirq.h +++ b/include/asm-blackfin/hardirq.h | |||
@@ -28,7 +28,11 @@ typedef struct { | |||
28 | * SOFTIRQ_MASK: 0x00ff0000 | 28 | * SOFTIRQ_MASK: 0x00ff0000 |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #if NR_IRQS > 256 | ||
32 | #define HARDIRQ_BITS 9 | ||
33 | #else | ||
31 | #define HARDIRQ_BITS 8 | 34 | #define HARDIRQ_BITS 8 |
35 | #endif | ||
32 | 36 | ||
33 | #ifdef NR_IRQS | 37 | #ifdef NR_IRQS |
34 | # if (1 << HARDIRQ_BITS) < NR_IRQS | 38 | # if (1 << HARDIRQ_BITS) < NR_IRQS |
diff --git a/include/asm-blackfin/kgdb.h b/include/asm-blackfin/kgdb.h new file mode 100644 index 000000000000..532bd9052004 --- /dev/null +++ b/include/asm-blackfin/kgdb.h | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/kgdb.h | ||
3 | * Based on: | ||
4 | * Author: Sonic Zhang | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2005-2006 Analog Devices Inc. | ||
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 of the License, or | ||
19 | * (at your option) 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; if not, see the file COPYING, or write | ||
28 | * to the Free Software Foundation, Inc., | ||
29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
30 | */ | ||
31 | |||
32 | #ifndef __ASM_BLACKFIN_KGDB_H__ | ||
33 | #define __ASM_BLACKFIN_KGDB_H__ | ||
34 | |||
35 | #include <linux/ptrace.h> | ||
36 | |||
37 | /* gdb locks */ | ||
38 | #define KGDB_MAX_NO_CPUS 8 | ||
39 | |||
40 | /************************************************************************/ | ||
41 | /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ | ||
42 | /* at least NUMREGBYTES*2 are needed for register packets */ | ||
43 | /* Longer buffer is needed to list all threads */ | ||
44 | #define BUFMAX 2048 | ||
45 | |||
46 | /* | ||
47 | * Note that this register image is different from | ||
48 | * the register image that Linux produces at interrupt time. | ||
49 | * | ||
50 | * Linux's register image is defined by struct pt_regs in ptrace.h. | ||
51 | */ | ||
52 | enum regnames { | ||
53 | /* Core Registers */ | ||
54 | BFIN_R0 = 0, | ||
55 | BFIN_R1, | ||
56 | BFIN_R2, | ||
57 | BFIN_R3, | ||
58 | BFIN_R4, | ||
59 | BFIN_R5, | ||
60 | BFIN_R6, | ||
61 | BFIN_R7, | ||
62 | BFIN_P0, | ||
63 | BFIN_P1, | ||
64 | BFIN_P2, | ||
65 | BFIN_P3, | ||
66 | BFIN_P4, | ||
67 | BFIN_P5, | ||
68 | BFIN_SP, | ||
69 | BFIN_FP, | ||
70 | BFIN_I0, | ||
71 | BFIN_I1, | ||
72 | BFIN_I2, | ||
73 | BFIN_I3, | ||
74 | BFIN_M0, | ||
75 | BFIN_M1, | ||
76 | BFIN_M2, | ||
77 | BFIN_M3, | ||
78 | BFIN_B0, | ||
79 | BFIN_B1, | ||
80 | BFIN_B2, | ||
81 | BFIN_B3, | ||
82 | BFIN_L0, | ||
83 | BFIN_L1, | ||
84 | BFIN_L2, | ||
85 | BFIN_L3, | ||
86 | BFIN_A0_DOT_X, | ||
87 | BFIN_A0_DOT_W, | ||
88 | BFIN_A1_DOT_X, | ||
89 | BFIN_A1_DOT_W, | ||
90 | BFIN_ASTAT, | ||
91 | BFIN_RETS, | ||
92 | BFIN_LC0, | ||
93 | BFIN_LT0, | ||
94 | BFIN_LB0, | ||
95 | BFIN_LC1, | ||
96 | BFIN_LT1, | ||
97 | BFIN_LB1, | ||
98 | BFIN_CYCLES, | ||
99 | BFIN_CYCLES2, | ||
100 | BFIN_USP, | ||
101 | BFIN_SEQSTAT, | ||
102 | BFIN_SYSCFG, | ||
103 | BFIN_RETI, | ||
104 | BFIN_RETX, | ||
105 | BFIN_RETN, | ||
106 | BFIN_RETE, | ||
107 | |||
108 | /* Pseudo Registers */ | ||
109 | BFIN_PC, | ||
110 | BFIN_CC, | ||
111 | BFIN_EXTRA1, /* Address of .text section. */ | ||
112 | BFIN_EXTRA2, /* Address of .data section. */ | ||
113 | BFIN_EXTRA3, /* Address of .bss section. */ | ||
114 | BFIN_FDPIC_EXEC, | ||
115 | BFIN_FDPIC_INTERP, | ||
116 | |||
117 | /* MMRs */ | ||
118 | BFIN_IPEND, | ||
119 | |||
120 | /* LAST ENTRY SHOULD NOT BE CHANGED. */ | ||
121 | BFIN_NUM_REGS /* The number of all registers. */ | ||
122 | }; | ||
123 | |||
124 | /* Number of bytes of registers. */ | ||
125 | #define NUMREGBYTES BFIN_NUM_REGS*4 | ||
126 | |||
127 | #define BREAKPOINT() asm(" EXCPT 2;"); | ||
128 | #define BREAK_INSTR_SIZE 2 | ||
129 | #define HW_BREAKPOINT_NUM 6 | ||
130 | |||
131 | /* Instruction watchpoint address control register bits mask */ | ||
132 | #define WPPWR 0x1 | ||
133 | #define WPIREN01 0x2 | ||
134 | #define WPIRINV01 0x4 | ||
135 | #define WPIAEN0 0x8 | ||
136 | #define WPIAEN1 0x10 | ||
137 | #define WPICNTEN0 0x20 | ||
138 | #define WPICNTEN1 0x40 | ||
139 | #define EMUSW0 0x80 | ||
140 | #define EMUSW1 0x100 | ||
141 | #define WPIREN23 0x200 | ||
142 | #define WPIRINV23 0x400 | ||
143 | #define WPIAEN2 0x800 | ||
144 | #define WPIAEN3 0x1000 | ||
145 | #define WPICNTEN2 0x2000 | ||
146 | #define WPICNTEN3 0x4000 | ||
147 | #define EMUSW2 0x8000 | ||
148 | #define EMUSW3 0x10000 | ||
149 | #define WPIREN45 0x20000 | ||
150 | #define WPIRINV45 0x40000 | ||
151 | #define WPIAEN4 0x80000 | ||
152 | #define WPIAEN5 0x100000 | ||
153 | #define WPICNTEN4 0x200000 | ||
154 | #define WPICNTEN5 0x400000 | ||
155 | #define EMUSW4 0x800000 | ||
156 | #define EMUSW5 0x1000000 | ||
157 | #define WPAND 0x2000000 | ||
158 | |||
159 | /* Data watchpoint address control register bits mask */ | ||
160 | #define WPDREN01 0x1 | ||
161 | #define WPDRINV01 0x2 | ||
162 | #define WPDAEN0 0x4 | ||
163 | #define WPDAEN1 0x8 | ||
164 | #define WPDCNTEN0 0x10 | ||
165 | #define WPDCNTEN1 0x20 | ||
166 | #define WPDSRC0 0xc0 | ||
167 | #define WPDACC0 0x300 | ||
168 | #define WPDSRC1 0xc00 | ||
169 | #define WPDACC1 0x3000 | ||
170 | |||
171 | /* Watchpoint status register bits mask */ | ||
172 | #define STATIA0 0x1 | ||
173 | #define STATIA1 0x2 | ||
174 | #define STATIA2 0x4 | ||
175 | #define STATIA3 0x8 | ||
176 | #define STATIA4 0x10 | ||
177 | #define STATIA5 0x20 | ||
178 | #define STATDA0 0x40 | ||
179 | #define STATDA1 0x80 | ||
180 | |||
181 | extern void kgdb_print(const char *fmt, ...); | ||
182 | |||
183 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf533/dma.h b/include/asm-blackfin/mach-bf533/dma.h index bd9d5e94307d..16c672c01d80 100644 --- a/include/asm-blackfin/mach-bf533/dma.h +++ b/include/asm-blackfin/mach-bf533/dma.h | |||
@@ -51,4 +51,7 @@ | |||
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 | |||
54 | #endif | 57 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/portmux.h b/include/asm-blackfin/mach-bf533/portmux.h new file mode 100644 index 000000000000..b88d7a03ee3e --- /dev/null +++ b/include/asm-blackfin/mach-bf533/portmux.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | ||
2 | #define _MACH_PORTMUX_H_ | ||
3 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | ||
5 | #define P_PPI0_FS1 (P_DONTCARE) | ||
6 | #define P_PPI0_FS2 (P_DONTCARE) | ||
7 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF3)) | ||
8 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF4)) | ||
9 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF5)) | ||
10 | #define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF6)) | ||
11 | #define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF7)) | ||
12 | #define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF8)) | ||
13 | #define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF9)) | ||
14 | #define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF10)) | ||
15 | #define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF11)) | ||
16 | #define P_PPI0_D0 (P_DONTCARE) | ||
17 | #define P_PPI0_D1 (P_DONTCARE) | ||
18 | #define P_PPI0_D2 (P_DONTCARE) | ||
19 | #define P_PPI0_D3 (P_DONTCARE) | ||
20 | #define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF15)) | ||
21 | #define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF14)) | ||
22 | #define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF13)) | ||
23 | #define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF12)) | ||
24 | |||
25 | #define P_SPORT1_TSCLK (P_DONTCARE) | ||
26 | #define P_SPORT1_RSCLK (P_DONTCARE) | ||
27 | #define P_SPORT0_TSCLK (P_DONTCARE) | ||
28 | #define P_SPORT0_RSCLK (P_DONTCARE) | ||
29 | #define P_UART0_RX (P_DONTCARE) | ||
30 | #define P_UART0_TX (P_DONTCARE) | ||
31 | #define P_SPORT1_DRSEC (P_DONTCARE) | ||
32 | #define P_SPORT1_RFS (P_DONTCARE) | ||
33 | #define P_SPORT1_DTPRI (P_DONTCARE) | ||
34 | #define P_SPORT1_DTSEC (P_DONTCARE) | ||
35 | #define P_SPORT1_TFS (P_DONTCARE) | ||
36 | #define P_SPORT1_DRPRI (P_DONTCARE) | ||
37 | #define P_SPORT0_DRSEC (P_DONTCARE) | ||
38 | #define P_SPORT0_RFS (P_DONTCARE) | ||
39 | #define P_SPORT0_DTPRI (P_DONTCARE) | ||
40 | #define P_SPORT0_DTSEC (P_DONTCARE) | ||
41 | #define P_SPORT0_TFS (P_DONTCARE) | ||
42 | #define P_SPORT0_DRPRI (P_DONTCARE) | ||
43 | |||
44 | #define P_SPI0_MOSI (P_DONTCARE) | ||
45 | #define P_SPI0_MIS0 (P_DONTCARE) | ||
46 | #define P_SPI0_SCK (P_DONTCARE) | ||
47 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF7)) | ||
48 | #define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF6)) | ||
49 | #define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5)) | ||
50 | #define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF4)) | ||
51 | #define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF3)) | ||
52 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) | ||
53 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) | ||
54 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) | ||
55 | |||
56 | #define P_TMR2 (P_DONTCARE) | ||
57 | #define P_TMR1 (P_DONTCARE) | ||
58 | #define P_TMR0 (P_DONTCARE) | ||
59 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1)) | ||
60 | |||
61 | |||
62 | |||
63 | |||
64 | |||
65 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf537/dma.h b/include/asm-blackfin/mach-bf537/dma.h index 7a964040870a..021991984e6e 100644 --- a/include/asm-blackfin/mach-bf537/dma.h +++ b/include/asm-blackfin/mach-bf537/dma.h | |||
@@ -52,4 +52,7 @@ | |||
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 | |||
55 | #endif | 58 | #endif |
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h new file mode 100644 index 000000000000..23e13c5abc4d --- /dev/null +++ b/include/asm-blackfin/mach-bf537/portmux.h | |||
@@ -0,0 +1,109 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | ||
2 | #define _MACH_PORTMUX_H_ | ||
3 | |||
4 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | ||
5 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | ||
6 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | ||
7 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0)) | ||
8 | #define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0)) | ||
9 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0)) | ||
10 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0)) | ||
11 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0)) | ||
12 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0)) | ||
13 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0)) | ||
14 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0)) | ||
15 | #define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0)) | ||
16 | #define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0)) | ||
17 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0)) | ||
18 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0)) | ||
19 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0)) | ||
20 | #define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1)) | ||
21 | #define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1)) | ||
22 | #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1)) | ||
23 | #define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1)) | ||
24 | #define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1)) | ||
25 | #define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1)) | ||
26 | #define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1)) | ||
27 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1)) | ||
28 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1)) | ||
29 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1)) | ||
30 | #define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | ||
31 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | ||
32 | |||
33 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0)) | ||
34 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | ||
35 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(0)) | ||
36 | #define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0)) | ||
37 | #define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0)) | ||
38 | #define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0)) | ||
39 | #define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0)) | ||
40 | #define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0)) | ||
41 | #define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0)) | ||
42 | #define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0)) | ||
43 | #define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0)) | ||
44 | #define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0)) | ||
45 | #define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0)) | ||
46 | #define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0)) | ||
47 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0)) | ||
48 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0)) | ||
49 | #define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(1)) | ||
50 | #define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(1)) | ||
51 | #define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(1)) | ||
52 | #define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1)) | ||
53 | #define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) | ||
54 | #define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) | ||
55 | #define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) | ||
56 | #define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) | ||
57 | |||
58 | #define P_MII0_ETxD0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0)) | ||
59 | #define P_MII0_ETxD1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0)) | ||
60 | #define P_MII0_ETxD2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0)) | ||
61 | #define P_MII0_ETxD3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0)) | ||
62 | #define P_MII0_ETxEN (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0)) | ||
63 | #define P_MII0_TxCLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0)) | ||
64 | #define P_MII0_PHYINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0)) | ||
65 | #define P_MII0_COL (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0)) | ||
66 | #define P_MII0_ERxD0 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0)) | ||
67 | #define P_MII0_ERxD1 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0)) | ||
68 | #define P_MII0_ERxD2 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0)) | ||
69 | #define P_MII0_ERxD3 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0)) | ||
70 | #define P_MII0_ERxDV (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0)) | ||
71 | #define P_MII0_ERxCLK (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0)) | ||
72 | #define P_MII0_ERxER (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(0)) | ||
73 | #define P_MII0_CRS (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(0)) | ||
74 | #define P_RMII0_REF_CLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1)) | ||
75 | #define P_RMII0_MDINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1)) | ||
76 | #define P_RMII0_CRS_DV (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(1)) | ||
77 | |||
78 | #define PORT_PJ0 (GPIO_PH15 + 1) | ||
79 | #define PORT_PJ1 (GPIO_PH15 + 2) | ||
80 | #define PORT_PJ2 (GPIO_PH15 + 3) | ||
81 | #define PORT_PJ3 (GPIO_PH15 + 4) | ||
82 | #define PORT_PJ4 (GPIO_PH15 + 5) | ||
83 | #define PORT_PJ5 (GPIO_PH15 + 6) | ||
84 | #define PORT_PJ6 (GPIO_PH15 + 7) | ||
85 | #define PORT_PJ7 (GPIO_PH15 + 8) | ||
86 | #define PORT_PJ8 (GPIO_PH15 + 9) | ||
87 | #define PORT_PJ9 (GPIO_PH15 + 10) | ||
88 | #define PORT_PJ10 (GPIO_PH15 + 11) | ||
89 | #define PORT_PJ11 (GPIO_PH15 + 12) | ||
90 | |||
91 | #define P_MDC (P_DEFINED | P_IDENT(PORT_PJ0) | P_FUNCT(0)) | ||
92 | #define P_MDIO (P_DEFINED | P_IDENT(PORT_PJ1) | P_FUNCT(0)) | ||
93 | #define P_TWI0_SCL (P_DEFINED | P_IDENT(PORT_PJ2) | P_FUNCT(0)) | ||
94 | #define P_TWI0_SDA (P_DEFINED | P_IDENT(PORT_PJ3) | P_FUNCT(0)) | ||
95 | #define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(0)) | ||
96 | #define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(0)) | ||
97 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(PORT_PJ6) | P_FUNCT(0)) | ||
98 | #define P_SPORT0_RFS (P_DEFINED | P_IDENT(PORT_PJ7) | P_FUNCT(0)) | ||
99 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0)) | ||
100 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0)) | ||
101 | #define P_SPORT0_TFS (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0)) | ||
102 | #define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) | ||
103 | #define P_CAN0_RX (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1)) | ||
104 | #define P_CAN0_TX (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1)) | ||
105 | #define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1)) | ||
106 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) | ||
107 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2)) | ||
108 | |||
109 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h new file mode 100644 index 000000000000..aca1d4ba145c --- /dev/null +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -0,0 +1,74 @@ | |||
1 | |||
2 | /* | ||
3 | * File: include/asm-blackfin/mach-bf548/anomaly.h | ||
4 | * Based on: | ||
5 | * Author: | ||
6 | * | ||
7 | * Created: | ||
8 | * Description: | ||
9 | * | ||
10 | * Rev: | ||
11 | * | ||
12 | * Modified: | ||
13 | * | ||
14 | * | ||
15 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License as published by | ||
19 | * the Free Software Foundation; either version 2, or (at your option) | ||
20 | * any later version. | ||
21 | * | ||
22 | * This program is distributed in the hope that it will be useful, | ||
23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 | * GNU General Public License for more details. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License | ||
28 | * along with this program; see the file COPYING. | ||
29 | * If not, write to the Free Software Foundation, | ||
30 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
31 | */ | ||
32 | |||
33 | #ifndef _MACH_ANOMALY_H_ | ||
34 | #define _MACH_ANOMALY_H_ | ||
35 | #define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in | ||
36 | slot1 and store of a P register in slot 2 is not | ||
37 | supported */ | ||
38 | #define ANOMALY_05000119 /* DMA_RUN bit is not valid after a Peripheral Receive | ||
39 | Channel DMA stops */ | ||
40 | #define ANOMALY_05000122 /* Rx.H can not be used to access 16-bit System MMR | ||
41 | registers. */ | ||
42 | #define ANOMALY_05000245 /* Spurious Hardware Error from an Access in the | ||
43 | Shadow of a Conditional Branch */ | ||
44 | #define ANOMALY_05000255 /* Entering Hibernate Mode with RTC Seconds event | ||
45 | interrupt not functional */ | ||
46 | #define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on | ||
47 | SPORT external receive and transmit clocks. */ | ||
48 | #define ANOMALY_05000272 /* Certain data cache write through modes fail for | ||
49 | VDDint <=0.9V */ | ||
50 | #define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is | ||
51 | not restored */ | ||
52 | #define ANOMALY_05000310 /* False Hardware Errors Caused by Fetches at the | ||
53 | Boundary of Reserved Memory */ | ||
54 | #define ANOMALY_05000312 /* Errors When SSYNC, CSYNC, or Loads to LT, LB and | ||
55 | LC Registers Are Interrupted */ | ||
56 | #define ANOMALY_05000324 /* TWI Slave Boot Mode Is Not Functional */ | ||
57 | #define ANOMALY_05000325 /* External FIFO Boot Mode Is Not Functional */ | ||
58 | #define ANOMALY_05000327 /* Data Lost When Core and DMA Accesses Are Made to | ||
59 | the USB FIFO Simultaneously */ | ||
60 | #define ANOMALY_05000328 /* Incorrect Access of OTP_STATUS During otp_write() | ||
61 | function */ | ||
62 | #define ANOMALY_05000329 /* Synchronous Burst Flash Boot Mode Is Not Functional | ||
63 | */ | ||
64 | #define ANOMALY_05000330 /* Host DMA Boot Mode Is Not Functional */ | ||
65 | #define ANOMALY_05000334 /* Inadequate Timing Margins on DDR DQS to DQ and DQM | ||
66 | Skew */ | ||
67 | #define ANOMALY_05000335 /* Inadequate Rotary Debounce Logic Duration */ | ||
68 | #define ANOMALY_05000336 /* Phantom Interrupt Occurs After First Configuration | ||
69 | of Host DMA Port */ | ||
70 | #define ANOMALY_05000337 /* Disallowed Configuration Prevents Subsequent | ||
71 | Allowed Configuration on Host DMA Port */ | ||
72 | #define ANOMALY_05000338 /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ | ||
73 | |||
74 | #endif /* _MACH_ANOMALY_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/bf548.h b/include/asm-blackfin/mach-bf548/bf548.h new file mode 100644 index 000000000000..9498313a2cb7 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/bf548.h | |||
@@ -0,0 +1,271 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/mach-bf548/bf548.h | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: System MMR register and memory map for ADSP-BF548 | ||
8 | * | ||
9 | * Modified: | ||
10 | * Copyright 2004-2007 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | ||
29 | |||
30 | #ifndef __MACH_BF548_H__ | ||
31 | #define __MACH_BF548_H__ | ||
32 | |||
33 | #define SUPPORTED_REVID 0 | ||
34 | |||
35 | #define OFFSET_(x) ((x) & 0x0000FFFF) | ||
36 | |||
37 | /*some misc defines*/ | ||
38 | #define IMASK_IVG15 0x8000 | ||
39 | #define IMASK_IVG14 0x4000 | ||
40 | #define IMASK_IVG13 0x2000 | ||
41 | #define IMASK_IVG12 0x1000 | ||
42 | |||
43 | #define IMASK_IVG11 0x0800 | ||
44 | #define IMASK_IVG10 0x0400 | ||
45 | #define IMASK_IVG9 0x0200 | ||
46 | #define IMASK_IVG8 0x0100 | ||
47 | |||
48 | #define IMASK_IVG7 0x0080 | ||
49 | #define IMASK_IVGTMR 0x0040 | ||
50 | #define IMASK_IVGHW 0x0020 | ||
51 | |||
52 | /***************************/ | ||
53 | |||
54 | |||
55 | #define BLKFIN_DSUBBANKS 4 | ||
56 | #define BLKFIN_DWAYS 2 | ||
57 | #define BLKFIN_DLINES 64 | ||
58 | #define BLKFIN_ISUBBANKS 4 | ||
59 | #define BLKFIN_IWAYS 4 | ||
60 | #define BLKFIN_ILINES 32 | ||
61 | |||
62 | #define WAY0_L 0x1 | ||
63 | #define WAY1_L 0x2 | ||
64 | #define WAY01_L 0x3 | ||
65 | #define WAY2_L 0x4 | ||
66 | #define WAY02_L 0x5 | ||
67 | #define WAY12_L 0x6 | ||
68 | #define WAY012_L 0x7 | ||
69 | |||
70 | #define WAY3_L 0x8 | ||
71 | #define WAY03_L 0x9 | ||
72 | #define WAY13_L 0xA | ||
73 | #define WAY013_L 0xB | ||
74 | |||
75 | #define WAY32_L 0xC | ||
76 | #define WAY320_L 0xD | ||
77 | #define WAY321_L 0xE | ||
78 | #define WAYALL_L 0xF | ||
79 | |||
80 | #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */ | ||
81 | |||
82 | /********************************* EBIU Settings ************************************/ | ||
83 | #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0) | ||
84 | #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2) | ||
85 | |||
86 | #ifdef CONFIG_C_AMBEN_ALL | ||
87 | #define V_AMBEN AMBEN_ALL | ||
88 | #endif | ||
89 | #ifdef CONFIG_C_AMBEN | ||
90 | #define V_AMBEN 0x0 | ||
91 | #endif | ||
92 | #ifdef CONFIG_C_AMBEN_B0 | ||
93 | #define V_AMBEN AMBEN_B0 | ||
94 | #endif | ||
95 | #ifdef CONFIG_C_AMBEN_B0_B1 | ||
96 | #define V_AMBEN AMBEN_B0_B1 | ||
97 | #endif | ||
98 | #ifdef CONFIG_C_AMBEN_B0_B1_B2 | ||
99 | #define V_AMBEN AMBEN_B0_B1_B2 | ||
100 | #endif | ||
101 | #ifdef CONFIG_C_AMCKEN | ||
102 | #define V_AMCKEN AMCKEN | ||
103 | #else | ||
104 | #define V_AMCKEN 0x0 | ||
105 | #endif | ||
106 | |||
107 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN) | ||
108 | |||
109 | #define MAX_VC 650000000 | ||
110 | #define MIN_VC 50000000 | ||
111 | |||
112 | /********************************PLL Settings **************************************/ | ||
113 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | ||
114 | #if (CONFIG_VCO_MULT < 0) | ||
115 | #error "VCO Multiplier is less than 0. Please select a different value" | ||
116 | #endif | ||
117 | |||
118 | #if (CONFIG_VCO_MULT == 0) | ||
119 | #error "VCO Multiplier should be greater than 0. Please select a different value" | ||
120 | #endif | ||
121 | |||
122 | #if (CONFIG_VCO_MULT > 64) | ||
123 | #error "VCO Multiplier is more than 64. Please select a different value" | ||
124 | #endif | ||
125 | |||
126 | #ifndef CONFIG_CLKIN_HALF | ||
127 | #define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT) | ||
128 | #else | ||
129 | #define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2) | ||
130 | #endif | ||
131 | |||
132 | #ifndef CONFIG_PLL_BYPASS | ||
133 | #define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV) | ||
134 | #define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV) | ||
135 | #else | ||
136 | #define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ | ||
137 | #define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ | ||
138 | #endif | ||
139 | |||
140 | #if (CONFIG_SCLK_DIV < 1) | ||
141 | #error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value" | ||
142 | #endif | ||
143 | |||
144 | #if (CONFIG_SCLK_DIV > 15) | ||
145 | #error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value" | ||
146 | #endif | ||
147 | |||
148 | #if (CONFIG_CCLK_DIV != 1) | ||
149 | #if (CONFIG_CCLK_DIV != 2) | ||
150 | #if (CONFIG_CCLK_DIV != 4) | ||
151 | #if (CONFIG_CCLK_DIV != 8) | ||
152 | #error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value" | ||
153 | #endif | ||
154 | #endif | ||
155 | #endif | ||
156 | #endif | ||
157 | |||
158 | #if (CONFIG_VCO_HZ > MAX_VC) | ||
159 | #error "VCO selected is more than maximum value. Please change the VCO multipler" | ||
160 | #endif | ||
161 | |||
162 | #if (CONFIG_SCLK_HZ > 133000000) | ||
163 | #error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier" | ||
164 | #endif | ||
165 | |||
166 | #if (CONFIG_SCLK_HZ < 27000000) | ||
167 | #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier" | ||
168 | #endif | ||
169 | |||
170 | #if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ) | ||
171 | #if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ) | ||
172 | #if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ) | ||
173 | #error "Please select sclk less than cclk" | ||
174 | #endif | ||
175 | #endif | ||
176 | #endif | ||
177 | |||
178 | #if (CONFIG_CCLK_DIV == 1) | ||
179 | #define CONFIG_CCLK_ACT_DIV CCLK_DIV1 | ||
180 | #endif | ||
181 | #if (CONFIG_CCLK_DIV == 2) | ||
182 | #define CONFIG_CCLK_ACT_DIV CCLK_DIV2 | ||
183 | #endif | ||
184 | #if (CONFIG_CCLK_DIV == 4) | ||
185 | #define CONFIG_CCLK_ACT_DIV CCLK_DIV4 | ||
186 | #endif | ||
187 | #if (CONFIG_CCLK_DIV == 8) | ||
188 | #define CONFIG_CCLK_ACT_DIV CCLK_DIV8 | ||
189 | #endif | ||
190 | #ifndef CONFIG_CCLK_ACT_DIV | ||
191 | #define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly | ||
192 | #endif | ||
193 | |||
194 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | ||
195 | |||
196 | #ifdef CONFIG_BF542 | ||
197 | #define CPU "BF542" | ||
198 | #define CPUID 0x027c8000 | ||
199 | #endif | ||
200 | #ifdef CONFIG_BF544 | ||
201 | #define CPU "BF544" | ||
202 | #define CPUID 0x027c8000 | ||
203 | #endif | ||
204 | #ifdef CONFIG_BF548 | ||
205 | #define CPU "BF548" | ||
206 | #define CPUID 0x027c6000 | ||
207 | #endif | ||
208 | #ifdef CONFIG_BF549 | ||
209 | #define CPU "BF549" | ||
210 | #endif | ||
211 | #ifndef CPU | ||
212 | #define CPU "UNKNOWN" | ||
213 | #define CPUID 0x0 | ||
214 | #endif | ||
215 | |||
216 | #if (CONFIG_MEM_SIZE % 4) | ||
217 | #error "SDRAM mem size must be multible of 4MB" | ||
218 | #endif | ||
219 | |||
220 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) | ||
221 | #define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK) | ||
222 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) | ||
223 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) | ||
224 | |||
225 | /*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/ | ||
226 | |||
227 | #define ANOMALY_05000158_WORKAROUND 0x200 | ||
228 | #ifdef CONFIG_BLKFIN_WB /*Write Back Policy */ | ||
229 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \ | ||
230 | | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) | ||
231 | #else /*Write Through */ | ||
232 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW \ | ||
233 | | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY ) | ||
234 | #endif | ||
235 | |||
236 | |||
237 | #define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY ) | ||
238 | #define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY ) | ||
239 | #define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY ) | ||
240 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY ) | ||
241 | |||
242 | #define SIZE_1K 0x00000400 /* 1K */ | ||
243 | #define SIZE_4K 0x00001000 /* 4K */ | ||
244 | #define SIZE_1M 0x00100000 /* 1M */ | ||
245 | #define SIZE_4M 0x00400000 /* 4M */ | ||
246 | |||
247 | #define MAX_CPLBS (16 * 2) | ||
248 | |||
249 | /* | ||
250 | * Number of required data CPLB switchtable entries | ||
251 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
252 | * approx 16 for smaller 1MB page size CPLBs for allignment purposes | ||
253 | * 1 for L1 Data Memory | ||
254 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
255 | * 1 for ASYNC Memory | ||
256 | */ | ||
257 | |||
258 | |||
259 | #define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2) | ||
260 | |||
261 | /* | ||
262 | * Number of required instruction CPLB switchtable entries | ||
263 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
264 | * approx 12 for smaller 1MB page size CPLBs for allignment purposes | ||
265 | * 1 for L1 Instruction Memory | ||
266 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
267 | */ | ||
268 | |||
269 | #define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2) | ||
270 | |||
271 | #endif /* __MACH_BF48_H__ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h new file mode 100644 index 000000000000..2f4afc90db11 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -0,0 +1,193 @@ | |||
1 | #include <linux/serial.h> | ||
2 | #include <asm/dma.h> | ||
3 | |||
4 | #define NR_PORTS 4 | ||
5 | |||
6 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
7 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
8 | #define OFFSET_GCTL 0x08 /* Global Control Register */ | ||
9 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
10 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
11 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
12 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
13 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
14 | #define OFFSET_IER_SET 0x20 /* Set Interrupt Enable Register */ | ||
15 | #define OFFSET_IER_CLEAR 0x24 /* Clear Interrupt Enable Register */ | ||
16 | #define OFFSET_THR 0x28 /* Transmit Holding register */ | ||
17 | #define OFFSET_RBR 0x2C /* Receive Buffer register */ | ||
18 | |||
19 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | ||
20 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | ||
21 | #define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) | ||
22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER_SET)) | ||
23 | #define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) | ||
24 | #define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR)) | ||
25 | #define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) | ||
26 | |||
27 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) | ||
28 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) | ||
29 | #define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v) | ||
30 | #define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v) | ||
31 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) | ||
32 | #define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v) | ||
33 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) | ||
34 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) | ||
35 | |||
36 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | ||
37 | # define CONFIG_SERIAL_BFIN_CTSRTS | ||
38 | |||
39 | # ifndef CONFIG_UART0_CTS_PIN | ||
40 | # define CONFIG_UART0_CTS_PIN -1 | ||
41 | # endif | ||
42 | |||
43 | # ifndef CONFIG_UART0_RTS_PIN | ||
44 | # define CONFIG_UART0_RTS_PIN -1 | ||
45 | # endif | ||
46 | |||
47 | # ifndef CONFIG_UART1_CTS_PIN | ||
48 | # define CONFIG_UART1_CTS_PIN -1 | ||
49 | # endif | ||
50 | |||
51 | # ifndef CONFIG_UART1_RTS_PIN | ||
52 | # define CONFIG_UART1_RTS_PIN -1 | ||
53 | # endif | ||
54 | #endif | ||
55 | /* | ||
56 | * The pin configuration is different from schematic | ||
57 | */ | ||
58 | struct bfin_serial_port { | ||
59 | struct uart_port port; | ||
60 | unsigned int old_status; | ||
61 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
62 | int tx_done; | ||
63 | int tx_count; | ||
64 | struct circ_buf rx_dma_buf; | ||
65 | struct timer_list rx_dma_timer; | ||
66 | int rx_dma_nrows; | ||
67 | unsigned int tx_dma_channel; | ||
68 | unsigned int rx_dma_channel; | ||
69 | struct work_struct tx_dma_workqueue; | ||
70 | #else | ||
71 | struct work_struct cts_workqueue; | ||
72 | #endif | ||
73 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
74 | int cts_pin; | ||
75 | int rts_pin; | ||
76 | #endif | ||
77 | }; | ||
78 | |||
79 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | ||
80 | struct bfin_serial_res { | ||
81 | unsigned long uart_base_addr; | ||
82 | int uart_irq; | ||
83 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
84 | unsigned int uart_tx_dma_channel; | ||
85 | unsigned int uart_rx_dma_channel; | ||
86 | #endif | ||
87 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
88 | int uart_cts_pin; | ||
89 | int uart_rts_pin; | ||
90 | #endif | ||
91 | }; | ||
92 | |||
93 | struct bfin_serial_res bfin_serial_resource[] = { | ||
94 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
95 | { | ||
96 | 0xFFC00400, | ||
97 | IRQ_UART0_RX, | ||
98 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
99 | CH_UART0_TX, | ||
100 | CH_UART0_RX, | ||
101 | #endif | ||
102 | #ifdef CONFIG_BFIN_UART0_CTSRTS | ||
103 | CONFIG_UART0_CTS_PIN, | ||
104 | CONFIG_UART0_RTS_PIN, | ||
105 | #endif | ||
106 | }, | ||
107 | #endif | ||
108 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
109 | { | ||
110 | 0xFFC02000, | ||
111 | IRQ_UART1_RX, | ||
112 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
113 | CH_UART1_TX, | ||
114 | CH_UART1_RX, | ||
115 | #endif | ||
116 | }, | ||
117 | #endif | ||
118 | #ifdef CONFIG_SERIAL_BFIN_UART2 | ||
119 | { | ||
120 | 0xFFC02100, | ||
121 | IRQ_UART2_RX, | ||
122 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
123 | CH_UART2_TX, | ||
124 | CH_UART2_RX, | ||
125 | #endif | ||
126 | #ifdef CONFIG_BFIN_UART2_CTSRTS | ||
127 | CONFIG_UART2_CTS_PIN, | ||
128 | CONFIG_UART2_RTS_PIN, | ||
129 | #endif | ||
130 | }, | ||
131 | #endif | ||
132 | #ifdef CONFIG_SERIAL_BFIN_UART3 | ||
133 | { | ||
134 | 0xFFC03100, | ||
135 | IRQ_UART3_RX, | ||
136 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
137 | CH_UART3_TX, | ||
138 | CH_UART3_RX, | ||
139 | #endif | ||
140 | }, | ||
141 | #endif | ||
142 | }; | ||
143 | |||
144 | int nr_ports = ARRAY_SIZE(bfin_serial_resource); | ||
145 | |||
146 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | ||
147 | { | ||
148 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
149 | /* Enable UART0 RX and TX on pin 7 & 8 of PORT E */ | ||
150 | bfin_write_PORTE_FER(0x180 | bfin_read_PORTE_FER()); | ||
151 | bfin_write_PORTE_MUX(0x3C000 | bfin_read_PORTE_MUX()); | ||
152 | #endif | ||
153 | |||
154 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
155 | /* Enable UART1 RX and TX on pin 0 & 1 of PORT H */ | ||
156 | bfin_write_PORTH_FER(0x3 | bfin_read_PORTH_FER()); | ||
157 | bfin_write_PORTH_MUX(~0xF & bfin_read_PORTH_MUX()); | ||
158 | #ifdef CONFIG_BFIN_UART1_CTSRTS | ||
159 | /* Enable UART1 RTS and CTS on pin 9 & 10 of PORT E */ | ||
160 | bfin_write_PORTE_FER(0x600 | bfin_read_PORTE_FER()); | ||
161 | bfin_write_PORTE_MUX(~0x3C0000 & bfin_read_PORTE_MUX()); | ||
162 | #endif | ||
163 | #endif | ||
164 | |||
165 | #ifdef CONFIG_SERIAL_BFIN_UART2 | ||
166 | /* Enable UART2 RX and TX on pin 4 & 5 of PORT B */ | ||
167 | bfin_write_PORTB_FER(0x30 | bfin_read_PORTB_FER()); | ||
168 | bfin_write_PORTB_MUX(~0xF00 & bfin_read_PORTB_MUX()); | ||
169 | #endif | ||
170 | |||
171 | #ifdef CONFIG_SERIAL_BFIN_UART3 | ||
172 | /* Enable UART3 RX and TX on pin 6 & 7 of PORT B */ | ||
173 | bfin_write_PORTB_FER(0xC0 | bfin_read_PORTB_FER()); | ||
174 | bfin_write_PORTB_MUX(~0xF000 | bfin_read_PORTB_MUX()); | ||
175 | #ifdef CONFIG_BFIN_UART3_CTSRTS | ||
176 | /* Enable UART3 RTS and CTS on pin 2 & 3 of PORT B */ | ||
177 | bfin_write_PORTB_FER(0xC | bfin_read_PORTB_FER()); | ||
178 | bfin_write_PORTB_MUX(~0xF0 | bfin_read_PORTB_MUX()); | ||
179 | #endif | ||
180 | #endif | ||
181 | SSYNC(); | ||
182 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
183 | if (uart->cts_pin >= 0) { | ||
184 | gpio_request(uart->cts_pin, NULL); | ||
185 | gpio_direction_input(uart->cts_pin); | ||
186 | } | ||
187 | |||
188 | if (uart->rts_pin >= 0) { | ||
189 | gpio_request(uart->rts_pin, NULL); | ||
190 | gpio_direction_output(uart->rts_pin); | ||
191 | } | ||
192 | #endif | ||
193 | } | ||
diff --git a/include/asm-blackfin/mach-bf548/blackfin.h b/include/asm-blackfin/mach-bf548/blackfin.h new file mode 100644 index 000000000000..791218fe7d94 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/blackfin.h | |||
@@ -0,0 +1,168 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/mach-bf548/blackfin.h | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
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 | |||
32 | #ifndef _MACH_BLACKFIN_H_ | ||
33 | #define _MACH_BLACKFIN_H_ | ||
34 | |||
35 | #define BF548_FAMILY | ||
36 | |||
37 | #include "bf548.h" | ||
38 | #include "mem_map.h" | ||
39 | #include "anomaly.h" | ||
40 | |||
41 | #ifdef CONFIG_BF542 | ||
42 | #include "defBF542.h" | ||
43 | #endif | ||
44 | |||
45 | #ifdef CONFIG_BF544 | ||
46 | #include "defBF544.h" | ||
47 | #endif | ||
48 | |||
49 | #ifdef CONFIG_BF548 | ||
50 | #include "defBF548.h" | ||
51 | #endif | ||
52 | |||
53 | #ifdef CONFIG_BF549 | ||
54 | #include "defBF549.h" | ||
55 | #endif | ||
56 | |||
57 | #if !(defined(__ASSEMBLY__) || defined(ASSEMBLY)) | ||
58 | #ifdef CONFIG_BF542 | ||
59 | #include "cdefBF542.h" | ||
60 | #endif | ||
61 | |||
62 | #ifdef CONFIG_BF544 | ||
63 | #include "cdefBF544.h" | ||
64 | #endif | ||
65 | #ifdef CONFIG_BF548 | ||
66 | #include "cdefBF548.h" | ||
67 | #endif | ||
68 | #ifdef CONFIG_BF549 | ||
69 | #include "cdefBF549.h" | ||
70 | #endif | ||
71 | |||
72 | /* UART 1*/ | ||
73 | #define bfin_read_UART_THR() bfin_read_UART1_THR() | ||
74 | #define bfin_write_UART_THR(val) bfin_write_UART1_THR(val) | ||
75 | #define bfin_read_UART_RBR() bfin_read_UART1_RBR() | ||
76 | #define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val) | ||
77 | #define bfin_read_UART_DLL() bfin_read_UART1_DLL() | ||
78 | #define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val) | ||
79 | #define bfin_read_UART_IER() bfin_read_UART1_IER() | ||
80 | #define bfin_write_UART_IER(val) bfin_write_UART1_IER(val) | ||
81 | #define bfin_read_UART_DLH() bfin_read_UART1_DLH() | ||
82 | #define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val) | ||
83 | #define bfin_read_UART_IIR() bfin_read_UART1_IIR() | ||
84 | #define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val) | ||
85 | #define bfin_read_UART_LCR() bfin_read_UART1_LCR() | ||
86 | #define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val) | ||
87 | #define bfin_read_UART_MCR() bfin_read_UART1_MCR() | ||
88 | #define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val) | ||
89 | #define bfin_read_UART_LSR() bfin_read_UART1_LSR() | ||
90 | #define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val) | ||
91 | #define bfin_read_UART_SCR() bfin_read_UART1_SCR() | ||
92 | #define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val) | ||
93 | #define bfin_read_UART_GCTL() bfin_read_UART1_GCTL() | ||
94 | #define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val) | ||
95 | |||
96 | #endif | ||
97 | |||
98 | /* MAP used DEFINES from BF533 to BF54x - so we don't need to change | ||
99 | * them in the driver, kernel, etc. */ | ||
100 | |||
101 | /* UART_IIR Register */ | ||
102 | #define STATUS(x) ((x << 1) & 0x06) | ||
103 | #define STATUS_P1 0x02 | ||
104 | #define STATUS_P0 0x01 | ||
105 | |||
106 | /* UART 0*/ | ||
107 | |||
108 | /* DMA Channnel */ | ||
109 | #define bfin_read_CH_UART_RX() bfin_read_CH_UART1_RX() | ||
110 | #define bfin_write_CH_UART_RX(val) bfin_write_CH_UART1_RX(val) | ||
111 | #define bfin_read_CH_UART_TX() bfin_read_CH_UART1_TX() | ||
112 | #define bfin_write_CH_UART_TX(val) bfin_write_CH_UART1_TX(val) | ||
113 | #define CH_UART_RX CH_UART1_RX | ||
114 | #define CH_UART_TX CH_UART1_TX | ||
115 | |||
116 | /* System Interrupt Controller */ | ||
117 | #define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART1_RX() | ||
118 | #define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART1_RX(val) | ||
119 | #define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART1_TX() | ||
120 | #define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART1_TX(val) | ||
121 | #define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART1_ERROR() | ||
122 | #define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART1_ERROR(val) | ||
123 | #define IRQ_UART_RX IRQ_UART1_RX | ||
124 | #define IRQ_UART_TX IRQ_UART1_TX | ||
125 | #define IRQ_UART_ERROR IRQ_UART1_ERROR | ||
126 | |||
127 | /* MMR Registers*/ | ||
128 | #define bfin_read_UART_THR() bfin_read_UART1_THR() | ||
129 | #define bfin_write_UART_THR(val) bfin_write_UART1_THR(val) | ||
130 | #define bfin_read_UART_RBR() bfin_read_UART1_RBR() | ||
131 | #define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val) | ||
132 | #define bfin_read_UART_DLL() bfin_read_UART1_DLL() | ||
133 | #define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val) | ||
134 | #define bfin_read_UART_IER() bfin_read_UART1_IER() | ||
135 | #define bfin_write_UART_IER(val) bfin_write_UART1_IER(val) | ||
136 | #define bfin_read_UART_DLH() bfin_read_UART1_DLH() | ||
137 | #define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val) | ||
138 | #define bfin_read_UART_IIR() bfin_read_UART1_IIR() | ||
139 | #define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val) | ||
140 | #define bfin_read_UART_LCR() bfin_read_UART1_LCR() | ||
141 | #define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val) | ||
142 | #define bfin_read_UART_MCR() bfin_read_UART1_MCR() | ||
143 | #define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val) | ||
144 | #define bfin_read_UART_LSR() bfin_read_UART1_LSR() | ||
145 | #define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val) | ||
146 | #define bfin_read_UART_SCR() bfin_read_UART1_SCR() | ||
147 | #define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val) | ||
148 | #define bfin_read_UART_GCTL() bfin_read_UART1_GCTL() | ||
149 | #define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val) | ||
150 | #define UART_THR UART1_THR | ||
151 | #define UART_RBR UART1_RBR | ||
152 | #define UART_DLL UART1_DLL | ||
153 | #define UART_IER UART1_IER | ||
154 | #define UART_DLH UART1_DLH | ||
155 | #define UART_IIR UART1_IIR | ||
156 | #define UART_LCR UART1_LCR | ||
157 | #define UART_MCR UART1_MCR | ||
158 | #define UART_LSR UART1_LSR | ||
159 | #define UART_SCR UART1_SCR | ||
160 | #define UART_GCTL UART1_GCTL | ||
161 | |||
162 | /* PLL_DIV Masks */ | ||
163 | #define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ | ||
164 | #define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ | ||
165 | #define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */ | ||
166 | #define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */ | ||
167 | |||
168 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index 6bbcefeb3627..98d35a929116 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -31,7 +31,8 @@ | |||
31 | #ifndef _CDEF_BF54X_H | 31 | #ifndef _CDEF_BF54X_H |
32 | #define _CDEF_BF54X_H | 32 | #define _CDEF_BF54X_H |
33 | 33 | ||
34 | #include <defBF54x_base.h> | 34 | #include "defBF54x_base.h" |
35 | #include <asm/system.h> | ||
35 | 36 | ||
36 | /* ************************************************************** */ | 37 | /* ************************************************************** */ |
37 | /* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */ | 38 | /* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */ |
@@ -44,7 +45,30 @@ | |||
44 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 45 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
45 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) | 46 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) |
46 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 47 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
47 | #define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val) | 48 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
49 | static __inline__ void bfin_write_VR_CTL(unsigned int val) | ||
50 | { | ||
51 | unsigned long flags, iwr0, iwr1, iwr2; | ||
52 | |||
53 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
54 | iwr0 = bfin_read32(SIC_IWR0); | ||
55 | iwr1 = bfin_read32(SIC_IWR1); | ||
56 | iwr2 = bfin_read32(SIC_IWR2); | ||
57 | /* Only allow PPL Wakeup) */ | ||
58 | bfin_write32(SIC_IWR0, IWR_ENABLE(0)); | ||
59 | bfin_write32(SIC_IWR1, 0); | ||
60 | bfin_write32(SIC_IWR2, 0); | ||
61 | |||
62 | bfin_write16(VR_CTL, val); | ||
63 | __builtin_bfin_ssync(); | ||
64 | |||
65 | local_irq_save(flags); | ||
66 | asm("IDLE;"); | ||
67 | local_irq_restore(flags); | ||
68 | bfin_write32(SIC_IWR0, iwr0); | ||
69 | bfin_write32(SIC_IWR1, iwr1); | ||
70 | bfin_write32(SIC_IWR2, iwr2); | ||
71 | } | ||
48 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 72 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
49 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) | 73 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) |
50 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) | 74 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) |
@@ -70,12 +94,18 @@ | |||
70 | #define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1, val) | 94 | #define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1, val) |
71 | #define bfin_read_SIC_IMASK2() bfin_read32(SIC_IMASK2) | 95 | #define bfin_read_SIC_IMASK2() bfin_read32(SIC_IMASK2) |
72 | #define bfin_write_SIC_IMASK2(val) bfin_write32(SIC_IMASK2, val) | 96 | #define bfin_write_SIC_IMASK2(val) bfin_write32(SIC_IMASK2, val) |
97 | #define bfin_read_SIC_IMASK(x) bfin_read32(SIC_IMASK0 + (x << 2)) | ||
98 | #define bfin_write_SIC_IMASK(x, val) bfin_write32((SIC_IMASK0 + (x << 2)), val) | ||
99 | |||
73 | #define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0) | 100 | #define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0) |
74 | #define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val) | 101 | #define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val) |
75 | #define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1) | 102 | #define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1) |
76 | #define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1, val) | 103 | #define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1, val) |
77 | #define bfin_read_SIC_ISR2() bfin_read32(SIC_ISR2) | 104 | #define bfin_read_SIC_ISR2() bfin_read32(SIC_ISR2) |
78 | #define bfin_write_SIC_ISR2(val) bfin_write32(SIC_ISR2, val) | 105 | #define bfin_write_SIC_ISR2(val) bfin_write32(SIC_ISR2, val) |
106 | #define bfin_read_SIC_ISR(x) bfin_read32(SIC_ISR0 + (x << 2)) | ||
107 | #define bfin_write_SIC_ISR(x, val) bfin_write32((SIC_ISR0 + (x << 2)), val) | ||
108 | |||
79 | #define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0) | 109 | #define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0) |
80 | #define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val) | 110 | #define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val) |
81 | #define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1) | 111 | #define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1) |
@@ -710,21 +740,21 @@ | |||
710 | #define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR) | 740 | #define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR) |
711 | #define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR) | 741 | #define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR) |
712 | #define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR) | 742 | #define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR) |
713 | #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR) | 743 | #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val) |
714 | #define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG) | 744 | #define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG) |
715 | #define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG, val) | 745 | #define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG, val) |
716 | #define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT) | 746 | #define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT) |
717 | #define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT, val) | 747 | #define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT, val) |
718 | #define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY) | 748 | #define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY) |
719 | #define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY) | 749 | #define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY, val) |
720 | #define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT) | 750 | #define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT) |
721 | #define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT, val) | 751 | #define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT, val) |
722 | #define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY) | 752 | #define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY) |
723 | #define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY) | 753 | #define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY, val) |
724 | #define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR) | 754 | #define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR) |
725 | #define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR) | 755 | #define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR, val) |
726 | #define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR) | 756 | #define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR) |
727 | #define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR) | 757 | #define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR, val) |
728 | #define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS) | 758 | #define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS) |
729 | #define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS, val) | 759 | #define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS, val) |
730 | #define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP) | 760 | #define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP) |
@@ -734,23 +764,23 @@ | |||
734 | #define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT) | 764 | #define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT) |
735 | #define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT, val) | 765 | #define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT, val) |
736 | #define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR) | 766 | #define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR) |
737 | #define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR) | 767 | #define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR, val) |
738 | #define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR) | 768 | #define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR) |
739 | #define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR) | 769 | #define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR, val) |
740 | #define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG) | 770 | #define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG) |
741 | #define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG, val) | 771 | #define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG, val) |
742 | #define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT) | 772 | #define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT) |
743 | #define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT, val) | 773 | #define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT, val) |
744 | #define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY) | 774 | #define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY) |
745 | #define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY) | 775 | #define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY, val) |
746 | #define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT) | 776 | #define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT) |
747 | #define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT, val) | 777 | #define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT, val) |
748 | #define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY) | 778 | #define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY) |
749 | #define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY) | 779 | #define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY, val) |
750 | #define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR) | 780 | #define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR) |
751 | #define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR) | 781 | #define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR, val) |
752 | #define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR) | 782 | #define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR) |
753 | #define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR) | 783 | #define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR, val) |
754 | #define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS) | 784 | #define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS) |
755 | #define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS, val) | 785 | #define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS, val) |
756 | #define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP) | 786 | #define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP) |
@@ -763,9 +793,9 @@ | |||
763 | /* MDMA Stream 1 Registers */ | 793 | /* MDMA Stream 1 Registers */ |
764 | 794 | ||
765 | #define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR) | 795 | #define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR) |
766 | #define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR) | 796 | #define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR, val) |
767 | #define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR) | 797 | #define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR) |
768 | #define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR) | 798 | #define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR, val) |
769 | #define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG) | 799 | #define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG) |
770 | #define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG, val) | 800 | #define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG, val) |
771 | #define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT) | 801 | #define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT) |
@@ -777,9 +807,9 @@ | |||
777 | #define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY) | 807 | #define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY) |
778 | #define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY) | 808 | #define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY) |
779 | #define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR) | 809 | #define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR) |
780 | #define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR) | 810 | #define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val) |
781 | #define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR) | 811 | #define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR) |
782 | #define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR) | 812 | #define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR, val) |
783 | #define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS) | 813 | #define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS) |
784 | #define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS, val) | 814 | #define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS, val) |
785 | #define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP) | 815 | #define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP) |
@@ -789,9 +819,9 @@ | |||
789 | #define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT) | 819 | #define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT) |
790 | #define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT, val) | 820 | #define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT, val) |
791 | #define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR) | 821 | #define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR) |
792 | #define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR) | 822 | #define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR, val) |
793 | #define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR) | 823 | #define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR) |
794 | #define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR) | 824 | #define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR, val) |
795 | #define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG) | 825 | #define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG) |
796 | #define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG, val) | 826 | #define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG, val) |
797 | #define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT) | 827 | #define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT) |
@@ -803,9 +833,9 @@ | |||
803 | #define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY) | 833 | #define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY) |
804 | #define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY) | 834 | #define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY) |
805 | #define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR) | 835 | #define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR) |
806 | #define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR) | 836 | #define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val) |
807 | #define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR) | 837 | #define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR) |
808 | #define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR) | 838 | #define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR, val) |
809 | #define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS) | 839 | #define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS) |
810 | #define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS, val) | 840 | #define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS, val) |
811 | #define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP) | 841 | #define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP) |
diff --git a/include/asm-blackfin/mach-bf548/defBF542.h b/include/asm-blackfin/mach-bf548/defBF542.h index ac968fca5cc5..32d07130200c 100644 --- a/include/asm-blackfin/mach-bf548/defBF542.h +++ b/include/asm-blackfin/mach-bf548/defBF542.h | |||
@@ -362,7 +362,6 @@ | |||
362 | /* Bit masks for KPAD_CTL */ | 362 | /* Bit masks for KPAD_CTL */ |
363 | 363 | ||
364 | #define KPAD_EN 0x1 /* Keypad Enable */ | 364 | #define KPAD_EN 0x1 /* Keypad Enable */ |
365 | #define nKPAD_EN 0x0 | ||
366 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ | 365 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ |
367 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ | 366 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ |
368 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ | 367 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ |
@@ -384,29 +383,21 @@ | |||
384 | /* Bit masks for KPAD_STAT */ | 383 | /* Bit masks for KPAD_STAT */ |
385 | 384 | ||
386 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ | 385 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ |
387 | #define nKPAD_IRQ 0x0 | ||
388 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ | 386 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ |
389 | #define KPAD_PRESSED 0x8 /* Key press current status */ | 387 | #define KPAD_PRESSED 0x8 /* Key press current status */ |
390 | #define nKPAD_PRESSED 0x0 | ||
391 | 388 | ||
392 | /* Bit masks for KPAD_SOFTEVAL */ | 389 | /* Bit masks for KPAD_SOFTEVAL */ |
393 | 390 | ||
394 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ | 391 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ |
395 | #define nKPAD_SOFTEVAL_E 0x0 | ||
396 | 392 | ||
397 | /* Bit masks for SDH_COMMAND */ | 393 | /* Bit masks for SDH_COMMAND */ |
398 | 394 | ||
399 | #define CMD_IDX 0x3f /* Command Index */ | 395 | #define CMD_IDX 0x3f /* Command Index */ |
400 | #define CMD_RSP 0x40 /* Response */ | 396 | #define CMD_RSP 0x40 /* Response */ |
401 | #define nCMD_RSP 0x0 | ||
402 | #define CMD_L_RSP 0x80 /* Long Response */ | 397 | #define CMD_L_RSP 0x80 /* Long Response */ |
403 | #define nCMD_L_RSP 0x0 | ||
404 | #define CMD_INT_E 0x100 /* Command Interrupt */ | 398 | #define CMD_INT_E 0x100 /* Command Interrupt */ |
405 | #define nCMD_INT_E 0x0 | ||
406 | #define CMD_PEND_E 0x200 /* Command Pending */ | 399 | #define CMD_PEND_E 0x200 /* Command Pending */ |
407 | #define nCMD_PEND_E 0x0 | ||
408 | #define CMD_E 0x400 /* Command Enable */ | 400 | #define CMD_E 0x400 /* Command Enable */ |
409 | #define nCMD_E 0x0 | ||
410 | 401 | ||
411 | /* Bit masks for SDH_PWR_CTL */ | 402 | /* Bit masks for SDH_PWR_CTL */ |
412 | 403 | ||
@@ -415,21 +406,15 @@ | |||
415 | #define TBD 0x3c /* TBD */ | 406 | #define TBD 0x3c /* TBD */ |
416 | #endif | 407 | #endif |
417 | #define SD_CMD_OD 0x40 /* Open Drain Output */ | 408 | #define SD_CMD_OD 0x40 /* Open Drain Output */ |
418 | #define nSD_CMD_OD 0x0 | ||
419 | #define ROD_CTL 0x80 /* Rod Control */ | 409 | #define ROD_CTL 0x80 /* Rod Control */ |
420 | #define nROD_CTL 0x0 | ||
421 | 410 | ||
422 | /* Bit masks for SDH_CLK_CTL */ | 411 | /* Bit masks for SDH_CLK_CTL */ |
423 | 412 | ||
424 | #define CLKDIV 0xff /* MC_CLK Divisor */ | 413 | #define CLKDIV 0xff /* MC_CLK Divisor */ |
425 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ | 414 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ |
426 | #define nCLK_E 0x0 | ||
427 | #define PWR_SV_E 0x200 /* Power Save Enable */ | 415 | #define PWR_SV_E 0x200 /* Power Save Enable */ |
428 | #define nPWR_SV_E 0x0 | ||
429 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ | 416 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ |
430 | #define nCLKDIV_BYPASS 0x0 | ||
431 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ | 417 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ |
432 | #define nWIDE_BUS 0x0 | ||
433 | 418 | ||
434 | /* Bit masks for SDH_RESP_CMD */ | 419 | /* Bit masks for SDH_RESP_CMD */ |
435 | 420 | ||
@@ -438,133 +423,74 @@ | |||
438 | /* Bit masks for SDH_DATA_CTL */ | 423 | /* Bit masks for SDH_DATA_CTL */ |
439 | 424 | ||
440 | #define DTX_E 0x1 /* Data Transfer Enable */ | 425 | #define DTX_E 0x1 /* Data Transfer Enable */ |
441 | #define nDTX_E 0x0 | ||
442 | #define DTX_DIR 0x2 /* Data Transfer Direction */ | 426 | #define DTX_DIR 0x2 /* Data Transfer Direction */ |
443 | #define nDTX_DIR 0x0 | ||
444 | #define DTX_MODE 0x4 /* Data Transfer Mode */ | 427 | #define DTX_MODE 0x4 /* Data Transfer Mode */ |
445 | #define nDTX_MODE 0x0 | ||
446 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ | 428 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ |
447 | #define nDTX_DMA_E 0x0 | ||
448 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ | 429 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ |
449 | 430 | ||
450 | /* Bit masks for SDH_STATUS */ | 431 | /* Bit masks for SDH_STATUS */ |
451 | 432 | ||
452 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 433 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
453 | #define nCMD_CRC_FAIL 0x0 | ||
454 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 434 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
455 | #define nDAT_CRC_FAIL 0x0 | ||
456 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 435 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ |
457 | #define nCMD_TIMEOUT 0x0 | ||
458 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 436 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ |
459 | #define nDAT_TIMEOUT 0x0 | ||
460 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 437 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
461 | #define nTX_UNDERRUN 0x0 | ||
462 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 438 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
463 | #define nRX_OVERRUN 0x0 | ||
464 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 439 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
465 | #define nCMD_RESP_END 0x0 | ||
466 | #define CMD_SENT 0x80 /* CMD Sent */ | 440 | #define CMD_SENT 0x80 /* CMD Sent */ |
467 | #define nCMD_SENT 0x0 | ||
468 | #define DAT_END 0x100 /* Data End */ | 441 | #define DAT_END 0x100 /* Data End */ |
469 | #define nDAT_END 0x0 | ||
470 | #define START_BIT_ERR 0x200 /* Start Bit Error */ | 442 | #define START_BIT_ERR 0x200 /* Start Bit Error */ |
471 | #define nSTART_BIT_ERR 0x0 | ||
472 | #define DAT_BLK_END 0x400 /* Data Block End */ | 443 | #define DAT_BLK_END 0x400 /* Data Block End */ |
473 | #define nDAT_BLK_END 0x0 | ||
474 | #define CMD_ACT 0x800 /* CMD Active */ | 444 | #define CMD_ACT 0x800 /* CMD Active */ |
475 | #define nCMD_ACT 0x0 | ||
476 | #define TX_ACT 0x1000 /* Transmit Active */ | 445 | #define TX_ACT 0x1000 /* Transmit Active */ |
477 | #define nTX_ACT 0x0 | ||
478 | #define RX_ACT 0x2000 /* Receive Active */ | 446 | #define RX_ACT 0x2000 /* Receive Active */ |
479 | #define nRX_ACT 0x0 | ||
480 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ | 447 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ |
481 | #define nTX_FIFO_STAT 0x0 | ||
482 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ | 448 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ |
483 | #define nRX_FIFO_STAT 0x0 | ||
484 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ | 449 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ |
485 | #define nTX_FIFO_FULL 0x0 | ||
486 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ | 450 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ |
487 | #define nRX_FIFO_FULL 0x0 | ||
488 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ | 451 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ |
489 | #define nTX_FIFO_ZERO 0x0 | ||
490 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ | 452 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ |
491 | #define nRX_DAT_ZERO 0x0 | ||
492 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ | 453 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ |
493 | #define nTX_DAT_RDY 0x0 | ||
494 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ | 454 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ |
495 | #define nRX_FIFO_RDY 0x0 | ||
496 | 455 | ||
497 | /* Bit masks for SDH_STATUS_CLR */ | 456 | /* Bit masks for SDH_STATUS_CLR */ |
498 | 457 | ||
499 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ | 458 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ |
500 | #define nCMD_CRC_FAIL_STAT 0x0 | ||
501 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ | 459 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ |
502 | #define nDAT_CRC_FAIL_STAT 0x0 | ||
503 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ | 460 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ |
504 | #define nCMD_TIMEOUT_STAT 0x0 | ||
505 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ | 461 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ |
506 | #define nDAT_TIMEOUT_STAT 0x0 | ||
507 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ | 462 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ |
508 | #define nTX_UNDERRUN_STAT 0x0 | ||
509 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ | 463 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ |
510 | #define nRX_OVERRUN_STAT 0x0 | ||
511 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ | 464 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ |
512 | #define nCMD_RESP_END_STAT 0x0 | ||
513 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ | 465 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ |
514 | #define nCMD_SENT_STAT 0x0 | ||
515 | #define DAT_END_STAT 0x100 /* Data End Status */ | 466 | #define DAT_END_STAT 0x100 /* Data End Status */ |
516 | #define nDAT_END_STAT 0x0 | ||
517 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ | 467 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ |
518 | #define nSTART_BIT_ERR_STAT 0x0 | ||
519 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ | 468 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ |
520 | #define nDAT_BLK_END_STAT 0x0 | ||
521 | 469 | ||
522 | /* Bit masks for SDH_MASK0 */ | 470 | /* Bit masks for SDH_MASK0 */ |
523 | 471 | ||
524 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ | 472 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ |
525 | #define nCMD_CRC_FAIL_MASK 0x0 | ||
526 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ | 473 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ |
527 | #define nDAT_CRC_FAIL_MASK 0x0 | ||
528 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ | 474 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ |
529 | #define nCMD_TIMEOUT_MASK 0x0 | ||
530 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ | 475 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ |
531 | #define nDAT_TIMEOUT_MASK 0x0 | ||
532 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ | 476 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ |
533 | #define nTX_UNDERRUN_MASK 0x0 | ||
534 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ | 477 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ |
535 | #define nRX_OVERRUN_MASK 0x0 | ||
536 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ | 478 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ |
537 | #define nCMD_RESP_END_MASK 0x0 | ||
538 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ | 479 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ |
539 | #define nCMD_SENT_MASK 0x0 | ||
540 | #define DAT_END_MASK 0x100 /* Data End Mask */ | 480 | #define DAT_END_MASK 0x100 /* Data End Mask */ |
541 | #define nDAT_END_MASK 0x0 | ||
542 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ | 481 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ |
543 | #define nSTART_BIT_ERR_MASK 0x0 | ||
544 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ | 482 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ |
545 | #define nDAT_BLK_END_MASK 0x0 | ||
546 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ | 483 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ |
547 | #define nCMD_ACT_MASK 0x0 | ||
548 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ | 484 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ |
549 | #define nTX_ACT_MASK 0x0 | ||
550 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ | 485 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ |
551 | #define nRX_ACT_MASK 0x0 | ||
552 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ | 486 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ |
553 | #define nTX_FIFO_STAT_MASK 0x0 | ||
554 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ | 487 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ |
555 | #define nRX_FIFO_STAT_MASK 0x0 | ||
556 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ | 488 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ |
557 | #define nTX_FIFO_FULL_MASK 0x0 | ||
558 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ | 489 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ |
559 | #define nRX_FIFO_FULL_MASK 0x0 | ||
560 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ | 490 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ |
561 | #define nTX_FIFO_ZERO_MASK 0x0 | ||
562 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ | 491 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ |
563 | #define nRX_DAT_ZERO_MASK 0x0 | ||
564 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ | 492 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ |
565 | #define nTX_DAT_RDY_MASK 0x0 | ||
566 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ | 493 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ |
567 | #define nRX_FIFO_RDY_MASK 0x0 | ||
568 | 494 | ||
569 | /* Bit masks for SDH_FIFO_CNT */ | 495 | /* Bit masks for SDH_FIFO_CNT */ |
570 | 496 | ||
@@ -573,73 +499,47 @@ | |||
573 | /* Bit masks for SDH_E_STATUS */ | 499 | /* Bit masks for SDH_E_STATUS */ |
574 | 500 | ||
575 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ | 501 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ |
576 | #define nSDIO_INT_DET 0x0 | ||
577 | #define SD_CARD_DET 0x10 /* SD Card Detect */ | 502 | #define SD_CARD_DET 0x10 /* SD Card Detect */ |
578 | #define nSD_CARD_DET 0x0 | ||
579 | 503 | ||
580 | /* Bit masks for SDH_E_MASK */ | 504 | /* Bit masks for SDH_E_MASK */ |
581 | 505 | ||
582 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ | 506 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ |
583 | #define nSDIO_MSK 0x0 | ||
584 | #define SCD_MSK 0x40 /* Mask Card Detect */ | 507 | #define SCD_MSK 0x40 /* Mask Card Detect */ |
585 | #define nSCD_MSK 0x0 | ||
586 | 508 | ||
587 | /* Bit masks for SDH_CFG */ | 509 | /* Bit masks for SDH_CFG */ |
588 | 510 | ||
589 | #define CLKS_EN 0x1 /* Clocks Enable */ | 511 | #define CLKS_EN 0x1 /* Clocks Enable */ |
590 | #define nCLKS_EN 0x0 | ||
591 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ | 512 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ |
592 | #define nSD4E 0x0 | ||
593 | #define MWE 0x8 /* Moving Window Enable */ | 513 | #define MWE 0x8 /* Moving Window Enable */ |
594 | #define nMWE 0x0 | ||
595 | #define SD_RST 0x10 /* SDMMC Reset */ | 514 | #define SD_RST 0x10 /* SDMMC Reset */ |
596 | #define nSD_RST 0x0 | ||
597 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ | 515 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ |
598 | #define nPUP_SDDAT 0x0 | ||
599 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ | 516 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ |
600 | #define nPUP_SDDAT3 0x0 | ||
601 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ | 517 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ |
602 | #define nPD_SDDAT3 0x0 | ||
603 | 518 | ||
604 | /* Bit masks for SDH_RD_WAIT_EN */ | 519 | /* Bit masks for SDH_RD_WAIT_EN */ |
605 | 520 | ||
606 | #define RWR 0x1 /* Read Wait Request */ | 521 | #define RWR 0x1 /* Read Wait Request */ |
607 | #define nRWR 0x0 | ||
608 | 522 | ||
609 | /* Bit masks for ATAPI_CONTROL */ | 523 | /* Bit masks for ATAPI_CONTROL */ |
610 | 524 | ||
611 | #define PIO_START 0x1 /* Start PIO/Reg Op */ | 525 | #define PIO_START 0x1 /* Start PIO/Reg Op */ |
612 | #define nPIO_START 0x0 | ||
613 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ | 526 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ |
614 | #define nMULTI_START 0x0 | ||
615 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ | 527 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ |
616 | #define nULTRA_START 0x0 | ||
617 | #define XFER_DIR 0x8 /* Transfer Direction */ | 528 | #define XFER_DIR 0x8 /* Transfer Direction */ |
618 | #define nXFER_DIR 0x0 | ||
619 | #define IORDY_EN 0x10 /* IORDY Enable */ | 529 | #define IORDY_EN 0x10 /* IORDY Enable */ |
620 | #define nIORDY_EN 0x0 | ||
621 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ | 530 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ |
622 | #define nFIFO_FLUSH 0x0 | ||
623 | #define SOFT_RST 0x40 /* Soft Reset */ | 531 | #define SOFT_RST 0x40 /* Soft Reset */ |
624 | #define nSOFT_RST 0x0 | ||
625 | #define DEV_RST 0x80 /* Device Reset */ | 532 | #define DEV_RST 0x80 /* Device Reset */ |
626 | #define nDEV_RST 0x0 | ||
627 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ | 533 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ |
628 | #define nTFRCNT_RST 0x0 | ||
629 | #define END_ON_TERM 0x200 /* End/Terminate Select */ | 534 | #define END_ON_TERM 0x200 /* End/Terminate Select */ |
630 | #define nEND_ON_TERM 0x0 | ||
631 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ | 535 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ |
632 | #define nPIO_USE_DMA 0x0 | ||
633 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ | 536 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ |
634 | 537 | ||
635 | /* Bit masks for ATAPI_STATUS */ | 538 | /* Bit masks for ATAPI_STATUS */ |
636 | 539 | ||
637 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ | 540 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ |
638 | #define nPIO_XFER_ON 0x0 | ||
639 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ | 541 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ |
640 | #define nMULTI_XFER_ON 0x0 | ||
641 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ | 542 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ |
642 | #define nULTRA_XFER_ON 0x0 | ||
643 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ | 543 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ |
644 | 544 | ||
645 | /* Bit masks for ATAPI_DEV_ADDR */ | 545 | /* Bit masks for ATAPI_DEV_ADDR */ |
@@ -649,66 +549,39 @@ | |||
649 | /* Bit masks for ATAPI_INT_MASK */ | 549 | /* Bit masks for ATAPI_INT_MASK */ |
650 | 550 | ||
651 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ | 551 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ |
652 | #define nATAPI_DEV_INT_MASK 0x0 | ||
653 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ | 552 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ |
654 | #define nPIO_DONE_MASK 0x0 | ||
655 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ | 553 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ |
656 | #define nMULTI_DONE_MASK 0x0 | ||
657 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ | 554 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ |
658 | #define nUDMAIN_DONE_MASK 0x0 | ||
659 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ | 555 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ |
660 | #define nUDMAOUT_DONE_MASK 0x0 | ||
661 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ | 556 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ |
662 | #define nHOST_TERM_XFER_MASK 0x0 | ||
663 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ | 557 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ |
664 | #define nMULTI_TERM_MASK 0x0 | ||
665 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ | 558 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ |
666 | #define nUDMAIN_TERM_MASK 0x0 | ||
667 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ | 559 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ |
668 | #define nUDMAOUT_TERM_MASK 0x0 | ||
669 | 560 | ||
670 | /* Bit masks for ATAPI_INT_STATUS */ | 561 | /* Bit masks for ATAPI_INT_STATUS */ |
671 | 562 | ||
672 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ | 563 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ |
673 | #define nATAPI_DEV_INT 0x0 | ||
674 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ | 564 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ |
675 | #define nPIO_DONE_INT 0x0 | ||
676 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ | 565 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ |
677 | #define nMULTI_DONE_INT 0x0 | ||
678 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ | 566 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ |
679 | #define nUDMAIN_DONE_INT 0x0 | ||
680 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ | 567 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ |
681 | #define nUDMAOUT_DONE_INT 0x0 | ||
682 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ | 568 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ |
683 | #define nHOST_TERM_XFER_INT 0x0 | ||
684 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ | 569 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ |
685 | #define nMULTI_TERM_INT 0x0 | ||
686 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ | 570 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ |
687 | #define nUDMAIN_TERM_INT 0x0 | ||
688 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ | 571 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ |
689 | #define nUDMAOUT_TERM_INT 0x0 | ||
690 | 572 | ||
691 | /* Bit masks for ATAPI_LINE_STATUS */ | 573 | /* Bit masks for ATAPI_LINE_STATUS */ |
692 | 574 | ||
693 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ | 575 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ |
694 | #define nATAPI_INTR 0x0 | ||
695 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ | 576 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ |
696 | #define nATAPI_DASP 0x0 | ||
697 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ | 577 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ |
698 | #define nATAPI_CS0N 0x0 | ||
699 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ | 578 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ |
700 | #define nATAPI_CS1N 0x0 | ||
701 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ | 579 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ |
702 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ | 580 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ |
703 | #define nATAPI_DMAREQ 0x0 | ||
704 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ | 581 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ |
705 | #define nATAPI_DMAACKN 0x0 | ||
706 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ | 582 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ |
707 | #define nATAPI_DIOWN 0x0 | ||
708 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ | 583 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ |
709 | #define nATAPI_DIORN 0x0 | ||
710 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ | 584 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ |
711 | #define nATAPI_IORDY 0x0 | ||
712 | 585 | ||
713 | /* Bit masks for ATAPI_SM_STATE */ | 586 | /* Bit masks for ATAPI_SM_STATE */ |
714 | 587 | ||
@@ -720,7 +593,6 @@ | |||
720 | /* Bit masks for ATAPI_TERMINATE */ | 593 | /* Bit masks for ATAPI_TERMINATE */ |
721 | 594 | ||
722 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ | 595 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ |
723 | #define nATAPI_HOST_TERM 0x0 | ||
724 | 596 | ||
725 | /* Bit masks for ATAPI_REG_TIM_0 */ | 597 | /* Bit masks for ATAPI_REG_TIM_0 */ |
726 | 598 | ||
@@ -779,131 +651,77 @@ | |||
779 | /* Bit masks for USB_POWER */ | 651 | /* Bit masks for USB_POWER */ |
780 | 652 | ||
781 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ | 653 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ |
782 | #define nENABLE_SUSPENDM 0x0 | ||
783 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ | 654 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ |
784 | #define nSUSPEND_MODE 0x0 | ||
785 | #define RESUME_MODE 0x4 /* DMA Mode */ | 655 | #define RESUME_MODE 0x4 /* DMA Mode */ |
786 | #define nRESUME_MODE 0x0 | ||
787 | #define RESET 0x8 /* Reset indicator */ | 656 | #define RESET 0x8 /* Reset indicator */ |
788 | #define nRESET 0x0 | ||
789 | #define HS_MODE 0x10 /* High Speed mode indicator */ | 657 | #define HS_MODE 0x10 /* High Speed mode indicator */ |
790 | #define nHS_MODE 0x0 | ||
791 | #define HS_ENABLE 0x20 /* high Speed Enable */ | 658 | #define HS_ENABLE 0x20 /* high Speed Enable */ |
792 | #define nHS_ENABLE 0x0 | ||
793 | #define SOFT_CONN 0x40 /* Soft connect */ | 659 | #define SOFT_CONN 0x40 /* Soft connect */ |
794 | #define nSOFT_CONN 0x0 | ||
795 | #define ISO_UPDATE 0x80 /* Isochronous update */ | 660 | #define ISO_UPDATE 0x80 /* Isochronous update */ |
796 | #define nISO_UPDATE 0x0 | ||
797 | 661 | ||
798 | /* Bit masks for USB_INTRTX */ | 662 | /* Bit masks for USB_INTRTX */ |
799 | 663 | ||
800 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ | 664 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ |
801 | #define nEP0_TX 0x0 | ||
802 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ | 665 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ |
803 | #define nEP1_TX 0x0 | ||
804 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ | 666 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ |
805 | #define nEP2_TX 0x0 | ||
806 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ | 667 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ |
807 | #define nEP3_TX 0x0 | ||
808 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ | 668 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ |
809 | #define nEP4_TX 0x0 | ||
810 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ | 669 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ |
811 | #define nEP5_TX 0x0 | ||
812 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ | 670 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ |
813 | #define nEP6_TX 0x0 | ||
814 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ | 671 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ |
815 | #define nEP7_TX 0x0 | ||
816 | 672 | ||
817 | /* Bit masks for USB_INTRRX */ | 673 | /* Bit masks for USB_INTRRX */ |
818 | 674 | ||
819 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ | 675 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ |
820 | #define nEP1_RX 0x0 | ||
821 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ | 676 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ |
822 | #define nEP2_RX 0x0 | ||
823 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ | 677 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ |
824 | #define nEP3_RX 0x0 | ||
825 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ | 678 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ |
826 | #define nEP4_RX 0x0 | ||
827 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ | 679 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ |
828 | #define nEP5_RX 0x0 | ||
829 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ | 680 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ |
830 | #define nEP6_RX 0x0 | ||
831 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ | 681 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ |
832 | #define nEP7_RX 0x0 | ||
833 | 682 | ||
834 | /* Bit masks for USB_INTRTXE */ | 683 | /* Bit masks for USB_INTRTXE */ |
835 | 684 | ||
836 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ | 685 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ |
837 | #define nEP0_TX_E 0x0 | ||
838 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ | 686 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ |
839 | #define nEP1_TX_E 0x0 | ||
840 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ | 687 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ |
841 | #define nEP2_TX_E 0x0 | ||
842 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ | 688 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ |
843 | #define nEP3_TX_E 0x0 | ||
844 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ | 689 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ |
845 | #define nEP4_TX_E 0x0 | ||
846 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ | 690 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ |
847 | #define nEP5_TX_E 0x0 | ||
848 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ | 691 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ |
849 | #define nEP6_TX_E 0x0 | ||
850 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ | 692 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ |
851 | #define nEP7_TX_E 0x0 | ||
852 | 693 | ||
853 | /* Bit masks for USB_INTRRXE */ | 694 | /* Bit masks for USB_INTRRXE */ |
854 | 695 | ||
855 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ | 696 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ |
856 | #define nEP1_RX_E 0x0 | ||
857 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ | 697 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ |
858 | #define nEP2_RX_E 0x0 | ||
859 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ | 698 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ |
860 | #define nEP3_RX_E 0x0 | ||
861 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ | 699 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ |
862 | #define nEP4_RX_E 0x0 | ||
863 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ | 700 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ |
864 | #define nEP5_RX_E 0x0 | ||
865 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ | 701 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ |
866 | #define nEP6_RX_E 0x0 | ||
867 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ | 702 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ |
868 | #define nEP7_RX_E 0x0 | ||
869 | 703 | ||
870 | /* Bit masks for USB_INTRUSB */ | 704 | /* Bit masks for USB_INTRUSB */ |
871 | 705 | ||
872 | #define SUSPEND_B 0x1 /* Suspend indicator */ | 706 | #define SUSPEND_B 0x1 /* Suspend indicator */ |
873 | #define nSUSPEND_B 0x0 | ||
874 | #define RESUME_B 0x2 /* Resume indicator */ | 707 | #define RESUME_B 0x2 /* Resume indicator */ |
875 | #define nRESUME_B 0x0 | ||
876 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ | 708 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ |
877 | #define nRESET_OR_BABLE_B 0x0 | ||
878 | #define SOF_B 0x8 /* Start of frame */ | 709 | #define SOF_B 0x8 /* Start of frame */ |
879 | #define nSOF_B 0x0 | ||
880 | #define CONN_B 0x10 /* Connection indicator */ | 710 | #define CONN_B 0x10 /* Connection indicator */ |
881 | #define nCONN_B 0x0 | ||
882 | #define DISCON_B 0x20 /* Disconnect indicator */ | 711 | #define DISCON_B 0x20 /* Disconnect indicator */ |
883 | #define nDISCON_B 0x0 | ||
884 | #define SESSION_REQ_B 0x40 /* Session Request */ | 712 | #define SESSION_REQ_B 0x40 /* Session Request */ |
885 | #define nSESSION_REQ_B 0x0 | ||
886 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ | 713 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ |
887 | #define nVBUS_ERROR_B 0x0 | ||
888 | 714 | ||
889 | /* Bit masks for USB_INTRUSBE */ | 715 | /* Bit masks for USB_INTRUSBE */ |
890 | 716 | ||
891 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ | 717 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ |
892 | #define nSUSPEND_BE 0x0 | ||
893 | #define RESUME_BE 0x2 /* Resume indicator int enable */ | 718 | #define RESUME_BE 0x2 /* Resume indicator int enable */ |
894 | #define nRESUME_BE 0x0 | ||
895 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ | 719 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ |
896 | #define nRESET_OR_BABLE_BE 0x0 | ||
897 | #define SOF_BE 0x8 /* Start of frame int enable */ | 720 | #define SOF_BE 0x8 /* Start of frame int enable */ |
898 | #define nSOF_BE 0x0 | ||
899 | #define CONN_BE 0x10 /* Connection indicator int enable */ | 721 | #define CONN_BE 0x10 /* Connection indicator int enable */ |
900 | #define nCONN_BE 0x0 | ||
901 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ | 722 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ |
902 | #define nDISCON_BE 0x0 | ||
903 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ | 723 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ |
904 | #define nSESSION_REQ_BE 0x0 | ||
905 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ | 724 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ |
906 | #define nVBUS_ERROR_BE 0x0 | ||
907 | 725 | ||
908 | /* Bit masks for USB_FRAME */ | 726 | /* Bit masks for USB_FRAME */ |
909 | 727 | ||
@@ -916,117 +734,67 @@ | |||
916 | /* Bit masks for USB_GLOBAL_CTL */ | 734 | /* Bit masks for USB_GLOBAL_CTL */ |
917 | 735 | ||
918 | #define GLOBAL_ENA 0x1 /* enables USB module */ | 736 | #define GLOBAL_ENA 0x1 /* enables USB module */ |
919 | #define nGLOBAL_ENA 0x0 | ||
920 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ | 737 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ |
921 | #define nEP1_TX_ENA 0x0 | ||
922 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ | 738 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ |
923 | #define nEP2_TX_ENA 0x0 | ||
924 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ | 739 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ |
925 | #define nEP3_TX_ENA 0x0 | ||
926 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ | 740 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ |
927 | #define nEP4_TX_ENA 0x0 | ||
928 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ | 741 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ |
929 | #define nEP5_TX_ENA 0x0 | ||
930 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ | 742 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ |
931 | #define nEP6_TX_ENA 0x0 | ||
932 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ | 743 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ |
933 | #define nEP7_TX_ENA 0x0 | ||
934 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ | 744 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ |
935 | #define nEP1_RX_ENA 0x0 | ||
936 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ | 745 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ |
937 | #define nEP2_RX_ENA 0x0 | ||
938 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ | 746 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ |
939 | #define nEP3_RX_ENA 0x0 | ||
940 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ | 747 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ |
941 | #define nEP4_RX_ENA 0x0 | ||
942 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ | 748 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ |
943 | #define nEP5_RX_ENA 0x0 | ||
944 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ | 749 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ |
945 | #define nEP6_RX_ENA 0x0 | ||
946 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ | 750 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ |
947 | #define nEP7_RX_ENA 0x0 | ||
948 | 751 | ||
949 | /* Bit masks for USB_OTG_DEV_CTL */ | 752 | /* Bit masks for USB_OTG_DEV_CTL */ |
950 | 753 | ||
951 | #define SESSION 0x1 /* session indicator */ | 754 | #define SESSION 0x1 /* session indicator */ |
952 | #define nSESSION 0x0 | ||
953 | #define HOST_REQ 0x2 /* Host negotiation request */ | 755 | #define HOST_REQ 0x2 /* Host negotiation request */ |
954 | #define nHOST_REQ 0x0 | ||
955 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ | 756 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ |
956 | #define nHOST_MODE 0x0 | ||
957 | #define VBUS0 0x8 /* Vbus level indicator[0] */ | 757 | #define VBUS0 0x8 /* Vbus level indicator[0] */ |
958 | #define nVBUS0 0x0 | ||
959 | #define VBUS1 0x10 /* Vbus level indicator[1] */ | 758 | #define VBUS1 0x10 /* Vbus level indicator[1] */ |
960 | #define nVBUS1 0x0 | ||
961 | #define LSDEV 0x20 /* Low-speed indicator */ | 759 | #define LSDEV 0x20 /* Low-speed indicator */ |
962 | #define nLSDEV 0x0 | ||
963 | #define FSDEV 0x40 /* Full or High-speed indicator */ | 760 | #define FSDEV 0x40 /* Full or High-speed indicator */ |
964 | #define nFSDEV 0x0 | ||
965 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ | 761 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ |
966 | #define nB_DEVICE 0x0 | ||
967 | 762 | ||
968 | /* Bit masks for USB_OTG_VBUS_IRQ */ | 763 | /* Bit masks for USB_OTG_VBUS_IRQ */ |
969 | 764 | ||
970 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ | 765 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ |
971 | #define nDRIVE_VBUS_ON 0x0 | ||
972 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ | 766 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ |
973 | #define nDRIVE_VBUS_OFF 0x0 | ||
974 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ | 767 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ |
975 | #define nCHRG_VBUS_START 0x0 | ||
976 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ | 768 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ |
977 | #define nCHRG_VBUS_END 0x0 | ||
978 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ | 769 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ |
979 | #define nDISCHRG_VBUS_START 0x0 | ||
980 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ | 770 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ |
981 | #define nDISCHRG_VBUS_END 0x0 | ||
982 | 771 | ||
983 | /* Bit masks for USB_OTG_VBUS_MASK */ | 772 | /* Bit masks for USB_OTG_VBUS_MASK */ |
984 | 773 | ||
985 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ | 774 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ |
986 | #define nDRIVE_VBUS_ON_ENA 0x0 | ||
987 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ | 775 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ |
988 | #define nDRIVE_VBUS_OFF_ENA 0x0 | ||
989 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ | 776 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ |
990 | #define nCHRG_VBUS_START_ENA 0x0 | ||
991 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ | 777 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ |
992 | #define nCHRG_VBUS_END_ENA 0x0 | ||
993 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ | 778 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ |
994 | #define nDISCHRG_VBUS_START_ENA 0x0 | ||
995 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ | 779 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ |
996 | #define nDISCHRG_VBUS_END_ENA 0x0 | ||
997 | 780 | ||
998 | /* Bit masks for USB_CSR0 */ | 781 | /* Bit masks for USB_CSR0 */ |
999 | 782 | ||
1000 | #define RXPKTRDY 0x1 /* data packet receive indicator */ | 783 | #define RXPKTRDY 0x1 /* data packet receive indicator */ |
1001 | #define nRXPKTRDY 0x0 | ||
1002 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ | 784 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ |
1003 | #define nTXPKTRDY 0x0 | ||
1004 | #define STALL_SENT 0x4 /* STALL handshake sent */ | 785 | #define STALL_SENT 0x4 /* STALL handshake sent */ |
1005 | #define nSTALL_SENT 0x0 | ||
1006 | #define DATAEND 0x8 /* Data end indicator */ | 786 | #define DATAEND 0x8 /* Data end indicator */ |
1007 | #define nDATAEND 0x0 | ||
1008 | #define SETUPEND 0x10 /* Setup end */ | 787 | #define SETUPEND 0x10 /* Setup end */ |
1009 | #define nSETUPEND 0x0 | ||
1010 | #define SENDSTALL 0x20 /* Send STALL handshake */ | 788 | #define SENDSTALL 0x20 /* Send STALL handshake */ |
1011 | #define nSENDSTALL 0x0 | ||
1012 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ | 789 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ |
1013 | #define nSERVICED_RXPKTRDY 0x0 | ||
1014 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ | 790 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ |
1015 | #define nSERVICED_SETUPEND 0x0 | ||
1016 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ | 791 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ |
1017 | #define nFLUSHFIFO 0x0 | ||
1018 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ | 792 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ |
1019 | #define nSTALL_RECEIVED_H 0x0 | ||
1020 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ | 793 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ |
1021 | #define nSETUPPKT_H 0x0 | ||
1022 | #define ERROR_H 0x10 /* timeout error indicator host mode */ | 794 | #define ERROR_H 0x10 /* timeout error indicator host mode */ |
1023 | #define nERROR_H 0x0 | ||
1024 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ | 795 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ |
1025 | #define nREQPKT_H 0x0 | ||
1026 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ | 796 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ |
1027 | #define nSTATUSPKT_H 0x0 | ||
1028 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ | 797 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ |
1029 | #define nNAK_TIMEOUT_H 0x0 | ||
1030 | 798 | ||
1031 | /* Bit masks for USB_COUNT0 */ | 799 | /* Bit masks for USB_COUNT0 */ |
1032 | 800 | ||
@@ -1047,37 +815,21 @@ | |||
1047 | /* Bit masks for USB_TXCSR */ | 815 | /* Bit masks for USB_TXCSR */ |
1048 | 816 | ||
1049 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ | 817 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ |
1050 | #define nTXPKTRDY_T 0x0 | ||
1051 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ | 818 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ |
1052 | #define nFIFO_NOT_EMPTY_T 0x0 | ||
1053 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ | 819 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ |
1054 | #define nUNDERRUN_T 0x0 | ||
1055 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ | 820 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ |
1056 | #define nFLUSHFIFO_T 0x0 | ||
1057 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ | 821 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ |
1058 | #define nSTALL_SEND_T 0x0 | ||
1059 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ | 822 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ |
1060 | #define nSTALL_SENT_T 0x0 | ||
1061 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ | 823 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ |
1062 | #define nCLEAR_DATATOGGLE_T 0x0 | ||
1063 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ | 824 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ |
1064 | #define nINCOMPTX_T 0x0 | ||
1065 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ | 825 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ |
1066 | #define nDMAREQMODE_T 0x0 | ||
1067 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ | 826 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ |
1068 | #define nFORCE_DATATOGGLE_T 0x0 | ||
1069 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ | 827 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ |
1070 | #define nDMAREQ_ENA_T 0x0 | ||
1071 | #define ISO_T 0x4000 /* enable Isochronous transfers */ | 828 | #define ISO_T 0x4000 /* enable Isochronous transfers */ |
1072 | #define nISO_T 0x0 | ||
1073 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ | 829 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ |
1074 | #define nAUTOSET_T 0x0 | ||
1075 | #define ERROR_TH 0x4 /* error condition host mode */ | 830 | #define ERROR_TH 0x4 /* error condition host mode */ |
1076 | #define nERROR_TH 0x0 | ||
1077 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ | 831 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ |
1078 | #define nSTALL_RECEIVED_TH 0x0 | ||
1079 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ | 832 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ |
1080 | #define nNAK_TIMEOUT_TH 0x0 | ||
1081 | 833 | ||
1082 | /* Bit masks for USB_TXCOUNT */ | 834 | /* Bit masks for USB_TXCOUNT */ |
1083 | 835 | ||
@@ -1086,45 +838,25 @@ | |||
1086 | /* Bit masks for USB_RXCSR */ | 838 | /* Bit masks for USB_RXCSR */ |
1087 | 839 | ||
1088 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ | 840 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ |
1089 | #define nRXPKTRDY_R 0x0 | ||
1090 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ | 841 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ |
1091 | #define nFIFO_FULL_R 0x0 | ||
1092 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ | 842 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ |
1093 | #define nOVERRUN_R 0x0 | ||
1094 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ | 843 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ |
1095 | #define nDATAERROR_R 0x0 | ||
1096 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ | 844 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ |
1097 | #define nFLUSHFIFO_R 0x0 | ||
1098 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ | 845 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ |
1099 | #define nSTALL_SEND_R 0x0 | ||
1100 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ | 846 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ |
1101 | #define nSTALL_SENT_R 0x0 | ||
1102 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ | 847 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ |
1103 | #define nCLEAR_DATATOGGLE_R 0x0 | ||
1104 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ | 848 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ |
1105 | #define nINCOMPRX_R 0x0 | ||
1106 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ | 849 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ |
1107 | #define nDMAREQMODE_R 0x0 | ||
1108 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ | 850 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ |
1109 | #define nDISNYET_R 0x0 | ||
1110 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ | 851 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ |
1111 | #define nDMAREQ_ENA_R 0x0 | ||
1112 | #define ISO_R 0x4000 /* enable Isochronous transfers */ | 852 | #define ISO_R 0x4000 /* enable Isochronous transfers */ |
1113 | #define nISO_R 0x0 | ||
1114 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ | 853 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ |
1115 | #define nAUTOCLEAR_R 0x0 | ||
1116 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ | 854 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ |
1117 | #define nERROR_RH 0x0 | ||
1118 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ | 855 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ |
1119 | #define nREQPKT_RH 0x0 | ||
1120 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ | 856 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ |
1121 | #define nSTALL_RECEIVED_RH 0x0 | ||
1122 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ | 857 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ |
1123 | #define nINCOMPRX_RH 0x0 | ||
1124 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ | 858 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ |
1125 | #define nDMAREQMODE_RH 0x0 | ||
1126 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ | 859 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ |
1127 | #define nAUTOREQ_RH 0x0 | ||
1128 | 860 | ||
1129 | /* Bit masks for USB_RXCOUNT */ | 861 | /* Bit masks for USB_RXCOUNT */ |
1130 | 862 | ||
@@ -1151,35 +883,22 @@ | |||
1151 | /* Bit masks for USB_DMA_INTERRUPT */ | 883 | /* Bit masks for USB_DMA_INTERRUPT */ |
1152 | 884 | ||
1153 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ | 885 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ |
1154 | #define nDMA0_INT 0x0 | ||
1155 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ | 886 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ |
1156 | #define nDMA1_INT 0x0 | ||
1157 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ | 887 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ |
1158 | #define nDMA2_INT 0x0 | ||
1159 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ | 888 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ |
1160 | #define nDMA3_INT 0x0 | ||
1161 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ | 889 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ |
1162 | #define nDMA4_INT 0x0 | ||
1163 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ | 890 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ |
1164 | #define nDMA5_INT 0x0 | ||
1165 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ | 891 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ |
1166 | #define nDMA6_INT 0x0 | ||
1167 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ | 892 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ |
1168 | #define nDMA7_INT 0x0 | ||
1169 | 893 | ||
1170 | /* Bit masks for USB_DMAxCONTROL */ | 894 | /* Bit masks for USB_DMAxCONTROL */ |
1171 | 895 | ||
1172 | #define DMA_ENA 0x1 /* DMA enable */ | 896 | #define DMA_ENA 0x1 /* DMA enable */ |
1173 | #define nDMA_ENA 0x0 | ||
1174 | #define DIRECTION 0x2 /* direction of DMA transfer */ | 897 | #define DIRECTION 0x2 /* direction of DMA transfer */ |
1175 | #define nDIRECTION 0x0 | ||
1176 | #define MODE 0x4 /* DMA Bus error */ | 898 | #define MODE 0x4 /* DMA Bus error */ |
1177 | #define nMODE 0x0 | ||
1178 | #define INT_ENA 0x8 /* Interrupt enable */ | 899 | #define INT_ENA 0x8 /* Interrupt enable */ |
1179 | #define nINT_ENA 0x0 | ||
1180 | #define EPNUM 0xf0 /* EP number */ | 900 | #define EPNUM 0xf0 /* EP number */ |
1181 | #define BUSERROR 0x100 /* DMA Bus error */ | 901 | #define BUSERROR 0x100 /* DMA Bus error */ |
1182 | #define nBUSERROR 0x0 | ||
1183 | 902 | ||
1184 | /* Bit masks for USB_DMAxADDRHIGH */ | 903 | /* Bit masks for USB_DMAxADDRHIGH */ |
1185 | 904 | ||
diff --git a/include/asm-blackfin/mach-bf548/defBF544.h b/include/asm-blackfin/mach-bf548/defBF544.h index 8fc77ea12aa9..dd955dcd39b8 100644 --- a/include/asm-blackfin/mach-bf548/defBF544.h +++ b/include/asm-blackfin/mach-bf548/defBF544.h | |||
@@ -538,21 +538,13 @@ | |||
538 | /* Bit masks for PIXC_CTL */ | 538 | /* Bit masks for PIXC_CTL */ |
539 | 539 | ||
540 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ | 540 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ |
541 | #define nPIXC_EN 0x0 | ||
542 | #define OVR_A_EN 0x2 /* Overlay A Enable */ | 541 | #define OVR_A_EN 0x2 /* Overlay A Enable */ |
543 | #define nOVR_A_EN 0x0 | ||
544 | #define OVR_B_EN 0x4 /* Overlay B Enable */ | 542 | #define OVR_B_EN 0x4 /* Overlay B Enable */ |
545 | #define nOVR_B_EN 0x0 | ||
546 | #define IMG_FORM 0x8 /* Image Data Format */ | 543 | #define IMG_FORM 0x8 /* Image Data Format */ |
547 | #define nIMG_FORM 0x0 | ||
548 | #define OVR_FORM 0x10 /* Overlay Data Format */ | 544 | #define OVR_FORM 0x10 /* Overlay Data Format */ |
549 | #define nOVR_FORM 0x0 | ||
550 | #define OUT_FORM 0x20 /* Output Data Format */ | 545 | #define OUT_FORM 0x20 /* Output Data Format */ |
551 | #define nOUT_FORM 0x0 | ||
552 | #define UDS_MOD 0x40 /* Resampling Mode */ | 546 | #define UDS_MOD 0x40 /* Resampling Mode */ |
553 | #define nUDS_MOD 0x0 | ||
554 | #define TC_EN 0x80 /* Transparent Color Enable */ | 547 | #define TC_EN 0x80 /* Transparent Color Enable */ |
555 | #define nTC_EN 0x0 | ||
556 | #define IMG_STAT 0x300 /* Image FIFO Status */ | 548 | #define IMG_STAT 0x300 /* Image FIFO Status */ |
557 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ | 549 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ |
558 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ | 550 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ |
@@ -600,13 +592,9 @@ | |||
600 | /* Bit masks for PIXC_INTRSTAT */ | 592 | /* Bit masks for PIXC_INTRSTAT */ |
601 | 593 | ||
602 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ | 594 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ |
603 | #define nOVR_INT_EN 0x0 | ||
604 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ | 595 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ |
605 | #define nFRM_INT_EN 0x0 | ||
606 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ | 596 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ |
607 | #define nOVR_INT_STAT 0x0 | ||
608 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ | 597 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ |
609 | #define nFRM_INT_STAT 0x0 | ||
610 | 598 | ||
611 | /* Bit masks for PIXC_RYCON */ | 599 | /* Bit masks for PIXC_RYCON */ |
612 | 600 | ||
@@ -614,7 +602,6 @@ | |||
614 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ | 602 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ |
615 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ | 603 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ |
616 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ | 604 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ |
617 | #define nRY_MULT4 0x0 | ||
618 | 605 | ||
619 | /* Bit masks for PIXC_GUCON */ | 606 | /* Bit masks for PIXC_GUCON */ |
620 | 607 | ||
@@ -622,7 +609,6 @@ | |||
622 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ | 609 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ |
623 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ | 610 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ |
624 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ | 611 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ |
625 | #define nGU_MULT4 0x0 | ||
626 | 612 | ||
627 | /* Bit masks for PIXC_BVCON */ | 613 | /* Bit masks for PIXC_BVCON */ |
628 | 614 | ||
@@ -630,7 +616,6 @@ | |||
630 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ | 616 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ |
631 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ | 617 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ |
632 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ | 618 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ |
633 | #define nBV_MULT4 0x0 | ||
634 | 619 | ||
635 | /* Bit masks for PIXC_CCBIAS */ | 620 | /* Bit masks for PIXC_CCBIAS */ |
636 | 621 | ||
@@ -647,48 +632,28 @@ | |||
647 | /* Bit masks for HOST_CONTROL */ | 632 | /* Bit masks for HOST_CONTROL */ |
648 | 633 | ||
649 | #define HOST_EN 0x1 /* Host Enable */ | 634 | #define HOST_EN 0x1 /* Host Enable */ |
650 | #define nHOST_EN 0x0 | ||
651 | #define HOST_END 0x2 /* Host Endianess */ | 635 | #define HOST_END 0x2 /* Host Endianess */ |
652 | #define nHOST_END 0x0 | ||
653 | #define DATA_SIZE 0x4 /* Data Size */ | 636 | #define DATA_SIZE 0x4 /* Data Size */ |
654 | #define nDATA_SIZE 0x0 | ||
655 | #define HOST_RST 0x8 /* Host Reset */ | 637 | #define HOST_RST 0x8 /* Host Reset */ |
656 | #define nHOST_RST 0x0 | ||
657 | #define HRDY_OVR 0x20 /* Host Ready Override */ | 638 | #define HRDY_OVR 0x20 /* Host Ready Override */ |
658 | #define nHRDY_OVR 0x0 | ||
659 | #define INT_MODE 0x40 /* Interrupt Mode */ | 639 | #define INT_MODE 0x40 /* Interrupt Mode */ |
660 | #define nINT_MODE 0x0 | ||
661 | #define BT_EN 0x80 /* Bus Timeout Enable */ | 640 | #define BT_EN 0x80 /* Bus Timeout Enable */ |
662 | #define nBT_EN 0x0 | ||
663 | #define EHW 0x100 /* Enable Host Write */ | 641 | #define EHW 0x100 /* Enable Host Write */ |
664 | #define nEHW 0x0 | ||
665 | #define EHR 0x200 /* Enable Host Read */ | 642 | #define EHR 0x200 /* Enable Host Read */ |
666 | #define nEHR 0x0 | ||
667 | #define BDR 0x400 /* Burst DMA Requests */ | 643 | #define BDR 0x400 /* Burst DMA Requests */ |
668 | #define nBDR 0x0 | ||
669 | 644 | ||
670 | /* Bit masks for HOST_STATUS */ | 645 | /* Bit masks for HOST_STATUS */ |
671 | 646 | ||
672 | #define READY 0x1 /* DMA Ready */ | 647 | #define READY 0x1 /* DMA Ready */ |
673 | #define nREADY 0x0 | ||
674 | #define FIFOFULL 0x2 /* FIFO Full */ | 648 | #define FIFOFULL 0x2 /* FIFO Full */ |
675 | #define nFIFOFULL 0x0 | ||
676 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 649 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
677 | #define nFIFOEMPTY 0x0 | ||
678 | #define COMPLETE 0x8 /* DMA Complete */ | 650 | #define COMPLETE 0x8 /* DMA Complete */ |
679 | #define nCOMPLETE 0x0 | ||
680 | #define HSHK 0x10 /* Host Handshake */ | 651 | #define HSHK 0x10 /* Host Handshake */ |
681 | #define nHSHK 0x0 | ||
682 | #define TIMEOUT 0x20 /* Host Timeout */ | 652 | #define TIMEOUT 0x20 /* Host Timeout */ |
683 | #define nTIMEOUT 0x0 | ||
684 | #define HIRQ 0x40 /* Host Interrupt Request */ | 653 | #define HIRQ 0x40 /* Host Interrupt Request */ |
685 | #define nHIRQ 0x0 | ||
686 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ | 654 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ |
687 | #define nALLOW_CNFG 0x0 | ||
688 | #define DMA_DIR 0x100 /* DMA Direction */ | 655 | #define DMA_DIR 0x100 /* DMA Direction */ |
689 | #define nDMA_DIR 0x0 | ||
690 | #define BTE 0x200 /* Bus Timeout Enabled */ | 656 | #define BTE 0x200 /* Bus Timeout Enabled */ |
691 | #define nBTE 0x0 | ||
692 | 657 | ||
693 | /* Bit masks for HOST_TIMEOUT */ | 658 | /* Bit masks for HOST_TIMEOUT */ |
694 | 659 | ||
@@ -697,67 +662,42 @@ | |||
697 | /* Bit masks for TIMER_ENABLE1 */ | 662 | /* Bit masks for TIMER_ENABLE1 */ |
698 | 663 | ||
699 | #define TIMEN8 0x1 /* Timer 8 Enable */ | 664 | #define TIMEN8 0x1 /* Timer 8 Enable */ |
700 | #define nTIMEN8 0x0 | ||
701 | #define TIMEN9 0x2 /* Timer 9 Enable */ | 665 | #define TIMEN9 0x2 /* Timer 9 Enable */ |
702 | #define nTIMEN9 0x0 | ||
703 | #define TIMEN10 0x4 /* Timer 10 Enable */ | 666 | #define TIMEN10 0x4 /* Timer 10 Enable */ |
704 | #define nTIMEN10 0x0 | ||
705 | 667 | ||
706 | /* Bit masks for TIMER_DISABLE1 */ | 668 | /* Bit masks for TIMER_DISABLE1 */ |
707 | 669 | ||
708 | #define TIMDIS8 0x1 /* Timer 8 Disable */ | 670 | #define TIMDIS8 0x1 /* Timer 8 Disable */ |
709 | #define nTIMDIS8 0x0 | ||
710 | #define TIMDIS9 0x2 /* Timer 9 Disable */ | 671 | #define TIMDIS9 0x2 /* Timer 9 Disable */ |
711 | #define nTIMDIS9 0x0 | ||
712 | #define TIMDIS10 0x4 /* Timer 10 Disable */ | 672 | #define TIMDIS10 0x4 /* Timer 10 Disable */ |
713 | #define nTIMDIS10 0x0 | ||
714 | 673 | ||
715 | /* Bit masks for TIMER_STATUS1 */ | 674 | /* Bit masks for TIMER_STATUS1 */ |
716 | 675 | ||
717 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ | 676 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ |
718 | #define nTIMIL8 0x0 | ||
719 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ | 677 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ |
720 | #define nTIMIL9 0x0 | ||
721 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ | 678 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ |
722 | #define nTIMIL10 0x0 | ||
723 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ | 679 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ |
724 | #define nTOVF_ERR8 0x0 | ||
725 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ | 680 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ |
726 | #define nTOVF_ERR9 0x0 | ||
727 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ | 681 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ |
728 | #define nTOVF_ERR10 0x0 | ||
729 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ | 682 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ |
730 | #define nTRUN8 0x0 | ||
731 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ | 683 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ |
732 | #define nTRUN9 0x0 | ||
733 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ | 684 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ |
734 | #define nTRUN10 0x0 | ||
735 | 685 | ||
736 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ | 686 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ |
737 | 687 | ||
738 | /* Bit masks for HMDMAx_CONTROL */ | 688 | /* Bit masks for HMDMAx_CONTROL */ |
739 | 689 | ||
740 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ | 690 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ |
741 | #define nHMDMAEN 0x0 | ||
742 | #define REP 0x2 /* Handshake MDMA Request Polarity */ | 691 | #define REP 0x2 /* Handshake MDMA Request Polarity */ |
743 | #define nREP 0x0 | ||
744 | #define UTE 0x8 /* Urgency Threshold Enable */ | 692 | #define UTE 0x8 /* Urgency Threshold Enable */ |
745 | #define nUTE 0x0 | ||
746 | #define OIE 0x10 /* Overflow Interrupt Enable */ | 693 | #define OIE 0x10 /* Overflow Interrupt Enable */ |
747 | #define nOIE 0x0 | ||
748 | #define BDIE 0x20 /* Block Done Interrupt Enable */ | 694 | #define BDIE 0x20 /* Block Done Interrupt Enable */ |
749 | #define nBDIE 0x0 | ||
750 | #define MBDI 0x40 /* Mask Block Done Interrupt */ | 695 | #define MBDI 0x40 /* Mask Block Done Interrupt */ |
751 | #define nMBDI 0x0 | ||
752 | #define DRQ 0x300 /* Handshake MDMA Request Type */ | 696 | #define DRQ 0x300 /* Handshake MDMA Request Type */ |
753 | #define RBC 0x1000 /* Force Reload of BCOUNT */ | 697 | #define RBC 0x1000 /* Force Reload of BCOUNT */ |
754 | #define nRBC 0x0 | ||
755 | #define PS 0x2000 /* Pin Status */ | 698 | #define PS 0x2000 /* Pin Status */ |
756 | #define nPS 0x0 | ||
757 | #define OI 0x4000 /* Overflow Interrupt Generated */ | 699 | #define OI 0x4000 /* Overflow Interrupt Generated */ |
758 | #define nOI 0x0 | ||
759 | #define BDI 0x8000 /* Block Done Interrupt Generated */ | 700 | #define BDI 0x8000 /* Block Done Interrupt Generated */ |
760 | #define nBDI 0x0 | ||
761 | 701 | ||
762 | /* ******************************************* */ | 702 | /* ******************************************* */ |
763 | /* MULTI BIT MACRO ENUMERATIONS */ | 703 | /* MULTI BIT MACRO ENUMERATIONS */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h index d9e3062a9117..8d4214e0807c 100644 --- a/include/asm-blackfin/mach-bf548/defBF548.h +++ b/include/asm-blackfin/mach-bf548/defBF548.h | |||
@@ -899,21 +899,13 @@ | |||
899 | /* Bit masks for PIXC_CTL */ | 899 | /* Bit masks for PIXC_CTL */ |
900 | 900 | ||
901 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ | 901 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ |
902 | #define nPIXC_EN 0x0 | ||
903 | #define OVR_A_EN 0x2 /* Overlay A Enable */ | 902 | #define OVR_A_EN 0x2 /* Overlay A Enable */ |
904 | #define nOVR_A_EN 0x0 | ||
905 | #define OVR_B_EN 0x4 /* Overlay B Enable */ | 903 | #define OVR_B_EN 0x4 /* Overlay B Enable */ |
906 | #define nOVR_B_EN 0x0 | ||
907 | #define IMG_FORM 0x8 /* Image Data Format */ | 904 | #define IMG_FORM 0x8 /* Image Data Format */ |
908 | #define nIMG_FORM 0x0 | ||
909 | #define OVR_FORM 0x10 /* Overlay Data Format */ | 905 | #define OVR_FORM 0x10 /* Overlay Data Format */ |
910 | #define nOVR_FORM 0x0 | ||
911 | #define OUT_FORM 0x20 /* Output Data Format */ | 906 | #define OUT_FORM 0x20 /* Output Data Format */ |
912 | #define nOUT_FORM 0x0 | ||
913 | #define UDS_MOD 0x40 /* Resampling Mode */ | 907 | #define UDS_MOD 0x40 /* Resampling Mode */ |
914 | #define nUDS_MOD 0x0 | ||
915 | #define TC_EN 0x80 /* Transparent Color Enable */ | 908 | #define TC_EN 0x80 /* Transparent Color Enable */ |
916 | #define nTC_EN 0x0 | ||
917 | #define IMG_STAT 0x300 /* Image FIFO Status */ | 909 | #define IMG_STAT 0x300 /* Image FIFO Status */ |
918 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ | 910 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ |
919 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ | 911 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ |
@@ -961,13 +953,9 @@ | |||
961 | /* Bit masks for PIXC_INTRSTAT */ | 953 | /* Bit masks for PIXC_INTRSTAT */ |
962 | 954 | ||
963 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ | 955 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ |
964 | #define nOVR_INT_EN 0x0 | ||
965 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ | 956 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ |
966 | #define nFRM_INT_EN 0x0 | ||
967 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ | 957 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ |
968 | #define nOVR_INT_STAT 0x0 | ||
969 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ | 958 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ |
970 | #define nFRM_INT_STAT 0x0 | ||
971 | 959 | ||
972 | /* Bit masks for PIXC_RYCON */ | 960 | /* Bit masks for PIXC_RYCON */ |
973 | 961 | ||
@@ -975,7 +963,6 @@ | |||
975 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ | 963 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ |
976 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ | 964 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ |
977 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ | 965 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ |
978 | #define nRY_MULT4 0x0 | ||
979 | 966 | ||
980 | /* Bit masks for PIXC_GUCON */ | 967 | /* Bit masks for PIXC_GUCON */ |
981 | 968 | ||
@@ -983,7 +970,6 @@ | |||
983 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ | 970 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ |
984 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ | 971 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ |
985 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ | 972 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ |
986 | #define nGU_MULT4 0x0 | ||
987 | 973 | ||
988 | /* Bit masks for PIXC_BVCON */ | 974 | /* Bit masks for PIXC_BVCON */ |
989 | 975 | ||
@@ -991,7 +977,6 @@ | |||
991 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ | 977 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ |
992 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ | 978 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ |
993 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ | 979 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ |
994 | #define nBV_MULT4 0x0 | ||
995 | 980 | ||
996 | /* Bit masks for PIXC_CCBIAS */ | 981 | /* Bit masks for PIXC_CCBIAS */ |
997 | 982 | ||
@@ -1008,48 +993,28 @@ | |||
1008 | /* Bit masks for HOST_CONTROL */ | 993 | /* Bit masks for HOST_CONTROL */ |
1009 | 994 | ||
1010 | #define HOST_EN 0x1 /* Host Enable */ | 995 | #define HOST_EN 0x1 /* Host Enable */ |
1011 | #define nHOST_EN 0x0 | ||
1012 | #define HOST_END 0x2 /* Host Endianess */ | 996 | #define HOST_END 0x2 /* Host Endianess */ |
1013 | #define nHOST_END 0x0 | ||
1014 | #define DATA_SIZE 0x4 /* Data Size */ | 997 | #define DATA_SIZE 0x4 /* Data Size */ |
1015 | #define nDATA_SIZE 0x0 | ||
1016 | #define HOST_RST 0x8 /* Host Reset */ | 998 | #define HOST_RST 0x8 /* Host Reset */ |
1017 | #define nHOST_RST 0x0 | ||
1018 | #define HRDY_OVR 0x20 /* Host Ready Override */ | 999 | #define HRDY_OVR 0x20 /* Host Ready Override */ |
1019 | #define nHRDY_OVR 0x0 | ||
1020 | #define INT_MODE 0x40 /* Interrupt Mode */ | 1000 | #define INT_MODE 0x40 /* Interrupt Mode */ |
1021 | #define nINT_MODE 0x0 | ||
1022 | #define BT_EN 0x80 /* Bus Timeout Enable */ | 1001 | #define BT_EN 0x80 /* Bus Timeout Enable */ |
1023 | #define nBT_EN 0x0 | ||
1024 | #define EHW 0x100 /* Enable Host Write */ | 1002 | #define EHW 0x100 /* Enable Host Write */ |
1025 | #define nEHW 0x0 | ||
1026 | #define EHR 0x200 /* Enable Host Read */ | 1003 | #define EHR 0x200 /* Enable Host Read */ |
1027 | #define nEHR 0x0 | ||
1028 | #define BDR 0x400 /* Burst DMA Requests */ | 1004 | #define BDR 0x400 /* Burst DMA Requests */ |
1029 | #define nBDR 0x0 | ||
1030 | 1005 | ||
1031 | /* Bit masks for HOST_STATUS */ | 1006 | /* Bit masks for HOST_STATUS */ |
1032 | 1007 | ||
1033 | #define READY 0x1 /* DMA Ready */ | 1008 | #define READY 0x1 /* DMA Ready */ |
1034 | #define nREADY 0x0 | ||
1035 | #define FIFOFULL 0x2 /* FIFO Full */ | 1009 | #define FIFOFULL 0x2 /* FIFO Full */ |
1036 | #define nFIFOFULL 0x0 | ||
1037 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 1010 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
1038 | #define nFIFOEMPTY 0x0 | ||
1039 | #define COMPLETE 0x8 /* DMA Complete */ | 1011 | #define COMPLETE 0x8 /* DMA Complete */ |
1040 | #define nCOMPLETE 0x0 | ||
1041 | #define HSHK 0x10 /* Host Handshake */ | 1012 | #define HSHK 0x10 /* Host Handshake */ |
1042 | #define nHSHK 0x0 | ||
1043 | #define TIMEOUT 0x20 /* Host Timeout */ | 1013 | #define TIMEOUT 0x20 /* Host Timeout */ |
1044 | #define nTIMEOUT 0x0 | ||
1045 | #define HIRQ 0x40 /* Host Interrupt Request */ | 1014 | #define HIRQ 0x40 /* Host Interrupt Request */ |
1046 | #define nHIRQ 0x0 | ||
1047 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ | 1015 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ |
1048 | #define nALLOW_CNFG 0x0 | ||
1049 | #define DMA_DIR 0x100 /* DMA Direction */ | 1016 | #define DMA_DIR 0x100 /* DMA Direction */ |
1050 | #define nDMA_DIR 0x0 | ||
1051 | #define BTE 0x200 /* Bus Timeout Enabled */ | 1017 | #define BTE 0x200 /* Bus Timeout Enabled */ |
1052 | #define nBTE 0x0 | ||
1053 | 1018 | ||
1054 | /* Bit masks for HOST_TIMEOUT */ | 1019 | /* Bit masks for HOST_TIMEOUT */ |
1055 | 1020 | ||
@@ -1058,7 +1023,6 @@ | |||
1058 | /* Bit masks for KPAD_CTL */ | 1023 | /* Bit masks for KPAD_CTL */ |
1059 | 1024 | ||
1060 | #define KPAD_EN 0x1 /* Keypad Enable */ | 1025 | #define KPAD_EN 0x1 /* Keypad Enable */ |
1061 | #define nKPAD_EN 0x0 | ||
1062 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ | 1026 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ |
1063 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ | 1027 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ |
1064 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ | 1028 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ |
@@ -1080,29 +1044,21 @@ | |||
1080 | /* Bit masks for KPAD_STAT */ | 1044 | /* Bit masks for KPAD_STAT */ |
1081 | 1045 | ||
1082 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ | 1046 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ |
1083 | #define nKPAD_IRQ 0x0 | ||
1084 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ | 1047 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ |
1085 | #define KPAD_PRESSED 0x8 /* Key press current status */ | 1048 | #define KPAD_PRESSED 0x8 /* Key press current status */ |
1086 | #define nKPAD_PRESSED 0x0 | ||
1087 | 1049 | ||
1088 | /* Bit masks for KPAD_SOFTEVAL */ | 1050 | /* Bit masks for KPAD_SOFTEVAL */ |
1089 | 1051 | ||
1090 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ | 1052 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ |
1091 | #define nKPAD_SOFTEVAL_E 0x0 | ||
1092 | 1053 | ||
1093 | /* Bit masks for SDH_COMMAND */ | 1054 | /* Bit masks for SDH_COMMAND */ |
1094 | 1055 | ||
1095 | #define CMD_IDX 0x3f /* Command Index */ | 1056 | #define CMD_IDX 0x3f /* Command Index */ |
1096 | #define CMD_RSP 0x40 /* Response */ | 1057 | #define CMD_RSP 0x40 /* Response */ |
1097 | #define nCMD_RSP 0x0 | ||
1098 | #define CMD_L_RSP 0x80 /* Long Response */ | 1058 | #define CMD_L_RSP 0x80 /* Long Response */ |
1099 | #define nCMD_L_RSP 0x0 | ||
1100 | #define CMD_INT_E 0x100 /* Command Interrupt */ | 1059 | #define CMD_INT_E 0x100 /* Command Interrupt */ |
1101 | #define nCMD_INT_E 0x0 | ||
1102 | #define CMD_PEND_E 0x200 /* Command Pending */ | 1060 | #define CMD_PEND_E 0x200 /* Command Pending */ |
1103 | #define nCMD_PEND_E 0x0 | ||
1104 | #define CMD_E 0x400 /* Command Enable */ | 1061 | #define CMD_E 0x400 /* Command Enable */ |
1105 | #define nCMD_E 0x0 | ||
1106 | 1062 | ||
1107 | /* Bit masks for SDH_PWR_CTL */ | 1063 | /* Bit masks for SDH_PWR_CTL */ |
1108 | 1064 | ||
@@ -1111,21 +1067,15 @@ | |||
1111 | #define TBD 0x3c /* TBD */ | 1067 | #define TBD 0x3c /* TBD */ |
1112 | #endif | 1068 | #endif |
1113 | #define SD_CMD_OD 0x40 /* Open Drain Output */ | 1069 | #define SD_CMD_OD 0x40 /* Open Drain Output */ |
1114 | #define nSD_CMD_OD 0x0 | ||
1115 | #define ROD_CTL 0x80 /* Rod Control */ | 1070 | #define ROD_CTL 0x80 /* Rod Control */ |
1116 | #define nROD_CTL 0x0 | ||
1117 | 1071 | ||
1118 | /* Bit masks for SDH_CLK_CTL */ | 1072 | /* Bit masks for SDH_CLK_CTL */ |
1119 | 1073 | ||
1120 | #define CLKDIV 0xff /* MC_CLK Divisor */ | 1074 | #define CLKDIV 0xff /* MC_CLK Divisor */ |
1121 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ | 1075 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ |
1122 | #define nCLK_E 0x0 | ||
1123 | #define PWR_SV_E 0x200 /* Power Save Enable */ | 1076 | #define PWR_SV_E 0x200 /* Power Save Enable */ |
1124 | #define nPWR_SV_E 0x0 | ||
1125 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ | 1077 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ |
1126 | #define nCLKDIV_BYPASS 0x0 | ||
1127 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ | 1078 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ |
1128 | #define nWIDE_BUS 0x0 | ||
1129 | 1079 | ||
1130 | /* Bit masks for SDH_RESP_CMD */ | 1080 | /* Bit masks for SDH_RESP_CMD */ |
1131 | 1081 | ||
@@ -1134,133 +1084,74 @@ | |||
1134 | /* Bit masks for SDH_DATA_CTL */ | 1084 | /* Bit masks for SDH_DATA_CTL */ |
1135 | 1085 | ||
1136 | #define DTX_E 0x1 /* Data Transfer Enable */ | 1086 | #define DTX_E 0x1 /* Data Transfer Enable */ |
1137 | #define nDTX_E 0x0 | ||
1138 | #define DTX_DIR 0x2 /* Data Transfer Direction */ | 1087 | #define DTX_DIR 0x2 /* Data Transfer Direction */ |
1139 | #define nDTX_DIR 0x0 | ||
1140 | #define DTX_MODE 0x4 /* Data Transfer Mode */ | 1088 | #define DTX_MODE 0x4 /* Data Transfer Mode */ |
1141 | #define nDTX_MODE 0x0 | ||
1142 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ | 1089 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ |
1143 | #define nDTX_DMA_E 0x0 | ||
1144 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ | 1090 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ |
1145 | 1091 | ||
1146 | /* Bit masks for SDH_STATUS */ | 1092 | /* Bit masks for SDH_STATUS */ |
1147 | 1093 | ||
1148 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 1094 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
1149 | #define nCMD_CRC_FAIL 0x0 | ||
1150 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 1095 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
1151 | #define nDAT_CRC_FAIL 0x0 | ||
1152 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 1096 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ |
1153 | #define nCMD_TIMEOUT 0x0 | ||
1154 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 1097 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ |
1155 | #define nDAT_TIMEOUT 0x0 | ||
1156 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 1098 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
1157 | #define nTX_UNDERRUN 0x0 | ||
1158 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 1099 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
1159 | #define nRX_OVERRUN 0x0 | ||
1160 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 1100 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
1161 | #define nCMD_RESP_END 0x0 | ||
1162 | #define CMD_SENT 0x80 /* CMD Sent */ | 1101 | #define CMD_SENT 0x80 /* CMD Sent */ |
1163 | #define nCMD_SENT 0x0 | ||
1164 | #define DAT_END 0x100 /* Data End */ | 1102 | #define DAT_END 0x100 /* Data End */ |
1165 | #define nDAT_END 0x0 | ||
1166 | #define START_BIT_ERR 0x200 /* Start Bit Error */ | 1103 | #define START_BIT_ERR 0x200 /* Start Bit Error */ |
1167 | #define nSTART_BIT_ERR 0x0 | ||
1168 | #define DAT_BLK_END 0x400 /* Data Block End */ | 1104 | #define DAT_BLK_END 0x400 /* Data Block End */ |
1169 | #define nDAT_BLK_END 0x0 | ||
1170 | #define CMD_ACT 0x800 /* CMD Active */ | 1105 | #define CMD_ACT 0x800 /* CMD Active */ |
1171 | #define nCMD_ACT 0x0 | ||
1172 | #define TX_ACT 0x1000 /* Transmit Active */ | 1106 | #define TX_ACT 0x1000 /* Transmit Active */ |
1173 | #define nTX_ACT 0x0 | ||
1174 | #define RX_ACT 0x2000 /* Receive Active */ | 1107 | #define RX_ACT 0x2000 /* Receive Active */ |
1175 | #define nRX_ACT 0x0 | ||
1176 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ | 1108 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ |
1177 | #define nTX_FIFO_STAT 0x0 | ||
1178 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ | 1109 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ |
1179 | #define nRX_FIFO_STAT 0x0 | ||
1180 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ | 1110 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ |
1181 | #define nTX_FIFO_FULL 0x0 | ||
1182 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ | 1111 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ |
1183 | #define nRX_FIFO_FULL 0x0 | ||
1184 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ | 1112 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ |
1185 | #define nTX_FIFO_ZERO 0x0 | ||
1186 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ | 1113 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ |
1187 | #define nRX_DAT_ZERO 0x0 | ||
1188 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ | 1114 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ |
1189 | #define nTX_DAT_RDY 0x0 | ||
1190 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ | 1115 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ |
1191 | #define nRX_FIFO_RDY 0x0 | ||
1192 | 1116 | ||
1193 | /* Bit masks for SDH_STATUS_CLR */ | 1117 | /* Bit masks for SDH_STATUS_CLR */ |
1194 | 1118 | ||
1195 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ | 1119 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ |
1196 | #define nCMD_CRC_FAIL_STAT 0x0 | ||
1197 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ | 1120 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ |
1198 | #define nDAT_CRC_FAIL_STAT 0x0 | ||
1199 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ | 1121 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ |
1200 | #define nCMD_TIMEOUT_STAT 0x0 | ||
1201 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ | 1122 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ |
1202 | #define nDAT_TIMEOUT_STAT 0x0 | ||
1203 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ | 1123 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ |
1204 | #define nTX_UNDERRUN_STAT 0x0 | ||
1205 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ | 1124 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ |
1206 | #define nRX_OVERRUN_STAT 0x0 | ||
1207 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ | 1125 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ |
1208 | #define nCMD_RESP_END_STAT 0x0 | ||
1209 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ | 1126 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ |
1210 | #define nCMD_SENT_STAT 0x0 | ||
1211 | #define DAT_END_STAT 0x100 /* Data End Status */ | 1127 | #define DAT_END_STAT 0x100 /* Data End Status */ |
1212 | #define nDAT_END_STAT 0x0 | ||
1213 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ | 1128 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ |
1214 | #define nSTART_BIT_ERR_STAT 0x0 | ||
1215 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ | 1129 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ |
1216 | #define nDAT_BLK_END_STAT 0x0 | ||
1217 | 1130 | ||
1218 | /* Bit masks for SDH_MASK0 */ | 1131 | /* Bit masks for SDH_MASK0 */ |
1219 | 1132 | ||
1220 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ | 1133 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ |
1221 | #define nCMD_CRC_FAIL_MASK 0x0 | ||
1222 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ | 1134 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ |
1223 | #define nDAT_CRC_FAIL_MASK 0x0 | ||
1224 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ | 1135 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ |
1225 | #define nCMD_TIMEOUT_MASK 0x0 | ||
1226 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ | 1136 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ |
1227 | #define nDAT_TIMEOUT_MASK 0x0 | ||
1228 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ | 1137 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ |
1229 | #define nTX_UNDERRUN_MASK 0x0 | ||
1230 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ | 1138 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ |
1231 | #define nRX_OVERRUN_MASK 0x0 | ||
1232 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ | 1139 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ |
1233 | #define nCMD_RESP_END_MASK 0x0 | ||
1234 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ | 1140 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ |
1235 | #define nCMD_SENT_MASK 0x0 | ||
1236 | #define DAT_END_MASK 0x100 /* Data End Mask */ | 1141 | #define DAT_END_MASK 0x100 /* Data End Mask */ |
1237 | #define nDAT_END_MASK 0x0 | ||
1238 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ | 1142 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ |
1239 | #define nSTART_BIT_ERR_MASK 0x0 | ||
1240 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ | 1143 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ |
1241 | #define nDAT_BLK_END_MASK 0x0 | ||
1242 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ | 1144 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ |
1243 | #define nCMD_ACT_MASK 0x0 | ||
1244 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ | 1145 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ |
1245 | #define nTX_ACT_MASK 0x0 | ||
1246 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ | 1146 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ |
1247 | #define nRX_ACT_MASK 0x0 | ||
1248 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ | 1147 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ |
1249 | #define nTX_FIFO_STAT_MASK 0x0 | ||
1250 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ | 1148 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ |
1251 | #define nRX_FIFO_STAT_MASK 0x0 | ||
1252 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ | 1149 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ |
1253 | #define nTX_FIFO_FULL_MASK 0x0 | ||
1254 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ | 1150 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ |
1255 | #define nRX_FIFO_FULL_MASK 0x0 | ||
1256 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ | 1151 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ |
1257 | #define nTX_FIFO_ZERO_MASK 0x0 | ||
1258 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ | 1152 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ |
1259 | #define nRX_DAT_ZERO_MASK 0x0 | ||
1260 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ | 1153 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ |
1261 | #define nTX_DAT_RDY_MASK 0x0 | ||
1262 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ | 1154 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ |
1263 | #define nRX_FIFO_RDY_MASK 0x0 | ||
1264 | 1155 | ||
1265 | /* Bit masks for SDH_FIFO_CNT */ | 1156 | /* Bit masks for SDH_FIFO_CNT */ |
1266 | 1157 | ||
@@ -1269,73 +1160,47 @@ | |||
1269 | /* Bit masks for SDH_E_STATUS */ | 1160 | /* Bit masks for SDH_E_STATUS */ |
1270 | 1161 | ||
1271 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ | 1162 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ |
1272 | #define nSDIO_INT_DET 0x0 | ||
1273 | #define SD_CARD_DET 0x10 /* SD Card Detect */ | 1163 | #define SD_CARD_DET 0x10 /* SD Card Detect */ |
1274 | #define nSD_CARD_DET 0x0 | ||
1275 | 1164 | ||
1276 | /* Bit masks for SDH_E_MASK */ | 1165 | /* Bit masks for SDH_E_MASK */ |
1277 | 1166 | ||
1278 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ | 1167 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ |
1279 | #define nSDIO_MSK 0x0 | ||
1280 | #define SCD_MSK 0x40 /* Mask Card Detect */ | 1168 | #define SCD_MSK 0x40 /* Mask Card Detect */ |
1281 | #define nSCD_MSK 0x0 | ||
1282 | 1169 | ||
1283 | /* Bit masks for SDH_CFG */ | 1170 | /* Bit masks for SDH_CFG */ |
1284 | 1171 | ||
1285 | #define CLKS_EN 0x1 /* Clocks Enable */ | 1172 | #define CLKS_EN 0x1 /* Clocks Enable */ |
1286 | #define nCLKS_EN 0x0 | ||
1287 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ | 1173 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ |
1288 | #define nSD4E 0x0 | ||
1289 | #define MWE 0x8 /* Moving Window Enable */ | 1174 | #define MWE 0x8 /* Moving Window Enable */ |
1290 | #define nMWE 0x0 | ||
1291 | #define SD_RST 0x10 /* SDMMC Reset */ | 1175 | #define SD_RST 0x10 /* SDMMC Reset */ |
1292 | #define nSD_RST 0x0 | ||
1293 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ | 1176 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ |
1294 | #define nPUP_SDDAT 0x0 | ||
1295 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ | 1177 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ |
1296 | #define nPUP_SDDAT3 0x0 | ||
1297 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ | 1178 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ |
1298 | #define nPD_SDDAT3 0x0 | ||
1299 | 1179 | ||
1300 | /* Bit masks for SDH_RD_WAIT_EN */ | 1180 | /* Bit masks for SDH_RD_WAIT_EN */ |
1301 | 1181 | ||
1302 | #define RWR 0x1 /* Read Wait Request */ | 1182 | #define RWR 0x1 /* Read Wait Request */ |
1303 | #define nRWR 0x0 | ||
1304 | 1183 | ||
1305 | /* Bit masks for ATAPI_CONTROL */ | 1184 | /* Bit masks for ATAPI_CONTROL */ |
1306 | 1185 | ||
1307 | #define PIO_START 0x1 /* Start PIO/Reg Op */ | 1186 | #define PIO_START 0x1 /* Start PIO/Reg Op */ |
1308 | #define nPIO_START 0x0 | ||
1309 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ | 1187 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ |
1310 | #define nMULTI_START 0x0 | ||
1311 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ | 1188 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ |
1312 | #define nULTRA_START 0x0 | ||
1313 | #define XFER_DIR 0x8 /* Transfer Direction */ | 1189 | #define XFER_DIR 0x8 /* Transfer Direction */ |
1314 | #define nXFER_DIR 0x0 | ||
1315 | #define IORDY_EN 0x10 /* IORDY Enable */ | 1190 | #define IORDY_EN 0x10 /* IORDY Enable */ |
1316 | #define nIORDY_EN 0x0 | ||
1317 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ | 1191 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ |
1318 | #define nFIFO_FLUSH 0x0 | ||
1319 | #define SOFT_RST 0x40 /* Soft Reset */ | 1192 | #define SOFT_RST 0x40 /* Soft Reset */ |
1320 | #define nSOFT_RST 0x0 | ||
1321 | #define DEV_RST 0x80 /* Device Reset */ | 1193 | #define DEV_RST 0x80 /* Device Reset */ |
1322 | #define nDEV_RST 0x0 | ||
1323 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ | 1194 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ |
1324 | #define nTFRCNT_RST 0x0 | ||
1325 | #define END_ON_TERM 0x200 /* End/Terminate Select */ | 1195 | #define END_ON_TERM 0x200 /* End/Terminate Select */ |
1326 | #define nEND_ON_TERM 0x0 | ||
1327 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ | 1196 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ |
1328 | #define nPIO_USE_DMA 0x0 | ||
1329 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ | 1197 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ |
1330 | 1198 | ||
1331 | /* Bit masks for ATAPI_STATUS */ | 1199 | /* Bit masks for ATAPI_STATUS */ |
1332 | 1200 | ||
1333 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ | 1201 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ |
1334 | #define nPIO_XFER_ON 0x0 | ||
1335 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ | 1202 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ |
1336 | #define nMULTI_XFER_ON 0x0 | ||
1337 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ | 1203 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ |
1338 | #define nULTRA_XFER_ON 0x0 | ||
1339 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ | 1204 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ |
1340 | 1205 | ||
1341 | /* Bit masks for ATAPI_DEV_ADDR */ | 1206 | /* Bit masks for ATAPI_DEV_ADDR */ |
@@ -1345,66 +1210,39 @@ | |||
1345 | /* Bit masks for ATAPI_INT_MASK */ | 1210 | /* Bit masks for ATAPI_INT_MASK */ |
1346 | 1211 | ||
1347 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ | 1212 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ |
1348 | #define nATAPI_DEV_INT_MASK 0x0 | ||
1349 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ | 1213 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ |
1350 | #define nPIO_DONE_MASK 0x0 | ||
1351 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ | 1214 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ |
1352 | #define nMULTI_DONE_MASK 0x0 | ||
1353 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ | 1215 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ |
1354 | #define nUDMAIN_DONE_MASK 0x0 | ||
1355 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ | 1216 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ |
1356 | #define nUDMAOUT_DONE_MASK 0x0 | ||
1357 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ | 1217 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ |
1358 | #define nHOST_TERM_XFER_MASK 0x0 | ||
1359 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ | 1218 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ |
1360 | #define nMULTI_TERM_MASK 0x0 | ||
1361 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ | 1219 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ |
1362 | #define nUDMAIN_TERM_MASK 0x0 | ||
1363 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ | 1220 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ |
1364 | #define nUDMAOUT_TERM_MASK 0x0 | ||
1365 | 1221 | ||
1366 | /* Bit masks for ATAPI_INT_STATUS */ | 1222 | /* Bit masks for ATAPI_INT_STATUS */ |
1367 | 1223 | ||
1368 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ | 1224 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ |
1369 | #define nATAPI_DEV_INT 0x0 | ||
1370 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ | 1225 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ |
1371 | #define nPIO_DONE_INT 0x0 | ||
1372 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ | 1226 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ |
1373 | #define nMULTI_DONE_INT 0x0 | ||
1374 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ | 1227 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ |
1375 | #define nUDMAIN_DONE_INT 0x0 | ||
1376 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ | 1228 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ |
1377 | #define nUDMAOUT_DONE_INT 0x0 | ||
1378 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ | 1229 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ |
1379 | #define nHOST_TERM_XFER_INT 0x0 | ||
1380 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ | 1230 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ |
1381 | #define nMULTI_TERM_INT 0x0 | ||
1382 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ | 1231 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ |
1383 | #define nUDMAIN_TERM_INT 0x0 | ||
1384 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ | 1232 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ |
1385 | #define nUDMAOUT_TERM_INT 0x0 | ||
1386 | 1233 | ||
1387 | /* Bit masks for ATAPI_LINE_STATUS */ | 1234 | /* Bit masks for ATAPI_LINE_STATUS */ |
1388 | 1235 | ||
1389 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ | 1236 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ |
1390 | #define nATAPI_INTR 0x0 | ||
1391 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ | 1237 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ |
1392 | #define nATAPI_DASP 0x0 | ||
1393 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ | 1238 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ |
1394 | #define nATAPI_CS0N 0x0 | ||
1395 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ | 1239 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ |
1396 | #define nATAPI_CS1N 0x0 | ||
1397 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ | 1240 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ |
1398 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ | 1241 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ |
1399 | #define nATAPI_DMAREQ 0x0 | ||
1400 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ | 1242 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ |
1401 | #define nATAPI_DMAACKN 0x0 | ||
1402 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ | 1243 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ |
1403 | #define nATAPI_DIOWN 0x0 | ||
1404 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ | 1244 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ |
1405 | #define nATAPI_DIORN 0x0 | ||
1406 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ | 1245 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ |
1407 | #define nATAPI_IORDY 0x0 | ||
1408 | 1246 | ||
1409 | /* Bit masks for ATAPI_SM_STATE */ | 1247 | /* Bit masks for ATAPI_SM_STATE */ |
1410 | 1248 | ||
@@ -1416,7 +1254,6 @@ | |||
1416 | /* Bit masks for ATAPI_TERMINATE */ | 1254 | /* Bit masks for ATAPI_TERMINATE */ |
1417 | 1255 | ||
1418 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ | 1256 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ |
1419 | #define nATAPI_HOST_TERM 0x0 | ||
1420 | 1257 | ||
1421 | /* Bit masks for ATAPI_REG_TIM_0 */ | 1258 | /* Bit masks for ATAPI_REG_TIM_0 */ |
1422 | 1259 | ||
@@ -1471,41 +1308,26 @@ | |||
1471 | /* Bit masks for TIMER_ENABLE1 */ | 1308 | /* Bit masks for TIMER_ENABLE1 */ |
1472 | 1309 | ||
1473 | #define TIMEN8 0x1 /* Timer 8 Enable */ | 1310 | #define TIMEN8 0x1 /* Timer 8 Enable */ |
1474 | #define nTIMEN8 0x0 | ||
1475 | #define TIMEN9 0x2 /* Timer 9 Enable */ | 1311 | #define TIMEN9 0x2 /* Timer 9 Enable */ |
1476 | #define nTIMEN9 0x0 | ||
1477 | #define TIMEN10 0x4 /* Timer 10 Enable */ | 1312 | #define TIMEN10 0x4 /* Timer 10 Enable */ |
1478 | #define nTIMEN10 0x0 | ||
1479 | 1313 | ||
1480 | /* Bit masks for TIMER_DISABLE1 */ | 1314 | /* Bit masks for TIMER_DISABLE1 */ |
1481 | 1315 | ||
1482 | #define TIMDIS8 0x1 /* Timer 8 Disable */ | 1316 | #define TIMDIS8 0x1 /* Timer 8 Disable */ |
1483 | #define nTIMDIS8 0x0 | ||
1484 | #define TIMDIS9 0x2 /* Timer 9 Disable */ | 1317 | #define TIMDIS9 0x2 /* Timer 9 Disable */ |
1485 | #define nTIMDIS9 0x0 | ||
1486 | #define TIMDIS10 0x4 /* Timer 10 Disable */ | 1318 | #define TIMDIS10 0x4 /* Timer 10 Disable */ |
1487 | #define nTIMDIS10 0x0 | ||
1488 | 1319 | ||
1489 | /* Bit masks for TIMER_STATUS1 */ | 1320 | /* Bit masks for TIMER_STATUS1 */ |
1490 | 1321 | ||
1491 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ | 1322 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ |
1492 | #define nTIMIL8 0x0 | ||
1493 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ | 1323 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ |
1494 | #define nTIMIL9 0x0 | ||
1495 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ | 1324 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ |
1496 | #define nTIMIL10 0x0 | ||
1497 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ | 1325 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ |
1498 | #define nTOVF_ERR8 0x0 | ||
1499 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ | 1326 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ |
1500 | #define nTOVF_ERR9 0x0 | ||
1501 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ | 1327 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ |
1502 | #define nTOVF_ERR10 0x0 | ||
1503 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ | 1328 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ |
1504 | #define nTRUN8 0x0 | ||
1505 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ | 1329 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ |
1506 | #define nTRUN9 0x0 | ||
1507 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ | 1330 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ |
1508 | #define nTRUN10 0x0 | ||
1509 | 1331 | ||
1510 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ | 1332 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ |
1511 | 1333 | ||
@@ -1516,131 +1338,77 @@ | |||
1516 | /* Bit masks for USB_POWER */ | 1338 | /* Bit masks for USB_POWER */ |
1517 | 1339 | ||
1518 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ | 1340 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ |
1519 | #define nENABLE_SUSPENDM 0x0 | ||
1520 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ | 1341 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ |
1521 | #define nSUSPEND_MODE 0x0 | ||
1522 | #define RESUME_MODE 0x4 /* DMA Mode */ | 1342 | #define RESUME_MODE 0x4 /* DMA Mode */ |
1523 | #define nRESUME_MODE 0x0 | ||
1524 | #define RESET 0x8 /* Reset indicator */ | 1343 | #define RESET 0x8 /* Reset indicator */ |
1525 | #define nRESET 0x0 | ||
1526 | #define HS_MODE 0x10 /* High Speed mode indicator */ | 1344 | #define HS_MODE 0x10 /* High Speed mode indicator */ |
1527 | #define nHS_MODE 0x0 | ||
1528 | #define HS_ENABLE 0x20 /* high Speed Enable */ | 1345 | #define HS_ENABLE 0x20 /* high Speed Enable */ |
1529 | #define nHS_ENABLE 0x0 | ||
1530 | #define SOFT_CONN 0x40 /* Soft connect */ | 1346 | #define SOFT_CONN 0x40 /* Soft connect */ |
1531 | #define nSOFT_CONN 0x0 | ||
1532 | #define ISO_UPDATE 0x80 /* Isochronous update */ | 1347 | #define ISO_UPDATE 0x80 /* Isochronous update */ |
1533 | #define nISO_UPDATE 0x0 | ||
1534 | 1348 | ||
1535 | /* Bit masks for USB_INTRTX */ | 1349 | /* Bit masks for USB_INTRTX */ |
1536 | 1350 | ||
1537 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ | 1351 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ |
1538 | #define nEP0_TX 0x0 | ||
1539 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ | 1352 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ |
1540 | #define nEP1_TX 0x0 | ||
1541 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ | 1353 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ |
1542 | #define nEP2_TX 0x0 | ||
1543 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ | 1354 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ |
1544 | #define nEP3_TX 0x0 | ||
1545 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ | 1355 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ |
1546 | #define nEP4_TX 0x0 | ||
1547 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ | 1356 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ |
1548 | #define nEP5_TX 0x0 | ||
1549 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ | 1357 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ |
1550 | #define nEP6_TX 0x0 | ||
1551 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ | 1358 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ |
1552 | #define nEP7_TX 0x0 | ||
1553 | 1359 | ||
1554 | /* Bit masks for USB_INTRRX */ | 1360 | /* Bit masks for USB_INTRRX */ |
1555 | 1361 | ||
1556 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ | 1362 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ |
1557 | #define nEP1_RX 0x0 | ||
1558 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ | 1363 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ |
1559 | #define nEP2_RX 0x0 | ||
1560 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ | 1364 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ |
1561 | #define nEP3_RX 0x0 | ||
1562 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ | 1365 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ |
1563 | #define nEP4_RX 0x0 | ||
1564 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ | 1366 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ |
1565 | #define nEP5_RX 0x0 | ||
1566 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ | 1367 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ |
1567 | #define nEP6_RX 0x0 | ||
1568 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ | 1368 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ |
1569 | #define nEP7_RX 0x0 | ||
1570 | 1369 | ||
1571 | /* Bit masks for USB_INTRTXE */ | 1370 | /* Bit masks for USB_INTRTXE */ |
1572 | 1371 | ||
1573 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ | 1372 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ |
1574 | #define nEP0_TX_E 0x0 | ||
1575 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ | 1373 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ |
1576 | #define nEP1_TX_E 0x0 | ||
1577 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ | 1374 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ |
1578 | #define nEP2_TX_E 0x0 | ||
1579 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ | 1375 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ |
1580 | #define nEP3_TX_E 0x0 | ||
1581 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ | 1376 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ |
1582 | #define nEP4_TX_E 0x0 | ||
1583 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ | 1377 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ |
1584 | #define nEP5_TX_E 0x0 | ||
1585 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ | 1378 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ |
1586 | #define nEP6_TX_E 0x0 | ||
1587 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ | 1379 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ |
1588 | #define nEP7_TX_E 0x0 | ||
1589 | 1380 | ||
1590 | /* Bit masks for USB_INTRRXE */ | 1381 | /* Bit masks for USB_INTRRXE */ |
1591 | 1382 | ||
1592 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ | 1383 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ |
1593 | #define nEP1_RX_E 0x0 | ||
1594 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ | 1384 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ |
1595 | #define nEP2_RX_E 0x0 | ||
1596 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ | 1385 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ |
1597 | #define nEP3_RX_E 0x0 | ||
1598 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ | 1386 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ |
1599 | #define nEP4_RX_E 0x0 | ||
1600 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ | 1387 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ |
1601 | #define nEP5_RX_E 0x0 | ||
1602 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ | 1388 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ |
1603 | #define nEP6_RX_E 0x0 | ||
1604 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ | 1389 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ |
1605 | #define nEP7_RX_E 0x0 | ||
1606 | 1390 | ||
1607 | /* Bit masks for USB_INTRUSB */ | 1391 | /* Bit masks for USB_INTRUSB */ |
1608 | 1392 | ||
1609 | #define SUSPEND_B 0x1 /* Suspend indicator */ | 1393 | #define SUSPEND_B 0x1 /* Suspend indicator */ |
1610 | #define nSUSPEND_B 0x0 | ||
1611 | #define RESUME_B 0x2 /* Resume indicator */ | 1394 | #define RESUME_B 0x2 /* Resume indicator */ |
1612 | #define nRESUME_B 0x0 | ||
1613 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ | 1395 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ |
1614 | #define nRESET_OR_BABLE_B 0x0 | ||
1615 | #define SOF_B 0x8 /* Start of frame */ | 1396 | #define SOF_B 0x8 /* Start of frame */ |
1616 | #define nSOF_B 0x0 | ||
1617 | #define CONN_B 0x10 /* Connection indicator */ | 1397 | #define CONN_B 0x10 /* Connection indicator */ |
1618 | #define nCONN_B 0x0 | ||
1619 | #define DISCON_B 0x20 /* Disconnect indicator */ | 1398 | #define DISCON_B 0x20 /* Disconnect indicator */ |
1620 | #define nDISCON_B 0x0 | ||
1621 | #define SESSION_REQ_B 0x40 /* Session Request */ | 1399 | #define SESSION_REQ_B 0x40 /* Session Request */ |
1622 | #define nSESSION_REQ_B 0x0 | ||
1623 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ | 1400 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ |
1624 | #define nVBUS_ERROR_B 0x0 | ||
1625 | 1401 | ||
1626 | /* Bit masks for USB_INTRUSBE */ | 1402 | /* Bit masks for USB_INTRUSBE */ |
1627 | 1403 | ||
1628 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ | 1404 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ |
1629 | #define nSUSPEND_BE 0x0 | ||
1630 | #define RESUME_BE 0x2 /* Resume indicator int enable */ | 1405 | #define RESUME_BE 0x2 /* Resume indicator int enable */ |
1631 | #define nRESUME_BE 0x0 | ||
1632 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ | 1406 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ |
1633 | #define nRESET_OR_BABLE_BE 0x0 | ||
1634 | #define SOF_BE 0x8 /* Start of frame int enable */ | 1407 | #define SOF_BE 0x8 /* Start of frame int enable */ |
1635 | #define nSOF_BE 0x0 | ||
1636 | #define CONN_BE 0x10 /* Connection indicator int enable */ | 1408 | #define CONN_BE 0x10 /* Connection indicator int enable */ |
1637 | #define nCONN_BE 0x0 | ||
1638 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ | 1409 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ |
1639 | #define nDISCON_BE 0x0 | ||
1640 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ | 1410 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ |
1641 | #define nSESSION_REQ_BE 0x0 | ||
1642 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ | 1411 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ |
1643 | #define nVBUS_ERROR_BE 0x0 | ||
1644 | 1412 | ||
1645 | /* Bit masks for USB_FRAME */ | 1413 | /* Bit masks for USB_FRAME */ |
1646 | 1414 | ||
@@ -1653,117 +1421,67 @@ | |||
1653 | /* Bit masks for USB_GLOBAL_CTL */ | 1421 | /* Bit masks for USB_GLOBAL_CTL */ |
1654 | 1422 | ||
1655 | #define GLOBAL_ENA 0x1 /* enables USB module */ | 1423 | #define GLOBAL_ENA 0x1 /* enables USB module */ |
1656 | #define nGLOBAL_ENA 0x0 | ||
1657 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ | 1424 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ |
1658 | #define nEP1_TX_ENA 0x0 | ||
1659 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ | 1425 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ |
1660 | #define nEP2_TX_ENA 0x0 | ||
1661 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ | 1426 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ |
1662 | #define nEP3_TX_ENA 0x0 | ||
1663 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ | 1427 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ |
1664 | #define nEP4_TX_ENA 0x0 | ||
1665 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ | 1428 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ |
1666 | #define nEP5_TX_ENA 0x0 | ||
1667 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ | 1429 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ |
1668 | #define nEP6_TX_ENA 0x0 | ||
1669 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ | 1430 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ |
1670 | #define nEP7_TX_ENA 0x0 | ||
1671 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ | 1431 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ |
1672 | #define nEP1_RX_ENA 0x0 | ||
1673 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ | 1432 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ |
1674 | #define nEP2_RX_ENA 0x0 | ||
1675 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ | 1433 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ |
1676 | #define nEP3_RX_ENA 0x0 | ||
1677 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ | 1434 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ |
1678 | #define nEP4_RX_ENA 0x0 | ||
1679 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ | 1435 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ |
1680 | #define nEP5_RX_ENA 0x0 | ||
1681 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ | 1436 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ |
1682 | #define nEP6_RX_ENA 0x0 | ||
1683 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ | 1437 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ |
1684 | #define nEP7_RX_ENA 0x0 | ||
1685 | 1438 | ||
1686 | /* Bit masks for USB_OTG_DEV_CTL */ | 1439 | /* Bit masks for USB_OTG_DEV_CTL */ |
1687 | 1440 | ||
1688 | #define SESSION 0x1 /* session indicator */ | 1441 | #define SESSION 0x1 /* session indicator */ |
1689 | #define nSESSION 0x0 | ||
1690 | #define HOST_REQ 0x2 /* Host negotiation request */ | 1442 | #define HOST_REQ 0x2 /* Host negotiation request */ |
1691 | #define nHOST_REQ 0x0 | ||
1692 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ | 1443 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ |
1693 | #define nHOST_MODE 0x0 | ||
1694 | #define VBUS0 0x8 /* Vbus level indicator[0] */ | 1444 | #define VBUS0 0x8 /* Vbus level indicator[0] */ |
1695 | #define nVBUS0 0x0 | ||
1696 | #define VBUS1 0x10 /* Vbus level indicator[1] */ | 1445 | #define VBUS1 0x10 /* Vbus level indicator[1] */ |
1697 | #define nVBUS1 0x0 | ||
1698 | #define LSDEV 0x20 /* Low-speed indicator */ | 1446 | #define LSDEV 0x20 /* Low-speed indicator */ |
1699 | #define nLSDEV 0x0 | ||
1700 | #define FSDEV 0x40 /* Full or High-speed indicator */ | 1447 | #define FSDEV 0x40 /* Full or High-speed indicator */ |
1701 | #define nFSDEV 0x0 | ||
1702 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ | 1448 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ |
1703 | #define nB_DEVICE 0x0 | ||
1704 | 1449 | ||
1705 | /* Bit masks for USB_OTG_VBUS_IRQ */ | 1450 | /* Bit masks for USB_OTG_VBUS_IRQ */ |
1706 | 1451 | ||
1707 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ | 1452 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ |
1708 | #define nDRIVE_VBUS_ON 0x0 | ||
1709 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ | 1453 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ |
1710 | #define nDRIVE_VBUS_OFF 0x0 | ||
1711 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ | 1454 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ |
1712 | #define nCHRG_VBUS_START 0x0 | ||
1713 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ | 1455 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ |
1714 | #define nCHRG_VBUS_END 0x0 | ||
1715 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ | 1456 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ |
1716 | #define nDISCHRG_VBUS_START 0x0 | ||
1717 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ | 1457 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ |
1718 | #define nDISCHRG_VBUS_END 0x0 | ||
1719 | 1458 | ||
1720 | /* Bit masks for USB_OTG_VBUS_MASK */ | 1459 | /* Bit masks for USB_OTG_VBUS_MASK */ |
1721 | 1460 | ||
1722 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ | 1461 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ |
1723 | #define nDRIVE_VBUS_ON_ENA 0x0 | ||
1724 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ | 1462 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ |
1725 | #define nDRIVE_VBUS_OFF_ENA 0x0 | ||
1726 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ | 1463 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ |
1727 | #define nCHRG_VBUS_START_ENA 0x0 | ||
1728 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ | 1464 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ |
1729 | #define nCHRG_VBUS_END_ENA 0x0 | ||
1730 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ | 1465 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ |
1731 | #define nDISCHRG_VBUS_START_ENA 0x0 | ||
1732 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ | 1466 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ |
1733 | #define nDISCHRG_VBUS_END_ENA 0x0 | ||
1734 | 1467 | ||
1735 | /* Bit masks for USB_CSR0 */ | 1468 | /* Bit masks for USB_CSR0 */ |
1736 | 1469 | ||
1737 | #define RXPKTRDY 0x1 /* data packet receive indicator */ | 1470 | #define RXPKTRDY 0x1 /* data packet receive indicator */ |
1738 | #define nRXPKTRDY 0x0 | ||
1739 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ | 1471 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ |
1740 | #define nTXPKTRDY 0x0 | ||
1741 | #define STALL_SENT 0x4 /* STALL handshake sent */ | 1472 | #define STALL_SENT 0x4 /* STALL handshake sent */ |
1742 | #define nSTALL_SENT 0x0 | ||
1743 | #define DATAEND 0x8 /* Data end indicator */ | 1473 | #define DATAEND 0x8 /* Data end indicator */ |
1744 | #define nDATAEND 0x0 | ||
1745 | #define SETUPEND 0x10 /* Setup end */ | 1474 | #define SETUPEND 0x10 /* Setup end */ |
1746 | #define nSETUPEND 0x0 | ||
1747 | #define SENDSTALL 0x20 /* Send STALL handshake */ | 1475 | #define SENDSTALL 0x20 /* Send STALL handshake */ |
1748 | #define nSENDSTALL 0x0 | ||
1749 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ | 1476 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ |
1750 | #define nSERVICED_RXPKTRDY 0x0 | ||
1751 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ | 1477 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ |
1752 | #define nSERVICED_SETUPEND 0x0 | ||
1753 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ | 1478 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ |
1754 | #define nFLUSHFIFO 0x0 | ||
1755 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ | 1479 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ |
1756 | #define nSTALL_RECEIVED_H 0x0 | ||
1757 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ | 1480 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ |
1758 | #define nSETUPPKT_H 0x0 | ||
1759 | #define ERROR_H 0x10 /* timeout error indicator host mode */ | 1481 | #define ERROR_H 0x10 /* timeout error indicator host mode */ |
1760 | #define nERROR_H 0x0 | ||
1761 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ | 1482 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ |
1762 | #define nREQPKT_H 0x0 | ||
1763 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ | 1483 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ |
1764 | #define nSTATUSPKT_H 0x0 | ||
1765 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ | 1484 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ |
1766 | #define nNAK_TIMEOUT_H 0x0 | ||
1767 | 1485 | ||
1768 | /* Bit masks for USB_COUNT0 */ | 1486 | /* Bit masks for USB_COUNT0 */ |
1769 | 1487 | ||
@@ -1784,37 +1502,21 @@ | |||
1784 | /* Bit masks for USB_TXCSR */ | 1502 | /* Bit masks for USB_TXCSR */ |
1785 | 1503 | ||
1786 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ | 1504 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ |
1787 | #define nTXPKTRDY_T 0x0 | ||
1788 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ | 1505 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ |
1789 | #define nFIFO_NOT_EMPTY_T 0x0 | ||
1790 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ | 1506 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ |
1791 | #define nUNDERRUN_T 0x0 | ||
1792 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ | 1507 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ |
1793 | #define nFLUSHFIFO_T 0x0 | ||
1794 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ | 1508 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ |
1795 | #define nSTALL_SEND_T 0x0 | ||
1796 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ | 1509 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ |
1797 | #define nSTALL_SENT_T 0x0 | ||
1798 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ | 1510 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ |
1799 | #define nCLEAR_DATATOGGLE_T 0x0 | ||
1800 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ | 1511 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ |
1801 | #define nINCOMPTX_T 0x0 | ||
1802 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ | 1512 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ |
1803 | #define nDMAREQMODE_T 0x0 | ||
1804 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ | 1513 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ |
1805 | #define nFORCE_DATATOGGLE_T 0x0 | ||
1806 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ | 1514 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ |
1807 | #define nDMAREQ_ENA_T 0x0 | ||
1808 | #define ISO_T 0x4000 /* enable Isochronous transfers */ | 1515 | #define ISO_T 0x4000 /* enable Isochronous transfers */ |
1809 | #define nISO_T 0x0 | ||
1810 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ | 1516 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ |
1811 | #define nAUTOSET_T 0x0 | ||
1812 | #define ERROR_TH 0x4 /* error condition host mode */ | 1517 | #define ERROR_TH 0x4 /* error condition host mode */ |
1813 | #define nERROR_TH 0x0 | ||
1814 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ | 1518 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ |
1815 | #define nSTALL_RECEIVED_TH 0x0 | ||
1816 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ | 1519 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ |
1817 | #define nNAK_TIMEOUT_TH 0x0 | ||
1818 | 1520 | ||
1819 | /* Bit masks for USB_TXCOUNT */ | 1521 | /* Bit masks for USB_TXCOUNT */ |
1820 | 1522 | ||
@@ -1823,45 +1525,25 @@ | |||
1823 | /* Bit masks for USB_RXCSR */ | 1525 | /* Bit masks for USB_RXCSR */ |
1824 | 1526 | ||
1825 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ | 1527 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ |
1826 | #define nRXPKTRDY_R 0x0 | ||
1827 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ | 1528 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ |
1828 | #define nFIFO_FULL_R 0x0 | ||
1829 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ | 1529 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ |
1830 | #define nOVERRUN_R 0x0 | ||
1831 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ | 1530 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ |
1832 | #define nDATAERROR_R 0x0 | ||
1833 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ | 1531 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ |
1834 | #define nFLUSHFIFO_R 0x0 | ||
1835 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ | 1532 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ |
1836 | #define nSTALL_SEND_R 0x0 | ||
1837 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ | 1533 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ |
1838 | #define nSTALL_SENT_R 0x0 | ||
1839 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ | 1534 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ |
1840 | #define nCLEAR_DATATOGGLE_R 0x0 | ||
1841 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ | 1535 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ |
1842 | #define nINCOMPRX_R 0x0 | ||
1843 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ | 1536 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ |
1844 | #define nDMAREQMODE_R 0x0 | ||
1845 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ | 1537 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ |
1846 | #define nDISNYET_R 0x0 | ||
1847 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ | 1538 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ |
1848 | #define nDMAREQ_ENA_R 0x0 | ||
1849 | #define ISO_R 0x4000 /* enable Isochronous transfers */ | 1539 | #define ISO_R 0x4000 /* enable Isochronous transfers */ |
1850 | #define nISO_R 0x0 | ||
1851 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ | 1540 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ |
1852 | #define nAUTOCLEAR_R 0x0 | ||
1853 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ | 1541 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ |
1854 | #define nERROR_RH 0x0 | ||
1855 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ | 1542 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ |
1856 | #define nREQPKT_RH 0x0 | ||
1857 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ | 1543 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ |
1858 | #define nSTALL_RECEIVED_RH 0x0 | ||
1859 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ | 1544 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ |
1860 | #define nINCOMPRX_RH 0x0 | ||
1861 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ | 1545 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ |
1862 | #define nDMAREQMODE_RH 0x0 | ||
1863 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ | 1546 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ |
1864 | #define nAUTOREQ_RH 0x0 | ||
1865 | 1547 | ||
1866 | /* Bit masks for USB_RXCOUNT */ | 1548 | /* Bit masks for USB_RXCOUNT */ |
1867 | 1549 | ||
@@ -1888,35 +1570,22 @@ | |||
1888 | /* Bit masks for USB_DMA_INTERRUPT */ | 1570 | /* Bit masks for USB_DMA_INTERRUPT */ |
1889 | 1571 | ||
1890 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ | 1572 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ |
1891 | #define nDMA0_INT 0x0 | ||
1892 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ | 1573 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ |
1893 | #define nDMA1_INT 0x0 | ||
1894 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ | 1574 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ |
1895 | #define nDMA2_INT 0x0 | ||
1896 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ | 1575 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ |
1897 | #define nDMA3_INT 0x0 | ||
1898 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ | 1576 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ |
1899 | #define nDMA4_INT 0x0 | ||
1900 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ | 1577 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ |
1901 | #define nDMA5_INT 0x0 | ||
1902 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ | 1578 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ |
1903 | #define nDMA6_INT 0x0 | ||
1904 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ | 1579 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ |
1905 | #define nDMA7_INT 0x0 | ||
1906 | 1580 | ||
1907 | /* Bit masks for USB_DMAxCONTROL */ | 1581 | /* Bit masks for USB_DMAxCONTROL */ |
1908 | 1582 | ||
1909 | #define DMA_ENA 0x1 /* DMA enable */ | 1583 | #define DMA_ENA 0x1 /* DMA enable */ |
1910 | #define nDMA_ENA 0x0 | ||
1911 | #define DIRECTION 0x2 /* direction of DMA transfer */ | 1584 | #define DIRECTION 0x2 /* direction of DMA transfer */ |
1912 | #define nDIRECTION 0x0 | ||
1913 | #define MODE 0x4 /* DMA Bus error */ | 1585 | #define MODE 0x4 /* DMA Bus error */ |
1914 | #define nMODE 0x0 | ||
1915 | #define INT_ENA 0x8 /* Interrupt enable */ | 1586 | #define INT_ENA 0x8 /* Interrupt enable */ |
1916 | #define nINT_ENA 0x0 | ||
1917 | #define EPNUM 0xf0 /* EP number */ | 1587 | #define EPNUM 0xf0 /* EP number */ |
1918 | #define BUSERROR 0x100 /* DMA Bus error */ | 1588 | #define BUSERROR 0x100 /* DMA Bus error */ |
1919 | #define nBUSERROR 0x0 | ||
1920 | 1589 | ||
1921 | /* Bit masks for USB_DMAxADDRHIGH */ | 1590 | /* Bit masks for USB_DMAxADDRHIGH */ |
1922 | 1591 | ||
@@ -1937,26 +1606,16 @@ | |||
1937 | /* Bit masks for HMDMAx_CONTROL */ | 1606 | /* Bit masks for HMDMAx_CONTROL */ |
1938 | 1607 | ||
1939 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ | 1608 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ |
1940 | #define nHMDMAEN 0x0 | ||
1941 | #define REP 0x2 /* Handshake MDMA Request Polarity */ | 1609 | #define REP 0x2 /* Handshake MDMA Request Polarity */ |
1942 | #define nREP 0x0 | ||
1943 | #define UTE 0x8 /* Urgency Threshold Enable */ | 1610 | #define UTE 0x8 /* Urgency Threshold Enable */ |
1944 | #define nUTE 0x0 | ||
1945 | #define OIE 0x10 /* Overflow Interrupt Enable */ | 1611 | #define OIE 0x10 /* Overflow Interrupt Enable */ |
1946 | #define nOIE 0x0 | ||
1947 | #define BDIE 0x20 /* Block Done Interrupt Enable */ | 1612 | #define BDIE 0x20 /* Block Done Interrupt Enable */ |
1948 | #define nBDIE 0x0 | ||
1949 | #define MBDI 0x40 /* Mask Block Done Interrupt */ | 1613 | #define MBDI 0x40 /* Mask Block Done Interrupt */ |
1950 | #define nMBDI 0x0 | ||
1951 | #define DRQ 0x300 /* Handshake MDMA Request Type */ | 1614 | #define DRQ 0x300 /* Handshake MDMA Request Type */ |
1952 | #define RBC 0x1000 /* Force Reload of BCOUNT */ | 1615 | #define RBC 0x1000 /* Force Reload of BCOUNT */ |
1953 | #define nRBC 0x0 | ||
1954 | #define PS 0x2000 /* Pin Status */ | 1616 | #define PS 0x2000 /* Pin Status */ |
1955 | #define nPS 0x0 | ||
1956 | #define OI 0x4000 /* Overflow Interrupt Generated */ | 1617 | #define OI 0x4000 /* Overflow Interrupt Generated */ |
1957 | #define nOI 0x0 | ||
1958 | #define BDI 0x8000 /* Block Done Interrupt Generated */ | 1618 | #define BDI 0x8000 /* Block Done Interrupt Generated */ |
1959 | #define nBDI 0x0 | ||
1960 | 1619 | ||
1961 | /* ******************************************* */ | 1620 | /* ******************************************* */ |
1962 | /* MULTI BIT MACRO ENUMERATIONS */ | 1621 | /* MULTI BIT MACRO ENUMERATIONS */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h index b1cc1c073b41..c2f4734da48d 100644 --- a/include/asm-blackfin/mach-bf548/defBF549.h +++ b/include/asm-blackfin/mach-bf548/defBF549.h | |||
@@ -1070,21 +1070,13 @@ | |||
1070 | /* Bit masks for PIXC_CTL */ | 1070 | /* Bit masks for PIXC_CTL */ |
1071 | 1071 | ||
1072 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ | 1072 | #define PIXC_EN 0x1 /* Pixel Compositor Enable */ |
1073 | #define nPIXC_EN 0x0 | ||
1074 | #define OVR_A_EN 0x2 /* Overlay A Enable */ | 1073 | #define OVR_A_EN 0x2 /* Overlay A Enable */ |
1075 | #define nOVR_A_EN 0x0 | ||
1076 | #define OVR_B_EN 0x4 /* Overlay B Enable */ | 1074 | #define OVR_B_EN 0x4 /* Overlay B Enable */ |
1077 | #define nOVR_B_EN 0x0 | ||
1078 | #define IMG_FORM 0x8 /* Image Data Format */ | 1075 | #define IMG_FORM 0x8 /* Image Data Format */ |
1079 | #define nIMG_FORM 0x0 | ||
1080 | #define OVR_FORM 0x10 /* Overlay Data Format */ | 1076 | #define OVR_FORM 0x10 /* Overlay Data Format */ |
1081 | #define nOVR_FORM 0x0 | ||
1082 | #define OUT_FORM 0x20 /* Output Data Format */ | 1077 | #define OUT_FORM 0x20 /* Output Data Format */ |
1083 | #define nOUT_FORM 0x0 | ||
1084 | #define UDS_MOD 0x40 /* Resampling Mode */ | 1078 | #define UDS_MOD 0x40 /* Resampling Mode */ |
1085 | #define nUDS_MOD 0x0 | ||
1086 | #define TC_EN 0x80 /* Transparent Color Enable */ | 1079 | #define TC_EN 0x80 /* Transparent Color Enable */ |
1087 | #define nTC_EN 0x0 | ||
1088 | #define IMG_STAT 0x300 /* Image FIFO Status */ | 1080 | #define IMG_STAT 0x300 /* Image FIFO Status */ |
1089 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ | 1081 | #define OVR_STAT 0xc00 /* Overlay FIFO Status */ |
1090 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ | 1082 | #define WM_LVL 0x3000 /* FIFO Watermark Level */ |
@@ -1132,13 +1124,9 @@ | |||
1132 | /* Bit masks for PIXC_INTRSTAT */ | 1124 | /* Bit masks for PIXC_INTRSTAT */ |
1133 | 1125 | ||
1134 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ | 1126 | #define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */ |
1135 | #define nOVR_INT_EN 0x0 | ||
1136 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ | 1127 | #define FRM_INT_EN 0x2 /* Interrupt at End of Frame */ |
1137 | #define nFRM_INT_EN 0x0 | ||
1138 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ | 1128 | #define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */ |
1139 | #define nOVR_INT_STAT 0x0 | ||
1140 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ | 1129 | #define FRM_INT_STAT 0x8 /* Frame Interrupt Status */ |
1141 | #define nFRM_INT_STAT 0x0 | ||
1142 | 1130 | ||
1143 | /* Bit masks for PIXC_RYCON */ | 1131 | /* Bit masks for PIXC_RYCON */ |
1144 | 1132 | ||
@@ -1146,7 +1134,6 @@ | |||
1146 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ | 1134 | #define A12 0xffc00 /* A12 in the Coefficient Matrix */ |
1147 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ | 1135 | #define A13 0x3ff00000 /* A13 in the Coefficient Matrix */ |
1148 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ | 1136 | #define RY_MULT4 0x40000000 /* Multiply Row by 4 */ |
1149 | #define nRY_MULT4 0x0 | ||
1150 | 1137 | ||
1151 | /* Bit masks for PIXC_GUCON */ | 1138 | /* Bit masks for PIXC_GUCON */ |
1152 | 1139 | ||
@@ -1154,7 +1141,6 @@ | |||
1154 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ | 1141 | #define A22 0xffc00 /* A22 in the Coefficient Matrix */ |
1155 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ | 1142 | #define A23 0x3ff00000 /* A23 in the Coefficient Matrix */ |
1156 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ | 1143 | #define GU_MULT4 0x40000000 /* Multiply Row by 4 */ |
1157 | #define nGU_MULT4 0x0 | ||
1158 | 1144 | ||
1159 | /* Bit masks for PIXC_BVCON */ | 1145 | /* Bit masks for PIXC_BVCON */ |
1160 | 1146 | ||
@@ -1162,7 +1148,6 @@ | |||
1162 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ | 1148 | #define A32 0xffc00 /* A32 in the Coefficient Matrix */ |
1163 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ | 1149 | #define A33 0x3ff00000 /* A33 in the Coefficient Matrix */ |
1164 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ | 1150 | #define BV_MULT4 0x40000000 /* Multiply Row by 4 */ |
1165 | #define nBV_MULT4 0x0 | ||
1166 | 1151 | ||
1167 | /* Bit masks for PIXC_CCBIAS */ | 1152 | /* Bit masks for PIXC_CCBIAS */ |
1168 | 1153 | ||
@@ -1179,48 +1164,28 @@ | |||
1179 | /* Bit masks for HOST_CONTROL */ | 1164 | /* Bit masks for HOST_CONTROL */ |
1180 | 1165 | ||
1181 | #define HOST_EN 0x1 /* Host Enable */ | 1166 | #define HOST_EN 0x1 /* Host Enable */ |
1182 | #define nHOST_EN 0x0 | ||
1183 | #define HOST_END 0x2 /* Host Endianess */ | 1167 | #define HOST_END 0x2 /* Host Endianess */ |
1184 | #define nHOST_END 0x0 | ||
1185 | #define DATA_SIZE 0x4 /* Data Size */ | 1168 | #define DATA_SIZE 0x4 /* Data Size */ |
1186 | #define nDATA_SIZE 0x0 | ||
1187 | #define HOST_RST 0x8 /* Host Reset */ | 1169 | #define HOST_RST 0x8 /* Host Reset */ |
1188 | #define nHOST_RST 0x0 | ||
1189 | #define HRDY_OVR 0x20 /* Host Ready Override */ | 1170 | #define HRDY_OVR 0x20 /* Host Ready Override */ |
1190 | #define nHRDY_OVR 0x0 | ||
1191 | #define INT_MODE 0x40 /* Interrupt Mode */ | 1171 | #define INT_MODE 0x40 /* Interrupt Mode */ |
1192 | #define nINT_MODE 0x0 | ||
1193 | #define BT_EN 0x80 /* Bus Timeout Enable */ | 1172 | #define BT_EN 0x80 /* Bus Timeout Enable */ |
1194 | #define nBT_EN 0x0 | ||
1195 | #define EHW 0x100 /* Enable Host Write */ | 1173 | #define EHW 0x100 /* Enable Host Write */ |
1196 | #define nEHW 0x0 | ||
1197 | #define EHR 0x200 /* Enable Host Read */ | 1174 | #define EHR 0x200 /* Enable Host Read */ |
1198 | #define nEHR 0x0 | ||
1199 | #define BDR 0x400 /* Burst DMA Requests */ | 1175 | #define BDR 0x400 /* Burst DMA Requests */ |
1200 | #define nBDR 0x0 | ||
1201 | 1176 | ||
1202 | /* Bit masks for HOST_STATUS */ | 1177 | /* Bit masks for HOST_STATUS */ |
1203 | 1178 | ||
1204 | #define READY 0x1 /* DMA Ready */ | 1179 | #define READY 0x1 /* DMA Ready */ |
1205 | #define nREADY 0x0 | ||
1206 | #define FIFOFULL 0x2 /* FIFO Full */ | 1180 | #define FIFOFULL 0x2 /* FIFO Full */ |
1207 | #define nFIFOFULL 0x0 | ||
1208 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 1181 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
1209 | #define nFIFOEMPTY 0x0 | 1182 | #define DMA_COMPLETE 0x8 /* DMA Complete */ |
1210 | #define COMPLETE 0x8 /* DMA Complete */ | ||
1211 | #define nCOMPLETE 0x0 | ||
1212 | #define HSHK 0x10 /* Host Handshake */ | 1183 | #define HSHK 0x10 /* Host Handshake */ |
1213 | #define nHSHK 0x0 | ||
1214 | #define TIMEOUT 0x20 /* Host Timeout */ | 1184 | #define TIMEOUT 0x20 /* Host Timeout */ |
1215 | #define nTIMEOUT 0x0 | ||
1216 | #define HIRQ 0x40 /* Host Interrupt Request */ | 1185 | #define HIRQ 0x40 /* Host Interrupt Request */ |
1217 | #define nHIRQ 0x0 | ||
1218 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ | 1186 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ |
1219 | #define nALLOW_CNFG 0x0 | ||
1220 | #define DMA_DIR 0x100 /* DMA Direction */ | 1187 | #define DMA_DIR 0x100 /* DMA Direction */ |
1221 | #define nDMA_DIR 0x0 | ||
1222 | #define BTE 0x200 /* Bus Timeout Enabled */ | 1188 | #define BTE 0x200 /* Bus Timeout Enabled */ |
1223 | #define nBTE 0x0 | ||
1224 | 1189 | ||
1225 | /* Bit masks for HOST_TIMEOUT */ | 1190 | /* Bit masks for HOST_TIMEOUT */ |
1226 | 1191 | ||
@@ -1229,71 +1194,41 @@ | |||
1229 | /* Bit masks for MXVR_CONFIG */ | 1194 | /* Bit masks for MXVR_CONFIG */ |
1230 | 1195 | ||
1231 | #define MXVREN 0x1 /* MXVR Enable */ | 1196 | #define MXVREN 0x1 /* MXVR Enable */ |
1232 | #define nMXVREN 0x0 | ||
1233 | #define MMSM 0x2 /* MXVR Master/Slave Mode Select */ | 1197 | #define MMSM 0x2 /* MXVR Master/Slave Mode Select */ |
1234 | #define nMMSM 0x0 | ||
1235 | #define ACTIVE 0x4 /* Active Mode */ | 1198 | #define ACTIVE 0x4 /* Active Mode */ |
1236 | #define nACTIVE 0x0 | ||
1237 | #define SDELAY 0x8 /* Synchronous Data Delay */ | 1199 | #define SDELAY 0x8 /* Synchronous Data Delay */ |
1238 | #define nSDELAY 0x0 | ||
1239 | #define NCMRXEN 0x10 /* Normal Control Message Receive Enable */ | 1200 | #define NCMRXEN 0x10 /* Normal Control Message Receive Enable */ |
1240 | #define nNCMRXEN 0x0 | ||
1241 | #define RWRRXEN 0x20 /* Remote Write Receive Enable */ | 1201 | #define RWRRXEN 0x20 /* Remote Write Receive Enable */ |
1242 | #define nRWRRXEN 0x0 | ||
1243 | #define MTXEN 0x40 /* MXVR Transmit Data Enable */ | 1202 | #define MTXEN 0x40 /* MXVR Transmit Data Enable */ |
1244 | #define nMTXEN 0x0 | ||
1245 | #define MTXONB 0x80 /* MXVR Phy Transmitter On */ | 1203 | #define MTXONB 0x80 /* MXVR Phy Transmitter On */ |
1246 | #define nMTXONB 0x0 | ||
1247 | #define EPARITY 0x100 /* Even Parity Select */ | 1204 | #define EPARITY 0x100 /* Even Parity Select */ |
1248 | #define nEPARITY 0x0 | ||
1249 | #define MSB 0x1e00 /* Master Synchronous Boundary */ | 1205 | #define MSB 0x1e00 /* Master Synchronous Boundary */ |
1250 | #define APRXEN 0x2000 /* Asynchronous Packet Receive Enable */ | 1206 | #define APRXEN 0x2000 /* Asynchronous Packet Receive Enable */ |
1251 | #define nAPRXEN 0x0 | ||
1252 | #define WAKEUP 0x4000 /* Wake-Up */ | 1207 | #define WAKEUP 0x4000 /* Wake-Up */ |
1253 | #define nWAKEUP 0x0 | ||
1254 | #define LMECH 0x8000 /* Lock Mechanism Select */ | 1208 | #define LMECH 0x8000 /* Lock Mechanism Select */ |
1255 | #define nLMECH 0x0 | ||
1256 | 1209 | ||
1257 | /* Bit masks for MXVR_STATE_0 */ | 1210 | /* Bit masks for MXVR_STATE_0 */ |
1258 | 1211 | ||
1259 | #define NACT 0x1 /* Network Activity */ | 1212 | #define NACT 0x1 /* Network Activity */ |
1260 | #define nNACT 0x0 | ||
1261 | #define SBLOCK 0x2 /* Super Block Lock */ | 1213 | #define SBLOCK 0x2 /* Super Block Lock */ |
1262 | #define nSBLOCK 0x0 | ||
1263 | #define FMPLLST 0xc /* Frequency Multiply PLL SM State */ | 1214 | #define FMPLLST 0xc /* Frequency Multiply PLL SM State */ |
1264 | #define CDRPLLST 0xe0 /* Clock/Data Recovery PLL SM State */ | 1215 | #define CDRPLLST 0xe0 /* Clock/Data Recovery PLL SM State */ |
1265 | #define APBSY 0x100 /* Asynchronous Packet Transmit Buffer Busy */ | 1216 | #define APBSY 0x100 /* Asynchronous Packet Transmit Buffer Busy */ |
1266 | #define nAPBSY 0x0 | ||
1267 | #define APARB 0x200 /* Asynchronous Packet Arbitrating */ | 1217 | #define APARB 0x200 /* Asynchronous Packet Arbitrating */ |
1268 | #define nAPARB 0x0 | ||
1269 | #define APTX 0x400 /* Asynchronous Packet Transmitting */ | 1218 | #define APTX 0x400 /* Asynchronous Packet Transmitting */ |
1270 | #define nAPTX 0x0 | ||
1271 | #define APRX 0x800 /* Receiving Asynchronous Packet */ | 1219 | #define APRX 0x800 /* Receiving Asynchronous Packet */ |
1272 | #define nAPRX 0x0 | ||
1273 | #define CMBSY 0x1000 /* Control Message Transmit Buffer Busy */ | 1220 | #define CMBSY 0x1000 /* Control Message Transmit Buffer Busy */ |
1274 | #define nCMBSY 0x0 | ||
1275 | #define CMARB 0x2000 /* Control Message Arbitrating */ | 1221 | #define CMARB 0x2000 /* Control Message Arbitrating */ |
1276 | #define nCMARB 0x0 | ||
1277 | #define CMTX 0x4000 /* Control Message Transmitting */ | 1222 | #define CMTX 0x4000 /* Control Message Transmitting */ |
1278 | #define nCMTX 0x0 | ||
1279 | #define CMRX 0x8000 /* Receiving Control Message */ | 1223 | #define CMRX 0x8000 /* Receiving Control Message */ |
1280 | #define nCMRX 0x0 | ||
1281 | #define MRXONB 0x10000 /* MRXONB Pin State */ | 1224 | #define MRXONB 0x10000 /* MRXONB Pin State */ |
1282 | #define nMRXONB 0x0 | ||
1283 | #define RGSIP 0x20000 /* Remote Get Source In Progress */ | 1225 | #define RGSIP 0x20000 /* Remote Get Source In Progress */ |
1284 | #define nRGSIP 0x0 | ||
1285 | #define DALIP 0x40000 /* Resource Deallocate In Progress */ | 1226 | #define DALIP 0x40000 /* Resource Deallocate In Progress */ |
1286 | #define nDALIP 0x0 | ||
1287 | #define ALIP 0x80000 /* Resource Allocate In Progress */ | 1227 | #define ALIP 0x80000 /* Resource Allocate In Progress */ |
1288 | #define nALIP 0x0 | ||
1289 | #define RRDIP 0x100000 /* Remote Read In Progress */ | 1228 | #define RRDIP 0x100000 /* Remote Read In Progress */ |
1290 | #define nRRDIP 0x0 | ||
1291 | #define RWRIP 0x200000 /* Remote Write In Progress */ | 1229 | #define RWRIP 0x200000 /* Remote Write In Progress */ |
1292 | #define nRWRIP 0x0 | ||
1293 | #define FLOCK 0x400000 /* Frame Lock */ | 1230 | #define FLOCK 0x400000 /* Frame Lock */ |
1294 | #define nFLOCK 0x0 | ||
1295 | #define BLOCK 0x800000 /* Block Lock */ | 1231 | #define BLOCK 0x800000 /* Block Lock */ |
1296 | #define nBLOCK 0x0 | ||
1297 | #define RSB 0xf000000 /* Received Synchronous Boundary */ | 1232 | #define RSB 0xf000000 /* Received Synchronous Boundary */ |
1298 | #define DERRNUM 0xf0000000 /* DMA Error Channel Number */ | 1233 | #define DERRNUM 0xf0000000 /* DMA Error Channel Number */ |
1299 | 1234 | ||
@@ -1302,535 +1237,343 @@ | |||
1302 | #define SRXNUMB 0xf /* Synchronous Receive FIFO Number of Bytes */ | 1237 | #define SRXNUMB 0xf /* Synchronous Receive FIFO Number of Bytes */ |
1303 | #define STXNUMB 0xf0 /* Synchronous Transmit FIFO Number of Bytes */ | 1238 | #define STXNUMB 0xf0 /* Synchronous Transmit FIFO Number of Bytes */ |
1304 | #define APCONT 0x100 /* Asynchronous Packet Continuation */ | 1239 | #define APCONT 0x100 /* Asynchronous Packet Continuation */ |
1305 | #define nAPCONT 0x0 | ||
1306 | #define OBERRNUM 0xe00 /* DMA Out of Bounds Error Channel Number */ | 1240 | #define OBERRNUM 0xe00 /* DMA Out of Bounds Error Channel Number */ |
1307 | #define DMAACTIVE0 0x10000 /* DMA0 Active */ | 1241 | #define DMAACTIVE0 0x10000 /* DMA0 Active */ |
1308 | #define nDMAACTIVE0 0x0 | ||
1309 | #define DMAACTIVE1 0x20000 /* DMA1 Active */ | 1242 | #define DMAACTIVE1 0x20000 /* DMA1 Active */ |
1310 | #define nDMAACTIVE1 0x0 | ||
1311 | #define DMAACTIVE2 0x40000 /* DMA2 Active */ | 1243 | #define DMAACTIVE2 0x40000 /* DMA2 Active */ |
1312 | #define nDMAACTIVE2 0x0 | ||
1313 | #define DMAACTIVE3 0x80000 /* DMA3 Active */ | 1244 | #define DMAACTIVE3 0x80000 /* DMA3 Active */ |
1314 | #define nDMAACTIVE3 0x0 | ||
1315 | #define DMAACTIVE4 0x100000 /* DMA4 Active */ | 1245 | #define DMAACTIVE4 0x100000 /* DMA4 Active */ |
1316 | #define nDMAACTIVE4 0x0 | ||
1317 | #define DMAACTIVE5 0x200000 /* DMA5 Active */ | 1246 | #define DMAACTIVE5 0x200000 /* DMA5 Active */ |
1318 | #define nDMAACTIVE5 0x0 | ||
1319 | #define DMAACTIVE6 0x400000 /* DMA6 Active */ | 1247 | #define DMAACTIVE6 0x400000 /* DMA6 Active */ |
1320 | #define nDMAACTIVE6 0x0 | ||
1321 | #define DMAACTIVE7 0x800000 /* DMA7 Active */ | 1248 | #define DMAACTIVE7 0x800000 /* DMA7 Active */ |
1322 | #define nDMAACTIVE7 0x0 | ||
1323 | #define DMAPMEN0 0x1000000 /* DMA0 Pattern Matching Enabled */ | 1249 | #define DMAPMEN0 0x1000000 /* DMA0 Pattern Matching Enabled */ |
1324 | #define nDMAPMEN0 0x0 | ||
1325 | #define DMAPMEN1 0x2000000 /* DMA1 Pattern Matching Enabled */ | 1250 | #define DMAPMEN1 0x2000000 /* DMA1 Pattern Matching Enabled */ |
1326 | #define nDMAPMEN1 0x0 | ||
1327 | #define DMAPMEN2 0x4000000 /* DMA2 Pattern Matching Enabled */ | 1251 | #define DMAPMEN2 0x4000000 /* DMA2 Pattern Matching Enabled */ |
1328 | #define nDMAPMEN2 0x0 | ||
1329 | #define DMAPMEN3 0x8000000 /* DMA3 Pattern Matching Enabled */ | 1252 | #define DMAPMEN3 0x8000000 /* DMA3 Pattern Matching Enabled */ |
1330 | #define nDMAPMEN3 0x0 | ||
1331 | #define DMAPMEN4 0x10000000 /* DMA4 Pattern Matching Enabled */ | 1253 | #define DMAPMEN4 0x10000000 /* DMA4 Pattern Matching Enabled */ |
1332 | #define nDMAPMEN4 0x0 | ||
1333 | #define DMAPMEN5 0x20000000 /* DMA5 Pattern Matching Enabled */ | 1254 | #define DMAPMEN5 0x20000000 /* DMA5 Pattern Matching Enabled */ |
1334 | #define nDMAPMEN5 0x0 | ||
1335 | #define DMAPMEN6 0x40000000 /* DMA6 Pattern Matching Enabled */ | 1255 | #define DMAPMEN6 0x40000000 /* DMA6 Pattern Matching Enabled */ |
1336 | #define nDMAPMEN6 0x0 | ||
1337 | #define DMAPMEN7 0x80000000 /* DMA7 Pattern Matching Enabled */ | 1256 | #define DMAPMEN7 0x80000000 /* DMA7 Pattern Matching Enabled */ |
1338 | #define nDMAPMEN7 0x0 | ||
1339 | 1257 | ||
1340 | /* Bit masks for MXVR_INT_STAT_0 */ | 1258 | /* Bit masks for MXVR_INT_STAT_0 */ |
1341 | 1259 | ||
1342 | #define NI2A 0x1 /* Network Inactive to Active */ | 1260 | #define NI2A 0x1 /* Network Inactive to Active */ |
1343 | #define nNI2A 0x0 | ||
1344 | #define NA2I 0x2 /* Network Active to Inactive */ | 1261 | #define NA2I 0x2 /* Network Active to Inactive */ |
1345 | #define nNA2I 0x0 | ||
1346 | #define SBU2L 0x4 /* Super Block Unlock to Lock */ | 1262 | #define SBU2L 0x4 /* Super Block Unlock to Lock */ |
1347 | #define nSBU2L 0x0 | ||
1348 | #define SBL2U 0x8 /* Super Block Lock to Unlock */ | 1263 | #define SBL2U 0x8 /* Super Block Lock to Unlock */ |
1349 | #define nSBL2U 0x0 | ||
1350 | #define PRU 0x10 /* Position Register Updated */ | 1264 | #define PRU 0x10 /* Position Register Updated */ |
1351 | #define nPRU 0x0 | ||
1352 | #define MPRU 0x20 /* Maximum Position Register Updated */ | 1265 | #define MPRU 0x20 /* Maximum Position Register Updated */ |
1353 | #define nMPRU 0x0 | ||
1354 | #define DRU 0x40 /* Delay Register Updated */ | 1266 | #define DRU 0x40 /* Delay Register Updated */ |
1355 | #define nDRU 0x0 | ||
1356 | #define MDRU 0x80 /* Maximum Delay Register Updated */ | 1267 | #define MDRU 0x80 /* Maximum Delay Register Updated */ |
1357 | #define nMDRU 0x0 | ||
1358 | #define SBU 0x100 /* Synchronous Boundary Updated */ | 1268 | #define SBU 0x100 /* Synchronous Boundary Updated */ |
1359 | #define nSBU 0x0 | ||
1360 | #define ATU 0x200 /* Allocation Table Updated */ | 1269 | #define ATU 0x200 /* Allocation Table Updated */ |
1361 | #define nATU 0x0 | ||
1362 | #define FCZ0 0x400 /* Frame Counter 0 Zero */ | 1270 | #define FCZ0 0x400 /* Frame Counter 0 Zero */ |
1363 | #define nFCZ0 0x0 | ||
1364 | #define FCZ1 0x800 /* Frame Counter 1 Zero */ | 1271 | #define FCZ1 0x800 /* Frame Counter 1 Zero */ |
1365 | #define nFCZ1 0x0 | ||
1366 | #define PERR 0x1000 /* Parity Error */ | 1272 | #define PERR 0x1000 /* Parity Error */ |
1367 | #define nPERR 0x0 | ||
1368 | #define MH2L 0x2000 /* MRXONB High to Low */ | 1273 | #define MH2L 0x2000 /* MRXONB High to Low */ |
1369 | #define nMH2L 0x0 | ||
1370 | #define ML2H 0x4000 /* MRXONB Low to High */ | 1274 | #define ML2H 0x4000 /* MRXONB Low to High */ |
1371 | #define nML2H 0x0 | ||
1372 | #define WUP 0x8000 /* Wake-Up Preamble Received */ | 1275 | #define WUP 0x8000 /* Wake-Up Preamble Received */ |
1373 | #define nWUP 0x0 | ||
1374 | #define FU2L 0x10000 /* Frame Unlock to Lock */ | 1276 | #define FU2L 0x10000 /* Frame Unlock to Lock */ |
1375 | #define nFU2L 0x0 | ||
1376 | #define FL2U 0x20000 /* Frame Lock to Unlock */ | 1277 | #define FL2U 0x20000 /* Frame Lock to Unlock */ |
1377 | #define nFL2U 0x0 | ||
1378 | #define BU2L 0x40000 /* Block Unlock to Lock */ | 1278 | #define BU2L 0x40000 /* Block Unlock to Lock */ |
1379 | #define nBU2L 0x0 | ||
1380 | #define BL2U 0x80000 /* Block Lock to Unlock */ | 1279 | #define BL2U 0x80000 /* Block Lock to Unlock */ |
1381 | #define nBL2U 0x0 | ||
1382 | #define OBERR 0x100000 /* DMA Out of Bounds Error */ | 1280 | #define OBERR 0x100000 /* DMA Out of Bounds Error */ |
1383 | #define nOBERR 0x0 | ||
1384 | #define PFL 0x200000 /* PLL Frequency Locked */ | 1281 | #define PFL 0x200000 /* PLL Frequency Locked */ |
1385 | #define nPFL 0x0 | ||
1386 | #define SCZ 0x400000 /* System Clock Counter Zero */ | 1282 | #define SCZ 0x400000 /* System Clock Counter Zero */ |
1387 | #define nSCZ 0x0 | ||
1388 | #define FERR 0x800000 /* FIFO Error */ | 1283 | #define FERR 0x800000 /* FIFO Error */ |
1389 | #define nFERR 0x0 | ||
1390 | #define CMR 0x1000000 /* Control Message Received */ | 1284 | #define CMR 0x1000000 /* Control Message Received */ |
1391 | #define nCMR 0x0 | ||
1392 | #define CMROF 0x2000000 /* Control Message Receive Buffer Overflow */ | 1285 | #define CMROF 0x2000000 /* Control Message Receive Buffer Overflow */ |
1393 | #define nCMROF 0x0 | ||
1394 | #define CMTS 0x4000000 /* Control Message Transmit Buffer Successfully Sent */ | 1286 | #define CMTS 0x4000000 /* Control Message Transmit Buffer Successfully Sent */ |
1395 | #define nCMTS 0x0 | ||
1396 | #define CMTC 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled */ | 1287 | #define CMTC 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled */ |
1397 | #define nCMTC 0x0 | ||
1398 | #define RWRC 0x10000000 /* Remote Write Control Message Completed */ | 1288 | #define RWRC 0x10000000 /* Remote Write Control Message Completed */ |
1399 | #define nRWRC 0x0 | ||
1400 | #define BCZ 0x20000000 /* Block Counter Zero */ | 1289 | #define BCZ 0x20000000 /* Block Counter Zero */ |
1401 | #define nBCZ 0x0 | ||
1402 | #define BMERR 0x40000000 /* Biphase Mark Coding Error */ | 1290 | #define BMERR 0x40000000 /* Biphase Mark Coding Error */ |
1403 | #define nBMERR 0x0 | ||
1404 | #define DERR 0x80000000 /* DMA Error */ | 1291 | #define DERR 0x80000000 /* DMA Error */ |
1405 | #define nDERR 0x0 | ||
1406 | 1292 | ||
1407 | /* Bit masks for MXVR_INT_STAT_1 */ | 1293 | /* Bit masks for MXVR_INT_STAT_1 */ |
1408 | 1294 | ||
1409 | #define HDONE0 0x1 /* DMA0 Half Done */ | 1295 | #define HDONE0 0x1 /* DMA0 Half Done */ |
1410 | #define nHDONE0 0x0 | ||
1411 | #define DONE0 0x2 /* DMA0 Done */ | 1296 | #define DONE0 0x2 /* DMA0 Done */ |
1412 | #define nDONE0 0x0 | ||
1413 | #define APR 0x4 /* Asynchronous Packet Received */ | 1297 | #define APR 0x4 /* Asynchronous Packet Received */ |
1414 | #define nAPR 0x0 | ||
1415 | #define APROF 0x8 /* Asynchronous Packet Receive Buffer Overflow */ | 1298 | #define APROF 0x8 /* Asynchronous Packet Receive Buffer Overflow */ |
1416 | #define nAPROF 0x0 | ||
1417 | #define HDONE1 0x10 /* DMA1 Half Done */ | 1299 | #define HDONE1 0x10 /* DMA1 Half Done */ |
1418 | #define nHDONE1 0x0 | ||
1419 | #define DONE1 0x20 /* DMA1 Done */ | 1300 | #define DONE1 0x20 /* DMA1 Done */ |
1420 | #define nDONE1 0x0 | ||
1421 | #define APTS 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent */ | 1301 | #define APTS 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent */ |
1422 | #define nAPTS 0x0 | ||
1423 | #define APTC 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled */ | 1302 | #define APTC 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled */ |
1424 | #define nAPTC 0x0 | ||
1425 | #define HDONE2 0x100 /* DMA2 Half Done */ | 1303 | #define HDONE2 0x100 /* DMA2 Half Done */ |
1426 | #define nHDONE2 0x0 | ||
1427 | #define DONE2 0x200 /* DMA2 Done */ | 1304 | #define DONE2 0x200 /* DMA2 Done */ |
1428 | #define nDONE2 0x0 | ||
1429 | #define APRCE 0x400 /* Asynchronous Packet Receive CRC Error */ | 1305 | #define APRCE 0x400 /* Asynchronous Packet Receive CRC Error */ |
1430 | #define nAPRCE 0x0 | ||
1431 | #define APRPE 0x800 /* Asynchronous Packet Receive Packet Error */ | 1306 | #define APRPE 0x800 /* Asynchronous Packet Receive Packet Error */ |
1432 | #define nAPRPE 0x0 | ||
1433 | #define HDONE3 0x1000 /* DMA3 Half Done */ | 1307 | #define HDONE3 0x1000 /* DMA3 Half Done */ |
1434 | #define nHDONE3 0x0 | ||
1435 | #define DONE3 0x2000 /* DMA3 Done */ | 1308 | #define DONE3 0x2000 /* DMA3 Done */ |
1436 | #define nDONE3 0x0 | ||
1437 | #define HDONE4 0x10000 /* DMA4 Half Done */ | 1309 | #define HDONE4 0x10000 /* DMA4 Half Done */ |
1438 | #define nHDONE4 0x0 | ||
1439 | #define DONE4 0x20000 /* DMA4 Done */ | 1310 | #define DONE4 0x20000 /* DMA4 Done */ |
1440 | #define nDONE4 0x0 | ||
1441 | #define HDONE5 0x100000 /* DMA5 Half Done */ | 1311 | #define HDONE5 0x100000 /* DMA5 Half Done */ |
1442 | #define nHDONE5 0x0 | ||
1443 | #define DONE5 0x200000 /* DMA5 Done */ | 1312 | #define DONE5 0x200000 /* DMA5 Done */ |
1444 | #define nDONE5 0x0 | ||
1445 | #define HDONE6 0x1000000 /* DMA6 Half Done */ | 1313 | #define HDONE6 0x1000000 /* DMA6 Half Done */ |
1446 | #define nHDONE6 0x0 | ||
1447 | #define DONE6 0x2000000 /* DMA6 Done */ | 1314 | #define DONE6 0x2000000 /* DMA6 Done */ |
1448 | #define nDONE6 0x0 | ||
1449 | #define HDONE7 0x10000000 /* DMA7 Half Done */ | 1315 | #define HDONE7 0x10000000 /* DMA7 Half Done */ |
1450 | #define nHDONE7 0x0 | ||
1451 | #define DONE7 0x20000000 /* DMA7 Done */ | 1316 | #define DONE7 0x20000000 /* DMA7 Done */ |
1452 | #define nDONE7 0x0 | ||
1453 | 1317 | ||
1454 | /* Bit masks for MXVR_INT_EN_0 */ | 1318 | /* Bit masks for MXVR_INT_EN_0 */ |
1455 | 1319 | ||
1456 | #define NI2AEN 0x1 /* Network Inactive to Active Interrupt Enable */ | 1320 | #define NI2AEN 0x1 /* Network Inactive to Active Interrupt Enable */ |
1457 | #define nNI2AEN 0x0 | ||
1458 | #define NA2IEN 0x2 /* Network Active to Inactive Interrupt Enable */ | 1321 | #define NA2IEN 0x2 /* Network Active to Inactive Interrupt Enable */ |
1459 | #define nNA2IEN 0x0 | ||
1460 | #define SBU2LEN 0x4 /* Super Block Unlock to Lock Interrupt Enable */ | 1322 | #define SBU2LEN 0x4 /* Super Block Unlock to Lock Interrupt Enable */ |
1461 | #define nSBU2LEN 0x0 | ||
1462 | #define SBL2UEN 0x8 /* Super Block Lock to Unlock Interrupt Enable */ | 1323 | #define SBL2UEN 0x8 /* Super Block Lock to Unlock Interrupt Enable */ |
1463 | #define nSBL2UEN 0x0 | ||
1464 | #define PRUEN 0x10 /* Position Register Updated Interrupt Enable */ | 1324 | #define PRUEN 0x10 /* Position Register Updated Interrupt Enable */ |
1465 | #define nPRUEN 0x0 | ||
1466 | #define MPRUEN 0x20 /* Maximum Position Register Updated Interrupt Enable */ | 1325 | #define MPRUEN 0x20 /* Maximum Position Register Updated Interrupt Enable */ |
1467 | #define nMPRUEN 0x0 | ||
1468 | #define DRUEN 0x40 /* Delay Register Updated Interrupt Enable */ | 1326 | #define DRUEN 0x40 /* Delay Register Updated Interrupt Enable */ |
1469 | #define nDRUEN 0x0 | ||
1470 | #define MDRUEN 0x80 /* Maximum Delay Register Updated Interrupt Enable */ | 1327 | #define MDRUEN 0x80 /* Maximum Delay Register Updated Interrupt Enable */ |
1471 | #define nMDRUEN 0x0 | ||
1472 | #define SBUEN 0x100 /* Synchronous Boundary Updated Interrupt Enable */ | 1328 | #define SBUEN 0x100 /* Synchronous Boundary Updated Interrupt Enable */ |
1473 | #define nSBUEN 0x0 | ||
1474 | #define ATUEN 0x200 /* Allocation Table Updated Interrupt Enable */ | 1329 | #define ATUEN 0x200 /* Allocation Table Updated Interrupt Enable */ |
1475 | #define nATUEN 0x0 | ||
1476 | #define FCZ0EN 0x400 /* Frame Counter 0 Zero Interrupt Enable */ | 1330 | #define FCZ0EN 0x400 /* Frame Counter 0 Zero Interrupt Enable */ |
1477 | #define nFCZ0EN 0x0 | ||
1478 | #define FCZ1EN 0x800 /* Frame Counter 1 Zero Interrupt Enable */ | 1331 | #define FCZ1EN 0x800 /* Frame Counter 1 Zero Interrupt Enable */ |
1479 | #define nFCZ1EN 0x0 | ||
1480 | #define PERREN 0x1000 /* Parity Error Interrupt Enable */ | 1332 | #define PERREN 0x1000 /* Parity Error Interrupt Enable */ |
1481 | #define nPERREN 0x0 | ||
1482 | #define MH2LEN 0x2000 /* MRXONB High to Low Interrupt Enable */ | 1333 | #define MH2LEN 0x2000 /* MRXONB High to Low Interrupt Enable */ |
1483 | #define nMH2LEN 0x0 | ||
1484 | #define ML2HEN 0x4000 /* MRXONB Low to High Interrupt Enable */ | 1334 | #define ML2HEN 0x4000 /* MRXONB Low to High Interrupt Enable */ |
1485 | #define nML2HEN 0x0 | ||
1486 | #define WUPEN 0x8000 /* Wake-Up Preamble Received Interrupt Enable */ | 1335 | #define WUPEN 0x8000 /* Wake-Up Preamble Received Interrupt Enable */ |
1487 | #define nWUPEN 0x0 | ||
1488 | #define FU2LEN 0x10000 /* Frame Unlock to Lock Interrupt Enable */ | 1336 | #define FU2LEN 0x10000 /* Frame Unlock to Lock Interrupt Enable */ |
1489 | #define nFU2LEN 0x0 | ||
1490 | #define FL2UEN 0x20000 /* Frame Lock to Unlock Interrupt Enable */ | 1337 | #define FL2UEN 0x20000 /* Frame Lock to Unlock Interrupt Enable */ |
1491 | #define nFL2UEN 0x0 | ||
1492 | #define BU2LEN 0x40000 /* Block Unlock to Lock Interrupt Enable */ | 1338 | #define BU2LEN 0x40000 /* Block Unlock to Lock Interrupt Enable */ |
1493 | #define nBU2LEN 0x0 | ||
1494 | #define BL2UEN 0x80000 /* Block Lock to Unlock Interrupt Enable */ | 1339 | #define BL2UEN 0x80000 /* Block Lock to Unlock Interrupt Enable */ |
1495 | #define nBL2UEN 0x0 | ||
1496 | #define OBERREN 0x100000 /* DMA Out of Bounds Error Interrupt Enable */ | 1340 | #define OBERREN 0x100000 /* DMA Out of Bounds Error Interrupt Enable */ |
1497 | #define nOBERREN 0x0 | ||
1498 | #define PFLEN 0x200000 /* PLL Frequency Locked Interrupt Enable */ | 1341 | #define PFLEN 0x200000 /* PLL Frequency Locked Interrupt Enable */ |
1499 | #define nPFLEN 0x0 | ||
1500 | #define SCZEN 0x400000 /* System Clock Counter Zero Interrupt Enable */ | 1342 | #define SCZEN 0x400000 /* System Clock Counter Zero Interrupt Enable */ |
1501 | #define nSCZEN 0x0 | ||
1502 | #define FERREN 0x800000 /* FIFO Error Interrupt Enable */ | 1343 | #define FERREN 0x800000 /* FIFO Error Interrupt Enable */ |
1503 | #define nFERREN 0x0 | ||
1504 | #define CMREN 0x1000000 /* Control Message Received Interrupt Enable */ | 1344 | #define CMREN 0x1000000 /* Control Message Received Interrupt Enable */ |
1505 | #define nCMREN 0x0 | ||
1506 | #define CMROFEN 0x2000000 /* Control Message Receive Buffer Overflow Interrupt Enable */ | 1345 | #define CMROFEN 0x2000000 /* Control Message Receive Buffer Overflow Interrupt Enable */ |
1507 | #define nCMROFEN 0x0 | ||
1508 | #define CMTSEN 0x4000000 /* Control Message Transmit Buffer Successfully Sent Interrupt Enable */ | 1346 | #define CMTSEN 0x4000000 /* Control Message Transmit Buffer Successfully Sent Interrupt Enable */ |
1509 | #define nCMTSEN 0x0 | ||
1510 | #define CMTCEN 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled Interrupt Enable */ | 1347 | #define CMTCEN 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled Interrupt Enable */ |
1511 | #define nCMTCEN 0x0 | ||
1512 | #define RWRCEN 0x10000000 /* Remote Write Control Message Completed Interrupt Enable */ | 1348 | #define RWRCEN 0x10000000 /* Remote Write Control Message Completed Interrupt Enable */ |
1513 | #define nRWRCEN 0x0 | ||
1514 | #define BCZEN 0x20000000 /* Block Counter Zero Interrupt Enable */ | 1349 | #define BCZEN 0x20000000 /* Block Counter Zero Interrupt Enable */ |
1515 | #define nBCZEN 0x0 | ||
1516 | #define BMERREN 0x40000000 /* Biphase Mark Coding Error Interrupt Enable */ | 1350 | #define BMERREN 0x40000000 /* Biphase Mark Coding Error Interrupt Enable */ |
1517 | #define nBMERREN 0x0 | ||
1518 | #define DERREN 0x80000000 /* DMA Error Interrupt Enable */ | 1351 | #define DERREN 0x80000000 /* DMA Error Interrupt Enable */ |
1519 | #define nDERREN 0x0 | ||
1520 | 1352 | ||
1521 | /* Bit masks for MXVR_INT_EN_1 */ | 1353 | /* Bit masks for MXVR_INT_EN_1 */ |
1522 | 1354 | ||
1523 | #define HDONEEN0 0x1 /* DMA0 Half Done Interrupt Enable */ | 1355 | #define HDONEEN0 0x1 /* DMA0 Half Done Interrupt Enable */ |
1524 | #define nHDONEEN0 0x0 | ||
1525 | #define DONEEN0 0x2 /* DMA0 Done Interrupt Enable */ | 1356 | #define DONEEN0 0x2 /* DMA0 Done Interrupt Enable */ |
1526 | #define nDONEEN0 0x0 | ||
1527 | #define APREN 0x4 /* Asynchronous Packet Received Interrupt Enable */ | 1357 | #define APREN 0x4 /* Asynchronous Packet Received Interrupt Enable */ |
1528 | #define nAPREN 0x0 | ||
1529 | #define APROFEN 0x8 /* Asynchronous Packet Receive Buffer Overflow Interrupt Enable */ | 1358 | #define APROFEN 0x8 /* Asynchronous Packet Receive Buffer Overflow Interrupt Enable */ |
1530 | #define nAPROFEN 0x0 | ||
1531 | #define HDONEEN1 0x10 /* DMA1 Half Done Interrupt Enable */ | 1359 | #define HDONEEN1 0x10 /* DMA1 Half Done Interrupt Enable */ |
1532 | #define nHDONEEN1 0x0 | ||
1533 | #define DONEEN1 0x20 /* DMA1 Done Interrupt Enable */ | 1360 | #define DONEEN1 0x20 /* DMA1 Done Interrupt Enable */ |
1534 | #define nDONEEN1 0x0 | ||
1535 | #define APTSEN 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent Interrupt Enable */ | 1361 | #define APTSEN 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent Interrupt Enable */ |
1536 | #define nAPTSEN 0x0 | ||
1537 | #define APTCEN 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled Interrupt Enable */ | 1362 | #define APTCEN 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled Interrupt Enable */ |
1538 | #define nAPTCEN 0x0 | ||
1539 | #define HDONEEN2 0x100 /* DMA2 Half Done Interrupt Enable */ | 1363 | #define HDONEEN2 0x100 /* DMA2 Half Done Interrupt Enable */ |
1540 | #define nHDONEEN2 0x0 | ||
1541 | #define DONEEN2 0x200 /* DMA2 Done Interrupt Enable */ | 1364 | #define DONEEN2 0x200 /* DMA2 Done Interrupt Enable */ |
1542 | #define nDONEEN2 0x0 | ||
1543 | #define APRCEEN 0x400 /* Asynchronous Packet Receive CRC Error Interrupt Enable */ | 1365 | #define APRCEEN 0x400 /* Asynchronous Packet Receive CRC Error Interrupt Enable */ |
1544 | #define nAPRCEEN 0x0 | ||
1545 | #define APRPEEN 0x800 /* Asynchronous Packet Receive Packet Error Interrupt Enable */ | 1366 | #define APRPEEN 0x800 /* Asynchronous Packet Receive Packet Error Interrupt Enable */ |
1546 | #define nAPRPEEN 0x0 | ||
1547 | #define HDONEEN3 0x1000 /* DMA3 Half Done Interrupt Enable */ | 1367 | #define HDONEEN3 0x1000 /* DMA3 Half Done Interrupt Enable */ |
1548 | #define nHDONEEN3 0x0 | ||
1549 | #define DONEEN3 0x2000 /* DMA3 Done Interrupt Enable */ | 1368 | #define DONEEN3 0x2000 /* DMA3 Done Interrupt Enable */ |
1550 | #define nDONEEN3 0x0 | ||
1551 | #define HDONEEN4 0x10000 /* DMA4 Half Done Interrupt Enable */ | 1369 | #define HDONEEN4 0x10000 /* DMA4 Half Done Interrupt Enable */ |
1552 | #define nHDONEEN4 0x0 | ||
1553 | #define DONEEN4 0x20000 /* DMA4 Done Interrupt Enable */ | 1370 | #define DONEEN4 0x20000 /* DMA4 Done Interrupt Enable */ |
1554 | #define nDONEEN4 0x0 | ||
1555 | #define HDONEEN5 0x100000 /* DMA5 Half Done Interrupt Enable */ | 1371 | #define HDONEEN5 0x100000 /* DMA5 Half Done Interrupt Enable */ |
1556 | #define nHDONEEN5 0x0 | ||
1557 | #define DONEEN5 0x200000 /* DMA5 Done Interrupt Enable */ | 1372 | #define DONEEN5 0x200000 /* DMA5 Done Interrupt Enable */ |
1558 | #define nDONEEN5 0x0 | ||
1559 | #define HDONEEN6 0x1000000 /* DMA6 Half Done Interrupt Enable */ | 1373 | #define HDONEEN6 0x1000000 /* DMA6 Half Done Interrupt Enable */ |
1560 | #define nHDONEEN6 0x0 | ||
1561 | #define DONEEN6 0x2000000 /* DMA6 Done Interrupt Enable */ | 1374 | #define DONEEN6 0x2000000 /* DMA6 Done Interrupt Enable */ |
1562 | #define nDONEEN6 0x0 | ||
1563 | #define HDONEEN7 0x10000000 /* DMA7 Half Done Interrupt Enable */ | 1375 | #define HDONEEN7 0x10000000 /* DMA7 Half Done Interrupt Enable */ |
1564 | #define nHDONEEN7 0x0 | ||
1565 | #define DONEEN7 0x20000000 /* DMA7 Done Interrupt Enable */ | 1376 | #define DONEEN7 0x20000000 /* DMA7 Done Interrupt Enable */ |
1566 | #define nDONEEN7 0x0 | ||
1567 | 1377 | ||
1568 | /* Bit masks for MXVR_POSITION */ | 1378 | /* Bit masks for MXVR_POSITION */ |
1569 | 1379 | ||
1570 | #define POSITION 0x3f /* Node Position */ | 1380 | #define POSITION 0x3f /* Node Position */ |
1571 | #define PVALID 0x8000 /* Node Position Valid */ | 1381 | #define PVALID 0x8000 /* Node Position Valid */ |
1572 | #define nPVALID 0x0 | ||
1573 | 1382 | ||
1574 | /* Bit masks for MXVR_MAX_POSITION */ | 1383 | /* Bit masks for MXVR_MAX_POSITION */ |
1575 | 1384 | ||
1576 | #define MPOSITION 0x3f /* Maximum Node Position */ | 1385 | #define MPOSITION 0x3f /* Maximum Node Position */ |
1577 | #define MPVALID 0x8000 /* Maximum Node Position Valid */ | 1386 | #define MPVALID 0x8000 /* Maximum Node Position Valid */ |
1578 | #define nMPVALID 0x0 | ||
1579 | 1387 | ||
1580 | /* Bit masks for MXVR_DELAY */ | 1388 | /* Bit masks for MXVR_DELAY */ |
1581 | 1389 | ||
1582 | #define DELAY 0x3f /* Node Frame Delay */ | 1390 | #define DELAY 0x3f /* Node Frame Delay */ |
1583 | #define DVALID 0x8000 /* Node Frame Delay Valid */ | 1391 | #define DVALID 0x8000 /* Node Frame Delay Valid */ |
1584 | #define nDVALID 0x0 | ||
1585 | 1392 | ||
1586 | /* Bit masks for MXVR_MAX_DELAY */ | 1393 | /* Bit masks for MXVR_MAX_DELAY */ |
1587 | 1394 | ||
1588 | #define MDELAY 0x3f /* Maximum Node Frame Delay */ | 1395 | #define MDELAY 0x3f /* Maximum Node Frame Delay */ |
1589 | #define MDVALID 0x8000 /* Maximum Node Frame Delay Valid */ | 1396 | #define MDVALID 0x8000 /* Maximum Node Frame Delay Valid */ |
1590 | #define nMDVALID 0x0 | ||
1591 | 1397 | ||
1592 | /* Bit masks for MXVR_LADDR */ | 1398 | /* Bit masks for MXVR_LADDR */ |
1593 | 1399 | ||
1594 | #define LADDR 0xffff /* Logical Address */ | 1400 | #define LADDR 0xffff /* Logical Address */ |
1595 | #define LVALID 0x80000000 /* Logical Address Valid */ | 1401 | #define LVALID 0x80000000 /* Logical Address Valid */ |
1596 | #define nLVALID 0x0 | ||
1597 | 1402 | ||
1598 | /* Bit masks for MXVR_GADDR */ | 1403 | /* Bit masks for MXVR_GADDR */ |
1599 | 1404 | ||
1600 | #define GADDRL 0xff /* Group Address Lower Byte */ | 1405 | #define GADDRL 0xff /* Group Address Lower Byte */ |
1601 | #define GVALID 0x8000 /* Group Address Valid */ | 1406 | #define GVALID 0x8000 /* Group Address Valid */ |
1602 | #define nGVALID 0x0 | ||
1603 | 1407 | ||
1604 | /* Bit masks for MXVR_AADDR */ | 1408 | /* Bit masks for MXVR_AADDR */ |
1605 | 1409 | ||
1606 | #define AADDR 0xffff /* Alternate Address */ | 1410 | #define AADDR 0xffff /* Alternate Address */ |
1607 | #define AVALID 0x80000000 /* Alternate Address Valid */ | 1411 | #define AVALID 0x80000000 /* Alternate Address Valid */ |
1608 | #define nAVALID 0x0 | ||
1609 | 1412 | ||
1610 | /* Bit masks for MXVR_ALLOC_0 */ | 1413 | /* Bit masks for MXVR_ALLOC_0 */ |
1611 | 1414 | ||
1612 | #define CL0 0x7f /* Channel 0 Connection Label */ | 1415 | #define CL0 0x7f /* Channel 0 Connection Label */ |
1613 | #define CIU0 0x80 /* Channel 0 In Use */ | 1416 | #define CIU0 0x80 /* Channel 0 In Use */ |
1614 | #define nCIU0 0x0 | ||
1615 | #define CL1 0x7f00 /* Channel 0 Connection Label */ | 1417 | #define CL1 0x7f00 /* Channel 0 Connection Label */ |
1616 | #define CIU1 0x8000 /* Channel 0 In Use */ | 1418 | #define CIU1 0x8000 /* Channel 0 In Use */ |
1617 | #define nCIU1 0x0 | ||
1618 | #define CL2 0x7f0000 /* Channel 0 Connection Label */ | 1419 | #define CL2 0x7f0000 /* Channel 0 Connection Label */ |
1619 | #define CIU2 0x800000 /* Channel 0 In Use */ | 1420 | #define CIU2 0x800000 /* Channel 0 In Use */ |
1620 | #define nCIU2 0x0 | ||
1621 | #define CL3 0x7f000000 /* Channel 0 Connection Label */ | 1421 | #define CL3 0x7f000000 /* Channel 0 Connection Label */ |
1622 | #define CIU3 0x80000000 /* Channel 0 In Use */ | 1422 | #define CIU3 0x80000000 /* Channel 0 In Use */ |
1623 | #define nCIU3 0x0 | ||
1624 | 1423 | ||
1625 | /* Bit masks for MXVR_ALLOC_1 */ | 1424 | /* Bit masks for MXVR_ALLOC_1 */ |
1626 | 1425 | ||
1627 | #define CL4 0x7f /* Channel 4 Connection Label */ | 1426 | #define CL4 0x7f /* Channel 4 Connection Label */ |
1628 | #define CIU4 0x80 /* Channel 4 In Use */ | 1427 | #define CIU4 0x80 /* Channel 4 In Use */ |
1629 | #define nCIU4 0x0 | ||
1630 | #define CL5 0x7f00 /* Channel 5 Connection Label */ | 1428 | #define CL5 0x7f00 /* Channel 5 Connection Label */ |
1631 | #define CIU5 0x8000 /* Channel 5 In Use */ | 1429 | #define CIU5 0x8000 /* Channel 5 In Use */ |
1632 | #define nCIU5 0x0 | ||
1633 | #define CL6 0x7f0000 /* Channel 6 Connection Label */ | 1430 | #define CL6 0x7f0000 /* Channel 6 Connection Label */ |
1634 | #define CIU6 0x800000 /* Channel 6 In Use */ | 1431 | #define CIU6 0x800000 /* Channel 6 In Use */ |
1635 | #define nCIU6 0x0 | ||
1636 | #define CL7 0x7f000000 /* Channel 7 Connection Label */ | 1432 | #define CL7 0x7f000000 /* Channel 7 Connection Label */ |
1637 | #define CIU7 0x80000000 /* Channel 7 In Use */ | 1433 | #define CIU7 0x80000000 /* Channel 7 In Use */ |
1638 | #define nCIU7 0x0 | ||
1639 | 1434 | ||
1640 | /* Bit masks for MXVR_ALLOC_2 */ | 1435 | /* Bit masks for MXVR_ALLOC_2 */ |
1641 | 1436 | ||
1642 | #define CL8 0x7f /* Channel 8 Connection Label */ | 1437 | #define CL8 0x7f /* Channel 8 Connection Label */ |
1643 | #define CIU8 0x80 /* Channel 8 In Use */ | 1438 | #define CIU8 0x80 /* Channel 8 In Use */ |
1644 | #define nCIU8 0x0 | ||
1645 | #define CL9 0x7f00 /* Channel 9 Connection Label */ | 1439 | #define CL9 0x7f00 /* Channel 9 Connection Label */ |
1646 | #define CIU9 0x8000 /* Channel 9 In Use */ | 1440 | #define CIU9 0x8000 /* Channel 9 In Use */ |
1647 | #define nCIU9 0x0 | ||
1648 | #define CL10 0x7f0000 /* Channel 10 Connection Label */ | 1441 | #define CL10 0x7f0000 /* Channel 10 Connection Label */ |
1649 | #define CIU10 0x800000 /* Channel 10 In Use */ | 1442 | #define CIU10 0x800000 /* Channel 10 In Use */ |
1650 | #define nCIU10 0x0 | ||
1651 | #define CL11 0x7f000000 /* Channel 11 Connection Label */ | 1443 | #define CL11 0x7f000000 /* Channel 11 Connection Label */ |
1652 | #define CIU11 0x80000000 /* Channel 11 In Use */ | 1444 | #define CIU11 0x80000000 /* Channel 11 In Use */ |
1653 | #define nCIU11 0x0 | ||
1654 | 1445 | ||
1655 | /* Bit masks for MXVR_ALLOC_3 */ | 1446 | /* Bit masks for MXVR_ALLOC_3 */ |
1656 | 1447 | ||
1657 | #define CL12 0x7f /* Channel 12 Connection Label */ | 1448 | #define CL12 0x7f /* Channel 12 Connection Label */ |
1658 | #define CIU12 0x80 /* Channel 12 In Use */ | 1449 | #define CIU12 0x80 /* Channel 12 In Use */ |
1659 | #define nCIU12 0x0 | ||
1660 | #define CL13 0x7f00 /* Channel 13 Connection Label */ | 1450 | #define CL13 0x7f00 /* Channel 13 Connection Label */ |
1661 | #define CIU13 0x8000 /* Channel 13 In Use */ | 1451 | #define CIU13 0x8000 /* Channel 13 In Use */ |
1662 | #define nCIU13 0x0 | ||
1663 | #define CL14 0x7f0000 /* Channel 14 Connection Label */ | 1452 | #define CL14 0x7f0000 /* Channel 14 Connection Label */ |
1664 | #define CIU14 0x800000 /* Channel 14 In Use */ | 1453 | #define CIU14 0x800000 /* Channel 14 In Use */ |
1665 | #define nCIU14 0x0 | ||
1666 | #define CL15 0x7f000000 /* Channel 15 Connection Label */ | 1454 | #define CL15 0x7f000000 /* Channel 15 Connection Label */ |
1667 | #define CIU15 0x80000000 /* Channel 15 In Use */ | 1455 | #define CIU15 0x80000000 /* Channel 15 In Use */ |
1668 | #define nCIU15 0x0 | ||
1669 | 1456 | ||
1670 | /* Bit masks for MXVR_ALLOC_4 */ | 1457 | /* Bit masks for MXVR_ALLOC_4 */ |
1671 | 1458 | ||
1672 | #define CL16 0x7f /* Channel 16 Connection Label */ | 1459 | #define CL16 0x7f /* Channel 16 Connection Label */ |
1673 | #define CIU16 0x80 /* Channel 16 In Use */ | 1460 | #define CIU16 0x80 /* Channel 16 In Use */ |
1674 | #define nCIU16 0x0 | ||
1675 | #define CL17 0x7f00 /* Channel 17 Connection Label */ | 1461 | #define CL17 0x7f00 /* Channel 17 Connection Label */ |
1676 | #define CIU17 0x8000 /* Channel 17 In Use */ | 1462 | #define CIU17 0x8000 /* Channel 17 In Use */ |
1677 | #define nCIU17 0x0 | ||
1678 | #define CL18 0x7f0000 /* Channel 18 Connection Label */ | 1463 | #define CL18 0x7f0000 /* Channel 18 Connection Label */ |
1679 | #define CIU18 0x800000 /* Channel 18 In Use */ | 1464 | #define CIU18 0x800000 /* Channel 18 In Use */ |
1680 | #define nCIU18 0x0 | ||
1681 | #define CL19 0x7f000000 /* Channel 19 Connection Label */ | 1465 | #define CL19 0x7f000000 /* Channel 19 Connection Label */ |
1682 | #define CIU19 0x80000000 /* Channel 19 In Use */ | 1466 | #define CIU19 0x80000000 /* Channel 19 In Use */ |
1683 | #define nCIU19 0x0 | ||
1684 | 1467 | ||
1685 | /* Bit masks for MXVR_ALLOC_5 */ | 1468 | /* Bit masks for MXVR_ALLOC_5 */ |
1686 | 1469 | ||
1687 | #define CL20 0x7f /* Channel 20 Connection Label */ | 1470 | #define CL20 0x7f /* Channel 20 Connection Label */ |
1688 | #define CIU20 0x80 /* Channel 20 In Use */ | 1471 | #define CIU20 0x80 /* Channel 20 In Use */ |
1689 | #define nCIU20 0x0 | ||
1690 | #define CL21 0x7f00 /* Channel 21 Connection Label */ | 1472 | #define CL21 0x7f00 /* Channel 21 Connection Label */ |
1691 | #define CIU21 0x8000 /* Channel 21 In Use */ | 1473 | #define CIU21 0x8000 /* Channel 21 In Use */ |
1692 | #define nCIU21 0x0 | ||
1693 | #define CL22 0x7f0000 /* Channel 22 Connection Label */ | 1474 | #define CL22 0x7f0000 /* Channel 22 Connection Label */ |
1694 | #define CIU22 0x800000 /* Channel 22 In Use */ | 1475 | #define CIU22 0x800000 /* Channel 22 In Use */ |
1695 | #define nCIU22 0x0 | ||
1696 | #define CL23 0x7f000000 /* Channel 23 Connection Label */ | 1476 | #define CL23 0x7f000000 /* Channel 23 Connection Label */ |
1697 | #define CIU23 0x80000000 /* Channel 23 In Use */ | 1477 | #define CIU23 0x80000000 /* Channel 23 In Use */ |
1698 | #define nCIU23 0x0 | ||
1699 | 1478 | ||
1700 | /* Bit masks for MXVR_ALLOC_6 */ | 1479 | /* Bit masks for MXVR_ALLOC_6 */ |
1701 | 1480 | ||
1702 | #define CL24 0x7f /* Channel 24 Connection Label */ | 1481 | #define CL24 0x7f /* Channel 24 Connection Label */ |
1703 | #define CIU24 0x80 /* Channel 24 In Use */ | 1482 | #define CIU24 0x80 /* Channel 24 In Use */ |
1704 | #define nCIU24 0x0 | ||
1705 | #define CL25 0x7f00 /* Channel 25 Connection Label */ | 1483 | #define CL25 0x7f00 /* Channel 25 Connection Label */ |
1706 | #define CIU25 0x8000 /* Channel 25 In Use */ | 1484 | #define CIU25 0x8000 /* Channel 25 In Use */ |
1707 | #define nCIU25 0x0 | ||
1708 | #define CL26 0x7f0000 /* Channel 26 Connection Label */ | 1485 | #define CL26 0x7f0000 /* Channel 26 Connection Label */ |
1709 | #define CIU26 0x800000 /* Channel 26 In Use */ | 1486 | #define CIU26 0x800000 /* Channel 26 In Use */ |
1710 | #define nCIU26 0x0 | ||
1711 | #define CL27 0x7f000000 /* Channel 27 Connection Label */ | 1487 | #define CL27 0x7f000000 /* Channel 27 Connection Label */ |
1712 | #define CIU27 0x80000000 /* Channel 27 In Use */ | 1488 | #define CIU27 0x80000000 /* Channel 27 In Use */ |
1713 | #define nCIU27 0x0 | ||
1714 | 1489 | ||
1715 | /* Bit masks for MXVR_ALLOC_7 */ | 1490 | /* Bit masks for MXVR_ALLOC_7 */ |
1716 | 1491 | ||
1717 | #define CL28 0x7f /* Channel 28 Connection Label */ | 1492 | #define CL28 0x7f /* Channel 28 Connection Label */ |
1718 | #define CIU28 0x80 /* Channel 28 In Use */ | 1493 | #define CIU28 0x80 /* Channel 28 In Use */ |
1719 | #define nCIU28 0x0 | ||
1720 | #define CL29 0x7f00 /* Channel 29 Connection Label */ | 1494 | #define CL29 0x7f00 /* Channel 29 Connection Label */ |
1721 | #define CIU29 0x8000 /* Channel 29 In Use */ | 1495 | #define CIU29 0x8000 /* Channel 29 In Use */ |
1722 | #define nCIU29 0x0 | ||
1723 | #define CL30 0x7f0000 /* Channel 30 Connection Label */ | 1496 | #define CL30 0x7f0000 /* Channel 30 Connection Label */ |
1724 | #define CIU30 0x800000 /* Channel 30 In Use */ | 1497 | #define CIU30 0x800000 /* Channel 30 In Use */ |
1725 | #define nCIU30 0x0 | ||
1726 | #define CL31 0x7f000000 /* Channel 31 Connection Label */ | 1498 | #define CL31 0x7f000000 /* Channel 31 Connection Label */ |
1727 | #define CIU31 0x80000000 /* Channel 31 In Use */ | 1499 | #define CIU31 0x80000000 /* Channel 31 In Use */ |
1728 | #define nCIU31 0x0 | ||
1729 | 1500 | ||
1730 | /* Bit masks for MXVR_ALLOC_8 */ | 1501 | /* Bit masks for MXVR_ALLOC_8 */ |
1731 | 1502 | ||
1732 | #define CL32 0x7f /* Channel 32 Connection Label */ | 1503 | #define CL32 0x7f /* Channel 32 Connection Label */ |
1733 | #define CIU32 0x80 /* Channel 32 In Use */ | 1504 | #define CIU32 0x80 /* Channel 32 In Use */ |
1734 | #define nCIU32 0x0 | ||
1735 | #define CL33 0x7f00 /* Channel 33 Connection Label */ | 1505 | #define CL33 0x7f00 /* Channel 33 Connection Label */ |
1736 | #define CIU33 0x8000 /* Channel 33 In Use */ | 1506 | #define CIU33 0x8000 /* Channel 33 In Use */ |
1737 | #define nCIU33 0x0 | ||
1738 | #define CL34 0x7f0000 /* Channel 34 Connection Label */ | 1507 | #define CL34 0x7f0000 /* Channel 34 Connection Label */ |
1739 | #define CIU34 0x800000 /* Channel 34 In Use */ | 1508 | #define CIU34 0x800000 /* Channel 34 In Use */ |
1740 | #define nCIU34 0x0 | ||
1741 | #define CL35 0x7f000000 /* Channel 35 Connection Label */ | 1509 | #define CL35 0x7f000000 /* Channel 35 Connection Label */ |
1742 | #define CIU35 0x80000000 /* Channel 35 In Use */ | 1510 | #define CIU35 0x80000000 /* Channel 35 In Use */ |
1743 | #define nCIU35 0x0 | ||
1744 | 1511 | ||
1745 | /* Bit masks for MXVR_ALLOC_9 */ | 1512 | /* Bit masks for MXVR_ALLOC_9 */ |
1746 | 1513 | ||
1747 | #define CL36 0x7f /* Channel 36 Connection Label */ | 1514 | #define CL36 0x7f /* Channel 36 Connection Label */ |
1748 | #define CIU36 0x80 /* Channel 36 In Use */ | 1515 | #define CIU36 0x80 /* Channel 36 In Use */ |
1749 | #define nCIU36 0x0 | ||
1750 | #define CL37 0x7f00 /* Channel 37 Connection Label */ | 1516 | #define CL37 0x7f00 /* Channel 37 Connection Label */ |
1751 | #define CIU37 0x8000 /* Channel 37 In Use */ | 1517 | #define CIU37 0x8000 /* Channel 37 In Use */ |
1752 | #define nCIU37 0x0 | ||
1753 | #define CL38 0x7f0000 /* Channel 38 Connection Label */ | 1518 | #define CL38 0x7f0000 /* Channel 38 Connection Label */ |
1754 | #define CIU38 0x800000 /* Channel 38 In Use */ | 1519 | #define CIU38 0x800000 /* Channel 38 In Use */ |
1755 | #define nCIU38 0x0 | ||
1756 | #define CL39 0x7f000000 /* Channel 39 Connection Label */ | 1520 | #define CL39 0x7f000000 /* Channel 39 Connection Label */ |
1757 | #define CIU39 0x80000000 /* Channel 39 In Use */ | 1521 | #define CIU39 0x80000000 /* Channel 39 In Use */ |
1758 | #define nCIU39 0x0 | ||
1759 | 1522 | ||
1760 | /* Bit masks for MXVR_ALLOC_10 */ | 1523 | /* Bit masks for MXVR_ALLOC_10 */ |
1761 | 1524 | ||
1762 | #define CL40 0x7f /* Channel 40 Connection Label */ | 1525 | #define CL40 0x7f /* Channel 40 Connection Label */ |
1763 | #define CIU40 0x80 /* Channel 40 In Use */ | 1526 | #define CIU40 0x80 /* Channel 40 In Use */ |
1764 | #define nCIU40 0x0 | ||
1765 | #define CL41 0x7f00 /* Channel 41 Connection Label */ | 1527 | #define CL41 0x7f00 /* Channel 41 Connection Label */ |
1766 | #define CIU41 0x8000 /* Channel 41 In Use */ | 1528 | #define CIU41 0x8000 /* Channel 41 In Use */ |
1767 | #define nCIU41 0x0 | ||
1768 | #define CL42 0x7f0000 /* Channel 42 Connection Label */ | 1529 | #define CL42 0x7f0000 /* Channel 42 Connection Label */ |
1769 | #define CIU42 0x800000 /* Channel 42 In Use */ | 1530 | #define CIU42 0x800000 /* Channel 42 In Use */ |
1770 | #define nCIU42 0x0 | ||
1771 | #define CL43 0x7f000000 /* Channel 43 Connection Label */ | 1531 | #define CL43 0x7f000000 /* Channel 43 Connection Label */ |
1772 | #define CIU43 0x80000000 /* Channel 43 In Use */ | 1532 | #define CIU43 0x80000000 /* Channel 43 In Use */ |
1773 | #define nCIU43 0x0 | ||
1774 | 1533 | ||
1775 | /* Bit masks for MXVR_ALLOC_11 */ | 1534 | /* Bit masks for MXVR_ALLOC_11 */ |
1776 | 1535 | ||
1777 | #define CL44 0x7f /* Channel 44 Connection Label */ | 1536 | #define CL44 0x7f /* Channel 44 Connection Label */ |
1778 | #define CIU44 0x80 /* Channel 44 In Use */ | 1537 | #define CIU44 0x80 /* Channel 44 In Use */ |
1779 | #define nCIU44 0x0 | ||
1780 | #define CL45 0x7f00 /* Channel 45 Connection Label */ | 1538 | #define CL45 0x7f00 /* Channel 45 Connection Label */ |
1781 | #define CIU45 0x8000 /* Channel 45 In Use */ | 1539 | #define CIU45 0x8000 /* Channel 45 In Use */ |
1782 | #define nCIU45 0x0 | ||
1783 | #define CL46 0x7f0000 /* Channel 46 Connection Label */ | 1540 | #define CL46 0x7f0000 /* Channel 46 Connection Label */ |
1784 | #define CIU46 0x800000 /* Channel 46 In Use */ | 1541 | #define CIU46 0x800000 /* Channel 46 In Use */ |
1785 | #define nCIU46 0x0 | ||
1786 | #define CL47 0x7f000000 /* Channel 47 Connection Label */ | 1542 | #define CL47 0x7f000000 /* Channel 47 Connection Label */ |
1787 | #define CIU47 0x80000000 /* Channel 47 In Use */ | 1543 | #define CIU47 0x80000000 /* Channel 47 In Use */ |
1788 | #define nCIU47 0x0 | ||
1789 | 1544 | ||
1790 | /* Bit masks for MXVR_ALLOC_12 */ | 1545 | /* Bit masks for MXVR_ALLOC_12 */ |
1791 | 1546 | ||
1792 | #define CL48 0x7f /* Channel 48 Connection Label */ | 1547 | #define CL48 0x7f /* Channel 48 Connection Label */ |
1793 | #define CIU48 0x80 /* Channel 48 In Use */ | 1548 | #define CIU48 0x80 /* Channel 48 In Use */ |
1794 | #define nCIU48 0x0 | ||
1795 | #define CL49 0x7f00 /* Channel 49 Connection Label */ | 1549 | #define CL49 0x7f00 /* Channel 49 Connection Label */ |
1796 | #define CIU49 0x8000 /* Channel 49 In Use */ | 1550 | #define CIU49 0x8000 /* Channel 49 In Use */ |
1797 | #define nCIU49 0x0 | ||
1798 | #define CL50 0x7f0000 /* Channel 50 Connection Label */ | 1551 | #define CL50 0x7f0000 /* Channel 50 Connection Label */ |
1799 | #define CIU50 0x800000 /* Channel 50 In Use */ | 1552 | #define CIU50 0x800000 /* Channel 50 In Use */ |
1800 | #define nCIU50 0x0 | ||
1801 | #define CL51 0x7f000000 /* Channel 51 Connection Label */ | 1553 | #define CL51 0x7f000000 /* Channel 51 Connection Label */ |
1802 | #define CIU51 0x80000000 /* Channel 51 In Use */ | 1554 | #define CIU51 0x80000000 /* Channel 51 In Use */ |
1803 | #define nCIU51 0x0 | ||
1804 | 1555 | ||
1805 | /* Bit masks for MXVR_ALLOC_13 */ | 1556 | /* Bit masks for MXVR_ALLOC_13 */ |
1806 | 1557 | ||
1807 | #define CL52 0x7f /* Channel 52 Connection Label */ | 1558 | #define CL52 0x7f /* Channel 52 Connection Label */ |
1808 | #define CIU52 0x80 /* Channel 52 In Use */ | 1559 | #define CIU52 0x80 /* Channel 52 In Use */ |
1809 | #define nCIU52 0x0 | ||
1810 | #define CL53 0x7f00 /* Channel 53 Connection Label */ | 1560 | #define CL53 0x7f00 /* Channel 53 Connection Label */ |
1811 | #define CIU53 0x8000 /* Channel 53 In Use */ | 1561 | #define CIU53 0x8000 /* Channel 53 In Use */ |
1812 | #define nCIU53 0x0 | ||
1813 | #define CL54 0x7f0000 /* Channel 54 Connection Label */ | 1562 | #define CL54 0x7f0000 /* Channel 54 Connection Label */ |
1814 | #define CIU54 0x800000 /* Channel 54 In Use */ | 1563 | #define CIU54 0x800000 /* Channel 54 In Use */ |
1815 | #define nCIU54 0x0 | ||
1816 | #define CL55 0x7f000000 /* Channel 55 Connection Label */ | 1564 | #define CL55 0x7f000000 /* Channel 55 Connection Label */ |
1817 | #define CIU55 0x80000000 /* Channel 55 In Use */ | 1565 | #define CIU55 0x80000000 /* Channel 55 In Use */ |
1818 | #define nCIU55 0x0 | ||
1819 | 1566 | ||
1820 | /* Bit masks for MXVR_ALLOC_14 */ | 1567 | /* Bit masks for MXVR_ALLOC_14 */ |
1821 | 1568 | ||
1822 | #define CL56 0x7f /* Channel 56 Connection Label */ | 1569 | #define CL56 0x7f /* Channel 56 Connection Label */ |
1823 | #define CIU56 0x80 /* Channel 56 In Use */ | 1570 | #define CIU56 0x80 /* Channel 56 In Use */ |
1824 | #define nCIU56 0x0 | ||
1825 | #define CL57 0x7f00 /* Channel 57 Connection Label */ | 1571 | #define CL57 0x7f00 /* Channel 57 Connection Label */ |
1826 | #define CIU57 0x8000 /* Channel 57 In Use */ | 1572 | #define CIU57 0x8000 /* Channel 57 In Use */ |
1827 | #define nCIU57 0x0 | ||
1828 | #define CL58 0x7f0000 /* Channel 58 Connection Label */ | 1573 | #define CL58 0x7f0000 /* Channel 58 Connection Label */ |
1829 | #define CIU58 0x800000 /* Channel 58 In Use */ | 1574 | #define CIU58 0x800000 /* Channel 58 In Use */ |
1830 | #define nCIU58 0x0 | ||
1831 | #define CL59 0x7f000000 /* Channel 59 Connection Label */ | 1575 | #define CL59 0x7f000000 /* Channel 59 Connection Label */ |
1832 | #define CIU59 0x80000000 /* Channel 59 In Use */ | 1576 | #define CIU59 0x80000000 /* Channel 59 In Use */ |
1833 | #define nCIU59 0x0 | ||
1834 | 1577 | ||
1835 | /* MXVR_SYNC_LCHAN_0 Masks */ | 1578 | /* MXVR_SYNC_LCHAN_0 Masks */ |
1836 | 1579 | ||
@@ -1926,19 +1669,13 @@ | |||
1926 | /* Bit masks for MXVR_DMAx_CONFIG */ | 1669 | /* Bit masks for MXVR_DMAx_CONFIG */ |
1927 | 1670 | ||
1928 | #define MDMAEN 0x1 /* DMA Channel Enable */ | 1671 | #define MDMAEN 0x1 /* DMA Channel Enable */ |
1929 | #define nMDMAEN 0x0 | ||
1930 | #define DD 0x2 /* DMA Channel Direction */ | 1672 | #define DD 0x2 /* DMA Channel Direction */ |
1931 | #define nDD 0x0 | ||
1932 | #define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */ | 1673 | #define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */ |
1933 | #define nBY4SWAPEN 0x0 | ||
1934 | #define LCHAN 0x3c0 /* DMA Channel Logical Channel */ | 1674 | #define LCHAN 0x3c0 /* DMA Channel Logical Channel */ |
1935 | #define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */ | 1675 | #define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */ |
1936 | #define nBITSWAPEN 0x0 | ||
1937 | #define BY2SWAPEN 0x800 /* DMA Channel Two Byte Swap Enable */ | 1676 | #define BY2SWAPEN 0x800 /* DMA Channel Two Byte Swap Enable */ |
1938 | #define nBY2SWAPEN 0x0 | ||
1939 | #define MFLOW 0x7000 /* DMA Channel Operation Flow */ | 1677 | #define MFLOW 0x7000 /* DMA Channel Operation Flow */ |
1940 | #define FIXEDPM 0x80000 /* DMA Channel Fixed Pattern Matching Select */ | 1678 | #define FIXEDPM 0x80000 /* DMA Channel Fixed Pattern Matching Select */ |
1941 | #define nFIXEDPM 0x0 | ||
1942 | #define STARTPAT 0x300000 /* DMA Channel Start Pattern Select */ | 1679 | #define STARTPAT 0x300000 /* DMA Channel Start Pattern Select */ |
1943 | #define STOPPAT 0xc00000 /* DMA Channel Stop Pattern Select */ | 1680 | #define STOPPAT 0xc00000 /* DMA Channel Stop Pattern Select */ |
1944 | #define COUNTPOS 0x1c000000 /* DMA Channel Count Position */ | 1681 | #define COUNTPOS 0x1c000000 /* DMA Channel Count Position */ |
@@ -1946,94 +1683,71 @@ | |||
1946 | /* Bit masks for MXVR_AP_CTL */ | 1683 | /* Bit masks for MXVR_AP_CTL */ |
1947 | 1684 | ||
1948 | #define STARTAP 0x1 /* Start Asynchronous Packet Transmission */ | 1685 | #define STARTAP 0x1 /* Start Asynchronous Packet Transmission */ |
1949 | #define nSTARTAP 0x0 | ||
1950 | #define CANCELAP 0x2 /* Cancel Asynchronous Packet Transmission */ | 1686 | #define CANCELAP 0x2 /* Cancel Asynchronous Packet Transmission */ |
1951 | #define nCANCELAP 0x0 | ||
1952 | #define RESETAP 0x4 /* Reset Asynchronous Packet Arbitration */ | 1687 | #define RESETAP 0x4 /* Reset Asynchronous Packet Arbitration */ |
1953 | #define nRESETAP 0x0 | ||
1954 | #define APRBE0 0x4000 /* Asynchronous Packet Receive Buffer Entry 0 */ | 1688 | #define APRBE0 0x4000 /* Asynchronous Packet Receive Buffer Entry 0 */ |
1955 | #define nAPRBE0 0x0 | ||
1956 | #define APRBE1 0x8000 /* Asynchronous Packet Receive Buffer Entry 1 */ | 1689 | #define APRBE1 0x8000 /* Asynchronous Packet Receive Buffer Entry 1 */ |
1957 | #define nAPRBE1 0x0 | ||
1958 | 1690 | ||
1959 | /* Bit masks for MXVR_APRB_START_ADDR */ | 1691 | /* Bit masks for MXVR_APRB_START_ADDR */ |
1960 | 1692 | ||
1961 | #define MXVR_APRB_START_ADDR 0x1fffffe /* Asynchronous Packet Receive Buffer Start Address */ | 1693 | #define MXVR_APRB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Receive Buffer Start Address */ |
1962 | 1694 | ||
1963 | /* Bit masks for MXVR_APRB_CURR_ADDR */ | 1695 | /* Bit masks for MXVR_APRB_CURR_ADDR */ |
1964 | 1696 | ||
1965 | #define MXVR_APRB_CURR_ADDR 0xffffffff /* Asynchronous Packet Receive Buffer Current Address */ | 1697 | #define MXVR_APRB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Receive Buffer Current Address */ |
1966 | 1698 | ||
1967 | /* Bit masks for MXVR_APTB_START_ADDR */ | 1699 | /* Bit masks for MXVR_APTB_START_ADDR */ |
1968 | 1700 | ||
1969 | #define MXVR_APTB_START_ADDR 0x1fffffe /* Asynchronous Packet Transmit Buffer Start Address */ | 1701 | #define MXVR_APTB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Transmit Buffer Start Address */ |
1970 | 1702 | ||
1971 | /* Bit masks for MXVR_APTB_CURR_ADDR */ | 1703 | /* Bit masks for MXVR_APTB_CURR_ADDR */ |
1972 | 1704 | ||
1973 | #define MXVR_APTB_CURR_ADDR 0xffffffff /* Asynchronous Packet Transmit Buffer Current Address */ | 1705 | #define MXVR_APTB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Transmit Buffer Current Address */ |
1974 | 1706 | ||
1975 | /* Bit masks for MXVR_CM_CTL */ | 1707 | /* Bit masks for MXVR_CM_CTL */ |
1976 | 1708 | ||
1977 | #define STARTCM 0x1 /* Start Control Message Transmission */ | 1709 | #define STARTCM 0x1 /* Start Control Message Transmission */ |
1978 | #define nSTARTCM 0x0 | ||
1979 | #define CANCELCM 0x2 /* Cancel Control Message Transmission */ | 1710 | #define CANCELCM 0x2 /* Cancel Control Message Transmission */ |
1980 | #define nCANCELCM 0x0 | ||
1981 | #define CMRBE0 0x10000 /* Control Message Receive Buffer Entry 0 */ | 1711 | #define CMRBE0 0x10000 /* Control Message Receive Buffer Entry 0 */ |
1982 | #define nCMRBE0 0x0 | ||
1983 | #define CMRBE1 0x20000 /* Control Message Receive Buffer Entry 1 */ | 1712 | #define CMRBE1 0x20000 /* Control Message Receive Buffer Entry 1 */ |
1984 | #define nCMRBE1 0x0 | ||
1985 | #define CMRBE2 0x40000 /* Control Message Receive Buffer Entry 2 */ | 1713 | #define CMRBE2 0x40000 /* Control Message Receive Buffer Entry 2 */ |
1986 | #define nCMRBE2 0x0 | ||
1987 | #define CMRBE3 0x80000 /* Control Message Receive Buffer Entry 3 */ | 1714 | #define CMRBE3 0x80000 /* Control Message Receive Buffer Entry 3 */ |
1988 | #define nCMRBE3 0x0 | ||
1989 | #define CMRBE4 0x100000 /* Control Message Receive Buffer Entry 4 */ | 1715 | #define CMRBE4 0x100000 /* Control Message Receive Buffer Entry 4 */ |
1990 | #define nCMRBE4 0x0 | ||
1991 | #define CMRBE5 0x200000 /* Control Message Receive Buffer Entry 5 */ | 1716 | #define CMRBE5 0x200000 /* Control Message Receive Buffer Entry 5 */ |
1992 | #define nCMRBE5 0x0 | ||
1993 | #define CMRBE6 0x400000 /* Control Message Receive Buffer Entry 6 */ | 1717 | #define CMRBE6 0x400000 /* Control Message Receive Buffer Entry 6 */ |
1994 | #define nCMRBE6 0x0 | ||
1995 | #define CMRBE7 0x800000 /* Control Message Receive Buffer Entry 7 */ | 1718 | #define CMRBE7 0x800000 /* Control Message Receive Buffer Entry 7 */ |
1996 | #define nCMRBE7 0x0 | ||
1997 | #define CMRBE8 0x1000000 /* Control Message Receive Buffer Entry 8 */ | 1719 | #define CMRBE8 0x1000000 /* Control Message Receive Buffer Entry 8 */ |
1998 | #define nCMRBE8 0x0 | ||
1999 | #define CMRBE9 0x2000000 /* Control Message Receive Buffer Entry 9 */ | 1720 | #define CMRBE9 0x2000000 /* Control Message Receive Buffer Entry 9 */ |
2000 | #define nCMRBE9 0x0 | ||
2001 | #define CMRBE10 0x4000000 /* Control Message Receive Buffer Entry 10 */ | 1721 | #define CMRBE10 0x4000000 /* Control Message Receive Buffer Entry 10 */ |
2002 | #define nCMRBE10 0x0 | ||
2003 | #define CMRBE11 0x8000000 /* Control Message Receive Buffer Entry 11 */ | 1722 | #define CMRBE11 0x8000000 /* Control Message Receive Buffer Entry 11 */ |
2004 | #define nCMRBE11 0x0 | ||
2005 | #define CMRBE12 0x10000000 /* Control Message Receive Buffer Entry 12 */ | 1723 | #define CMRBE12 0x10000000 /* Control Message Receive Buffer Entry 12 */ |
2006 | #define nCMRBE12 0x0 | ||
2007 | #define CMRBE13 0x20000000 /* Control Message Receive Buffer Entry 13 */ | 1724 | #define CMRBE13 0x20000000 /* Control Message Receive Buffer Entry 13 */ |
2008 | #define nCMRBE13 0x0 | ||
2009 | #define CMRBE14 0x40000000 /* Control Message Receive Buffer Entry 14 */ | 1725 | #define CMRBE14 0x40000000 /* Control Message Receive Buffer Entry 14 */ |
2010 | #define nCMRBE14 0x0 | ||
2011 | #define CMRBE15 0x80000000 /* Control Message Receive Buffer Entry 15 */ | 1726 | #define CMRBE15 0x80000000 /* Control Message Receive Buffer Entry 15 */ |
2012 | #define nCMRBE15 0x0 | ||
2013 | 1727 | ||
2014 | /* Bit masks for MXVR_CMRB_START_ADDR */ | 1728 | /* Bit masks for MXVR_CMRB_START_ADDR */ |
2015 | 1729 | ||
2016 | #define MXVR_CMRB_START_ADDR 0x1fffffe /* Control Message Receive Buffer Start Address */ | 1730 | #define MXVR_CMRB_START_ADDR_MASK 0x1fffffe /* Control Message Receive Buffer Start Address */ |
2017 | 1731 | ||
2018 | /* Bit masks for MXVR_CMRB_CURR_ADDR */ | 1732 | /* Bit masks for MXVR_CMRB_CURR_ADDR */ |
2019 | 1733 | ||
2020 | #define MXVR_CMRB_CURR_ADDR 0xffffffff /* Control Message Receive Buffer Current Address */ | 1734 | #define MXVR_CMRB_CURR_ADDR_MASK 0xffffffff /* Control Message Receive Buffer Current Address */ |
2021 | 1735 | ||
2022 | /* Bit masks for MXVR_CMTB_START_ADDR */ | 1736 | /* Bit masks for MXVR_CMTB_START_ADDR */ |
2023 | 1737 | ||
2024 | #define MXVR_CMTB_START_ADDR 0x1fffffe /* Control Message Transmit Buffer Start Address */ | 1738 | #define MXVR_CMTB_START_ADDR_MASK 0x1fffffe /* Control Message Transmit Buffer Start Address */ |
2025 | 1739 | ||
2026 | /* Bit masks for MXVR_CMTB_CURR_ADDR */ | 1740 | /* Bit masks for MXVR_CMTB_CURR_ADDR */ |
2027 | 1741 | ||
2028 | #define MXVR_CMTB_CURR_ADDR 0xffffffff /* Control Message Transmit Buffer Current Address */ | 1742 | #define MXVR_CMTB_CURR_ADDR_MASK 0xffffffff /* Control Message Transmit Buffer Current Address */ |
2029 | 1743 | ||
2030 | /* Bit masks for MXVR_RRDB_START_ADDR */ | 1744 | /* Bit masks for MXVR_RRDB_START_ADDR */ |
2031 | 1745 | ||
2032 | #define MXVR_RRDB_START_ADDR 0x1fffffe /* Remote Read Buffer Start Address */ | 1746 | #define MXVR_RRDB_START_ADDR_MASK 0x1fffffe /* Remote Read Buffer Start Address */ |
2033 | 1747 | ||
2034 | /* Bit masks for MXVR_RRDB_CURR_ADDR */ | 1748 | /* Bit masks for MXVR_RRDB_CURR_ADDR */ |
2035 | 1749 | ||
2036 | #define MXVR_RRDB_CURR_ADDR 0xffffffff /* Remote Read Buffer Current Address */ | 1750 | #define MXVR_RRDB_CURR_ADDR_MASK 0xffffffff /* Remote Read Buffer Current Address */ |
2037 | 1751 | ||
2038 | /* Bit masks for MXVR_PAT_DATAx */ | 1752 | /* Bit masks for MXVR_PAT_DATAx */ |
2039 | 1753 | ||
@@ -2045,136 +1759,72 @@ | |||
2045 | /* Bit masks for MXVR_PAT_EN_0 */ | 1759 | /* Bit masks for MXVR_PAT_EN_0 */ |
2046 | 1760 | ||
2047 | #define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */ | 1761 | #define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */ |
2048 | #define nMATCH_EN_0_0 0x0 | ||
2049 | #define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */ | 1762 | #define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */ |
2050 | #define nMATCH_EN_0_1 0x0 | ||
2051 | #define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */ | 1763 | #define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */ |
2052 | #define nMATCH_EN_0_2 0x0 | ||
2053 | #define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */ | 1764 | #define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */ |
2054 | #define nMATCH_EN_0_3 0x0 | ||
2055 | #define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */ | 1765 | #define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */ |
2056 | #define nMATCH_EN_0_4 0x0 | ||
2057 | #define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */ | 1766 | #define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */ |
2058 | #define nMATCH_EN_0_5 0x0 | ||
2059 | #define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */ | 1767 | #define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */ |
2060 | #define nMATCH_EN_0_6 0x0 | ||
2061 | #define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */ | 1768 | #define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */ |
2062 | #define nMATCH_EN_0_7 0x0 | ||
2063 | #define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */ | 1769 | #define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */ |
2064 | #define nMATCH_EN_1_0 0x0 | ||
2065 | #define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */ | 1770 | #define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */ |
2066 | #define nMATCH_EN_1_1 0x0 | ||
2067 | #define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */ | 1771 | #define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */ |
2068 | #define nMATCH_EN_1_2 0x0 | ||
2069 | #define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */ | 1772 | #define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */ |
2070 | #define nMATCH_EN_1_3 0x0 | ||
2071 | #define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */ | 1773 | #define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */ |
2072 | #define nMATCH_EN_1_4 0x0 | ||
2073 | #define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */ | 1774 | #define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */ |
2074 | #define nMATCH_EN_1_5 0x0 | ||
2075 | #define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */ | 1775 | #define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */ |
2076 | #define nMATCH_EN_1_6 0x0 | ||
2077 | #define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */ | 1776 | #define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */ |
2078 | #define nMATCH_EN_1_7 0x0 | ||
2079 | #define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */ | 1777 | #define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */ |
2080 | #define nMATCH_EN_2_0 0x0 | ||
2081 | #define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */ | 1778 | #define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */ |
2082 | #define nMATCH_EN_2_1 0x0 | ||
2083 | #define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */ | 1779 | #define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */ |
2084 | #define nMATCH_EN_2_2 0x0 | ||
2085 | #define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */ | 1780 | #define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */ |
2086 | #define nMATCH_EN_2_3 0x0 | ||
2087 | #define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */ | 1781 | #define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */ |
2088 | #define nMATCH_EN_2_4 0x0 | ||
2089 | #define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */ | 1782 | #define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */ |
2090 | #define nMATCH_EN_2_5 0x0 | ||
2091 | #define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */ | 1783 | #define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */ |
2092 | #define nMATCH_EN_2_6 0x0 | ||
2093 | #define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */ | 1784 | #define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */ |
2094 | #define nMATCH_EN_2_7 0x0 | ||
2095 | #define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */ | 1785 | #define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */ |
2096 | #define nMATCH_EN_3_0 0x0 | ||
2097 | #define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */ | 1786 | #define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */ |
2098 | #define nMATCH_EN_3_1 0x0 | ||
2099 | #define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */ | 1787 | #define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */ |
2100 | #define nMATCH_EN_3_2 0x0 | ||
2101 | #define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */ | 1788 | #define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */ |
2102 | #define nMATCH_EN_3_3 0x0 | ||
2103 | #define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */ | 1789 | #define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */ |
2104 | #define nMATCH_EN_3_4 0x0 | ||
2105 | #define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */ | 1790 | #define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */ |
2106 | #define nMATCH_EN_3_5 0x0 | ||
2107 | #define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */ | 1791 | #define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */ |
2108 | #define nMATCH_EN_3_6 0x0 | ||
2109 | #define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */ | 1792 | #define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */ |
2110 | #define nMATCH_EN_3_7 0x0 | ||
2111 | 1793 | ||
2112 | /* Bit masks for MXVR_PAT_EN_1 */ | 1794 | /* Bit masks for MXVR_PAT_EN_1 */ |
2113 | 1795 | ||
2114 | #define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */ | 1796 | #define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */ |
2115 | #define nMATCH_EN_0_0 0x0 | ||
2116 | #define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */ | 1797 | #define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */ |
2117 | #define nMATCH_EN_0_1 0x0 | ||
2118 | #define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */ | 1798 | #define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */ |
2119 | #define nMATCH_EN_0_2 0x0 | ||
2120 | #define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */ | 1799 | #define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */ |
2121 | #define nMATCH_EN_0_3 0x0 | ||
2122 | #define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */ | 1800 | #define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */ |
2123 | #define nMATCH_EN_0_4 0x0 | ||
2124 | #define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */ | 1801 | #define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */ |
2125 | #define nMATCH_EN_0_5 0x0 | ||
2126 | #define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */ | 1802 | #define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */ |
2127 | #define nMATCH_EN_0_6 0x0 | ||
2128 | #define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */ | 1803 | #define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */ |
2129 | #define nMATCH_EN_0_7 0x0 | ||
2130 | #define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */ | 1804 | #define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */ |
2131 | #define nMATCH_EN_1_0 0x0 | ||
2132 | #define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */ | 1805 | #define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */ |
2133 | #define nMATCH_EN_1_1 0x0 | ||
2134 | #define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */ | 1806 | #define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */ |
2135 | #define nMATCH_EN_1_2 0x0 | ||
2136 | #define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */ | 1807 | #define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */ |
2137 | #define nMATCH_EN_1_3 0x0 | ||
2138 | #define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */ | 1808 | #define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */ |
2139 | #define nMATCH_EN_1_4 0x0 | ||
2140 | #define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */ | 1809 | #define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */ |
2141 | #define nMATCH_EN_1_5 0x0 | ||
2142 | #define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */ | 1810 | #define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */ |
2143 | #define nMATCH_EN_1_6 0x0 | ||
2144 | #define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */ | 1811 | #define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */ |
2145 | #define nMATCH_EN_1_7 0x0 | ||
2146 | #define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */ | 1812 | #define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */ |
2147 | #define nMATCH_EN_2_0 0x0 | ||
2148 | #define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */ | 1813 | #define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */ |
2149 | #define nMATCH_EN_2_1 0x0 | ||
2150 | #define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */ | 1814 | #define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */ |
2151 | #define nMATCH_EN_2_2 0x0 | ||
2152 | #define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */ | 1815 | #define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */ |
2153 | #define nMATCH_EN_2_3 0x0 | ||
2154 | #define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */ | 1816 | #define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */ |
2155 | #define nMATCH_EN_2_4 0x0 | ||
2156 | #define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */ | 1817 | #define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */ |
2157 | #define nMATCH_EN_2_5 0x0 | ||
2158 | #define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */ | 1818 | #define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */ |
2159 | #define nMATCH_EN_2_6 0x0 | ||
2160 | #define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */ | 1819 | #define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */ |
2161 | #define nMATCH_EN_2_7 0x0 | ||
2162 | #define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */ | 1820 | #define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */ |
2163 | #define nMATCH_EN_3_0 0x0 | ||
2164 | #define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */ | 1821 | #define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */ |
2165 | #define nMATCH_EN_3_1 0x0 | ||
2166 | #define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */ | 1822 | #define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */ |
2167 | #define nMATCH_EN_3_2 0x0 | ||
2168 | #define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */ | 1823 | #define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */ |
2169 | #define nMATCH_EN_3_3 0x0 | ||
2170 | #define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */ | 1824 | #define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */ |
2171 | #define nMATCH_EN_3_4 0x0 | ||
2172 | #define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */ | 1825 | #define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */ |
2173 | #define nMATCH_EN_3_5 0x0 | ||
2174 | #define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */ | 1826 | #define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */ |
2175 | #define nMATCH_EN_3_6 0x0 | ||
2176 | #define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */ | 1827 | #define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */ |
2177 | #define nMATCH_EN_3_7 0x0 | ||
2178 | 1828 | ||
2179 | /* Bit masks for MXVR_FRAME_CNT_0 */ | 1829 | /* Bit masks for MXVR_FRAME_CNT_0 */ |
2180 | 1830 | ||
@@ -2188,226 +1838,166 @@ | |||
2188 | 1838 | ||
2189 | #define TX_CH0 0x3f /* Transmit Channel 0 */ | 1839 | #define TX_CH0 0x3f /* Transmit Channel 0 */ |
2190 | #define MUTE_CH0 0x80 /* Mute Channel 0 */ | 1840 | #define MUTE_CH0 0x80 /* Mute Channel 0 */ |
2191 | #define nMUTE_CH0 0x0 | ||
2192 | #define TX_CH1 0x3f00 /* Transmit Channel 0 */ | 1841 | #define TX_CH1 0x3f00 /* Transmit Channel 0 */ |
2193 | #define MUTE_CH1 0x8000 /* Mute Channel 0 */ | 1842 | #define MUTE_CH1 0x8000 /* Mute Channel 0 */ |
2194 | #define nMUTE_CH1 0x0 | ||
2195 | #define TX_CH2 0x3f0000 /* Transmit Channel 0 */ | 1843 | #define TX_CH2 0x3f0000 /* Transmit Channel 0 */ |
2196 | #define MUTE_CH2 0x800000 /* Mute Channel 0 */ | 1844 | #define MUTE_CH2 0x800000 /* Mute Channel 0 */ |
2197 | #define nMUTE_CH2 0x0 | ||
2198 | #define TX_CH3 0x3f000000 /* Transmit Channel 0 */ | 1845 | #define TX_CH3 0x3f000000 /* Transmit Channel 0 */ |
2199 | #define MUTE_CH3 0x80000000 /* Mute Channel 0 */ | 1846 | #define MUTE_CH3 0x80000000 /* Mute Channel 0 */ |
2200 | #define nMUTE_CH3 0x0 | ||
2201 | 1847 | ||
2202 | /* Bit masks for MXVR_ROUTING_1 */ | 1848 | /* Bit masks for MXVR_ROUTING_1 */ |
2203 | 1849 | ||
2204 | #define TX_CH4 0x3f /* Transmit Channel 4 */ | 1850 | #define TX_CH4 0x3f /* Transmit Channel 4 */ |
2205 | #define MUTE_CH4 0x80 /* Mute Channel 4 */ | 1851 | #define MUTE_CH4 0x80 /* Mute Channel 4 */ |
2206 | #define nMUTE_CH4 0x0 | ||
2207 | #define TX_CH5 0x3f00 /* Transmit Channel 5 */ | 1852 | #define TX_CH5 0x3f00 /* Transmit Channel 5 */ |
2208 | #define MUTE_CH5 0x8000 /* Mute Channel 5 */ | 1853 | #define MUTE_CH5 0x8000 /* Mute Channel 5 */ |
2209 | #define nMUTE_CH5 0x0 | ||
2210 | #define TX_CH6 0x3f0000 /* Transmit Channel 6 */ | 1854 | #define TX_CH6 0x3f0000 /* Transmit Channel 6 */ |
2211 | #define MUTE_CH6 0x800000 /* Mute Channel 6 */ | 1855 | #define MUTE_CH6 0x800000 /* Mute Channel 6 */ |
2212 | #define nMUTE_CH6 0x0 | ||
2213 | #define TX_CH7 0x3f000000 /* Transmit Channel 7 */ | 1856 | #define TX_CH7 0x3f000000 /* Transmit Channel 7 */ |
2214 | #define MUTE_CH7 0x80000000 /* Mute Channel 7 */ | 1857 | #define MUTE_CH7 0x80000000 /* Mute Channel 7 */ |
2215 | #define nMUTE_CH7 0x0 | ||
2216 | 1858 | ||
2217 | /* Bit masks for MXVR_ROUTING_2 */ | 1859 | /* Bit masks for MXVR_ROUTING_2 */ |
2218 | 1860 | ||
2219 | #define TX_CH8 0x3f /* Transmit Channel 8 */ | 1861 | #define TX_CH8 0x3f /* Transmit Channel 8 */ |
2220 | #define MUTE_CH8 0x80 /* Mute Channel 8 */ | 1862 | #define MUTE_CH8 0x80 /* Mute Channel 8 */ |
2221 | #define nMUTE_CH8 0x0 | ||
2222 | #define TX_CH9 0x3f00 /* Transmit Channel 9 */ | 1863 | #define TX_CH9 0x3f00 /* Transmit Channel 9 */ |
2223 | #define MUTE_CH9 0x8000 /* Mute Channel 9 */ | 1864 | #define MUTE_CH9 0x8000 /* Mute Channel 9 */ |
2224 | #define nMUTE_CH9 0x0 | ||
2225 | #define TX_CH10 0x3f0000 /* Transmit Channel 10 */ | 1865 | #define TX_CH10 0x3f0000 /* Transmit Channel 10 */ |
2226 | #define MUTE_CH10 0x800000 /* Mute Channel 10 */ | 1866 | #define MUTE_CH10 0x800000 /* Mute Channel 10 */ |
2227 | #define nMUTE_CH10 0x0 | ||
2228 | #define TX_CH11 0x3f000000 /* Transmit Channel 11 */ | 1867 | #define TX_CH11 0x3f000000 /* Transmit Channel 11 */ |
2229 | #define MUTE_CH11 0x80000000 /* Mute Channel 11 */ | 1868 | #define MUTE_CH11 0x80000000 /* Mute Channel 11 */ |
2230 | #define nMUTE_CH11 0x0 | ||
2231 | 1869 | ||
2232 | /* Bit masks for MXVR_ROUTING_3 */ | 1870 | /* Bit masks for MXVR_ROUTING_3 */ |
2233 | 1871 | ||
2234 | #define TX_CH12 0x3f /* Transmit Channel 12 */ | 1872 | #define TX_CH12 0x3f /* Transmit Channel 12 */ |
2235 | #define MUTE_CH12 0x80 /* Mute Channel 12 */ | 1873 | #define MUTE_CH12 0x80 /* Mute Channel 12 */ |
2236 | #define nMUTE_CH12 0x0 | ||
2237 | #define TX_CH13 0x3f00 /* Transmit Channel 13 */ | 1874 | #define TX_CH13 0x3f00 /* Transmit Channel 13 */ |
2238 | #define MUTE_CH13 0x8000 /* Mute Channel 13 */ | 1875 | #define MUTE_CH13 0x8000 /* Mute Channel 13 */ |
2239 | #define nMUTE_CH13 0x0 | ||
2240 | #define TX_CH14 0x3f0000 /* Transmit Channel 14 */ | 1876 | #define TX_CH14 0x3f0000 /* Transmit Channel 14 */ |
2241 | #define MUTE_CH14 0x800000 /* Mute Channel 14 */ | 1877 | #define MUTE_CH14 0x800000 /* Mute Channel 14 */ |
2242 | #define nMUTE_CH14 0x0 | ||
2243 | #define TX_CH15 0x3f000000 /* Transmit Channel 15 */ | 1878 | #define TX_CH15 0x3f000000 /* Transmit Channel 15 */ |
2244 | #define MUTE_CH15 0x80000000 /* Mute Channel 15 */ | 1879 | #define MUTE_CH15 0x80000000 /* Mute Channel 15 */ |
2245 | #define nMUTE_CH15 0x0 | ||
2246 | 1880 | ||
2247 | /* Bit masks for MXVR_ROUTING_4 */ | 1881 | /* Bit masks for MXVR_ROUTING_4 */ |
2248 | 1882 | ||
2249 | #define TX_CH16 0x3f /* Transmit Channel 16 */ | 1883 | #define TX_CH16 0x3f /* Transmit Channel 16 */ |
2250 | #define MUTE_CH16 0x80 /* Mute Channel 16 */ | 1884 | #define MUTE_CH16 0x80 /* Mute Channel 16 */ |
2251 | #define nMUTE_CH16 0x0 | ||
2252 | #define TX_CH17 0x3f00 /* Transmit Channel 17 */ | 1885 | #define TX_CH17 0x3f00 /* Transmit Channel 17 */ |
2253 | #define MUTE_CH17 0x8000 /* Mute Channel 17 */ | 1886 | #define MUTE_CH17 0x8000 /* Mute Channel 17 */ |
2254 | #define nMUTE_CH17 0x0 | ||
2255 | #define TX_CH18 0x3f0000 /* Transmit Channel 18 */ | 1887 | #define TX_CH18 0x3f0000 /* Transmit Channel 18 */ |
2256 | #define MUTE_CH18 0x800000 /* Mute Channel 18 */ | 1888 | #define MUTE_CH18 0x800000 /* Mute Channel 18 */ |
2257 | #define nMUTE_CH18 0x0 | ||
2258 | #define TX_CH19 0x3f000000 /* Transmit Channel 19 */ | 1889 | #define TX_CH19 0x3f000000 /* Transmit Channel 19 */ |
2259 | #define MUTE_CH19 0x80000000 /* Mute Channel 19 */ | 1890 | #define MUTE_CH19 0x80000000 /* Mute Channel 19 */ |
2260 | #define nMUTE_CH19 0x0 | ||
2261 | 1891 | ||
2262 | /* Bit masks for MXVR_ROUTING_5 */ | 1892 | /* Bit masks for MXVR_ROUTING_5 */ |
2263 | 1893 | ||
2264 | #define TX_CH20 0x3f /* Transmit Channel 20 */ | 1894 | #define TX_CH20 0x3f /* Transmit Channel 20 */ |
2265 | #define MUTE_CH20 0x80 /* Mute Channel 20 */ | 1895 | #define MUTE_CH20 0x80 /* Mute Channel 20 */ |
2266 | #define nMUTE_CH20 0x0 | ||
2267 | #define TX_CH21 0x3f00 /* Transmit Channel 21 */ | 1896 | #define TX_CH21 0x3f00 /* Transmit Channel 21 */ |
2268 | #define MUTE_CH21 0x8000 /* Mute Channel 21 */ | 1897 | #define MUTE_CH21 0x8000 /* Mute Channel 21 */ |
2269 | #define nMUTE_CH21 0x0 | ||
2270 | #define TX_CH22 0x3f0000 /* Transmit Channel 22 */ | 1898 | #define TX_CH22 0x3f0000 /* Transmit Channel 22 */ |
2271 | #define MUTE_CH22 0x800000 /* Mute Channel 22 */ | 1899 | #define MUTE_CH22 0x800000 /* Mute Channel 22 */ |
2272 | #define nMUTE_CH22 0x0 | ||
2273 | #define TX_CH23 0x3f000000 /* Transmit Channel 23 */ | 1900 | #define TX_CH23 0x3f000000 /* Transmit Channel 23 */ |
2274 | #define MUTE_CH23 0x80000000 /* Mute Channel 23 */ | 1901 | #define MUTE_CH23 0x80000000 /* Mute Channel 23 */ |
2275 | #define nMUTE_CH23 0x0 | ||
2276 | 1902 | ||
2277 | /* Bit masks for MXVR_ROUTING_6 */ | 1903 | /* Bit masks for MXVR_ROUTING_6 */ |
2278 | 1904 | ||
2279 | #define TX_CH24 0x3f /* Transmit Channel 24 */ | 1905 | #define TX_CH24 0x3f /* Transmit Channel 24 */ |
2280 | #define MUTE_CH24 0x80 /* Mute Channel 24 */ | 1906 | #define MUTE_CH24 0x80 /* Mute Channel 24 */ |
2281 | #define nMUTE_CH24 0x0 | ||
2282 | #define TX_CH25 0x3f00 /* Transmit Channel 25 */ | 1907 | #define TX_CH25 0x3f00 /* Transmit Channel 25 */ |
2283 | #define MUTE_CH25 0x8000 /* Mute Channel 25 */ | 1908 | #define MUTE_CH25 0x8000 /* Mute Channel 25 */ |
2284 | #define nMUTE_CH25 0x0 | ||
2285 | #define TX_CH26 0x3f0000 /* Transmit Channel 26 */ | 1909 | #define TX_CH26 0x3f0000 /* Transmit Channel 26 */ |
2286 | #define MUTE_CH26 0x800000 /* Mute Channel 26 */ | 1910 | #define MUTE_CH26 0x800000 /* Mute Channel 26 */ |
2287 | #define nMUTE_CH26 0x0 | ||
2288 | #define TX_CH27 0x3f000000 /* Transmit Channel 27 */ | 1911 | #define TX_CH27 0x3f000000 /* Transmit Channel 27 */ |
2289 | #define MUTE_CH27 0x80000000 /* Mute Channel 27 */ | 1912 | #define MUTE_CH27 0x80000000 /* Mute Channel 27 */ |
2290 | #define nMUTE_CH27 0x0 | ||
2291 | 1913 | ||
2292 | /* Bit masks for MXVR_ROUTING_7 */ | 1914 | /* Bit masks for MXVR_ROUTING_7 */ |
2293 | 1915 | ||
2294 | #define TX_CH28 0x3f /* Transmit Channel 28 */ | 1916 | #define TX_CH28 0x3f /* Transmit Channel 28 */ |
2295 | #define MUTE_CH28 0x80 /* Mute Channel 28 */ | 1917 | #define MUTE_CH28 0x80 /* Mute Channel 28 */ |
2296 | #define nMUTE_CH28 0x0 | ||
2297 | #define TX_CH29 0x3f00 /* Transmit Channel 29 */ | 1918 | #define TX_CH29 0x3f00 /* Transmit Channel 29 */ |
2298 | #define MUTE_CH29 0x8000 /* Mute Channel 29 */ | 1919 | #define MUTE_CH29 0x8000 /* Mute Channel 29 */ |
2299 | #define nMUTE_CH29 0x0 | ||
2300 | #define TX_CH30 0x3f0000 /* Transmit Channel 30 */ | 1920 | #define TX_CH30 0x3f0000 /* Transmit Channel 30 */ |
2301 | #define MUTE_CH30 0x800000 /* Mute Channel 30 */ | 1921 | #define MUTE_CH30 0x800000 /* Mute Channel 30 */ |
2302 | #define nMUTE_CH30 0x0 | ||
2303 | #define TX_CH31 0x3f000000 /* Transmit Channel 31 */ | 1922 | #define TX_CH31 0x3f000000 /* Transmit Channel 31 */ |
2304 | #define MUTE_CH31 0x80000000 /* Mute Channel 31 */ | 1923 | #define MUTE_CH31 0x80000000 /* Mute Channel 31 */ |
2305 | #define nMUTE_CH31 0x0 | ||
2306 | 1924 | ||
2307 | /* Bit masks for MXVR_ROUTING_8 */ | 1925 | /* Bit masks for MXVR_ROUTING_8 */ |
2308 | 1926 | ||
2309 | #define TX_CH32 0x3f /* Transmit Channel 32 */ | 1927 | #define TX_CH32 0x3f /* Transmit Channel 32 */ |
2310 | #define MUTE_CH32 0x80 /* Mute Channel 32 */ | 1928 | #define MUTE_CH32 0x80 /* Mute Channel 32 */ |
2311 | #define nMUTE_CH32 0x0 | ||
2312 | #define TX_CH33 0x3f00 /* Transmit Channel 33 */ | 1929 | #define TX_CH33 0x3f00 /* Transmit Channel 33 */ |
2313 | #define MUTE_CH33 0x8000 /* Mute Channel 33 */ | 1930 | #define MUTE_CH33 0x8000 /* Mute Channel 33 */ |
2314 | #define nMUTE_CH33 0x0 | ||
2315 | #define TX_CH34 0x3f0000 /* Transmit Channel 34 */ | 1931 | #define TX_CH34 0x3f0000 /* Transmit Channel 34 */ |
2316 | #define MUTE_CH34 0x800000 /* Mute Channel 34 */ | 1932 | #define MUTE_CH34 0x800000 /* Mute Channel 34 */ |
2317 | #define nMUTE_CH34 0x0 | ||
2318 | #define TX_CH35 0x3f000000 /* Transmit Channel 35 */ | 1933 | #define TX_CH35 0x3f000000 /* Transmit Channel 35 */ |
2319 | #define MUTE_CH35 0x80000000 /* Mute Channel 35 */ | 1934 | #define MUTE_CH35 0x80000000 /* Mute Channel 35 */ |
2320 | #define nMUTE_CH35 0x0 | ||
2321 | 1935 | ||
2322 | /* Bit masks for MXVR_ROUTING_9 */ | 1936 | /* Bit masks for MXVR_ROUTING_9 */ |
2323 | 1937 | ||
2324 | #define TX_CH36 0x3f /* Transmit Channel 36 */ | 1938 | #define TX_CH36 0x3f /* Transmit Channel 36 */ |
2325 | #define MUTE_CH36 0x80 /* Mute Channel 36 */ | 1939 | #define MUTE_CH36 0x80 /* Mute Channel 36 */ |
2326 | #define nMUTE_CH36 0x0 | ||
2327 | #define TX_CH37 0x3f00 /* Transmit Channel 37 */ | 1940 | #define TX_CH37 0x3f00 /* Transmit Channel 37 */ |
2328 | #define MUTE_CH37 0x8000 /* Mute Channel 37 */ | 1941 | #define MUTE_CH37 0x8000 /* Mute Channel 37 */ |
2329 | #define nMUTE_CH37 0x0 | ||
2330 | #define TX_CH38 0x3f0000 /* Transmit Channel 38 */ | 1942 | #define TX_CH38 0x3f0000 /* Transmit Channel 38 */ |
2331 | #define MUTE_CH38 0x800000 /* Mute Channel 38 */ | 1943 | #define MUTE_CH38 0x800000 /* Mute Channel 38 */ |
2332 | #define nMUTE_CH38 0x0 | ||
2333 | #define TX_CH39 0x3f000000 /* Transmit Channel 39 */ | 1944 | #define TX_CH39 0x3f000000 /* Transmit Channel 39 */ |
2334 | #define MUTE_CH39 0x80000000 /* Mute Channel 39 */ | 1945 | #define MUTE_CH39 0x80000000 /* Mute Channel 39 */ |
2335 | #define nMUTE_CH39 0x0 | ||
2336 | 1946 | ||
2337 | /* Bit masks for MXVR_ROUTING_10 */ | 1947 | /* Bit masks for MXVR_ROUTING_10 */ |
2338 | 1948 | ||
2339 | #define TX_CH40 0x3f /* Transmit Channel 40 */ | 1949 | #define TX_CH40 0x3f /* Transmit Channel 40 */ |
2340 | #define MUTE_CH40 0x80 /* Mute Channel 40 */ | 1950 | #define MUTE_CH40 0x80 /* Mute Channel 40 */ |
2341 | #define nMUTE_CH40 0x0 | ||
2342 | #define TX_CH41 0x3f00 /* Transmit Channel 41 */ | 1951 | #define TX_CH41 0x3f00 /* Transmit Channel 41 */ |
2343 | #define MUTE_CH41 0x8000 /* Mute Channel 41 */ | 1952 | #define MUTE_CH41 0x8000 /* Mute Channel 41 */ |
2344 | #define nMUTE_CH41 0x0 | ||
2345 | #define TX_CH42 0x3f0000 /* Transmit Channel 42 */ | 1953 | #define TX_CH42 0x3f0000 /* Transmit Channel 42 */ |
2346 | #define MUTE_CH42 0x800000 /* Mute Channel 42 */ | 1954 | #define MUTE_CH42 0x800000 /* Mute Channel 42 */ |
2347 | #define nMUTE_CH42 0x0 | ||
2348 | #define TX_CH43 0x3f000000 /* Transmit Channel 43 */ | 1955 | #define TX_CH43 0x3f000000 /* Transmit Channel 43 */ |
2349 | #define MUTE_CH43 0x80000000 /* Mute Channel 43 */ | 1956 | #define MUTE_CH43 0x80000000 /* Mute Channel 43 */ |
2350 | #define nMUTE_CH43 0x0 | ||
2351 | 1957 | ||
2352 | /* Bit masks for MXVR_ROUTING_11 */ | 1958 | /* Bit masks for MXVR_ROUTING_11 */ |
2353 | 1959 | ||
2354 | #define TX_CH44 0x3f /* Transmit Channel 44 */ | 1960 | #define TX_CH44 0x3f /* Transmit Channel 44 */ |
2355 | #define MUTE_CH44 0x80 /* Mute Channel 44 */ | 1961 | #define MUTE_CH44 0x80 /* Mute Channel 44 */ |
2356 | #define nMUTE_CH44 0x0 | ||
2357 | #define TX_CH45 0x3f00 /* Transmit Channel 45 */ | 1962 | #define TX_CH45 0x3f00 /* Transmit Channel 45 */ |
2358 | #define MUTE_CH45 0x8000 /* Mute Channel 45 */ | 1963 | #define MUTE_CH45 0x8000 /* Mute Channel 45 */ |
2359 | #define nMUTE_CH45 0x0 | ||
2360 | #define TX_CH46 0x3f0000 /* Transmit Channel 46 */ | 1964 | #define TX_CH46 0x3f0000 /* Transmit Channel 46 */ |
2361 | #define MUTE_CH46 0x800000 /* Mute Channel 46 */ | 1965 | #define MUTE_CH46 0x800000 /* Mute Channel 46 */ |
2362 | #define nMUTE_CH46 0x0 | ||
2363 | #define TX_CH47 0x3f000000 /* Transmit Channel 47 */ | 1966 | #define TX_CH47 0x3f000000 /* Transmit Channel 47 */ |
2364 | #define MUTE_CH47 0x80000000 /* Mute Channel 47 */ | 1967 | #define MUTE_CH47 0x80000000 /* Mute Channel 47 */ |
2365 | #define nMUTE_CH47 0x0 | ||
2366 | 1968 | ||
2367 | /* Bit masks for MXVR_ROUTING_12 */ | 1969 | /* Bit masks for MXVR_ROUTING_12 */ |
2368 | 1970 | ||
2369 | #define TX_CH48 0x3f /* Transmit Channel 48 */ | 1971 | #define TX_CH48 0x3f /* Transmit Channel 48 */ |
2370 | #define MUTE_CH48 0x80 /* Mute Channel 48 */ | 1972 | #define MUTE_CH48 0x80 /* Mute Channel 48 */ |
2371 | #define nMUTE_CH48 0x0 | ||
2372 | #define TX_CH49 0x3f00 /* Transmit Channel 49 */ | 1973 | #define TX_CH49 0x3f00 /* Transmit Channel 49 */ |
2373 | #define MUTE_CH49 0x8000 /* Mute Channel 49 */ | 1974 | #define MUTE_CH49 0x8000 /* Mute Channel 49 */ |
2374 | #define nMUTE_CH49 0x0 | ||
2375 | #define TX_CH50 0x3f0000 /* Transmit Channel 50 */ | 1975 | #define TX_CH50 0x3f0000 /* Transmit Channel 50 */ |
2376 | #define MUTE_CH50 0x800000 /* Mute Channel 50 */ | 1976 | #define MUTE_CH50 0x800000 /* Mute Channel 50 */ |
2377 | #define nMUTE_CH50 0x0 | ||
2378 | #define TX_CH51 0x3f000000 /* Transmit Channel 51 */ | 1977 | #define TX_CH51 0x3f000000 /* Transmit Channel 51 */ |
2379 | #define MUTE_CH51 0x80000000 /* Mute Channel 51 */ | 1978 | #define MUTE_CH51 0x80000000 /* Mute Channel 51 */ |
2380 | #define nMUTE_CH51 0x0 | ||
2381 | 1979 | ||
2382 | /* Bit masks for MXVR_ROUTING_13 */ | 1980 | /* Bit masks for MXVR_ROUTING_13 */ |
2383 | 1981 | ||
2384 | #define TX_CH52 0x3f /* Transmit Channel 52 */ | 1982 | #define TX_CH52 0x3f /* Transmit Channel 52 */ |
2385 | #define MUTE_CH52 0x80 /* Mute Channel 52 */ | 1983 | #define MUTE_CH52 0x80 /* Mute Channel 52 */ |
2386 | #define nMUTE_CH52 0x0 | ||
2387 | #define TX_CH53 0x3f00 /* Transmit Channel 53 */ | 1984 | #define TX_CH53 0x3f00 /* Transmit Channel 53 */ |
2388 | #define MUTE_CH53 0x8000 /* Mute Channel 53 */ | 1985 | #define MUTE_CH53 0x8000 /* Mute Channel 53 */ |
2389 | #define nMUTE_CH53 0x0 | ||
2390 | #define TX_CH54 0x3f0000 /* Transmit Channel 54 */ | 1986 | #define TX_CH54 0x3f0000 /* Transmit Channel 54 */ |
2391 | #define MUTE_CH54 0x800000 /* Mute Channel 54 */ | 1987 | #define MUTE_CH54 0x800000 /* Mute Channel 54 */ |
2392 | #define nMUTE_CH54 0x0 | ||
2393 | #define TX_CH55 0x3f000000 /* Transmit Channel 55 */ | 1988 | #define TX_CH55 0x3f000000 /* Transmit Channel 55 */ |
2394 | #define MUTE_CH55 0x80000000 /* Mute Channel 55 */ | 1989 | #define MUTE_CH55 0x80000000 /* Mute Channel 55 */ |
2395 | #define nMUTE_CH55 0x0 | ||
2396 | 1990 | ||
2397 | /* Bit masks for MXVR_ROUTING_14 */ | 1991 | /* Bit masks for MXVR_ROUTING_14 */ |
2398 | 1992 | ||
2399 | #define TX_CH56 0x3f /* Transmit Channel 56 */ | 1993 | #define TX_CH56 0x3f /* Transmit Channel 56 */ |
2400 | #define MUTE_CH56 0x80 /* Mute Channel 56 */ | 1994 | #define MUTE_CH56 0x80 /* Mute Channel 56 */ |
2401 | #define nMUTE_CH56 0x0 | ||
2402 | #define TX_CH57 0x3f00 /* Transmit Channel 57 */ | 1995 | #define TX_CH57 0x3f00 /* Transmit Channel 57 */ |
2403 | #define MUTE_CH57 0x8000 /* Mute Channel 57 */ | 1996 | #define MUTE_CH57 0x8000 /* Mute Channel 57 */ |
2404 | #define nMUTE_CH57 0x0 | ||
2405 | #define TX_CH58 0x3f0000 /* Transmit Channel 58 */ | 1997 | #define TX_CH58 0x3f0000 /* Transmit Channel 58 */ |
2406 | #define MUTE_CH58 0x800000 /* Mute Channel 58 */ | 1998 | #define MUTE_CH58 0x800000 /* Mute Channel 58 */ |
2407 | #define nMUTE_CH58 0x0 | ||
2408 | #define TX_CH59 0x3f000000 /* Transmit Channel 59 */ | 1999 | #define TX_CH59 0x3f000000 /* Transmit Channel 59 */ |
2409 | #define MUTE_CH59 0x80000000 /* Mute Channel 59 */ | 2000 | #define MUTE_CH59 0x80000000 /* Mute Channel 59 */ |
2410 | #define nMUTE_CH59 0x0 | ||
2411 | 2001 | ||
2412 | /* Bit masks for MXVR_BLOCK_CNT */ | 2002 | /* Bit masks for MXVR_BLOCK_CNT */ |
2413 | 2003 | ||
@@ -2416,53 +2006,37 @@ | |||
2416 | /* Bit masks for MXVR_CLK_CTL */ | 2006 | /* Bit masks for MXVR_CLK_CTL */ |
2417 | 2007 | ||
2418 | #define MXTALCEN 0x1 /* MXVR Crystal Oscillator Clock Enable */ | 2008 | #define MXTALCEN 0x1 /* MXVR Crystal Oscillator Clock Enable */ |
2419 | #define nMXTALCEN 0x0 | ||
2420 | #define MXTALFEN 0x2 /* MXVR Crystal Oscillator Feedback Enable */ | 2009 | #define MXTALFEN 0x2 /* MXVR Crystal Oscillator Feedback Enable */ |
2421 | #define nMXTALFEN 0x0 | ||
2422 | #define MXTALMUL 0x30 /* MXVR Crystal Multiplier */ | 2010 | #define MXTALMUL 0x30 /* MXVR Crystal Multiplier */ |
2423 | #define CLKX3SEL 0x80 /* Clock Generation Source Select */ | 2011 | #define CLKX3SEL 0x80 /* Clock Generation Source Select */ |
2424 | #define nCLKX3SEL 0x0 | ||
2425 | #define MMCLKEN 0x100 /* Master Clock Enable */ | 2012 | #define MMCLKEN 0x100 /* Master Clock Enable */ |
2426 | #define nMMCLKEN 0x0 | ||
2427 | #define MMCLKMUL 0x1e00 /* Master Clock Multiplication Factor */ | 2013 | #define MMCLKMUL 0x1e00 /* Master Clock Multiplication Factor */ |
2428 | #define PLLSMPS 0xe000 /* MXVR PLL State Machine Prescaler */ | 2014 | #define PLLSMPS 0xe000 /* MXVR PLL State Machine Prescaler */ |
2429 | #define MBCLKEN 0x10000 /* Bit Clock Enable */ | 2015 | #define MBCLKEN 0x10000 /* Bit Clock Enable */ |
2430 | #define nMBCLKEN 0x0 | ||
2431 | #define MBCLKDIV 0x1e0000 /* Bit Clock Divide Factor */ | 2016 | #define MBCLKDIV 0x1e0000 /* Bit Clock Divide Factor */ |
2432 | #define INVRX 0x800000 /* Invert Receive Data */ | 2017 | #define INVRX 0x800000 /* Invert Receive Data */ |
2433 | #define nINVRX 0x0 | ||
2434 | #define MFSEN 0x1000000 /* Frame Sync Enable */ | 2018 | #define MFSEN 0x1000000 /* Frame Sync Enable */ |
2435 | #define nMFSEN 0x0 | ||
2436 | #define MFSDIV 0x1e000000 /* Frame Sync Divide Factor */ | 2019 | #define MFSDIV 0x1e000000 /* Frame Sync Divide Factor */ |
2437 | #define MFSSEL 0x60000000 /* Frame Sync Select */ | 2020 | #define MFSSEL 0x60000000 /* Frame Sync Select */ |
2438 | #define MFSSYNC 0x80000000 /* Frame Sync Synchronization Select */ | 2021 | #define MFSSYNC 0x80000000 /* Frame Sync Synchronization Select */ |
2439 | #define nMFSSYNC 0x0 | ||
2440 | 2022 | ||
2441 | /* Bit masks for MXVR_CDRPLL_CTL */ | 2023 | /* Bit masks for MXVR_CDRPLL_CTL */ |
2442 | 2024 | ||
2443 | #define CDRSMEN 0x1 /* MXVR CDRPLL State Machine Enable */ | 2025 | #define CDRSMEN 0x1 /* MXVR CDRPLL State Machine Enable */ |
2444 | #define nCDRSMEN 0x0 | ||
2445 | #define CDRRSTB 0x2 /* MXVR CDRPLL Reset */ | 2026 | #define CDRRSTB 0x2 /* MXVR CDRPLL Reset */ |
2446 | #define nCDRRSTB 0x0 | ||
2447 | #define CDRSVCO 0x4 /* MXVR CDRPLL Start VCO */ | 2027 | #define CDRSVCO 0x4 /* MXVR CDRPLL Start VCO */ |
2448 | #define nCDRSVCO 0x0 | ||
2449 | #define CDRMODE 0x8 /* MXVR CDRPLL CDR Mode Select */ | 2028 | #define CDRMODE 0x8 /* MXVR CDRPLL CDR Mode Select */ |
2450 | #define nCDRMODE 0x0 | ||
2451 | #define CDRSCNT 0x3f0 /* MXVR CDRPLL Start Counter */ | 2029 | #define CDRSCNT 0x3f0 /* MXVR CDRPLL Start Counter */ |
2452 | #define CDRLCNT 0xfc00 /* MXVR CDRPLL Lock Counter */ | 2030 | #define CDRLCNT 0xfc00 /* MXVR CDRPLL Lock Counter */ |
2453 | #define CDRSHPSEL 0x3f0000 /* MXVR CDRPLL Shaper Select */ | 2031 | #define CDRSHPSEL 0x3f0000 /* MXVR CDRPLL Shaper Select */ |
2454 | #define CDRSHPEN 0x800000 /* MXVR CDRPLL Shaper Enable */ | 2032 | #define CDRSHPEN 0x800000 /* MXVR CDRPLL Shaper Enable */ |
2455 | #define nCDRSHPEN 0x0 | ||
2456 | #define CDRCPSEL 0xff000000 /* MXVR CDRPLL Charge Pump Current Select */ | 2033 | #define CDRCPSEL 0xff000000 /* MXVR CDRPLL Charge Pump Current Select */ |
2457 | 2034 | ||
2458 | /* Bit masks for MXVR_FMPLL_CTL */ | 2035 | /* Bit masks for MXVR_FMPLL_CTL */ |
2459 | 2036 | ||
2460 | #define FMSMEN 0x1 /* MXVR FMPLL State Machine Enable */ | 2037 | #define FMSMEN 0x1 /* MXVR FMPLL State Machine Enable */ |
2461 | #define nFMSMEN 0x0 | ||
2462 | #define FMRSTB 0x2 /* MXVR FMPLL Reset */ | 2038 | #define FMRSTB 0x2 /* MXVR FMPLL Reset */ |
2463 | #define nFMRSTB 0x0 | ||
2464 | #define FMSVCO 0x4 /* MXVR FMPLL Start VCO */ | 2039 | #define FMSVCO 0x4 /* MXVR FMPLL Start VCO */ |
2465 | #define nFMSVCO 0x0 | ||
2466 | #define FMSCNT 0x3f0 /* MXVR FMPLL Start Counter */ | 2040 | #define FMSCNT 0x3f0 /* MXVR FMPLL Start Counter */ |
2467 | #define FMLCNT 0xfc00 /* MXVR FMPLL Lock Counter */ | 2041 | #define FMLCNT 0xfc00 /* MXVR FMPLL Lock Counter */ |
2468 | #define FMCPSEL 0xff000000 /* MXVR FMPLL Charge Pump Current Select */ | 2042 | #define FMCPSEL 0xff000000 /* MXVR FMPLL Charge Pump Current Select */ |
@@ -2470,15 +2044,10 @@ | |||
2470 | /* Bit masks for MXVR_PIN_CTL */ | 2044 | /* Bit masks for MXVR_PIN_CTL */ |
2471 | 2045 | ||
2472 | #define MTXONBOD 0x1 /* MTXONB Open Drain Select */ | 2046 | #define MTXONBOD 0x1 /* MTXONB Open Drain Select */ |
2473 | #define nMTXONBOD 0x0 | ||
2474 | #define MTXONBG 0x2 /* MTXONB Gates MTX Select */ | 2047 | #define MTXONBG 0x2 /* MTXONB Gates MTX Select */ |
2475 | #define nMTXONBG 0x0 | ||
2476 | #define MFSOE 0x10 /* MFS Output Enable */ | 2048 | #define MFSOE 0x10 /* MFS Output Enable */ |
2477 | #define nMFSOE 0x0 | ||
2478 | #define MFSGPSEL 0x20 /* MFS General Purpose Output Select */ | 2049 | #define MFSGPSEL 0x20 /* MFS General Purpose Output Select */ |
2479 | #define nMFSGPSEL 0x0 | ||
2480 | #define MFSGPDAT 0x40 /* MFS General Purpose Output Data */ | 2050 | #define MFSGPDAT 0x40 /* MFS General Purpose Output Data */ |
2481 | #define nMFSGPDAT 0x0 | ||
2482 | 2051 | ||
2483 | /* Bit masks for MXVR_SCLK_CNT */ | 2052 | /* Bit masks for MXVR_SCLK_CNT */ |
2484 | 2053 | ||
@@ -2487,7 +2056,6 @@ | |||
2487 | /* Bit masks for KPAD_CTL */ | 2056 | /* Bit masks for KPAD_CTL */ |
2488 | 2057 | ||
2489 | #define KPAD_EN 0x1 /* Keypad Enable */ | 2058 | #define KPAD_EN 0x1 /* Keypad Enable */ |
2490 | #define nKPAD_EN 0x0 | ||
2491 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ | 2059 | #define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */ |
2492 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ | 2060 | #define KPAD_ROWEN 0x1c00 /* Row Enable Width */ |
2493 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ | 2061 | #define KPAD_COLEN 0xe000 /* Column Enable Width */ |
@@ -2509,29 +2077,21 @@ | |||
2509 | /* Bit masks for KPAD_STAT */ | 2077 | /* Bit masks for KPAD_STAT */ |
2510 | 2078 | ||
2511 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ | 2079 | #define KPAD_IRQ 0x1 /* Keypad Interrupt Status */ |
2512 | #define nKPAD_IRQ 0x0 | ||
2513 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ | 2080 | #define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */ |
2514 | #define KPAD_PRESSED 0x8 /* Key press current status */ | 2081 | #define KPAD_PRESSED 0x8 /* Key press current status */ |
2515 | #define nKPAD_PRESSED 0x0 | ||
2516 | 2082 | ||
2517 | /* Bit masks for KPAD_SOFTEVAL */ | 2083 | /* Bit masks for KPAD_SOFTEVAL */ |
2518 | 2084 | ||
2519 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ | 2085 | #define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */ |
2520 | #define nKPAD_SOFTEVAL_E 0x0 | ||
2521 | 2086 | ||
2522 | /* Bit masks for SDH_COMMAND */ | 2087 | /* Bit masks for SDH_COMMAND */ |
2523 | 2088 | ||
2524 | #define CMD_IDX 0x3f /* Command Index */ | 2089 | #define CMD_IDX 0x3f /* Command Index */ |
2525 | #define CMD_RSP 0x40 /* Response */ | 2090 | #define CMD_RSP 0x40 /* Response */ |
2526 | #define nCMD_RSP 0x0 | ||
2527 | #define CMD_L_RSP 0x80 /* Long Response */ | 2091 | #define CMD_L_RSP 0x80 /* Long Response */ |
2528 | #define nCMD_L_RSP 0x0 | ||
2529 | #define CMD_INT_E 0x100 /* Command Interrupt */ | 2092 | #define CMD_INT_E 0x100 /* Command Interrupt */ |
2530 | #define nCMD_INT_E 0x0 | ||
2531 | #define CMD_PEND_E 0x200 /* Command Pending */ | 2093 | #define CMD_PEND_E 0x200 /* Command Pending */ |
2532 | #define nCMD_PEND_E 0x0 | ||
2533 | #define CMD_E 0x400 /* Command Enable */ | 2094 | #define CMD_E 0x400 /* Command Enable */ |
2534 | #define nCMD_E 0x0 | ||
2535 | 2095 | ||
2536 | /* Bit masks for SDH_PWR_CTL */ | 2096 | /* Bit masks for SDH_PWR_CTL */ |
2537 | 2097 | ||
@@ -2540,21 +2100,15 @@ | |||
2540 | #define TBD 0x3c /* TBD */ | 2100 | #define TBD 0x3c /* TBD */ |
2541 | #endif | 2101 | #endif |
2542 | #define SD_CMD_OD 0x40 /* Open Drain Output */ | 2102 | #define SD_CMD_OD 0x40 /* Open Drain Output */ |
2543 | #define nSD_CMD_OD 0x0 | ||
2544 | #define ROD_CTL 0x80 /* Rod Control */ | 2103 | #define ROD_CTL 0x80 /* Rod Control */ |
2545 | #define nROD_CTL 0x0 | ||
2546 | 2104 | ||
2547 | /* Bit masks for SDH_CLK_CTL */ | 2105 | /* Bit masks for SDH_CLK_CTL */ |
2548 | 2106 | ||
2549 | #define CLKDIV 0xff /* MC_CLK Divisor */ | 2107 | #define CLKDIV 0xff /* MC_CLK Divisor */ |
2550 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ | 2108 | #define CLK_E 0x100 /* MC_CLK Bus Clock Enable */ |
2551 | #define nCLK_E 0x0 | ||
2552 | #define PWR_SV_E 0x200 /* Power Save Enable */ | 2109 | #define PWR_SV_E 0x200 /* Power Save Enable */ |
2553 | #define nPWR_SV_E 0x0 | ||
2554 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ | 2110 | #define CLKDIV_BYPASS 0x400 /* Bypass Divisor */ |
2555 | #define nCLKDIV_BYPASS 0x0 | ||
2556 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ | 2111 | #define WIDE_BUS 0x800 /* Wide Bus Mode Enable */ |
2557 | #define nWIDE_BUS 0x0 | ||
2558 | 2112 | ||
2559 | /* Bit masks for SDH_RESP_CMD */ | 2113 | /* Bit masks for SDH_RESP_CMD */ |
2560 | 2114 | ||
@@ -2563,133 +2117,74 @@ | |||
2563 | /* Bit masks for SDH_DATA_CTL */ | 2117 | /* Bit masks for SDH_DATA_CTL */ |
2564 | 2118 | ||
2565 | #define DTX_E 0x1 /* Data Transfer Enable */ | 2119 | #define DTX_E 0x1 /* Data Transfer Enable */ |
2566 | #define nDTX_E 0x0 | ||
2567 | #define DTX_DIR 0x2 /* Data Transfer Direction */ | 2120 | #define DTX_DIR 0x2 /* Data Transfer Direction */ |
2568 | #define nDTX_DIR 0x0 | ||
2569 | #define DTX_MODE 0x4 /* Data Transfer Mode */ | 2121 | #define DTX_MODE 0x4 /* Data Transfer Mode */ |
2570 | #define nDTX_MODE 0x0 | ||
2571 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ | 2122 | #define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */ |
2572 | #define nDTX_DMA_E 0x0 | ||
2573 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ | 2123 | #define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */ |
2574 | 2124 | ||
2575 | /* Bit masks for SDH_STATUS */ | 2125 | /* Bit masks for SDH_STATUS */ |
2576 | 2126 | ||
2577 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 2127 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
2578 | #define nCMD_CRC_FAIL 0x0 | ||
2579 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 2128 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
2580 | #define nDAT_CRC_FAIL 0x0 | 2129 | #define CMD_TIME_OUT 0x4 /* CMD Time Out */ |
2581 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 2130 | #define DAT_TIME_OUT 0x8 /* Data Time Out */ |
2582 | #define nCMD_TIMEOUT 0x0 | ||
2583 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | ||
2584 | #define nDAT_TIMEOUT 0x0 | ||
2585 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 2131 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
2586 | #define nTX_UNDERRUN 0x0 | ||
2587 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 2132 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
2588 | #define nRX_OVERRUN 0x0 | ||
2589 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 2133 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
2590 | #define nCMD_RESP_END 0x0 | ||
2591 | #define CMD_SENT 0x80 /* CMD Sent */ | 2134 | #define CMD_SENT 0x80 /* CMD Sent */ |
2592 | #define nCMD_SENT 0x0 | ||
2593 | #define DAT_END 0x100 /* Data End */ | 2135 | #define DAT_END 0x100 /* Data End */ |
2594 | #define nDAT_END 0x0 | ||
2595 | #define START_BIT_ERR 0x200 /* Start Bit Error */ | 2136 | #define START_BIT_ERR 0x200 /* Start Bit Error */ |
2596 | #define nSTART_BIT_ERR 0x0 | ||
2597 | #define DAT_BLK_END 0x400 /* Data Block End */ | 2137 | #define DAT_BLK_END 0x400 /* Data Block End */ |
2598 | #define nDAT_BLK_END 0x0 | ||
2599 | #define CMD_ACT 0x800 /* CMD Active */ | 2138 | #define CMD_ACT 0x800 /* CMD Active */ |
2600 | #define nCMD_ACT 0x0 | ||
2601 | #define TX_ACT 0x1000 /* Transmit Active */ | 2139 | #define TX_ACT 0x1000 /* Transmit Active */ |
2602 | #define nTX_ACT 0x0 | ||
2603 | #define RX_ACT 0x2000 /* Receive Active */ | 2140 | #define RX_ACT 0x2000 /* Receive Active */ |
2604 | #define nRX_ACT 0x0 | ||
2605 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ | 2141 | #define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */ |
2606 | #define nTX_FIFO_STAT 0x0 | ||
2607 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ | 2142 | #define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */ |
2608 | #define nRX_FIFO_STAT 0x0 | ||
2609 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ | 2143 | #define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */ |
2610 | #define nTX_FIFO_FULL 0x0 | ||
2611 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ | 2144 | #define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */ |
2612 | #define nRX_FIFO_FULL 0x0 | ||
2613 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ | 2145 | #define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */ |
2614 | #define nTX_FIFO_ZERO 0x0 | ||
2615 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ | 2146 | #define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */ |
2616 | #define nRX_DAT_ZERO 0x0 | ||
2617 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ | 2147 | #define TX_DAT_RDY 0x100000 /* Transmit Data Available */ |
2618 | #define nTX_DAT_RDY 0x0 | ||
2619 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ | 2148 | #define RX_FIFO_RDY 0x200000 /* Receive Data Available */ |
2620 | #define nRX_FIFO_RDY 0x0 | ||
2621 | 2149 | ||
2622 | /* Bit masks for SDH_STATUS_CLR */ | 2150 | /* Bit masks for SDH_STATUS_CLR */ |
2623 | 2151 | ||
2624 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ | 2152 | #define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */ |
2625 | #define nCMD_CRC_FAIL_STAT 0x0 | ||
2626 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ | 2153 | #define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */ |
2627 | #define nDAT_CRC_FAIL_STAT 0x0 | ||
2628 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ | 2154 | #define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */ |
2629 | #define nCMD_TIMEOUT_STAT 0x0 | ||
2630 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ | 2155 | #define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */ |
2631 | #define nDAT_TIMEOUT_STAT 0x0 | ||
2632 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ | 2156 | #define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */ |
2633 | #define nTX_UNDERRUN_STAT 0x0 | ||
2634 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ | 2157 | #define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */ |
2635 | #define nRX_OVERRUN_STAT 0x0 | ||
2636 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ | 2158 | #define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */ |
2637 | #define nCMD_RESP_END_STAT 0x0 | ||
2638 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ | 2159 | #define CMD_SENT_STAT 0x80 /* CMD Sent Status */ |
2639 | #define nCMD_SENT_STAT 0x0 | ||
2640 | #define DAT_END_STAT 0x100 /* Data End Status */ | 2160 | #define DAT_END_STAT 0x100 /* Data End Status */ |
2641 | #define nDAT_END_STAT 0x0 | ||
2642 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ | 2161 | #define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */ |
2643 | #define nSTART_BIT_ERR_STAT 0x0 | ||
2644 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ | 2162 | #define DAT_BLK_END_STAT 0x400 /* Data Block End Status */ |
2645 | #define nDAT_BLK_END_STAT 0x0 | ||
2646 | 2163 | ||
2647 | /* Bit masks for SDH_MASK0 */ | 2164 | /* Bit masks for SDH_MASK0 */ |
2648 | 2165 | ||
2649 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ | 2166 | #define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */ |
2650 | #define nCMD_CRC_FAIL_MASK 0x0 | ||
2651 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ | 2167 | #define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */ |
2652 | #define nDAT_CRC_FAIL_MASK 0x0 | ||
2653 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ | 2168 | #define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */ |
2654 | #define nCMD_TIMEOUT_MASK 0x0 | ||
2655 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ | 2169 | #define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */ |
2656 | #define nDAT_TIMEOUT_MASK 0x0 | ||
2657 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ | 2170 | #define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */ |
2658 | #define nTX_UNDERRUN_MASK 0x0 | ||
2659 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ | 2171 | #define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */ |
2660 | #define nRX_OVERRUN_MASK 0x0 | ||
2661 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ | 2172 | #define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */ |
2662 | #define nCMD_RESP_END_MASK 0x0 | ||
2663 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ | 2173 | #define CMD_SENT_MASK 0x80 /* CMD Sent Mask */ |
2664 | #define nCMD_SENT_MASK 0x0 | ||
2665 | #define DAT_END_MASK 0x100 /* Data End Mask */ | 2174 | #define DAT_END_MASK 0x100 /* Data End Mask */ |
2666 | #define nDAT_END_MASK 0x0 | ||
2667 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ | 2175 | #define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */ |
2668 | #define nSTART_BIT_ERR_MASK 0x0 | ||
2669 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ | 2176 | #define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */ |
2670 | #define nDAT_BLK_END_MASK 0x0 | ||
2671 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ | 2177 | #define CMD_ACT_MASK 0x800 /* CMD Active Mask */ |
2672 | #define nCMD_ACT_MASK 0x0 | ||
2673 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ | 2178 | #define TX_ACT_MASK 0x1000 /* Transmit Active Mask */ |
2674 | #define nTX_ACT_MASK 0x0 | ||
2675 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ | 2179 | #define RX_ACT_MASK 0x2000 /* Receive Active Mask */ |
2676 | #define nRX_ACT_MASK 0x0 | ||
2677 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ | 2180 | #define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */ |
2678 | #define nTX_FIFO_STAT_MASK 0x0 | ||
2679 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ | 2181 | #define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */ |
2680 | #define nRX_FIFO_STAT_MASK 0x0 | ||
2681 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ | 2182 | #define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */ |
2682 | #define nTX_FIFO_FULL_MASK 0x0 | ||
2683 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ | 2183 | #define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */ |
2684 | #define nRX_FIFO_FULL_MASK 0x0 | ||
2685 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ | 2184 | #define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */ |
2686 | #define nTX_FIFO_ZERO_MASK 0x0 | ||
2687 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ | 2185 | #define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */ |
2688 | #define nRX_DAT_ZERO_MASK 0x0 | ||
2689 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ | 2186 | #define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */ |
2690 | #define nTX_DAT_RDY_MASK 0x0 | ||
2691 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ | 2187 | #define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */ |
2692 | #define nRX_FIFO_RDY_MASK 0x0 | ||
2693 | 2188 | ||
2694 | /* Bit masks for SDH_FIFO_CNT */ | 2189 | /* Bit masks for SDH_FIFO_CNT */ |
2695 | 2190 | ||
@@ -2698,73 +2193,47 @@ | |||
2698 | /* Bit masks for SDH_E_STATUS */ | 2193 | /* Bit masks for SDH_E_STATUS */ |
2699 | 2194 | ||
2700 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ | 2195 | #define SDIO_INT_DET 0x2 /* SDIO Int Detected */ |
2701 | #define nSDIO_INT_DET 0x0 | ||
2702 | #define SD_CARD_DET 0x10 /* SD Card Detect */ | 2196 | #define SD_CARD_DET 0x10 /* SD Card Detect */ |
2703 | #define nSD_CARD_DET 0x0 | ||
2704 | 2197 | ||
2705 | /* Bit masks for SDH_E_MASK */ | 2198 | /* Bit masks for SDH_E_MASK */ |
2706 | 2199 | ||
2707 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ | 2200 | #define SDIO_MSK 0x2 /* Mask SDIO Int Detected */ |
2708 | #define nSDIO_MSK 0x0 | ||
2709 | #define SCD_MSK 0x40 /* Mask Card Detect */ | 2201 | #define SCD_MSK 0x40 /* Mask Card Detect */ |
2710 | #define nSCD_MSK 0x0 | ||
2711 | 2202 | ||
2712 | /* Bit masks for SDH_CFG */ | 2203 | /* Bit masks for SDH_CFG */ |
2713 | 2204 | ||
2714 | #define CLKS_EN 0x1 /* Clocks Enable */ | 2205 | #define CLKS_EN 0x1 /* Clocks Enable */ |
2715 | #define nCLKS_EN 0x0 | ||
2716 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ | 2206 | #define SD4E 0x4 /* SDIO 4-Bit Enable */ |
2717 | #define nSD4E 0x0 | ||
2718 | #define MWE 0x8 /* Moving Window Enable */ | 2207 | #define MWE 0x8 /* Moving Window Enable */ |
2719 | #define nMWE 0x0 | ||
2720 | #define SD_RST 0x10 /* SDMMC Reset */ | 2208 | #define SD_RST 0x10 /* SDMMC Reset */ |
2721 | #define nSD_RST 0x0 | ||
2722 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ | 2209 | #define PUP_SDDAT 0x20 /* Pull-up SD_DAT */ |
2723 | #define nPUP_SDDAT 0x0 | ||
2724 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ | 2210 | #define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */ |
2725 | #define nPUP_SDDAT3 0x0 | ||
2726 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ | 2211 | #define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */ |
2727 | #define nPD_SDDAT3 0x0 | ||
2728 | 2212 | ||
2729 | /* Bit masks for SDH_RD_WAIT_EN */ | 2213 | /* Bit masks for SDH_RD_WAIT_EN */ |
2730 | 2214 | ||
2731 | #define RWR 0x1 /* Read Wait Request */ | 2215 | #define RWR 0x1 /* Read Wait Request */ |
2732 | #define nRWR 0x0 | ||
2733 | 2216 | ||
2734 | /* Bit masks for ATAPI_CONTROL */ | 2217 | /* Bit masks for ATAPI_CONTROL */ |
2735 | 2218 | ||
2736 | #define PIO_START 0x1 /* Start PIO/Reg Op */ | 2219 | #define PIO_START 0x1 /* Start PIO/Reg Op */ |
2737 | #define nPIO_START 0x0 | ||
2738 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ | 2220 | #define MULTI_START 0x2 /* Start Multi-DMA Op */ |
2739 | #define nMULTI_START 0x0 | ||
2740 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ | 2221 | #define ULTRA_START 0x4 /* Start Ultra-DMA Op */ |
2741 | #define nULTRA_START 0x0 | ||
2742 | #define XFER_DIR 0x8 /* Transfer Direction */ | 2222 | #define XFER_DIR 0x8 /* Transfer Direction */ |
2743 | #define nXFER_DIR 0x0 | ||
2744 | #define IORDY_EN 0x10 /* IORDY Enable */ | 2223 | #define IORDY_EN 0x10 /* IORDY Enable */ |
2745 | #define nIORDY_EN 0x0 | ||
2746 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ | 2224 | #define FIFO_FLUSH 0x20 /* Flush FIFOs */ |
2747 | #define nFIFO_FLUSH 0x0 | ||
2748 | #define SOFT_RST 0x40 /* Soft Reset */ | 2225 | #define SOFT_RST 0x40 /* Soft Reset */ |
2749 | #define nSOFT_RST 0x0 | ||
2750 | #define DEV_RST 0x80 /* Device Reset */ | 2226 | #define DEV_RST 0x80 /* Device Reset */ |
2751 | #define nDEV_RST 0x0 | ||
2752 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ | 2227 | #define TFRCNT_RST 0x100 /* Trans Count Reset */ |
2753 | #define nTFRCNT_RST 0x0 | ||
2754 | #define END_ON_TERM 0x200 /* End/Terminate Select */ | 2228 | #define END_ON_TERM 0x200 /* End/Terminate Select */ |
2755 | #define nEND_ON_TERM 0x0 | ||
2756 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ | 2229 | #define PIO_USE_DMA 0x400 /* PIO-DMA Enable */ |
2757 | #define nPIO_USE_DMA 0x0 | ||
2758 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ | 2230 | #define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */ |
2759 | 2231 | ||
2760 | /* Bit masks for ATAPI_STATUS */ | 2232 | /* Bit masks for ATAPI_STATUS */ |
2761 | 2233 | ||
2762 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ | 2234 | #define PIO_XFER_ON 0x1 /* PIO transfer in progress */ |
2763 | #define nPIO_XFER_ON 0x0 | ||
2764 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ | 2235 | #define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */ |
2765 | #define nMULTI_XFER_ON 0x0 | ||
2766 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ | 2236 | #define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */ |
2767 | #define nULTRA_XFER_ON 0x0 | ||
2768 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ | 2237 | #define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */ |
2769 | 2238 | ||
2770 | /* Bit masks for ATAPI_DEV_ADDR */ | 2239 | /* Bit masks for ATAPI_DEV_ADDR */ |
@@ -2774,66 +2243,39 @@ | |||
2774 | /* Bit masks for ATAPI_INT_MASK */ | 2243 | /* Bit masks for ATAPI_INT_MASK */ |
2775 | 2244 | ||
2776 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ | 2245 | #define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */ |
2777 | #define nATAPI_DEV_INT_MASK 0x0 | ||
2778 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ | 2246 | #define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */ |
2779 | #define nPIO_DONE_MASK 0x0 | ||
2780 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ | 2247 | #define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */ |
2781 | #define nMULTI_DONE_MASK 0x0 | ||
2782 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ | 2248 | #define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */ |
2783 | #define nUDMAIN_DONE_MASK 0x0 | ||
2784 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ | 2249 | #define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */ |
2785 | #define nUDMAOUT_DONE_MASK 0x0 | ||
2786 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ | 2250 | #define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */ |
2787 | #define nHOST_TERM_XFER_MASK 0x0 | ||
2788 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ | 2251 | #define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */ |
2789 | #define nMULTI_TERM_MASK 0x0 | ||
2790 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ | 2252 | #define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */ |
2791 | #define nUDMAIN_TERM_MASK 0x0 | ||
2792 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ | 2253 | #define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */ |
2793 | #define nUDMAOUT_TERM_MASK 0x0 | ||
2794 | 2254 | ||
2795 | /* Bit masks for ATAPI_INT_STATUS */ | 2255 | /* Bit masks for ATAPI_INT_STATUS */ |
2796 | 2256 | ||
2797 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ | 2257 | #define ATAPI_DEV_INT 0x1 /* Device interrupt status */ |
2798 | #define nATAPI_DEV_INT 0x0 | ||
2799 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ | 2258 | #define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */ |
2800 | #define nPIO_DONE_INT 0x0 | ||
2801 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ | 2259 | #define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */ |
2802 | #define nMULTI_DONE_INT 0x0 | ||
2803 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ | 2260 | #define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */ |
2804 | #define nUDMAIN_DONE_INT 0x0 | ||
2805 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ | 2261 | #define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */ |
2806 | #define nUDMAOUT_DONE_INT 0x0 | ||
2807 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ | 2262 | #define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */ |
2808 | #define nHOST_TERM_XFER_INT 0x0 | ||
2809 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ | 2263 | #define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */ |
2810 | #define nMULTI_TERM_INT 0x0 | ||
2811 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ | 2264 | #define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */ |
2812 | #define nUDMAIN_TERM_INT 0x0 | ||
2813 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ | 2265 | #define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */ |
2814 | #define nUDMAOUT_TERM_INT 0x0 | ||
2815 | 2266 | ||
2816 | /* Bit masks for ATAPI_LINE_STATUS */ | 2267 | /* Bit masks for ATAPI_LINE_STATUS */ |
2817 | 2268 | ||
2818 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ | 2269 | #define ATAPI_INTR 0x1 /* Device interrupt to host line status */ |
2819 | #define nATAPI_INTR 0x0 | ||
2820 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ | 2270 | #define ATAPI_DASP 0x2 /* Device dasp to host line status */ |
2821 | #define nATAPI_DASP 0x0 | ||
2822 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ | 2271 | #define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */ |
2823 | #define nATAPI_CS0N 0x0 | ||
2824 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ | 2272 | #define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */ |
2825 | #define nATAPI_CS1N 0x0 | ||
2826 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ | 2273 | #define ATAPI_ADDR 0x70 /* ATAPI address line status */ |
2827 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ | 2274 | #define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */ |
2828 | #define nATAPI_DMAREQ 0x0 | ||
2829 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ | 2275 | #define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */ |
2830 | #define nATAPI_DMAACKN 0x0 | ||
2831 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ | 2276 | #define ATAPI_DIOWN 0x200 /* ATAPI write line status */ |
2832 | #define nATAPI_DIOWN 0x0 | ||
2833 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ | 2277 | #define ATAPI_DIORN 0x400 /* ATAPI read line status */ |
2834 | #define nATAPI_DIORN 0x0 | ||
2835 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ | 2278 | #define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */ |
2836 | #define nATAPI_IORDY 0x0 | ||
2837 | 2279 | ||
2838 | /* Bit masks for ATAPI_SM_STATE */ | 2280 | /* Bit masks for ATAPI_SM_STATE */ |
2839 | 2281 | ||
@@ -2845,7 +2287,6 @@ | |||
2845 | /* Bit masks for ATAPI_TERMINATE */ | 2287 | /* Bit masks for ATAPI_TERMINATE */ |
2846 | 2288 | ||
2847 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ | 2289 | #define ATAPI_HOST_TERM 0x1 /* Host terminationation */ |
2848 | #define nATAPI_HOST_TERM 0x0 | ||
2849 | 2290 | ||
2850 | /* Bit masks for ATAPI_REG_TIM_0 */ | 2291 | /* Bit masks for ATAPI_REG_TIM_0 */ |
2851 | 2292 | ||
@@ -2900,41 +2341,26 @@ | |||
2900 | /* Bit masks for TIMER_ENABLE1 */ | 2341 | /* Bit masks for TIMER_ENABLE1 */ |
2901 | 2342 | ||
2902 | #define TIMEN8 0x1 /* Timer 8 Enable */ | 2343 | #define TIMEN8 0x1 /* Timer 8 Enable */ |
2903 | #define nTIMEN8 0x0 | ||
2904 | #define TIMEN9 0x2 /* Timer 9 Enable */ | 2344 | #define TIMEN9 0x2 /* Timer 9 Enable */ |
2905 | #define nTIMEN9 0x0 | ||
2906 | #define TIMEN10 0x4 /* Timer 10 Enable */ | 2345 | #define TIMEN10 0x4 /* Timer 10 Enable */ |
2907 | #define nTIMEN10 0x0 | ||
2908 | 2346 | ||
2909 | /* Bit masks for TIMER_DISABLE1 */ | 2347 | /* Bit masks for TIMER_DISABLE1 */ |
2910 | 2348 | ||
2911 | #define TIMDIS8 0x1 /* Timer 8 Disable */ | 2349 | #define TIMDIS8 0x1 /* Timer 8 Disable */ |
2912 | #define nTIMDIS8 0x0 | ||
2913 | #define TIMDIS9 0x2 /* Timer 9 Disable */ | 2350 | #define TIMDIS9 0x2 /* Timer 9 Disable */ |
2914 | #define nTIMDIS9 0x0 | ||
2915 | #define TIMDIS10 0x4 /* Timer 10 Disable */ | 2351 | #define TIMDIS10 0x4 /* Timer 10 Disable */ |
2916 | #define nTIMDIS10 0x0 | ||
2917 | 2352 | ||
2918 | /* Bit masks for TIMER_STATUS1 */ | 2353 | /* Bit masks for TIMER_STATUS1 */ |
2919 | 2354 | ||
2920 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ | 2355 | #define TIMIL8 0x1 /* Timer 8 Interrupt */ |
2921 | #define nTIMIL8 0x0 | ||
2922 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ | 2356 | #define TIMIL9 0x2 /* Timer 9 Interrupt */ |
2923 | #define nTIMIL9 0x0 | ||
2924 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ | 2357 | #define TIMIL10 0x4 /* Timer 10 Interrupt */ |
2925 | #define nTIMIL10 0x0 | ||
2926 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ | 2358 | #define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */ |
2927 | #define nTOVF_ERR8 0x0 | ||
2928 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ | 2359 | #define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */ |
2929 | #define nTOVF_ERR9 0x0 | ||
2930 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ | 2360 | #define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */ |
2931 | #define nTOVF_ERR10 0x0 | ||
2932 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ | 2361 | #define TRUN8 0x1000 /* Timer 8 Slave Enable Status */ |
2933 | #define nTRUN8 0x0 | ||
2934 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ | 2362 | #define TRUN9 0x2000 /* Timer 9 Slave Enable Status */ |
2935 | #define nTRUN9 0x0 | ||
2936 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ | 2363 | #define TRUN10 0x4000 /* Timer 10 Slave Enable Status */ |
2937 | #define nTRUN10 0x0 | ||
2938 | 2364 | ||
2939 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ | 2365 | /* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */ |
2940 | 2366 | ||
@@ -2945,131 +2371,77 @@ | |||
2945 | /* Bit masks for USB_POWER */ | 2371 | /* Bit masks for USB_POWER */ |
2946 | 2372 | ||
2947 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ | 2373 | #define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */ |
2948 | #define nENABLE_SUSPENDM 0x0 | ||
2949 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ | 2374 | #define SUSPEND_MODE 0x2 /* Suspend Mode indicator */ |
2950 | #define nSUSPEND_MODE 0x0 | ||
2951 | #define RESUME_MODE 0x4 /* DMA Mode */ | 2375 | #define RESUME_MODE 0x4 /* DMA Mode */ |
2952 | #define nRESUME_MODE 0x0 | ||
2953 | #define RESET 0x8 /* Reset indicator */ | 2376 | #define RESET 0x8 /* Reset indicator */ |
2954 | #define nRESET 0x0 | ||
2955 | #define HS_MODE 0x10 /* High Speed mode indicator */ | 2377 | #define HS_MODE 0x10 /* High Speed mode indicator */ |
2956 | #define nHS_MODE 0x0 | ||
2957 | #define HS_ENABLE 0x20 /* high Speed Enable */ | 2378 | #define HS_ENABLE 0x20 /* high Speed Enable */ |
2958 | #define nHS_ENABLE 0x0 | ||
2959 | #define SOFT_CONN 0x40 /* Soft connect */ | 2379 | #define SOFT_CONN 0x40 /* Soft connect */ |
2960 | #define nSOFT_CONN 0x0 | ||
2961 | #define ISO_UPDATE 0x80 /* Isochronous update */ | 2380 | #define ISO_UPDATE 0x80 /* Isochronous update */ |
2962 | #define nISO_UPDATE 0x0 | ||
2963 | 2381 | ||
2964 | /* Bit masks for USB_INTRTX */ | 2382 | /* Bit masks for USB_INTRTX */ |
2965 | 2383 | ||
2966 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ | 2384 | #define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */ |
2967 | #define nEP0_TX 0x0 | ||
2968 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ | 2385 | #define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */ |
2969 | #define nEP1_TX 0x0 | ||
2970 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ | 2386 | #define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */ |
2971 | #define nEP2_TX 0x0 | ||
2972 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ | 2387 | #define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */ |
2973 | #define nEP3_TX 0x0 | ||
2974 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ | 2388 | #define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */ |
2975 | #define nEP4_TX 0x0 | ||
2976 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ | 2389 | #define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */ |
2977 | #define nEP5_TX 0x0 | ||
2978 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ | 2390 | #define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */ |
2979 | #define nEP6_TX 0x0 | ||
2980 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ | 2391 | #define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */ |
2981 | #define nEP7_TX 0x0 | ||
2982 | 2392 | ||
2983 | /* Bit masks for USB_INTRRX */ | 2393 | /* Bit masks for USB_INTRRX */ |
2984 | 2394 | ||
2985 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ | 2395 | #define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */ |
2986 | #define nEP1_RX 0x0 | ||
2987 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ | 2396 | #define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */ |
2988 | #define nEP2_RX 0x0 | ||
2989 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ | 2397 | #define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */ |
2990 | #define nEP3_RX 0x0 | ||
2991 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ | 2398 | #define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */ |
2992 | #define nEP4_RX 0x0 | ||
2993 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ | 2399 | #define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */ |
2994 | #define nEP5_RX 0x0 | ||
2995 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ | 2400 | #define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */ |
2996 | #define nEP6_RX 0x0 | ||
2997 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ | 2401 | #define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */ |
2998 | #define nEP7_RX 0x0 | ||
2999 | 2402 | ||
3000 | /* Bit masks for USB_INTRTXE */ | 2403 | /* Bit masks for USB_INTRTXE */ |
3001 | 2404 | ||
3002 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ | 2405 | #define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */ |
3003 | #define nEP0_TX_E 0x0 | ||
3004 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ | 2406 | #define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */ |
3005 | #define nEP1_TX_E 0x0 | ||
3006 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ | 2407 | #define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */ |
3007 | #define nEP2_TX_E 0x0 | ||
3008 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ | 2408 | #define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */ |
3009 | #define nEP3_TX_E 0x0 | ||
3010 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ | 2409 | #define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */ |
3011 | #define nEP4_TX_E 0x0 | ||
3012 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ | 2410 | #define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */ |
3013 | #define nEP5_TX_E 0x0 | ||
3014 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ | 2411 | #define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */ |
3015 | #define nEP6_TX_E 0x0 | ||
3016 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ | 2412 | #define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */ |
3017 | #define nEP7_TX_E 0x0 | ||
3018 | 2413 | ||
3019 | /* Bit masks for USB_INTRRXE */ | 2414 | /* Bit masks for USB_INTRRXE */ |
3020 | 2415 | ||
3021 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ | 2416 | #define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */ |
3022 | #define nEP1_RX_E 0x0 | ||
3023 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ | 2417 | #define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */ |
3024 | #define nEP2_RX_E 0x0 | ||
3025 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ | 2418 | #define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */ |
3026 | #define nEP3_RX_E 0x0 | ||
3027 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ | 2419 | #define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */ |
3028 | #define nEP4_RX_E 0x0 | ||
3029 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ | 2420 | #define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */ |
3030 | #define nEP5_RX_E 0x0 | ||
3031 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ | 2421 | #define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */ |
3032 | #define nEP6_RX_E 0x0 | ||
3033 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ | 2422 | #define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */ |
3034 | #define nEP7_RX_E 0x0 | ||
3035 | 2423 | ||
3036 | /* Bit masks for USB_INTRUSB */ | 2424 | /* Bit masks for USB_INTRUSB */ |
3037 | 2425 | ||
3038 | #define SUSPEND_B 0x1 /* Suspend indicator */ | 2426 | #define SUSPEND_B 0x1 /* Suspend indicator */ |
3039 | #define nSUSPEND_B 0x0 | ||
3040 | #define RESUME_B 0x2 /* Resume indicator */ | 2427 | #define RESUME_B 0x2 /* Resume indicator */ |
3041 | #define nRESUME_B 0x0 | ||
3042 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ | 2428 | #define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */ |
3043 | #define nRESET_OR_BABLE_B 0x0 | ||
3044 | #define SOF_B 0x8 /* Start of frame */ | 2429 | #define SOF_B 0x8 /* Start of frame */ |
3045 | #define nSOF_B 0x0 | ||
3046 | #define CONN_B 0x10 /* Connection indicator */ | 2430 | #define CONN_B 0x10 /* Connection indicator */ |
3047 | #define nCONN_B 0x0 | ||
3048 | #define DISCON_B 0x20 /* Disconnect indicator */ | 2431 | #define DISCON_B 0x20 /* Disconnect indicator */ |
3049 | #define nDISCON_B 0x0 | ||
3050 | #define SESSION_REQ_B 0x40 /* Session Request */ | 2432 | #define SESSION_REQ_B 0x40 /* Session Request */ |
3051 | #define nSESSION_REQ_B 0x0 | ||
3052 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ | 2433 | #define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */ |
3053 | #define nVBUS_ERROR_B 0x0 | ||
3054 | 2434 | ||
3055 | /* Bit masks for USB_INTRUSBE */ | 2435 | /* Bit masks for USB_INTRUSBE */ |
3056 | 2436 | ||
3057 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ | 2437 | #define SUSPEND_BE 0x1 /* Suspend indicator int enable */ |
3058 | #define nSUSPEND_BE 0x0 | ||
3059 | #define RESUME_BE 0x2 /* Resume indicator int enable */ | 2438 | #define RESUME_BE 0x2 /* Resume indicator int enable */ |
3060 | #define nRESUME_BE 0x0 | ||
3061 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ | 2439 | #define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */ |
3062 | #define nRESET_OR_BABLE_BE 0x0 | ||
3063 | #define SOF_BE 0x8 /* Start of frame int enable */ | 2440 | #define SOF_BE 0x8 /* Start of frame int enable */ |
3064 | #define nSOF_BE 0x0 | ||
3065 | #define CONN_BE 0x10 /* Connection indicator int enable */ | 2441 | #define CONN_BE 0x10 /* Connection indicator int enable */ |
3066 | #define nCONN_BE 0x0 | ||
3067 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ | 2442 | #define DISCON_BE 0x20 /* Disconnect indicator int enable */ |
3068 | #define nDISCON_BE 0x0 | ||
3069 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ | 2443 | #define SESSION_REQ_BE 0x40 /* Session Request int enable */ |
3070 | #define nSESSION_REQ_BE 0x0 | ||
3071 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ | 2444 | #define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */ |
3072 | #define nVBUS_ERROR_BE 0x0 | ||
3073 | 2445 | ||
3074 | /* Bit masks for USB_FRAME */ | 2446 | /* Bit masks for USB_FRAME */ |
3075 | 2447 | ||
@@ -3082,117 +2454,67 @@ | |||
3082 | /* Bit masks for USB_GLOBAL_CTL */ | 2454 | /* Bit masks for USB_GLOBAL_CTL */ |
3083 | 2455 | ||
3084 | #define GLOBAL_ENA 0x1 /* enables USB module */ | 2456 | #define GLOBAL_ENA 0x1 /* enables USB module */ |
3085 | #define nGLOBAL_ENA 0x0 | ||
3086 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ | 2457 | #define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */ |
3087 | #define nEP1_TX_ENA 0x0 | ||
3088 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ | 2458 | #define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */ |
3089 | #define nEP2_TX_ENA 0x0 | ||
3090 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ | 2459 | #define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */ |
3091 | #define nEP3_TX_ENA 0x0 | ||
3092 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ | 2460 | #define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */ |
3093 | #define nEP4_TX_ENA 0x0 | ||
3094 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ | 2461 | #define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */ |
3095 | #define nEP5_TX_ENA 0x0 | ||
3096 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ | 2462 | #define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */ |
3097 | #define nEP6_TX_ENA 0x0 | ||
3098 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ | 2463 | #define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */ |
3099 | #define nEP7_TX_ENA 0x0 | ||
3100 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ | 2464 | #define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */ |
3101 | #define nEP1_RX_ENA 0x0 | ||
3102 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ | 2465 | #define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */ |
3103 | #define nEP2_RX_ENA 0x0 | ||
3104 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ | 2466 | #define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */ |
3105 | #define nEP3_RX_ENA 0x0 | ||
3106 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ | 2467 | #define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */ |
3107 | #define nEP4_RX_ENA 0x0 | ||
3108 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ | 2468 | #define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */ |
3109 | #define nEP5_RX_ENA 0x0 | ||
3110 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ | 2469 | #define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */ |
3111 | #define nEP6_RX_ENA 0x0 | ||
3112 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ | 2470 | #define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */ |
3113 | #define nEP7_RX_ENA 0x0 | ||
3114 | 2471 | ||
3115 | /* Bit masks for USB_OTG_DEV_CTL */ | 2472 | /* Bit masks for USB_OTG_DEV_CTL */ |
3116 | 2473 | ||
3117 | #define SESSION 0x1 /* session indicator */ | 2474 | #define SESSION 0x1 /* session indicator */ |
3118 | #define nSESSION 0x0 | ||
3119 | #define HOST_REQ 0x2 /* Host negotiation request */ | 2475 | #define HOST_REQ 0x2 /* Host negotiation request */ |
3120 | #define nHOST_REQ 0x0 | ||
3121 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ | 2476 | #define HOST_MODE 0x4 /* indicates USBDRC is a host */ |
3122 | #define nHOST_MODE 0x0 | ||
3123 | #define VBUS0 0x8 /* Vbus level indicator[0] */ | 2477 | #define VBUS0 0x8 /* Vbus level indicator[0] */ |
3124 | #define nVBUS0 0x0 | ||
3125 | #define VBUS1 0x10 /* Vbus level indicator[1] */ | 2478 | #define VBUS1 0x10 /* Vbus level indicator[1] */ |
3126 | #define nVBUS1 0x0 | ||
3127 | #define LSDEV 0x20 /* Low-speed indicator */ | 2479 | #define LSDEV 0x20 /* Low-speed indicator */ |
3128 | #define nLSDEV 0x0 | ||
3129 | #define FSDEV 0x40 /* Full or High-speed indicator */ | 2480 | #define FSDEV 0x40 /* Full or High-speed indicator */ |
3130 | #define nFSDEV 0x0 | ||
3131 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ | 2481 | #define B_DEVICE 0x80 /* A' or 'B' device indicator */ |
3132 | #define nB_DEVICE 0x0 | ||
3133 | 2482 | ||
3134 | /* Bit masks for USB_OTG_VBUS_IRQ */ | 2483 | /* Bit masks for USB_OTG_VBUS_IRQ */ |
3135 | 2484 | ||
3136 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ | 2485 | #define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */ |
3137 | #define nDRIVE_VBUS_ON 0x0 | ||
3138 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ | 2486 | #define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */ |
3139 | #define nDRIVE_VBUS_OFF 0x0 | ||
3140 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ | 2487 | #define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */ |
3141 | #define nCHRG_VBUS_START 0x0 | ||
3142 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ | 2488 | #define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */ |
3143 | #define nCHRG_VBUS_END 0x0 | ||
3144 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ | 2489 | #define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */ |
3145 | #define nDISCHRG_VBUS_START 0x0 | ||
3146 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ | 2490 | #define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */ |
3147 | #define nDISCHRG_VBUS_END 0x0 | ||
3148 | 2491 | ||
3149 | /* Bit masks for USB_OTG_VBUS_MASK */ | 2492 | /* Bit masks for USB_OTG_VBUS_MASK */ |
3150 | 2493 | ||
3151 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ | 2494 | #define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */ |
3152 | #define nDRIVE_VBUS_ON_ENA 0x0 | ||
3153 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ | 2495 | #define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */ |
3154 | #define nDRIVE_VBUS_OFF_ENA 0x0 | ||
3155 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ | 2496 | #define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */ |
3156 | #define nCHRG_VBUS_START_ENA 0x0 | ||
3157 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ | 2497 | #define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */ |
3158 | #define nCHRG_VBUS_END_ENA 0x0 | ||
3159 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ | 2498 | #define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */ |
3160 | #define nDISCHRG_VBUS_START_ENA 0x0 | ||
3161 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ | 2499 | #define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */ |
3162 | #define nDISCHRG_VBUS_END_ENA 0x0 | ||
3163 | 2500 | ||
3164 | /* Bit masks for USB_CSR0 */ | 2501 | /* Bit masks for USB_CSR0 */ |
3165 | 2502 | ||
3166 | #define RXPKTRDY 0x1 /* data packet receive indicator */ | 2503 | #define RXPKTRDY 0x1 /* data packet receive indicator */ |
3167 | #define nRXPKTRDY 0x0 | ||
3168 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ | 2504 | #define TXPKTRDY 0x2 /* data packet in FIFO indicator */ |
3169 | #define nTXPKTRDY 0x0 | ||
3170 | #define STALL_SENT 0x4 /* STALL handshake sent */ | 2505 | #define STALL_SENT 0x4 /* STALL handshake sent */ |
3171 | #define nSTALL_SENT 0x0 | ||
3172 | #define DATAEND 0x8 /* Data end indicator */ | 2506 | #define DATAEND 0x8 /* Data end indicator */ |
3173 | #define nDATAEND 0x0 | ||
3174 | #define SETUPEND 0x10 /* Setup end */ | 2507 | #define SETUPEND 0x10 /* Setup end */ |
3175 | #define nSETUPEND 0x0 | ||
3176 | #define SENDSTALL 0x20 /* Send STALL handshake */ | 2508 | #define SENDSTALL 0x20 /* Send STALL handshake */ |
3177 | #define nSENDSTALL 0x0 | ||
3178 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ | 2509 | #define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */ |
3179 | #define nSERVICED_RXPKTRDY 0x0 | ||
3180 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ | 2510 | #define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */ |
3181 | #define nSERVICED_SETUPEND 0x0 | ||
3182 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ | 2511 | #define FLUSHFIFO 0x100 /* flush endpoint FIFO */ |
3183 | #define nFLUSHFIFO 0x0 | ||
3184 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ | 2512 | #define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */ |
3185 | #define nSTALL_RECEIVED_H 0x0 | ||
3186 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ | 2513 | #define SETUPPKT_H 0x8 /* send Setup token host mode */ |
3187 | #define nSETUPPKT_H 0x0 | ||
3188 | #define ERROR_H 0x10 /* timeout error indicator host mode */ | 2514 | #define ERROR_H 0x10 /* timeout error indicator host mode */ |
3189 | #define nERROR_H 0x0 | ||
3190 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ | 2515 | #define REQPKT_H 0x20 /* Request an IN transaction host mode */ |
3191 | #define nREQPKT_H 0x0 | ||
3192 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ | 2516 | #define STATUSPKT_H 0x40 /* Status stage transaction host mode */ |
3193 | #define nSTATUSPKT_H 0x0 | ||
3194 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ | 2517 | #define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */ |
3195 | #define nNAK_TIMEOUT_H 0x0 | ||
3196 | 2518 | ||
3197 | /* Bit masks for USB_COUNT0 */ | 2519 | /* Bit masks for USB_COUNT0 */ |
3198 | 2520 | ||
@@ -3213,37 +2535,21 @@ | |||
3213 | /* Bit masks for USB_TXCSR */ | 2535 | /* Bit masks for USB_TXCSR */ |
3214 | 2536 | ||
3215 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ | 2537 | #define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */ |
3216 | #define nTXPKTRDY_T 0x0 | ||
3217 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ | 2538 | #define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */ |
3218 | #define nFIFO_NOT_EMPTY_T 0x0 | ||
3219 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ | 2539 | #define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */ |
3220 | #define nUNDERRUN_T 0x0 | ||
3221 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ | 2540 | #define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */ |
3222 | #define nFLUSHFIFO_T 0x0 | ||
3223 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ | 2541 | #define STALL_SEND_T 0x10 /* issue a Stall handshake */ |
3224 | #define nSTALL_SEND_T 0x0 | ||
3225 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ | 2542 | #define STALL_SENT_T 0x20 /* Stall handshake transmitted */ |
3226 | #define nSTALL_SENT_T 0x0 | ||
3227 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ | 2543 | #define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */ |
3228 | #define nCLEAR_DATATOGGLE_T 0x0 | ||
3229 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ | 2544 | #define INCOMPTX_T 0x80 /* indicates that a large packet is split */ |
3230 | #define nINCOMPTX_T 0x0 | ||
3231 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ | 2545 | #define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */ |
3232 | #define nDMAREQMODE_T 0x0 | ||
3233 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ | 2546 | #define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */ |
3234 | #define nFORCE_DATATOGGLE_T 0x0 | ||
3235 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ | 2547 | #define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */ |
3236 | #define nDMAREQ_ENA_T 0x0 | ||
3237 | #define ISO_T 0x4000 /* enable Isochronous transfers */ | 2548 | #define ISO_T 0x4000 /* enable Isochronous transfers */ |
3238 | #define nISO_T 0x0 | ||
3239 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ | 2549 | #define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */ |
3240 | #define nAUTOSET_T 0x0 | ||
3241 | #define ERROR_TH 0x4 /* error condition host mode */ | 2550 | #define ERROR_TH 0x4 /* error condition host mode */ |
3242 | #define nERROR_TH 0x0 | ||
3243 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ | 2551 | #define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */ |
3244 | #define nSTALL_RECEIVED_TH 0x0 | ||
3245 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ | 2552 | #define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */ |
3246 | #define nNAK_TIMEOUT_TH 0x0 | ||
3247 | 2553 | ||
3248 | /* Bit masks for USB_TXCOUNT */ | 2554 | /* Bit masks for USB_TXCOUNT */ |
3249 | 2555 | ||
@@ -3252,45 +2558,25 @@ | |||
3252 | /* Bit masks for USB_RXCSR */ | 2558 | /* Bit masks for USB_RXCSR */ |
3253 | 2559 | ||
3254 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ | 2560 | #define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */ |
3255 | #define nRXPKTRDY_R 0x0 | ||
3256 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ | 2561 | #define FIFO_FULL_R 0x2 /* FIFO not empty */ |
3257 | #define nFIFO_FULL_R 0x0 | ||
3258 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ | 2562 | #define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */ |
3259 | #define nOVERRUN_R 0x0 | ||
3260 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ | 2563 | #define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */ |
3261 | #define nDATAERROR_R 0x0 | ||
3262 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ | 2564 | #define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */ |
3263 | #define nFLUSHFIFO_R 0x0 | ||
3264 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ | 2565 | #define STALL_SEND_R 0x20 /* issue a Stall handshake */ |
3265 | #define nSTALL_SEND_R 0x0 | ||
3266 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ | 2566 | #define STALL_SENT_R 0x40 /* Stall handshake transmitted */ |
3267 | #define nSTALL_SENT_R 0x0 | ||
3268 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ | 2567 | #define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */ |
3269 | #define nCLEAR_DATATOGGLE_R 0x0 | ||
3270 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ | 2568 | #define INCOMPRX_R 0x100 /* indicates that a large packet is split */ |
3271 | #define nINCOMPRX_R 0x0 | ||
3272 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ | 2569 | #define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */ |
3273 | #define nDMAREQMODE_R 0x0 | ||
3274 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ | 2570 | #define DISNYET_R 0x1000 /* disable Nyet handshakes */ |
3275 | #define nDISNYET_R 0x0 | ||
3276 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ | 2571 | #define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */ |
3277 | #define nDMAREQ_ENA_R 0x0 | ||
3278 | #define ISO_R 0x4000 /* enable Isochronous transfers */ | 2572 | #define ISO_R 0x4000 /* enable Isochronous transfers */ |
3279 | #define nISO_R 0x0 | ||
3280 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ | 2573 | #define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */ |
3281 | #define nAUTOCLEAR_R 0x0 | ||
3282 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ | 2574 | #define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */ |
3283 | #define nERROR_RH 0x0 | ||
3284 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ | 2575 | #define REQPKT_RH 0x20 /* request an IN transaction host mode */ |
3285 | #define nREQPKT_RH 0x0 | ||
3286 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ | 2576 | #define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */ |
3287 | #define nSTALL_RECEIVED_RH 0x0 | ||
3288 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ | 2577 | #define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */ |
3289 | #define nINCOMPRX_RH 0x0 | ||
3290 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ | 2578 | #define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */ |
3291 | #define nDMAREQMODE_RH 0x0 | ||
3292 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ | 2579 | #define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */ |
3293 | #define nAUTOREQ_RH 0x0 | ||
3294 | 2580 | ||
3295 | /* Bit masks for USB_RXCOUNT */ | 2581 | /* Bit masks for USB_RXCOUNT */ |
3296 | 2582 | ||
@@ -3317,35 +2603,22 @@ | |||
3317 | /* Bit masks for USB_DMA_INTERRUPT */ | 2603 | /* Bit masks for USB_DMA_INTERRUPT */ |
3318 | 2604 | ||
3319 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ | 2605 | #define DMA0_INT 0x1 /* DMA0 pending interrupt */ |
3320 | #define nDMA0_INT 0x0 | ||
3321 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ | 2606 | #define DMA1_INT 0x2 /* DMA1 pending interrupt */ |
3322 | #define nDMA1_INT 0x0 | ||
3323 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ | 2607 | #define DMA2_INT 0x4 /* DMA2 pending interrupt */ |
3324 | #define nDMA2_INT 0x0 | ||
3325 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ | 2608 | #define DMA3_INT 0x8 /* DMA3 pending interrupt */ |
3326 | #define nDMA3_INT 0x0 | ||
3327 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ | 2609 | #define DMA4_INT 0x10 /* DMA4 pending interrupt */ |
3328 | #define nDMA4_INT 0x0 | ||
3329 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ | 2610 | #define DMA5_INT 0x20 /* DMA5 pending interrupt */ |
3330 | #define nDMA5_INT 0x0 | ||
3331 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ | 2611 | #define DMA6_INT 0x40 /* DMA6 pending interrupt */ |
3332 | #define nDMA6_INT 0x0 | ||
3333 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ | 2612 | #define DMA7_INT 0x80 /* DMA7 pending interrupt */ |
3334 | #define nDMA7_INT 0x0 | ||
3335 | 2613 | ||
3336 | /* Bit masks for USB_DMAxCONTROL */ | 2614 | /* Bit masks for USB_DMAxCONTROL */ |
3337 | 2615 | ||
3338 | #define DMA_ENA 0x1 /* DMA enable */ | 2616 | #define DMA_ENA 0x1 /* DMA enable */ |
3339 | #define nDMA_ENA 0x0 | ||
3340 | #define DIRECTION 0x2 /* direction of DMA transfer */ | 2617 | #define DIRECTION 0x2 /* direction of DMA transfer */ |
3341 | #define nDIRECTION 0x0 | ||
3342 | #define MODE 0x4 /* DMA Bus error */ | 2618 | #define MODE 0x4 /* DMA Bus error */ |
3343 | #define nMODE 0x0 | ||
3344 | #define INT_ENA 0x8 /* Interrupt enable */ | 2619 | #define INT_ENA 0x8 /* Interrupt enable */ |
3345 | #define nINT_ENA 0x0 | ||
3346 | #define EPNUM 0xf0 /* EP number */ | 2620 | #define EPNUM 0xf0 /* EP number */ |
3347 | #define BUSERROR 0x100 /* DMA Bus error */ | 2621 | #define BUSERROR 0x100 /* DMA Bus error */ |
3348 | #define nBUSERROR 0x0 | ||
3349 | 2622 | ||
3350 | /* Bit masks for USB_DMAxADDRHIGH */ | 2623 | /* Bit masks for USB_DMAxADDRHIGH */ |
3351 | 2624 | ||
@@ -3366,26 +2639,16 @@ | |||
3366 | /* Bit masks for HMDMAx_CONTROL */ | 2639 | /* Bit masks for HMDMAx_CONTROL */ |
3367 | 2640 | ||
3368 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ | 2641 | #define HMDMAEN 0x1 /* Handshake MDMA Enable */ |
3369 | #define nHMDMAEN 0x0 | ||
3370 | #define REP 0x2 /* Handshake MDMA Request Polarity */ | 2642 | #define REP 0x2 /* Handshake MDMA Request Polarity */ |
3371 | #define nREP 0x0 | ||
3372 | #define UTE 0x8 /* Urgency Threshold Enable */ | 2643 | #define UTE 0x8 /* Urgency Threshold Enable */ |
3373 | #define nUTE 0x0 | ||
3374 | #define OIE 0x10 /* Overflow Interrupt Enable */ | 2644 | #define OIE 0x10 /* Overflow Interrupt Enable */ |
3375 | #define nOIE 0x0 | ||
3376 | #define BDIE 0x20 /* Block Done Interrupt Enable */ | 2645 | #define BDIE 0x20 /* Block Done Interrupt Enable */ |
3377 | #define nBDIE 0x0 | ||
3378 | #define MBDI 0x40 /* Mask Block Done Interrupt */ | 2646 | #define MBDI 0x40 /* Mask Block Done Interrupt */ |
3379 | #define nMBDI 0x0 | ||
3380 | #define DRQ 0x300 /* Handshake MDMA Request Type */ | 2647 | #define DRQ 0x300 /* Handshake MDMA Request Type */ |
3381 | #define RBC 0x1000 /* Force Reload of BCOUNT */ | 2648 | #define RBC 0x1000 /* Force Reload of BCOUNT */ |
3382 | #define nRBC 0x0 | ||
3383 | #define PS 0x2000 /* Pin Status */ | 2649 | #define PS 0x2000 /* Pin Status */ |
3384 | #define nPS 0x0 | ||
3385 | #define OI 0x4000 /* Overflow Interrupt Generated */ | 2650 | #define OI 0x4000 /* Overflow Interrupt Generated */ |
3386 | #define nOI 0x0 | ||
3387 | #define BDI 0x8000 /* Block Done Interrupt Generated */ | 2651 | #define BDI 0x8000 /* Block Done Interrupt Generated */ |
3388 | #define nBDI 0x0 | ||
3389 | 2652 | ||
3390 | /* ******************************************* */ | 2653 | /* ******************************************* */ |
3391 | /* MULTI BIT MACRO ENUMERATIONS */ | 2654 | /* MULTI BIT MACRO ENUMERATIONS */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index a1b200fe6a1f..895ddd40a838 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */ | 47 | /* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */ |
48 | 48 | ||
49 | #define CHIPID 0xffc00014 | 49 | #define CHIPID 0xffc00014 |
50 | 50 | ||
51 | /* System Reset and Interrupt Controller (0xFFC00100 - 0xFFC00104) */ | 51 | /* System Reset and Interrupt Controller (0xFFC00100 - 0xFFC00104) */ |
52 | 52 | ||
@@ -1512,231 +1512,144 @@ | |||
1512 | /* and MULTI BIT READ MACROS */ | 1512 | /* and MULTI BIT READ MACROS */ |
1513 | /* ********************************************************** */ | 1513 | /* ********************************************************** */ |
1514 | 1514 | ||
1515 | /* SIC_IMASK Masks */ | ||
1516 | #define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */ | ||
1517 | #define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */ | ||
1518 | #define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */ | ||
1519 | #define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */ | ||
1520 | |||
1521 | /* SIC_IWR Masks */ | ||
1522 | #define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */ | ||
1523 | #define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */ | ||
1524 | #define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */ | ||
1525 | #define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */ | ||
1526 | |||
1515 | /* Bit masks for SIC_IAR0 */ | 1527 | /* Bit masks for SIC_IAR0 */ |
1516 | 1528 | ||
1517 | #define IRQ_PLL_WAKEUP 0x1 /* PLL Wakeup */ | 1529 | #define PLL_WAKEUP 0x1 /* PLL Wakeup */ |
1518 | #define nIRQ_PLL_WAKEUP 0x0 | ||
1519 | 1530 | ||
1520 | /* Bit masks for SIC_IWR0, SIC_IMASK0, SIC_ISR0 */ | 1531 | /* Bit masks for SIC_IWR0, SIC_IMASK0, SIC_ISR0 */ |
1521 | 1532 | ||
1522 | #define IRQ_DMA0_ERR 0x2 /* DMA Controller 0 Error */ | 1533 | #define DMA0_ERR 0x2 /* DMA Controller 0 Error */ |
1523 | #define nIRQ_DMA0_ERR 0x0 | 1534 | #define EPPI0_ERR 0x4 /* EPPI0 Error */ |
1524 | #define IRQ_EPPI0_ERR 0x4 /* EPPI0 Error */ | 1535 | #define SPORT0_ERR 0x8 /* SPORT0 Error */ |
1525 | #define nIRQ_EPPI0_ERR 0x0 | 1536 | #define SPORT1_ERR 0x10 /* SPORT1 Error */ |
1526 | #define IRQ_SPORT0_ERR 0x8 /* SPORT0 Error */ | 1537 | #define SPI0_ERR 0x20 /* SPI0 Error */ |
1527 | #define nIRQ_SPORT0_ERR 0x0 | 1538 | #define UART0_ERR 0x40 /* UART0 Error */ |
1528 | #define IRQ_SPORT1_ERR 0x10 /* SPORT1 Error */ | 1539 | #define RTC 0x80 /* Real-Time Clock */ |
1529 | #define nIRQ_SPORT1_ERR 0x0 | 1540 | #define DMA12 0x100 /* DMA Channel 12 */ |
1530 | #define IRQ_SPI0_ERR 0x20 /* SPI0 Error */ | 1541 | #define DMA0 0x200 /* DMA Channel 0 */ |
1531 | #define nIRQ_SPI0_ERR 0x0 | 1542 | #define DMA1 0x400 /* DMA Channel 1 */ |
1532 | #define IRQ_UART0_ERR 0x40 /* UART0 Error */ | 1543 | #define DMA2 0x800 /* DMA Channel 2 */ |
1533 | #define nIRQ_UART0_ERR 0x0 | 1544 | #define DMA3 0x1000 /* DMA Channel 3 */ |
1534 | #define IRQ_RTC 0x80 /* Real-Time Clock */ | 1545 | #define DMA4 0x2000 /* DMA Channel 4 */ |
1535 | #define nIRQ_RTC 0x0 | 1546 | #define DMA6 0x4000 /* DMA Channel 6 */ |
1536 | #define IRQ_DMA12 0x100 /* DMA Channel 12 */ | 1547 | #define DMA7 0x8000 /* DMA Channel 7 */ |
1537 | #define nIRQ_DMA12 0x0 | 1548 | #define PINT0 0x80000 /* Pin Interrupt 0 */ |
1538 | #define IRQ_DMA0 0x200 /* DMA Channel 0 */ | 1549 | #define PINT1 0x100000 /* Pin Interrupt 1 */ |
1539 | #define nIRQ_DMA0 0x0 | 1550 | #define MDMA0 0x200000 /* Memory DMA Stream 0 */ |
1540 | #define IRQ_DMA1 0x400 /* DMA Channel 1 */ | 1551 | #define MDMA1 0x400000 /* Memory DMA Stream 1 */ |
1541 | #define nIRQ_DMA1 0x0 | 1552 | #define WDOG 0x800000 /* Watchdog Timer */ |
1542 | #define IRQ_DMA2 0x800 /* DMA Channel 2 */ | 1553 | #define DMA1_ERR 0x1000000 /* DMA Controller 1 Error */ |
1543 | #define nIRQ_DMA2 0x0 | 1554 | #define SPORT2_ERR 0x2000000 /* SPORT2 Error */ |
1544 | #define IRQ_DMA3 0x1000 /* DMA Channel 3 */ | 1555 | #define SPORT3_ERR 0x4000000 /* SPORT3 Error */ |
1545 | #define nIRQ_DMA3 0x0 | 1556 | #define MXVR_SD 0x8000000 /* MXVR Synchronous Data */ |
1546 | #define IRQ_DMA4 0x2000 /* DMA Channel 4 */ | 1557 | #define SPI1_ERR 0x10000000 /* SPI1 Error */ |
1547 | #define nIRQ_DMA4 0x0 | 1558 | #define SPI2_ERR 0x20000000 /* SPI2 Error */ |
1548 | #define IRQ_DMA6 0x4000 /* DMA Channel 6 */ | 1559 | #define UART1_ERR 0x40000000 /* UART1 Error */ |
1549 | #define nIRQ_DMA6 0x0 | 1560 | #define UART2_ERR 0x80000000 /* UART2 Error */ |
1550 | #define IRQ_DMA7 0x8000 /* DMA Channel 7 */ | ||
1551 | #define nIRQ_DMA7 0x0 | ||
1552 | #define IRQ_PINT0 0x80000 /* Pin Interrupt 0 */ | ||
1553 | #define nIRQ_PINT0 0x0 | ||
1554 | #define IRQ_PINT1 0x100000 /* Pin Interrupt 1 */ | ||
1555 | #define nIRQ_PINT1 0x0 | ||
1556 | #define IRQ_MDMA0 0x200000 /* Memory DMA Stream 0 */ | ||
1557 | #define nIRQ_MDMA0 0x0 | ||
1558 | #define IRQ_MDMA1 0x400000 /* Memory DMA Stream 1 */ | ||
1559 | #define nIRQ_MDMA1 0x0 | ||
1560 | #define IRQ_WDOG 0x800000 /* Watchdog Timer */ | ||
1561 | #define nIRQ_WDOG 0x0 | ||
1562 | #define IRQ_DMA1_ERR 0x1000000 /* DMA Controller 1 Error */ | ||
1563 | #define nIRQ_DMA1_ERR 0x0 | ||
1564 | #define IRQ_SPORT2_ERR 0x2000000 /* SPORT2 Error */ | ||
1565 | #define nIRQ_SPORT2_ERR 0x0 | ||
1566 | #define IRQ_SPORT3_ERR 0x4000000 /* SPORT3 Error */ | ||
1567 | #define nIRQ_SPORT3_ERR 0x0 | ||
1568 | #define IRQ_MXVR_SD 0x8000000 /* MXVR Synchronous Data */ | ||
1569 | #define nIRQ_MXVR_SD 0x0 | ||
1570 | #define IRQ_SPI1_ERR 0x10000000 /* SPI1 Error */ | ||
1571 | #define nIRQ_SPI1_ERR 0x0 | ||
1572 | #define IRQ_SPI2_ERR 0x20000000 /* SPI2 Error */ | ||
1573 | #define nIRQ_SPI2_ERR 0x0 | ||
1574 | #define IRQ_UART1_ERR 0x40000000 /* UART1 Error */ | ||
1575 | #define nIRQ_UART1_ERR 0x0 | ||
1576 | #define IRQ_UART2_ERR 0x80000000 /* UART2 Error */ | ||
1577 | #define nIRQ_UART2_ERR 0x0 | ||
1578 | 1561 | ||
1579 | /* Bit masks for SIC_IWR1, SIC_IMASK1, SIC_ISR1 */ | 1562 | /* Bit masks for SIC_IWR1, SIC_IMASK1, SIC_ISR1 */ |
1580 | 1563 | ||
1581 | #define IRQ_CAN0_ERR 0x1 /* CAN0 Error */ | 1564 | #define CAN0_ERR 0x1 /* CAN0 Error */ |
1582 | #define nIRQ_CAN0_ERR 0x0 | 1565 | #define DMA18 0x2 /* DMA Channel 18 */ |
1583 | #define IRQ_DMA18 0x2 /* DMA Channel 18 */ | 1566 | #define DMA19 0x4 /* DMA Channel 19 */ |
1584 | #define nIRQ_DMA18 0x0 | 1567 | #define DMA20 0x8 /* DMA Channel 20 */ |
1585 | #define IRQ_DMA19 0x4 /* DMA Channel 19 */ | 1568 | #define DMA21 0x10 /* DMA Channel 21 */ |
1586 | #define nIRQ_DMA19 0x0 | 1569 | #define DMA13 0x20 /* DMA Channel 13 */ |
1587 | #define IRQ_DMA20 0x8 /* DMA Channel 20 */ | 1570 | #define DMA14 0x40 /* DMA Channel 14 */ |
1588 | #define nIRQ_DMA20 0x0 | 1571 | #define DMA5 0x80 /* DMA Channel 5 */ |
1589 | #define IRQ_DMA21 0x10 /* DMA Channel 21 */ | 1572 | #define DMA23 0x100 /* DMA Channel 23 */ |
1590 | #define nIRQ_DMA21 0x0 | 1573 | #define DMA8 0x200 /* DMA Channel 8 */ |
1591 | #define IRQ_DMA13 0x20 /* DMA Channel 13 */ | 1574 | #define DMA9 0x400 /* DMA Channel 9 */ |
1592 | #define nIRQ_DMA13 0x0 | 1575 | #define DMA10 0x800 /* DMA Channel 10 */ |
1593 | #define IRQ_DMA14 0x40 /* DMA Channel 14 */ | 1576 | #define DMA11 0x1000 /* DMA Channel 11 */ |
1594 | #define nIRQ_DMA14 0x0 | 1577 | #define TWI0 0x2000 /* TWI0 */ |
1595 | #define IRQ_DMA5 0x80 /* DMA Channel 5 */ | 1578 | #define TWI1 0x4000 /* TWI1 */ |
1596 | #define nIRQ_DMA5 0x0 | 1579 | #define CAN0_RX 0x8000 /* CAN0 Receive */ |
1597 | #define IRQ_DMA23 0x100 /* DMA Channel 23 */ | 1580 | #define CAN0_TX 0x10000 /* CAN0 Transmit */ |
1598 | #define nIRQ_DMA23 0x0 | 1581 | #define MDMA2 0x20000 /* Memory DMA Stream 0 */ |
1599 | #define IRQ_DMA8 0x200 /* DMA Channel 8 */ | 1582 | #define MDMA3 0x40000 /* Memory DMA Stream 1 */ |
1600 | #define nIRQ_DMA8 0x0 | 1583 | #define MXVR_STAT 0x80000 /* MXVR Status */ |
1601 | #define IRQ_DMA9 0x400 /* DMA Channel 9 */ | 1584 | #define MXVR_CM 0x100000 /* MXVR Control Message */ |
1602 | #define nIRQ_DMA9 0x0 | 1585 | #define MXVR_AP 0x200000 /* MXVR Asynchronous Packet */ |
1603 | #define IRQ_DMA10 0x800 /* DMA Channel 10 */ | 1586 | #define EPPI1_ERR 0x400000 /* EPPI1 Error */ |
1604 | #define nIRQ_DMA10 0x0 | 1587 | #define EPPI2_ERR 0x800000 /* EPPI2 Error */ |
1605 | #define IRQ_DMA11 0x1000 /* DMA Channel 11 */ | 1588 | #define UART3_ERR 0x1000000 /* UART3 Error */ |
1606 | #define nIRQ_DMA11 0x0 | 1589 | #define HOST_ERR 0x2000000 /* Host DMA Port Error */ |
1607 | #define IRQ_TWI0 0x2000 /* TWI0 */ | 1590 | #define USB_ERR 0x4000000 /* USB Error */ |
1608 | #define nIRQ_TWI0 0x0 | 1591 | #define PIXC_ERR 0x8000000 /* Pixel Compositor Error */ |
1609 | #define IRQ_TWI1 0x4000 /* TWI1 */ | 1592 | #define NFC_ERR 0x10000000 /* Nand Flash Controller Error */ |
1610 | #define nIRQ_TWI1 0x0 | 1593 | #define ATAPI_ERR 0x20000000 /* ATAPI Error */ |
1611 | #define IRQ_CAN0_RX 0x8000 /* CAN0 Receive */ | 1594 | #define CAN1_ERR 0x40000000 /* CAN1 Error */ |
1612 | #define nIRQ_CAN0_RX 0x0 | 1595 | #define DMAR0_ERR 0x80000000 /* DMAR0 Overflow Error */ |
1613 | #define IRQ_CAN0_TX 0x10000 /* CAN0 Transmit */ | 1596 | #define DMAR1_ERR 0x80000000 /* DMAR1 Overflow Error */ |
1614 | #define nIRQ_CAN0_TX 0x0 | 1597 | #define DMAR0 0x80000000 /* DMAR0 Block */ |
1615 | #define IRQ_MDMA2 0x20000 /* Memory DMA Stream 0 */ | 1598 | #define DMAR1 0x80000000 /* DMAR1 Block */ |
1616 | #define nIRQ_MDMA2 0x0 | ||
1617 | #define IRQ_MDMA3 0x40000 /* Memory DMA Stream 1 */ | ||
1618 | #define nIRQ_MDMA3 0x0 | ||
1619 | #define IRQ_MXVR_STAT 0x80000 /* MXVR Status */ | ||
1620 | #define nIRQ_MXVR_STAT 0x0 | ||
1621 | #define IRQ_MXVR_CM 0x100000 /* MXVR Control Message */ | ||
1622 | #define nIRQ_MXVR_CM 0x0 | ||
1623 | #define IRQ_MXVR_AP 0x200000 /* MXVR Asynchronous Packet */ | ||
1624 | #define nIRQ_MXVR_AP 0x0 | ||
1625 | #define IRQ_EPPI1_ERR 0x400000 /* EPPI1 Error */ | ||
1626 | #define nIRQ_EPPI1_ERR 0x0 | ||
1627 | #define IRQ_EPPI2_ERR 0x800000 /* EPPI2 Error */ | ||
1628 | #define nIRQ_EPPI2_ERR 0x0 | ||
1629 | #define IRQ_UART3_ERR 0x1000000 /* UART3 Error */ | ||
1630 | #define nIRQ_UART3_ERR 0x0 | ||
1631 | #define IRQ_HOST_ERR 0x2000000 /* Host DMA Port Error */ | ||
1632 | #define nIRQ_HOST_ERR 0x0 | ||
1633 | #define IRQ_USB_ERR 0x4000000 /* USB Error */ | ||
1634 | #define nIRQ_USB_ERR 0x0 | ||
1635 | #define IRQ_PIXC_ERR 0x8000000 /* Pixel Compositor Error */ | ||
1636 | #define nIRQ_PIXC_ERR 0x0 | ||
1637 | #define IRQ_NFC_ERR 0x10000000 /* Nand Flash Controller Error */ | ||
1638 | #define nIRQ_NFC_ERR 0x0 | ||
1639 | #define IRQ_ATAPI_ERR 0x20000000 /* ATAPI Error */ | ||
1640 | #define nIRQ_ATAPI_ERR 0x0 | ||
1641 | #define IRQ_CAN1_ERR 0x40000000 /* CAN1 Error */ | ||
1642 | #define nIRQ_CAN1_ERR 0x0 | ||
1643 | #define IRQ_DMAR0_ERR 0x80000000 /* DMAR0 Overflow Error */ | ||
1644 | #define nIRQ_DMAR0_ERR 0x0 | ||
1645 | #define IRQ_DMAR1_ERR 0x80000000 /* DMAR1 Overflow Error */ | ||
1646 | #define nIRQ_DMAR1_ERR 0x0 | ||
1647 | #define IRQ_DMAR0 0x80000000 /* DMAR0 Block */ | ||
1648 | #define nIRQ_DMAR0 0x0 | ||
1649 | #define IRQ_DMAR1 0x80000000 /* DMAR1 Block */ | ||
1650 | #define nIRQ_DMAR1 0x0 | ||
1651 | 1599 | ||
1652 | /* Bit masks for SIC_IWR2, SIC_IMASK2, SIC_ISR2 */ | 1600 | /* Bit masks for SIC_IWR2, SIC_IMASK2, SIC_ISR2 */ |
1653 | 1601 | ||
1654 | #define IRQ_DMA15 0x1 /* DMA Channel 15 */ | 1602 | #define DMA15 0x1 /* DMA Channel 15 */ |
1655 | #define nIRQ_DMA15 0x0 | 1603 | #define DMA16 0x2 /* DMA Channel 16 */ |
1656 | #define IRQ_DMA16 0x2 /* DMA Channel 16 */ | 1604 | #define DMA17 0x4 /* DMA Channel 17 */ |
1657 | #define nIRQ_DMA16 0x0 | 1605 | #define DMA22 0x8 /* DMA Channel 22 */ |
1658 | #define IRQ_DMA17 0x4 /* DMA Channel 17 */ | 1606 | #define CNT 0x10 /* Counter */ |
1659 | #define nIRQ_DMA17 0x0 | 1607 | #define KEY 0x20 /* Keypad */ |
1660 | #define IRQ_DMA22 0x8 /* DMA Channel 22 */ | 1608 | #define CAN1_RX 0x40 /* CAN1 Receive */ |
1661 | #define nIRQ_DMA22 0x0 | 1609 | #define CAN1_TX 0x80 /* CAN1 Transmit */ |
1662 | #define IRQ_CNT 0x10 /* Counter */ | 1610 | #define SDH_INT_MASK0 0x100 /* SDH Mask 0 */ |
1663 | #define nIRQ_CNT 0x0 | 1611 | #define SDH_INT_MASK1 0x200 /* SDH Mask 1 */ |
1664 | #define IRQ_KEY 0x20 /* Keypad */ | 1612 | #define USB_EINT 0x400 /* USB Exception */ |
1665 | #define nIRQ_KEY 0x0 | 1613 | #define USB_INT0 0x800 /* USB Interrupt 0 */ |
1666 | #define IRQ_CAN1_RX 0x40 /* CAN1 Receive */ | 1614 | #define USB_INT1 0x1000 /* USB Interrupt 1 */ |
1667 | #define nIRQ_CAN1_RX 0x0 | 1615 | #define USB_INT2 0x2000 /* USB Interrupt 2 */ |
1668 | #define IRQ_CAN1_TX 0x80 /* CAN1 Transmit */ | 1616 | #define USB_DMAINT 0x4000 /* USB DMA */ |
1669 | #define nIRQ_CAN1_TX 0x0 | 1617 | #define OTPSEC 0x8000 /* OTP Access Complete */ |
1670 | #define IRQ_SDH_MASK0 0x100 /* SDH Mask 0 */ | 1618 | #define TIMER0 0x400000 /* Timer 0 */ |
1671 | #define nIRQ_SDH_MASK0 0x0 | 1619 | #define TIMER1 0x800000 /* Timer 1 */ |
1672 | #define IRQ_SDH_MASK1 0x200 /* SDH Mask 1 */ | 1620 | #define TIMER2 0x1000000 /* Timer 2 */ |
1673 | #define nIRQ_SDH_MASK1 0x0 | 1621 | #define TIMER3 0x2000000 /* Timer 3 */ |
1674 | #define IRQ_USB_EINT 0x400 /* USB Exception */ | 1622 | #define TIMER4 0x4000000 /* Timer 4 */ |
1675 | #define nIRQ_USB_EINT 0x0 | 1623 | #define TIMER5 0x8000000 /* Timer 5 */ |
1676 | #define IRQ_USB_INT0 0x800 /* USB Interrupt 0 */ | 1624 | #define TIMER6 0x10000000 /* Timer 6 */ |
1677 | #define nIRQ_USB_INT0 0x0 | 1625 | #define TIMER7 0x20000000 /* Timer 7 */ |
1678 | #define IRQ_USB_INT1 0x1000 /* USB Interrupt 1 */ | 1626 | #define PINT2 0x40000000 /* Pin Interrupt 2 */ |
1679 | #define nIRQ_USB_INT1 0x0 | 1627 | #define PINT3 0x80000000 /* Pin Interrupt 3 */ |
1680 | #define IRQ_USB_INT2 0x2000 /* USB Interrupt 2 */ | ||
1681 | #define nIRQ_USB_INT2 0x0 | ||
1682 | #define IRQ_USB_DMAINT 0x4000 /* USB DMA */ | ||
1683 | #define nIRQ_USB_DMAINT 0x0 | ||
1684 | #define IRQ_OTPSEC 0x8000 /* OTP Access Complete */ | ||
1685 | #define nIRQ_OTPSEC 0x0 | ||
1686 | #define IRQ_TIMER0 0x400000 /* Timer 0 */ | ||
1687 | #define nIRQ_TIMER0 0x0 | ||
1688 | #define IRQ_TIMER1 0x800000 /* Timer 1 */ | ||
1689 | #define nIRQ_TIMER1 0x0 | ||
1690 | #define IRQ_TIMER2 0x1000000 /* Timer 2 */ | ||
1691 | #define nIRQ_TIMER2 0x0 | ||
1692 | #define IRQ_TIMER3 0x2000000 /* Timer 3 */ | ||
1693 | #define nIRQ_TIMER3 0x0 | ||
1694 | #define IRQ_TIMER4 0x4000000 /* Timer 4 */ | ||
1695 | #define nIRQ_TIMER4 0x0 | ||
1696 | #define IRQ_TIMER5 0x8000000 /* Timer 5 */ | ||
1697 | #define nIRQ_TIMER5 0x0 | ||
1698 | #define IRQ_TIMER6 0x10000000 /* Timer 6 */ | ||
1699 | #define nIRQ_TIMER6 0x0 | ||
1700 | #define IRQ_TIMER7 0x20000000 /* Timer 7 */ | ||
1701 | #define nIRQ_TIMER7 0x0 | ||
1702 | #define IRQ_PINT2 0x40000000 /* Pin Interrupt 2 */ | ||
1703 | #define nIRQ_PINT2 0x0 | ||
1704 | #define IRQ_PINT3 0x80000000 /* Pin Interrupt 3 */ | ||
1705 | #define nIRQ_PINT3 0x0 | ||
1706 | 1628 | ||
1707 | /* Bit masks for DMAx_CONFIG, MDMA_Sx_CONFIG, MDMA_Dx_CONFIG */ | 1629 | /* Bit masks for DMAx_CONFIG, MDMA_Sx_CONFIG, MDMA_Dx_CONFIG */ |
1708 | 1630 | ||
1709 | #define DMAEN 0x1 /* DMA Channel Enable */ | 1631 | #define DMAEN 0x1 /* DMA Channel Enable */ |
1710 | #define nDMAEN 0x0 | ||
1711 | #define WNR 0x2 /* DMA Direction */ | 1632 | #define WNR 0x2 /* DMA Direction */ |
1712 | #define nWNR 0x0 | 1633 | #define WDSIZE_8 0x0 /* Transfer Word Size = 8 */ |
1713 | #define WDSIZE 0xc /* Transfer Word Size */ | 1634 | #define WDSIZE_16 0x4 /* Transfer Word Size = 16 */ |
1635 | #define WDSIZE_32 0x8 /* Transfer Word Size = 32 */ | ||
1714 | #define DMA2D 0x10 /* DMA Mode */ | 1636 | #define DMA2D 0x10 /* DMA Mode */ |
1715 | #define nDMA2D 0x0 | ||
1716 | #define RESTART 0x20 /* Work Unit Transitions */ | 1637 | #define RESTART 0x20 /* Work Unit Transitions */ |
1717 | #define nRESTART 0x0 | ||
1718 | #define DI_SEL 0x40 /* Data Interrupt Timing Select */ | 1638 | #define DI_SEL 0x40 /* Data Interrupt Timing Select */ |
1719 | #define nDI_SEL 0x0 | ||
1720 | #define DI_EN 0x80 /* Data Interrupt Enable */ | 1639 | #define DI_EN 0x80 /* Data Interrupt Enable */ |
1721 | #define nDI_EN 0x0 | ||
1722 | #define NDSIZE 0xf00 /* Flex Descriptor Size */ | 1640 | #define NDSIZE 0xf00 /* Flex Descriptor Size */ |
1723 | #define DMAFLOW 0xf000 /* Next Operation */ | 1641 | #define DMAFLOW 0xf000 /* Next Operation */ |
1724 | 1642 | ||
1725 | /* Bit masks for DMAx_IRQ_STATUS, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */ | 1643 | /* Bit masks for DMAx_IRQ_STATUS, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */ |
1726 | 1644 | ||
1727 | #define DMA_DONE 0x1 /* DMA Completion Interrupt Status */ | 1645 | #define DMA_DONE 0x1 /* DMA Completion Interrupt Status */ |
1728 | #define nDMA_DONE 0x0 | ||
1729 | #define DMA_ERR 0x2 /* DMA Error Interrupt Status */ | 1646 | #define DMA_ERR 0x2 /* DMA Error Interrupt Status */ |
1730 | #define nDMA_ERR 0x0 | ||
1731 | #define DFETCH 0x4 /* DMA Descriptor Fetch */ | 1647 | #define DFETCH 0x4 /* DMA Descriptor Fetch */ |
1732 | #define nDFETCH 0x0 | ||
1733 | #define DMA_RUN 0x8 /* DMA Channel Running */ | 1648 | #define DMA_RUN 0x8 /* DMA Channel Running */ |
1734 | #define nDMA_RUN 0x0 | ||
1735 | 1649 | ||
1736 | /* Bit masks for DMAx_PERIPHERAL_MAP, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */ | 1650 | /* Bit masks for DMAx_PERIPHERAL_MAP, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */ |
1737 | 1651 | ||
1738 | #define CTYPE 0x40 /* DMA Channel Type */ | 1652 | #define CTYPE 0x40 /* DMA Channel Type */ |
1739 | #define nCTYPE 0x0 | ||
1740 | #define PMAP 0xf000 /* Peripheral Mapped To This Channel */ | 1653 | #define PMAP 0xf000 /* Peripheral Mapped To This Channel */ |
1741 | 1654 | ||
1742 | /* Bit masks for DMACx_TCPER */ | 1655 | /* Bit masks for DMACx_TCPER */ |
@@ -1756,29 +1669,28 @@ | |||
1756 | /* Bit masks for DMAC1_PERIMUX */ | 1669 | /* Bit masks for DMAC1_PERIMUX */ |
1757 | 1670 | ||
1758 | #define PMUXSDH 0x1 /* Peripheral Select for DMA22 channel */ | 1671 | #define PMUXSDH 0x1 /* Peripheral Select for DMA22 channel */ |
1759 | #define nPMUXSDH 0x0 | ||
1760 | 1672 | ||
1761 | /* Bit masks for EBIU_AMGCTL */ | 1673 | /* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS *************************/ |
1674 | /* EBIU_AMGCTL Masks */ | ||
1675 | #define AMCKEN 0x0001 /* Enable CLKOUT */ | ||
1676 | #define AMBEN_NONE 0x0000 /* All Banks Disabled */ | ||
1677 | #define AMBEN_B0 0x0002 /* Enable Async Memory Bank 0 only */ | ||
1678 | #define AMBEN_B0_B1 0x0004 /* Enable Async Memory Banks 0 & 1 only */ | ||
1679 | #define AMBEN_B0_B1_B2 0x0006 /* Enable Async Memory Banks 0, 1, and 2 */ | ||
1680 | #define AMBEN_ALL 0x0008 /* Enable Async Memory Banks (all) 0, 1, 2, and 3 */ | ||
1762 | 1681 | ||
1763 | #define AMCKEN 0x1 /* Async Memory Enable */ | ||
1764 | #define nAMCKEN 0x0 | ||
1765 | #define AMBEN 0xe /* Async bank enable */ | ||
1766 | 1682 | ||
1767 | /* Bit masks for EBIU_AMBCTL0 */ | 1683 | /* Bit masks for EBIU_AMBCTL0 */ |
1768 | 1684 | ||
1769 | #define B0RDYEN 0x1 /* Bank 0 ARDY Enable */ | 1685 | #define B0RDYEN 0x1 /* Bank 0 ARDY Enable */ |
1770 | #define nB0RDYEN 0x0 | ||
1771 | #define B0RDYPOL 0x2 /* Bank 0 ARDY Polarity */ | 1686 | #define B0RDYPOL 0x2 /* Bank 0 ARDY Polarity */ |
1772 | #define nB0RDYPOL 0x0 | ||
1773 | #define B0TT 0xc /* Bank 0 transition time */ | 1687 | #define B0TT 0xc /* Bank 0 transition time */ |
1774 | #define B0ST 0x30 /* Bank 0 Setup time */ | 1688 | #define B0ST 0x30 /* Bank 0 Setup time */ |
1775 | #define B0HT 0xc0 /* Bank 0 Hold time */ | 1689 | #define B0HT 0xc0 /* Bank 0 Hold time */ |
1776 | #define B0RAT 0xf00 /* Bank 0 Read access time */ | 1690 | #define B0RAT 0xf00 /* Bank 0 Read access time */ |
1777 | #define B0WAT 0xf000 /* Bank 0 write access time */ | 1691 | #define B0WAT 0xf000 /* Bank 0 write access time */ |
1778 | #define B1RDYEN 0x10000 /* Bank 1 ARDY Enable */ | 1692 | #define B1RDYEN 0x10000 /* Bank 1 ARDY Enable */ |
1779 | #define nB1RDYEN 0x0 | ||
1780 | #define B1RDYPOL 0x20000 /* Bank 1 ARDY Polarity */ | 1693 | #define B1RDYPOL 0x20000 /* Bank 1 ARDY Polarity */ |
1781 | #define nB1RDYPOL 0x0 | ||
1782 | #define B1TT 0xc0000 /* Bank 1 transition time */ | 1694 | #define B1TT 0xc0000 /* Bank 1 transition time */ |
1783 | #define B1ST 0x300000 /* Bank 1 Setup time */ | 1695 | #define B1ST 0x300000 /* Bank 1 Setup time */ |
1784 | #define B1HT 0xc00000 /* Bank 1 Hold time */ | 1696 | #define B1HT 0xc00000 /* Bank 1 Hold time */ |
@@ -1788,18 +1700,14 @@ | |||
1788 | /* Bit masks for EBIU_AMBCTL1 */ | 1700 | /* Bit masks for EBIU_AMBCTL1 */ |
1789 | 1701 | ||
1790 | #define B2RDYEN 0x1 /* Bank 2 ARDY Enable */ | 1702 | #define B2RDYEN 0x1 /* Bank 2 ARDY Enable */ |
1791 | #define nB2RDYEN 0x0 | ||
1792 | #define B2RDYPOL 0x2 /* Bank 2 ARDY Polarity */ | 1703 | #define B2RDYPOL 0x2 /* Bank 2 ARDY Polarity */ |
1793 | #define nB2RDYPOL 0x0 | ||
1794 | #define B2TT 0xc /* Bank 2 transition time */ | 1704 | #define B2TT 0xc /* Bank 2 transition time */ |
1795 | #define B2ST 0x30 /* Bank 2 Setup time */ | 1705 | #define B2ST 0x30 /* Bank 2 Setup time */ |
1796 | #define B2HT 0xc0 /* Bank 2 Hold time */ | 1706 | #define B2HT 0xc0 /* Bank 2 Hold time */ |
1797 | #define B2RAT 0xf00 /* Bank 2 Read access time */ | 1707 | #define B2RAT 0xf00 /* Bank 2 Read access time */ |
1798 | #define B2WAT 0xf000 /* Bank 2 write access time */ | 1708 | #define B2WAT 0xf000 /* Bank 2 write access time */ |
1799 | #define B3RDYEN 0x10000 /* Bank 3 ARDY Enable */ | 1709 | #define B3RDYEN 0x10000 /* Bank 3 ARDY Enable */ |
1800 | #define nB3RDYEN 0x0 | ||
1801 | #define B3RDYPOL 0x20000 /* Bank 3 ARDY Polarity */ | 1710 | #define B3RDYPOL 0x20000 /* Bank 3 ARDY Polarity */ |
1802 | #define nB3RDYPOL 0x0 | ||
1803 | #define B3TT 0xc0000 /* Bank 3 transition time */ | 1711 | #define B3TT 0xc0000 /* Bank 3 transition time */ |
1804 | #define B3ST 0x300000 /* Bank 3 Setup time */ | 1712 | #define B3ST 0x300000 /* Bank 3 Setup time */ |
1805 | #define B3HT 0xc00000 /* Bank 3 Hold time */ | 1713 | #define B3HT 0xc00000 /* Bank 3 Hold time */ |
@@ -1823,19 +1731,15 @@ | |||
1823 | /* Bit masks for EBIU_FCTL */ | 1731 | /* Bit masks for EBIU_FCTL */ |
1824 | 1732 | ||
1825 | #define TESTSETLOCK 0x1 /* Test set lock */ | 1733 | #define TESTSETLOCK 0x1 /* Test set lock */ |
1826 | #define nTESTSETLOCK 0x0 | ||
1827 | #define BCLK 0x6 /* Burst clock frequency */ | 1734 | #define BCLK 0x6 /* Burst clock frequency */ |
1828 | #define PGWS 0x38 /* Page wait states */ | 1735 | #define PGWS 0x38 /* Page wait states */ |
1829 | #define PGSZ 0x40 /* Page size */ | 1736 | #define PGSZ 0x40 /* Page size */ |
1830 | #define nPGSZ 0x0 | ||
1831 | #define RDDL 0x380 /* Read data delay */ | 1737 | #define RDDL 0x380 /* Read data delay */ |
1832 | 1738 | ||
1833 | /* Bit masks for EBIU_ARBSTAT */ | 1739 | /* Bit masks for EBIU_ARBSTAT */ |
1834 | 1740 | ||
1835 | #define ARBSTAT 0x1 /* Arbitration status */ | 1741 | #define ARBSTAT 0x1 /* Arbitration status */ |
1836 | #define nARBSTAT 0x0 | ||
1837 | #define BGSTAT 0x2 /* Bus grant status */ | 1742 | #define BGSTAT 0x2 /* Bus grant status */ |
1838 | #define nBGSTAT 0x0 | ||
1839 | 1743 | ||
1840 | /* Bit masks for EBIU_DDRCTL0 */ | 1744 | /* Bit masks for EBIU_DDRCTL0 */ |
1841 | 1745 | ||
@@ -1861,9 +1765,7 @@ | |||
1861 | #define BURSTLENGTH 0x7 /* Burst length */ | 1765 | #define BURSTLENGTH 0x7 /* Burst length */ |
1862 | #define CASLATENCY 0x70 /* CAS latency */ | 1766 | #define CASLATENCY 0x70 /* CAS latency */ |
1863 | #define DLLRESET 0x100 /* DLL Reset */ | 1767 | #define DLLRESET 0x100 /* DLL Reset */ |
1864 | #define nDLLRESET 0x0 | ||
1865 | #define REGE 0x1000 /* Register mode enable */ | 1768 | #define REGE 0x1000 /* Register mode enable */ |
1866 | #define nREGE 0x0 | ||
1867 | 1769 | ||
1868 | /* Bit masks for EBIU_DDRCTL3 */ | 1770 | /* Bit masks for EBIU_DDRCTL3 */ |
1869 | 1771 | ||
@@ -1876,30 +1778,19 @@ | |||
1876 | #define DEB3_PFLEN 0x30 /* Pre fetch length for DEB3 accesses */ | 1778 | #define DEB3_PFLEN 0x30 /* Pre fetch length for DEB3 accesses */ |
1877 | #define DEB_ARB_PRIORITY 0x700 /* Arbitration between DEB busses */ | 1779 | #define DEB_ARB_PRIORITY 0x700 /* Arbitration between DEB busses */ |
1878 | #define DEB1_URGENT 0x1000 /* DEB1 Urgent */ | 1780 | #define DEB1_URGENT 0x1000 /* DEB1 Urgent */ |
1879 | #define nDEB1_URGENT 0x0 | ||
1880 | #define DEB2_URGENT 0x2000 /* DEB2 Urgent */ | 1781 | #define DEB2_URGENT 0x2000 /* DEB2 Urgent */ |
1881 | #define nDEB2_URGENT 0x0 | ||
1882 | #define DEB3_URGENT 0x4000 /* DEB3 Urgent */ | 1782 | #define DEB3_URGENT 0x4000 /* DEB3 Urgent */ |
1883 | #define nDEB3_URGENT 0x0 | ||
1884 | 1783 | ||
1885 | /* Bit masks for EBIU_ERRMST */ | 1784 | /* Bit masks for EBIU_ERRMST */ |
1886 | 1785 | ||
1887 | #define DEB1_ERROR 0x1 /* DEB1 Error */ | 1786 | #define DEB1_ERROR 0x1 /* DEB1 Error */ |
1888 | #define nDEB1_ERROR 0x0 | ||
1889 | #define DEB2_ERROR 0x2 /* DEB2 Error */ | 1787 | #define DEB2_ERROR 0x2 /* DEB2 Error */ |
1890 | #define nDEB2_ERROR 0x0 | ||
1891 | #define DEB3_ERROR 0x4 /* DEB3 Error */ | 1788 | #define DEB3_ERROR 0x4 /* DEB3 Error */ |
1892 | #define nDEB3_ERROR 0x0 | ||
1893 | #define CORE_ERROR 0x8 /* Core error */ | 1789 | #define CORE_ERROR 0x8 /* Core error */ |
1894 | #define nCORE_ERROR 0x0 | ||
1895 | #define DEB_MERROR 0x10 /* DEB1 Error (2nd) */ | 1790 | #define DEB_MERROR 0x10 /* DEB1 Error (2nd) */ |
1896 | #define nDEB_MERROR 0x0 | ||
1897 | #define DEB2_MERROR 0x20 /* DEB2 Error (2nd) */ | 1791 | #define DEB2_MERROR 0x20 /* DEB2 Error (2nd) */ |
1898 | #define nDEB2_MERROR 0x0 | ||
1899 | #define DEB3_MERROR 0x40 /* DEB3 Error (2nd) */ | 1792 | #define DEB3_MERROR 0x40 /* DEB3 Error (2nd) */ |
1900 | #define nDEB3_MERROR 0x0 | ||
1901 | #define CORE_MERROR 0x80 /* Core Error (2nd) */ | 1793 | #define CORE_MERROR 0x80 /* Core Error (2nd) */ |
1902 | #define nCORE_MERROR 0x0 | ||
1903 | 1794 | ||
1904 | /* Bit masks for EBIU_ERRADD */ | 1795 | /* Bit masks for EBIU_ERRADD */ |
1905 | 1796 | ||
@@ -1908,15 +1799,10 @@ | |||
1908 | /* Bit masks for EBIU_RSTCTL */ | 1799 | /* Bit masks for EBIU_RSTCTL */ |
1909 | 1800 | ||
1910 | #define DDRSRESET 0x1 /* DDR soft reset */ | 1801 | #define DDRSRESET 0x1 /* DDR soft reset */ |
1911 | #define nDDRSRESET 0x0 | ||
1912 | #define PFTCHSRESET 0x4 /* DDR prefetch reset */ | 1802 | #define PFTCHSRESET 0x4 /* DDR prefetch reset */ |
1913 | #define nPFTCHSRESET 0x0 | ||
1914 | #define SRREQ 0x8 /* Self-refresh request */ | 1803 | #define SRREQ 0x8 /* Self-refresh request */ |
1915 | #define nSRREQ 0x0 | ||
1916 | #define SRACK 0x10 /* Self-refresh acknowledge */ | 1804 | #define SRACK 0x10 /* Self-refresh acknowledge */ |
1917 | #define nSRACK 0x0 | ||
1918 | #define MDDRENABLE 0x20 /* Mobile DDR enable */ | 1805 | #define MDDRENABLE 0x20 /* Mobile DDR enable */ |
1919 | #define nMDDRENABLE 0x0 | ||
1920 | 1806 | ||
1921 | /* Bit masks for EBIU_DDRBRC0 */ | 1807 | /* Bit masks for EBIU_DDRBRC0 */ |
1922 | 1808 | ||
@@ -2013,136 +1899,74 @@ | |||
2013 | /* Bit masks for EBIU_DDRMCEN */ | 1899 | /* Bit masks for EBIU_DDRMCEN */ |
2014 | 1900 | ||
2015 | #define B0WCENABLE 0x1 /* Bank 0 write count enable */ | 1901 | #define B0WCENABLE 0x1 /* Bank 0 write count enable */ |
2016 | #define nB0WCENABLE 0x0 | ||
2017 | #define B1WCENABLE 0x2 /* Bank 1 write count enable */ | 1902 | #define B1WCENABLE 0x2 /* Bank 1 write count enable */ |
2018 | #define nB1WCENABLE 0x0 | ||
2019 | #define B2WCENABLE 0x4 /* Bank 2 write count enable */ | 1903 | #define B2WCENABLE 0x4 /* Bank 2 write count enable */ |
2020 | #define nB2WCENABLE 0x0 | ||
2021 | #define B3WCENABLE 0x8 /* Bank 3 write count enable */ | 1904 | #define B3WCENABLE 0x8 /* Bank 3 write count enable */ |
2022 | #define nB3WCENABLE 0x0 | ||
2023 | #define B4WCENABLE 0x10 /* Bank 4 write count enable */ | 1905 | #define B4WCENABLE 0x10 /* Bank 4 write count enable */ |
2024 | #define nB4WCENABLE 0x0 | ||
2025 | #define B5WCENABLE 0x20 /* Bank 5 write count enable */ | 1906 | #define B5WCENABLE 0x20 /* Bank 5 write count enable */ |
2026 | #define nB5WCENABLE 0x0 | ||
2027 | #define B6WCENABLE 0x40 /* Bank 6 write count enable */ | 1907 | #define B6WCENABLE 0x40 /* Bank 6 write count enable */ |
2028 | #define nB6WCENABLE 0x0 | ||
2029 | #define B7WCENABLE 0x80 /* Bank 7 write count enable */ | 1908 | #define B7WCENABLE 0x80 /* Bank 7 write count enable */ |
2030 | #define nB7WCENABLE 0x0 | ||
2031 | #define B0RCENABLE 0x100 /* Bank 0 read count enable */ | 1909 | #define B0RCENABLE 0x100 /* Bank 0 read count enable */ |
2032 | #define nB0RCENABLE 0x0 | ||
2033 | #define B1RCENABLE 0x200 /* Bank 1 read count enable */ | 1910 | #define B1RCENABLE 0x200 /* Bank 1 read count enable */ |
2034 | #define nB1RCENABLE 0x0 | ||
2035 | #define B2RCENABLE 0x400 /* Bank 2 read count enable */ | 1911 | #define B2RCENABLE 0x400 /* Bank 2 read count enable */ |
2036 | #define nB2RCENABLE 0x0 | ||
2037 | #define B3RCENABLE 0x800 /* Bank 3 read count enable */ | 1912 | #define B3RCENABLE 0x800 /* Bank 3 read count enable */ |
2038 | #define nB3RCENABLE 0x0 | ||
2039 | #define B4RCENABLE 0x1000 /* Bank 4 read count enable */ | 1913 | #define B4RCENABLE 0x1000 /* Bank 4 read count enable */ |
2040 | #define nB4RCENABLE 0x0 | ||
2041 | #define B5RCENABLE 0x2000 /* Bank 5 read count enable */ | 1914 | #define B5RCENABLE 0x2000 /* Bank 5 read count enable */ |
2042 | #define nB5RCENABLE 0x0 | ||
2043 | #define B6RCENABLE 0x4000 /* Bank 6 read count enable */ | 1915 | #define B6RCENABLE 0x4000 /* Bank 6 read count enable */ |
2044 | #define nB6RCENABLE 0x0 | ||
2045 | #define B7RCENABLE 0x8000 /* Bank 7 read count enable */ | 1916 | #define B7RCENABLE 0x8000 /* Bank 7 read count enable */ |
2046 | #define nB7RCENABLE 0x0 | ||
2047 | #define ROWACTCENABLE 0x10000 /* DDR Row activate count enable */ | 1917 | #define ROWACTCENABLE 0x10000 /* DDR Row activate count enable */ |
2048 | #define nROWACTCENABLE 0x0 | ||
2049 | #define RWTCENABLE 0x20000 /* DDR R/W Turn around count enable */ | 1918 | #define RWTCENABLE 0x20000 /* DDR R/W Turn around count enable */ |
2050 | #define nRWTCENABLE 0x0 | ||
2051 | #define ARCENABLE 0x40000 /* DDR Auto-refresh count enable */ | 1919 | #define ARCENABLE 0x40000 /* DDR Auto-refresh count enable */ |
2052 | #define nARCENABLE 0x0 | ||
2053 | #define GC0ENABLE 0x100000 /* DDR Grant count 0 enable */ | 1920 | #define GC0ENABLE 0x100000 /* DDR Grant count 0 enable */ |
2054 | #define nGC0ENABLE 0x0 | ||
2055 | #define GC1ENABLE 0x200000 /* DDR Grant count 1 enable */ | 1921 | #define GC1ENABLE 0x200000 /* DDR Grant count 1 enable */ |
2056 | #define nGC1ENABLE 0x0 | ||
2057 | #define GC2ENABLE 0x400000 /* DDR Grant count 2 enable */ | 1922 | #define GC2ENABLE 0x400000 /* DDR Grant count 2 enable */ |
2058 | #define nGC2ENABLE 0x0 | ||
2059 | #define GC3ENABLE 0x800000 /* DDR Grant count 3 enable */ | 1923 | #define GC3ENABLE 0x800000 /* DDR Grant count 3 enable */ |
2060 | #define nGC3ENABLE 0x0 | ||
2061 | #define GCCONTROL 0x3000000 /* DDR Grant Count Control */ | 1924 | #define GCCONTROL 0x3000000 /* DDR Grant Count Control */ |
2062 | 1925 | ||
2063 | /* Bit masks for EBIU_DDRMCCL */ | 1926 | /* Bit masks for EBIU_DDRMCCL */ |
2064 | 1927 | ||
2065 | #define CB0WCOUNT 0x1 /* Clear write count 0 */ | 1928 | #define CB0WCOUNT 0x1 /* Clear write count 0 */ |
2066 | #define nCB0WCOUNT 0x0 | ||
2067 | #define CB1WCOUNT 0x2 /* Clear write count 1 */ | 1929 | #define CB1WCOUNT 0x2 /* Clear write count 1 */ |
2068 | #define nCB1WCOUNT 0x0 | ||
2069 | #define CB2WCOUNT 0x4 /* Clear write count 2 */ | 1930 | #define CB2WCOUNT 0x4 /* Clear write count 2 */ |
2070 | #define nCB2WCOUNT 0x0 | ||
2071 | #define CB3WCOUNT 0x8 /* Clear write count 3 */ | 1931 | #define CB3WCOUNT 0x8 /* Clear write count 3 */ |
2072 | #define nCB3WCOUNT 0x0 | ||
2073 | #define CB4WCOUNT 0x10 /* Clear write count 4 */ | 1932 | #define CB4WCOUNT 0x10 /* Clear write count 4 */ |
2074 | #define nCB4WCOUNT 0x0 | ||
2075 | #define CB5WCOUNT 0x20 /* Clear write count 5 */ | 1933 | #define CB5WCOUNT 0x20 /* Clear write count 5 */ |
2076 | #define nCB5WCOUNT 0x0 | ||
2077 | #define CB6WCOUNT 0x40 /* Clear write count 6 */ | 1934 | #define CB6WCOUNT 0x40 /* Clear write count 6 */ |
2078 | #define nCB6WCOUNT 0x0 | ||
2079 | #define CB7WCOUNT 0x80 /* Clear write count 7 */ | 1935 | #define CB7WCOUNT 0x80 /* Clear write count 7 */ |
2080 | #define nCB7WCOUNT 0x0 | ||
2081 | #define CBRCOUNT 0x100 /* Clear read count 0 */ | 1936 | #define CBRCOUNT 0x100 /* Clear read count 0 */ |
2082 | #define nCBRCOUNT 0x0 | ||
2083 | #define CB1RCOUNT 0x200 /* Clear read count 1 */ | 1937 | #define CB1RCOUNT 0x200 /* Clear read count 1 */ |
2084 | #define nCB1RCOUNT 0x0 | ||
2085 | #define CB2RCOUNT 0x400 /* Clear read count 2 */ | 1938 | #define CB2RCOUNT 0x400 /* Clear read count 2 */ |
2086 | #define nCB2RCOUNT 0x0 | ||
2087 | #define CB3RCOUNT 0x800 /* Clear read count 3 */ | 1939 | #define CB3RCOUNT 0x800 /* Clear read count 3 */ |
2088 | #define nCB3RCOUNT 0x0 | ||
2089 | #define CB4RCOUNT 0x1000 /* Clear read count 4 */ | 1940 | #define CB4RCOUNT 0x1000 /* Clear read count 4 */ |
2090 | #define nCB4RCOUNT 0x0 | ||
2091 | #define CB5RCOUNT 0x2000 /* Clear read count 5 */ | 1941 | #define CB5RCOUNT 0x2000 /* Clear read count 5 */ |
2092 | #define nCB5RCOUNT 0x0 | ||
2093 | #define CB6RCOUNT 0x4000 /* Clear read count 6 */ | 1942 | #define CB6RCOUNT 0x4000 /* Clear read count 6 */ |
2094 | #define nCB6RCOUNT 0x0 | ||
2095 | #define CB7RCOUNT 0x8000 /* Clear read count 7 */ | 1943 | #define CB7RCOUNT 0x8000 /* Clear read count 7 */ |
2096 | #define nCB7RCOUNT 0x0 | ||
2097 | #define CRACOUNT 0x10000 /* Clear row activation count */ | 1944 | #define CRACOUNT 0x10000 /* Clear row activation count */ |
2098 | #define nCRACOUNT 0x0 | ||
2099 | #define CRWTACOUNT 0x20000 /* Clear R/W turn-around count */ | 1945 | #define CRWTACOUNT 0x20000 /* Clear R/W turn-around count */ |
2100 | #define nCRWTACOUNT 0x0 | ||
2101 | #define CARCOUNT 0x40000 /* Clear auto-refresh count */ | 1946 | #define CARCOUNT 0x40000 /* Clear auto-refresh count */ |
2102 | #define nCARCOUNT 0x0 | ||
2103 | #define CG0COUNT 0x100000 /* Clear grant count 0 */ | 1947 | #define CG0COUNT 0x100000 /* Clear grant count 0 */ |
2104 | #define nCG0COUNT 0x0 | ||
2105 | #define CG1COUNT 0x200000 /* Clear grant count 1 */ | 1948 | #define CG1COUNT 0x200000 /* Clear grant count 1 */ |
2106 | #define nCG1COUNT 0x0 | ||
2107 | #define CG2COUNT 0x400000 /* Clear grant count 2 */ | 1949 | #define CG2COUNT 0x400000 /* Clear grant count 2 */ |
2108 | #define nCG2COUNT 0x0 | ||
2109 | #define CG3COUNT 0x800000 /* Clear grant count 3 */ | 1950 | #define CG3COUNT 0x800000 /* Clear grant count 3 */ |
2110 | #define nCG3COUNT 0x0 | ||
2111 | 1951 | ||
2112 | /* Bit masks for (PORTx is PORTA - PORTJ) includes PORTx_FER, PORTx_SET, PORTx_CLEAR, PORTx_DIR_SET, PORTx_DIR_CLEAR, PORTx_INEN */ | 1952 | /* Bit masks for (PORTx is PORTA - PORTJ) includes PORTx_FER, PORTx_SET, PORTx_CLEAR, PORTx_DIR_SET, PORTx_DIR_CLEAR, PORTx_INEN */ |
2113 | 1953 | ||
2114 | #define Px0 0x1 /* GPIO 0 */ | 1954 | #define Px0 0x1 /* GPIO 0 */ |
2115 | #define nPx0 0x0 | ||
2116 | #define Px1 0x2 /* GPIO 1 */ | 1955 | #define Px1 0x2 /* GPIO 1 */ |
2117 | #define nPx1 0x0 | ||
2118 | #define Px2 0x4 /* GPIO 2 */ | 1956 | #define Px2 0x4 /* GPIO 2 */ |
2119 | #define nPx2 0x0 | ||
2120 | #define Px3 0x8 /* GPIO 3 */ | 1957 | #define Px3 0x8 /* GPIO 3 */ |
2121 | #define nPx3 0x0 | ||
2122 | #define Px4 0x10 /* GPIO 4 */ | 1958 | #define Px4 0x10 /* GPIO 4 */ |
2123 | #define nPx4 0x0 | ||
2124 | #define Px5 0x20 /* GPIO 5 */ | 1959 | #define Px5 0x20 /* GPIO 5 */ |
2125 | #define nPx5 0x0 | ||
2126 | #define Px6 0x40 /* GPIO 6 */ | 1960 | #define Px6 0x40 /* GPIO 6 */ |
2127 | #define nPx6 0x0 | ||
2128 | #define Px7 0x80 /* GPIO 7 */ | 1961 | #define Px7 0x80 /* GPIO 7 */ |
2129 | #define nPx7 0x0 | ||
2130 | #define Px8 0x100 /* GPIO 8 */ | 1962 | #define Px8 0x100 /* GPIO 8 */ |
2131 | #define nPx8 0x0 | ||
2132 | #define Px9 0x200 /* GPIO 9 */ | 1963 | #define Px9 0x200 /* GPIO 9 */ |
2133 | #define nPx9 0x0 | ||
2134 | #define Px10 0x400 /* GPIO 10 */ | 1964 | #define Px10 0x400 /* GPIO 10 */ |
2135 | #define nPx10 0x0 | ||
2136 | #define Px11 0x800 /* GPIO 11 */ | 1965 | #define Px11 0x800 /* GPIO 11 */ |
2137 | #define nPx11 0x0 | ||
2138 | #define Px12 0x1000 /* GPIO 12 */ | 1966 | #define Px12 0x1000 /* GPIO 12 */ |
2139 | #define nPx12 0x0 | ||
2140 | #define Px13 0x2000 /* GPIO 13 */ | 1967 | #define Px13 0x2000 /* GPIO 13 */ |
2141 | #define nPx13 0x0 | ||
2142 | #define Px14 0x4000 /* GPIO 14 */ | 1968 | #define Px14 0x4000 /* GPIO 14 */ |
2143 | #define nPx14 0x0 | ||
2144 | #define Px15 0x8000 /* GPIO 15 */ | 1969 | #define Px15 0x8000 /* GPIO 15 */ |
2145 | #define nPx15 0x0 | ||
2146 | 1970 | ||
2147 | /* Bit masks for PORTA_MUX - PORTJ_MUX */ | 1971 | /* Bit masks for PORTA_MUX - PORTJ_MUX */ |
2148 | 1972 | ||
@@ -2167,223 +1991,129 @@ | |||
2167 | /* Bit masks for PINTx_MASK_SET/CLEAR, PINTx_REQUEST, PINTx_LATCH, PINTx_EDGE_SET/CLEAR, PINTx_INVERT_SET/CLEAR, PINTx_PINTSTATE */ | 1991 | /* Bit masks for PINTx_MASK_SET/CLEAR, PINTx_REQUEST, PINTx_LATCH, PINTx_EDGE_SET/CLEAR, PINTx_INVERT_SET/CLEAR, PINTx_PINTSTATE */ |
2168 | 1992 | ||
2169 | #define IB0 0x1 /* Interrupt Bit 0 */ | 1993 | #define IB0 0x1 /* Interrupt Bit 0 */ |
2170 | #define nIB0 0x0 | ||
2171 | #define IB1 0x2 /* Interrupt Bit 1 */ | 1994 | #define IB1 0x2 /* Interrupt Bit 1 */ |
2172 | #define nIB1 0x0 | ||
2173 | #define IB2 0x4 /* Interrupt Bit 2 */ | 1995 | #define IB2 0x4 /* Interrupt Bit 2 */ |
2174 | #define nIB2 0x0 | ||
2175 | #define IB3 0x8 /* Interrupt Bit 3 */ | 1996 | #define IB3 0x8 /* Interrupt Bit 3 */ |
2176 | #define nIB3 0x0 | ||
2177 | #define IB4 0x10 /* Interrupt Bit 4 */ | 1997 | #define IB4 0x10 /* Interrupt Bit 4 */ |
2178 | #define nIB4 0x0 | ||
2179 | #define IB5 0x20 /* Interrupt Bit 5 */ | 1998 | #define IB5 0x20 /* Interrupt Bit 5 */ |
2180 | #define nIB5 0x0 | ||
2181 | #define IB6 0x40 /* Interrupt Bit 6 */ | 1999 | #define IB6 0x40 /* Interrupt Bit 6 */ |
2182 | #define nIB6 0x0 | ||
2183 | #define IB7 0x80 /* Interrupt Bit 7 */ | 2000 | #define IB7 0x80 /* Interrupt Bit 7 */ |
2184 | #define nIB7 0x0 | ||
2185 | #define IB8 0x100 /* Interrupt Bit 8 */ | 2001 | #define IB8 0x100 /* Interrupt Bit 8 */ |
2186 | #define nIB8 0x0 | ||
2187 | #define IB9 0x200 /* Interrupt Bit 9 */ | 2002 | #define IB9 0x200 /* Interrupt Bit 9 */ |
2188 | #define nIB9 0x0 | ||
2189 | #define IB10 0x400 /* Interrupt Bit 10 */ | 2003 | #define IB10 0x400 /* Interrupt Bit 10 */ |
2190 | #define nIB10 0x0 | ||
2191 | #define IB11 0x800 /* Interrupt Bit 11 */ | 2004 | #define IB11 0x800 /* Interrupt Bit 11 */ |
2192 | #define nIB11 0x0 | ||
2193 | #define IB12 0x1000 /* Interrupt Bit 12 */ | 2005 | #define IB12 0x1000 /* Interrupt Bit 12 */ |
2194 | #define nIB12 0x0 | ||
2195 | #define IB13 0x2000 /* Interrupt Bit 13 */ | 2006 | #define IB13 0x2000 /* Interrupt Bit 13 */ |
2196 | #define nIB13 0x0 | ||
2197 | #define IB14 0x4000 /* Interrupt Bit 14 */ | 2007 | #define IB14 0x4000 /* Interrupt Bit 14 */ |
2198 | #define nIB14 0x0 | ||
2199 | #define IB15 0x8000 /* Interrupt Bit 15 */ | 2008 | #define IB15 0x8000 /* Interrupt Bit 15 */ |
2200 | #define nIB15 0x0 | ||
2201 | 2009 | ||
2202 | /* Bit masks for TIMERx_CONFIG */ | 2010 | /* Bit masks for TIMERx_CONFIG */ |
2203 | 2011 | ||
2204 | #define TMODE 0x3 /* Timer Mode */ | 2012 | #define TMODE 0x3 /* Timer Mode */ |
2205 | #define PULSE_HI 0x4 /* Pulse Polarity */ | 2013 | #define PULSE_HI 0x4 /* Pulse Polarity */ |
2206 | #define nPULSE_HI 0x0 | ||
2207 | #define PERIOD_CNT 0x8 /* Period Count */ | 2014 | #define PERIOD_CNT 0x8 /* Period Count */ |
2208 | #define nPERIOD_CNT 0x0 | ||
2209 | #define IRQ_ENA 0x10 /* Interrupt Request Enable */ | 2015 | #define IRQ_ENA 0x10 /* Interrupt Request Enable */ |
2210 | #define nIRQ_ENA 0x0 | ||
2211 | #define TIN_SEL 0x20 /* Timer Input Select */ | 2016 | #define TIN_SEL 0x20 /* Timer Input Select */ |
2212 | #define nTIN_SEL 0x0 | ||
2213 | #define OUT_DIS 0x40 /* Output Pad Disable */ | 2017 | #define OUT_DIS 0x40 /* Output Pad Disable */ |
2214 | #define nOUT_DIS 0x0 | ||
2215 | #define CLK_SEL 0x80 /* Timer Clock Select */ | 2018 | #define CLK_SEL 0x80 /* Timer Clock Select */ |
2216 | #define nCLK_SEL 0x0 | ||
2217 | #define TOGGLE_HI 0x100 /* Toggle Mode */ | 2019 | #define TOGGLE_HI 0x100 /* Toggle Mode */ |
2218 | #define nTOGGLE_HI 0x0 | ||
2219 | #define EMU_RUN 0x200 /* Emulation Behavior Select */ | 2020 | #define EMU_RUN 0x200 /* Emulation Behavior Select */ |
2220 | #define nEMU_RUN 0x0 | ||
2221 | #define ERR_TYP 0xc000 /* Error Type */ | 2021 | #define ERR_TYP 0xc000 /* Error Type */ |
2222 | 2022 | ||
2223 | /* Bit masks for TIMER_ENABLE0 */ | 2023 | /* Bit masks for TIMER_ENABLE0 */ |
2224 | 2024 | ||
2225 | #define TIMEN0 0x1 /* Timer 0 Enable */ | 2025 | #define TIMEN0 0x1 /* Timer 0 Enable */ |
2226 | #define nTIMEN0 0x0 | ||
2227 | #define TIMEN1 0x2 /* Timer 1 Enable */ | 2026 | #define TIMEN1 0x2 /* Timer 1 Enable */ |
2228 | #define nTIMEN1 0x0 | ||
2229 | #define TIMEN2 0x4 /* Timer 2 Enable */ | 2027 | #define TIMEN2 0x4 /* Timer 2 Enable */ |
2230 | #define nTIMEN2 0x0 | ||
2231 | #define TIMEN3 0x8 /* Timer 3 Enable */ | 2028 | #define TIMEN3 0x8 /* Timer 3 Enable */ |
2232 | #define nTIMEN3 0x0 | ||
2233 | #define TIMEN4 0x10 /* Timer 4 Enable */ | 2029 | #define TIMEN4 0x10 /* Timer 4 Enable */ |
2234 | #define nTIMEN4 0x0 | ||
2235 | #define TIMEN5 0x20 /* Timer 5 Enable */ | 2030 | #define TIMEN5 0x20 /* Timer 5 Enable */ |
2236 | #define nTIMEN5 0x0 | ||
2237 | #define TIMEN6 0x40 /* Timer 6 Enable */ | 2031 | #define TIMEN6 0x40 /* Timer 6 Enable */ |
2238 | #define nTIMEN6 0x0 | ||
2239 | #define TIMEN7 0x80 /* Timer 7 Enable */ | 2032 | #define TIMEN7 0x80 /* Timer 7 Enable */ |
2240 | #define nTIMEN7 0x0 | ||
2241 | 2033 | ||
2242 | /* Bit masks for TIMER_DISABLE0 */ | 2034 | /* Bit masks for TIMER_DISABLE0 */ |
2243 | 2035 | ||
2244 | #define TIMDIS0 0x1 /* Timer 0 Disable */ | 2036 | #define TIMDIS0 0x1 /* Timer 0 Disable */ |
2245 | #define nTIMDIS0 0x0 | ||
2246 | #define TIMDIS1 0x2 /* Timer 1 Disable */ | 2037 | #define TIMDIS1 0x2 /* Timer 1 Disable */ |
2247 | #define nTIMDIS1 0x0 | ||
2248 | #define TIMDIS2 0x4 /* Timer 2 Disable */ | 2038 | #define TIMDIS2 0x4 /* Timer 2 Disable */ |
2249 | #define nTIMDIS2 0x0 | ||
2250 | #define TIMDIS3 0x8 /* Timer 3 Disable */ | 2039 | #define TIMDIS3 0x8 /* Timer 3 Disable */ |
2251 | #define nTIMDIS3 0x0 | ||
2252 | #define TIMDIS4 0x10 /* Timer 4 Disable */ | 2040 | #define TIMDIS4 0x10 /* Timer 4 Disable */ |
2253 | #define nTIMDIS4 0x0 | ||
2254 | #define TIMDIS5 0x20 /* Timer 5 Disable */ | 2041 | #define TIMDIS5 0x20 /* Timer 5 Disable */ |
2255 | #define nTIMDIS5 0x0 | ||
2256 | #define TIMDIS6 0x40 /* Timer 6 Disable */ | 2042 | #define TIMDIS6 0x40 /* Timer 6 Disable */ |
2257 | #define nTIMDIS6 0x0 | ||
2258 | #define TIMDIS7 0x80 /* Timer 7 Disable */ | 2043 | #define TIMDIS7 0x80 /* Timer 7 Disable */ |
2259 | #define nTIMDIS7 0x0 | ||
2260 | 2044 | ||
2261 | /* Bit masks for TIMER_STATUS0 */ | 2045 | /* Bit masks for TIMER_STATUS0 */ |
2262 | 2046 | ||
2263 | #define TIMIL0 0x1 /* Timer 0 Interrupt */ | 2047 | #define TIMIL0 0x1 /* Timer 0 Interrupt */ |
2264 | #define nTIMIL0 0x0 | ||
2265 | #define TIMIL1 0x2 /* Timer 1 Interrupt */ | 2048 | #define TIMIL1 0x2 /* Timer 1 Interrupt */ |
2266 | #define nTIMIL1 0x0 | ||
2267 | #define TIMIL2 0x4 /* Timer 2 Interrupt */ | 2049 | #define TIMIL2 0x4 /* Timer 2 Interrupt */ |
2268 | #define nTIMIL2 0x0 | ||
2269 | #define TIMIL3 0x8 /* Timer 3 Interrupt */ | 2050 | #define TIMIL3 0x8 /* Timer 3 Interrupt */ |
2270 | #define nTIMIL3 0x0 | ||
2271 | #define TOVF_ERR0 0x10 /* Timer 0 Counter Overflow */ | 2051 | #define TOVF_ERR0 0x10 /* Timer 0 Counter Overflow */ |
2272 | #define nTOVF_ERR0 0x0 | ||
2273 | #define TOVF_ERR1 0x20 /* Timer 1 Counter Overflow */ | 2052 | #define TOVF_ERR1 0x20 /* Timer 1 Counter Overflow */ |
2274 | #define nTOVF_ERR1 0x0 | ||
2275 | #define TOVF_ERR2 0x40 /* Timer 2 Counter Overflow */ | 2053 | #define TOVF_ERR2 0x40 /* Timer 2 Counter Overflow */ |
2276 | #define nTOVF_ERR2 0x0 | ||
2277 | #define TOVF_ERR3 0x80 /* Timer 3 Counter Overflow */ | 2054 | #define TOVF_ERR3 0x80 /* Timer 3 Counter Overflow */ |
2278 | #define nTOVF_ERR3 0x0 | ||
2279 | #define TRUN0 0x1000 /* Timer 0 Slave Enable Status */ | 2055 | #define TRUN0 0x1000 /* Timer 0 Slave Enable Status */ |
2280 | #define nTRUN0 0x0 | ||
2281 | #define TRUN1 0x2000 /* Timer 1 Slave Enable Status */ | 2056 | #define TRUN1 0x2000 /* Timer 1 Slave Enable Status */ |
2282 | #define nTRUN1 0x0 | ||
2283 | #define TRUN2 0x4000 /* Timer 2 Slave Enable Status */ | 2057 | #define TRUN2 0x4000 /* Timer 2 Slave Enable Status */ |
2284 | #define nTRUN2 0x0 | ||
2285 | #define TRUN3 0x8000 /* Timer 3 Slave Enable Status */ | 2058 | #define TRUN3 0x8000 /* Timer 3 Slave Enable Status */ |
2286 | #define nTRUN3 0x0 | ||
2287 | #define TIMIL4 0x10000 /* Timer 4 Interrupt */ | 2059 | #define TIMIL4 0x10000 /* Timer 4 Interrupt */ |
2288 | #define nTIMIL4 0x0 | ||
2289 | #define TIMIL5 0x20000 /* Timer 5 Interrupt */ | 2060 | #define TIMIL5 0x20000 /* Timer 5 Interrupt */ |
2290 | #define nTIMIL5 0x0 | ||
2291 | #define TIMIL6 0x40000 /* Timer 6 Interrupt */ | 2061 | #define TIMIL6 0x40000 /* Timer 6 Interrupt */ |
2292 | #define nTIMIL6 0x0 | ||
2293 | #define TIMIL7 0x80000 /* Timer 7 Interrupt */ | 2062 | #define TIMIL7 0x80000 /* Timer 7 Interrupt */ |
2294 | #define nTIMIL7 0x0 | ||
2295 | #define TOVF_ERR4 0x100000 /* Timer 4 Counter Overflow */ | 2063 | #define TOVF_ERR4 0x100000 /* Timer 4 Counter Overflow */ |
2296 | #define nTOVF_ERR4 0x0 | ||
2297 | #define TOVF_ERR5 0x200000 /* Timer 5 Counter Overflow */ | 2064 | #define TOVF_ERR5 0x200000 /* Timer 5 Counter Overflow */ |
2298 | #define nTOVF_ERR5 0x0 | ||
2299 | #define TOVF_ERR6 0x400000 /* Timer 6 Counter Overflow */ | 2065 | #define TOVF_ERR6 0x400000 /* Timer 6 Counter Overflow */ |
2300 | #define nTOVF_ERR6 0x0 | ||
2301 | #define TOVF_ERR7 0x800000 /* Timer 7 Counter Overflow */ | 2066 | #define TOVF_ERR7 0x800000 /* Timer 7 Counter Overflow */ |
2302 | #define nTOVF_ERR7 0x0 | ||
2303 | #define TRUN4 0x10000000 /* Timer 4 Slave Enable Status */ | 2067 | #define TRUN4 0x10000000 /* Timer 4 Slave Enable Status */ |
2304 | #define nTRUN4 0x0 | ||
2305 | #define TRUN5 0x20000000 /* Timer 5 Slave Enable Status */ | 2068 | #define TRUN5 0x20000000 /* Timer 5 Slave Enable Status */ |
2306 | #define nTRUN5 0x0 | ||
2307 | #define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */ | 2069 | #define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */ |
2308 | #define nTRUN6 0x0 | ||
2309 | #define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */ | 2070 | #define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */ |
2310 | #define nTRUN7 0x0 | ||
2311 | 2071 | ||
2312 | /* Bit masks for WDOG_CTL */ | 2072 | /* Bit masks for WDOG_CTL */ |
2313 | 2073 | ||
2314 | #define WDEV 0x6 /* Watchdog Event */ | 2074 | #define WDEV 0x6 /* Watchdog Event */ |
2315 | #define WDEN 0xff0 /* Watchdog Enable */ | 2075 | #define WDEN 0xff0 /* Watchdog Enable */ |
2316 | #define WDRO 0x8000 /* Watchdog Rolled Over */ | 2076 | #define WDRO 0x8000 /* Watchdog Rolled Over */ |
2317 | #define nWDRO 0x0 | ||
2318 | 2077 | ||
2319 | /* Bit masks for CNT_CONFIG */ | 2078 | /* Bit masks for CNT_CONFIG */ |
2320 | 2079 | ||
2321 | #define CNTE 0x1 /* Counter Enable */ | 2080 | #define CNTE 0x1 /* Counter Enable */ |
2322 | #define nCNTE 0x0 | ||
2323 | #define DEBE 0x2 /* Debounce Enable */ | 2081 | #define DEBE 0x2 /* Debounce Enable */ |
2324 | #define nDEBE 0x0 | ||
2325 | #define CDGINV 0x10 /* CDG Pin Polarity Invert */ | 2082 | #define CDGINV 0x10 /* CDG Pin Polarity Invert */ |
2326 | #define nCDGINV 0x0 | ||
2327 | #define CUDINV 0x20 /* CUD Pin Polarity Invert */ | 2083 | #define CUDINV 0x20 /* CUD Pin Polarity Invert */ |
2328 | #define nCUDINV 0x0 | ||
2329 | #define CZMINV 0x40 /* CZM Pin Polarity Invert */ | 2084 | #define CZMINV 0x40 /* CZM Pin Polarity Invert */ |
2330 | #define nCZMINV 0x0 | ||
2331 | #define CNTMODE 0x700 /* Counter Operating Mode */ | 2085 | #define CNTMODE 0x700 /* Counter Operating Mode */ |
2332 | #define ZMZC 0x800 /* CZM Zeroes Counter Enable */ | 2086 | #define ZMZC 0x800 /* CZM Zeroes Counter Enable */ |
2333 | #define nZMZC 0x0 | ||
2334 | #define BNDMODE 0x3000 /* Boundary register Mode */ | 2087 | #define BNDMODE 0x3000 /* Boundary register Mode */ |
2335 | #define INPDIS 0x8000 /* CUG and CDG Input Disable */ | 2088 | #define INPDIS 0x8000 /* CUG and CDG Input Disable */ |
2336 | #define nINPDIS 0x0 | ||
2337 | 2089 | ||
2338 | /* Bit masks for CNT_IMASK */ | 2090 | /* Bit masks for CNT_IMASK */ |
2339 | 2091 | ||
2340 | #define ICIE 0x1 /* Illegal Gray/Binary Code Interrupt Enable */ | 2092 | #define ICIE 0x1 /* Illegal Gray/Binary Code Interrupt Enable */ |
2341 | #define nICIE 0x0 | ||
2342 | #define UCIE 0x2 /* Up count Interrupt Enable */ | 2093 | #define UCIE 0x2 /* Up count Interrupt Enable */ |
2343 | #define nUCIE 0x0 | ||
2344 | #define DCIE 0x4 /* Down count Interrupt Enable */ | 2094 | #define DCIE 0x4 /* Down count Interrupt Enable */ |
2345 | #define nDCIE 0x0 | ||
2346 | #define MINCIE 0x8 /* Min Count Interrupt Enable */ | 2095 | #define MINCIE 0x8 /* Min Count Interrupt Enable */ |
2347 | #define nMINCIE 0x0 | ||
2348 | #define MAXCIE 0x10 /* Max Count Interrupt Enable */ | 2096 | #define MAXCIE 0x10 /* Max Count Interrupt Enable */ |
2349 | #define nMAXCIE 0x0 | ||
2350 | #define COV31IE 0x20 /* Bit 31 Overflow Interrupt Enable */ | 2097 | #define COV31IE 0x20 /* Bit 31 Overflow Interrupt Enable */ |
2351 | #define nCOV31IE 0x0 | ||
2352 | #define COV15IE 0x40 /* Bit 15 Overflow Interrupt Enable */ | 2098 | #define COV15IE 0x40 /* Bit 15 Overflow Interrupt Enable */ |
2353 | #define nCOV15IE 0x0 | ||
2354 | #define CZEROIE 0x80 /* Count to Zero Interrupt Enable */ | 2099 | #define CZEROIE 0x80 /* Count to Zero Interrupt Enable */ |
2355 | #define nCZEROIE 0x0 | ||
2356 | #define CZMIE 0x100 /* CZM Pin Interrupt Enable */ | 2100 | #define CZMIE 0x100 /* CZM Pin Interrupt Enable */ |
2357 | #define nCZMIE 0x0 | ||
2358 | #define CZMEIE 0x200 /* CZM Error Interrupt Enable */ | 2101 | #define CZMEIE 0x200 /* CZM Error Interrupt Enable */ |
2359 | #define nCZMEIE 0x0 | ||
2360 | #define CZMZIE 0x400 /* CZM Zeroes Counter Interrupt Enable */ | 2102 | #define CZMZIE 0x400 /* CZM Zeroes Counter Interrupt Enable */ |
2361 | #define nCZMZIE 0x0 | ||
2362 | 2103 | ||
2363 | /* Bit masks for CNT_STATUS */ | 2104 | /* Bit masks for CNT_STATUS */ |
2364 | 2105 | ||
2365 | #define ICII 0x1 /* Illegal Gray/Binary Code Interrupt Identifier */ | 2106 | #define ICII 0x1 /* Illegal Gray/Binary Code Interrupt Identifier */ |
2366 | #define nICII 0x0 | ||
2367 | #define UCII 0x2 /* Up count Interrupt Identifier */ | 2107 | #define UCII 0x2 /* Up count Interrupt Identifier */ |
2368 | #define nUCII 0x0 | ||
2369 | #define DCII 0x4 /* Down count Interrupt Identifier */ | 2108 | #define DCII 0x4 /* Down count Interrupt Identifier */ |
2370 | #define nDCII 0x0 | ||
2371 | #define MINCII 0x8 /* Min Count Interrupt Identifier */ | 2109 | #define MINCII 0x8 /* Min Count Interrupt Identifier */ |
2372 | #define nMINCII 0x0 | ||
2373 | #define MAXCII 0x10 /* Max Count Interrupt Identifier */ | 2110 | #define MAXCII 0x10 /* Max Count Interrupt Identifier */ |
2374 | #define nMAXCII 0x0 | ||
2375 | #define COV31II 0x20 /* Bit 31 Overflow Interrupt Identifier */ | 2111 | #define COV31II 0x20 /* Bit 31 Overflow Interrupt Identifier */ |
2376 | #define nCOV31II 0x0 | ||
2377 | #define COV15II 0x40 /* Bit 15 Overflow Interrupt Identifier */ | 2112 | #define COV15II 0x40 /* Bit 15 Overflow Interrupt Identifier */ |
2378 | #define nCOV15II 0x0 | ||
2379 | #define CZEROII 0x80 /* Count to Zero Interrupt Identifier */ | 2113 | #define CZEROII 0x80 /* Count to Zero Interrupt Identifier */ |
2380 | #define nCZEROII 0x0 | ||
2381 | #define CZMII 0x100 /* CZM Pin Interrupt Identifier */ | 2114 | #define CZMII 0x100 /* CZM Pin Interrupt Identifier */ |
2382 | #define nCZMII 0x0 | ||
2383 | #define CZMEII 0x200 /* CZM Error Interrupt Identifier */ | 2115 | #define CZMEII 0x200 /* CZM Error Interrupt Identifier */ |
2384 | #define nCZMEII 0x0 | ||
2385 | #define CZMZII 0x400 /* CZM Zeroes Counter Interrupt Identifier */ | 2116 | #define CZMZII 0x400 /* CZM Zeroes Counter Interrupt Identifier */ |
2386 | #define nCZMZII 0x0 | ||
2387 | 2117 | ||
2388 | /* Bit masks for CNT_COMMAND */ | 2118 | /* Bit masks for CNT_COMMAND */ |
2389 | 2119 | ||
@@ -2391,7 +2121,6 @@ | |||
2391 | #define W1LMIN 0xf0 /* Load Min Register */ | 2121 | #define W1LMIN 0xf0 /* Load Min Register */ |
2392 | #define W1LMAX 0xf00 /* Load Max Register */ | 2122 | #define W1LMAX 0xf00 /* Load Max Register */ |
2393 | #define W1ZMONCE 0x1000 /* Enable CZM Clear Counter Once */ | 2123 | #define W1ZMONCE 0x1000 /* Enable CZM Clear Counter Once */ |
2394 | #define nW1ZMONCE 0x0 | ||
2395 | 2124 | ||
2396 | /* Bit masks for CNT_DEBOUNCE */ | 2125 | /* Bit masks for CNT_DEBOUNCE */ |
2397 | 2126 | ||
@@ -2407,42 +2136,25 @@ | |||
2407 | /* Bit masks for RTC_ICTL */ | 2136 | /* Bit masks for RTC_ICTL */ |
2408 | 2137 | ||
2409 | #define STOPWATCH_INTERRUPT_ENABLE 0x1 /* Stopwatch Interrupt Enable */ | 2138 | #define STOPWATCH_INTERRUPT_ENABLE 0x1 /* Stopwatch Interrupt Enable */ |
2410 | #define nSTOPWATCH_INTERRUPT_ENABLE 0x0 | ||
2411 | #define ALARM_INTERRUPT_ENABLE 0x2 /* Alarm Interrupt Enable */ | 2139 | #define ALARM_INTERRUPT_ENABLE 0x2 /* Alarm Interrupt Enable */ |
2412 | #define nALARM_INTERRUPT_ENABLE 0x0 | ||
2413 | #define SECONDS_INTERRUPT_ENABLE 0x4 /* Seconds Interrupt Enable */ | 2140 | #define SECONDS_INTERRUPT_ENABLE 0x4 /* Seconds Interrupt Enable */ |
2414 | #define nSECONDS_INTERRUPT_ENABLE 0x0 | ||
2415 | #define MINUTES_INTERRUPT_ENABLE 0x8 /* Minutes Interrupt Enable */ | 2141 | #define MINUTES_INTERRUPT_ENABLE 0x8 /* Minutes Interrupt Enable */ |
2416 | #define nMINUTES_INTERRUPT_ENABLE 0x0 | ||
2417 | #define HOURS_INTERRUPT_ENABLE 0x10 /* Hours Interrupt Enable */ | 2142 | #define HOURS_INTERRUPT_ENABLE 0x10 /* Hours Interrupt Enable */ |
2418 | #define nHOURS_INTERRUPT_ENABLE 0x0 | ||
2419 | #define TWENTY_FOUR_HOURS_INTERRUPT_ENABLE 0x20 /* 24 Hours Interrupt Enable */ | 2143 | #define TWENTY_FOUR_HOURS_INTERRUPT_ENABLE 0x20 /* 24 Hours Interrupt Enable */ |
2420 | #define nTWENTY_FOUR_HOURS_INTERRUPT_ENABLE 0x0 | ||
2421 | #define DAY_ALARM_INTERRUPT_ENABLE 0x40 /* Day Alarm Interrupt Enable */ | 2144 | #define DAY_ALARM_INTERRUPT_ENABLE 0x40 /* Day Alarm Interrupt Enable */ |
2422 | #define nDAY_ALARM_INTERRUPT_ENABLE 0x0 | ||
2423 | #define WRITE_COMPLETE_INTERRUPT_ENABLE 0x8000 /* Write Complete Interrupt Enable */ | 2145 | #define WRITE_COMPLETE_INTERRUPT_ENABLE 0x8000 /* Write Complete Interrupt Enable */ |
2424 | #define nWRITE_COMPLETE_INTERRUPT_ENABLE 0x0 | ||
2425 | 2146 | ||
2426 | /* Bit masks for RTC_ISTAT */ | 2147 | /* Bit masks for RTC_ISTAT */ |
2427 | 2148 | ||
2428 | #define STOPWATCH_EVENT_FLAG 0x1 /* Stopwatch Event Flag */ | 2149 | #define STOPWATCH_EVENT_FLAG 0x1 /* Stopwatch Event Flag */ |
2429 | #define nSTOPWATCH_EVENT_FLAG 0x0 | ||
2430 | #define ALARM_EVENT_FLAG 0x2 /* Alarm Event Flag */ | 2150 | #define ALARM_EVENT_FLAG 0x2 /* Alarm Event Flag */ |
2431 | #define nALARM_EVENT_FLAG 0x0 | ||
2432 | #define SECONDS_EVENT_FLAG 0x4 /* Seconds Event Flag */ | 2151 | #define SECONDS_EVENT_FLAG 0x4 /* Seconds Event Flag */ |
2433 | #define nSECONDS_EVENT_FLAG 0x0 | ||
2434 | #define MINUTES_EVENT_FLAG 0x8 /* Minutes Event Flag */ | 2152 | #define MINUTES_EVENT_FLAG 0x8 /* Minutes Event Flag */ |
2435 | #define nMINUTES_EVENT_FLAG 0x0 | ||
2436 | #define HOURS_EVENT_FLAG 0x10 /* Hours Event Flag */ | 2153 | #define HOURS_EVENT_FLAG 0x10 /* Hours Event Flag */ |
2437 | #define nHOURS_EVENT_FLAG 0x0 | ||
2438 | #define TWENTY_FOUR_HOURS_EVENT_FLAG 0x20 /* 24 Hours Event Flag */ | 2154 | #define TWENTY_FOUR_HOURS_EVENT_FLAG 0x20 /* 24 Hours Event Flag */ |
2439 | #define nTWENTY_FOUR_HOURS_EVENT_FLAG 0x0 | ||
2440 | #define DAY_ALARM_EVENT_FLAG 0x40 /* Day Alarm Event Flag */ | 2155 | #define DAY_ALARM_EVENT_FLAG 0x40 /* Day Alarm Event Flag */ |
2441 | #define nDAY_ALARM_EVENT_FLAG 0x0 | ||
2442 | #define WRITE_PENDING__STATUS 0x4000 /* Write Pending Status */ | 2156 | #define WRITE_PENDING__STATUS 0x4000 /* Write Pending Status */ |
2443 | #define nWRITE_PENDING__STATUS 0x0 | ||
2444 | #define WRITE_COMPLETE 0x8000 /* Write Complete */ | 2157 | #define WRITE_COMPLETE 0x8000 /* Write Complete */ |
2445 | #define nWRITE_COMPLETE 0x0 | ||
2446 | 2158 | ||
2447 | /* Bit masks for RTC_SWCNT */ | 2159 | /* Bit masks for RTC_SWCNT */ |
2448 | 2160 | ||
@@ -2458,21 +2170,15 @@ | |||
2458 | /* Bit masks for RTC_PREN */ | 2170 | /* Bit masks for RTC_PREN */ |
2459 | 2171 | ||
2460 | #define PREN 0x1 /* Prescaler Enable */ | 2172 | #define PREN 0x1 /* Prescaler Enable */ |
2461 | #define nPREN 0x0 | ||
2462 | 2173 | ||
2463 | /* Bit masks for OTP_CONTROL */ | 2174 | /* Bit masks for OTP_CONTROL */ |
2464 | 2175 | ||
2465 | #define FUSE_FADDR 0x1ff /* OTP/Fuse Address */ | 2176 | #define FUSE_FADDR 0x1ff /* OTP/Fuse Address */ |
2466 | #define FIEN 0x800 /* OTP/Fuse Interrupt Enable */ | 2177 | #define FIEN 0x800 /* OTP/Fuse Interrupt Enable */ |
2467 | #define nFIEN 0x0 | ||
2468 | #define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */ | 2178 | #define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */ |
2469 | #define nFTESTDEC 0x0 | ||
2470 | #define FWRTEST 0x2000 /* OTP/Fuse Write Test */ | 2179 | #define FWRTEST 0x2000 /* OTP/Fuse Write Test */ |
2471 | #define nFWRTEST 0x0 | ||
2472 | #define FRDEN 0x4000 /* OTP/Fuse Read Enable */ | 2180 | #define FRDEN 0x4000 /* OTP/Fuse Read Enable */ |
2473 | #define nFRDEN 0x0 | ||
2474 | #define FWREN 0x8000 /* OTP/Fuse Write Enable */ | 2181 | #define FWREN 0x8000 /* OTP/Fuse Write Enable */ |
2475 | #define nFWREN 0x0 | ||
2476 | 2182 | ||
2477 | /* Bit masks for OTP_BEN */ | 2183 | /* Bit masks for OTP_BEN */ |
2478 | 2184 | ||
@@ -2481,15 +2187,10 @@ | |||
2481 | /* Bit masks for OTP_STATUS */ | 2187 | /* Bit masks for OTP_STATUS */ |
2482 | 2188 | ||
2483 | #define FCOMP 0x1 /* OTP/Fuse Access Complete */ | 2189 | #define FCOMP 0x1 /* OTP/Fuse Access Complete */ |
2484 | #define nFCOMP 0x0 | ||
2485 | #define FERROR 0x2 /* OTP/Fuse Access Error */ | 2190 | #define FERROR 0x2 /* OTP/Fuse Access Error */ |
2486 | #define nFERROR 0x0 | ||
2487 | #define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */ | 2191 | #define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */ |
2488 | #define nMMRGLOAD 0x0 | ||
2489 | #define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */ | 2192 | #define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */ |
2490 | #define nMMRGLOCK 0x0 | ||
2491 | #define FPGMEN 0x40 /* OTP/Fuse Program Enable */ | 2193 | #define FPGMEN 0x40 /* OTP/Fuse Program Enable */ |
2492 | #define nFPGMEN 0x0 | ||
2493 | 2194 | ||
2494 | /* Bit masks for OTP_TIMING */ | 2195 | /* Bit masks for OTP_TIMING */ |
2495 | 2196 | ||
@@ -2503,42 +2204,29 @@ | |||
2503 | /* Bit masks for SECURE_SYSSWT */ | 2204 | /* Bit masks for SECURE_SYSSWT */ |
2504 | 2205 | ||
2505 | #define EMUDABL 0x1 /* Emulation Disable. */ | 2206 | #define EMUDABL 0x1 /* Emulation Disable. */ |
2506 | #define nEMUDABL 0x0 | ||
2507 | #define RSTDABL 0x2 /* Reset Disable */ | 2207 | #define RSTDABL 0x2 /* Reset Disable */ |
2508 | #define nRSTDABL 0x0 | ||
2509 | #define L1IDABL 0x1c /* L1 Instruction Memory Disable. */ | 2208 | #define L1IDABL 0x1c /* L1 Instruction Memory Disable. */ |
2510 | #define L1DADABL 0xe0 /* L1 Data Bank A Memory Disable. */ | 2209 | #define L1DADABL 0xe0 /* L1 Data Bank A Memory Disable. */ |
2511 | #define L1DBDABL 0x700 /* L1 Data Bank B Memory Disable. */ | 2210 | #define L1DBDABL 0x700 /* L1 Data Bank B Memory Disable. */ |
2512 | #define DMA0OVR 0x800 /* DMA0 Memory Access Override */ | 2211 | #define DMA0OVR 0x800 /* DMA0 Memory Access Override */ |
2513 | #define nDMA0OVR 0x0 | ||
2514 | #define DMA1OVR 0x1000 /* DMA1 Memory Access Override */ | 2212 | #define DMA1OVR 0x1000 /* DMA1 Memory Access Override */ |
2515 | #define nDMA1OVR 0x0 | ||
2516 | #define EMUOVR 0x4000 /* Emulation Override */ | 2213 | #define EMUOVR 0x4000 /* Emulation Override */ |
2517 | #define nEMUOVR 0x0 | ||
2518 | #define OTPSEN 0x8000 /* OTP Secrets Enable. */ | 2214 | #define OTPSEN 0x8000 /* OTP Secrets Enable. */ |
2519 | #define nOTPSEN 0x0 | ||
2520 | #define L2DABL 0x70000 /* L2 Memory Disable. */ | 2215 | #define L2DABL 0x70000 /* L2 Memory Disable. */ |
2521 | 2216 | ||
2522 | /* Bit masks for SECURE_CONTROL */ | 2217 | /* Bit masks for SECURE_CONTROL */ |
2523 | 2218 | ||
2524 | #define SECURE0 0x1 /* SECURE 0 */ | 2219 | #define SECURE0 0x1 /* SECURE 0 */ |
2525 | #define nSECURE0 0x0 | ||
2526 | #define SECURE1 0x2 /* SECURE 1 */ | 2220 | #define SECURE1 0x2 /* SECURE 1 */ |
2527 | #define nSECURE1 0x0 | ||
2528 | #define SECURE2 0x4 /* SECURE 2 */ | 2221 | #define SECURE2 0x4 /* SECURE 2 */ |
2529 | #define nSECURE2 0x0 | ||
2530 | #define SECURE3 0x8 /* SECURE 3 */ | 2222 | #define SECURE3 0x8 /* SECURE 3 */ |
2531 | #define nSECURE3 0x0 | ||
2532 | 2223 | ||
2533 | /* Bit masks for SECURE_STATUS */ | 2224 | /* Bit masks for SECURE_STATUS */ |
2534 | 2225 | ||
2535 | #define SECMODE 0x3 /* Secured Mode Control State */ | 2226 | #define SECMODE 0x3 /* Secured Mode Control State */ |
2536 | #define NMI 0x4 /* Non Maskable Interrupt */ | 2227 | #define NMI 0x4 /* Non Maskable Interrupt */ |
2537 | #define nNMI 0x0 | ||
2538 | #define AFVALID 0x8 /* Authentication Firmware Valid */ | 2228 | #define AFVALID 0x8 /* Authentication Firmware Valid */ |
2539 | #define nAFVALID 0x0 | ||
2540 | #define AFEXIT 0x10 /* Authentication Firmware Exit */ | 2229 | #define AFEXIT 0x10 /* Authentication Firmware Exit */ |
2541 | #define nAFEXIT 0x0 | ||
2542 | #define SECSTAT 0xe0 /* Secure Status */ | 2230 | #define SECSTAT 0xe0 /* Secure Status */ |
2543 | 2231 | ||
2544 | /* Bit masks for PLL_DIV */ | 2232 | /* Bit masks for PLL_DIV */ |
@@ -2550,42 +2238,25 @@ | |||
2550 | 2238 | ||
2551 | #define MSEL 0x7e00 /* Multiplier Select */ | 2239 | #define MSEL 0x7e00 /* Multiplier Select */ |
2552 | #define BYPASS 0x100 /* PLL Bypass Enable */ | 2240 | #define BYPASS 0x100 /* PLL Bypass Enable */ |
2553 | #define nBYPASS 0x0 | ||
2554 | #define OUTPUT_DELAY 0x80 /* External Memory Output Delay Enable */ | 2241 | #define OUTPUT_DELAY 0x80 /* External Memory Output Delay Enable */ |
2555 | #define nOUTPUT_DELAY 0x0 | ||
2556 | #define INPUT_DELAY 0x40 /* External Memory Input Delay Enable */ | 2242 | #define INPUT_DELAY 0x40 /* External Memory Input Delay Enable */ |
2557 | #define nINPUT_DELAY 0x0 | ||
2558 | #define PDWN 0x20 /* Power Down */ | 2243 | #define PDWN 0x20 /* Power Down */ |
2559 | #define nPDWN 0x0 | ||
2560 | #define STOPCK 0x8 /* Stop Clock */ | 2244 | #define STOPCK 0x8 /* Stop Clock */ |
2561 | #define nSTOPCK 0x0 | ||
2562 | #define PLL_OFF 0x2 /* Disable PLL */ | 2245 | #define PLL_OFF 0x2 /* Disable PLL */ |
2563 | #define nPLL_OFF 0x0 | ||
2564 | #define DF 0x1 /* Divide Frequency */ | 2246 | #define DF 0x1 /* Divide Frequency */ |
2565 | #define nDF 0x0 | ||
2566 | 2247 | ||
2567 | /* Bit masks for PLL_STAT */ | 2248 | /* Bit masks for PLL_STAT */ |
2568 | 2249 | ||
2569 | #define PLL_LOCKED 0x20 /* PLL Locked Status */ | 2250 | #define PLL_LOCKED 0x20 /* PLL Locked Status */ |
2570 | #define nPLL_LOCKED 0x0 | ||
2571 | #define ACTIVE_PLLDISABLED 0x4 /* Active Mode With PLL Disabled */ | 2251 | #define ACTIVE_PLLDISABLED 0x4 /* Active Mode With PLL Disabled */ |
2572 | #define nACTIVE_PLLDISABLED 0x0 | ||
2573 | #define FULL_ON 0x2 /* Full-On Mode */ | 2252 | #define FULL_ON 0x2 /* Full-On Mode */ |
2574 | #define nFULL_ON 0x0 | ||
2575 | #define ACTIVE_PLLENABLED 0x1 /* Active Mode With PLL Enabled */ | 2253 | #define ACTIVE_PLLENABLED 0x1 /* Active Mode With PLL Enabled */ |
2576 | #define nACTIVE_PLLENABLED 0x0 | ||
2577 | #define RTCWS 0x400 /* RTC/Reset Wake-Up Status */ | 2254 | #define RTCWS 0x400 /* RTC/Reset Wake-Up Status */ |
2578 | #define nRTCWS 0x0 | ||
2579 | #define CANWS 0x800 /* CAN Wake-Up Status */ | 2255 | #define CANWS 0x800 /* CAN Wake-Up Status */ |
2580 | #define nCANWS 0x0 | ||
2581 | #define USBWS 0x2000 /* USB Wake-Up Status */ | 2256 | #define USBWS 0x2000 /* USB Wake-Up Status */ |
2582 | #define nUSBWS 0x0 | ||
2583 | #define KPADWS 0x4000 /* Keypad Wake-Up Status */ | 2257 | #define KPADWS 0x4000 /* Keypad Wake-Up Status */ |
2584 | #define nKPADWS 0x0 | ||
2585 | #define ROTWS 0x8000 /* Rotary Wake-Up Status */ | 2258 | #define ROTWS 0x8000 /* Rotary Wake-Up Status */ |
2586 | #define nROTWS 0x0 | ||
2587 | #define GPWS 0x1000 /* General-Purpose Wake-Up Status */ | 2259 | #define GPWS 0x1000 /* General-Purpose Wake-Up Status */ |
2588 | #define nGPWS 0x0 | ||
2589 | 2260 | ||
2590 | /* Bit masks for VR_CTL */ | 2261 | /* Bit masks for VR_CTL */ |
2591 | 2262 | ||
@@ -2593,79 +2264,52 @@ | |||
2593 | #define GAIN 0xc /* Voltage Output Level Gain */ | 2264 | #define GAIN 0xc /* Voltage Output Level Gain */ |
2594 | #define VLEV 0xf0 /* Internal Voltage Level */ | 2265 | #define VLEV 0xf0 /* Internal Voltage Level */ |
2595 | #define SCKELOW 0x8000 /* Drive SCKE Low During Reset Enable */ | 2266 | #define SCKELOW 0x8000 /* Drive SCKE Low During Reset Enable */ |
2596 | #define nSCKELOW 0x0 | ||
2597 | #define WAKE 0x100 /* RTC/Reset Wake-Up Enable */ | 2267 | #define WAKE 0x100 /* RTC/Reset Wake-Up Enable */ |
2598 | #define nWAKE 0x0 | ||
2599 | #define CANWE 0x200 /* CAN0/1 Wake-Up Enable */ | 2268 | #define CANWE 0x200 /* CAN0/1 Wake-Up Enable */ |
2600 | #define nCANWE 0x0 | ||
2601 | #define GPWE 0x400 /* General-Purpose Wake-Up Enable */ | 2269 | #define GPWE 0x400 /* General-Purpose Wake-Up Enable */ |
2602 | #define nGPWE 0x0 | ||
2603 | #define USBWE 0x800 /* USB Wake-Up Enable */ | 2270 | #define USBWE 0x800 /* USB Wake-Up Enable */ |
2604 | #define nUSBWE 0x0 | ||
2605 | #define KPADWE 0x1000 /* Keypad Wake-Up Enable */ | 2271 | #define KPADWE 0x1000 /* Keypad Wake-Up Enable */ |
2606 | #define nKPADWE 0x0 | ||
2607 | #define ROTWE 0x2000 /* Rotary Wake-Up Enable */ | 2272 | #define ROTWE 0x2000 /* Rotary Wake-Up Enable */ |
2608 | #define nROTWE 0x0 | ||
2609 | 2273 | ||
2610 | /* Bit masks for NFC_CTL */ | 2274 | /* Bit masks for NFC_CTL */ |
2611 | 2275 | ||
2612 | #define WR_DLY 0xf /* Write Strobe Delay */ | 2276 | #define WR_DLY 0xf /* Write Strobe Delay */ |
2613 | #define RD_DLY 0xf0 /* Read Strobe Delay */ | 2277 | #define RD_DLY 0xf0 /* Read Strobe Delay */ |
2614 | #define NWIDTH 0x100 /* NAND Data Width */ | 2278 | #define NWIDTH 0x100 /* NAND Data Width */ |
2615 | #define nNWIDTH 0x0 | ||
2616 | #define PG_SIZE 0x200 /* Page Size */ | 2279 | #define PG_SIZE 0x200 /* Page Size */ |
2617 | #define nPG_SIZE 0x0 | ||
2618 | 2280 | ||
2619 | /* Bit masks for NFC_STAT */ | 2281 | /* Bit masks for NFC_STAT */ |
2620 | 2282 | ||
2621 | #define NBUSY 0x1 /* Not Busy */ | 2283 | #define NBUSY 0x1 /* Not Busy */ |
2622 | #define nNBUSY 0x0 | ||
2623 | #define WB_FULL 0x2 /* Write Buffer Full */ | 2284 | #define WB_FULL 0x2 /* Write Buffer Full */ |
2624 | #define nWB_FULL 0x0 | ||
2625 | #define PG_WR_STAT 0x4 /* Page Write Pending */ | 2285 | #define PG_WR_STAT 0x4 /* Page Write Pending */ |
2626 | #define nPG_WR_STAT 0x0 | ||
2627 | #define PG_RD_STAT 0x8 /* Page Read Pending */ | 2286 | #define PG_RD_STAT 0x8 /* Page Read Pending */ |
2628 | #define nPG_RD_STAT 0x0 | ||
2629 | #define WB_EMPTY 0x10 /* Write Buffer Empty */ | 2287 | #define WB_EMPTY 0x10 /* Write Buffer Empty */ |
2630 | #define nWB_EMPTY 0x0 | ||
2631 | 2288 | ||
2632 | /* Bit masks for NFC_IRQSTAT */ | 2289 | /* Bit masks for NFC_IRQSTAT */ |
2633 | 2290 | ||
2634 | #define NBUSYIRQ 0x1 /* Not Busy IRQ */ | 2291 | #define NBUSYIRQ 0x1 /* Not Busy IRQ */ |
2635 | #define nNBUSYIRQ 0x0 | ||
2636 | #define WB_OVF 0x2 /* Write Buffer Overflow */ | 2292 | #define WB_OVF 0x2 /* Write Buffer Overflow */ |
2637 | #define nWB_OVF 0x0 | ||
2638 | #define WB_EDGE 0x4 /* Write Buffer Edge Detect */ | 2293 | #define WB_EDGE 0x4 /* Write Buffer Edge Detect */ |
2639 | #define nWB_EDGE 0x0 | ||
2640 | #define RD_RDY 0x8 /* Read Data Ready */ | 2294 | #define RD_RDY 0x8 /* Read Data Ready */ |
2641 | #define nRD_RDY 0x0 | ||
2642 | #define WR_DONE 0x10 /* Page Write Done */ | 2295 | #define WR_DONE 0x10 /* Page Write Done */ |
2643 | #define nWR_DONE 0x0 | ||
2644 | 2296 | ||
2645 | /* Bit masks for NFC_IRQMASK */ | 2297 | /* Bit masks for NFC_IRQMASK */ |
2646 | 2298 | ||
2647 | #define MASK_BUSYIRQ 0x1 /* Mask Not Busy IRQ */ | 2299 | #define MASK_BUSYIRQ 0x1 /* Mask Not Busy IRQ */ |
2648 | #define nMASK_BUSYIRQ 0x0 | ||
2649 | #define MASK_WBOVF 0x2 /* Mask Write Buffer Overflow */ | 2300 | #define MASK_WBOVF 0x2 /* Mask Write Buffer Overflow */ |
2650 | #define nMASK_WBOVF 0x0 | ||
2651 | #define MASK_WBEMPTY 0x4 /* Mask Write Buffer Empty */ | 2301 | #define MASK_WBEMPTY 0x4 /* Mask Write Buffer Empty */ |
2652 | #define nMASK_WBEMPTY 0x0 | ||
2653 | #define MASK_RDRDY 0x8 /* Mask Read Data Ready */ | 2302 | #define MASK_RDRDY 0x8 /* Mask Read Data Ready */ |
2654 | #define nMASK_RDRDY 0x0 | ||
2655 | #define MASK_WRDONE 0x10 /* Mask Write Done */ | 2303 | #define MASK_WRDONE 0x10 /* Mask Write Done */ |
2656 | #define nMASK_WRDONE 0x0 | ||
2657 | 2304 | ||
2658 | /* Bit masks for NFC_RST */ | 2305 | /* Bit masks for NFC_RST */ |
2659 | 2306 | ||
2660 | #define ECC_RST 0x1 /* ECC (and NFC counters) Reset */ | 2307 | #define ECC_RST 0x1 /* ECC (and NFC counters) Reset */ |
2661 | #define nECC_RST 0x0 | ||
2662 | 2308 | ||
2663 | /* Bit masks for NFC_PGCTL */ | 2309 | /* Bit masks for NFC_PGCTL */ |
2664 | 2310 | ||
2665 | #define PG_RD_START 0x1 /* Page Read Start */ | 2311 | #define PG_RD_START 0x1 /* Page Read Start */ |
2666 | #define nPG_RD_START 0x0 | ||
2667 | #define PG_WR_START 0x2 /* Page Write Start */ | 2312 | #define PG_WR_START 0x2 /* Page Write Start */ |
2668 | #define nPG_WR_START 0x0 | ||
2669 | 2313 | ||
2670 | /* Bit masks for NFC_ECC0 */ | 2314 | /* Bit masks for NFC_ECC0 */ |
2671 | 2315 | ||
@@ -2690,56 +2334,34 @@ | |||
2690 | /* Bit masks for CAN0_CONTROL */ | 2334 | /* Bit masks for CAN0_CONTROL */ |
2691 | 2335 | ||
2692 | #define SRS 0x1 /* Software Reset */ | 2336 | #define SRS 0x1 /* Software Reset */ |
2693 | #define nSRS 0x0 | ||
2694 | #define DNM 0x2 /* DeviceNet Mode */ | 2337 | #define DNM 0x2 /* DeviceNet Mode */ |
2695 | #define nDNM 0x0 | ||
2696 | #define ABO 0x4 /* Auto Bus On */ | 2338 | #define ABO 0x4 /* Auto Bus On */ |
2697 | #define nABO 0x0 | ||
2698 | #define WBA 0x10 /* Wakeup On CAN Bus Activity */ | 2339 | #define WBA 0x10 /* Wakeup On CAN Bus Activity */ |
2699 | #define nWBA 0x0 | ||
2700 | #define SMR 0x20 /* Sleep Mode Request */ | 2340 | #define SMR 0x20 /* Sleep Mode Request */ |
2701 | #define nSMR 0x0 | ||
2702 | #define CSR 0x40 /* CAN Suspend Mode Request */ | 2341 | #define CSR 0x40 /* CAN Suspend Mode Request */ |
2703 | #define nCSR 0x0 | ||
2704 | #define CCR 0x80 /* CAN Configuration Mode Request */ | 2342 | #define CCR 0x80 /* CAN Configuration Mode Request */ |
2705 | #define nCCR 0x0 | ||
2706 | 2343 | ||
2707 | /* Bit masks for CAN0_STATUS */ | 2344 | /* Bit masks for CAN0_STATUS */ |
2708 | 2345 | ||
2709 | #define WT 0x1 /* CAN Transmit Warning Flag */ | 2346 | #define WT 0x1 /* CAN Transmit Warning Flag */ |
2710 | #define nWT 0x0 | ||
2711 | #define WR 0x2 /* CAN Receive Warning Flag */ | 2347 | #define WR 0x2 /* CAN Receive Warning Flag */ |
2712 | #define nWR 0x0 | ||
2713 | #define EP 0x4 /* CAN Error Passive Mode */ | 2348 | #define EP 0x4 /* CAN Error Passive Mode */ |
2714 | #define nEP 0x0 | ||
2715 | #define EBO 0x8 /* CAN Error Bus Off Mode */ | 2349 | #define EBO 0x8 /* CAN Error Bus Off Mode */ |
2716 | #define nEBO 0x0 | ||
2717 | #define CSA 0x40 /* CAN Suspend Mode Acknowledge */ | 2350 | #define CSA 0x40 /* CAN Suspend Mode Acknowledge */ |
2718 | #define nCSA 0x0 | ||
2719 | #define CCA 0x80 /* CAN Configuration Mode Acknowledge */ | 2351 | #define CCA 0x80 /* CAN Configuration Mode Acknowledge */ |
2720 | #define nCCA 0x0 | ||
2721 | #define MBPTR 0x1f00 /* Mailbox Pointer */ | 2352 | #define MBPTR 0x1f00 /* Mailbox Pointer */ |
2722 | #define TRM 0x4000 /* Transmit Mode Status */ | 2353 | #define TRM 0x4000 /* Transmit Mode Status */ |
2723 | #define nTRM 0x0 | ||
2724 | #define REC 0x8000 /* Receive Mode Status */ | 2354 | #define REC 0x8000 /* Receive Mode Status */ |
2725 | #define nREC 0x0 | ||
2726 | 2355 | ||
2727 | /* Bit masks for CAN0_DEBUG */ | 2356 | /* Bit masks for CAN0_DEBUG */ |
2728 | 2357 | ||
2729 | #define DEC 0x1 /* Disable Transmit/Receive Error Counters */ | 2358 | #define DEC 0x1 /* Disable Transmit/Receive Error Counters */ |
2730 | #define nDEC 0x0 | ||
2731 | #define DRI 0x2 /* Disable CANRX Input Pin */ | 2359 | #define DRI 0x2 /* Disable CANRX Input Pin */ |
2732 | #define nDRI 0x0 | ||
2733 | #define DTO 0x4 /* Disable CANTX Output Pin */ | 2360 | #define DTO 0x4 /* Disable CANTX Output Pin */ |
2734 | #define nDTO 0x0 | ||
2735 | #define DIL 0x8 /* Disable Internal Loop */ | 2361 | #define DIL 0x8 /* Disable Internal Loop */ |
2736 | #define nDIL 0x0 | ||
2737 | #define MAA 0x10 /* Mode Auto-Acknowledge */ | 2362 | #define MAA 0x10 /* Mode Auto-Acknowledge */ |
2738 | #define nMAA 0x0 | ||
2739 | #define MRB 0x20 /* Mode Read Back */ | 2363 | #define MRB 0x20 /* Mode Read Back */ |
2740 | #define nMRB 0x0 | ||
2741 | #define CDE 0x8000 /* CAN Debug Mode Enable */ | 2364 | #define CDE 0x8000 /* CAN Debug Mode Enable */ |
2742 | #define nCDE 0x0 | ||
2743 | 2365 | ||
2744 | /* Bit masks for CAN0_CLOCK */ | 2366 | /* Bit masks for CAN0_CLOCK */ |
2745 | 2367 | ||
@@ -2749,111 +2371,69 @@ | |||
2749 | 2371 | ||
2750 | #define SJW 0x300 /* Synchronization Jump Width */ | 2372 | #define SJW 0x300 /* Synchronization Jump Width */ |
2751 | #define SAM 0x80 /* Sampling */ | 2373 | #define SAM 0x80 /* Sampling */ |
2752 | #define nSAM 0x0 | ||
2753 | #define TSEG2 0x70 /* Time Segment 2 */ | 2374 | #define TSEG2 0x70 /* Time Segment 2 */ |
2754 | #define TSEG1 0xf /* Time Segment 1 */ | 2375 | #define TSEG1 0xf /* Time Segment 1 */ |
2755 | 2376 | ||
2756 | /* Bit masks for CAN0_INTR */ | 2377 | /* Bit masks for CAN0_INTR */ |
2757 | 2378 | ||
2758 | #define CANRX 0x80 /* Serial Input From Transceiver */ | 2379 | #define CANRX 0x80 /* Serial Input From Transceiver */ |
2759 | #define nCANRX 0x0 | ||
2760 | #define CANTX 0x40 /* Serial Output To Transceiver */ | 2380 | #define CANTX 0x40 /* Serial Output To Transceiver */ |
2761 | #define nCANTX 0x0 | ||
2762 | #define SMACK 0x8 /* Sleep Mode Acknowledge */ | 2381 | #define SMACK 0x8 /* Sleep Mode Acknowledge */ |
2763 | #define nSMACK 0x0 | ||
2764 | #define GIRQ 0x4 /* Global Interrupt Request Status */ | 2382 | #define GIRQ 0x4 /* Global Interrupt Request Status */ |
2765 | #define nGIRQ 0x0 | ||
2766 | #define MBTIRQ 0x2 /* Mailbox Transmit Interrupt Request */ | 2383 | #define MBTIRQ 0x2 /* Mailbox Transmit Interrupt Request */ |
2767 | #define nMBTIRQ 0x0 | ||
2768 | #define MBRIRQ 0x1 /* Mailbox Receive Interrupt Request */ | 2384 | #define MBRIRQ 0x1 /* Mailbox Receive Interrupt Request */ |
2769 | #define nMBRIRQ 0x0 | ||
2770 | 2385 | ||
2771 | /* Bit masks for CAN0_GIM */ | 2386 | /* Bit masks for CAN0_GIM */ |
2772 | 2387 | ||
2773 | #define EWTIM 0x1 /* Error Warning Transmit Interrupt Mask */ | 2388 | #define EWTIM 0x1 /* Error Warning Transmit Interrupt Mask */ |
2774 | #define nEWTIM 0x0 | ||
2775 | #define EWRIM 0x2 /* Error Warning Receive Interrupt Mask */ | 2389 | #define EWRIM 0x2 /* Error Warning Receive Interrupt Mask */ |
2776 | #define nEWRIM 0x0 | ||
2777 | #define EPIM 0x4 /* Error Passive Interrupt Mask */ | 2390 | #define EPIM 0x4 /* Error Passive Interrupt Mask */ |
2778 | #define nEPIM 0x0 | ||
2779 | #define BOIM 0x8 /* Bus Off Interrupt Mask */ | 2391 | #define BOIM 0x8 /* Bus Off Interrupt Mask */ |
2780 | #define nBOIM 0x0 | ||
2781 | #define WUIM 0x10 /* Wakeup Interrupt Mask */ | 2392 | #define WUIM 0x10 /* Wakeup Interrupt Mask */ |
2782 | #define nWUIM 0x0 | ||
2783 | #define UIAIM 0x20 /* Unimplemented Address Interrupt Mask */ | 2393 | #define UIAIM 0x20 /* Unimplemented Address Interrupt Mask */ |
2784 | #define nUIAIM 0x0 | ||
2785 | #define AAIM 0x40 /* Abort Acknowledge Interrupt Mask */ | 2394 | #define AAIM 0x40 /* Abort Acknowledge Interrupt Mask */ |
2786 | #define nAAIM 0x0 | ||
2787 | #define RMLIM 0x80 /* Receive Message Lost Interrupt Mask */ | 2395 | #define RMLIM 0x80 /* Receive Message Lost Interrupt Mask */ |
2788 | #define nRMLIM 0x0 | ||
2789 | #define UCEIM 0x100 /* Universal Counter Exceeded Interrupt Mask */ | 2396 | #define UCEIM 0x100 /* Universal Counter Exceeded Interrupt Mask */ |
2790 | #define nUCEIM 0x0 | ||
2791 | #define ADIM 0x400 /* Access Denied Interrupt Mask */ | 2397 | #define ADIM 0x400 /* Access Denied Interrupt Mask */ |
2792 | #define nADIM 0x0 | ||
2793 | 2398 | ||
2794 | /* Bit masks for CAN0_GIS */ | 2399 | /* Bit masks for CAN0_GIS */ |
2795 | 2400 | ||
2796 | #define EWTIS 0x1 /* Error Warning Transmit Interrupt Status */ | 2401 | #define EWTIS 0x1 /* Error Warning Transmit Interrupt Status */ |
2797 | #define nEWTIS 0x0 | ||
2798 | #define EWRIS 0x2 /* Error Warning Receive Interrupt Status */ | 2402 | #define EWRIS 0x2 /* Error Warning Receive Interrupt Status */ |
2799 | #define nEWRIS 0x0 | ||
2800 | #define EPIS 0x4 /* Error Passive Interrupt Status */ | 2403 | #define EPIS 0x4 /* Error Passive Interrupt Status */ |
2801 | #define nEPIS 0x0 | ||
2802 | #define BOIS 0x8 /* Bus Off Interrupt Status */ | 2404 | #define BOIS 0x8 /* Bus Off Interrupt Status */ |
2803 | #define nBOIS 0x0 | ||
2804 | #define WUIS 0x10 /* Wakeup Interrupt Status */ | 2405 | #define WUIS 0x10 /* Wakeup Interrupt Status */ |
2805 | #define nWUIS 0x0 | ||
2806 | #define UIAIS 0x20 /* Unimplemented Address Interrupt Status */ | 2406 | #define UIAIS 0x20 /* Unimplemented Address Interrupt Status */ |
2807 | #define nUIAIS 0x0 | ||
2808 | #define AAIS 0x40 /* Abort Acknowledge Interrupt Status */ | 2407 | #define AAIS 0x40 /* Abort Acknowledge Interrupt Status */ |
2809 | #define nAAIS 0x0 | ||
2810 | #define RMLIS 0x80 /* Receive Message Lost Interrupt Status */ | 2408 | #define RMLIS 0x80 /* Receive Message Lost Interrupt Status */ |
2811 | #define nRMLIS 0x0 | ||
2812 | #define UCEIS 0x100 /* Universal Counter Exceeded Interrupt Status */ | 2409 | #define UCEIS 0x100 /* Universal Counter Exceeded Interrupt Status */ |
2813 | #define nUCEIS 0x0 | ||
2814 | #define ADIS 0x400 /* Access Denied Interrupt Status */ | 2410 | #define ADIS 0x400 /* Access Denied Interrupt Status */ |
2815 | #define nADIS 0x0 | ||
2816 | 2411 | ||
2817 | /* Bit masks for CAN0_GIF */ | 2412 | /* Bit masks for CAN0_GIF */ |
2818 | 2413 | ||
2819 | #define EWTIF 0x1 /* Error Warning Transmit Interrupt Flag */ | 2414 | #define EWTIF 0x1 /* Error Warning Transmit Interrupt Flag */ |
2820 | #define nEWTIF 0x0 | ||
2821 | #define EWRIF 0x2 /* Error Warning Receive Interrupt Flag */ | 2415 | #define EWRIF 0x2 /* Error Warning Receive Interrupt Flag */ |
2822 | #define nEWRIF 0x0 | ||
2823 | #define EPIF 0x4 /* Error Passive Interrupt Flag */ | 2416 | #define EPIF 0x4 /* Error Passive Interrupt Flag */ |
2824 | #define nEPIF 0x0 | ||
2825 | #define BOIF 0x8 /* Bus Off Interrupt Flag */ | 2417 | #define BOIF 0x8 /* Bus Off Interrupt Flag */ |
2826 | #define nBOIF 0x0 | ||
2827 | #define WUIF 0x10 /* Wakeup Interrupt Flag */ | 2418 | #define WUIF 0x10 /* Wakeup Interrupt Flag */ |
2828 | #define nWUIF 0x0 | ||
2829 | #define UIAIF 0x20 /* Unimplemented Address Interrupt Flag */ | 2419 | #define UIAIF 0x20 /* Unimplemented Address Interrupt Flag */ |
2830 | #define nUIAIF 0x0 | ||
2831 | #define AAIF 0x40 /* Abort Acknowledge Interrupt Flag */ | 2420 | #define AAIF 0x40 /* Abort Acknowledge Interrupt Flag */ |
2832 | #define nAAIF 0x0 | ||
2833 | #define RMLIF 0x80 /* Receive Message Lost Interrupt Flag */ | 2421 | #define RMLIF 0x80 /* Receive Message Lost Interrupt Flag */ |
2834 | #define nRMLIF 0x0 | ||
2835 | #define UCEIF 0x100 /* Universal Counter Exceeded Interrupt Flag */ | 2422 | #define UCEIF 0x100 /* Universal Counter Exceeded Interrupt Flag */ |
2836 | #define nUCEIF 0x0 | ||
2837 | #define ADIF 0x400 /* Access Denied Interrupt Flag */ | 2423 | #define ADIF 0x400 /* Access Denied Interrupt Flag */ |
2838 | #define nADIF 0x0 | ||
2839 | 2424 | ||
2840 | /* Bit masks for CAN0_MBTD */ | 2425 | /* Bit masks for CAN0_MBTD */ |
2841 | 2426 | ||
2842 | #define TDR 0x80 /* Temporary Disable Request */ | 2427 | #define TDR 0x80 /* Temporary Disable Request */ |
2843 | #define nTDR 0x0 | ||
2844 | #define TDA 0x40 /* Temporary Disable Acknowledge */ | 2428 | #define TDA 0x40 /* Temporary Disable Acknowledge */ |
2845 | #define nTDA 0x0 | ||
2846 | #define TDPTR 0x1f /* Temporary Disable Pointer */ | 2429 | #define TDPTR 0x1f /* Temporary Disable Pointer */ |
2847 | 2430 | ||
2848 | /* Bit masks for CAN0_UCCNF */ | 2431 | /* Bit masks for CAN0_UCCNF */ |
2849 | 2432 | ||
2850 | #define UCCNF 0xf /* Universal Counter Configuration */ | 2433 | #define UCCNF 0xf /* Universal Counter Configuration */ |
2851 | #define UCRC 0x20 /* Universal Counter Reload/Clear */ | 2434 | #define UCRC 0x20 /* Universal Counter Reload/Clear */ |
2852 | #define nUCRC 0x0 | ||
2853 | #define UCCT 0x40 /* Universal Counter CAN Trigger */ | 2435 | #define UCCT 0x40 /* Universal Counter CAN Trigger */ |
2854 | #define nUCCT 0x0 | ||
2855 | #define UCE 0x80 /* Universal Counter Enable */ | 2436 | #define UCE 0x80 /* Universal Counter Enable */ |
2856 | #define nUCE 0x0 | ||
2857 | 2437 | ||
2858 | /* Bit masks for CAN0_UCCNT */ | 2438 | /* Bit masks for CAN0_UCCNT */ |
2859 | 2439 | ||
@@ -2871,17 +2451,11 @@ | |||
2871 | /* Bit masks for CAN0_ESR */ | 2451 | /* Bit masks for CAN0_ESR */ |
2872 | 2452 | ||
2873 | #define FER 0x80 /* Form Error */ | 2453 | #define FER 0x80 /* Form Error */ |
2874 | #define nFER 0x0 | ||
2875 | #define BEF 0x40 /* Bit Error Flag */ | 2454 | #define BEF 0x40 /* Bit Error Flag */ |
2876 | #define nBEF 0x0 | ||
2877 | #define SA0 0x20 /* Stuck At Dominant */ | 2455 | #define SA0 0x20 /* Stuck At Dominant */ |
2878 | #define nSA0 0x0 | ||
2879 | #define CRCE 0x10 /* CRC Error */ | 2456 | #define CRCE 0x10 /* CRC Error */ |
2880 | #define nCRCE 0x0 | ||
2881 | #define SER 0x8 /* Stuff Bit Error */ | 2457 | #define SER 0x8 /* Stuff Bit Error */ |
2882 | #define nSER 0x0 | ||
2883 | #define ACKE 0x4 /* Acknowledge Error */ | 2458 | #define ACKE 0x4 /* Acknowledge Error */ |
2884 | #define nACKE 0x0 | ||
2885 | 2459 | ||
2886 | /* Bit masks for CAN0_EWR */ | 2460 | /* Bit masks for CAN0_EWR */ |
2887 | 2461 | ||
@@ -2891,11 +2465,8 @@ | |||
2891 | /* Bit masks for CAN0_AMxx_H */ | 2465 | /* Bit masks for CAN0_AMxx_H */ |
2892 | 2466 | ||
2893 | #define FDF 0x8000 /* Filter On Data Field */ | 2467 | #define FDF 0x8000 /* Filter On Data Field */ |
2894 | #define nFDF 0x0 | ||
2895 | #define FMD 0x4000 /* Full Mask Data */ | 2468 | #define FMD 0x4000 /* Full Mask Data */ |
2896 | #define nFMD 0x0 | ||
2897 | #define AMIDE 0x2000 /* Acceptance Mask Identifier Extension */ | 2469 | #define AMIDE 0x2000 /* Acceptance Mask Identifier Extension */ |
2898 | #define nAMIDE 0x0 | ||
2899 | #define BASEID 0x1ffc /* Base Identifier */ | 2470 | #define BASEID 0x1ffc /* Base Identifier */ |
2900 | #define EXTID_HI 0x3 /* Extended Identifier High Bits */ | 2471 | #define EXTID_HI 0x3 /* Extended Identifier High Bits */ |
2901 | 2472 | ||
@@ -2907,11 +2478,8 @@ | |||
2907 | /* Bit masks for CAN0_MBxx_ID1 */ | 2478 | /* Bit masks for CAN0_MBxx_ID1 */ |
2908 | 2479 | ||
2909 | #define AME 0x8000 /* Acceptance Mask Enable */ | 2480 | #define AME 0x8000 /* Acceptance Mask Enable */ |
2910 | #define nAME 0x0 | ||
2911 | #define RTR 0x4000 /* Remote Transmission Request */ | 2481 | #define RTR 0x4000 /* Remote Transmission Request */ |
2912 | #define nRTR 0x0 | ||
2913 | #define IDE 0x2000 /* Identifier Extension */ | 2482 | #define IDE 0x2000 /* Identifier Extension */ |
2914 | #define nIDE 0x0 | ||
2915 | #define BASEID 0x1ffc /* Base Identifier */ | 2483 | #define BASEID 0x1ffc /* Base Identifier */ |
2916 | #define EXTID_HI 0x3 /* Extended Identifier High Bits */ | 2484 | #define EXTID_HI 0x3 /* Extended Identifier High Bits */ |
2917 | 2485 | ||
@@ -2951,980 +2519,546 @@ | |||
2951 | /* Bit masks for CAN0_MC1 */ | 2519 | /* Bit masks for CAN0_MC1 */ |
2952 | 2520 | ||
2953 | #define MC0 0x1 /* Mailbox 0 Enable */ | 2521 | #define MC0 0x1 /* Mailbox 0 Enable */ |
2954 | #define nMC0 0x0 | ||
2955 | #define MC1 0x2 /* Mailbox 1 Enable */ | 2522 | #define MC1 0x2 /* Mailbox 1 Enable */ |
2956 | #define nMC1 0x0 | ||
2957 | #define MC2 0x4 /* Mailbox 2 Enable */ | 2523 | #define MC2 0x4 /* Mailbox 2 Enable */ |
2958 | #define nMC2 0x0 | ||
2959 | #define MC3 0x8 /* Mailbox 3 Enable */ | 2524 | #define MC3 0x8 /* Mailbox 3 Enable */ |
2960 | #define nMC3 0x0 | ||
2961 | #define MC4 0x10 /* Mailbox 4 Enable */ | 2525 | #define MC4 0x10 /* Mailbox 4 Enable */ |
2962 | #define nMC4 0x0 | ||
2963 | #define MC5 0x20 /* Mailbox 5 Enable */ | 2526 | #define MC5 0x20 /* Mailbox 5 Enable */ |
2964 | #define nMC5 0x0 | ||
2965 | #define MC6 0x40 /* Mailbox 6 Enable */ | 2527 | #define MC6 0x40 /* Mailbox 6 Enable */ |
2966 | #define nMC6 0x0 | ||
2967 | #define MC7 0x80 /* Mailbox 7 Enable */ | 2528 | #define MC7 0x80 /* Mailbox 7 Enable */ |
2968 | #define nMC7 0x0 | ||
2969 | #define MC8 0x100 /* Mailbox 8 Enable */ | 2529 | #define MC8 0x100 /* Mailbox 8 Enable */ |
2970 | #define nMC8 0x0 | ||
2971 | #define MC9 0x200 /* Mailbox 9 Enable */ | 2530 | #define MC9 0x200 /* Mailbox 9 Enable */ |
2972 | #define nMC9 0x0 | ||
2973 | #define MC10 0x400 /* Mailbox 10 Enable */ | 2531 | #define MC10 0x400 /* Mailbox 10 Enable */ |
2974 | #define nMC10 0x0 | ||
2975 | #define MC11 0x800 /* Mailbox 11 Enable */ | 2532 | #define MC11 0x800 /* Mailbox 11 Enable */ |
2976 | #define nMC11 0x0 | ||
2977 | #define MC12 0x1000 /* Mailbox 12 Enable */ | 2533 | #define MC12 0x1000 /* Mailbox 12 Enable */ |
2978 | #define nMC12 0x0 | ||
2979 | #define MC13 0x2000 /* Mailbox 13 Enable */ | 2534 | #define MC13 0x2000 /* Mailbox 13 Enable */ |
2980 | #define nMC13 0x0 | ||
2981 | #define MC14 0x4000 /* Mailbox 14 Enable */ | 2535 | #define MC14 0x4000 /* Mailbox 14 Enable */ |
2982 | #define nMC14 0x0 | ||
2983 | #define MC15 0x8000 /* Mailbox 15 Enable */ | 2536 | #define MC15 0x8000 /* Mailbox 15 Enable */ |
2984 | #define nMC15 0x0 | ||
2985 | 2537 | ||
2986 | /* Bit masks for CAN0_MC2 */ | 2538 | /* Bit masks for CAN0_MC2 */ |
2987 | 2539 | ||
2988 | #define MC16 0x1 /* Mailbox 16 Enable */ | 2540 | #define MC16 0x1 /* Mailbox 16 Enable */ |
2989 | #define nMC16 0x0 | ||
2990 | #define MC17 0x2 /* Mailbox 17 Enable */ | 2541 | #define MC17 0x2 /* Mailbox 17 Enable */ |
2991 | #define nMC17 0x0 | ||
2992 | #define MC18 0x4 /* Mailbox 18 Enable */ | 2542 | #define MC18 0x4 /* Mailbox 18 Enable */ |
2993 | #define nMC18 0x0 | ||
2994 | #define MC19 0x8 /* Mailbox 19 Enable */ | 2543 | #define MC19 0x8 /* Mailbox 19 Enable */ |
2995 | #define nMC19 0x0 | ||
2996 | #define MC20 0x10 /* Mailbox 20 Enable */ | 2544 | #define MC20 0x10 /* Mailbox 20 Enable */ |
2997 | #define nMC20 0x0 | ||
2998 | #define MC21 0x20 /* Mailbox 21 Enable */ | 2545 | #define MC21 0x20 /* Mailbox 21 Enable */ |
2999 | #define nMC21 0x0 | ||
3000 | #define MC22 0x40 /* Mailbox 22 Enable */ | 2546 | #define MC22 0x40 /* Mailbox 22 Enable */ |
3001 | #define nMC22 0x0 | ||
3002 | #define MC23 0x80 /* Mailbox 23 Enable */ | 2547 | #define MC23 0x80 /* Mailbox 23 Enable */ |
3003 | #define nMC23 0x0 | ||
3004 | #define MC24 0x100 /* Mailbox 24 Enable */ | 2548 | #define MC24 0x100 /* Mailbox 24 Enable */ |
3005 | #define nMC24 0x0 | ||
3006 | #define MC25 0x200 /* Mailbox 25 Enable */ | 2549 | #define MC25 0x200 /* Mailbox 25 Enable */ |
3007 | #define nMC25 0x0 | ||
3008 | #define MC26 0x400 /* Mailbox 26 Enable */ | 2550 | #define MC26 0x400 /* Mailbox 26 Enable */ |
3009 | #define nMC26 0x0 | ||
3010 | #define MC27 0x800 /* Mailbox 27 Enable */ | 2551 | #define MC27 0x800 /* Mailbox 27 Enable */ |
3011 | #define nMC27 0x0 | ||
3012 | #define MC28 0x1000 /* Mailbox 28 Enable */ | 2552 | #define MC28 0x1000 /* Mailbox 28 Enable */ |
3013 | #define nMC28 0x0 | ||
3014 | #define MC29 0x2000 /* Mailbox 29 Enable */ | 2553 | #define MC29 0x2000 /* Mailbox 29 Enable */ |
3015 | #define nMC29 0x0 | ||
3016 | #define MC30 0x4000 /* Mailbox 30 Enable */ | 2554 | #define MC30 0x4000 /* Mailbox 30 Enable */ |
3017 | #define nMC30 0x0 | ||
3018 | #define MC31 0x8000 /* Mailbox 31 Enable */ | 2555 | #define MC31 0x8000 /* Mailbox 31 Enable */ |
3019 | #define nMC31 0x0 | ||
3020 | 2556 | ||
3021 | /* Bit masks for CAN0_MD1 */ | 2557 | /* Bit masks for CAN0_MD1 */ |
3022 | 2558 | ||
3023 | #define MD0 0x1 /* Mailbox 0 Receive Enable */ | 2559 | #define MD0 0x1 /* Mailbox 0 Receive Enable */ |
3024 | #define nMD0 0x0 | ||
3025 | #define MD1 0x2 /* Mailbox 1 Receive Enable */ | 2560 | #define MD1 0x2 /* Mailbox 1 Receive Enable */ |
3026 | #define nMD1 0x0 | ||
3027 | #define MD2 0x4 /* Mailbox 2 Receive Enable */ | 2561 | #define MD2 0x4 /* Mailbox 2 Receive Enable */ |
3028 | #define nMD2 0x0 | ||
3029 | #define MD3 0x8 /* Mailbox 3 Receive Enable */ | 2562 | #define MD3 0x8 /* Mailbox 3 Receive Enable */ |
3030 | #define nMD3 0x0 | ||
3031 | #define MD4 0x10 /* Mailbox 4 Receive Enable */ | 2563 | #define MD4 0x10 /* Mailbox 4 Receive Enable */ |
3032 | #define nMD4 0x0 | ||
3033 | #define MD5 0x20 /* Mailbox 5 Receive Enable */ | 2564 | #define MD5 0x20 /* Mailbox 5 Receive Enable */ |
3034 | #define nMD5 0x0 | ||
3035 | #define MD6 0x40 /* Mailbox 6 Receive Enable */ | 2565 | #define MD6 0x40 /* Mailbox 6 Receive Enable */ |
3036 | #define nMD6 0x0 | ||
3037 | #define MD7 0x80 /* Mailbox 7 Receive Enable */ | 2566 | #define MD7 0x80 /* Mailbox 7 Receive Enable */ |
3038 | #define nMD7 0x0 | ||
3039 | #define MD8 0x100 /* Mailbox 8 Receive Enable */ | 2567 | #define MD8 0x100 /* Mailbox 8 Receive Enable */ |
3040 | #define nMD8 0x0 | ||
3041 | #define MD9 0x200 /* Mailbox 9 Receive Enable */ | 2568 | #define MD9 0x200 /* Mailbox 9 Receive Enable */ |
3042 | #define nMD9 0x0 | ||
3043 | #define MD10 0x400 /* Mailbox 10 Receive Enable */ | 2569 | #define MD10 0x400 /* Mailbox 10 Receive Enable */ |
3044 | #define nMD10 0x0 | ||
3045 | #define MD11 0x800 /* Mailbox 11 Receive Enable */ | 2570 | #define MD11 0x800 /* Mailbox 11 Receive Enable */ |
3046 | #define nMD11 0x0 | ||
3047 | #define MD12 0x1000 /* Mailbox 12 Receive Enable */ | 2571 | #define MD12 0x1000 /* Mailbox 12 Receive Enable */ |
3048 | #define nMD12 0x0 | ||
3049 | #define MD13 0x2000 /* Mailbox 13 Receive Enable */ | 2572 | #define MD13 0x2000 /* Mailbox 13 Receive Enable */ |
3050 | #define nMD13 0x0 | ||
3051 | #define MD14 0x4000 /* Mailbox 14 Receive Enable */ | 2573 | #define MD14 0x4000 /* Mailbox 14 Receive Enable */ |
3052 | #define nMD14 0x0 | ||
3053 | #define MD15 0x8000 /* Mailbox 15 Receive Enable */ | 2574 | #define MD15 0x8000 /* Mailbox 15 Receive Enable */ |
3054 | #define nMD15 0x0 | ||
3055 | 2575 | ||
3056 | /* Bit masks for CAN0_MD2 */ | 2576 | /* Bit masks for CAN0_MD2 */ |
3057 | 2577 | ||
3058 | #define MD16 0x1 /* Mailbox 16 Receive Enable */ | 2578 | #define MD16 0x1 /* Mailbox 16 Receive Enable */ |
3059 | #define nMD16 0x0 | ||
3060 | #define MD17 0x2 /* Mailbox 17 Receive Enable */ | 2579 | #define MD17 0x2 /* Mailbox 17 Receive Enable */ |
3061 | #define nMD17 0x0 | ||
3062 | #define MD18 0x4 /* Mailbox 18 Receive Enable */ | 2580 | #define MD18 0x4 /* Mailbox 18 Receive Enable */ |
3063 | #define nMD18 0x0 | ||
3064 | #define MD19 0x8 /* Mailbox 19 Receive Enable */ | 2581 | #define MD19 0x8 /* Mailbox 19 Receive Enable */ |
3065 | #define nMD19 0x0 | ||
3066 | #define MD20 0x10 /* Mailbox 20 Receive Enable */ | 2582 | #define MD20 0x10 /* Mailbox 20 Receive Enable */ |
3067 | #define nMD20 0x0 | ||
3068 | #define MD21 0x20 /* Mailbox 21 Receive Enable */ | 2583 | #define MD21 0x20 /* Mailbox 21 Receive Enable */ |
3069 | #define nMD21 0x0 | ||
3070 | #define MD22 0x40 /* Mailbox 22 Receive Enable */ | 2584 | #define MD22 0x40 /* Mailbox 22 Receive Enable */ |
3071 | #define nMD22 0x0 | ||
3072 | #define MD23 0x80 /* Mailbox 23 Receive Enable */ | 2585 | #define MD23 0x80 /* Mailbox 23 Receive Enable */ |
3073 | #define nMD23 0x0 | ||
3074 | #define MD24 0x100 /* Mailbox 24 Receive Enable */ | 2586 | #define MD24 0x100 /* Mailbox 24 Receive Enable */ |
3075 | #define nMD24 0x0 | ||
3076 | #define MD25 0x200 /* Mailbox 25 Receive Enable */ | 2587 | #define MD25 0x200 /* Mailbox 25 Receive Enable */ |
3077 | #define nMD25 0x0 | ||
3078 | #define MD26 0x400 /* Mailbox 26 Receive Enable */ | 2588 | #define MD26 0x400 /* Mailbox 26 Receive Enable */ |
3079 | #define nMD26 0x0 | ||
3080 | #define MD27 0x800 /* Mailbox 27 Receive Enable */ | 2589 | #define MD27 0x800 /* Mailbox 27 Receive Enable */ |
3081 | #define nMD27 0x0 | ||
3082 | #define MD28 0x1000 /* Mailbox 28 Receive Enable */ | 2590 | #define MD28 0x1000 /* Mailbox 28 Receive Enable */ |
3083 | #define nMD28 0x0 | ||
3084 | #define MD29 0x2000 /* Mailbox 29 Receive Enable */ | 2591 | #define MD29 0x2000 /* Mailbox 29 Receive Enable */ |
3085 | #define nMD29 0x0 | ||
3086 | #define MD30 0x4000 /* Mailbox 30 Receive Enable */ | 2592 | #define MD30 0x4000 /* Mailbox 30 Receive Enable */ |
3087 | #define nMD30 0x0 | ||
3088 | #define MD31 0x8000 /* Mailbox 31 Receive Enable */ | 2593 | #define MD31 0x8000 /* Mailbox 31 Receive Enable */ |
3089 | #define nMD31 0x0 | ||
3090 | 2594 | ||
3091 | /* Bit masks for CAN0_RMP1 */ | 2595 | /* Bit masks for CAN0_RMP1 */ |
3092 | 2596 | ||
3093 | #define RMP0 0x1 /* Mailbox 0 Receive Message Pending */ | 2597 | #define RMP0 0x1 /* Mailbox 0 Receive Message Pending */ |
3094 | #define nRMP0 0x0 | ||
3095 | #define RMP1 0x2 /* Mailbox 1 Receive Message Pending */ | 2598 | #define RMP1 0x2 /* Mailbox 1 Receive Message Pending */ |
3096 | #define nRMP1 0x0 | ||
3097 | #define RMP2 0x4 /* Mailbox 2 Receive Message Pending */ | 2599 | #define RMP2 0x4 /* Mailbox 2 Receive Message Pending */ |
3098 | #define nRMP2 0x0 | ||
3099 | #define RMP3 0x8 /* Mailbox 3 Receive Message Pending */ | 2600 | #define RMP3 0x8 /* Mailbox 3 Receive Message Pending */ |
3100 | #define nRMP3 0x0 | ||
3101 | #define RMP4 0x10 /* Mailbox 4 Receive Message Pending */ | 2601 | #define RMP4 0x10 /* Mailbox 4 Receive Message Pending */ |
3102 | #define nRMP4 0x0 | ||
3103 | #define RMP5 0x20 /* Mailbox 5 Receive Message Pending */ | 2602 | #define RMP5 0x20 /* Mailbox 5 Receive Message Pending */ |
3104 | #define nRMP5 0x0 | ||
3105 | #define RMP6 0x40 /* Mailbox 6 Receive Message Pending */ | 2603 | #define RMP6 0x40 /* Mailbox 6 Receive Message Pending */ |
3106 | #define nRMP6 0x0 | ||
3107 | #define RMP7 0x80 /* Mailbox 7 Receive Message Pending */ | 2604 | #define RMP7 0x80 /* Mailbox 7 Receive Message Pending */ |
3108 | #define nRMP7 0x0 | ||
3109 | #define RMP8 0x100 /* Mailbox 8 Receive Message Pending */ | 2605 | #define RMP8 0x100 /* Mailbox 8 Receive Message Pending */ |
3110 | #define nRMP8 0x0 | ||
3111 | #define RMP9 0x200 /* Mailbox 9 Receive Message Pending */ | 2606 | #define RMP9 0x200 /* Mailbox 9 Receive Message Pending */ |
3112 | #define nRMP9 0x0 | ||
3113 | #define RMP10 0x400 /* Mailbox 10 Receive Message Pending */ | 2607 | #define RMP10 0x400 /* Mailbox 10 Receive Message Pending */ |
3114 | #define nRMP10 0x0 | ||
3115 | #define RMP11 0x800 /* Mailbox 11 Receive Message Pending */ | 2608 | #define RMP11 0x800 /* Mailbox 11 Receive Message Pending */ |
3116 | #define nRMP11 0x0 | ||
3117 | #define RMP12 0x1000 /* Mailbox 12 Receive Message Pending */ | 2609 | #define RMP12 0x1000 /* Mailbox 12 Receive Message Pending */ |
3118 | #define nRMP12 0x0 | ||
3119 | #define RMP13 0x2000 /* Mailbox 13 Receive Message Pending */ | 2610 | #define RMP13 0x2000 /* Mailbox 13 Receive Message Pending */ |
3120 | #define nRMP13 0x0 | ||
3121 | #define RMP14 0x4000 /* Mailbox 14 Receive Message Pending */ | 2611 | #define RMP14 0x4000 /* Mailbox 14 Receive Message Pending */ |
3122 | #define nRMP14 0x0 | ||
3123 | #define RMP15 0x8000 /* Mailbox 15 Receive Message Pending */ | 2612 | #define RMP15 0x8000 /* Mailbox 15 Receive Message Pending */ |
3124 | #define nRMP15 0x0 | ||
3125 | 2613 | ||
3126 | /* Bit masks for CAN0_RMP2 */ | 2614 | /* Bit masks for CAN0_RMP2 */ |
3127 | 2615 | ||
3128 | #define RMP16 0x1 /* Mailbox 16 Receive Message Pending */ | 2616 | #define RMP16 0x1 /* Mailbox 16 Receive Message Pending */ |
3129 | #define nRMP16 0x0 | ||
3130 | #define RMP17 0x2 /* Mailbox 17 Receive Message Pending */ | 2617 | #define RMP17 0x2 /* Mailbox 17 Receive Message Pending */ |
3131 | #define nRMP17 0x0 | ||
3132 | #define RMP18 0x4 /* Mailbox 18 Receive Message Pending */ | 2618 | #define RMP18 0x4 /* Mailbox 18 Receive Message Pending */ |
3133 | #define nRMP18 0x0 | ||
3134 | #define RMP19 0x8 /* Mailbox 19 Receive Message Pending */ | 2619 | #define RMP19 0x8 /* Mailbox 19 Receive Message Pending */ |
3135 | #define nRMP19 0x0 | ||
3136 | #define RMP20 0x10 /* Mailbox 20 Receive Message Pending */ | 2620 | #define RMP20 0x10 /* Mailbox 20 Receive Message Pending */ |
3137 | #define nRMP20 0x0 | ||
3138 | #define RMP21 0x20 /* Mailbox 21 Receive Message Pending */ | 2621 | #define RMP21 0x20 /* Mailbox 21 Receive Message Pending */ |
3139 | #define nRMP21 0x0 | ||
3140 | #define RMP22 0x40 /* Mailbox 22 Receive Message Pending */ | 2622 | #define RMP22 0x40 /* Mailbox 22 Receive Message Pending */ |
3141 | #define nRMP22 0x0 | ||
3142 | #define RMP23 0x80 /* Mailbox 23 Receive Message Pending */ | 2623 | #define RMP23 0x80 /* Mailbox 23 Receive Message Pending */ |
3143 | #define nRMP23 0x0 | ||
3144 | #define RMP24 0x100 /* Mailbox 24 Receive Message Pending */ | 2624 | #define RMP24 0x100 /* Mailbox 24 Receive Message Pending */ |
3145 | #define nRMP24 0x0 | ||
3146 | #define RMP25 0x200 /* Mailbox 25 Receive Message Pending */ | 2625 | #define RMP25 0x200 /* Mailbox 25 Receive Message Pending */ |
3147 | #define nRMP25 0x0 | ||
3148 | #define RMP26 0x400 /* Mailbox 26 Receive Message Pending */ | 2626 | #define RMP26 0x400 /* Mailbox 26 Receive Message Pending */ |
3149 | #define nRMP26 0x0 | ||
3150 | #define RMP27 0x800 /* Mailbox 27 Receive Message Pending */ | 2627 | #define RMP27 0x800 /* Mailbox 27 Receive Message Pending */ |
3151 | #define nRMP27 0x0 | ||
3152 | #define RMP28 0x1000 /* Mailbox 28 Receive Message Pending */ | 2628 | #define RMP28 0x1000 /* Mailbox 28 Receive Message Pending */ |
3153 | #define nRMP28 0x0 | ||
3154 | #define RMP29 0x2000 /* Mailbox 29 Receive Message Pending */ | 2629 | #define RMP29 0x2000 /* Mailbox 29 Receive Message Pending */ |
3155 | #define nRMP29 0x0 | ||
3156 | #define RMP30 0x4000 /* Mailbox 30 Receive Message Pending */ | 2630 | #define RMP30 0x4000 /* Mailbox 30 Receive Message Pending */ |
3157 | #define nRMP30 0x0 | ||
3158 | #define RMP31 0x8000 /* Mailbox 31 Receive Message Pending */ | 2631 | #define RMP31 0x8000 /* Mailbox 31 Receive Message Pending */ |
3159 | #define nRMP31 0x0 | ||
3160 | 2632 | ||
3161 | /* Bit masks for CAN0_RML1 */ | 2633 | /* Bit masks for CAN0_RML1 */ |
3162 | 2634 | ||
3163 | #define RML0 0x1 /* Mailbox 0 Receive Message Lost */ | 2635 | #define RML0 0x1 /* Mailbox 0 Receive Message Lost */ |
3164 | #define nRML0 0x0 | ||
3165 | #define RML1 0x2 /* Mailbox 1 Receive Message Lost */ | 2636 | #define RML1 0x2 /* Mailbox 1 Receive Message Lost */ |
3166 | #define nRML1 0x0 | ||
3167 | #define RML2 0x4 /* Mailbox 2 Receive Message Lost */ | 2637 | #define RML2 0x4 /* Mailbox 2 Receive Message Lost */ |
3168 | #define nRML2 0x0 | ||
3169 | #define RML3 0x8 /* Mailbox 3 Receive Message Lost */ | 2638 | #define RML3 0x8 /* Mailbox 3 Receive Message Lost */ |
3170 | #define nRML3 0x0 | ||
3171 | #define RML4 0x10 /* Mailbox 4 Receive Message Lost */ | 2639 | #define RML4 0x10 /* Mailbox 4 Receive Message Lost */ |
3172 | #define nRML4 0x0 | ||
3173 | #define RML5 0x20 /* Mailbox 5 Receive Message Lost */ | 2640 | #define RML5 0x20 /* Mailbox 5 Receive Message Lost */ |
3174 | #define nRML5 0x0 | ||
3175 | #define RML6 0x40 /* Mailbox 6 Receive Message Lost */ | 2641 | #define RML6 0x40 /* Mailbox 6 Receive Message Lost */ |
3176 | #define nRML6 0x0 | ||
3177 | #define RML7 0x80 /* Mailbox 7 Receive Message Lost */ | 2642 | #define RML7 0x80 /* Mailbox 7 Receive Message Lost */ |
3178 | #define nRML7 0x0 | ||
3179 | #define RML8 0x100 /* Mailbox 8 Receive Message Lost */ | 2643 | #define RML8 0x100 /* Mailbox 8 Receive Message Lost */ |
3180 | #define nRML8 0x0 | ||
3181 | #define RML9 0x200 /* Mailbox 9 Receive Message Lost */ | 2644 | #define RML9 0x200 /* Mailbox 9 Receive Message Lost */ |
3182 | #define nRML9 0x0 | ||
3183 | #define RML10 0x400 /* Mailbox 10 Receive Message Lost */ | 2645 | #define RML10 0x400 /* Mailbox 10 Receive Message Lost */ |
3184 | #define nRML10 0x0 | ||
3185 | #define RML11 0x800 /* Mailbox 11 Receive Message Lost */ | 2646 | #define RML11 0x800 /* Mailbox 11 Receive Message Lost */ |
3186 | #define nRML11 0x0 | ||
3187 | #define RML12 0x1000 /* Mailbox 12 Receive Message Lost */ | 2647 | #define RML12 0x1000 /* Mailbox 12 Receive Message Lost */ |
3188 | #define nRML12 0x0 | ||
3189 | #define RML13 0x2000 /* Mailbox 13 Receive Message Lost */ | 2648 | #define RML13 0x2000 /* Mailbox 13 Receive Message Lost */ |
3190 | #define nRML13 0x0 | ||
3191 | #define RML14 0x4000 /* Mailbox 14 Receive Message Lost */ | 2649 | #define RML14 0x4000 /* Mailbox 14 Receive Message Lost */ |
3192 | #define nRML14 0x0 | ||
3193 | #define RML15 0x8000 /* Mailbox 15 Receive Message Lost */ | 2650 | #define RML15 0x8000 /* Mailbox 15 Receive Message Lost */ |
3194 | #define nRML15 0x0 | ||
3195 | 2651 | ||
3196 | /* Bit masks for CAN0_RML2 */ | 2652 | /* Bit masks for CAN0_RML2 */ |
3197 | 2653 | ||
3198 | #define RML16 0x1 /* Mailbox 16 Receive Message Lost */ | 2654 | #define RML16 0x1 /* Mailbox 16 Receive Message Lost */ |
3199 | #define nRML16 0x0 | ||
3200 | #define RML17 0x2 /* Mailbox 17 Receive Message Lost */ | 2655 | #define RML17 0x2 /* Mailbox 17 Receive Message Lost */ |
3201 | #define nRML17 0x0 | ||
3202 | #define RML18 0x4 /* Mailbox 18 Receive Message Lost */ | 2656 | #define RML18 0x4 /* Mailbox 18 Receive Message Lost */ |
3203 | #define nRML18 0x0 | ||
3204 | #define RML19 0x8 /* Mailbox 19 Receive Message Lost */ | 2657 | #define RML19 0x8 /* Mailbox 19 Receive Message Lost */ |
3205 | #define nRML19 0x0 | ||
3206 | #define RML20 0x10 /* Mailbox 20 Receive Message Lost */ | 2658 | #define RML20 0x10 /* Mailbox 20 Receive Message Lost */ |
3207 | #define nRML20 0x0 | ||
3208 | #define RML21 0x20 /* Mailbox 21 Receive Message Lost */ | 2659 | #define RML21 0x20 /* Mailbox 21 Receive Message Lost */ |
3209 | #define nRML21 0x0 | ||
3210 | #define RML22 0x40 /* Mailbox 22 Receive Message Lost */ | 2660 | #define RML22 0x40 /* Mailbox 22 Receive Message Lost */ |
3211 | #define nRML22 0x0 | ||
3212 | #define RML23 0x80 /* Mailbox 23 Receive Message Lost */ | 2661 | #define RML23 0x80 /* Mailbox 23 Receive Message Lost */ |
3213 | #define nRML23 0x0 | ||
3214 | #define RML24 0x100 /* Mailbox 24 Receive Message Lost */ | 2662 | #define RML24 0x100 /* Mailbox 24 Receive Message Lost */ |
3215 | #define nRML24 0x0 | ||
3216 | #define RML25 0x200 /* Mailbox 25 Receive Message Lost */ | 2663 | #define RML25 0x200 /* Mailbox 25 Receive Message Lost */ |
3217 | #define nRML25 0x0 | ||
3218 | #define RML26 0x400 /* Mailbox 26 Receive Message Lost */ | 2664 | #define RML26 0x400 /* Mailbox 26 Receive Message Lost */ |
3219 | #define nRML26 0x0 | ||
3220 | #define RML27 0x800 /* Mailbox 27 Receive Message Lost */ | 2665 | #define RML27 0x800 /* Mailbox 27 Receive Message Lost */ |
3221 | #define nRML27 0x0 | ||
3222 | #define RML28 0x1000 /* Mailbox 28 Receive Message Lost */ | 2666 | #define RML28 0x1000 /* Mailbox 28 Receive Message Lost */ |
3223 | #define nRML28 0x0 | ||
3224 | #define RML29 0x2000 /* Mailbox 29 Receive Message Lost */ | 2667 | #define RML29 0x2000 /* Mailbox 29 Receive Message Lost */ |
3225 | #define nRML29 0x0 | ||
3226 | #define RML30 0x4000 /* Mailbox 30 Receive Message Lost */ | 2668 | #define RML30 0x4000 /* Mailbox 30 Receive Message Lost */ |
3227 | #define nRML30 0x0 | ||
3228 | #define RML31 0x8000 /* Mailbox 31 Receive Message Lost */ | 2669 | #define RML31 0x8000 /* Mailbox 31 Receive Message Lost */ |
3229 | #define nRML31 0x0 | ||
3230 | 2670 | ||
3231 | /* Bit masks for CAN0_OPSS1 */ | 2671 | /* Bit masks for CAN0_OPSS1 */ |
3232 | 2672 | ||
3233 | #define OPSS0 0x1 /* Mailbox 0 Overwrite Protection/Single-Shot Transmission Enable */ | 2673 | #define OPSS0 0x1 /* Mailbox 0 Overwrite Protection/Single-Shot Transmission Enable */ |
3234 | #define nOPSS0 0x0 | ||
3235 | #define OPSS1 0x2 /* Mailbox 1 Overwrite Protection/Single-Shot Transmission Enable */ | 2674 | #define OPSS1 0x2 /* Mailbox 1 Overwrite Protection/Single-Shot Transmission Enable */ |
3236 | #define nOPSS1 0x0 | ||
3237 | #define OPSS2 0x4 /* Mailbox 2 Overwrite Protection/Single-Shot Transmission Enable */ | 2675 | #define OPSS2 0x4 /* Mailbox 2 Overwrite Protection/Single-Shot Transmission Enable */ |
3238 | #define nOPSS2 0x0 | ||
3239 | #define OPSS3 0x8 /* Mailbox 3 Overwrite Protection/Single-Shot Transmission Enable */ | 2676 | #define OPSS3 0x8 /* Mailbox 3 Overwrite Protection/Single-Shot Transmission Enable */ |
3240 | #define nOPSS3 0x0 | ||
3241 | #define OPSS4 0x10 /* Mailbox 4 Overwrite Protection/Single-Shot Transmission Enable */ | 2677 | #define OPSS4 0x10 /* Mailbox 4 Overwrite Protection/Single-Shot Transmission Enable */ |
3242 | #define nOPSS4 0x0 | ||
3243 | #define OPSS5 0x20 /* Mailbox 5 Overwrite Protection/Single-Shot Transmission Enable */ | 2678 | #define OPSS5 0x20 /* Mailbox 5 Overwrite Protection/Single-Shot Transmission Enable */ |
3244 | #define nOPSS5 0x0 | ||
3245 | #define OPSS6 0x40 /* Mailbox 6 Overwrite Protection/Single-Shot Transmission Enable */ | 2679 | #define OPSS6 0x40 /* Mailbox 6 Overwrite Protection/Single-Shot Transmission Enable */ |
3246 | #define nOPSS6 0x0 | ||
3247 | #define OPSS7 0x80 /* Mailbox 7 Overwrite Protection/Single-Shot Transmission Enable */ | 2680 | #define OPSS7 0x80 /* Mailbox 7 Overwrite Protection/Single-Shot Transmission Enable */ |
3248 | #define nOPSS7 0x0 | ||
3249 | #define OPSS8 0x100 /* Mailbox 8 Overwrite Protection/Single-Shot Transmission Enable */ | 2681 | #define OPSS8 0x100 /* Mailbox 8 Overwrite Protection/Single-Shot Transmission Enable */ |
3250 | #define nOPSS8 0x0 | ||
3251 | #define OPSS9 0x200 /* Mailbox 9 Overwrite Protection/Single-Shot Transmission Enable */ | 2682 | #define OPSS9 0x200 /* Mailbox 9 Overwrite Protection/Single-Shot Transmission Enable */ |
3252 | #define nOPSS9 0x0 | ||
3253 | #define OPSS10 0x400 /* Mailbox 10 Overwrite Protection/Single-Shot Transmission Enable */ | 2683 | #define OPSS10 0x400 /* Mailbox 10 Overwrite Protection/Single-Shot Transmission Enable */ |
3254 | #define nOPSS10 0x0 | ||
3255 | #define OPSS11 0x800 /* Mailbox 11 Overwrite Protection/Single-Shot Transmission Enable */ | 2684 | #define OPSS11 0x800 /* Mailbox 11 Overwrite Protection/Single-Shot Transmission Enable */ |
3256 | #define nOPSS11 0x0 | ||
3257 | #define OPSS12 0x1000 /* Mailbox 12 Overwrite Protection/Single-Shot Transmission Enable */ | 2685 | #define OPSS12 0x1000 /* Mailbox 12 Overwrite Protection/Single-Shot Transmission Enable */ |
3258 | #define nOPSS12 0x0 | ||
3259 | #define OPSS13 0x2000 /* Mailbox 13 Overwrite Protection/Single-Shot Transmission Enable */ | 2686 | #define OPSS13 0x2000 /* Mailbox 13 Overwrite Protection/Single-Shot Transmission Enable */ |
3260 | #define nOPSS13 0x0 | ||
3261 | #define OPSS14 0x4000 /* Mailbox 14 Overwrite Protection/Single-Shot Transmission Enable */ | 2687 | #define OPSS14 0x4000 /* Mailbox 14 Overwrite Protection/Single-Shot Transmission Enable */ |
3262 | #define nOPSS14 0x0 | ||
3263 | #define OPSS15 0x8000 /* Mailbox 15 Overwrite Protection/Single-Shot Transmission Enable */ | 2688 | #define OPSS15 0x8000 /* Mailbox 15 Overwrite Protection/Single-Shot Transmission Enable */ |
3264 | #define nOPSS15 0x0 | ||
3265 | 2689 | ||
3266 | /* Bit masks for CAN0_OPSS2 */ | 2690 | /* Bit masks for CAN0_OPSS2 */ |
3267 | 2691 | ||
3268 | #define OPSS16 0x1 /* Mailbox 16 Overwrite Protection/Single-Shot Transmission Enable */ | 2692 | #define OPSS16 0x1 /* Mailbox 16 Overwrite Protection/Single-Shot Transmission Enable */ |
3269 | #define nOPSS16 0x0 | ||
3270 | #define OPSS17 0x2 /* Mailbox 17 Overwrite Protection/Single-Shot Transmission Enable */ | 2693 | #define OPSS17 0x2 /* Mailbox 17 Overwrite Protection/Single-Shot Transmission Enable */ |
3271 | #define nOPSS17 0x0 | ||
3272 | #define OPSS18 0x4 /* Mailbox 18 Overwrite Protection/Single-Shot Transmission Enable */ | 2694 | #define OPSS18 0x4 /* Mailbox 18 Overwrite Protection/Single-Shot Transmission Enable */ |
3273 | #define nOPSS18 0x0 | ||
3274 | #define OPSS19 0x8 /* Mailbox 19 Overwrite Protection/Single-Shot Transmission Enable */ | 2695 | #define OPSS19 0x8 /* Mailbox 19 Overwrite Protection/Single-Shot Transmission Enable */ |
3275 | #define nOPSS19 0x0 | ||
3276 | #define OPSS20 0x10 /* Mailbox 20 Overwrite Protection/Single-Shot Transmission Enable */ | 2696 | #define OPSS20 0x10 /* Mailbox 20 Overwrite Protection/Single-Shot Transmission Enable */ |
3277 | #define nOPSS20 0x0 | ||
3278 | #define OPSS21 0x20 /* Mailbox 21 Overwrite Protection/Single-Shot Transmission Enable */ | 2697 | #define OPSS21 0x20 /* Mailbox 21 Overwrite Protection/Single-Shot Transmission Enable */ |
3279 | #define nOPSS21 0x0 | ||
3280 | #define OPSS22 0x40 /* Mailbox 22 Overwrite Protection/Single-Shot Transmission Enable */ | 2698 | #define OPSS22 0x40 /* Mailbox 22 Overwrite Protection/Single-Shot Transmission Enable */ |
3281 | #define nOPSS22 0x0 | ||
3282 | #define OPSS23 0x80 /* Mailbox 23 Overwrite Protection/Single-Shot Transmission Enable */ | 2699 | #define OPSS23 0x80 /* Mailbox 23 Overwrite Protection/Single-Shot Transmission Enable */ |
3283 | #define nOPSS23 0x0 | ||
3284 | #define OPSS24 0x100 /* Mailbox 24 Overwrite Protection/Single-Shot Transmission Enable */ | 2700 | #define OPSS24 0x100 /* Mailbox 24 Overwrite Protection/Single-Shot Transmission Enable */ |
3285 | #define nOPSS24 0x0 | ||
3286 | #define OPSS25 0x200 /* Mailbox 25 Overwrite Protection/Single-Shot Transmission Enable */ | 2701 | #define OPSS25 0x200 /* Mailbox 25 Overwrite Protection/Single-Shot Transmission Enable */ |
3287 | #define nOPSS25 0x0 | ||
3288 | #define OPSS26 0x400 /* Mailbox 26 Overwrite Protection/Single-Shot Transmission Enable */ | 2702 | #define OPSS26 0x400 /* Mailbox 26 Overwrite Protection/Single-Shot Transmission Enable */ |
3289 | #define nOPSS26 0x0 | ||
3290 | #define OPSS27 0x800 /* Mailbox 27 Overwrite Protection/Single-Shot Transmission Enable */ | 2703 | #define OPSS27 0x800 /* Mailbox 27 Overwrite Protection/Single-Shot Transmission Enable */ |
3291 | #define nOPSS27 0x0 | ||
3292 | #define OPSS28 0x1000 /* Mailbox 28 Overwrite Protection/Single-Shot Transmission Enable */ | 2704 | #define OPSS28 0x1000 /* Mailbox 28 Overwrite Protection/Single-Shot Transmission Enable */ |
3293 | #define nOPSS28 0x0 | ||
3294 | #define OPSS29 0x2000 /* Mailbox 29 Overwrite Protection/Single-Shot Transmission Enable */ | 2705 | #define OPSS29 0x2000 /* Mailbox 29 Overwrite Protection/Single-Shot Transmission Enable */ |
3295 | #define nOPSS29 0x0 | ||
3296 | #define OPSS30 0x4000 /* Mailbox 30 Overwrite Protection/Single-Shot Transmission Enable */ | 2706 | #define OPSS30 0x4000 /* Mailbox 30 Overwrite Protection/Single-Shot Transmission Enable */ |
3297 | #define nOPSS30 0x0 | ||
3298 | #define OPSS31 0x8000 /* Mailbox 31 Overwrite Protection/Single-Shot Transmission Enable */ | 2707 | #define OPSS31 0x8000 /* Mailbox 31 Overwrite Protection/Single-Shot Transmission Enable */ |
3299 | #define nOPSS31 0x0 | ||
3300 | 2708 | ||
3301 | /* Bit masks for CAN0_TRS1 */ | 2709 | /* Bit masks for CAN0_TRS1 */ |
3302 | 2710 | ||
3303 | #define TRS0 0x1 /* Mailbox 0 Transmit Request Set */ | 2711 | #define TRS0 0x1 /* Mailbox 0 Transmit Request Set */ |
3304 | #define nTRS0 0x0 | ||
3305 | #define TRS1 0x2 /* Mailbox 1 Transmit Request Set */ | 2712 | #define TRS1 0x2 /* Mailbox 1 Transmit Request Set */ |
3306 | #define nTRS1 0x0 | ||
3307 | #define TRS2 0x4 /* Mailbox 2 Transmit Request Set */ | 2713 | #define TRS2 0x4 /* Mailbox 2 Transmit Request Set */ |
3308 | #define nTRS2 0x0 | ||
3309 | #define TRS3 0x8 /* Mailbox 3 Transmit Request Set */ | 2714 | #define TRS3 0x8 /* Mailbox 3 Transmit Request Set */ |
3310 | #define nTRS3 0x0 | ||
3311 | #define TRS4 0x10 /* Mailbox 4 Transmit Request Set */ | 2715 | #define TRS4 0x10 /* Mailbox 4 Transmit Request Set */ |
3312 | #define nTRS4 0x0 | ||
3313 | #define TRS5 0x20 /* Mailbox 5 Transmit Request Set */ | 2716 | #define TRS5 0x20 /* Mailbox 5 Transmit Request Set */ |
3314 | #define nTRS5 0x0 | ||
3315 | #define TRS6 0x40 /* Mailbox 6 Transmit Request Set */ | 2717 | #define TRS6 0x40 /* Mailbox 6 Transmit Request Set */ |
3316 | #define nTRS6 0x0 | ||
3317 | #define TRS7 0x80 /* Mailbox 7 Transmit Request Set */ | 2718 | #define TRS7 0x80 /* Mailbox 7 Transmit Request Set */ |
3318 | #define nTRS7 0x0 | ||
3319 | #define TRS8 0x100 /* Mailbox 8 Transmit Request Set */ | 2719 | #define TRS8 0x100 /* Mailbox 8 Transmit Request Set */ |
3320 | #define nTRS8 0x0 | ||
3321 | #define TRS9 0x200 /* Mailbox 9 Transmit Request Set */ | 2720 | #define TRS9 0x200 /* Mailbox 9 Transmit Request Set */ |
3322 | #define nTRS9 0x0 | ||
3323 | #define TRS10 0x400 /* Mailbox 10 Transmit Request Set */ | 2721 | #define TRS10 0x400 /* Mailbox 10 Transmit Request Set */ |
3324 | #define nTRS10 0x0 | ||
3325 | #define TRS11 0x800 /* Mailbox 11 Transmit Request Set */ | 2722 | #define TRS11 0x800 /* Mailbox 11 Transmit Request Set */ |
3326 | #define nTRS11 0x0 | ||
3327 | #define TRS12 0x1000 /* Mailbox 12 Transmit Request Set */ | 2723 | #define TRS12 0x1000 /* Mailbox 12 Transmit Request Set */ |
3328 | #define nTRS12 0x0 | ||
3329 | #define TRS13 0x2000 /* Mailbox 13 Transmit Request Set */ | 2724 | #define TRS13 0x2000 /* Mailbox 13 Transmit Request Set */ |
3330 | #define nTRS13 0x0 | ||
3331 | #define TRS14 0x4000 /* Mailbox 14 Transmit Request Set */ | 2725 | #define TRS14 0x4000 /* Mailbox 14 Transmit Request Set */ |
3332 | #define nTRS14 0x0 | ||
3333 | #define TRS15 0x8000 /* Mailbox 15 Transmit Request Set */ | 2726 | #define TRS15 0x8000 /* Mailbox 15 Transmit Request Set */ |
3334 | #define nTRS15 0x0 | ||
3335 | 2727 | ||
3336 | /* Bit masks for CAN0_TRS2 */ | 2728 | /* Bit masks for CAN0_TRS2 */ |
3337 | 2729 | ||
3338 | #define TRS16 0x1 /* Mailbox 16 Transmit Request Set */ | 2730 | #define TRS16 0x1 /* Mailbox 16 Transmit Request Set */ |
3339 | #define nTRS16 0x0 | ||
3340 | #define TRS17 0x2 /* Mailbox 17 Transmit Request Set */ | 2731 | #define TRS17 0x2 /* Mailbox 17 Transmit Request Set */ |
3341 | #define nTRS17 0x0 | ||
3342 | #define TRS18 0x4 /* Mailbox 18 Transmit Request Set */ | 2732 | #define TRS18 0x4 /* Mailbox 18 Transmit Request Set */ |
3343 | #define nTRS18 0x0 | ||
3344 | #define TRS19 0x8 /* Mailbox 19 Transmit Request Set */ | 2733 | #define TRS19 0x8 /* Mailbox 19 Transmit Request Set */ |
3345 | #define nTRS19 0x0 | ||
3346 | #define TRS20 0x10 /* Mailbox 20 Transmit Request Set */ | 2734 | #define TRS20 0x10 /* Mailbox 20 Transmit Request Set */ |
3347 | #define nTRS20 0x0 | ||
3348 | #define TRS21 0x20 /* Mailbox 21 Transmit Request Set */ | 2735 | #define TRS21 0x20 /* Mailbox 21 Transmit Request Set */ |
3349 | #define nTRS21 0x0 | ||
3350 | #define TRS22 0x40 /* Mailbox 22 Transmit Request Set */ | 2736 | #define TRS22 0x40 /* Mailbox 22 Transmit Request Set */ |
3351 | #define nTRS22 0x0 | ||
3352 | #define TRS23 0x80 /* Mailbox 23 Transmit Request Set */ | 2737 | #define TRS23 0x80 /* Mailbox 23 Transmit Request Set */ |
3353 | #define nTRS23 0x0 | ||
3354 | #define TRS24 0x100 /* Mailbox 24 Transmit Request Set */ | 2738 | #define TRS24 0x100 /* Mailbox 24 Transmit Request Set */ |
3355 | #define nTRS24 0x0 | ||
3356 | #define TRS25 0x200 /* Mailbox 25 Transmit Request Set */ | 2739 | #define TRS25 0x200 /* Mailbox 25 Transmit Request Set */ |
3357 | #define nTRS25 0x0 | ||
3358 | #define TRS26 0x400 /* Mailbox 26 Transmit Request Set */ | 2740 | #define TRS26 0x400 /* Mailbox 26 Transmit Request Set */ |
3359 | #define nTRS26 0x0 | ||
3360 | #define TRS27 0x800 /* Mailbox 27 Transmit Request Set */ | 2741 | #define TRS27 0x800 /* Mailbox 27 Transmit Request Set */ |
3361 | #define nTRS27 0x0 | ||
3362 | #define TRS28 0x1000 /* Mailbox 28 Transmit Request Set */ | 2742 | #define TRS28 0x1000 /* Mailbox 28 Transmit Request Set */ |
3363 | #define nTRS28 0x0 | ||
3364 | #define TRS29 0x2000 /* Mailbox 29 Transmit Request Set */ | 2743 | #define TRS29 0x2000 /* Mailbox 29 Transmit Request Set */ |
3365 | #define nTRS29 0x0 | ||
3366 | #define TRS30 0x4000 /* Mailbox 30 Transmit Request Set */ | 2744 | #define TRS30 0x4000 /* Mailbox 30 Transmit Request Set */ |
3367 | #define nTRS30 0x0 | ||
3368 | #define TRS31 0x8000 /* Mailbox 31 Transmit Request Set */ | 2745 | #define TRS31 0x8000 /* Mailbox 31 Transmit Request Set */ |
3369 | #define nTRS31 0x0 | ||
3370 | 2746 | ||
3371 | /* Bit masks for CAN0_TRR1 */ | 2747 | /* Bit masks for CAN0_TRR1 */ |
3372 | 2748 | ||
3373 | #define TRR0 0x1 /* Mailbox 0 Transmit Request Reset */ | 2749 | #define TRR0 0x1 /* Mailbox 0 Transmit Request Reset */ |
3374 | #define nTRR0 0x0 | ||
3375 | #define TRR1 0x2 /* Mailbox 1 Transmit Request Reset */ | 2750 | #define TRR1 0x2 /* Mailbox 1 Transmit Request Reset */ |
3376 | #define nTRR1 0x0 | ||
3377 | #define TRR2 0x4 /* Mailbox 2 Transmit Request Reset */ | 2751 | #define TRR2 0x4 /* Mailbox 2 Transmit Request Reset */ |
3378 | #define nTRR2 0x0 | ||
3379 | #define TRR3 0x8 /* Mailbox 3 Transmit Request Reset */ | 2752 | #define TRR3 0x8 /* Mailbox 3 Transmit Request Reset */ |
3380 | #define nTRR3 0x0 | ||
3381 | #define TRR4 0x10 /* Mailbox 4 Transmit Request Reset */ | 2753 | #define TRR4 0x10 /* Mailbox 4 Transmit Request Reset */ |
3382 | #define nTRR4 0x0 | ||
3383 | #define TRR5 0x20 /* Mailbox 5 Transmit Request Reset */ | 2754 | #define TRR5 0x20 /* Mailbox 5 Transmit Request Reset */ |
3384 | #define nTRR5 0x0 | ||
3385 | #define TRR6 0x40 /* Mailbox 6 Transmit Request Reset */ | 2755 | #define TRR6 0x40 /* Mailbox 6 Transmit Request Reset */ |
3386 | #define nTRR6 0x0 | ||
3387 | #define TRR7 0x80 /* Mailbox 7 Transmit Request Reset */ | 2756 | #define TRR7 0x80 /* Mailbox 7 Transmit Request Reset */ |
3388 | #define nTRR7 0x0 | ||
3389 | #define TRR8 0x100 /* Mailbox 8 Transmit Request Reset */ | 2757 | #define TRR8 0x100 /* Mailbox 8 Transmit Request Reset */ |
3390 | #define nTRR8 0x0 | ||
3391 | #define TRR9 0x200 /* Mailbox 9 Transmit Request Reset */ | 2758 | #define TRR9 0x200 /* Mailbox 9 Transmit Request Reset */ |
3392 | #define nTRR9 0x0 | ||
3393 | #define TRR10 0x400 /* Mailbox 10 Transmit Request Reset */ | 2759 | #define TRR10 0x400 /* Mailbox 10 Transmit Request Reset */ |
3394 | #define nTRR10 0x0 | ||
3395 | #define TRR11 0x800 /* Mailbox 11 Transmit Request Reset */ | 2760 | #define TRR11 0x800 /* Mailbox 11 Transmit Request Reset */ |
3396 | #define nTRR11 0x0 | ||
3397 | #define TRR12 0x1000 /* Mailbox 12 Transmit Request Reset */ | 2761 | #define TRR12 0x1000 /* Mailbox 12 Transmit Request Reset */ |
3398 | #define nTRR12 0x0 | ||
3399 | #define TRR13 0x2000 /* Mailbox 13 Transmit Request Reset */ | 2762 | #define TRR13 0x2000 /* Mailbox 13 Transmit Request Reset */ |
3400 | #define nTRR13 0x0 | ||
3401 | #define TRR14 0x4000 /* Mailbox 14 Transmit Request Reset */ | 2763 | #define TRR14 0x4000 /* Mailbox 14 Transmit Request Reset */ |
3402 | #define nTRR14 0x0 | ||
3403 | #define TRR15 0x8000 /* Mailbox 15 Transmit Request Reset */ | 2764 | #define TRR15 0x8000 /* Mailbox 15 Transmit Request Reset */ |
3404 | #define nTRR15 0x0 | ||
3405 | 2765 | ||
3406 | /* Bit masks for CAN0_TRR2 */ | 2766 | /* Bit masks for CAN0_TRR2 */ |
3407 | 2767 | ||
3408 | #define TRR16 0x1 /* Mailbox 16 Transmit Request Reset */ | 2768 | #define TRR16 0x1 /* Mailbox 16 Transmit Request Reset */ |
3409 | #define nTRR16 0x0 | ||
3410 | #define TRR17 0x2 /* Mailbox 17 Transmit Request Reset */ | 2769 | #define TRR17 0x2 /* Mailbox 17 Transmit Request Reset */ |
3411 | #define nTRR17 0x0 | ||
3412 | #define TRR18 0x4 /* Mailbox 18 Transmit Request Reset */ | 2770 | #define TRR18 0x4 /* Mailbox 18 Transmit Request Reset */ |
3413 | #define nTRR18 0x0 | ||
3414 | #define TRR19 0x8 /* Mailbox 19 Transmit Request Reset */ | 2771 | #define TRR19 0x8 /* Mailbox 19 Transmit Request Reset */ |
3415 | #define nTRR19 0x0 | ||
3416 | #define TRR20 0x10 /* Mailbox 20 Transmit Request Reset */ | 2772 | #define TRR20 0x10 /* Mailbox 20 Transmit Request Reset */ |
3417 | #define nTRR20 0x0 | ||
3418 | #define TRR21 0x20 /* Mailbox 21 Transmit Request Reset */ | 2773 | #define TRR21 0x20 /* Mailbox 21 Transmit Request Reset */ |
3419 | #define nTRR21 0x0 | ||
3420 | #define TRR22 0x40 /* Mailbox 22 Transmit Request Reset */ | 2774 | #define TRR22 0x40 /* Mailbox 22 Transmit Request Reset */ |
3421 | #define nTRR22 0x0 | ||
3422 | #define TRR23 0x80 /* Mailbox 23 Transmit Request Reset */ | 2775 | #define TRR23 0x80 /* Mailbox 23 Transmit Request Reset */ |
3423 | #define nTRR23 0x0 | ||
3424 | #define TRR24 0x100 /* Mailbox 24 Transmit Request Reset */ | 2776 | #define TRR24 0x100 /* Mailbox 24 Transmit Request Reset */ |
3425 | #define nTRR24 0x0 | ||
3426 | #define TRR25 0x200 /* Mailbox 25 Transmit Request Reset */ | 2777 | #define TRR25 0x200 /* Mailbox 25 Transmit Request Reset */ |
3427 | #define nTRR25 0x0 | ||
3428 | #define TRR26 0x400 /* Mailbox 26 Transmit Request Reset */ | 2778 | #define TRR26 0x400 /* Mailbox 26 Transmit Request Reset */ |
3429 | #define nTRR26 0x0 | ||
3430 | #define TRR27 0x800 /* Mailbox 27 Transmit Request Reset */ | 2779 | #define TRR27 0x800 /* Mailbox 27 Transmit Request Reset */ |
3431 | #define nTRR27 0x0 | ||
3432 | #define TRR28 0x1000 /* Mailbox 28 Transmit Request Reset */ | 2780 | #define TRR28 0x1000 /* Mailbox 28 Transmit Request Reset */ |
3433 | #define nTRR28 0x0 | ||
3434 | #define TRR29 0x2000 /* Mailbox 29 Transmit Request Reset */ | 2781 | #define TRR29 0x2000 /* Mailbox 29 Transmit Request Reset */ |
3435 | #define nTRR29 0x0 | ||
3436 | #define TRR30 0x4000 /* Mailbox 30 Transmit Request Reset */ | 2782 | #define TRR30 0x4000 /* Mailbox 30 Transmit Request Reset */ |
3437 | #define nTRR30 0x0 | ||
3438 | #define TRR31 0x8000 /* Mailbox 31 Transmit Request Reset */ | 2783 | #define TRR31 0x8000 /* Mailbox 31 Transmit Request Reset */ |
3439 | #define nTRR31 0x0 | ||
3440 | 2784 | ||
3441 | /* Bit masks for CAN0_AA1 */ | 2785 | /* Bit masks for CAN0_AA1 */ |
3442 | 2786 | ||
3443 | #define AA0 0x1 /* Mailbox 0 Abort Acknowledge */ | 2787 | #define AA0 0x1 /* Mailbox 0 Abort Acknowledge */ |
3444 | #define nAA0 0x0 | ||
3445 | #define AA1 0x2 /* Mailbox 1 Abort Acknowledge */ | 2788 | #define AA1 0x2 /* Mailbox 1 Abort Acknowledge */ |
3446 | #define nAA1 0x0 | ||
3447 | #define AA2 0x4 /* Mailbox 2 Abort Acknowledge */ | 2789 | #define AA2 0x4 /* Mailbox 2 Abort Acknowledge */ |
3448 | #define nAA2 0x0 | ||
3449 | #define AA3 0x8 /* Mailbox 3 Abort Acknowledge */ | 2790 | #define AA3 0x8 /* Mailbox 3 Abort Acknowledge */ |
3450 | #define nAA3 0x0 | ||
3451 | #define AA4 0x10 /* Mailbox 4 Abort Acknowledge */ | 2791 | #define AA4 0x10 /* Mailbox 4 Abort Acknowledge */ |
3452 | #define nAA4 0x0 | ||
3453 | #define AA5 0x20 /* Mailbox 5 Abort Acknowledge */ | 2792 | #define AA5 0x20 /* Mailbox 5 Abort Acknowledge */ |
3454 | #define nAA5 0x0 | ||
3455 | #define AA6 0x40 /* Mailbox 6 Abort Acknowledge */ | 2793 | #define AA6 0x40 /* Mailbox 6 Abort Acknowledge */ |
3456 | #define nAA6 0x0 | ||
3457 | #define AA7 0x80 /* Mailbox 7 Abort Acknowledge */ | 2794 | #define AA7 0x80 /* Mailbox 7 Abort Acknowledge */ |
3458 | #define nAA7 0x0 | ||
3459 | #define AA8 0x100 /* Mailbox 8 Abort Acknowledge */ | 2795 | #define AA8 0x100 /* Mailbox 8 Abort Acknowledge */ |
3460 | #define nAA8 0x0 | ||
3461 | #define AA9 0x200 /* Mailbox 9 Abort Acknowledge */ | 2796 | #define AA9 0x200 /* Mailbox 9 Abort Acknowledge */ |
3462 | #define nAA9 0x0 | ||
3463 | #define AA10 0x400 /* Mailbox 10 Abort Acknowledge */ | 2797 | #define AA10 0x400 /* Mailbox 10 Abort Acknowledge */ |
3464 | #define nAA10 0x0 | ||
3465 | #define AA11 0x800 /* Mailbox 11 Abort Acknowledge */ | 2798 | #define AA11 0x800 /* Mailbox 11 Abort Acknowledge */ |
3466 | #define nAA11 0x0 | ||
3467 | #define AA12 0x1000 /* Mailbox 12 Abort Acknowledge */ | 2799 | #define AA12 0x1000 /* Mailbox 12 Abort Acknowledge */ |
3468 | #define nAA12 0x0 | ||
3469 | #define AA13 0x2000 /* Mailbox 13 Abort Acknowledge */ | 2800 | #define AA13 0x2000 /* Mailbox 13 Abort Acknowledge */ |
3470 | #define nAA13 0x0 | ||
3471 | #define AA14 0x4000 /* Mailbox 14 Abort Acknowledge */ | 2801 | #define AA14 0x4000 /* Mailbox 14 Abort Acknowledge */ |
3472 | #define nAA14 0x0 | ||
3473 | #define AA15 0x8000 /* Mailbox 15 Abort Acknowledge */ | 2802 | #define AA15 0x8000 /* Mailbox 15 Abort Acknowledge */ |
3474 | #define nAA15 0x0 | ||
3475 | 2803 | ||
3476 | /* Bit masks for CAN0_AA2 */ | 2804 | /* Bit masks for CAN0_AA2 */ |
3477 | 2805 | ||
3478 | #define AA16 0x1 /* Mailbox 16 Abort Acknowledge */ | 2806 | #define AA16 0x1 /* Mailbox 16 Abort Acknowledge */ |
3479 | #define nAA16 0x0 | ||
3480 | #define AA17 0x2 /* Mailbox 17 Abort Acknowledge */ | 2807 | #define AA17 0x2 /* Mailbox 17 Abort Acknowledge */ |
3481 | #define nAA17 0x0 | ||
3482 | #define AA18 0x4 /* Mailbox 18 Abort Acknowledge */ | 2808 | #define AA18 0x4 /* Mailbox 18 Abort Acknowledge */ |
3483 | #define nAA18 0x0 | ||
3484 | #define AA19 0x8 /* Mailbox 19 Abort Acknowledge */ | 2809 | #define AA19 0x8 /* Mailbox 19 Abort Acknowledge */ |
3485 | #define nAA19 0x0 | ||
3486 | #define AA20 0x10 /* Mailbox 20 Abort Acknowledge */ | 2810 | #define AA20 0x10 /* Mailbox 20 Abort Acknowledge */ |
3487 | #define nAA20 0x0 | ||
3488 | #define AA21 0x20 /* Mailbox 21 Abort Acknowledge */ | 2811 | #define AA21 0x20 /* Mailbox 21 Abort Acknowledge */ |
3489 | #define nAA21 0x0 | ||
3490 | #define AA22 0x40 /* Mailbox 22 Abort Acknowledge */ | 2812 | #define AA22 0x40 /* Mailbox 22 Abort Acknowledge */ |
3491 | #define nAA22 0x0 | ||
3492 | #define AA23 0x80 /* Mailbox 23 Abort Acknowledge */ | 2813 | #define AA23 0x80 /* Mailbox 23 Abort Acknowledge */ |
3493 | #define nAA23 0x0 | ||
3494 | #define AA24 0x100 /* Mailbox 24 Abort Acknowledge */ | 2814 | #define AA24 0x100 /* Mailbox 24 Abort Acknowledge */ |
3495 | #define nAA24 0x0 | ||
3496 | #define AA25 0x200 /* Mailbox 25 Abort Acknowledge */ | 2815 | #define AA25 0x200 /* Mailbox 25 Abort Acknowledge */ |
3497 | #define nAA25 0x0 | ||
3498 | #define AA26 0x400 /* Mailbox 26 Abort Acknowledge */ | 2816 | #define AA26 0x400 /* Mailbox 26 Abort Acknowledge */ |
3499 | #define nAA26 0x0 | ||
3500 | #define AA27 0x800 /* Mailbox 27 Abort Acknowledge */ | 2817 | #define AA27 0x800 /* Mailbox 27 Abort Acknowledge */ |
3501 | #define nAA27 0x0 | ||
3502 | #define AA28 0x1000 /* Mailbox 28 Abort Acknowledge */ | 2818 | #define AA28 0x1000 /* Mailbox 28 Abort Acknowledge */ |
3503 | #define nAA28 0x0 | ||
3504 | #define AA29 0x2000 /* Mailbox 29 Abort Acknowledge */ | 2819 | #define AA29 0x2000 /* Mailbox 29 Abort Acknowledge */ |
3505 | #define nAA29 0x0 | ||
3506 | #define AA30 0x4000 /* Mailbox 30 Abort Acknowledge */ | 2820 | #define AA30 0x4000 /* Mailbox 30 Abort Acknowledge */ |
3507 | #define nAA30 0x0 | ||
3508 | #define AA31 0x8000 /* Mailbox 31 Abort Acknowledge */ | 2821 | #define AA31 0x8000 /* Mailbox 31 Abort Acknowledge */ |
3509 | #define nAA31 0x0 | ||
3510 | 2822 | ||
3511 | /* Bit masks for CAN0_TA1 */ | 2823 | /* Bit masks for CAN0_TA1 */ |
3512 | 2824 | ||
3513 | #define TA0 0x1 /* Mailbox 0 Transmit Acknowledge */ | 2825 | #define TA0 0x1 /* Mailbox 0 Transmit Acknowledge */ |
3514 | #define nTA0 0x0 | ||
3515 | #define TA1 0x2 /* Mailbox 1 Transmit Acknowledge */ | 2826 | #define TA1 0x2 /* Mailbox 1 Transmit Acknowledge */ |
3516 | #define nTA1 0x0 | ||
3517 | #define TA2 0x4 /* Mailbox 2 Transmit Acknowledge */ | 2827 | #define TA2 0x4 /* Mailbox 2 Transmit Acknowledge */ |
3518 | #define nTA2 0x0 | ||
3519 | #define TA3 0x8 /* Mailbox 3 Transmit Acknowledge */ | 2828 | #define TA3 0x8 /* Mailbox 3 Transmit Acknowledge */ |
3520 | #define nTA3 0x0 | ||
3521 | #define TA4 0x10 /* Mailbox 4 Transmit Acknowledge */ | 2829 | #define TA4 0x10 /* Mailbox 4 Transmit Acknowledge */ |
3522 | #define nTA4 0x0 | ||
3523 | #define TA5 0x20 /* Mailbox 5 Transmit Acknowledge */ | 2830 | #define TA5 0x20 /* Mailbox 5 Transmit Acknowledge */ |
3524 | #define nTA5 0x0 | ||
3525 | #define TA6 0x40 /* Mailbox 6 Transmit Acknowledge */ | 2831 | #define TA6 0x40 /* Mailbox 6 Transmit Acknowledge */ |
3526 | #define nTA6 0x0 | ||
3527 | #define TA7 0x80 /* Mailbox 7 Transmit Acknowledge */ | 2832 | #define TA7 0x80 /* Mailbox 7 Transmit Acknowledge */ |
3528 | #define nTA7 0x0 | ||
3529 | #define TA8 0x100 /* Mailbox 8 Transmit Acknowledge */ | 2833 | #define TA8 0x100 /* Mailbox 8 Transmit Acknowledge */ |
3530 | #define nTA8 0x0 | ||
3531 | #define TA9 0x200 /* Mailbox 9 Transmit Acknowledge */ | 2834 | #define TA9 0x200 /* Mailbox 9 Transmit Acknowledge */ |
3532 | #define nTA9 0x0 | ||
3533 | #define TA10 0x400 /* Mailbox 10 Transmit Acknowledge */ | 2835 | #define TA10 0x400 /* Mailbox 10 Transmit Acknowledge */ |
3534 | #define nTA10 0x0 | ||
3535 | #define TA11 0x800 /* Mailbox 11 Transmit Acknowledge */ | 2836 | #define TA11 0x800 /* Mailbox 11 Transmit Acknowledge */ |
3536 | #define nTA11 0x0 | ||
3537 | #define TA12 0x1000 /* Mailbox 12 Transmit Acknowledge */ | 2837 | #define TA12 0x1000 /* Mailbox 12 Transmit Acknowledge */ |
3538 | #define nTA12 0x0 | ||
3539 | #define TA13 0x2000 /* Mailbox 13 Transmit Acknowledge */ | 2838 | #define TA13 0x2000 /* Mailbox 13 Transmit Acknowledge */ |
3540 | #define nTA13 0x0 | ||
3541 | #define TA14 0x4000 /* Mailbox 14 Transmit Acknowledge */ | 2839 | #define TA14 0x4000 /* Mailbox 14 Transmit Acknowledge */ |
3542 | #define nTA14 0x0 | ||
3543 | #define TA15 0x8000 /* Mailbox 15 Transmit Acknowledge */ | 2840 | #define TA15 0x8000 /* Mailbox 15 Transmit Acknowledge */ |
3544 | #define nTA15 0x0 | ||
3545 | 2841 | ||
3546 | /* Bit masks for CAN0_TA2 */ | 2842 | /* Bit masks for CAN0_TA2 */ |
3547 | 2843 | ||
3548 | #define TA16 0x1 /* Mailbox 16 Transmit Acknowledge */ | 2844 | #define TA16 0x1 /* Mailbox 16 Transmit Acknowledge */ |
3549 | #define nTA16 0x0 | ||
3550 | #define TA17 0x2 /* Mailbox 17 Transmit Acknowledge */ | 2845 | #define TA17 0x2 /* Mailbox 17 Transmit Acknowledge */ |
3551 | #define nTA17 0x0 | ||
3552 | #define TA18 0x4 /* Mailbox 18 Transmit Acknowledge */ | 2846 | #define TA18 0x4 /* Mailbox 18 Transmit Acknowledge */ |
3553 | #define nTA18 0x0 | ||
3554 | #define TA19 0x8 /* Mailbox 19 Transmit Acknowledge */ | 2847 | #define TA19 0x8 /* Mailbox 19 Transmit Acknowledge */ |
3555 | #define nTA19 0x0 | ||
3556 | #define TA20 0x10 /* Mailbox 20 Transmit Acknowledge */ | 2848 | #define TA20 0x10 /* Mailbox 20 Transmit Acknowledge */ |
3557 | #define nTA20 0x0 | ||
3558 | #define TA21 0x20 /* Mailbox 21 Transmit Acknowledge */ | 2849 | #define TA21 0x20 /* Mailbox 21 Transmit Acknowledge */ |
3559 | #define nTA21 0x0 | ||
3560 | #define TA22 0x40 /* Mailbox 22 Transmit Acknowledge */ | 2850 | #define TA22 0x40 /* Mailbox 22 Transmit Acknowledge */ |
3561 | #define nTA22 0x0 | ||
3562 | #define TA23 0x80 /* Mailbox 23 Transmit Acknowledge */ | 2851 | #define TA23 0x80 /* Mailbox 23 Transmit Acknowledge */ |
3563 | #define nTA23 0x0 | ||
3564 | #define TA24 0x100 /* Mailbox 24 Transmit Acknowledge */ | 2852 | #define TA24 0x100 /* Mailbox 24 Transmit Acknowledge */ |
3565 | #define nTA24 0x0 | ||
3566 | #define TA25 0x200 /* Mailbox 25 Transmit Acknowledge */ | 2853 | #define TA25 0x200 /* Mailbox 25 Transmit Acknowledge */ |
3567 | #define nTA25 0x0 | ||
3568 | #define TA26 0x400 /* Mailbox 26 Transmit Acknowledge */ | 2854 | #define TA26 0x400 /* Mailbox 26 Transmit Acknowledge */ |
3569 | #define nTA26 0x0 | ||
3570 | #define TA27 0x800 /* Mailbox 27 Transmit Acknowledge */ | 2855 | #define TA27 0x800 /* Mailbox 27 Transmit Acknowledge */ |
3571 | #define nTA27 0x0 | ||
3572 | #define TA28 0x1000 /* Mailbox 28 Transmit Acknowledge */ | 2856 | #define TA28 0x1000 /* Mailbox 28 Transmit Acknowledge */ |
3573 | #define nTA28 0x0 | ||
3574 | #define TA29 0x2000 /* Mailbox 29 Transmit Acknowledge */ | 2857 | #define TA29 0x2000 /* Mailbox 29 Transmit Acknowledge */ |
3575 | #define nTA29 0x0 | ||
3576 | #define TA30 0x4000 /* Mailbox 30 Transmit Acknowledge */ | 2858 | #define TA30 0x4000 /* Mailbox 30 Transmit Acknowledge */ |
3577 | #define nTA30 0x0 | ||
3578 | #define TA31 0x8000 /* Mailbox 31 Transmit Acknowledge */ | 2859 | #define TA31 0x8000 /* Mailbox 31 Transmit Acknowledge */ |
3579 | #define nTA31 0x0 | ||
3580 | 2860 | ||
3581 | /* Bit masks for CAN0_RFH1 */ | 2861 | /* Bit masks for CAN0_RFH1 */ |
3582 | 2862 | ||
3583 | #define RFH0 0x1 /* Mailbox 0 Remote Frame Handling Enable */ | 2863 | #define RFH0 0x1 /* Mailbox 0 Remote Frame Handling Enable */ |
3584 | #define nRFH0 0x0 | ||
3585 | #define RFH1 0x2 /* Mailbox 1 Remote Frame Handling Enable */ | 2864 | #define RFH1 0x2 /* Mailbox 1 Remote Frame Handling Enable */ |
3586 | #define nRFH1 0x0 | ||
3587 | #define RFH2 0x4 /* Mailbox 2 Remote Frame Handling Enable */ | 2865 | #define RFH2 0x4 /* Mailbox 2 Remote Frame Handling Enable */ |
3588 | #define nRFH2 0x0 | ||
3589 | #define RFH3 0x8 /* Mailbox 3 Remote Frame Handling Enable */ | 2866 | #define RFH3 0x8 /* Mailbox 3 Remote Frame Handling Enable */ |
3590 | #define nRFH3 0x0 | ||
3591 | #define RFH4 0x10 /* Mailbox 4 Remote Frame Handling Enable */ | 2867 | #define RFH4 0x10 /* Mailbox 4 Remote Frame Handling Enable */ |
3592 | #define nRFH4 0x0 | ||
3593 | #define RFH5 0x20 /* Mailbox 5 Remote Frame Handling Enable */ | 2868 | #define RFH5 0x20 /* Mailbox 5 Remote Frame Handling Enable */ |
3594 | #define nRFH5 0x0 | ||
3595 | #define RFH6 0x40 /* Mailbox 6 Remote Frame Handling Enable */ | 2869 | #define RFH6 0x40 /* Mailbox 6 Remote Frame Handling Enable */ |
3596 | #define nRFH6 0x0 | ||
3597 | #define RFH7 0x80 /* Mailbox 7 Remote Frame Handling Enable */ | 2870 | #define RFH7 0x80 /* Mailbox 7 Remote Frame Handling Enable */ |
3598 | #define nRFH7 0x0 | ||
3599 | #define RFH8 0x100 /* Mailbox 8 Remote Frame Handling Enable */ | 2871 | #define RFH8 0x100 /* Mailbox 8 Remote Frame Handling Enable */ |
3600 | #define nRFH8 0x0 | ||
3601 | #define RFH9 0x200 /* Mailbox 9 Remote Frame Handling Enable */ | 2872 | #define RFH9 0x200 /* Mailbox 9 Remote Frame Handling Enable */ |
3602 | #define nRFH9 0x0 | ||
3603 | #define RFH10 0x400 /* Mailbox 10 Remote Frame Handling Enable */ | 2873 | #define RFH10 0x400 /* Mailbox 10 Remote Frame Handling Enable */ |
3604 | #define nRFH10 0x0 | ||
3605 | #define RFH11 0x800 /* Mailbox 11 Remote Frame Handling Enable */ | 2874 | #define RFH11 0x800 /* Mailbox 11 Remote Frame Handling Enable */ |
3606 | #define nRFH11 0x0 | ||
3607 | #define RFH12 0x1000 /* Mailbox 12 Remote Frame Handling Enable */ | 2875 | #define RFH12 0x1000 /* Mailbox 12 Remote Frame Handling Enable */ |
3608 | #define nRFH12 0x0 | ||
3609 | #define RFH13 0x2000 /* Mailbox 13 Remote Frame Handling Enable */ | 2876 | #define RFH13 0x2000 /* Mailbox 13 Remote Frame Handling Enable */ |
3610 | #define nRFH13 0x0 | ||
3611 | #define RFH14 0x4000 /* Mailbox 14 Remote Frame Handling Enable */ | 2877 | #define RFH14 0x4000 /* Mailbox 14 Remote Frame Handling Enable */ |
3612 | #define nRFH14 0x0 | ||
3613 | #define RFH15 0x8000 /* Mailbox 15 Remote Frame Handling Enable */ | 2878 | #define RFH15 0x8000 /* Mailbox 15 Remote Frame Handling Enable */ |
3614 | #define nRFH15 0x0 | ||
3615 | 2879 | ||
3616 | /* Bit masks for CAN0_RFH2 */ | 2880 | /* Bit masks for CAN0_RFH2 */ |
3617 | 2881 | ||
3618 | #define RFH16 0x1 /* Mailbox 16 Remote Frame Handling Enable */ | 2882 | #define RFH16 0x1 /* Mailbox 16 Remote Frame Handling Enable */ |
3619 | #define nRFH16 0x0 | ||
3620 | #define RFH17 0x2 /* Mailbox 17 Remote Frame Handling Enable */ | 2883 | #define RFH17 0x2 /* Mailbox 17 Remote Frame Handling Enable */ |
3621 | #define nRFH17 0x0 | ||
3622 | #define RFH18 0x4 /* Mailbox 18 Remote Frame Handling Enable */ | 2884 | #define RFH18 0x4 /* Mailbox 18 Remote Frame Handling Enable */ |
3623 | #define nRFH18 0x0 | ||
3624 | #define RFH19 0x8 /* Mailbox 19 Remote Frame Handling Enable */ | 2885 | #define RFH19 0x8 /* Mailbox 19 Remote Frame Handling Enable */ |
3625 | #define nRFH19 0x0 | ||
3626 | #define RFH20 0x10 /* Mailbox 20 Remote Frame Handling Enable */ | 2886 | #define RFH20 0x10 /* Mailbox 20 Remote Frame Handling Enable */ |
3627 | #define nRFH20 0x0 | ||
3628 | #define RFH21 0x20 /* Mailbox 21 Remote Frame Handling Enable */ | 2887 | #define RFH21 0x20 /* Mailbox 21 Remote Frame Handling Enable */ |
3629 | #define nRFH21 0x0 | ||
3630 | #define RFH22 0x40 /* Mailbox 22 Remote Frame Handling Enable */ | 2888 | #define RFH22 0x40 /* Mailbox 22 Remote Frame Handling Enable */ |
3631 | #define nRFH22 0x0 | ||
3632 | #define RFH23 0x80 /* Mailbox 23 Remote Frame Handling Enable */ | 2889 | #define RFH23 0x80 /* Mailbox 23 Remote Frame Handling Enable */ |
3633 | #define nRFH23 0x0 | ||
3634 | #define RFH24 0x100 /* Mailbox 24 Remote Frame Handling Enable */ | 2890 | #define RFH24 0x100 /* Mailbox 24 Remote Frame Handling Enable */ |
3635 | #define nRFH24 0x0 | ||
3636 | #define RFH25 0x200 /* Mailbox 25 Remote Frame Handling Enable */ | 2891 | #define RFH25 0x200 /* Mailbox 25 Remote Frame Handling Enable */ |
3637 | #define nRFH25 0x0 | ||
3638 | #define RFH26 0x400 /* Mailbox 26 Remote Frame Handling Enable */ | 2892 | #define RFH26 0x400 /* Mailbox 26 Remote Frame Handling Enable */ |
3639 | #define nRFH26 0x0 | ||
3640 | #define RFH27 0x800 /* Mailbox 27 Remote Frame Handling Enable */ | 2893 | #define RFH27 0x800 /* Mailbox 27 Remote Frame Handling Enable */ |
3641 | #define nRFH27 0x0 | ||
3642 | #define RFH28 0x1000 /* Mailbox 28 Remote Frame Handling Enable */ | 2894 | #define RFH28 0x1000 /* Mailbox 28 Remote Frame Handling Enable */ |
3643 | #define nRFH28 0x0 | ||
3644 | #define RFH29 0x2000 /* Mailbox 29 Remote Frame Handling Enable */ | 2895 | #define RFH29 0x2000 /* Mailbox 29 Remote Frame Handling Enable */ |
3645 | #define nRFH29 0x0 | ||
3646 | #define RFH30 0x4000 /* Mailbox 30 Remote Frame Handling Enable */ | 2896 | #define RFH30 0x4000 /* Mailbox 30 Remote Frame Handling Enable */ |
3647 | #define nRFH30 0x0 | ||
3648 | #define RFH31 0x8000 /* Mailbox 31 Remote Frame Handling Enable */ | 2897 | #define RFH31 0x8000 /* Mailbox 31 Remote Frame Handling Enable */ |
3649 | #define nRFH31 0x0 | ||
3650 | 2898 | ||
3651 | /* Bit masks for CAN0_MBIM1 */ | 2899 | /* Bit masks for CAN0_MBIM1 */ |
3652 | 2900 | ||
3653 | #define MBIM0 0x1 /* Mailbox 0 Mailbox Interrupt Mask */ | 2901 | #define MBIM0 0x1 /* Mailbox 0 Mailbox Interrupt Mask */ |
3654 | #define nMBIM0 0x0 | ||
3655 | #define MBIM1 0x2 /* Mailbox 1 Mailbox Interrupt Mask */ | 2902 | #define MBIM1 0x2 /* Mailbox 1 Mailbox Interrupt Mask */ |
3656 | #define nMBIM1 0x0 | ||
3657 | #define MBIM2 0x4 /* Mailbox 2 Mailbox Interrupt Mask */ | 2903 | #define MBIM2 0x4 /* Mailbox 2 Mailbox Interrupt Mask */ |
3658 | #define nMBIM2 0x0 | ||
3659 | #define MBIM3 0x8 /* Mailbox 3 Mailbox Interrupt Mask */ | 2904 | #define MBIM3 0x8 /* Mailbox 3 Mailbox Interrupt Mask */ |
3660 | #define nMBIM3 0x0 | ||
3661 | #define MBIM4 0x10 /* Mailbox 4 Mailbox Interrupt Mask */ | 2905 | #define MBIM4 0x10 /* Mailbox 4 Mailbox Interrupt Mask */ |
3662 | #define nMBIM4 0x0 | ||
3663 | #define MBIM5 0x20 /* Mailbox 5 Mailbox Interrupt Mask */ | 2906 | #define MBIM5 0x20 /* Mailbox 5 Mailbox Interrupt Mask */ |
3664 | #define nMBIM5 0x0 | ||
3665 | #define MBIM6 0x40 /* Mailbox 6 Mailbox Interrupt Mask */ | 2907 | #define MBIM6 0x40 /* Mailbox 6 Mailbox Interrupt Mask */ |
3666 | #define nMBIM6 0x0 | ||
3667 | #define MBIM7 0x80 /* Mailbox 7 Mailbox Interrupt Mask */ | 2908 | #define MBIM7 0x80 /* Mailbox 7 Mailbox Interrupt Mask */ |
3668 | #define nMBIM7 0x0 | ||
3669 | #define MBIM8 0x100 /* Mailbox 8 Mailbox Interrupt Mask */ | 2909 | #define MBIM8 0x100 /* Mailbox 8 Mailbox Interrupt Mask */ |
3670 | #define nMBIM8 0x0 | ||
3671 | #define MBIM9 0x200 /* Mailbox 9 Mailbox Interrupt Mask */ | 2910 | #define MBIM9 0x200 /* Mailbox 9 Mailbox Interrupt Mask */ |
3672 | #define nMBIM9 0x0 | ||
3673 | #define MBIM10 0x400 /* Mailbox 10 Mailbox Interrupt Mask */ | 2911 | #define MBIM10 0x400 /* Mailbox 10 Mailbox Interrupt Mask */ |
3674 | #define nMBIM10 0x0 | ||
3675 | #define MBIM11 0x800 /* Mailbox 11 Mailbox Interrupt Mask */ | 2912 | #define MBIM11 0x800 /* Mailbox 11 Mailbox Interrupt Mask */ |
3676 | #define nMBIM11 0x0 | ||
3677 | #define MBIM12 0x1000 /* Mailbox 12 Mailbox Interrupt Mask */ | 2913 | #define MBIM12 0x1000 /* Mailbox 12 Mailbox Interrupt Mask */ |
3678 | #define nMBIM12 0x0 | ||
3679 | #define MBIM13 0x2000 /* Mailbox 13 Mailbox Interrupt Mask */ | 2914 | #define MBIM13 0x2000 /* Mailbox 13 Mailbox Interrupt Mask */ |
3680 | #define nMBIM13 0x0 | ||
3681 | #define MBIM14 0x4000 /* Mailbox 14 Mailbox Interrupt Mask */ | 2915 | #define MBIM14 0x4000 /* Mailbox 14 Mailbox Interrupt Mask */ |
3682 | #define nMBIM14 0x0 | ||
3683 | #define MBIM15 0x8000 /* Mailbox 15 Mailbox Interrupt Mask */ | 2916 | #define MBIM15 0x8000 /* Mailbox 15 Mailbox Interrupt Mask */ |
3684 | #define nMBIM15 0x0 | ||
3685 | 2917 | ||
3686 | /* Bit masks for CAN0_MBIM2 */ | 2918 | /* Bit masks for CAN0_MBIM2 */ |
3687 | 2919 | ||
3688 | #define MBIM16 0x1 /* Mailbox 16 Mailbox Interrupt Mask */ | 2920 | #define MBIM16 0x1 /* Mailbox 16 Mailbox Interrupt Mask */ |
3689 | #define nMBIM16 0x0 | ||
3690 | #define MBIM17 0x2 /* Mailbox 17 Mailbox Interrupt Mask */ | 2921 | #define MBIM17 0x2 /* Mailbox 17 Mailbox Interrupt Mask */ |
3691 | #define nMBIM17 0x0 | ||
3692 | #define MBIM18 0x4 /* Mailbox 18 Mailbox Interrupt Mask */ | 2922 | #define MBIM18 0x4 /* Mailbox 18 Mailbox Interrupt Mask */ |
3693 | #define nMBIM18 0x0 | ||
3694 | #define MBIM19 0x8 /* Mailbox 19 Mailbox Interrupt Mask */ | 2923 | #define MBIM19 0x8 /* Mailbox 19 Mailbox Interrupt Mask */ |
3695 | #define nMBIM19 0x0 | ||
3696 | #define MBIM20 0x10 /* Mailbox 20 Mailbox Interrupt Mask */ | 2924 | #define MBIM20 0x10 /* Mailbox 20 Mailbox Interrupt Mask */ |
3697 | #define nMBIM20 0x0 | ||
3698 | #define MBIM21 0x20 /* Mailbox 21 Mailbox Interrupt Mask */ | 2925 | #define MBIM21 0x20 /* Mailbox 21 Mailbox Interrupt Mask */ |
3699 | #define nMBIM21 0x0 | ||
3700 | #define MBIM22 0x40 /* Mailbox 22 Mailbox Interrupt Mask */ | 2926 | #define MBIM22 0x40 /* Mailbox 22 Mailbox Interrupt Mask */ |
3701 | #define nMBIM22 0x0 | ||
3702 | #define MBIM23 0x80 /* Mailbox 23 Mailbox Interrupt Mask */ | 2927 | #define MBIM23 0x80 /* Mailbox 23 Mailbox Interrupt Mask */ |
3703 | #define nMBIM23 0x0 | ||
3704 | #define MBIM24 0x100 /* Mailbox 24 Mailbox Interrupt Mask */ | 2928 | #define MBIM24 0x100 /* Mailbox 24 Mailbox Interrupt Mask */ |
3705 | #define nMBIM24 0x0 | ||
3706 | #define MBIM25 0x200 /* Mailbox 25 Mailbox Interrupt Mask */ | 2929 | #define MBIM25 0x200 /* Mailbox 25 Mailbox Interrupt Mask */ |
3707 | #define nMBIM25 0x0 | ||
3708 | #define MBIM26 0x400 /* Mailbox 26 Mailbox Interrupt Mask */ | 2930 | #define MBIM26 0x400 /* Mailbox 26 Mailbox Interrupt Mask */ |
3709 | #define nMBIM26 0x0 | ||
3710 | #define MBIM27 0x800 /* Mailbox 27 Mailbox Interrupt Mask */ | 2931 | #define MBIM27 0x800 /* Mailbox 27 Mailbox Interrupt Mask */ |
3711 | #define nMBIM27 0x0 | ||
3712 | #define MBIM28 0x1000 /* Mailbox 28 Mailbox Interrupt Mask */ | 2932 | #define MBIM28 0x1000 /* Mailbox 28 Mailbox Interrupt Mask */ |
3713 | #define nMBIM28 0x0 | ||
3714 | #define MBIM29 0x2000 /* Mailbox 29 Mailbox Interrupt Mask */ | 2933 | #define MBIM29 0x2000 /* Mailbox 29 Mailbox Interrupt Mask */ |
3715 | #define nMBIM29 0x0 | ||
3716 | #define MBIM30 0x4000 /* Mailbox 30 Mailbox Interrupt Mask */ | 2934 | #define MBIM30 0x4000 /* Mailbox 30 Mailbox Interrupt Mask */ |
3717 | #define nMBIM30 0x0 | ||
3718 | #define MBIM31 0x8000 /* Mailbox 31 Mailbox Interrupt Mask */ | 2935 | #define MBIM31 0x8000 /* Mailbox 31 Mailbox Interrupt Mask */ |
3719 | #define nMBIM31 0x0 | ||
3720 | 2936 | ||
3721 | /* Bit masks for CAN0_MBTIF1 */ | 2937 | /* Bit masks for CAN0_MBTIF1 */ |
3722 | 2938 | ||
3723 | #define MBTIF0 0x1 /* Mailbox 0 Mailbox Transmit Interrupt Flag */ | 2939 | #define MBTIF0 0x1 /* Mailbox 0 Mailbox Transmit Interrupt Flag */ |
3724 | #define nMBTIF0 0x0 | ||
3725 | #define MBTIF1 0x2 /* Mailbox 1 Mailbox Transmit Interrupt Flag */ | 2940 | #define MBTIF1 0x2 /* Mailbox 1 Mailbox Transmit Interrupt Flag */ |
3726 | #define nMBTIF1 0x0 | ||
3727 | #define MBTIF2 0x4 /* Mailbox 2 Mailbox Transmit Interrupt Flag */ | 2941 | #define MBTIF2 0x4 /* Mailbox 2 Mailbox Transmit Interrupt Flag */ |
3728 | #define nMBTIF2 0x0 | ||
3729 | #define MBTIF3 0x8 /* Mailbox 3 Mailbox Transmit Interrupt Flag */ | 2942 | #define MBTIF3 0x8 /* Mailbox 3 Mailbox Transmit Interrupt Flag */ |
3730 | #define nMBTIF3 0x0 | ||
3731 | #define MBTIF4 0x10 /* Mailbox 4 Mailbox Transmit Interrupt Flag */ | 2943 | #define MBTIF4 0x10 /* Mailbox 4 Mailbox Transmit Interrupt Flag */ |
3732 | #define nMBTIF4 0x0 | ||
3733 | #define MBTIF5 0x20 /* Mailbox 5 Mailbox Transmit Interrupt Flag */ | 2944 | #define MBTIF5 0x20 /* Mailbox 5 Mailbox Transmit Interrupt Flag */ |
3734 | #define nMBTIF5 0x0 | ||
3735 | #define MBTIF6 0x40 /* Mailbox 6 Mailbox Transmit Interrupt Flag */ | 2945 | #define MBTIF6 0x40 /* Mailbox 6 Mailbox Transmit Interrupt Flag */ |
3736 | #define nMBTIF6 0x0 | ||
3737 | #define MBTIF7 0x80 /* Mailbox 7 Mailbox Transmit Interrupt Flag */ | 2946 | #define MBTIF7 0x80 /* Mailbox 7 Mailbox Transmit Interrupt Flag */ |
3738 | #define nMBTIF7 0x0 | ||
3739 | #define MBTIF8 0x100 /* Mailbox 8 Mailbox Transmit Interrupt Flag */ | 2947 | #define MBTIF8 0x100 /* Mailbox 8 Mailbox Transmit Interrupt Flag */ |
3740 | #define nMBTIF8 0x0 | ||
3741 | #define MBTIF9 0x200 /* Mailbox 9 Mailbox Transmit Interrupt Flag */ | 2948 | #define MBTIF9 0x200 /* Mailbox 9 Mailbox Transmit Interrupt Flag */ |
3742 | #define nMBTIF9 0x0 | ||
3743 | #define MBTIF10 0x400 /* Mailbox 10 Mailbox Transmit Interrupt Flag */ | 2949 | #define MBTIF10 0x400 /* Mailbox 10 Mailbox Transmit Interrupt Flag */ |
3744 | #define nMBTIF10 0x0 | ||
3745 | #define MBTIF11 0x800 /* Mailbox 11 Mailbox Transmit Interrupt Flag */ | 2950 | #define MBTIF11 0x800 /* Mailbox 11 Mailbox Transmit Interrupt Flag */ |
3746 | #define nMBTIF11 0x0 | ||
3747 | #define MBTIF12 0x1000 /* Mailbox 12 Mailbox Transmit Interrupt Flag */ | 2951 | #define MBTIF12 0x1000 /* Mailbox 12 Mailbox Transmit Interrupt Flag */ |
3748 | #define nMBTIF12 0x0 | ||
3749 | #define MBTIF13 0x2000 /* Mailbox 13 Mailbox Transmit Interrupt Flag */ | 2952 | #define MBTIF13 0x2000 /* Mailbox 13 Mailbox Transmit Interrupt Flag */ |
3750 | #define nMBTIF13 0x0 | ||
3751 | #define MBTIF14 0x4000 /* Mailbox 14 Mailbox Transmit Interrupt Flag */ | 2953 | #define MBTIF14 0x4000 /* Mailbox 14 Mailbox Transmit Interrupt Flag */ |
3752 | #define nMBTIF14 0x0 | ||
3753 | #define MBTIF15 0x8000 /* Mailbox 15 Mailbox Transmit Interrupt Flag */ | 2954 | #define MBTIF15 0x8000 /* Mailbox 15 Mailbox Transmit Interrupt Flag */ |
3754 | #define nMBTIF15 0x0 | ||
3755 | 2955 | ||
3756 | /* Bit masks for CAN0_MBTIF2 */ | 2956 | /* Bit masks for CAN0_MBTIF2 */ |
3757 | 2957 | ||
3758 | #define MBTIF16 0x1 /* Mailbox 16 Mailbox Transmit Interrupt Flag */ | 2958 | #define MBTIF16 0x1 /* Mailbox 16 Mailbox Transmit Interrupt Flag */ |
3759 | #define nMBTIF16 0x0 | ||
3760 | #define MBTIF17 0x2 /* Mailbox 17 Mailbox Transmit Interrupt Flag */ | 2959 | #define MBTIF17 0x2 /* Mailbox 17 Mailbox Transmit Interrupt Flag */ |
3761 | #define nMBTIF17 0x0 | ||
3762 | #define MBTIF18 0x4 /* Mailbox 18 Mailbox Transmit Interrupt Flag */ | 2960 | #define MBTIF18 0x4 /* Mailbox 18 Mailbox Transmit Interrupt Flag */ |
3763 | #define nMBTIF18 0x0 | ||
3764 | #define MBTIF19 0x8 /* Mailbox 19 Mailbox Transmit Interrupt Flag */ | 2961 | #define MBTIF19 0x8 /* Mailbox 19 Mailbox Transmit Interrupt Flag */ |
3765 | #define nMBTIF19 0x0 | ||
3766 | #define MBTIF20 0x10 /* Mailbox 20 Mailbox Transmit Interrupt Flag */ | 2962 | #define MBTIF20 0x10 /* Mailbox 20 Mailbox Transmit Interrupt Flag */ |
3767 | #define nMBTIF20 0x0 | ||
3768 | #define MBTIF21 0x20 /* Mailbox 21 Mailbox Transmit Interrupt Flag */ | 2963 | #define MBTIF21 0x20 /* Mailbox 21 Mailbox Transmit Interrupt Flag */ |
3769 | #define nMBTIF21 0x0 | ||
3770 | #define MBTIF22 0x40 /* Mailbox 22 Mailbox Transmit Interrupt Flag */ | 2964 | #define MBTIF22 0x40 /* Mailbox 22 Mailbox Transmit Interrupt Flag */ |
3771 | #define nMBTIF22 0x0 | ||
3772 | #define MBTIF23 0x80 /* Mailbox 23 Mailbox Transmit Interrupt Flag */ | 2965 | #define MBTIF23 0x80 /* Mailbox 23 Mailbox Transmit Interrupt Flag */ |
3773 | #define nMBTIF23 0x0 | ||
3774 | #define MBTIF24 0x100 /* Mailbox 24 Mailbox Transmit Interrupt Flag */ | 2966 | #define MBTIF24 0x100 /* Mailbox 24 Mailbox Transmit Interrupt Flag */ |
3775 | #define nMBTIF24 0x0 | ||
3776 | #define MBTIF25 0x200 /* Mailbox 25 Mailbox Transmit Interrupt Flag */ | 2967 | #define MBTIF25 0x200 /* Mailbox 25 Mailbox Transmit Interrupt Flag */ |
3777 | #define nMBTIF25 0x0 | ||
3778 | #define MBTIF26 0x400 /* Mailbox 26 Mailbox Transmit Interrupt Flag */ | 2968 | #define MBTIF26 0x400 /* Mailbox 26 Mailbox Transmit Interrupt Flag */ |
3779 | #define nMBTIF26 0x0 | ||
3780 | #define MBTIF27 0x800 /* Mailbox 27 Mailbox Transmit Interrupt Flag */ | 2969 | #define MBTIF27 0x800 /* Mailbox 27 Mailbox Transmit Interrupt Flag */ |
3781 | #define nMBTIF27 0x0 | ||
3782 | #define MBTIF28 0x1000 /* Mailbox 28 Mailbox Transmit Interrupt Flag */ | 2970 | #define MBTIF28 0x1000 /* Mailbox 28 Mailbox Transmit Interrupt Flag */ |
3783 | #define nMBTIF28 0x0 | ||
3784 | #define MBTIF29 0x2000 /* Mailbox 29 Mailbox Transmit Interrupt Flag */ | 2971 | #define MBTIF29 0x2000 /* Mailbox 29 Mailbox Transmit Interrupt Flag */ |
3785 | #define nMBTIF29 0x0 | ||
3786 | #define MBTIF30 0x4000 /* Mailbox 30 Mailbox Transmit Interrupt Flag */ | 2972 | #define MBTIF30 0x4000 /* Mailbox 30 Mailbox Transmit Interrupt Flag */ |
3787 | #define nMBTIF30 0x0 | ||
3788 | #define MBTIF31 0x8000 /* Mailbox 31 Mailbox Transmit Interrupt Flag */ | 2973 | #define MBTIF31 0x8000 /* Mailbox 31 Mailbox Transmit Interrupt Flag */ |
3789 | #define nMBTIF31 0x0 | ||
3790 | 2974 | ||
3791 | /* Bit masks for CAN0_MBRIF1 */ | 2975 | /* Bit masks for CAN0_MBRIF1 */ |
3792 | 2976 | ||
3793 | #define MBRIF0 0x1 /* Mailbox 0 Mailbox Receive Interrupt Flag */ | 2977 | #define MBRIF0 0x1 /* Mailbox 0 Mailbox Receive Interrupt Flag */ |
3794 | #define nMBRIF0 0x0 | ||
3795 | #define MBRIF1 0x2 /* Mailbox 1 Mailbox Receive Interrupt Flag */ | 2978 | #define MBRIF1 0x2 /* Mailbox 1 Mailbox Receive Interrupt Flag */ |
3796 | #define nMBRIF1 0x0 | ||
3797 | #define MBRIF2 0x4 /* Mailbox 2 Mailbox Receive Interrupt Flag */ | 2979 | #define MBRIF2 0x4 /* Mailbox 2 Mailbox Receive Interrupt Flag */ |
3798 | #define nMBRIF2 0x0 | ||
3799 | #define MBRIF3 0x8 /* Mailbox 3 Mailbox Receive Interrupt Flag */ | 2980 | #define MBRIF3 0x8 /* Mailbox 3 Mailbox Receive Interrupt Flag */ |
3800 | #define nMBRIF3 0x0 | ||
3801 | #define MBRIF4 0x10 /* Mailbox 4 Mailbox Receive Interrupt Flag */ | 2981 | #define MBRIF4 0x10 /* Mailbox 4 Mailbox Receive Interrupt Flag */ |
3802 | #define nMBRIF4 0x0 | ||
3803 | #define MBRIF5 0x20 /* Mailbox 5 Mailbox Receive Interrupt Flag */ | 2982 | #define MBRIF5 0x20 /* Mailbox 5 Mailbox Receive Interrupt Flag */ |
3804 | #define nMBRIF5 0x0 | ||
3805 | #define MBRIF6 0x40 /* Mailbox 6 Mailbox Receive Interrupt Flag */ | 2983 | #define MBRIF6 0x40 /* Mailbox 6 Mailbox Receive Interrupt Flag */ |
3806 | #define nMBRIF6 0x0 | ||
3807 | #define MBRIF7 0x80 /* Mailbox 7 Mailbox Receive Interrupt Flag */ | 2984 | #define MBRIF7 0x80 /* Mailbox 7 Mailbox Receive Interrupt Flag */ |
3808 | #define nMBRIF7 0x0 | ||
3809 | #define MBRIF8 0x100 /* Mailbox 8 Mailbox Receive Interrupt Flag */ | 2985 | #define MBRIF8 0x100 /* Mailbox 8 Mailbox Receive Interrupt Flag */ |
3810 | #define nMBRIF8 0x0 | ||
3811 | #define MBRIF9 0x200 /* Mailbox 9 Mailbox Receive Interrupt Flag */ | 2986 | #define MBRIF9 0x200 /* Mailbox 9 Mailbox Receive Interrupt Flag */ |
3812 | #define nMBRIF9 0x0 | ||
3813 | #define MBRIF10 0x400 /* Mailbox 10 Mailbox Receive Interrupt Flag */ | 2987 | #define MBRIF10 0x400 /* Mailbox 10 Mailbox Receive Interrupt Flag */ |
3814 | #define nMBRIF10 0x0 | ||
3815 | #define MBRIF11 0x800 /* Mailbox 11 Mailbox Receive Interrupt Flag */ | 2988 | #define MBRIF11 0x800 /* Mailbox 11 Mailbox Receive Interrupt Flag */ |
3816 | #define nMBRIF11 0x0 | ||
3817 | #define MBRIF12 0x1000 /* Mailbox 12 Mailbox Receive Interrupt Flag */ | 2989 | #define MBRIF12 0x1000 /* Mailbox 12 Mailbox Receive Interrupt Flag */ |
3818 | #define nMBRIF12 0x0 | ||
3819 | #define MBRIF13 0x2000 /* Mailbox 13 Mailbox Receive Interrupt Flag */ | 2990 | #define MBRIF13 0x2000 /* Mailbox 13 Mailbox Receive Interrupt Flag */ |
3820 | #define nMBRIF13 0x0 | ||
3821 | #define MBRIF14 0x4000 /* Mailbox 14 Mailbox Receive Interrupt Flag */ | 2991 | #define MBRIF14 0x4000 /* Mailbox 14 Mailbox Receive Interrupt Flag */ |
3822 | #define nMBRIF14 0x0 | ||
3823 | #define MBRIF15 0x8000 /* Mailbox 15 Mailbox Receive Interrupt Flag */ | 2992 | #define MBRIF15 0x8000 /* Mailbox 15 Mailbox Receive Interrupt Flag */ |
3824 | #define nMBRIF15 0x0 | ||
3825 | 2993 | ||
3826 | /* Bit masks for CAN0_MBRIF2 */ | 2994 | /* Bit masks for CAN0_MBRIF2 */ |
3827 | 2995 | ||
3828 | #define MBRIF16 0x1 /* Mailbox 16 Mailbox Receive Interrupt Flag */ | 2996 | #define MBRIF16 0x1 /* Mailbox 16 Mailbox Receive Interrupt Flag */ |
3829 | #define nMBRIF16 0x0 | ||
3830 | #define MBRIF17 0x2 /* Mailbox 17 Mailbox Receive Interrupt Flag */ | 2997 | #define MBRIF17 0x2 /* Mailbox 17 Mailbox Receive Interrupt Flag */ |
3831 | #define nMBRIF17 0x0 | ||
3832 | #define MBRIF18 0x4 /* Mailbox 18 Mailbox Receive Interrupt Flag */ | 2998 | #define MBRIF18 0x4 /* Mailbox 18 Mailbox Receive Interrupt Flag */ |
3833 | #define nMBRIF18 0x0 | ||
3834 | #define MBRIF19 0x8 /* Mailbox 19 Mailbox Receive Interrupt Flag */ | 2999 | #define MBRIF19 0x8 /* Mailbox 19 Mailbox Receive Interrupt Flag */ |
3835 | #define nMBRIF19 0x0 | ||
3836 | #define MBRIF20 0x10 /* Mailbox 20 Mailbox Receive Interrupt Flag */ | 3000 | #define MBRIF20 0x10 /* Mailbox 20 Mailbox Receive Interrupt Flag */ |
3837 | #define nMBRIF20 0x0 | ||
3838 | #define MBRIF21 0x20 /* Mailbox 21 Mailbox Receive Interrupt Flag */ | 3001 | #define MBRIF21 0x20 /* Mailbox 21 Mailbox Receive Interrupt Flag */ |
3839 | #define nMBRIF21 0x0 | ||
3840 | #define MBRIF22 0x40 /* Mailbox 22 Mailbox Receive Interrupt Flag */ | 3002 | #define MBRIF22 0x40 /* Mailbox 22 Mailbox Receive Interrupt Flag */ |
3841 | #define nMBRIF22 0x0 | ||
3842 | #define MBRIF23 0x80 /* Mailbox 23 Mailbox Receive Interrupt Flag */ | 3003 | #define MBRIF23 0x80 /* Mailbox 23 Mailbox Receive Interrupt Flag */ |
3843 | #define nMBRIF23 0x0 | ||
3844 | #define MBRIF24 0x100 /* Mailbox 24 Mailbox Receive Interrupt Flag */ | 3004 | #define MBRIF24 0x100 /* Mailbox 24 Mailbox Receive Interrupt Flag */ |
3845 | #define nMBRIF24 0x0 | ||
3846 | #define MBRIF25 0x200 /* Mailbox 25 Mailbox Receive Interrupt Flag */ | 3005 | #define MBRIF25 0x200 /* Mailbox 25 Mailbox Receive Interrupt Flag */ |
3847 | #define nMBRIF25 0x0 | ||
3848 | #define MBRIF26 0x400 /* Mailbox 26 Mailbox Receive Interrupt Flag */ | 3006 | #define MBRIF26 0x400 /* Mailbox 26 Mailbox Receive Interrupt Flag */ |
3849 | #define nMBRIF26 0x0 | ||
3850 | #define MBRIF27 0x800 /* Mailbox 27 Mailbox Receive Interrupt Flag */ | 3007 | #define MBRIF27 0x800 /* Mailbox 27 Mailbox Receive Interrupt Flag */ |
3851 | #define nMBRIF27 0x0 | ||
3852 | #define MBRIF28 0x1000 /* Mailbox 28 Mailbox Receive Interrupt Flag */ | 3008 | #define MBRIF28 0x1000 /* Mailbox 28 Mailbox Receive Interrupt Flag */ |
3853 | #define nMBRIF28 0x0 | ||
3854 | #define MBRIF29 0x2000 /* Mailbox 29 Mailbox Receive Interrupt Flag */ | 3009 | #define MBRIF29 0x2000 /* Mailbox 29 Mailbox Receive Interrupt Flag */ |
3855 | #define nMBRIF29 0x0 | ||
3856 | #define MBRIF30 0x4000 /* Mailbox 30 Mailbox Receive Interrupt Flag */ | 3010 | #define MBRIF30 0x4000 /* Mailbox 30 Mailbox Receive Interrupt Flag */ |
3857 | #define nMBRIF30 0x0 | ||
3858 | #define MBRIF31 0x8000 /* Mailbox 31 Mailbox Receive Interrupt Flag */ | 3011 | #define MBRIF31 0x8000 /* Mailbox 31 Mailbox Receive Interrupt Flag */ |
3859 | #define nMBRIF31 0x0 | ||
3860 | 3012 | ||
3861 | /* Bit masks for EPPIx_STATUS */ | 3013 | /* Bit masks for EPPIx_STATUS */ |
3862 | 3014 | ||
3863 | #define CFIFO_ERR 0x1 /* Chroma FIFO Error */ | 3015 | #define CFIFO_ERR 0x1 /* Chroma FIFO Error */ |
3864 | #define nCFIFO_ERR 0x0 | ||
3865 | #define YFIFO_ERR 0x2 /* Luma FIFO Error */ | 3016 | #define YFIFO_ERR 0x2 /* Luma FIFO Error */ |
3866 | #define nYFIFO_ERR 0x0 | ||
3867 | #define LTERR_OVR 0x4 /* Line Track Overflow */ | 3017 | #define LTERR_OVR 0x4 /* Line Track Overflow */ |
3868 | #define nLTERR_OVR 0x0 | ||
3869 | #define LTERR_UNDR 0x8 /* Line Track Underflow */ | 3018 | #define LTERR_UNDR 0x8 /* Line Track Underflow */ |
3870 | #define nLTERR_UNDR 0x0 | ||
3871 | #define FTERR_OVR 0x10 /* Frame Track Overflow */ | 3019 | #define FTERR_OVR 0x10 /* Frame Track Overflow */ |
3872 | #define nFTERR_OVR 0x0 | ||
3873 | #define FTERR_UNDR 0x20 /* Frame Track Underflow */ | 3020 | #define FTERR_UNDR 0x20 /* Frame Track Underflow */ |
3874 | #define nFTERR_UNDR 0x0 | ||
3875 | #define ERR_NCOR 0x40 /* Preamble Error Not Corrected */ | 3021 | #define ERR_NCOR 0x40 /* Preamble Error Not Corrected */ |
3876 | #define nERR_NCOR 0x0 | ||
3877 | #define DMA1URQ 0x80 /* DMA1 Urgent Request */ | 3022 | #define DMA1URQ 0x80 /* DMA1 Urgent Request */ |
3878 | #define nDMA1URQ 0x0 | ||
3879 | #define DMA0URQ 0x100 /* DMA0 Urgent Request */ | 3023 | #define DMA0URQ 0x100 /* DMA0 Urgent Request */ |
3880 | #define nDMA0URQ 0x0 | ||
3881 | #define ERR_DET 0x4000 /* Preamble Error Detected */ | 3024 | #define ERR_DET 0x4000 /* Preamble Error Detected */ |
3882 | #define nERR_DET 0x0 | ||
3883 | #define FLD 0x8000 /* Field */ | 3025 | #define FLD 0x8000 /* Field */ |
3884 | #define nFLD 0x0 | ||
3885 | 3026 | ||
3886 | /* Bit masks for EPPIx_CONTROL */ | 3027 | /* Bit masks for EPPIx_CONTROL */ |
3887 | 3028 | ||
3888 | #define EPPI_EN 0x1 /* Enable */ | 3029 | #define EPPI_EN 0x1 /* Enable */ |
3889 | #define nEPPI_EN 0x0 | ||
3890 | #define EPPI_DIR 0x2 /* Direction */ | 3030 | #define EPPI_DIR 0x2 /* Direction */ |
3891 | #define nEPPI_DIR 0x0 | ||
3892 | #define XFR_TYPE 0xc /* Operating Mode */ | 3031 | #define XFR_TYPE 0xc /* Operating Mode */ |
3893 | #define FS_CFG 0x30 /* Frame Sync Configuration */ | 3032 | #define FS_CFG 0x30 /* Frame Sync Configuration */ |
3894 | #define FLD_SEL 0x40 /* Field Select/Trigger */ | 3033 | #define FLD_SEL 0x40 /* Field Select/Trigger */ |
3895 | #define nFLD_SEL 0x0 | ||
3896 | #define ITU_TYPE 0x80 /* ITU Interlaced or Progressive */ | 3034 | #define ITU_TYPE 0x80 /* ITU Interlaced or Progressive */ |
3897 | #define nITU_TYPE 0x0 | ||
3898 | #define BLANKGEN 0x100 /* ITU Output Mode with Internal Blanking Generation */ | 3035 | #define BLANKGEN 0x100 /* ITU Output Mode with Internal Blanking Generation */ |
3899 | #define nBLANKGEN 0x0 | ||
3900 | #define ICLKGEN 0x200 /* Internal Clock Generation */ | 3036 | #define ICLKGEN 0x200 /* Internal Clock Generation */ |
3901 | #define nICLKGEN 0x0 | ||
3902 | #define IFSGEN 0x400 /* Internal Frame Sync Generation */ | 3037 | #define IFSGEN 0x400 /* Internal Frame Sync Generation */ |
3903 | #define nIFSGEN 0x0 | ||
3904 | #define POLC 0x1800 /* Frame Sync and Data Driving/Sampling Edges */ | 3038 | #define POLC 0x1800 /* Frame Sync and Data Driving/Sampling Edges */ |
3905 | #define POLS 0x6000 /* Frame Sync Polarity */ | 3039 | #define POLS 0x6000 /* Frame Sync Polarity */ |
3906 | #define DLENGTH 0x38000 /* Data Length */ | 3040 | #define DLENGTH 0x38000 /* Data Length */ |
3907 | #define SKIP_EN 0x40000 /* Skip Enable */ | 3041 | #define SKIP_EN 0x40000 /* Skip Enable */ |
3908 | #define nSKIP_EN 0x0 | ||
3909 | #define SKIP_EO 0x80000 /* Skip Even or Odd */ | 3042 | #define SKIP_EO 0x80000 /* Skip Even or Odd */ |
3910 | #define nSKIP_EO 0x0 | ||
3911 | #define PACKEN 0x100000 /* Packing/Unpacking Enable */ | 3043 | #define PACKEN 0x100000 /* Packing/Unpacking Enable */ |
3912 | #define nPACKEN 0x0 | ||
3913 | #define SWAPEN 0x200000 /* Swap Enable */ | 3044 | #define SWAPEN 0x200000 /* Swap Enable */ |
3914 | #define nSWAPEN 0x0 | ||
3915 | #define SIGN_EXT 0x400000 /* Sign Extension or Zero-filled / Data Split Format */ | 3045 | #define SIGN_EXT 0x400000 /* Sign Extension or Zero-filled / Data Split Format */ |
3916 | #define nSIGN_EXT 0x0 | ||
3917 | #define SPLT_EVEN_ODD 0x800000 /* Split Even and Odd Data Samples */ | 3046 | #define SPLT_EVEN_ODD 0x800000 /* Split Even and Odd Data Samples */ |
3918 | #define nSPLT_EVEN_ODD 0x0 | ||
3919 | #define SUBSPLT_ODD 0x1000000 /* Sub-split Odd Samples */ | 3047 | #define SUBSPLT_ODD 0x1000000 /* Sub-split Odd Samples */ |
3920 | #define nSUBSPLT_ODD 0x0 | ||
3921 | #define DMACFG 0x2000000 /* One or Two DMA Channels Mode */ | 3048 | #define DMACFG 0x2000000 /* One or Two DMA Channels Mode */ |
3922 | #define nDMACFG 0x0 | ||
3923 | #define RGB_FMT_EN 0x4000000 /* RGB Formatting Enable */ | 3049 | #define RGB_FMT_EN 0x4000000 /* RGB Formatting Enable */ |
3924 | #define nRGB_FMT_EN 0x0 | ||
3925 | #define FIFO_RWM 0x18000000 /* FIFO Regular Watermarks */ | 3050 | #define FIFO_RWM 0x18000000 /* FIFO Regular Watermarks */ |
3926 | #define FIFO_UWM 0x60000000 /* FIFO Urgent Watermarks */ | 3051 | #define FIFO_UWM 0x60000000 /* FIFO Urgent Watermarks */ |
3927 | 3052 | ||
3053 | #define DLEN_8 (0 << 15) /* 000 - 8 bits */ | ||
3054 | #define DLEN_10 (1 << 15) /* 001 - 10 bits */ | ||
3055 | #define DLEN_12 (2 << 15) /* 010 - 12 bits */ | ||
3056 | #define DLEN_14 (3 << 15) /* 011 - 14 bits */ | ||
3057 | #define DLEN_16 (4 << 15) /* 100 - 16 bits */ | ||
3058 | #define DLEN_18 (5 << 15) /* 101 - 18 bits */ | ||
3059 | #define DLEN_24 (6 << 15) /* 110 - 24 bits */ | ||
3060 | |||
3061 | |||
3928 | /* Bit masks for EPPIx_FS2W_LVB */ | 3062 | /* Bit masks for EPPIx_FS2W_LVB */ |
3929 | 3063 | ||
3930 | #define F1VB_BD 0xff /* Vertical Blanking before Field 1 Active Data */ | 3064 | #define F1VB_BD 0xff /* Vertical Blanking before Field 1 Active Data */ |
@@ -3951,60 +3085,36 @@ | |||
3951 | /* Bit masks for SPIx_CTL */ | 3085 | /* Bit masks for SPIx_CTL */ |
3952 | 3086 | ||
3953 | #define SPE 0x4000 /* SPI Enable */ | 3087 | #define SPE 0x4000 /* SPI Enable */ |
3954 | #define nSPE 0x0 | ||
3955 | #define WOM 0x2000 /* Write Open Drain Master */ | 3088 | #define WOM 0x2000 /* Write Open Drain Master */ |
3956 | #define nWOM 0x0 | ||
3957 | #define MSTR 0x1000 /* Master Mode */ | 3089 | #define MSTR 0x1000 /* Master Mode */ |
3958 | #define nMSTR 0x0 | ||
3959 | #define CPOL 0x800 /* Clock Polarity */ | 3090 | #define CPOL 0x800 /* Clock Polarity */ |
3960 | #define nCPOL 0x0 | ||
3961 | #define CPHA 0x400 /* Clock Phase */ | 3091 | #define CPHA 0x400 /* Clock Phase */ |
3962 | #define nCPHA 0x0 | ||
3963 | #define LSBF 0x200 /* LSB First */ | 3092 | #define LSBF 0x200 /* LSB First */ |
3964 | #define nLSBF 0x0 | ||
3965 | #define SIZE 0x100 /* Size of Words */ | 3093 | #define SIZE 0x100 /* Size of Words */ |
3966 | #define nSIZE 0x0 | ||
3967 | #define EMISO 0x20 /* Enable MISO Output */ | 3094 | #define EMISO 0x20 /* Enable MISO Output */ |
3968 | #define nEMISO 0x0 | ||
3969 | #define PSSE 0x10 /* Slave-Select Enable */ | 3095 | #define PSSE 0x10 /* Slave-Select Enable */ |
3970 | #define nPSSE 0x0 | ||
3971 | #define GM 0x8 /* Get More Data */ | 3096 | #define GM 0x8 /* Get More Data */ |
3972 | #define nGM 0x0 | ||
3973 | #define SZ 0x4 /* Send Zero */ | 3097 | #define SZ 0x4 /* Send Zero */ |
3974 | #define nSZ 0x0 | ||
3975 | #define TIMOD 0x3 /* Transfer Initiation Mode */ | 3098 | #define TIMOD 0x3 /* Transfer Initiation Mode */ |
3976 | 3099 | ||
3977 | /* Bit masks for SPIx_FLG */ | 3100 | /* Bit masks for SPIx_FLG */ |
3978 | 3101 | ||
3979 | #define FLS1 0x2 /* Slave Select Enable 1 */ | 3102 | #define FLS1 0x2 /* Slave Select Enable 1 */ |
3980 | #define nFLS1 0x0 | ||
3981 | #define FLS2 0x4 /* Slave Select Enable 2 */ | 3103 | #define FLS2 0x4 /* Slave Select Enable 2 */ |
3982 | #define nFLS2 0x0 | ||
3983 | #define FLS3 0x8 /* Slave Select Enable 3 */ | 3104 | #define FLS3 0x8 /* Slave Select Enable 3 */ |
3984 | #define nFLS3 0x0 | ||
3985 | #define FLG1 0x200 /* Slave Select Value 1 */ | 3105 | #define FLG1 0x200 /* Slave Select Value 1 */ |
3986 | #define nFLG1 0x0 | ||
3987 | #define FLG2 0x400 /* Slave Select Value 2 */ | 3106 | #define FLG2 0x400 /* Slave Select Value 2 */ |
3988 | #define nFLG2 0x0 | ||
3989 | #define FLG3 0x800 /* Slave Select Value 3 */ | 3107 | #define FLG3 0x800 /* Slave Select Value 3 */ |
3990 | #define nFLG3 0x0 | ||
3991 | 3108 | ||
3992 | /* Bit masks for SPIx_STAT */ | 3109 | /* Bit masks for SPIx_STAT */ |
3993 | 3110 | ||
3994 | #define TXCOL 0x40 /* Transmit Collision Error */ | 3111 | #define TXCOL 0x40 /* Transmit Collision Error */ |
3995 | #define nTXCOL 0x0 | ||
3996 | #define RXS 0x20 /* RDBR Data Buffer Status */ | 3112 | #define RXS 0x20 /* RDBR Data Buffer Status */ |
3997 | #define nRXS 0x0 | ||
3998 | #define RBSY 0x10 /* Receive Error */ | 3113 | #define RBSY 0x10 /* Receive Error */ |
3999 | #define nRBSY 0x0 | ||
4000 | #define TXS 0x8 /* TDBR Data Buffer Status */ | 3114 | #define TXS 0x8 /* TDBR Data Buffer Status */ |
4001 | #define nTXS 0x0 | ||
4002 | #define TXE 0x4 /* Transmission Error */ | 3115 | #define TXE 0x4 /* Transmission Error */ |
4003 | #define nTXE 0x0 | ||
4004 | #define MODF 0x2 /* Mode Fault Error */ | 3116 | #define MODF 0x2 /* Mode Fault Error */ |
4005 | #define nMODF 0x0 | ||
4006 | #define SPIF 0x1 /* SPI Finished */ | 3117 | #define SPIF 0x1 /* SPI Finished */ |
4007 | #define nSPIF 0x0 | ||
4008 | 3118 | ||
4009 | /* Bit masks for SPIx_TDBR */ | 3119 | /* Bit masks for SPIx_TDBR */ |
4010 | 3120 | ||
@@ -4028,9 +3138,7 @@ | |||
4028 | 3138 | ||
4029 | #define PRESCALE 0x7f /* Prescale Value */ | 3139 | #define PRESCALE 0x7f /* Prescale Value */ |
4030 | #define TWI_ENA 0x80 /* TWI Enable */ | 3140 | #define TWI_ENA 0x80 /* TWI Enable */ |
4031 | #define nTWI_ENA 0x0 | ||
4032 | #define SCCB 0x200 /* Serial Camera Control Bus */ | 3141 | #define SCCB 0x200 /* Serial Camera Control Bus */ |
4033 | #define nSCCB 0x0 | ||
4034 | 3142 | ||
4035 | /* Bit maskes for TWIx_CLKDIV */ | 3143 | /* Bit maskes for TWIx_CLKDIV */ |
4036 | 3144 | ||
@@ -4040,13 +3148,9 @@ | |||
4040 | /* Bit maskes for TWIx_SLAVE_CTL */ | 3148 | /* Bit maskes for TWIx_SLAVE_CTL */ |
4041 | 3149 | ||
4042 | #define SEN 0x1 /* Slave Enable */ | 3150 | #define SEN 0x1 /* Slave Enable */ |
4043 | #define nSEN 0x0 | ||
4044 | #define STDVAL 0x4 /* Slave Transmit Data Valid */ | 3151 | #define STDVAL 0x4 /* Slave Transmit Data Valid */ |
4045 | #define nSTDVAL 0x0 | ||
4046 | #define NAK 0x8 /* Not Acknowledge */ | 3152 | #define NAK 0x8 /* Not Acknowledge */ |
4047 | #define nNAK 0x0 | ||
4048 | #define GEN 0x10 /* General Call Enable */ | 3153 | #define GEN 0x10 /* General Call Enable */ |
4049 | #define nGEN 0x0 | ||
4050 | 3154 | ||
4051 | /* Bit maskes for TWIx_SLAVE_ADDR */ | 3155 | /* Bit maskes for TWIx_SLAVE_ADDR */ |
4052 | 3156 | ||
@@ -4055,27 +3159,18 @@ | |||
4055 | /* Bit maskes for TWIx_SLAVE_STAT */ | 3159 | /* Bit maskes for TWIx_SLAVE_STAT */ |
4056 | 3160 | ||
4057 | #define SDIR 0x1 /* Slave Transfer Direction */ | 3161 | #define SDIR 0x1 /* Slave Transfer Direction */ |
4058 | #define nSDIR 0x0 | ||
4059 | #define GCALL 0x2 /* General Call */ | 3162 | #define GCALL 0x2 /* General Call */ |
4060 | #define nGCALL 0x0 | ||
4061 | 3163 | ||
4062 | /* Bit maskes for TWIx_MASTER_CTL */ | 3164 | /* Bit maskes for TWIx_MASTER_CTL */ |
4063 | 3165 | ||
4064 | #define MEN 0x1 /* Master Mode Enable */ | 3166 | #define MEN 0x1 /* Master Mode Enable */ |
4065 | #define nMEN 0x0 | ||
4066 | #define MDIR 0x4 /* Master Transfer Direction */ | 3167 | #define MDIR 0x4 /* Master Transfer Direction */ |
4067 | #define nMDIR 0x0 | ||
4068 | #define FAST 0x8 /* Fast Mode */ | 3168 | #define FAST 0x8 /* Fast Mode */ |
4069 | #define nFAST 0x0 | ||
4070 | #define STOP 0x10 /* Issue Stop Condition */ | 3169 | #define STOP 0x10 /* Issue Stop Condition */ |
4071 | #define nSTOP 0x0 | ||
4072 | #define RSTART 0x20 /* Repeat Start */ | 3170 | #define RSTART 0x20 /* Repeat Start */ |
4073 | #define nRSTART 0x0 | ||
4074 | #define DCNT 0x3fc0 /* Data Transfer Count */ | 3171 | #define DCNT 0x3fc0 /* Data Transfer Count */ |
4075 | #define SDAOVR 0x4000 /* Serial Data Override */ | 3172 | #define SDAOVR 0x4000 /* Serial Data Override */ |
4076 | #define nSDAOVR 0x0 | ||
4077 | #define SCLOVR 0x8000 /* Serial Clock Override */ | 3173 | #define SCLOVR 0x8000 /* Serial Clock Override */ |
4078 | #define nSCLOVR 0x0 | ||
4079 | 3174 | ||
4080 | /* Bit maskes for TWIx_MASTER_ADDR */ | 3175 | /* Bit maskes for TWIx_MASTER_ADDR */ |
4081 | 3176 | ||
@@ -4084,34 +3179,21 @@ | |||
4084 | /* Bit maskes for TWIx_MASTER_STAT */ | 3179 | /* Bit maskes for TWIx_MASTER_STAT */ |
4085 | 3180 | ||
4086 | #define MPROG 0x1 /* Master Transfer in Progress */ | 3181 | #define MPROG 0x1 /* Master Transfer in Progress */ |
4087 | #define nMPROG 0x0 | ||
4088 | #define LOSTARB 0x2 /* Lost Arbitration */ | 3182 | #define LOSTARB 0x2 /* Lost Arbitration */ |
4089 | #define nLOSTARB 0x0 | ||
4090 | #define ANAK 0x4 /* Address Not Acknowledged */ | 3183 | #define ANAK 0x4 /* Address Not Acknowledged */ |
4091 | #define nANAK 0x0 | ||
4092 | #define DNAK 0x8 /* Data Not Acknowledged */ | 3184 | #define DNAK 0x8 /* Data Not Acknowledged */ |
4093 | #define nDNAK 0x0 | ||
4094 | #define BUFRDERR 0x10 /* Buffer Read Error */ | 3185 | #define BUFRDERR 0x10 /* Buffer Read Error */ |
4095 | #define nBUFRDERR 0x0 | ||
4096 | #define BUFWRERR 0x20 /* Buffer Write Error */ | 3186 | #define BUFWRERR 0x20 /* Buffer Write Error */ |
4097 | #define nBUFWRERR 0x0 | ||
4098 | #define SDASEN 0x40 /* Serial Data Sense */ | 3187 | #define SDASEN 0x40 /* Serial Data Sense */ |
4099 | #define nSDASEN 0x0 | ||
4100 | #define SCLSEN 0x80 /* Serial Clock Sense */ | 3188 | #define SCLSEN 0x80 /* Serial Clock Sense */ |
4101 | #define nSCLSEN 0x0 | ||
4102 | #define BUSBUSY 0x100 /* Bus Busy */ | 3189 | #define BUSBUSY 0x100 /* Bus Busy */ |
4103 | #define nBUSBUSY 0x0 | ||
4104 | 3190 | ||
4105 | /* Bit maskes for TWIx_FIFO_CTL */ | 3191 | /* Bit maskes for TWIx_FIFO_CTL */ |
4106 | 3192 | ||
4107 | #define XMTFLUSH 0x1 /* Transmit Buffer Flush */ | 3193 | #define XMTFLUSH 0x1 /* Transmit Buffer Flush */ |
4108 | #define nXMTFLUSH 0x0 | ||
4109 | #define RCVFLUSH 0x2 /* Receive Buffer Flush */ | 3194 | #define RCVFLUSH 0x2 /* Receive Buffer Flush */ |
4110 | #define nRCVFLUSH 0x0 | ||
4111 | #define XMTINTLEN 0x4 /* Transmit Buffer Interrupt Length */ | 3195 | #define XMTINTLEN 0x4 /* Transmit Buffer Interrupt Length */ |
4112 | #define nXMTINTLEN 0x0 | ||
4113 | #define RCVINTLEN 0x8 /* Receive Buffer Interrupt Length */ | 3196 | #define RCVINTLEN 0x8 /* Receive Buffer Interrupt Length */ |
4114 | #define nRCVINTLEN 0x0 | ||
4115 | 3197 | ||
4116 | /* Bit maskes for TWIx_FIFO_STAT */ | 3198 | /* Bit maskes for TWIx_FIFO_STAT */ |
4117 | 3199 | ||
@@ -4121,40 +3203,24 @@ | |||
4121 | /* Bit maskes for TWIx_INT_MASK */ | 3203 | /* Bit maskes for TWIx_INT_MASK */ |
4122 | 3204 | ||
4123 | #define SINITM 0x1 /* Slave Transfer Initiated Interrupt Mask */ | 3205 | #define SINITM 0x1 /* Slave Transfer Initiated Interrupt Mask */ |
4124 | #define nSINITM 0x0 | ||
4125 | #define SCOMPM 0x2 /* Slave Transfer Complete Interrupt Mask */ | 3206 | #define SCOMPM 0x2 /* Slave Transfer Complete Interrupt Mask */ |
4126 | #define nSCOMPM 0x0 | ||
4127 | #define SERRM 0x4 /* Slave Transfer Error Interrupt Mask */ | 3207 | #define SERRM 0x4 /* Slave Transfer Error Interrupt Mask */ |
4128 | #define nSERRM 0x0 | ||
4129 | #define SOVFM 0x8 /* Slave Overflow Interrupt Mask */ | 3208 | #define SOVFM 0x8 /* Slave Overflow Interrupt Mask */ |
4130 | #define nSOVFM 0x0 | ||
4131 | #define MCOMPM 0x10 /* Master Transfer Complete Interrupt Mask */ | 3209 | #define MCOMPM 0x10 /* Master Transfer Complete Interrupt Mask */ |
4132 | #define nMCOMPM 0x0 | ||
4133 | #define MERRM 0x20 /* Master Transfer Error Interrupt Mask */ | 3210 | #define MERRM 0x20 /* Master Transfer Error Interrupt Mask */ |
4134 | #define nMERRM 0x0 | ||
4135 | #define XMTSERVM 0x40 /* Transmit FIFO Service Interrupt Mask */ | 3211 | #define XMTSERVM 0x40 /* Transmit FIFO Service Interrupt Mask */ |
4136 | #define nXMTSERVM 0x0 | ||
4137 | #define RCVSERVM 0x80 /* Receive FIFO Service Interrupt Mask */ | 3212 | #define RCVSERVM 0x80 /* Receive FIFO Service Interrupt Mask */ |
4138 | #define nRCVSERVM 0x0 | ||
4139 | 3213 | ||
4140 | /* Bit maskes for TWIx_INT_STAT */ | 3214 | /* Bit maskes for TWIx_INT_STAT */ |
4141 | 3215 | ||
4142 | #define SINIT 0x1 /* Slave Transfer Initiated */ | 3216 | #define SINIT 0x1 /* Slave Transfer Initiated */ |
4143 | #define nSINIT 0x0 | ||
4144 | #define SCOMP 0x2 /* Slave Transfer Complete */ | 3217 | #define SCOMP 0x2 /* Slave Transfer Complete */ |
4145 | #define nSCOMP 0x0 | ||
4146 | #define SERR 0x4 /* Slave Transfer Error */ | 3218 | #define SERR 0x4 /* Slave Transfer Error */ |
4147 | #define nSERR 0x0 | ||
4148 | #define SOVF 0x8 /* Slave Overflow */ | 3219 | #define SOVF 0x8 /* Slave Overflow */ |
4149 | #define nSOVF 0x0 | ||
4150 | #define MCOMP 0x10 /* Master Transfer Complete */ | 3220 | #define MCOMP 0x10 /* Master Transfer Complete */ |
4151 | #define nMCOMP 0x0 | ||
4152 | #define MERR 0x20 /* Master Transfer Error */ | 3221 | #define MERR 0x20 /* Master Transfer Error */ |
4153 | #define nMERR 0x0 | ||
4154 | #define XMTSERV 0x40 /* Transmit FIFO Service */ | 3222 | #define XMTSERV 0x40 /* Transmit FIFO Service */ |
4155 | #define nXMTSERV 0x0 | ||
4156 | #define RCVSERV 0x80 /* Receive FIFO Service */ | 3223 | #define RCVSERV 0x80 /* Receive FIFO Service */ |
4157 | #define nRCVSERV 0x0 | ||
4158 | 3224 | ||
4159 | /* Bit maskes for TWIx_XMT_DATA8 */ | 3225 | /* Bit maskes for TWIx_XMT_DATA8 */ |
4160 | 3226 | ||
@@ -4175,81 +3241,51 @@ | |||
4175 | /* Bit masks for SPORTx_TCR1 */ | 3241 | /* Bit masks for SPORTx_TCR1 */ |
4176 | 3242 | ||
4177 | #define TCKFE 0x4000 /* Clock Falling Edge Select */ | 3243 | #define TCKFE 0x4000 /* Clock Falling Edge Select */ |
4178 | #define nTCKFE 0x0 | ||
4179 | #define LATFS 0x2000 /* Late Transmit Frame Sync */ | 3244 | #define LATFS 0x2000 /* Late Transmit Frame Sync */ |
4180 | #define nLATFS 0x0 | ||
4181 | #define LTFS 0x1000 /* Low Transmit Frame Sync Select */ | 3245 | #define LTFS 0x1000 /* Low Transmit Frame Sync Select */ |
4182 | #define nLTFS 0x0 | ||
4183 | #define DITFS 0x800 /* Data-Independent Transmit Frame Sync Select */ | 3246 | #define DITFS 0x800 /* Data-Independent Transmit Frame Sync Select */ |
4184 | #define nDITFS 0x0 | ||
4185 | #define TFSR 0x400 /* Transmit Frame Sync Required Select */ | 3247 | #define TFSR 0x400 /* Transmit Frame Sync Required Select */ |
4186 | #define nTFSR 0x0 | ||
4187 | #define ITFS 0x200 /* Internal Transmit Frame Sync Select */ | 3248 | #define ITFS 0x200 /* Internal Transmit Frame Sync Select */ |
4188 | #define nITFS 0x0 | ||
4189 | #define TLSBIT 0x10 /* Transmit Bit Order */ | 3249 | #define TLSBIT 0x10 /* Transmit Bit Order */ |
4190 | #define nTLSBIT 0x0 | ||
4191 | #define TDTYPE 0xc /* Data Formatting Type Select */ | 3250 | #define TDTYPE 0xc /* Data Formatting Type Select */ |
4192 | #define ITCLK 0x2 /* Internal Transmit Clock Select */ | 3251 | #define ITCLK 0x2 /* Internal Transmit Clock Select */ |
4193 | #define nITCLK 0x0 | ||
4194 | #define TSPEN 0x1 /* Transmit Enable */ | 3252 | #define TSPEN 0x1 /* Transmit Enable */ |
4195 | #define nTSPEN 0x0 | ||
4196 | 3253 | ||
4197 | /* Bit masks for SPORTx_TCR2 */ | 3254 | /* Bit masks for SPORTx_TCR2 */ |
4198 | 3255 | ||
4199 | #define TRFST 0x400 /* Left/Right Order */ | 3256 | #define TRFST 0x400 /* Left/Right Order */ |
4200 | #define nTRFST 0x0 | ||
4201 | #define TSFSE 0x200 /* Transmit Stereo Frame Sync Enable */ | 3257 | #define TSFSE 0x200 /* Transmit Stereo Frame Sync Enable */ |
4202 | #define nTSFSE 0x0 | ||
4203 | #define TXSE 0x100 /* TxSEC Enable */ | 3258 | #define TXSE 0x100 /* TxSEC Enable */ |
4204 | #define nTXSE 0x0 | ||
4205 | #define SLEN_T 0x1f /* SPORT Word Length */ | 3259 | #define SLEN_T 0x1f /* SPORT Word Length */ |
4206 | 3260 | ||
4207 | /* Bit masks for SPORTx_RCR1 */ | 3261 | /* Bit masks for SPORTx_RCR1 */ |
4208 | 3262 | ||
4209 | #define RCKFE 0x4000 /* Clock Falling Edge Select */ | 3263 | #define RCKFE 0x4000 /* Clock Falling Edge Select */ |
4210 | #define nRCKFE 0x0 | ||
4211 | #define LARFS 0x2000 /* Late Receive Frame Sync */ | 3264 | #define LARFS 0x2000 /* Late Receive Frame Sync */ |
4212 | #define nLARFS 0x0 | ||
4213 | #define LRFS 0x1000 /* Low Receive Frame Sync Select */ | 3265 | #define LRFS 0x1000 /* Low Receive Frame Sync Select */ |
4214 | #define nLRFS 0x0 | ||
4215 | #define RFSR 0x400 /* Receive Frame Sync Required Select */ | 3266 | #define RFSR 0x400 /* Receive Frame Sync Required Select */ |
4216 | #define nRFSR 0x0 | ||
4217 | #define IRFS 0x200 /* Internal Receive Frame Sync Select */ | 3267 | #define IRFS 0x200 /* Internal Receive Frame Sync Select */ |
4218 | #define nIRFS 0x0 | ||
4219 | #define RLSBIT 0x10 /* Receive Bit Order */ | 3268 | #define RLSBIT 0x10 /* Receive Bit Order */ |
4220 | #define nRLSBIT 0x0 | ||
4221 | #define RDTYPE 0xc /* Data Formatting Type Select */ | 3269 | #define RDTYPE 0xc /* Data Formatting Type Select */ |
4222 | #define IRCLK 0x2 /* Internal Receive Clock Select */ | 3270 | #define IRCLK 0x2 /* Internal Receive Clock Select */ |
4223 | #define nIRCLK 0x0 | ||
4224 | #define RSPEN 0x1 /* Receive Enable */ | 3271 | #define RSPEN 0x1 /* Receive Enable */ |
4225 | #define nRSPEN 0x0 | ||
4226 | 3272 | ||
4227 | /* Bit masks for SPORTx_RCR2 */ | 3273 | /* Bit masks for SPORTx_RCR2 */ |
4228 | 3274 | ||
4229 | #define RRFST 0x400 /* Left/Right Order */ | 3275 | #define RRFST 0x400 /* Left/Right Order */ |
4230 | #define nRRFST 0x0 | ||
4231 | #define RSFSE 0x200 /* Receive Stereo Frame Sync Enable */ | 3276 | #define RSFSE 0x200 /* Receive Stereo Frame Sync Enable */ |
4232 | #define nRSFSE 0x0 | ||
4233 | #define RXSE 0x100 /* RxSEC Enable */ | 3277 | #define RXSE 0x100 /* RxSEC Enable */ |
4234 | #define nRXSE 0x0 | ||
4235 | #define SLEN_R 0x1f /* SPORT Word Length */ | 3278 | #define SLEN_R 0x1f /* SPORT Word Length */ |
4236 | 3279 | ||
4237 | /* Bit masks for SPORTx_STAT */ | 3280 | /* Bit masks for SPORTx_STAT */ |
4238 | 3281 | ||
4239 | #define TXHRE 0x40 /* Transmit Hold Register Empty */ | 3282 | #define TXHRE 0x40 /* Transmit Hold Register Empty */ |
4240 | #define nTXHRE 0x0 | ||
4241 | #define TOVF 0x20 /* Sticky Transmit Overflow Status */ | 3283 | #define TOVF 0x20 /* Sticky Transmit Overflow Status */ |
4242 | #define nTOVF 0x0 | ||
4243 | #define TUVF 0x10 /* Sticky Transmit Underflow Status */ | 3284 | #define TUVF 0x10 /* Sticky Transmit Underflow Status */ |
4244 | #define nTUVF 0x0 | ||
4245 | #define TXF 0x8 /* Transmit FIFO Full Status */ | 3285 | #define TXF 0x8 /* Transmit FIFO Full Status */ |
4246 | #define nTXF 0x0 | ||
4247 | #define ROVF 0x4 /* Sticky Receive Overflow Status */ | 3286 | #define ROVF 0x4 /* Sticky Receive Overflow Status */ |
4248 | #define nROVF 0x0 | ||
4249 | #define RUVF 0x2 /* Sticky Receive Underflow Status */ | 3287 | #define RUVF 0x2 /* Sticky Receive Underflow Status */ |
4250 | #define nRUVF 0x0 | ||
4251 | #define RXNE 0x1 /* Receive FIFO Not Empty Status */ | 3288 | #define RXNE 0x1 /* Receive FIFO Not Empty Status */ |
4252 | #define nRXNE 0x0 | ||
4253 | 3289 | ||
4254 | /* Bit masks for SPORTx_MCMC1 */ | 3290 | /* Bit masks for SPORTx_MCMC1 */ |
4255 | 3291 | ||
@@ -4260,13 +3296,9 @@ | |||
4260 | 3296 | ||
4261 | #define MFD 0xf000 /* Multi channel Frame Delay */ | 3297 | #define MFD 0xf000 /* Multi channel Frame Delay */ |
4262 | #define FSDR 0x80 /* Frame Sync to Data Relationship */ | 3298 | #define FSDR 0x80 /* Frame Sync to Data Relationship */ |
4263 | #define nFSDR 0x0 | ||
4264 | #define MCMEM 0x10 /* Multi channel Frame Mode Enable */ | 3299 | #define MCMEM 0x10 /* Multi channel Frame Mode Enable */ |
4265 | #define nMCMEM 0x0 | ||
4266 | #define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */ | 3300 | #define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */ |
4267 | #define nMCDRXPE 0x0 | ||
4268 | #define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */ | 3301 | #define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */ |
4269 | #define nMCDTXPE 0x0 | ||
4270 | #define MCCRM 0x3 /* 2X Clock Recovery Mode */ | 3302 | #define MCCRM 0x3 /* 2X Clock Recovery Mode */ |
4271 | 3303 | ||
4272 | /* Bit masks for SPORTx_CHNL */ | 3304 | /* Bit masks for SPORTx_CHNL */ |
@@ -4280,115 +3312,59 @@ | |||
4280 | #define WLS 0x3 /* Word Length Select */ | 3312 | #define WLS 0x3 /* Word Length Select */ |
4281 | #endif | 3313 | #endif |
4282 | #define STB 0x4 /* Stop Bits */ | 3314 | #define STB 0x4 /* Stop Bits */ |
4283 | #define nSTB 0x0 | ||
4284 | #define PEN 0x8 /* Parity Enable */ | 3315 | #define PEN 0x8 /* Parity Enable */ |
4285 | #define nPEN 0x0 | ||
4286 | #define EPS 0x10 /* Even Parity Select */ | 3316 | #define EPS 0x10 /* Even Parity Select */ |
4287 | #define nEPS 0x0 | ||
4288 | #define STP 0x20 /* Sticky Parity */ | 3317 | #define STP 0x20 /* Sticky Parity */ |
4289 | #define nSTP 0x0 | ||
4290 | #define SB 0x40 /* Set Break */ | 3318 | #define SB 0x40 /* Set Break */ |
4291 | #define nSB 0x0 | ||
4292 | 3319 | ||
4293 | /* Bit masks for UARTx_MCR */ | 3320 | /* Bit masks for UARTx_MCR */ |
4294 | 3321 | ||
4295 | #define XOFF 0x1 /* Transmitter Off */ | 3322 | #define XOFF 0x1 /* Transmitter Off */ |
4296 | #define nXOFF 0x0 | ||
4297 | #define MRTS 0x2 /* Manual Request To Send */ | 3323 | #define MRTS 0x2 /* Manual Request To Send */ |
4298 | #define nMRTS 0x0 | ||
4299 | #define RFIT 0x4 /* Receive FIFO IRQ Threshold */ | 3324 | #define RFIT 0x4 /* Receive FIFO IRQ Threshold */ |
4300 | #define nRFIT 0x0 | ||
4301 | #define RFRT 0x8 /* Receive FIFO RTS Threshold */ | 3325 | #define RFRT 0x8 /* Receive FIFO RTS Threshold */ |
4302 | #define nRFRT 0x0 | ||
4303 | #define LOOP_ENA 0x10 /* Loopback Mode Enable */ | 3326 | #define LOOP_ENA 0x10 /* Loopback Mode Enable */ |
4304 | #define nLOOP_ENA 0x0 | ||
4305 | #define FCPOL 0x20 /* Flow Control Pin Polarity */ | 3327 | #define FCPOL 0x20 /* Flow Control Pin Polarity */ |
4306 | #define nFCPOL 0x0 | ||
4307 | #define ARTS 0x40 /* Automatic Request To Send */ | 3328 | #define ARTS 0x40 /* Automatic Request To Send */ |
4308 | #define nARTS 0x0 | ||
4309 | #define ACTS 0x80 /* Automatic Clear To Send */ | 3329 | #define ACTS 0x80 /* Automatic Clear To Send */ |
4310 | #define nACTS 0x0 | ||
4311 | 3330 | ||
4312 | /* Bit masks for UARTx_LSR */ | 3331 | /* Bit masks for UARTx_LSR */ |
4313 | 3332 | ||
4314 | #define DR 0x1 /* Data Ready */ | 3333 | #define DR 0x1 /* Data Ready */ |
4315 | #define nDR 0x0 | ||
4316 | #define OE 0x2 /* Overrun Error */ | 3334 | #define OE 0x2 /* Overrun Error */ |
4317 | #define nOE 0x0 | ||
4318 | #define PE 0x4 /* Parity Error */ | 3335 | #define PE 0x4 /* Parity Error */ |
4319 | #define nPE 0x0 | ||
4320 | #define FE 0x8 /* Framing Error */ | 3336 | #define FE 0x8 /* Framing Error */ |
4321 | #define nFE 0x0 | ||
4322 | #define BI 0x10 /* Break Interrupt */ | 3337 | #define BI 0x10 /* Break Interrupt */ |
4323 | #define nBI 0x0 | ||
4324 | #define THRE 0x20 /* THR Empty */ | 3338 | #define THRE 0x20 /* THR Empty */ |
4325 | #define nTHRE 0x0 | ||
4326 | #define TEMT 0x40 /* Transmitter Empty */ | 3339 | #define TEMT 0x40 /* Transmitter Empty */ |
4327 | #define nTEMT 0x0 | ||
4328 | #define TFI 0x80 /* Transmission Finished Indicator */ | 3340 | #define TFI 0x80 /* Transmission Finished Indicator */ |
4329 | #define nTFI 0x0 | ||
4330 | 3341 | ||
4331 | /* Bit masks for UARTx_MSR */ | 3342 | /* Bit masks for UARTx_MSR */ |
4332 | 3343 | ||
4333 | #define SCTS 0x1 /* Sticky CTS */ | 3344 | #define SCTS 0x1 /* Sticky CTS */ |
4334 | #define nSCTS 0x0 | ||
4335 | #define CTS 0x10 /* Clear To Send */ | 3345 | #define CTS 0x10 /* Clear To Send */ |
4336 | #define nCTS 0x0 | ||
4337 | #define RFCS 0x20 /* Receive FIFO Count Status */ | 3346 | #define RFCS 0x20 /* Receive FIFO Count Status */ |
4338 | #define nRFCS 0x0 | 3347 | |
4339 | 3348 | /* Bit masks for UARTx_IER_SET & UARTx_IER_CLEAR */ | |
4340 | /* Bit masks for UARTx_IER_SET */ | 3349 | |
4341 | 3350 | #define ERBFI 0x1 /* Enable Receive Buffer Full Interrupt */ | |
4342 | #define ERBFI_S 0x1 /* Enable Receive Buffer Full Interrupt */ | 3351 | #define ETBEI 0x2 /* Enable Transmit Buffer Empty Interrupt */ |
4343 | #define nERBFI_S 0x0 | 3352 | #define ELSI 0x4 /* Enable Receive Status Interrupt */ |
4344 | #define ETBEI_S 0x2 /* Enable Transmit Buffer Empty Interrupt */ | 3353 | #define EDSSI 0x8 /* Enable Modem Status Interrupt */ |
4345 | #define nETBEI_S 0x0 | 3354 | #define EDTPTI 0x10 /* Enable DMA Transmit PIRQ Interrupt */ |
4346 | #define ELSI_S 0x4 /* Enable Receive Status Interrupt */ | 3355 | #define ETFI 0x20 /* Enable Transmission Finished Interrupt */ |
4347 | #define nELSI_S 0x0 | 3356 | #define ERFCI 0x40 /* Enable Receive FIFO Count Interrupt */ |
4348 | #define EDSSI_S 0x8 /* Enable Modem Status Interrupt */ | ||
4349 | #define nEDSSI_S 0x0 | ||
4350 | #define EDTPTI_S 0x10 /* Enable DMA Transmit PIRQ Interrupt */ | ||
4351 | #define nEDTPTI_S 0x0 | ||
4352 | #define ETFI_S 0x20 /* Enable Transmission Finished Interrupt */ | ||
4353 | #define nETFI_S 0x0 | ||
4354 | #define ERFCI_S 0x40 /* Enable Receive FIFO Count Interrupt */ | ||
4355 | #define nERFCI_S 0x0 | ||
4356 | |||
4357 | /* Bit masks for UARTx_IER_CLEAR */ | ||
4358 | |||
4359 | #define ERBFI_C 0x1 /* Enable Receive Buffer Full Interrupt */ | ||
4360 | #define nERBFI_C 0x0 | ||
4361 | #define ETBEI_C 0x2 /* Enable Transmit Buffer Empty Interrupt */ | ||
4362 | #define nETBEI_C 0x0 | ||
4363 | #define ELSI_C 0x4 /* Enable Receive Status Interrupt */ | ||
4364 | #define nELSI_C 0x0 | ||
4365 | #define EDSSI_C 0x8 /* Enable Modem Status Interrupt */ | ||
4366 | #define nEDSSI_C 0x0 | ||
4367 | #define EDTPTI_C 0x10 /* Enable DMA Transmit PIRQ Interrupt */ | ||
4368 | #define nEDTPTI_C 0x0 | ||
4369 | #define ETFI_C 0x20 /* Enable Transmission Finished Interrupt */ | ||
4370 | #define nETFI_C 0x0 | ||
4371 | #define ERFCI_C 0x40 /* Enable Receive FIFO Count Interrupt */ | ||
4372 | #define nERFCI_C 0x0 | ||
4373 | 3357 | ||
4374 | /* Bit masks for UARTx_GCTL */ | 3358 | /* Bit masks for UARTx_GCTL */ |
4375 | 3359 | ||
4376 | #define UCEN 0x1 /* UART Enable */ | 3360 | #define UCEN 0x1 /* UART Enable */ |
4377 | #define nUCEN 0x0 | ||
4378 | #define IREN 0x2 /* IrDA Mode Enable */ | 3361 | #define IREN 0x2 /* IrDA Mode Enable */ |
4379 | #define nIREN 0x0 | ||
4380 | #define TPOLC 0x4 /* IrDA TX Polarity Change */ | 3362 | #define TPOLC 0x4 /* IrDA TX Polarity Change */ |
4381 | #define nTPOLC 0x0 | ||
4382 | #define RPOLC 0x8 /* IrDA RX Polarity Change */ | 3363 | #define RPOLC 0x8 /* IrDA RX Polarity Change */ |
4383 | #define nRPOLC 0x0 | ||
4384 | #define FPE 0x10 /* Force Parity Error */ | 3364 | #define FPE 0x10 /* Force Parity Error */ |
4385 | #define nFPE 0x0 | ||
4386 | #define FFE 0x20 /* Force Framing Error */ | 3365 | #define FFE 0x20 /* Force Framing Error */ |
4387 | #define nFFE 0x0 | ||
4388 | #define EDBO 0x40 /* Enable Divide-by-One */ | 3366 | #define EDBO 0x40 /* Enable Divide-by-One */ |
4389 | #define nEDBO 0x0 | ||
4390 | #define EGLSI 0x80 /* Enable Global LS Interrupt */ | 3367 | #define EGLSI 0x80 /* Enable Global LS Interrupt */ |
4391 | #define nEGLSI 0x0 | ||
4392 | 3368 | ||
4393 | 3369 | ||
4394 | /* ******************************************* */ | 3370 | /* ******************************************* */ |
@@ -4398,32 +3374,32 @@ | |||
4398 | /* BCODE bit field options (SYSCFG register) */ | 3374 | /* BCODE bit field options (SYSCFG register) */ |
4399 | 3375 | ||
4400 | #define BCODE_WAKEUP 0x0000 /* boot according to wake-up condition */ | 3376 | #define BCODE_WAKEUP 0x0000 /* boot according to wake-up condition */ |
4401 | #define BCODE_FULLBOOT 0x0010 /* always perform full boot */ | 3377 | #define BCODE_FULLBOOT 0x0010 /* always perform full boot */ |
4402 | #define BCODE_QUICKBOOT 0x0020 /* always perform quick boot */ | 3378 | #define BCODE_QUICKBOOT 0x0020 /* always perform quick boot */ |
4403 | #define BCODE_NOBOOT 0x0030 /* always perform full boot */ | 3379 | #define BCODE_NOBOOT 0x0030 /* always perform full boot */ |
4404 | 3380 | ||
4405 | /* CNT_COMMAND bit field options */ | 3381 | /* CNT_COMMAND bit field options */ |
4406 | 3382 | ||
4407 | #define W1LCNT_ZERO 0x0001 /* write 1 to load CNT_COUNTER with zero */ | 3383 | #define W1LCNT_ZERO 0x0001 /* write 1 to load CNT_COUNTER with zero */ |
4408 | #define W1LCNT_MIN 0x0004 /* write 1 to load CNT_COUNTER from CNT_MIN */ | 3384 | #define W1LCNT_MIN 0x0004 /* write 1 to load CNT_COUNTER from CNT_MIN */ |
4409 | #define W1LCNT_MAX 0x0008 /* write 1 to load CNT_COUNTER from CNT_MAX */ | 3385 | #define W1LCNT_MAX 0x0008 /* write 1 to load CNT_COUNTER from CNT_MAX */ |
4410 | 3386 | ||
4411 | #define W1LMIN_ZERO 0x0010 /* write 1 to load CNT_MIN with zero */ | 3387 | #define W1LMIN_ZERO 0x0010 /* write 1 to load CNT_MIN with zero */ |
4412 | #define W1LMIN_CNT 0x0020 /* write 1 to load CNT_MIN from CNT_COUNTER */ | 3388 | #define W1LMIN_CNT 0x0020 /* write 1 to load CNT_MIN from CNT_COUNTER */ |
4413 | #define W1LMIN_MAX 0x0080 /* write 1 to load CNT_MIN from CNT_MAX */ | 3389 | #define W1LMIN_MAX 0x0080 /* write 1 to load CNT_MIN from CNT_MAX */ |
4414 | 3390 | ||
4415 | #define W1LMAX_ZERO 0x0100 /* write 1 to load CNT_MAX with zero */ | 3391 | #define W1LMAX_ZERO 0x0100 /* write 1 to load CNT_MAX with zero */ |
4416 | #define W1LMAX_CNT 0x0200 /* write 1 to load CNT_MAX from CNT_COUNTER */ | 3392 | #define W1LMAX_CNT 0x0200 /* write 1 to load CNT_MAX from CNT_COUNTER */ |
4417 | #define W1LMAX_MIN 0x0400 /* write 1 to load CNT_MAX from CNT_MIN */ | 3393 | #define W1LMAX_MIN 0x0400 /* write 1 to load CNT_MAX from CNT_MIN */ |
4418 | 3394 | ||
4419 | /* CNT_CONFIG bit field options */ | 3395 | /* CNT_CONFIG bit field options */ |
4420 | 3396 | ||
4421 | #define CNTMODE_QUADENC 0x0000 /* quadrature encoder mode */ | 3397 | #define CNTMODE_QUADENC 0x0000 /* quadrature encoder mode */ |
4422 | #define CNTMODE_BINENC 0x0100 /* binary encoder mode */ | 3398 | #define CNTMODE_BINENC 0x0100 /* binary encoder mode */ |
4423 | #define CNTMODE_UDCNT 0x0200 /* up/down counter mode */ | 3399 | #define CNTMODE_UDCNT 0x0200 /* up/down counter mode */ |
4424 | #define CNTMODE_DIRCNT 0x0400 /* direction counter mode */ | 3400 | #define CNTMODE_DIRCNT 0x0400 /* direction counter mode */ |
4425 | #define CNTMODE_DIRTMR 0x0500 /* direction timer mode */ | 3401 | #define CNTMODE_DIRTMR 0x0500 /* direction timer mode */ |
4426 | 3402 | ||
4427 | #define BNDMODE_COMP 0x0000 /* boundary compare mode */ | 3403 | #define BNDMODE_COMP 0x0000 /* boundary compare mode */ |
4428 | #define BNDMODE_ZERO 0x1000 /* boundary compare and zero mode */ | 3404 | #define BNDMODE_ZERO 0x1000 /* boundary compare and zero mode */ |
4429 | #define BNDMODE_CAPT 0x2000 /* boundary capture mode */ | 3405 | #define BNDMODE_CAPT 0x2000 /* boundary capture mode */ |
@@ -4436,7 +3412,7 @@ | |||
4436 | #define EXT_CLK 0x0003 | 3412 | #define EXT_CLK 0x0003 |
4437 | 3413 | ||
4438 | /* UARTx_LCR bit field options */ | 3414 | /* UARTx_LCR bit field options */ |
4439 | 3415 | ||
4440 | #define WLS_5 0x0000 /* 5 data bits */ | 3416 | #define WLS_5 0x0000 /* 5 data bits */ |
4441 | #define WLS_6 0x0001 /* 6 data bits */ | 3417 | #define WLS_6 0x0001 /* 6 data bits */ |
4442 | #define WLS_7 0x0002 /* 7 data bits */ | 3418 | #define WLS_7 0x0002 /* 7 data bits */ |
@@ -4484,7 +3460,7 @@ | |||
4484 | #define PIQ30 0x40000000 | 3460 | #define PIQ30 0x40000000 |
4485 | #define PIQ31 0x80000000 | 3461 | #define PIQ31 0x80000000 |
4486 | 3462 | ||
4487 | /* PORT A Bit Definitions for the registers | 3463 | /* PORT A Bit Definitions for the registers |
4488 | PORTA, PORTA_SET, PORTA_CLEAR, | 3464 | PORTA, PORTA_SET, PORTA_CLEAR, |
4489 | PORTA_DIR_SET, PORTA_DIR_CLEAR, PORTA_INEN, | 3465 | PORTA_DIR_SET, PORTA_DIR_CLEAR, PORTA_INEN, |
4490 | PORTA_FER registers | 3466 | PORTA_FER registers |
@@ -4507,7 +3483,7 @@ PORTA_FER registers | |||
4507 | #define PA14 0x4000 | 3483 | #define PA14 0x4000 |
4508 | #define PA15 0x8000 | 3484 | #define PA15 0x8000 |
4509 | 3485 | ||
4510 | /* PORT B Bit Definitions for the registers | 3486 | /* PORT B Bit Definitions for the registers |
4511 | PORTB, PORTB_SET, PORTB_CLEAR, | 3487 | PORTB, PORTB_SET, PORTB_CLEAR, |
4512 | PORTB_DIR_SET, PORTB_DIR_CLEAR, PORTB_INEN, | 3488 | PORTB_DIR_SET, PORTB_DIR_CLEAR, PORTB_INEN, |
4513 | PORTB_FER registers | 3489 | PORTB_FER registers |
@@ -4530,7 +3506,7 @@ PORTB_FER registers | |||
4530 | #define PB14 0x4000 | 3506 | #define PB14 0x4000 |
4531 | 3507 | ||
4532 | 3508 | ||
4533 | /* PORT C Bit Definitions for the registers | 3509 | /* PORT C Bit Definitions for the registers |
4534 | PORTC, PORTC_SET, PORTC_CLEAR, | 3510 | PORTC, PORTC_SET, PORTC_CLEAR, |
4535 | PORTC_DIR_SET, PORTC_DIR_CLEAR, PORTC_INEN, | 3511 | PORTC_DIR_SET, PORTC_DIR_CLEAR, PORTC_INEN, |
4536 | PORTC_FER registers | 3512 | PORTC_FER registers |
@@ -4553,7 +3529,7 @@ PORTC_FER registers | |||
4553 | #define PC13 0x2000 | 3529 | #define PC13 0x2000 |
4554 | 3530 | ||
4555 | 3531 | ||
4556 | /* PORT D Bit Definitions for the registers | 3532 | /* PORT D Bit Definitions for the registers |
4557 | PORTD, PORTD_SET, PORTD_CLEAR, | 3533 | PORTD, PORTD_SET, PORTD_CLEAR, |
4558 | PORTD_DIR_SET, PORTD_DIR_CLEAR, PORTD_INEN, | 3534 | PORTD_DIR_SET, PORTD_DIR_CLEAR, PORTD_INEN, |
4559 | PORTD_FER registers | 3535 | PORTD_FER registers |
@@ -4576,7 +3552,7 @@ PORTD_FER registers | |||
4576 | #define PD14 0x4000 | 3552 | #define PD14 0x4000 |
4577 | #define PD15 0x8000 | 3553 | #define PD15 0x8000 |
4578 | 3554 | ||
4579 | /* PORT E Bit Definitions for the registers | 3555 | /* PORT E Bit Definitions for the registers |
4580 | PORTE, PORTE_SET, PORTE_CLEAR, | 3556 | PORTE, PORTE_SET, PORTE_CLEAR, |
4581 | PORTE_DIR_SET, PORTE_DIR_CLEAR, PORTE_INEN, | 3557 | PORTE_DIR_SET, PORTE_DIR_CLEAR, PORTE_INEN, |
4582 | PORTE_FER registers | 3558 | PORTE_FER registers |
@@ -4600,7 +3576,7 @@ PORTE_FER registers | |||
4600 | #define PE14 0x4000 | 3576 | #define PE14 0x4000 |
4601 | #define PE15 0x8000 | 3577 | #define PE15 0x8000 |
4602 | 3578 | ||
4603 | /* PORT F Bit Definitions for the registers | 3579 | /* PORT F Bit Definitions for the registers |
4604 | PORTF, PORTF_SET, PORTF_CLEAR, | 3580 | PORTF, PORTF_SET, PORTF_CLEAR, |
4605 | PORTF_DIR_SET, PORTF_DIR_CLEAR, PORTF_INEN, | 3581 | PORTF_DIR_SET, PORTF_DIR_CLEAR, PORTF_INEN, |
4606 | PORTF_FER registers | 3582 | PORTF_FER registers |
@@ -4624,7 +3600,7 @@ PORTF_FER registers | |||
4624 | #define PF14 0x4000 | 3600 | #define PF14 0x4000 |
4625 | #define PF15 0x8000 | 3601 | #define PF15 0x8000 |
4626 | 3602 | ||
4627 | /* PORT G Bit Definitions for the registers | 3603 | /* PORT G Bit Definitions for the registers |
4628 | PORTG, PORTG_SET, PORTG_CLEAR, | 3604 | PORTG, PORTG_SET, PORTG_CLEAR, |
4629 | PORTG_DIR_SET, PORTG_DIR_CLEAR, PORTG_INEN, | 3605 | PORTG_DIR_SET, PORTG_DIR_CLEAR, PORTG_INEN, |
4630 | PORTG_FER registers | 3606 | PORTG_FER registers |
@@ -4648,7 +3624,7 @@ PORTG_FER registers | |||
4648 | #define PG14 0x4000 | 3624 | #define PG14 0x4000 |
4649 | #define PG15 0x8000 | 3625 | #define PG15 0x8000 |
4650 | 3626 | ||
4651 | /* PORT H Bit Definitions for the registers | 3627 | /* PORT H Bit Definitions for the registers |
4652 | PORTH, PORTH_SET, PORTH_CLEAR, | 3628 | PORTH, PORTH_SET, PORTH_CLEAR, |
4653 | PORTH_DIR_SET, PORTH_DIR_CLEAR, PORTH_INEN, | 3629 | PORTH_DIR_SET, PORTH_DIR_CLEAR, PORTH_INEN, |
4654 | PORTH_FER registers | 3630 | PORTH_FER registers |
@@ -4671,7 +3647,7 @@ PORTH_FER registers | |||
4671 | #define PH13 0x2000 | 3647 | #define PH13 0x2000 |
4672 | 3648 | ||
4673 | 3649 | ||
4674 | /* PORT I Bit Definitions for the registers | 3650 | /* PORT I Bit Definitions for the registers |
4675 | PORTI, PORTI_SET, PORTI_CLEAR, | 3651 | PORTI, PORTI_SET, PORTI_CLEAR, |
4676 | PORTI_DIR_SET, PORTI_DIR_CLEAR, PORTI_INEN, | 3652 | PORTI_DIR_SET, PORTI_DIR_CLEAR, PORTI_INEN, |
4677 | PORTI_FER registers | 3653 | PORTI_FER registers |
@@ -4695,7 +3671,7 @@ PORTI_FER registers | |||
4695 | #define PI14 0x4000 | 3671 | #define PI14 0x4000 |
4696 | #define PI15 0x8000 | 3672 | #define PI15 0x8000 |
4697 | 3673 | ||
4698 | /* PORT J Bit Definitions for the registers | 3674 | /* PORT J Bit Definitions for the registers |
4699 | PORTJ, PORTJ_SET, PORTJ_CLEAR, | 3675 | PORTJ, PORTJ_SET, PORTJ_CLEAR, |
4700 | PORTJ_DIR_SET, PORTJ_DIR_CLEAR, PORTJ_INEN, | 3676 | PORTJ_DIR_SET, PORTJ_DIR_CLEAR, PORTJ_INEN, |
4701 | PORTJ_FER registers | 3677 | PORTJ_FER registers |
@@ -4716,7 +3692,7 @@ PORTJ_FER registers | |||
4716 | #define PJ11 0x0800 | 3692 | #define PJ11 0x0800 |
4717 | #define PJ12 0x1000 | 3693 | #define PJ12 0x1000 |
4718 | #define PJ13 0x2000 | 3694 | #define PJ13 0x2000 |
4719 | 3695 | ||
4720 | 3696 | ||
4721 | /* Port Muxing Bit Fields for PORTx_MUX Registers */ | 3697 | /* Port Muxing Bit Fields for PORTx_MUX Registers */ |
4722 | 3698 | ||
@@ -4860,7 +3836,7 @@ PORTJ_FER registers | |||
4860 | #define B0MAP_PIL 0x00000006 /* Map Port I Low to Byte 0 */ | 3836 | #define B0MAP_PIL 0x00000006 /* Map Port I Low to Byte 0 */ |
4861 | #define B0MAP_PJL 0x00000007 /* Map Port J Low to Byte 0 */ | 3837 | #define B0MAP_PJL 0x00000007 /* Map Port J Low to Byte 0 */ |
4862 | 3838 | ||
4863 | #define B1MAP_PCH 0x00000000 /* Map Port C High to Byte 1 */ | 3839 | #define B1MAP_PCH 0x00000000 /* Map Port C High to Byte 1 */ |
4864 | #define B1MAP_PDH 0x00000100 /* Map Port D High to Byte 1 */ | 3840 | #define B1MAP_PDH 0x00000100 /* Map Port D High to Byte 1 */ |
4865 | #define B1MAP_PEH 0x00000200 /* Map Port E High to Byte 1 */ | 3841 | #define B1MAP_PEH 0x00000200 /* Map Port E High to Byte 1 */ |
4866 | #define B1MAP_PFH 0x00000300 /* Map Port F High to Byte 1 */ | 3842 | #define B1MAP_PFH 0x00000300 /* Map Port F High to Byte 1 */ |
@@ -4869,27 +3845,27 @@ PORTJ_FER registers | |||
4869 | #define B1MAP_PIH 0x00000600 /* Map Port I High to Byte 1 */ | 3845 | #define B1MAP_PIH 0x00000600 /* Map Port I High to Byte 1 */ |
4870 | #define B1MAP_PJH 0x00000700 /* Map Port J High to Byte 1 */ | 3846 | #define B1MAP_PJH 0x00000700 /* Map Port J High to Byte 1 */ |
4871 | 3847 | ||
4872 | #define B2MAP_PCL 0x00000000 /* Map Port C Low to Byte 2 */ | 3848 | #define B2MAP_PCL 0x00000000 /* Map Port C Low to Byte 2 */ |
4873 | #define B2MAP_PDL 0x00010000 /* Map Port D Low to Byte 2 */ | 3849 | #define B2MAP_PDL 0x00010000 /* Map Port D Low to Byte 2 */ |
4874 | #define B2MAP_PEL 0x00020000 /* Map Port E Low to Byte 2 */ | 3850 | #define B2MAP_PEL 0x00020000 /* Map Port E Low to Byte 2 */ |
4875 | #define B2MAP_PFL 0x00030000 /* Map Port F Low to Byte 2 */ | 3851 | #define B2MAP_PFL 0x00030000 /* Map Port F Low to Byte 2 */ |
4876 | #define B2MAP_PGL 0x00040000 /* Map Port G Low to Byte 2 */ | 3852 | #define B2MAP_PGL 0x00040000 /* Map Port G Low to Byte 2 */ |
4877 | #define B2MAP_PHL 0x00050000 /* Map Port H Low to Byte 2 */ | 3853 | #define B2MAP_PHL 0x00050000 /* Map Port H Low to Byte 2 */ |
4878 | #define B2MAP_PIL 0x00060000 /* Map Port I Low to Byte 2 */ | 3854 | #define B2MAP_PIL 0x00060000 /* Map Port I Low to Byte 2 */ |
4879 | #define B2MAP_PJL 0x00070000 /* Map Port J Low to Byte 2 */ | 3855 | #define B2MAP_PJL 0x00070000 /* Map Port J Low to Byte 2 */ |
4880 | 3856 | ||
4881 | #define B3MAP_PCH 0x00000000 /* Map Port C High to Byte 3 */ | 3857 | #define B3MAP_PCH 0x00000000 /* Map Port C High to Byte 3 */ |
4882 | #define B3MAP_PDH 0x01000000 /* Map Port D High to Byte 3 */ | 3858 | #define B3MAP_PDH 0x01000000 /* Map Port D High to Byte 3 */ |
4883 | #define B3MAP_PEH 0x02000000 /* Map Port E High to Byte 3 */ | 3859 | #define B3MAP_PEH 0x02000000 /* Map Port E High to Byte 3 */ |
4884 | #define B3MAP_PFH 0x03000000 /* Map Port F High to Byte 3 */ | 3860 | #define B3MAP_PFH 0x03000000 /* Map Port F High to Byte 3 */ |
4885 | #define B3MAP_PGH 0x04000000 /* Map Port G High to Byte 3 */ | 3861 | #define B3MAP_PGH 0x04000000 /* Map Port G High to Byte 3 */ |
4886 | #define B3MAP_PHH 0x05000000 /* Map Port H High to Byte 3 */ | 3862 | #define B3MAP_PHH 0x05000000 /* Map Port H High to Byte 3 */ |
4887 | #define B3MAP_PIH 0x06000000 /* Map Port I High to Byte 3 */ | 3863 | #define B3MAP_PIH 0x06000000 /* Map Port I High to Byte 3 */ |
4888 | #define B3MAP_PJH 0x07000000 /* Map Port J High to Byte 3 */ | 3864 | #define B3MAP_PJH 0x07000000 /* Map Port J High to Byte 3 */ |
4889 | 3865 | ||
4890 | 3866 | ||
4891 | /* for legacy compatibility */ | 3867 | /* for legacy compatibility */ |
4892 | 3868 | ||
4893 | #define WLS(x) (((x)-5) & 0x03) /* Word Length Select */ | 3869 | #define WLS(x) (((x)-5) & 0x03) /* Word Length Select */ |
4894 | #define W1LMAX_MAX W1LMAX_MIN | 3870 | #define W1LMAX_MAX W1LMAX_MIN |
4895 | #define EBIU_AMCBCTL0 EBIU_AMBCTL0 | 3871 | #define EBIU_AMCBCTL0 EBIU_AMBCTL0 |
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h new file mode 100644 index 000000000000..fcc8b4c34c6a --- /dev/null +++ b/include/asm-blackfin/mach-bf548/dma.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf548/dma.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * system mmr register map | ||
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 | |||
32 | #ifndef _MACH_DMA_H_ | ||
33 | #define _MACH_DMA_H_ | ||
34 | |||
35 | #define CH_SPORT0_RX 0 | ||
36 | #define CH_SPORT0_TX 1 | ||
37 | #define CH_SPORT1_RX 2 | ||
38 | #define CH_SPORT1_TX 3 | ||
39 | #define CH_SPI0 4 | ||
40 | #define CH_SPI1 5 | ||
41 | #define CH_UART0_RX 6 | ||
42 | #define CH_UART0_TX 7 | ||
43 | #define CH_UART1_RX 8 | ||
44 | #define CH_UART1_TX 9 | ||
45 | #define CH_ATAPI_RX 10 | ||
46 | #define CH_ATAPI_TX 11 | ||
47 | #define CH_EPPI0 12 | ||
48 | #define CH_EPPI1 13 | ||
49 | #define CH_EPPI2 14 | ||
50 | #define CH_PIXC_IMAGE 15 | ||
51 | #define CH_PIXC_OVERLAY 16 | ||
52 | #define CH_PIXC_OUTPUT 17 | ||
53 | #define CH_SPORT2_RX 18 | ||
54 | #define CH_SPORT2_TX 19 | ||
55 | #define CH_SPORT3_RX 20 | ||
56 | #define CH_SPORT3_TX 21 | ||
57 | #define CH_SDH 22 | ||
58 | #define CH_SPI2 23 | ||
59 | |||
60 | #define CH_MEM_STREAM0_DEST 24 | ||
61 | #define CH_MEM_STREAM0_SRC 25 | ||
62 | #define CH_MEM_STREAM1_DEST 26 | ||
63 | #define CH_MEM_STREAM1_SRC 27 | ||
64 | #define CH_MEM_STREAM2_DEST 28 | ||
65 | #define CH_MEM_STREAM2_SRC 29 | ||
66 | #define CH_MEM_STREAM3_DEST 30 | ||
67 | #define CH_MEM_STREAM3_SRC 31 | ||
68 | |||
69 | #define MAX_BLACKFIN_DMA_CHANNEL 32 | ||
70 | |||
71 | extern int channel2irq(unsigned int channel); | ||
72 | extern struct dma_register *base_addr[]; | ||
73 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf548/gpio.h b/include/asm-blackfin/mach-bf548/gpio.h new file mode 100644 index 000000000000..dbf66bcabe35 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/gpio.h | |||
@@ -0,0 +1,216 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/mach-bf548/gpio.h | ||
3 | * Based on: | ||
4 | * Author: Michael Hennerich (hennerich@blackfin.uclinux.org) | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Modified: | ||
10 | * Copyright 2004-2007 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | ||
29 | |||
30 | |||
31 | |||
32 | #define GPIO_PA0 0 | ||
33 | #define GPIO_PA1 1 | ||
34 | #define GPIO_PA2 2 | ||
35 | #define GPIO_PA3 3 | ||
36 | #define GPIO_PA4 4 | ||
37 | #define GPIO_PA5 5 | ||
38 | #define GPIO_PA6 6 | ||
39 | #define GPIO_PA7 7 | ||
40 | #define GPIO_PA8 8 | ||
41 | #define GPIO_PA9 9 | ||
42 | #define GPIO_PA10 10 | ||
43 | #define GPIO_PA11 11 | ||
44 | #define GPIO_PA12 12 | ||
45 | #define GPIO_PA13 13 | ||
46 | #define GPIO_PA14 14 | ||
47 | #define GPIO_PA15 15 | ||
48 | #define GPIO_PB0 16 | ||
49 | #define GPIO_PB1 17 | ||
50 | #define GPIO_PB2 18 | ||
51 | #define GPIO_PB3 19 | ||
52 | #define GPIO_PB4 20 | ||
53 | #define GPIO_PB5 21 | ||
54 | #define GPIO_PB6 22 | ||
55 | #define GPIO_PB7 23 | ||
56 | #define GPIO_PB8 24 | ||
57 | #define GPIO_PB9 25 | ||
58 | #define GPIO_PB10 26 | ||
59 | #define GPIO_PB11 27 | ||
60 | #define GPIO_PB12 28 | ||
61 | #define GPIO_PB13 29 | ||
62 | #define GPIO_PB14 30 | ||
63 | #define GPIO_PB15 31 /* N/A */ | ||
64 | #define GPIO_PC0 32 | ||
65 | #define GPIO_PC1 33 | ||
66 | #define GPIO_PC2 34 | ||
67 | #define GPIO_PC3 35 | ||
68 | #define GPIO_PC4 36 | ||
69 | #define GPIO_PC5 37 | ||
70 | #define GPIO_PC6 38 | ||
71 | #define GPIO_PC7 39 | ||
72 | #define GPIO_PC8 40 | ||
73 | #define GPIO_PC9 41 | ||
74 | #define GPIO_PC10 42 | ||
75 | #define GPIO_PC11 43 | ||
76 | #define GPIO_PC12 44 | ||
77 | #define GPIO_PC13 45 | ||
78 | #define GPIO_PC14 46 /* N/A */ | ||
79 | #define GPIO_PC15 47 /* N/A */ | ||
80 | #define GPIO_PD0 48 | ||
81 | #define GPIO_PD1 49 | ||
82 | #define GPIO_PD2 50 | ||
83 | #define GPIO_PD3 51 | ||
84 | #define GPIO_PD4 52 | ||
85 | #define GPIO_PD5 53 | ||
86 | #define GPIO_PD6 54 | ||
87 | #define GPIO_PD7 55 | ||
88 | #define GPIO_PD8 56 | ||
89 | #define GPIO_PD9 57 | ||
90 | #define GPIO_PD10 58 | ||
91 | #define GPIO_PD11 59 | ||
92 | #define GPIO_PD12 60 | ||
93 | #define GPIO_PD13 61 | ||
94 | #define GPIO_PD14 62 | ||
95 | #define GPIO_PD15 63 | ||
96 | #define GPIO_PE0 64 | ||
97 | #define GPIO_PE1 65 | ||
98 | #define GPIO_PE2 66 | ||
99 | #define GPIO_PE3 67 | ||
100 | #define GPIO_PE4 68 | ||
101 | #define GPIO_PE5 69 | ||
102 | #define GPIO_PE6 70 | ||
103 | #define GPIO_PE7 71 | ||
104 | #define GPIO_PE8 72 | ||
105 | #define GPIO_PE9 73 | ||
106 | #define GPIO_PE10 74 | ||
107 | #define GPIO_PE11 75 | ||
108 | #define GPIO_PE12 76 | ||
109 | #define GPIO_PE13 77 | ||
110 | #define GPIO_PE14 78 | ||
111 | #define GPIO_PE15 79 | ||
112 | #define GPIO_PF0 80 | ||
113 | #define GPIO_PF1 81 | ||
114 | #define GPIO_PF2 82 | ||
115 | #define GPIO_PF3 83 | ||
116 | #define GPIO_PF4 84 | ||
117 | #define GPIO_PF5 85 | ||
118 | #define GPIO_PF6 86 | ||
119 | #define GPIO_PF7 87 | ||
120 | #define GPIO_PF8 88 | ||
121 | #define GPIO_PF9 89 | ||
122 | #define GPIO_PF10 90 | ||
123 | #define GPIO_PF11 91 | ||
124 | #define GPIO_PF12 92 | ||
125 | #define GPIO_PF13 93 | ||
126 | #define GPIO_PF14 94 | ||
127 | #define GPIO_PF15 95 | ||
128 | #define GPIO_PG0 96 | ||
129 | #define GPIO_PG1 97 | ||
130 | #define GPIO_PG2 98 | ||
131 | #define GPIO_PG3 99 | ||
132 | #define GPIO_PG4 100 | ||
133 | #define GPIO_PG5 101 | ||
134 | #define GPIO_PG6 102 | ||
135 | #define GPIO_PG7 103 | ||
136 | #define GPIO_PG8 104 | ||
137 | #define GPIO_PG9 105 | ||
138 | #define GPIO_PG10 106 | ||
139 | #define GPIO_PG11 107 | ||
140 | #define GPIO_PG12 108 | ||
141 | #define GPIO_PG13 109 | ||
142 | #define GPIO_PG14 110 | ||
143 | #define GPIO_PG15 111 | ||
144 | #define GPIO_PH0 112 | ||
145 | #define GPIO_PH1 113 | ||
146 | #define GPIO_PH2 114 | ||
147 | #define GPIO_PH3 115 | ||
148 | #define GPIO_PH4 116 | ||
149 | #define GPIO_PH5 117 | ||
150 | #define GPIO_PH6 118 | ||
151 | #define GPIO_PH7 119 | ||
152 | #define GPIO_PH8 120 | ||
153 | #define GPIO_PH9 121 | ||
154 | #define GPIO_PH10 122 | ||
155 | #define GPIO_PH11 123 | ||
156 | #define GPIO_PH12 124 | ||
157 | #define GPIO_PH13 125 | ||
158 | #define GPIO_PH14 126 /* N/A */ | ||
159 | #define GPIO_PH15 127 /* N/A */ | ||
160 | #define GPIO_PI0 128 | ||
161 | #define GPIO_PI1 129 | ||
162 | #define GPIO_PI2 130 | ||
163 | #define GPIO_PI3 131 | ||
164 | #define GPIO_PI4 132 | ||
165 | #define GPIO_PI5 133 | ||
166 | #define GPIO_PI6 134 | ||
167 | #define GPIO_PI7 135 | ||
168 | #define GPIO_PI8 136 | ||
169 | #define GPIO_PI9 137 | ||
170 | #define GPIO_PI10 138 | ||
171 | #define GPIO_PI11 139 | ||
172 | #define GPIO_PI12 140 | ||
173 | #define GPIO_PI13 141 | ||
174 | #define GPIO_PI14 142 | ||
175 | #define GPIO_PI15 143 | ||
176 | #define GPIO_PJ0 144 | ||
177 | #define GPIO_PJ1 145 | ||
178 | #define GPIO_PJ2 146 | ||
179 | #define GPIO_PJ3 147 | ||
180 | #define GPIO_PJ4 148 | ||
181 | #define GPIO_PJ5 149 | ||
182 | #define GPIO_PJ6 150 | ||
183 | #define GPIO_PJ7 151 | ||
184 | #define GPIO_PJ8 152 | ||
185 | #define GPIO_PJ9 153 | ||
186 | #define GPIO_PJ10 154 | ||
187 | #define GPIO_PJ11 155 | ||
188 | #define GPIO_PJ12 156 | ||
189 | #define GPIO_PJ13 157 | ||
190 | #define GPIO_PJ14 158 /* N/A */ | ||
191 | #define GPIO_PJ15 159 /* N/A */ | ||
192 | |||
193 | #define MAX_BLACKFIN_GPIOS 160 | ||
194 | |||
195 | struct gpio_port_t { | ||
196 | unsigned short port_fer; | ||
197 | unsigned short dummy1; | ||
198 | unsigned short port_data; | ||
199 | unsigned short dummy2; | ||
200 | unsigned short port_set; | ||
201 | unsigned short dummy3; | ||
202 | unsigned short port_clear; | ||
203 | unsigned short dummy4; | ||
204 | unsigned short port_dir_set; | ||
205 | unsigned short dummy5; | ||
206 | unsigned short port_dir_clear; | ||
207 | unsigned short dummy6; | ||
208 | unsigned short port_inen; | ||
209 | unsigned short dummy7; | ||
210 | unsigned int port_mux; | ||
211 | }; | ||
212 | |||
213 | int gpio_request(unsigned short gpio, const char *label); | ||
214 | void peripheral_free(unsigned short per); | ||
215 | int peripheral_request_list(unsigned short per[], const char *label); | ||
216 | void peripheral_free_list(unsigned short per[]); | ||
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h new file mode 100644 index 000000000000..0b3325bb1fff --- /dev/null +++ b/include/asm-blackfin/mach-bf548/irq.h | |||
@@ -0,0 +1,467 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf548/irq.h | ||
3 | * based on: include/asm-blackfin/mach-bf537/irq.h | ||
4 | * author: Roy Huang (roy.huang@analog.com) | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * system mmr register map | ||
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 | |||
32 | #ifndef _BF548_IRQ_H_ | ||
33 | #define _BF548_IRQ_H_ | ||
34 | |||
35 | /* | ||
36 | * Interrupt source definitions | ||
37 | Event Source Core Event Name | ||
38 | Core Emulation ** | ||
39 | Events (highest priority) EMU 0 | ||
40 | Reset RST 1 | ||
41 | NMI NMI 2 | ||
42 | Exception EVX 3 | ||
43 | Reserved -- 4 | ||
44 | Hardware Error IVHW 5 | ||
45 | Core Timer IVTMR 6 * | ||
46 | |||
47 | ..... | ||
48 | |||
49 | Software Interrupt 1 IVG14 31 | ||
50 | Software Interrupt 2 -- | ||
51 | (lowest priority) IVG15 32 * | ||
52 | */ | ||
53 | |||
54 | #define NR_PERI_INTS (32 * 3) | ||
55 | |||
56 | /* The ABSTRACT IRQ definitions */ | ||
57 | /** the first seven of the following are fixed, the rest you change if you need to **/ | ||
58 | #define IRQ_EMU 0 /* Emulation */ | ||
59 | #define IRQ_RST 1 /* reset */ | ||
60 | #define IRQ_NMI 2 /* Non Maskable */ | ||
61 | #define IRQ_EVX 3 /* Exception */ | ||
62 | #define IRQ_UNUSED 4 /* - unused interrupt*/ | ||
63 | #define IRQ_HWERR 5 /* Hardware Error */ | ||
64 | #define IRQ_CORETMR 6 /* Core timer */ | ||
65 | |||
66 | #define BFIN_IRQ(x) ((x) + 7) | ||
67 | |||
68 | #define IRQ_PLL_WAKEUP BFIN_IRQ(0) /* PLL Wakeup Interrupt */ | ||
69 | #define IRQ_DMAC0_ERR BFIN_IRQ(1) /* DMAC0 Status Interrupt */ | ||
70 | #define IRQ_EPPI0_ERR BFIN_IRQ(2) /* EPPI0 Error Interrupt */ | ||
71 | #define IRQ_SPORT0_ERR BFIN_IRQ(3) /* SPORT0 Error Interrupt */ | ||
72 | #define IRQ_SPORT1_ERR BFIN_IRQ(4) /* SPORT1 Error Interrupt */ | ||
73 | #define IRQ_SPI0_ERR BFIN_IRQ(5) /* SPI0 Status(Error) Interrupt */ | ||
74 | #define IRQ_UART0_ERR BFIN_IRQ(6) /* UART0 Status(Error) Interrupt */ | ||
75 | #define IRQ_RTC BFIN_IRQ(7) /* RTC Interrupt */ | ||
76 | #define IRQ_EPPI0 BFIN_IRQ(8) /* EPPI0 Interrupt (DMA12) */ | ||
77 | #define IRQ_SPORT0_RX BFIN_IRQ(9) /* SPORT0 RX Interrupt (DMA0) */ | ||
78 | #define IRQ_SPORT0_TX BFIN_IRQ(10) /* SPORT0 TX Interrupt (DMA1) */ | ||
79 | #define IRQ_SPORT1_RX BFIN_IRQ(11) /* SPORT1 RX Interrupt (DMA2) */ | ||
80 | #define IRQ_SPORT1_TX BFIN_IRQ(12) /* SPORT1 TX Interrupt (DMA3) */ | ||
81 | #define IRQ_SPI0 BFIN_IRQ(13) /* SPI0 Interrupt (DMA4) */ | ||
82 | #define IRQ_UART0_RX BFIN_IRQ(14) /* UART0 RX Interrupt (DMA6) */ | ||
83 | #define IRQ_UART0_TX BFIN_IRQ(15) /* UART0 TX Interrupt (DMA7) */ | ||
84 | #define IRQ_TIMER8 BFIN_IRQ(16) /* TIMER 8 Interrupt */ | ||
85 | #define IRQ_TIMER9 BFIN_IRQ(17) /* TIMER 9 Interrupt */ | ||
86 | #define IRQ_TIMER10 BFIN_IRQ(18) /* TIMER 10 Interrupt */ | ||
87 | #define IRQ_PINT0 BFIN_IRQ(19) /* PINT0 Interrupt */ | ||
88 | #define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ | ||
89 | #define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ | ||
90 | #define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ | ||
91 | #define IRQ_WATCHDOG BFIN_IRQ(23) /* Watchdog Interrupt */ | ||
92 | #define IRQ_DMAC1_ERR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ | ||
93 | #define IRQ_SPORT2_ERR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ | ||
94 | #define IRQ_SPORT3_ERR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ | ||
95 | #define IRQ_MXVR_DATA BFIN_IRQ(27) /* MXVR Data Interrupt */ | ||
96 | #define IRQ_SPI1_ERR BFIN_IRQ(28) /* SPI1 Status (Error) Interrupt */ | ||
97 | #define IRQ_SPI2_ERR BFIN_IRQ(29) /* SPI2 Status (Error) Interrupt */ | ||
98 | #define IRQ_UART1_ERR BFIN_IRQ(30) /* UART1 Status (Error) Interrupt */ | ||
99 | #define IRQ_UART2_ERR BFIN_IRQ(31) /* UART2 Status (Error) Interrupt */ | ||
100 | #define IRQ_CAN0_ERR BFIN_IRQ(32) /* CAN0 Status (Error) Interrupt */ | ||
101 | #define IRQ_SPORT2_RX BFIN_IRQ(33) /* SPORT2 RX (DMA18) Interrupt */ | ||
102 | #define IRQ_SPORT2_TX BFIN_IRQ(34) /* SPORT2 TX (DMA19) Interrupt */ | ||
103 | #define IRQ_SPORT3_RX BFIN_IRQ(35) /* SPORT3 RX (DMA20) Interrupt */ | ||
104 | #define IRQ_SPORT3_TX BFIN_IRQ(36) /* SPORT3 TX (DMA21) Interrupt */ | ||
105 | #define IRQ_EPPI1 BFIN_IRQ(37) /* EPP1 (DMA13) Interrupt */ | ||
106 | #define IRQ_EPPI2 BFIN_IRQ(38) /* EPP2 (DMA14) Interrupt */ | ||
107 | #define IRQ_SPI1 BFIN_IRQ(39) /* SPI1 (DMA5) Interrupt */ | ||
108 | #define IRQ_SPI2 BFIN_IRQ(40) /* SPI2 (DMA23) Interrupt */ | ||
109 | #define IRQ_UART1_RX BFIN_IRQ(41) /* UART1 RX (DMA8) Interrupt */ | ||
110 | #define IRQ_UART1_TX BFIN_IRQ(42) /* UART1 TX (DMA9) Interrupt */ | ||
111 | #define IRQ_ATAPI_RX BFIN_IRQ(43) /* ATAPI RX (DMA10) Interrupt */ | ||
112 | #define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */ | ||
113 | #define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */ | ||
114 | #define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */ | ||
115 | #define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */ | ||
116 | #define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */ | ||
117 | #define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */ | ||
118 | #define IRQ_MDMAS3 BFIN_IRQ(50) /* MDMA Stream 3 Interrupt */ | ||
119 | #define IRQ_MXVR_ERR BFIN_IRQ(51) /* MXVR Status (Error) Interrupt */ | ||
120 | #define IRQ_MXVR_MSG BFIN_IRQ(52) /* MXVR Message Interrupt */ | ||
121 | #define IRQ_MXVR_PKT BFIN_IRQ(53) /* MXVR Packet Interrupt */ | ||
122 | #define IRQ_EPP1_ERR BFIN_IRQ(54) /* EPPI1 Error Interrupt */ | ||
123 | #define IRQ_EPP2_ERR BFIN_IRQ(55) /* EPPI2 Error Interrupt */ | ||
124 | #define IRQ_UART3_ERR BFIN_IRQ(56) /* UART3 Status (Error) Interrupt */ | ||
125 | #define IRQ_HOST_ERR BFIN_IRQ(57) /* HOST Status (Error) Interrupt */ | ||
126 | #define IRQ_PIXC_ERR BFIN_IRQ(59) /* PIXC Status (Error) Interrupt */ | ||
127 | #define IRQ_NFC_ERR BFIN_IRQ(60) /* NFC Error Interrupt */ | ||
128 | #define IRQ_ATAPI_ERR BFIN_IRQ(61) /* ATAPI Error Interrupt */ | ||
129 | #define IRQ_CAN1_ERR BFIN_IRQ(62) /* CAN1 Status (Error) Interrupt */ | ||
130 | #define IRQ_HS_DMA_ERR BFIN_IRQ(63) /* Handshake DMA Status Interrupt */ | ||
131 | #define IRQ_PIXC_IN0 BFIN_IRQ(64) /* PIXC IN0 (DMA15) Interrupt */ | ||
132 | #define IRQ_PIXC_IN1 BFIN_IRQ(65) /* PIXC IN1 (DMA16) Interrupt */ | ||
133 | #define IRQ_PIXC_OUT BFIN_IRQ(66) /* PIXC OUT (DMA17) Interrupt */ | ||
134 | #define IRQ_SDH BFIN_IRQ(67) /* SDH/NFC (DMA22) Interrupt */ | ||
135 | #define IRQ_CNT BFIN_IRQ(68) /* CNT Interrupt */ | ||
136 | #define IRQ_KEY BFIN_IRQ(69) /* KEY Interrupt */ | ||
137 | #define IRQ_CAN1_RX BFIN_IRQ(70) /* CAN1 RX Interrupt */ | ||
138 | #define IRQ_CAN1_TX BFIN_IRQ(71) /* CAN1 TX Interrupt */ | ||
139 | #define IRQ_SDH_MASK0 BFIN_IRQ(72) /* SDH Mask 0 Interrupt */ | ||
140 | #define IRQ_SDH_MASK1 BFIN_IRQ(73) /* SDH Mask 1 Interrupt */ | ||
141 | #define IRQ_USB_INT0 BFIN_IRQ(75) /* USB INT0 Interrupt */ | ||
142 | #define IRQ_USB_INT1 BFIN_IRQ(76) /* USB INT1 Interrupt */ | ||
143 | #define IRQ_USB_INT2 BFIN_IRQ(77) /* USB INT2 Interrupt */ | ||
144 | #define IRQ_USB_DMA BFIN_IRQ(78) /* USB DMA Interrupt */ | ||
145 | #define IRQ_OPTSEC BFIN_IRQ(79) /* OTPSEC Interrupt */ | ||
146 | #define IRQ_TIMER0 BFIN_IRQ(86) /* Timer 0 Interrupt */ | ||
147 | #define IRQ_TIMER1 BFIN_IRQ(87) /* Timer 1 Interrupt */ | ||
148 | #define IRQ_TIMER2 BFIN_IRQ(88) /* Timer 2 Interrupt */ | ||
149 | #define IRQ_TIMER3 BFIN_IRQ(89) /* Timer 3 Interrupt */ | ||
150 | #define IRQ_TIMER4 BFIN_IRQ(90) /* Timer 4 Interrupt */ | ||
151 | #define IRQ_TIMER5 BFIN_IRQ(91) /* Timer 5 Interrupt */ | ||
152 | #define IRQ_TIMER6 BFIN_IRQ(92) /* Timer 6 Interrupt */ | ||
153 | #define IRQ_TIMER7 BFIN_IRQ(93) /* Timer 7 Interrupt */ | ||
154 | #define IRQ_PINT2 BFIN_IRQ(94) /* PINT2 Interrupt */ | ||
155 | #define IRQ_PINT3 BFIN_IRQ(95) /* PINT3 Interrupt */ | ||
156 | |||
157 | #define SYS_IRQS IRQ_PINT3 | ||
158 | |||
159 | #define BFIN_PA_IRQ(x) ((x) + SYS_IRQS + 1) | ||
160 | #define IRQ_PA0 BFIN_PA_IRQ(0) | ||
161 | #define IRQ_PA1 BFIN_PA_IRQ(1) | ||
162 | #define IRQ_PA2 BFIN_PA_IRQ(2) | ||
163 | #define IRQ_PA3 BFIN_PA_IRQ(3) | ||
164 | #define IRQ_PA4 BFIN_PA_IRQ(4) | ||
165 | #define IRQ_PA5 BFIN_PA_IRQ(5) | ||
166 | #define IRQ_PA6 BFIN_PA_IRQ(6) | ||
167 | #define IRQ_PA7 BFIN_PA_IRQ(7) | ||
168 | #define IRQ_PA8 BFIN_PA_IRQ(8) | ||
169 | #define IRQ_PA9 BFIN_PA_IRQ(9) | ||
170 | #define IRQ_PA10 BFIN_PA_IRQ(10) | ||
171 | #define IRQ_PA11 BFIN_PA_IRQ(11) | ||
172 | #define IRQ_PA12 BFIN_PA_IRQ(12) | ||
173 | #define IRQ_PA13 BFIN_PA_IRQ(13) | ||
174 | #define IRQ_PA14 BFIN_PA_IRQ(14) | ||
175 | #define IRQ_PA15 BFIN_PA_IRQ(15) | ||
176 | |||
177 | #define BFIN_PB_IRQ(x) ((x) + IRQ_PA15 + 1) | ||
178 | #define IRQ_PB0 BFIN_PB_IRQ(0) | ||
179 | #define IRQ_PB1 BFIN_PB_IRQ(1) | ||
180 | #define IRQ_PB2 BFIN_PB_IRQ(2) | ||
181 | #define IRQ_PB3 BFIN_PB_IRQ(3) | ||
182 | #define IRQ_PB4 BFIN_PB_IRQ(4) | ||
183 | #define IRQ_PB5 BFIN_PB_IRQ(5) | ||
184 | #define IRQ_PB6 BFIN_PB_IRQ(6) | ||
185 | #define IRQ_PB7 BFIN_PB_IRQ(7) | ||
186 | #define IRQ_PB8 BFIN_PB_IRQ(8) | ||
187 | #define IRQ_PB9 BFIN_PB_IRQ(9) | ||
188 | #define IRQ_PB10 BFIN_PB_IRQ(10) | ||
189 | #define IRQ_PB11 BFIN_PB_IRQ(11) | ||
190 | #define IRQ_PB12 BFIN_PB_IRQ(12) | ||
191 | #define IRQ_PB13 BFIN_PB_IRQ(13) | ||
192 | #define IRQ_PB14 BFIN_PB_IRQ(14) | ||
193 | #define IRQ_PB15 BFIN_PB_IRQ(15) /* N/A */ | ||
194 | |||
195 | #define BFIN_PC_IRQ(x) ((x) + IRQ_PB15 + 1) | ||
196 | #define IRQ_PC0 BFIN_PC_IRQ(0) | ||
197 | #define IRQ_PC1 BFIN_PC_IRQ(1) | ||
198 | #define IRQ_PC2 BFIN_PC_IRQ(2) | ||
199 | #define IRQ_PC3 BFIN_PC_IRQ(3) | ||
200 | #define IRQ_PC4 BFIN_PC_IRQ(4) | ||
201 | #define IRQ_PC5 BFIN_PC_IRQ(5) | ||
202 | #define IRQ_PC6 BFIN_PC_IRQ(6) | ||
203 | #define IRQ_PC7 BFIN_PC_IRQ(7) | ||
204 | #define IRQ_PC8 BFIN_PC_IRQ(8) | ||
205 | #define IRQ_PC9 BFIN_PC_IRQ(9) | ||
206 | #define IRQ_PC10 BFIN_PC_IRQ(10) | ||
207 | #define IRQ_PC11 BFIN_PC_IRQ(11) | ||
208 | #define IRQ_PC12 BFIN_PC_IRQ(12) | ||
209 | #define IRQ_PC13 BFIN_PC_IRQ(13) | ||
210 | #define IRQ_PC14 BFIN_PC_IRQ(14) /* N/A */ | ||
211 | #define IRQ_PC15 BFIN_PC_IRQ(15) /* N/A */ | ||
212 | |||
213 | #define BFIN_PD_IRQ(x) ((x) + IRQ_PC15 + 1) | ||
214 | #define IRQ_PD0 BFIN_PD_IRQ(0) | ||
215 | #define IRQ_PD1 BFIN_PD_IRQ(1) | ||
216 | #define IRQ_PD2 BFIN_PD_IRQ(2) | ||
217 | #define IRQ_PD3 BFIN_PD_IRQ(3) | ||
218 | #define IRQ_PD4 BFIN_PD_IRQ(4) | ||
219 | #define IRQ_PD5 BFIN_PD_IRQ(5) | ||
220 | #define IRQ_PD6 BFIN_PD_IRQ(6) | ||
221 | #define IRQ_PD7 BFIN_PD_IRQ(7) | ||
222 | #define IRQ_PD8 BFIN_PD_IRQ(8) | ||
223 | #define IRQ_PD9 BFIN_PD_IRQ(9) | ||
224 | #define IRQ_PD10 BFIN_PD_IRQ(10) | ||
225 | #define IRQ_PD11 BFIN_PD_IRQ(11) | ||
226 | #define IRQ_PD12 BFIN_PD_IRQ(12) | ||
227 | #define IRQ_PD13 BFIN_PD_IRQ(13) | ||
228 | #define IRQ_PD14 BFIN_PD_IRQ(14) | ||
229 | #define IRQ_PD15 BFIN_PD_IRQ(15) | ||
230 | |||
231 | #define BFIN_PE_IRQ(x) ((x) + IRQ_PD15 + 1) | ||
232 | #define IRQ_PE0 BFIN_PE_IRQ(0) | ||
233 | #define IRQ_PE1 BFIN_PE_IRQ(1) | ||
234 | #define IRQ_PE2 BFIN_PE_IRQ(2) | ||
235 | #define IRQ_PE3 BFIN_PE_IRQ(3) | ||
236 | #define IRQ_PE4 BFIN_PE_IRQ(4) | ||
237 | #define IRQ_PE5 BFIN_PE_IRQ(5) | ||
238 | #define IRQ_PE6 BFIN_PE_IRQ(6) | ||
239 | #define IRQ_PE7 BFIN_PE_IRQ(7) | ||
240 | #define IRQ_PE8 BFIN_PE_IRQ(8) | ||
241 | #define IRQ_PE9 BFIN_PE_IRQ(9) | ||
242 | #define IRQ_PE10 BFIN_PE_IRQ(10) | ||
243 | #define IRQ_PE11 BFIN_PE_IRQ(11) | ||
244 | #define IRQ_PE12 BFIN_PE_IRQ(12) | ||
245 | #define IRQ_PE13 BFIN_PE_IRQ(13) | ||
246 | #define IRQ_PE14 BFIN_PE_IRQ(14) | ||
247 | #define IRQ_PE15 BFIN_PE_IRQ(15) | ||
248 | |||
249 | #define BFIN_PF_IRQ(x) ((x) + IRQ_PE15 + 1) | ||
250 | #define IRQ_PF0 BFIN_PF_IRQ(0) | ||
251 | #define IRQ_PF1 BFIN_PF_IRQ(1) | ||
252 | #define IRQ_PF2 BFIN_PF_IRQ(2) | ||
253 | #define IRQ_PF3 BFIN_PF_IRQ(3) | ||
254 | #define IRQ_PF4 BFIN_PF_IRQ(4) | ||
255 | #define IRQ_PF5 BFIN_PF_IRQ(5) | ||
256 | #define IRQ_PF6 BFIN_PF_IRQ(6) | ||
257 | #define IRQ_PF7 BFIN_PF_IRQ(7) | ||
258 | #define IRQ_PF8 BFIN_PF_IRQ(8) | ||
259 | #define IRQ_PF9 BFIN_PF_IRQ(9) | ||
260 | #define IRQ_PF10 BFIN_PF_IRQ(10) | ||
261 | #define IRQ_PF11 BFIN_PF_IRQ(11) | ||
262 | #define IRQ_PF12 BFIN_PF_IRQ(12) | ||
263 | #define IRQ_PF13 BFIN_PF_IRQ(13) | ||
264 | #define IRQ_PF14 BFIN_PF_IRQ(14) | ||
265 | #define IRQ_PF15 BFIN_PF_IRQ(15) | ||
266 | |||
267 | #define BFIN_PG_IRQ(x) ((x) + IRQ_PF15 + 1) | ||
268 | #define IRQ_PG0 BFIN_PG_IRQ(0) | ||
269 | #define IRQ_PG1 BFIN_PG_IRQ(1) | ||
270 | #define IRQ_PG2 BFIN_PG_IRQ(2) | ||
271 | #define IRQ_PG3 BFIN_PG_IRQ(3) | ||
272 | #define IRQ_PG4 BFIN_PG_IRQ(4) | ||
273 | #define IRQ_PG5 BFIN_PG_IRQ(5) | ||
274 | #define IRQ_PG6 BFIN_PG_IRQ(6) | ||
275 | #define IRQ_PG7 BFIN_PG_IRQ(7) | ||
276 | #define IRQ_PG8 BFIN_PG_IRQ(8) | ||
277 | #define IRQ_PG9 BFIN_PG_IRQ(9) | ||
278 | #define IRQ_PG10 BFIN_PG_IRQ(10) | ||
279 | #define IRQ_PG11 BFIN_PG_IRQ(11) | ||
280 | #define IRQ_PG12 BFIN_PG_IRQ(12) | ||
281 | #define IRQ_PG13 BFIN_PG_IRQ(13) | ||
282 | #define IRQ_PG14 BFIN_PG_IRQ(14) | ||
283 | #define IRQ_PG15 BFIN_PG_IRQ(15) | ||
284 | |||
285 | #define BFIN_PH_IRQ(x) ((x) + IRQ_PG15 + 1) | ||
286 | #define IRQ_PH0 BFIN_PH_IRQ(0) | ||
287 | #define IRQ_PH1 BFIN_PH_IRQ(1) | ||
288 | #define IRQ_PH2 BFIN_PH_IRQ(2) | ||
289 | #define IRQ_PH3 BFIN_PH_IRQ(3) | ||
290 | #define IRQ_PH4 BFIN_PH_IRQ(4) | ||
291 | #define IRQ_PH5 BFIN_PH_IRQ(5) | ||
292 | #define IRQ_PH6 BFIN_PH_IRQ(6) | ||
293 | #define IRQ_PH7 BFIN_PH_IRQ(7) | ||
294 | #define IRQ_PH8 BFIN_PH_IRQ(8) | ||
295 | #define IRQ_PH9 BFIN_PH_IRQ(9) | ||
296 | #define IRQ_PH10 BFIN_PH_IRQ(10) | ||
297 | #define IRQ_PH11 BFIN_PH_IRQ(11) | ||
298 | #define IRQ_PH12 BFIN_PH_IRQ(12) | ||
299 | #define IRQ_PH13 BFIN_PH_IRQ(13) | ||
300 | #define IRQ_PH14 BFIN_PH_IRQ(14) /* N/A */ | ||
301 | #define IRQ_PH15 BFIN_PH_IRQ(15) /* N/A */ | ||
302 | |||
303 | #define BFIN_PI_IRQ(x) ((x) + IRQ_PH15 + 1) | ||
304 | #define IRQ_PI0 BFIN_PI_IRQ(0) | ||
305 | #define IRQ_PI1 BFIN_PI_IRQ(1) | ||
306 | #define IRQ_PI2 BFIN_PI_IRQ(2) | ||
307 | #define IRQ_PI3 BFIN_PI_IRQ(3) | ||
308 | #define IRQ_PI4 BFIN_PI_IRQ(4) | ||
309 | #define IRQ_PI5 BFIN_PI_IRQ(5) | ||
310 | #define IRQ_PI6 BFIN_PI_IRQ(6) | ||
311 | #define IRQ_PI7 BFIN_PI_IRQ(7) | ||
312 | #define IRQ_PI8 BFIN_PI_IRQ(8) | ||
313 | #define IRQ_PI9 BFIN_PI_IRQ(9) | ||
314 | #define IRQ_PI10 BFIN_PI_IRQ(10) | ||
315 | #define IRQ_PI11 BFIN_PI_IRQ(11) | ||
316 | #define IRQ_PI12 BFIN_PI_IRQ(12) | ||
317 | #define IRQ_PI13 BFIN_PI_IRQ(13) | ||
318 | #define IRQ_PI14 BFIN_PI_IRQ(14) | ||
319 | #define IRQ_PI15 BFIN_PI_IRQ(15) | ||
320 | |||
321 | #define BFIN_PJ_IRQ(x) ((x) + IRQ_PI15 + 1) | ||
322 | #define IRQ_PJ0 BFIN_PJ_IRQ(0) | ||
323 | #define IRQ_PJ1 BFIN_PJ_IRQ(1) | ||
324 | #define IRQ_PJ2 BFIN_PJ_IRQ(2) | ||
325 | #define IRQ_PJ3 BFIN_PJ_IRQ(3) | ||
326 | #define IRQ_PJ4 BFIN_PJ_IRQ(4) | ||
327 | #define IRQ_PJ5 BFIN_PJ_IRQ(5) | ||
328 | #define IRQ_PJ6 BFIN_PJ_IRQ(6) | ||
329 | #define IRQ_PJ7 BFIN_PJ_IRQ(7) | ||
330 | #define IRQ_PJ8 BFIN_PJ_IRQ(8) | ||
331 | #define IRQ_PJ9 BFIN_PJ_IRQ(9) | ||
332 | #define IRQ_PJ10 BFIN_PJ_IRQ(10) | ||
333 | #define IRQ_PJ11 BFIN_PJ_IRQ(11) | ||
334 | #define IRQ_PJ12 BFIN_PJ_IRQ(12) | ||
335 | #define IRQ_PJ13 BFIN_PJ_IRQ(13) | ||
336 | #define IRQ_PJ14 BFIN_PJ_IRQ(14) /* N/A */ | ||
337 | #define IRQ_PJ15 BFIN_PJ_IRQ(15) /* N/A */ | ||
338 | |||
339 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
340 | #define NR_IRQS (IRQ_PJ15+1) | ||
341 | #else | ||
342 | #define NR_IRQS (SYS_IRQS+1) | ||
343 | #endif | ||
344 | |||
345 | #define IVG7 7 | ||
346 | #define IVG8 8 | ||
347 | #define IVG9 9 | ||
348 | #define IVG10 10 | ||
349 | #define IVG11 11 | ||
350 | #define IVG12 12 | ||
351 | #define IVG13 13 | ||
352 | #define IVG14 14 | ||
353 | #define IVG15 15 | ||
354 | |||
355 | /* IAR0 BIT FIELDS */ | ||
356 | #define IRQ_PLL_WAKEUP_POS 0 | ||
357 | #define IRQ_DMAC0_ERR_POS 4 | ||
358 | #define IRQ_EPPI0_ERR_POS 8 | ||
359 | #define IRQ_SPORT0_ERR_POS 12 | ||
360 | #define IRQ_SPORT1_ERR_POS 16 | ||
361 | #define IRQ_SPI0_ERR_POS 20 | ||
362 | #define IRQ_UART0_ERR_POS 24 | ||
363 | #define IRQ_RTC_POS 28 | ||
364 | |||
365 | /* IAR1 BIT FIELDS */ | ||
366 | #define IRQ_EPPI0_POS 0 | ||
367 | #define IRQ_SPORT0_RX_POS 4 | ||
368 | #define IRQ_SPORT0_TX_POS 8 | ||
369 | #define IRQ_SPORT1_RX_POS 12 | ||
370 | #define IRQ_SPORT1_TX_POS 16 | ||
371 | #define IRQ_SPI0_POS 20 | ||
372 | #define IRQ_UART0_RX_POS 24 | ||
373 | #define IRQ_UART0_TX_POS 28 | ||
374 | |||
375 | /* IAR2 BIT FIELDS */ | ||
376 | #define IRQ_TIMER8_POS 0 | ||
377 | #define IRQ_TIMER9_POS 4 | ||
378 | #define IRQ_TIMER10_POS 8 | ||
379 | #define IRQ_PINT0_POS 12 | ||
380 | #define IRQ_PINT1_POS 16 | ||
381 | #define IRQ_MDMAS0_POS 20 | ||
382 | #define IRQ_MDMAS1_POS 24 | ||
383 | #define IRQ_WATCHDOG_POS 28 | ||
384 | |||
385 | /* IAR3 BIT FIELDS */ | ||
386 | #define IRQ_DMAC1_ERR_POS 0 | ||
387 | #define IRQ_SPORT2_ERR_POS 4 | ||
388 | #define IRQ_SPORT3_ERR_POS 8 | ||
389 | #define IRQ_MXVR_DATA_POS 12 | ||
390 | #define IRQ_SPI1_ERR_POS 16 | ||
391 | #define IRQ_SPI2_ERR_POS 20 | ||
392 | #define IRQ_UART1_ERR_POS 24 | ||
393 | #define IRQ_UART2_ERR_POS 28 | ||
394 | |||
395 | /* IAR4 BIT FILEDS */ | ||
396 | #define IRQ_CAN0_ERR_POS 0 | ||
397 | #define IRQ_SPORT2_RX_POS 4 | ||
398 | #define IRQ_SPORT2_TX_POS 8 | ||
399 | #define IRQ_SPORT3_RX_POS 12 | ||
400 | #define IRQ_SPORT3_TX_POS 16 | ||
401 | #define IRQ_EPPI1_POS 20 | ||
402 | #define IRQ_EPPI2_POS 24 | ||
403 | #define IRQ_SPI1_POS 28 | ||
404 | |||
405 | /* IAR5 BIT FIELDS */ | ||
406 | #define IRQ_SPI2_POS 0 | ||
407 | #define IRQ_UART1_RX_POS 4 | ||
408 | #define IRQ_UART1_TX_POS 8 | ||
409 | #define IRQ_ATAPI_RX_POS 12 | ||
410 | #define IRQ_ATAPI_TX_POS 16 | ||
411 | #define IRQ_TWI0_POS 20 | ||
412 | #define IRQ_TWI1_POS 24 | ||
413 | #define IRQ_CAN0_RX_POS 28 | ||
414 | |||
415 | /* IAR6 BIT FIELDS */ | ||
416 | #define IRQ_CAN0_TX_POS 0 | ||
417 | #define IRQ_MDMAS2_POS 4 | ||
418 | #define IRQ_MDMAS3_POS 8 | ||
419 | #define IRQ_MXVR_ERR_POS 12 | ||
420 | #define IRQ_MXVR_MSG_POS 16 | ||
421 | #define IRQ_MXVR_PKT_POS 20 | ||
422 | #define IRQ_EPPI1_ERR_POS 24 | ||
423 | #define IRQ_EPPI2_ERR_POS 28 | ||
424 | |||
425 | /* IAR7 BIT FIELDS */ | ||
426 | #define IRQ_UART3_ERR_POS 0 | ||
427 | #define IRQ_HOST_ERR_POS 4 | ||
428 | #define IRQ_PIXC_ERR_POS 12 | ||
429 | #define IRQ_NFC_ERR_POS 16 | ||
430 | #define IRQ_ATAPI_ERR_POS 20 | ||
431 | #define IRQ_CAN1_ERR_POS 24 | ||
432 | #define IRQ_HS_DMA_ERR_POS 28 | ||
433 | |||
434 | /* IAR8 BIT FIELDS */ | ||
435 | #define IRQ_PIXC_IN0_POS 0 | ||
436 | #define IRQ_PIXC_IN1_POS 4 | ||
437 | #define IRQ_PIXC_OUT_POS 8 | ||
438 | #define IRQ_SDH_POS 12 | ||
439 | #define IRQ_CNT_POS 16 | ||
440 | #define IRQ_KEY_POS 20 | ||
441 | #define IRQ_CAN1_RX_POS 24 | ||
442 | #define IRQ_CAN1_TX_POS 28 | ||
443 | |||
444 | /* IAR9 BIT FIELDS */ | ||
445 | #define IRQ_SDH_MASK0_POS 0 | ||
446 | #define IRQ_SDH_MASK1_POS 4 | ||
447 | #define IRQ_USB_INT0_POS 12 | ||
448 | #define IRQ_USB_INT1_POS 16 | ||
449 | #define IRQ_USB_INT2_POS 20 | ||
450 | #define IRQ_USB_DMA_POS 24 | ||
451 | #define IRQ_OTPSEC_POS 28 | ||
452 | |||
453 | /* IAR10 BIT FIELDS */ | ||
454 | #define IRQ_TIMER0_POS 24 | ||
455 | #define IRQ_TIMER1_POS 28 | ||
456 | |||
457 | /* IAR11 BIT FIELDS */ | ||
458 | #define IRQ_TIMER2_POS 0 | ||
459 | #define IRQ_TIMER3_POS 4 | ||
460 | #define IRQ_TIMER4_POS 8 | ||
461 | #define IRQ_TIMER5_POS 12 | ||
462 | #define IRQ_TIMER6_POS 16 | ||
463 | #define IRQ_TIMER7_POS 20 | ||
464 | #define IRQ_PINT2_POS 24 | ||
465 | #define IRQ_PINT3_POS 28 | ||
466 | |||
467 | #endif /* _BF548_IRQ_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/mem_init.h b/include/asm-blackfin/mach-bf548/mem_init.h new file mode 100644 index 000000000000..0cb279e973d7 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/mem_init.h | |||
@@ -0,0 +1,189 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/mach-bf548/mem_init.h | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Rev: | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
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 | |||
32 | #if (CONFIG_MEM_MT46V32M16) | ||
33 | |||
34 | #if defined CONFIG_CLKIN_HALF | ||
35 | #define CLKIN_HALF 1 | ||
36 | #else | ||
37 | #define CLKIN_HALF 0 | ||
38 | #endif | ||
39 | |||
40 | #if defined CONFIG_PLL_BYPASS | ||
41 | #define PLL_BYPASS 1 | ||
42 | #else | ||
43 | #define PLL_BYPASS 0 | ||
44 | #endif | ||
45 | |||
46 | /***************************************Currently Not Being Used *********************************/ | ||
47 | #define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
48 | #define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
49 | #define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ)) | ||
50 | #define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
51 | #define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
52 | |||
53 | #if (flash_EBIU_AMBCTL_TT > 3) | ||
54 | #define flash_EBIU_AMBCTL0_TT B0TT_4 | ||
55 | #endif | ||
56 | #if (flash_EBIU_AMBCTL_TT == 3) | ||
57 | #define flash_EBIU_AMBCTL0_TT B0TT_3 | ||
58 | #endif | ||
59 | #if (flash_EBIU_AMBCTL_TT == 2) | ||
60 | #define flash_EBIU_AMBCTL0_TT B0TT_2 | ||
61 | #endif | ||
62 | #if (flash_EBIU_AMBCTL_TT < 2) | ||
63 | #define flash_EBIU_AMBCTL0_TT B0TT_1 | ||
64 | #endif | ||
65 | |||
66 | #if (flash_EBIU_AMBCTL_ST > 3) | ||
67 | #define flash_EBIU_AMBCTL0_ST B0ST_4 | ||
68 | #endif | ||
69 | #if (flash_EBIU_AMBCTL_ST == 3) | ||
70 | #define flash_EBIU_AMBCTL0_ST B0ST_3 | ||
71 | #endif | ||
72 | #if (flash_EBIU_AMBCTL_ST == 2) | ||
73 | #define flash_EBIU_AMBCTL0_ST B0ST_2 | ||
74 | #endif | ||
75 | #if (flash_EBIU_AMBCTL_ST < 2) | ||
76 | #define flash_EBIU_AMBCTL0_ST B0ST_1 | ||
77 | #endif | ||
78 | |||
79 | #if (flash_EBIU_AMBCTL_HT > 2) | ||
80 | #define flash_EBIU_AMBCTL0_HT B0HT_3 | ||
81 | #endif | ||
82 | #if (flash_EBIU_AMBCTL_HT == 2) | ||
83 | #define flash_EBIU_AMBCTL0_HT B0HT_2 | ||
84 | #endif | ||
85 | #if (flash_EBIU_AMBCTL_HT == 1) | ||
86 | #define flash_EBIU_AMBCTL0_HT B0HT_1 | ||
87 | #endif | ||
88 | #if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0) | ||
89 | #define flash_EBIU_AMBCTL0_HT B0HT_0 | ||
90 | #endif | ||
91 | #if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0) | ||
92 | #define flash_EBIU_AMBCTL0_HT B0HT_1 | ||
93 | #endif | ||
94 | |||
95 | #if (flash_EBIU_AMBCTL_WAT > 14) | ||
96 | #define flash_EBIU_AMBCTL0_WAT B0WAT_15 | ||
97 | #endif | ||
98 | #if (flash_EBIU_AMBCTL_WAT == 14) | ||
99 | #define flash_EBIU_AMBCTL0_WAT B0WAT_14 | ||
100 | #endif | ||
101 | #if (flash_EBIU_AMBCTL_WAT == 13) | ||
102 | #define flash_EBIU_AMBCTL0_WAT B0WAT_13 | ||
103 | #endif | ||
104 | #if (flash_EBIU_AMBCTL_WAT == 12) | ||
105 | #define flash_EBIU_AMBCTL0_WAT B0WAT_12 | ||
106 | #endif | ||
107 | #if (flash_EBIU_AMBCTL_WAT == 11) | ||
108 | #define flash_EBIU_AMBCTL0_WAT B0WAT_11 | ||
109 | #endif | ||
110 | #if (flash_EBIU_AMBCTL_WAT == 10) | ||
111 | #define flash_EBIU_AMBCTL0_WAT B0WAT_10 | ||
112 | #endif | ||
113 | #if (flash_EBIU_AMBCTL_WAT == 9) | ||
114 | #define flash_EBIU_AMBCTL0_WAT B0WAT_9 | ||
115 | #endif | ||
116 | #if (flash_EBIU_AMBCTL_WAT == 8) | ||
117 | #define flash_EBIU_AMBCTL0_WAT B0WAT_8 | ||
118 | #endif | ||
119 | #if (flash_EBIU_AMBCTL_WAT == 7) | ||
120 | #define flash_EBIU_AMBCTL0_WAT B0WAT_7 | ||
121 | #endif | ||
122 | #if (flash_EBIU_AMBCTL_WAT == 6) | ||
123 | #define flash_EBIU_AMBCTL0_WAT B0WAT_6 | ||
124 | #endif | ||
125 | #if (flash_EBIU_AMBCTL_WAT == 5) | ||
126 | #define flash_EBIU_AMBCTL0_WAT B0WAT_5 | ||
127 | #endif | ||
128 | #if (flash_EBIU_AMBCTL_WAT == 4) | ||
129 | #define flash_EBIU_AMBCTL0_WAT B0WAT_4 | ||
130 | #endif | ||
131 | #if (flash_EBIU_AMBCTL_WAT == 3) | ||
132 | #define flash_EBIU_AMBCTL0_WAT B0WAT_3 | ||
133 | #endif | ||
134 | #if (flash_EBIU_AMBCTL_WAT == 2) | ||
135 | #define flash_EBIU_AMBCTL0_WAT B0WAT_2 | ||
136 | #endif | ||
137 | #if (flash_EBIU_AMBCTL_WAT == 1) | ||
138 | #define flash_EBIU_AMBCTL0_WAT B0WAT_1 | ||
139 | #endif | ||
140 | |||
141 | #if (flash_EBIU_AMBCTL_RAT > 14) | ||
142 | #define flash_EBIU_AMBCTL0_RAT B0RAT_15 | ||
143 | #endif | ||
144 | #if (flash_EBIU_AMBCTL_RAT == 14) | ||
145 | #define flash_EBIU_AMBCTL0_RAT B0RAT_14 | ||
146 | #endif | ||
147 | #if (flash_EBIU_AMBCTL_RAT == 13) | ||
148 | #define flash_EBIU_AMBCTL0_RAT B0RAT_13 | ||
149 | #endif | ||
150 | #if (flash_EBIU_AMBCTL_RAT == 12) | ||
151 | #define flash_EBIU_AMBCTL0_RAT B0RAT_12 | ||
152 | #endif | ||
153 | #if (flash_EBIU_AMBCTL_RAT == 11) | ||
154 | #define flash_EBIU_AMBCTL0_RAT B0RAT_11 | ||
155 | #endif | ||
156 | #if (flash_EBIU_AMBCTL_RAT == 10) | ||
157 | #define flash_EBIU_AMBCTL0_RAT B0RAT_10 | ||
158 | #endif | ||
159 | #if (flash_EBIU_AMBCTL_RAT == 9) | ||
160 | #define flash_EBIU_AMBCTL0_RAT B0RAT_9 | ||
161 | #endif | ||
162 | #if (flash_EBIU_AMBCTL_RAT == 8) | ||
163 | #define flash_EBIU_AMBCTL0_RAT B0RAT_8 | ||
164 | #endif | ||
165 | #if (flash_EBIU_AMBCTL_RAT == 7) | ||
166 | #define flash_EBIU_AMBCTL0_RAT B0RAT_7 | ||
167 | #endif | ||
168 | #if (flash_EBIU_AMBCTL_RAT == 6) | ||
169 | #define flash_EBIU_AMBCTL0_RAT B0RAT_6 | ||
170 | #endif | ||
171 | #if (flash_EBIU_AMBCTL_RAT == 5) | ||
172 | #define flash_EBIU_AMBCTL0_RAT B0RAT_5 | ||
173 | #endif | ||
174 | #if (flash_EBIU_AMBCTL_RAT == 4) | ||
175 | #define flash_EBIU_AMBCTL0_RAT B0RAT_4 | ||
176 | #endif | ||
177 | #if (flash_EBIU_AMBCTL_RAT == 3) | ||
178 | #define flash_EBIU_AMBCTL0_RAT B0RAT_3 | ||
179 | #endif | ||
180 | #if (flash_EBIU_AMBCTL_RAT == 2) | ||
181 | #define flash_EBIU_AMBCTL0_RAT B0RAT_2 | ||
182 | #endif | ||
183 | #if (flash_EBIU_AMBCTL_RAT == 1) | ||
184 | #define flash_EBIU_AMBCTL0_RAT B0RAT_1 | ||
185 | #endif | ||
186 | |||
187 | #define flash_EBIU_AMBCTL0 \ | ||
188 | (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \ | ||
189 | flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN) | ||
diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h new file mode 100644 index 000000000000..72d80e8a6e81 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/mem_map.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * file: include/asm-blackfin/mach-bf548/mem_map.h | ||
3 | * based on: | ||
4 | * author: | ||
5 | * | ||
6 | * created: | ||
7 | * description: | ||
8 | * Memory MAP Common header file for blackfin BF537/6/4 of processors. | ||
9 | * rev: | ||
10 | * | ||
11 | * modified: | ||
12 | * | ||
13 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
14 | * | ||
15 | * this program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the gnu general public license as published by | ||
17 | * the free software foundation; either version 2, or (at your option) | ||
18 | * any later version. | ||
19 | * | ||
20 | * this program is distributed in the hope that it will be useful, | ||
21 | * but without any warranty; without even the implied warranty of | ||
22 | * merchantability or fitness for a particular purpose. see the | ||
23 | * gnu general public license for more details. | ||
24 | * | ||
25 | * you should have received a copy of the gnu general public license | ||
26 | * along with this program; see the file copying. | ||
27 | * if not, write to the free software foundation, | ||
28 | * 59 temple place - suite 330, boston, ma 02111-1307, usa. | ||
29 | */ | ||
30 | |||
31 | #ifndef _MEM_MAP_548_H_ | ||
32 | #define _MEM_MAP_548_H_ | ||
33 | |||
34 | #define COREMMR_BASE 0xFFE00000 /* Core MMRs */ | ||
35 | #define SYSMMR_BASE 0xFFC00000 /* System MMRs */ | ||
36 | |||
37 | /* Async Memory Banks */ | ||
38 | #define ASYNC_BANK3_BASE 0x2C000000 /* Async Bank 3 */ | ||
39 | #define ASYNC_BANK3_SIZE 0x04000000 /* 64M */ | ||
40 | #define ASYNC_BANK2_BASE 0x28000000 /* Async Bank 2 */ | ||
41 | #define ASYNC_BANK2_SIZE 0x04000000 /* 64M */ | ||
42 | #define ASYNC_BANK1_BASE 0x24000000 /* Async Bank 1 */ | ||
43 | #define ASYNC_BANK1_SIZE 0x04000000 /* 64M */ | ||
44 | #define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */ | ||
45 | #define ASYNC_BANK0_SIZE 0x04000000 /* 64M */ | ||
46 | |||
47 | /* Boot ROM Memory */ | ||
48 | |||
49 | #define BOOT_ROM_START 0xEF000000 | ||
50 | |||
51 | /* Level 1 Memory */ | ||
52 | |||
53 | /* Memory Map for ADSP-BF548 processors */ | ||
54 | #ifdef CONFIG_BLKFIN_ICACHE | ||
55 | #define BLKFIN_ICACHESIZE (16*1024) | ||
56 | #else | ||
57 | #define BLKFIN_ICACHESIZE (0*1024) | ||
58 | #endif | ||
59 | |||
60 | #define L1_CODE_START 0xFFA00000 | ||
61 | #define L1_DATA_A_START 0xFF800000 | ||
62 | #define L1_DATA_B_START 0xFF900000 | ||
63 | |||
64 | #define L1_CODE_LENGTH 0xC000 | ||
65 | |||
66 | #ifdef CONFIG_BLKFIN_DCACHE | ||
67 | |||
68 | #ifdef CONFIG_BLKFIN_DCACHE_BANKA | ||
69 | #define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) | ||
70 | #define L1_DATA_A_LENGTH (0x8000 - 0x4000) | ||
71 | #define L1_DATA_B_LENGTH 0x8000 | ||
72 | #define BLKFIN_DCACHESIZE (16*1024) | ||
73 | #define BLKFIN_DSUPBANKS 1 | ||
74 | #else | ||
75 | #define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) | ||
76 | #define L1_DATA_A_LENGTH (0x8000 - 0x4000) | ||
77 | #define L1_DATA_B_LENGTH (0x8000 - 0x4000) | ||
78 | #define BLKFIN_DCACHESIZE (32*1024) | ||
79 | #define BLKFIN_DSUPBANKS 2 | ||
80 | #endif | ||
81 | |||
82 | #else | ||
83 | #define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) | ||
84 | #define L1_DATA_A_LENGTH 0x8000 | ||
85 | #define L1_DATA_B_LENGTH 0x8000 | ||
86 | #define BLKFIN_DCACHESIZE (0*1024) | ||
87 | #define BLKFIN_DSUPBANKS 0 | ||
88 | #endif /*CONFIG_BLKFIN_DCACHE*/ | ||
89 | |||
90 | /* Scratch Pad Memory */ | ||
91 | |||
92 | #if defined(CONFIG_BF54x) | ||
93 | #define L1_SCRATCH_START 0xFFB00000 | ||
94 | #define L1_SCRATCH_LENGTH 0x1000 | ||
95 | #endif | ||
96 | |||
97 | #endif/* _MEM_MAP_548_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/portmux.h b/include/asm-blackfin/mach-bf548/portmux.h new file mode 100644 index 000000000000..b382deb501a7 --- /dev/null +++ b/include/asm-blackfin/mach-bf548/portmux.h | |||
@@ -0,0 +1,270 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | ||
2 | #define _MACH_PORTMUX_H_ | ||
3 | |||
4 | #define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0)) | ||
5 | #define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0)) | ||
6 | #define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0)) | ||
7 | #define P_SPORT2_TSCLK (P_DEFINED | P_IDENT(GPIO_PA3) | P_FUNCT(0)) | ||
8 | #define P_SPORT2_RFS (P_DEFINED | P_IDENT(GPIO_PA4) | P_FUNCT(0)) | ||
9 | #define P_SPORT2_DRSEC (P_DEFINED | P_IDENT(GPIO_PA5) | P_FUNCT(0)) | ||
10 | #define P_SPORT2_DRPRI (P_DEFINED | P_IDENT(GPIO_PA6) | P_FUNCT(0)) | ||
11 | #define P_SPORT2_RSCLK (P_DEFINED | P_IDENT(GPIO_PA7) | P_FUNCT(0)) | ||
12 | #define P_SPORT3_TFS (P_DEFINED | P_IDENT(GPIO_PA8) | P_FUNCT(0)) | ||
13 | #define P_SPORT3_DTSEC (P_DEFINED | P_IDENT(GPIO_PA9) | P_FUNCT(0)) | ||
14 | #define P_SPORT3_DTPRI (P_DEFINED | P_IDENT(GPIO_PA10) | P_FUNCT(0)) | ||
15 | #define P_SPORT3_TSCLK (P_DEFINED | P_IDENT(GPIO_PA11) | P_FUNCT(0)) | ||
16 | #define P_SPORT3_RFS (P_DEFINED | P_IDENT(GPIO_PA12) | P_FUNCT(0)) | ||
17 | #define P_SPORT3_DRSEC (P_DEFINED | P_IDENT(GPIO_PA13) | P_FUNCT(0)) | ||
18 | #define P_SPORT3_DRPRI (P_DEFINED | P_IDENT(GPIO_PA14) | P_FUNCT(0)) | ||
19 | #define P_SPORT3_RSCLK (P_DEFINED | P_IDENT(GPIO_PA15) | P_FUNCT(0)) | ||
20 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(1)) | ||
21 | #define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PA5) | P_FUNCT(1)) | ||
22 | #define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PA9) | P_FUNCT(1)) | ||
23 | #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PA13) | P_FUNCT(1)) | ||
24 | |||
25 | #define P_TWI1_SCL (P_DEFINED | P_IDENT(GPIO_PB0) | P_FUNCT(0)) | ||
26 | #define P_TWI1_SDA (P_DEFINED | P_IDENT(GPIO_PB1) | P_FUNCT(0)) | ||
27 | #define P_UART3_RTS (P_DEFINED | P_IDENT(GPIO_PB2) | P_FUNCT(0)) | ||
28 | #define P_UART3_CTS (P_DEFINED | P_IDENT(GPIO_PB3) | P_FUNCT(0)) | ||
29 | #define P_UART2_TX (P_DEFINED | P_IDENT(GPIO_PB4) | P_FUNCT(0)) | ||
30 | #define P_UART2_RX (P_DEFINED | P_IDENT(GPIO_PB5) | P_FUNCT(0)) | ||
31 | #define P_UART3_TX (P_DEFINED | P_IDENT(GPIO_PB6) | P_FUNCT(0)) | ||
32 | #define P_UART3_RX (P_DEFINED | P_IDENT(GPIO_PB7) | P_FUNCT(0)) | ||
33 | #define P_SPI2_SS (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(0)) | ||
34 | #define P_SPI2_SSEL1 (P_DEFINED | P_IDENT(GPIO_PB9) | P_FUNCT(0)) | ||
35 | #define P_SPI2_SSEL2 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(0)) | ||
36 | #define P_SPI2_SSEL3 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(0)) | ||
37 | #define P_SPI2_SCK (P_DEFINED | P_IDENT(GPIO_PB12) | P_FUNCT(0)) | ||
38 | #define P_SPI2_MOSI (P_DEFINED | P_IDENT(GPIO_PB13) | P_FUNCT(0)) | ||
39 | #define P_SPI2_MISO (P_DEFINED | P_IDENT(GPIO_PB14) | P_FUNCT(0)) | ||
40 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(1)) | ||
41 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PB9) | P_FUNCT(1)) | ||
42 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(1)) | ||
43 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(1)) | ||
44 | |||
45 | #define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PC0) | P_FUNCT(0)) | ||
46 | #define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PC1) | P_FUNCT(0)) | ||
47 | #define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PC2) | P_FUNCT(0)) | ||
48 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PC3) | P_FUNCT(0)) | ||
49 | #define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PC4) | P_FUNCT(0)) | ||
50 | #define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PC5) | P_FUNCT(0)) | ||
51 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PC6) | P_FUNCT(0)) | ||
52 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PC7) | P_FUNCT(0)) | ||
53 | #define P_SD_D0 (P_DEFINED | P_IDENT(GPIO_PC8) | P_FUNCT(0)) | ||
54 | #define P_SD_D1 (P_DEFINED | P_IDENT(GPIO_PC9) | P_FUNCT(0)) | ||
55 | #define P_SD_D2 (P_DEFINED | P_IDENT(GPIO_PC10) | P_FUNCT(0)) | ||
56 | #define P_SD_D3 (P_DEFINED | P_IDENT(GPIO_PC11) | P_FUNCT(0)) | ||
57 | #define P_SD_CLK (P_DEFINED | P_IDENT(GPIO_PC12) | P_FUNCT(0)) | ||
58 | #define P_SD_CMD (P_DEFINED | P_IDENT(GPIO_PC13) | P_FUNCT(0)) | ||
59 | #define P_MMCLK (P_DEFINED | P_IDENT(GPIO_PC1) | P_FUNCT(1)) | ||
60 | #define P_MBCLK (P_DEFINED | P_IDENT(GPIO_PC5) | P_FUNCT(1)) | ||
61 | |||
62 | #define P_PPI1_D0 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(0)) | ||
63 | #define P_PPI1_D1 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(0)) | ||
64 | #define P_PPI1_D2 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(0)) | ||
65 | #define P_PPI1_D3 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(0)) | ||
66 | #define P_PPI1_D4 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(0)) | ||
67 | #define P_PPI1_D5 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(0)) | ||
68 | #define P_PPI1_D6 (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(0)) | ||
69 | #define P_PPI1_D7 (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(0)) | ||
70 | #define P_PPI1_D8 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(0)) | ||
71 | #define P_PPI1_D9 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(0)) | ||
72 | #define P_PPI1_D10 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(0)) | ||
73 | #define P_PPI1_D11 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(0)) | ||
74 | #define P_PPI1_D12 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(0)) | ||
75 | #define P_PPI1_D13 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(0)) | ||
76 | #define P_PPI1_D14 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(0)) | ||
77 | #define P_PPI1_D15 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(0)) | ||
78 | |||
79 | #define P_HOST_D8 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(1)) | ||
80 | #define P_HOST_D9 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(1)) | ||
81 | #define P_HOST_D10 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(1)) | ||
82 | #define P_HOST_D11 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(1)) | ||
83 | #define P_HOST_D12 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(1)) | ||
84 | #define P_HOST_D13 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(1)) | ||
85 | #define P_HOST_D14 (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(1)) | ||
86 | #define P_HOST_D15 (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(1)) | ||
87 | #define P_HOST_D0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(1)) | ||
88 | #define P_HOST_D1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(1)) | ||
89 | #define P_HOST_D2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(1)) | ||
90 | #define P_HOST_D3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(1)) | ||
91 | #define P_HOST_D4 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(1)) | ||
92 | #define P_HOST_D5 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(1)) | ||
93 | #define P_HOST_D6 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(1)) | ||
94 | #define P_HOST_D7 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(1)) | ||
95 | #define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(2)) | ||
96 | #define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(2)) | ||
97 | #define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(2)) | ||
98 | #define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(2)) | ||
99 | #define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(2)) | ||
100 | #define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(2)) | ||
101 | #define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(2)) | ||
102 | #define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(2)) | ||
103 | #define P_PPI2_D0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(2)) | ||
104 | #define P_PPI2_D1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(2)) | ||
105 | #define P_PPI2_D2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(2)) | ||
106 | #define P_PPI2_D3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(2)) | ||
107 | #define P_PPI2_D4 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(2)) | ||
108 | #define P_PPI2_D5 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(2)) | ||
109 | #define P_PPI2_D6 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(2)) | ||
110 | #define P_PPI2_D7 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(2)) | ||
111 | #define P_PPI0_D18 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(3)) | ||
112 | #define P_PPI0_D19 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(3)) | ||
113 | #define P_PPI0_D20 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(3)) | ||
114 | #define P_PPI0_D21 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(3)) | ||
115 | #define P_PPI0_D22 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(3)) | ||
116 | #define P_PPI0_D23 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(3)) | ||
117 | #define P_KEY_ROW0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(3)) | ||
118 | #define P_KEY_ROW1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(3)) | ||
119 | #define P_KEY_ROW2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(3)) | ||
120 | #define P_KEY_ROW3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(3)) | ||
121 | #define P_KEY_COL0 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(3)) | ||
122 | #define P_KEY_COL1 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(3)) | ||
123 | #define P_KEY_COL2 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(3)) | ||
124 | #define P_KEY_COL3 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(3)) | ||
125 | |||
126 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(0)) | ||
127 | #define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(0)) | ||
128 | #define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(0)) | ||
129 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PE3) | P_FUNCT(0)) | ||
130 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PE4) | P_FUNCT(0)) | ||
131 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PE5) | P_FUNCT(0)) | ||
132 | #define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PE6) | P_FUNCT(0)) | ||
133 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PE7) | P_FUNCT(0)) | ||
134 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PE8) | P_FUNCT(0)) | ||
135 | #define P_UART1_RTS (P_DEFINED | P_IDENT(GPIO_PE9) | P_FUNCT(0)) | ||
136 | #define P_UART1_CTS (P_DEFINED | P_IDENT(GPIO_PE10) | P_FUNCT(0)) | ||
137 | #define P_PPI1_CLK (P_DEFINED | P_IDENT(GPIO_PE11) | P_FUNCT(0)) | ||
138 | #define P_PPI1_FS1 (P_DEFINED | P_IDENT(GPIO_PE12) | P_FUNCT(0)) | ||
139 | #define P_PPI1_FS2 (P_DEFINED | P_IDENT(GPIO_PE13) | P_FUNCT(0)) | ||
140 | #define P_TWI0_SCL (P_DEFINED | P_IDENT(GPIO_PE14) | P_FUNCT(0)) | ||
141 | #define P_TWI0_SDA (P_DEFINED | P_IDENT(GPIO_PE15) | P_FUNCT(0)) | ||
142 | #define P_KEY_COL7 (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(1)) | ||
143 | #define P_KEY_ROW6 (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(1)) | ||
144 | #define P_KEY_COL6 (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(1)) | ||
145 | #define P_KEY_ROW5 (P_DEFINED | P_IDENT(GPIO_PE3) | P_FUNCT(1)) | ||
146 | #define P_KEY_COL5 (P_DEFINED | P_IDENT(GPIO_PE4) | P_FUNCT(1)) | ||
147 | #define P_KEY_ROW4 (P_DEFINED | P_IDENT(GPIO_PE5) | P_FUNCT(1)) | ||
148 | #define P_KEY_COL4 (P_DEFINED | P_IDENT(GPIO_PE6) | P_FUNCT(1)) | ||
149 | #define P_KEY_ROW7 (P_DEFINED | P_IDENT(GPIO_PE7) | P_FUNCT(1)) | ||
150 | |||
151 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | ||
152 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | ||
153 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | ||
154 | #define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0)) | ||
155 | #define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0)) | ||
156 | #define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0)) | ||
157 | #define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0)) | ||
158 | #define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0)) | ||
159 | #define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0)) | ||
160 | #define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0)) | ||
161 | #define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0)) | ||
162 | #define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0)) | ||
163 | #define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0)) | ||
164 | #define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0)) | ||
165 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0)) | ||
166 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0)) | ||
167 | #define P_ATAPI_D0A (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1)) | ||
168 | #define P_ATAPI_D1A (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1)) | ||
169 | #define P_ATAPI_D2A (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1)) | ||
170 | #define P_ATAPI_D3A (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1)) | ||
171 | #define P_ATAPI_D4A (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1)) | ||
172 | #define P_ATAPI_D5A (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1)) | ||
173 | #define P_ATAPI_D6A (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1)) | ||
174 | #define P_ATAPI_D7A (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1)) | ||
175 | #define P_ATAPI_D8A (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1)) | ||
176 | #define P_ATAPI_D9A (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1)) | ||
177 | #define P_ATAPI_D10A (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(1)) | ||
178 | #define P_ATAPI_D11A (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(1)) | ||
179 | #define P_ATAPI_D12A (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(1)) | ||
180 | #define P_ATAPI_D13A (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(1)) | ||
181 | #define P_ATAPI_D14A (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | ||
182 | #define P_ATAPI_D15A (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | ||
183 | |||
184 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0)) | ||
185 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | ||
186 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(0)) | ||
187 | #define P_PPI0_D16 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0)) | ||
188 | #define P_PPI0_D17 (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0)) | ||
189 | #define P_SPI1_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0)) | ||
190 | #define P_SPI1_SSEL2 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0)) | ||
191 | #define P_SPI1_SSEL3 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0)) | ||
192 | #define P_SPI1_SCK (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0)) | ||
193 | #define P_SPI1_MISO (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0)) | ||
194 | #define P_SPI1_MOSI (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0)) | ||
195 | #define P_SPI1_SS (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0)) | ||
196 | #define P_CAN0_TX (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0)) | ||
197 | #define P_CAN0_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0)) | ||
198 | #define P_CAN1_TX (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0)) | ||
199 | #define P_CAN1_RX (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0)) | ||
200 | #define P_ATAPI_A0A (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(1)) | ||
201 | #define P_ATAPI_A1A (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) | ||
202 | #define P_ATAPI_A2A (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(1)) | ||
203 | #define P_HOST_CE (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(1)) | ||
204 | #define P_HOST_RD (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1)) | ||
205 | #define P_HOST_WR (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1)) | ||
206 | #define P_MTXONB (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1)) | ||
207 | #define P_PPI2_FS2 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) | ||
208 | #define P_PPI2_FS1 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) | ||
209 | #define P_PPI2_CLK (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) | ||
210 | #define P_CNT_CZM (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(3)) | ||
211 | |||
212 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0)) | ||
213 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0)) | ||
214 | #define P_ATAPI_RESET (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0)) | ||
215 | #define P_HOST_ADDR (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0)) | ||
216 | #define P_HOST_ACK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0)) | ||
217 | #define P_MTX (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0)) | ||
218 | #define P_MRX (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0)) | ||
219 | #define P_MRXONB (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0)) | ||
220 | #define P_A4 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0)) | ||
221 | #define P_A5 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0)) | ||
222 | #define P_A6 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0)) | ||
223 | #define P_A7 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0)) | ||
224 | #define P_A8 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0)) | ||
225 | #define P_A9 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0)) | ||
226 | #define P_PPI1_FS3 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1)) | ||
227 | #define P_PPI2_FS3 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(1)) | ||
228 | #define P_TMR8 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(1)) | ||
229 | #define P_TMR9 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(1)) | ||
230 | #define P_TMR10 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1)) | ||
231 | #define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1)) | ||
232 | #define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1)) | ||
233 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(2)) | ||
234 | #define P_CNT_CDG (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(2)) | ||
235 | #define P_CNT_CUD (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(2)) | ||
236 | |||
237 | #define P_A10 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI0) | P_FUNCT(0)) | ||
238 | #define P_A11 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI1) | P_FUNCT(0)) | ||
239 | #define P_A12 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI2) | P_FUNCT(0)) | ||
240 | #define P_A13 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI3) | P_FUNCT(0)) | ||
241 | #define P_A14 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI4) | P_FUNCT(0)) | ||
242 | #define P_A15 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI5) | P_FUNCT(0)) | ||
243 | #define P_A16 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI6) | P_FUNCT(0)) | ||
244 | #define P_A17 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI7) | P_FUNCT(0)) | ||
245 | #define P_A18 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI8) | P_FUNCT(0)) | ||
246 | #define P_A19 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI9) | P_FUNCT(0)) | ||
247 | #define P_A20 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI10) | P_FUNCT(0)) | ||
248 | #define P_A21 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI11) | P_FUNCT(0)) | ||
249 | #define P_A22 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI12) | P_FUNCT(0)) | ||
250 | #define P_A23 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI13) | P_FUNCT(0)) | ||
251 | #define P_A24 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI14) | P_FUNCT(0)) | ||
252 | #define P_A25 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI15) | P_FUNCT(0)) | ||
253 | #define P_NOR_CLK (P_DEFINED | P_IDENT(GPIO_PI15) | P_FUNCT(1)) | ||
254 | |||
255 | #define P_AMC_ARDY_NOR_WAIT (P_DEFINED | P_IDENT(GPIO_PJ0) | P_FUNCT(0)) | ||
256 | #define P_NAND_CE (P_DEFINED | P_IDENT(GPIO_PJ1) | P_FUNCT(0)) | ||
257 | #define P_NAND_RB (P_DEFINED | P_IDENT(GPIO_PJ2) | P_FUNCT(0)) | ||
258 | #define P_ATAPI_DIOR (P_DEFINED | P_IDENT(GPIO_PJ3) | P_FUNCT(0)) | ||
259 | #define P_ATAPI_DIOW (P_DEFINED | P_IDENT(GPIO_PJ4) | P_FUNCT(0)) | ||
260 | #define P_ATAPI_CS0 (P_DEFINED | P_IDENT(GPIO_PJ5) | P_FUNCT(0)) | ||
261 | #define P_ATAPI_CS1 (P_DEFINED | P_IDENT(GPIO_PJ6) | P_FUNCT(0)) | ||
262 | #define P_ATAPI_DMACK (P_DEFINED | P_IDENT(GPIO_PJ7) | P_FUNCT(0)) | ||
263 | #define P_ATAPI_DMARQ (P_DEFINED | P_IDENT(GPIO_PJ8) | P_FUNCT(0)) | ||
264 | #define P_ATAPI_INTRQ (P_DEFINED | P_IDENT(GPIO_PJ9) | P_FUNCT(0)) | ||
265 | #define P_ATAPI_IORDY (P_DEFINED | P_IDENT(GPIO_PJ10) | P_FUNCT(0)) | ||
266 | #define P_AMC_BR (P_DEFINED | P_IDENT(GPIO_PJ11) | P_FUNCT(0)) | ||
267 | #define P_AMC_BG (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0)) | ||
268 | #define P_AMC_BGH (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0)) | ||
269 | |||
270 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index b14f872e5703..1a8ec9e46922 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h | |||
@@ -57,12 +57,14 @@ | |||
57 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 57 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
58 | static __inline__ void bfin_write_VR_CTL(unsigned int val) | 58 | static __inline__ void bfin_write_VR_CTL(unsigned int val) |
59 | { | 59 | { |
60 | unsigned long flags, iwr; | 60 | unsigned long flags, iwr0, iwr1; |
61 | 61 | ||
62 | /* Enable the PLL Wakeup bit in SIC IWR */ | 62 | /* Enable the PLL Wakeup bit in SIC IWR */ |
63 | iwr = bfin_read32(SICA_IWR0); | 63 | iwr0 = bfin_read32(SICA_IWR0); |
64 | iwr1 = bfin_read32(SICA_IWR1); | ||
64 | /* Only allow PPL Wakeup) */ | 65 | /* Only allow PPL Wakeup) */ |
65 | bfin_write32(SICA_IWR0, IWR_ENABLE(0)); | 66 | bfin_write32(SICA_IWR0, IWR_ENABLE(0)); |
67 | bfin_write32(SICA_IWR1, 0); | ||
66 | 68 | ||
67 | bfin_write16(VR_CTL, val); | 69 | bfin_write16(VR_CTL, val); |
68 | __builtin_bfin_ssync(); | 70 | __builtin_bfin_ssync(); |
@@ -70,7 +72,8 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
70 | local_irq_save(flags); | 72 | local_irq_save(flags); |
71 | asm("IDLE;"); | 73 | asm("IDLE;"); |
72 | local_irq_restore(flags); | 74 | local_irq_restore(flags); |
73 | bfin_write32(SICA_IWR0, iwr); | 75 | bfin_write32(SICA_IWR0, iwr0); |
76 | bfin_write32(SICA_IWR1, iwr1); | ||
74 | } | 77 | } |
75 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 78 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
76 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) | 79 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) |
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h index 21d982003e75..766334b7d8ab 100644 --- a/include/asm-blackfin/mach-bf561/dma.h +++ b/include/asm-blackfin/mach-bf561/dma.h | |||
@@ -32,4 +32,7 @@ | |||
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 | |||
35 | #endif | 38 | #endif |
diff --git a/include/asm-blackfin/mach-bf561/portmux.h b/include/asm-blackfin/mach-bf561/portmux.h new file mode 100644 index 000000000000..10d11d5ffe23 --- /dev/null +++ b/include/asm-blackfin/mach-bf561/portmux.h | |||
@@ -0,0 +1,87 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | ||
2 | #define _MACH_PORTMUX_H_ | ||
3 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | ||
5 | #define P_PPI0_FS1 (P_DONTCARE) | ||
6 | #define P_PPI0_FS2 (P_DONTCARE) | ||
7 | #define P_PPI0_FS3 (P_DONTCARE) | ||
8 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF47)) | ||
9 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF46)) | ||
10 | #define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF45)) | ||
11 | #define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF44)) | ||
12 | #define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF43)) | ||
13 | #define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF42)) | ||
14 | #define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF41)) | ||
15 | #define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF40)) | ||
16 | #define P_PPI0_D0 (P_DONTCARE) | ||
17 | #define P_PPI0_D1 (P_DONTCARE) | ||
18 | #define P_PPI0_D2 (P_DONTCARE) | ||
19 | #define P_PPI0_D3 (P_DONTCARE) | ||
20 | #define P_PPI0_D4 (P_DONTCARE) | ||
21 | #define P_PPI0_D5 (P_DONTCARE) | ||
22 | #define P_PPI0_D6 (P_DONTCARE) | ||
23 | #define P_PPI0_D7 (P_DONTCARE) | ||
24 | #define P_PPI1_CLK (P_DONTCARE) | ||
25 | #define P_PPI1_FS1 (P_DONTCARE) | ||
26 | #define P_PPI1_FS2 (P_DONTCARE) | ||
27 | #define P_PPI1_FS3 (P_DONTCARE) | ||
28 | #define P_PPI1_D15 (P_DEFINED | P_IDENT(GPIO_PF39)) | ||
29 | #define P_PPI1_D14 (P_DEFINED | P_IDENT(GPIO_PF38)) | ||
30 | #define P_PPI1_D13 (P_DEFINED | P_IDENT(GPIO_PF37)) | ||
31 | #define P_PPI1_D12 (P_DEFINED | P_IDENT(GPIO_PF36)) | ||
32 | #define P_PPI1_D11 (P_DEFINED | P_IDENT(GPIO_PF35)) | ||
33 | #define P_PPI1_D10 (P_DEFINED | P_IDENT(GPIO_PF34)) | ||
34 | #define P_PPI1_D9 (P_DEFINED | P_IDENT(GPIO_PF33)) | ||
35 | #define P_PPI1_D8 (P_DEFINED | P_IDENT(GPIO_PF32)) | ||
36 | #define P_PPI1_D0 (P_DONTCARE) | ||
37 | #define P_PPI1_D1 (P_DONTCARE) | ||
38 | #define P_PPI1_D2 (P_DONTCARE) | ||
39 | #define P_PPI1_D3 (P_DONTCARE) | ||
40 | #define P_PPI1_D4 (P_DONTCARE) | ||
41 | #define P_PPI1_D5 (P_DONTCARE) | ||
42 | #define P_PPI1_D6 (P_DONTCARE) | ||
43 | #define P_PPI1_D7 (P_DONTCARE) | ||
44 | #define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PF31)) | ||
45 | #define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PF30)) | ||
46 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PF29)) | ||
47 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PF28)) | ||
48 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF27)) | ||
49 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF26)) | ||
50 | #define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PF25)) | ||
51 | #define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PF24)) | ||
52 | #define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PF23)) | ||
53 | #define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PF22)) | ||
54 | #define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PF21)) | ||
55 | #define P_SPORT1_DRPRI (P_DONTCARE) | ||
56 | #define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PF20)) | ||
57 | #define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PF19)) | ||
58 | #define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PF18)) | ||
59 | #define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PF17)) | ||
60 | #define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PF16)) | ||
61 | #define P_SPORT0_DRPRI (P_DONTCARE) | ||
62 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15)) | ||
63 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF7)) | ||
64 | #define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF6)) | ||
65 | #define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5)) | ||
66 | #define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF4)) | ||
67 | #define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF3)) | ||
68 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) | ||
69 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) | ||
70 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) | ||
71 | #define P_TMR11 (P_DONTCARE) | ||
72 | #define P_TMR10 (P_DONTCARE) | ||
73 | #define P_TMR9 (P_DONTCARE) | ||
74 | #define P_TMR8 (P_DONTCARE) | ||
75 | #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PF7)) | ||
76 | #define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PF6)) | ||
77 | #define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PF5)) | ||
78 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PF4)) | ||
79 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF3)) | ||
80 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF2)) | ||
81 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF1)) | ||
82 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF0)) | ||
83 | #define P_SPI0_MOSI (P_DONTCARE) | ||
84 | #define P_SPI0_MIS0 (P_DONTCARE) | ||
85 | #define P_SPI0_SCK (P_DONTCARE) | ||
86 | |||
87 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h index 58f878947cbc..94ed381e5606 100644 --- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h | |||
@@ -40,16 +40,7 @@ | |||
40 | #define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val) | 40 | #define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val) |
41 | #define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL) | 41 | #define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL) |
42 | #ifdef ANOMALY_05000125 | 42 | #ifdef ANOMALY_05000125 |
43 | static __inline__ void bfin_write_DMEM_CONTROL(unsigned int val) | 43 | extern void bfin_write_DMEM_CONTROL(unsigned int val); |
44 | { | ||
45 | unsigned long flags, iwr; | ||
46 | |||
47 | local_irq_save(flags); | ||
48 | __asm__(".align 8\n"); | ||
49 | bfin_write32(IMEM_CONTROL, val); | ||
50 | __builtin_bfin_ssync(); | ||
51 | local_irq_restore(flags); | ||
52 | } | ||
53 | #else | 44 | #else |
54 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) | 45 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) |
55 | #endif | 46 | #endif |
@@ -139,17 +130,7 @@ static __inline__ void bfin_write_DMEM_CONTROL(unsigned int val) | |||
139 | */ | 130 | */ |
140 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) | 131 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) |
141 | #ifdef ANOMALY_05000125 | 132 | #ifdef ANOMALY_05000125 |
142 | static __inline__ void bfin_write_IMEM_CONTROL(unsigned int val) | 133 | extern void bfin_write_IMEM_CONTROL(unsigned int val); |
143 | { | ||
144 | unsigned long flags, iwr; | ||
145 | |||
146 | local_irq_save(flags); | ||
147 | __asm__(".align 8\n"); | ||
148 | bfin_write32(IMEM_CONTROL, val); | ||
149 | __builtin_bfin_ssync(); | ||
150 | local_irq_restore(flags); | ||
151 | |||
152 | } | ||
153 | #else | 134 | #else |
154 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) | 135 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) |
155 | #endif | 136 | #endif |
diff --git a/include/asm-blackfin/mman.h b/include/asm-blackfin/mman.h index 4d504f908c0c..b58f5ad3f024 100644 --- a/include/asm-blackfin/mman.h +++ b/include/asm-blackfin/mman.h | |||
@@ -22,8 +22,6 @@ | |||
22 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 22 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | #define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could | ||
26 | be uninitialized. */ | ||
27 | 25 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | 26 | #define MS_ASYNC 1 /* sync memory asynchronously */ |
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | 27 | #define MS_INVALIDATE 2 /* invalidate the caches */ |
diff --git a/include/asm-blackfin/page.h b/include/asm-blackfin/page.h index ffad947f1b2a..8bc86717021c 100644 --- a/include/asm-blackfin/page.h +++ b/include/asm-blackfin/page.h | |||
@@ -4,7 +4,11 @@ | |||
4 | /* PAGE_SHIFT determines the page size */ | 4 | /* PAGE_SHIFT determines the page size */ |
5 | 5 | ||
6 | #define PAGE_SHIFT 12 | 6 | #define PAGE_SHIFT 12 |
7 | #ifdef __ASSEMBLY__ | ||
8 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
9 | #else | ||
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 10 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
11 | #endif | ||
8 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 12 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
9 | 13 | ||
10 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
diff --git a/include/asm-blackfin/portmux.h b/include/asm-blackfin/portmux.h new file mode 100644 index 000000000000..9d3681e42111 --- /dev/null +++ b/include/asm-blackfin/portmux.h | |||
@@ -0,0 +1,1133 @@ | |||
1 | /* | ||
2 | * Common header file for blackfin family of processors. | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifndef _PORTMUX_H_ | ||
7 | #define _PORTMUX_H_ | ||
8 | |||
9 | #define P_IDENT(x) ((x) & 0x1FF) | ||
10 | #define P_FUNCT(x) (((x) & 0x3) << 9) | ||
11 | #define P_FUNCT2MUX(x) (((x) >> 9) & 0x3) | ||
12 | #define P_DEFINED 0x8000 | ||
13 | #define P_UNDEF 0x4000 | ||
14 | #define P_MAYSHARE 0x2000 | ||
15 | #define P_DONTCARE 0x1000 | ||
16 | |||
17 | #include <asm/gpio.h> | ||
18 | #include <asm/mach/portmux.h> | ||
19 | |||
20 | #ifndef P_SPORT2_TFS | ||
21 | #define P_SPORT2_TFS P_UNDEF | ||
22 | #endif | ||
23 | |||
24 | #ifndef P_SPORT2_DTSEC | ||
25 | #define P_SPORT2_DTSEC P_UNDEF | ||
26 | #endif | ||
27 | |||
28 | #ifndef P_SPORT2_DTPRI | ||
29 | #define P_SPORT2_DTPRI P_UNDEF | ||
30 | #endif | ||
31 | |||
32 | #ifndef P_SPORT2_TSCLK | ||
33 | #define P_SPORT2_TSCLK P_UNDEF | ||
34 | #endif | ||
35 | |||
36 | #ifndef P_SPORT2_RFS | ||
37 | #define P_SPORT2_RFS P_UNDEF | ||
38 | #endif | ||
39 | |||
40 | #ifndef P_SPORT2_DRSEC | ||
41 | #define P_SPORT2_DRSEC P_UNDEF | ||
42 | #endif | ||
43 | |||
44 | #ifndef P_SPORT2_DRPRI | ||
45 | #define P_SPORT2_DRPRI P_UNDEF | ||
46 | #endif | ||
47 | |||
48 | #ifndef P_SPORT2_RSCLK | ||
49 | #define P_SPORT2_RSCLK P_UNDEF | ||
50 | #endif | ||
51 | |||
52 | #ifndef P_SPORT3_TFS | ||
53 | #define P_SPORT3_TFS P_UNDEF | ||
54 | #endif | ||
55 | |||
56 | #ifndef P_SPORT3_DTSEC | ||
57 | #define P_SPORT3_DTSEC P_UNDEF | ||
58 | #endif | ||
59 | |||
60 | #ifndef P_SPORT3_DTPRI | ||
61 | #define P_SPORT3_DTPRI P_UNDEF | ||
62 | #endif | ||
63 | |||
64 | #ifndef P_SPORT3_TSCLK | ||
65 | #define P_SPORT3_TSCLK P_UNDEF | ||
66 | #endif | ||
67 | |||
68 | #ifndef P_SPORT3_RFS | ||
69 | #define P_SPORT3_RFS P_UNDEF | ||
70 | #endif | ||
71 | |||
72 | #ifndef P_SPORT3_DRSEC | ||
73 | #define P_SPORT3_DRSEC P_UNDEF | ||
74 | #endif | ||
75 | |||
76 | #ifndef P_SPORT3_DRPRI | ||
77 | #define P_SPORT3_DRPRI P_UNDEF | ||
78 | #endif | ||
79 | |||
80 | #ifndef P_SPORT3_RSCLK | ||
81 | #define P_SPORT3_RSCLK P_UNDEF | ||
82 | #endif | ||
83 | |||
84 | #ifndef P_TMR4 | ||
85 | #define P_TMR4 P_UNDEF | ||
86 | #endif | ||
87 | |||
88 | #ifndef P_TMR5 | ||
89 | #define P_TMR5 P_UNDEF | ||
90 | #endif | ||
91 | |||
92 | #ifndef P_TMR6 | ||
93 | #define P_TMR6 P_UNDEF | ||
94 | #endif | ||
95 | |||
96 | #ifndef P_TMR7 | ||
97 | #define P_TMR7 P_UNDEF | ||
98 | #endif | ||
99 | |||
100 | #ifndef P_TWI1_SCL | ||
101 | #define P_TWI1_SCL P_UNDEF | ||
102 | #endif | ||
103 | |||
104 | #ifndef P_TWI1_SDA | ||
105 | #define P_TWI1_SDA P_UNDEF | ||
106 | #endif | ||
107 | |||
108 | #ifndef P_UART3_RTS | ||
109 | #define P_UART3_RTS P_UNDEF | ||
110 | #endif | ||
111 | |||
112 | #ifndef P_UART3_CTS | ||
113 | #define P_UART3_CTS P_UNDEF | ||
114 | #endif | ||
115 | |||
116 | #ifndef P_UART2_TX | ||
117 | #define P_UART2_TX P_UNDEF | ||
118 | #endif | ||
119 | |||
120 | #ifndef P_UART2_RX | ||
121 | #define P_UART2_RX P_UNDEF | ||
122 | #endif | ||
123 | |||
124 | #ifndef P_UART3_TX | ||
125 | #define P_UART3_TX P_UNDEF | ||
126 | #endif | ||
127 | |||
128 | #ifndef P_UART3_RX | ||
129 | #define P_UART3_RX P_UNDEF | ||
130 | #endif | ||
131 | |||
132 | #ifndef P_SPI2_SS | ||
133 | #define P_SPI2_SS P_UNDEF | ||
134 | #endif | ||
135 | |||
136 | #ifndef P_SPI2_SSEL1 | ||
137 | #define P_SPI2_SSEL1 P_UNDEF | ||
138 | #endif | ||
139 | |||
140 | #ifndef P_SPI2_SSEL2 | ||
141 | #define P_SPI2_SSEL2 P_UNDEF | ||
142 | #endif | ||
143 | |||
144 | #ifndef P_SPI2_SSEL3 | ||
145 | #define P_SPI2_SSEL3 P_UNDEF | ||
146 | #endif | ||
147 | |||
148 | #ifndef P_SPI2_SCK | ||
149 | #define P_SPI2_SCK P_UNDEF | ||
150 | #endif | ||
151 | |||
152 | #ifndef P_SPI2_MOSI | ||
153 | #define P_SPI2_MOSI P_UNDEF | ||
154 | #endif | ||
155 | |||
156 | #ifndef P_SPI2_MISO | ||
157 | #define P_SPI2_MISO P_UNDEF | ||
158 | #endif | ||
159 | |||
160 | #ifndef P_TMR0 | ||
161 | #define P_TMR0 P_UNDEF | ||
162 | #endif | ||
163 | |||
164 | #ifndef P_TMR1 | ||
165 | #define P_TMR1 P_UNDEF | ||
166 | #endif | ||
167 | |||
168 | #ifndef P_TMR2 | ||
169 | #define P_TMR2 P_UNDEF | ||
170 | #endif | ||
171 | |||
172 | #ifndef P_TMR3 | ||
173 | #define P_TMR3 P_UNDEF | ||
174 | #endif | ||
175 | |||
176 | #ifndef P_SPORT0_TFS | ||
177 | #define P_SPORT0_TFS P_UNDEF | ||
178 | #endif | ||
179 | |||
180 | #ifndef P_SPORT0_DTSEC | ||
181 | #define P_SPORT0_DTSEC P_UNDEF | ||
182 | #endif | ||
183 | |||
184 | #ifndef P_SPORT0_DTPRI | ||
185 | #define P_SPORT0_DTPRI P_UNDEF | ||
186 | #endif | ||
187 | |||
188 | #ifndef P_SPORT0_TSCLK | ||
189 | #define P_SPORT0_TSCLK P_UNDEF | ||
190 | #endif | ||
191 | |||
192 | #ifndef P_SPORT0_RFS | ||
193 | #define P_SPORT0_RFS P_UNDEF | ||
194 | #endif | ||
195 | |||
196 | #ifndef P_SPORT0_DRSEC | ||
197 | #define P_SPORT0_DRSEC P_UNDEF | ||
198 | #endif | ||
199 | |||
200 | #ifndef P_SPORT0_DRPRI | ||
201 | #define P_SPORT0_DRPRI P_UNDEF | ||
202 | #endif | ||
203 | |||
204 | #ifndef P_SPORT0_RSCLK | ||
205 | #define P_SPORT0_RSCLK P_UNDEF | ||
206 | #endif | ||
207 | |||
208 | #ifndef P_SD_D0 | ||
209 | #define P_SD_D0 P_UNDEF | ||
210 | #endif | ||
211 | |||
212 | #ifndef P_SD_D1 | ||
213 | #define P_SD_D1 P_UNDEF | ||
214 | #endif | ||
215 | |||
216 | #ifndef P_SD_D2 | ||
217 | #define P_SD_D2 P_UNDEF | ||
218 | #endif | ||
219 | |||
220 | #ifndef P_SD_D3 | ||
221 | #define P_SD_D3 P_UNDEF | ||
222 | #endif | ||
223 | |||
224 | #ifndef P_SD_CLK | ||
225 | #define P_SD_CLK P_UNDEF | ||
226 | #endif | ||
227 | |||
228 | #ifndef P_SD_CMD | ||
229 | #define P_SD_CMD P_UNDEF | ||
230 | #endif | ||
231 | |||
232 | #ifndef P_MMCLK | ||
233 | #define P_MMCLK P_UNDEF | ||
234 | #endif | ||
235 | |||
236 | #ifndef P_MBCLK | ||
237 | #define P_MBCLK P_UNDEF | ||
238 | #endif | ||
239 | |||
240 | #ifndef P_PPI1_D0 | ||
241 | #define P_PPI1_D0 P_UNDEF | ||
242 | #endif | ||
243 | |||
244 | #ifndef P_PPI1_D1 | ||
245 | #define P_PPI1_D1 P_UNDEF | ||
246 | #endif | ||
247 | |||
248 | #ifndef P_PPI1_D2 | ||
249 | #define P_PPI1_D2 P_UNDEF | ||
250 | #endif | ||
251 | |||
252 | #ifndef P_PPI1_D3 | ||
253 | #define P_PPI1_D3 P_UNDEF | ||
254 | #endif | ||
255 | |||
256 | #ifndef P_PPI1_D4 | ||
257 | #define P_PPI1_D4 P_UNDEF | ||
258 | #endif | ||
259 | |||
260 | #ifndef P_PPI1_D5 | ||
261 | #define P_PPI1_D5 P_UNDEF | ||
262 | #endif | ||
263 | |||
264 | #ifndef P_PPI1_D6 | ||
265 | #define P_PPI1_D6 P_UNDEF | ||
266 | #endif | ||
267 | |||
268 | #ifndef P_PPI1_D7 | ||
269 | #define P_PPI1_D7 P_UNDEF | ||
270 | #endif | ||
271 | |||
272 | #ifndef P_PPI1_D8 | ||
273 | #define P_PPI1_D8 P_UNDEF | ||
274 | #endif | ||
275 | |||
276 | #ifndef P_PPI1_D9 | ||
277 | #define P_PPI1_D9 P_UNDEF | ||
278 | #endif | ||
279 | |||
280 | #ifndef P_PPI1_D10 | ||
281 | #define P_PPI1_D10 P_UNDEF | ||
282 | #endif | ||
283 | |||
284 | #ifndef P_PPI1_D11 | ||
285 | #define P_PPI1_D11 P_UNDEF | ||
286 | #endif | ||
287 | |||
288 | #ifndef P_PPI1_D12 | ||
289 | #define P_PPI1_D12 P_UNDEF | ||
290 | #endif | ||
291 | |||
292 | #ifndef P_PPI1_D13 | ||
293 | #define P_PPI1_D13 P_UNDEF | ||
294 | #endif | ||
295 | |||
296 | #ifndef P_PPI1_D14 | ||
297 | #define P_PPI1_D14 P_UNDEF | ||
298 | #endif | ||
299 | |||
300 | #ifndef P_PPI1_D15 | ||
301 | #define P_PPI1_D15 P_UNDEF | ||
302 | #endif | ||
303 | |||
304 | #ifndef P_HOST_D8 | ||
305 | #define P_HOST_D8 P_UNDEF | ||
306 | #endif | ||
307 | |||
308 | #ifndef P_HOST_D9 | ||
309 | #define P_HOST_D9 P_UNDEF | ||
310 | #endif | ||
311 | |||
312 | #ifndef P_HOST_D10 | ||
313 | #define P_HOST_D10 P_UNDEF | ||
314 | #endif | ||
315 | |||
316 | #ifndef P_HOST_D11 | ||
317 | #define P_HOST_D11 P_UNDEF | ||
318 | #endif | ||
319 | |||
320 | #ifndef P_HOST_D12 | ||
321 | #define P_HOST_D12 P_UNDEF | ||
322 | #endif | ||
323 | |||
324 | #ifndef P_HOST_D13 | ||
325 | #define P_HOST_D13 P_UNDEF | ||
326 | #endif | ||
327 | |||
328 | #ifndef P_HOST_D14 | ||
329 | #define P_HOST_D14 P_UNDEF | ||
330 | #endif | ||
331 | |||
332 | #ifndef P_HOST_D15 | ||
333 | #define P_HOST_D15 P_UNDEF | ||
334 | #endif | ||
335 | |||
336 | #ifndef P_HOST_D0 | ||
337 | #define P_HOST_D0 P_UNDEF | ||
338 | #endif | ||
339 | |||
340 | #ifndef P_HOST_D1 | ||
341 | #define P_HOST_D1 P_UNDEF | ||
342 | #endif | ||
343 | |||
344 | #ifndef P_HOST_D2 | ||
345 | #define P_HOST_D2 P_UNDEF | ||
346 | #endif | ||
347 | |||
348 | #ifndef P_HOST_D3 | ||
349 | #define P_HOST_D3 P_UNDEF | ||
350 | #endif | ||
351 | |||
352 | #ifndef P_HOST_D4 | ||
353 | #define P_HOST_D4 P_UNDEF | ||
354 | #endif | ||
355 | |||
356 | #ifndef P_HOST_D5 | ||
357 | #define P_HOST_D5 P_UNDEF | ||
358 | #endif | ||
359 | |||
360 | #ifndef P_HOST_D6 | ||
361 | #define P_HOST_D6 P_UNDEF | ||
362 | #endif | ||
363 | |||
364 | #ifndef P_HOST_D7 | ||
365 | #define P_HOST_D7 P_UNDEF | ||
366 | #endif | ||
367 | |||
368 | #ifndef P_SPORT1_TFS | ||
369 | #define P_SPORT1_TFS P_UNDEF | ||
370 | #endif | ||
371 | |||
372 | #ifndef P_SPORT1_DTSEC | ||
373 | #define P_SPORT1_DTSEC P_UNDEF | ||
374 | #endif | ||
375 | |||
376 | #ifndef P_SPORT1_DTPRI | ||
377 | #define P_SPORT1_DTPRI P_UNDEF | ||
378 | #endif | ||
379 | |||
380 | #ifndef P_SPORT1_TSCLK | ||
381 | #define P_SPORT1_TSCLK P_UNDEF | ||
382 | #endif | ||
383 | |||
384 | #ifndef P_SPORT1_RFS | ||
385 | #define P_SPORT1_RFS P_UNDEF | ||
386 | #endif | ||
387 | |||
388 | #ifndef P_SPORT1_DRSEC | ||
389 | #define P_SPORT1_DRSEC P_UNDEF | ||
390 | #endif | ||
391 | |||
392 | #ifndef P_SPORT1_DRPRI | ||
393 | #define P_SPORT1_DRPRI P_UNDEF | ||
394 | #endif | ||
395 | |||
396 | #ifndef P_SPORT1_RSCLK | ||
397 | #define P_SPORT1_RSCLK P_UNDEF | ||
398 | #endif | ||
399 | |||
400 | #ifndef P_PPI2_D0 | ||
401 | #define P_PPI2_D0 P_UNDEF | ||
402 | #endif | ||
403 | |||
404 | #ifndef P_PPI2_D1 | ||
405 | #define P_PPI2_D1 P_UNDEF | ||
406 | #endif | ||
407 | |||
408 | #ifndef P_PPI2_D2 | ||
409 | #define P_PPI2_D2 P_UNDEF | ||
410 | #endif | ||
411 | |||
412 | #ifndef P_PPI2_D3 | ||
413 | #define P_PPI2_D3 P_UNDEF | ||
414 | #endif | ||
415 | |||
416 | #ifndef P_PPI2_D4 | ||
417 | #define P_PPI2_D4 P_UNDEF | ||
418 | #endif | ||
419 | |||
420 | #ifndef P_PPI2_D5 | ||
421 | #define P_PPI2_D5 P_UNDEF | ||
422 | #endif | ||
423 | |||
424 | #ifndef P_PPI2_D6 | ||
425 | #define P_PPI2_D6 P_UNDEF | ||
426 | #endif | ||
427 | |||
428 | #ifndef P_PPI2_D7 | ||
429 | #define P_PPI2_D7 P_UNDEF | ||
430 | #endif | ||
431 | |||
432 | #ifndef P_PPI0_D18 | ||
433 | #define P_PPI0_D18 P_UNDEF | ||
434 | #endif | ||
435 | |||
436 | #ifndef P_PPI0_D19 | ||
437 | #define P_PPI0_D19 P_UNDEF | ||
438 | #endif | ||
439 | |||
440 | #ifndef P_PPI0_D20 | ||
441 | #define P_PPI0_D20 P_UNDEF | ||
442 | #endif | ||
443 | |||
444 | #ifndef P_PPI0_D21 | ||
445 | #define P_PPI0_D21 P_UNDEF | ||
446 | #endif | ||
447 | |||
448 | #ifndef P_PPI0_D22 | ||
449 | #define P_PPI0_D22 P_UNDEF | ||
450 | #endif | ||
451 | |||
452 | #ifndef P_PPI0_D23 | ||
453 | #define P_PPI0_D23 P_UNDEF | ||
454 | #endif | ||
455 | |||
456 | #ifndef P_KEY_ROW0 | ||
457 | #define P_KEY_ROW0 P_UNDEF | ||
458 | #endif | ||
459 | |||
460 | #ifndef P_KEY_ROW1 | ||
461 | #define P_KEY_ROW1 P_UNDEF | ||
462 | #endif | ||
463 | |||
464 | #ifndef P_KEY_ROW2 | ||
465 | #define P_KEY_ROW2 P_UNDEF | ||
466 | #endif | ||
467 | |||
468 | #ifndef P_KEY_ROW3 | ||
469 | #define P_KEY_ROW3 P_UNDEF | ||
470 | #endif | ||
471 | |||
472 | #ifndef P_KEY_COL0 | ||
473 | #define P_KEY_COL0 P_UNDEF | ||
474 | #endif | ||
475 | |||
476 | #ifndef P_KEY_COL1 | ||
477 | #define P_KEY_COL1 P_UNDEF | ||
478 | #endif | ||
479 | |||
480 | #ifndef P_KEY_COL2 | ||
481 | #define P_KEY_COL2 P_UNDEF | ||
482 | #endif | ||
483 | |||
484 | #ifndef P_KEY_COL3 | ||
485 | #define P_KEY_COL3 P_UNDEF | ||
486 | #endif | ||
487 | |||
488 | #ifndef P_SPI0_SCK | ||
489 | #define P_SPI0_SCK P_UNDEF | ||
490 | #endif | ||
491 | |||
492 | #ifndef P_SPI0_MISO | ||
493 | #define P_SPI0_MISO P_UNDEF | ||
494 | #endif | ||
495 | |||
496 | #ifndef P_SPI0_MOSI | ||
497 | #define P_SPI0_MOSI P_UNDEF | ||
498 | #endif | ||
499 | |||
500 | #ifndef P_SPI0_SS | ||
501 | #define P_SPI0_SS P_UNDEF | ||
502 | #endif | ||
503 | |||
504 | #ifndef P_SPI0_SSEL1 | ||
505 | #define P_SPI0_SSEL1 P_UNDEF | ||
506 | #endif | ||
507 | |||
508 | #ifndef P_SPI0_SSEL2 | ||
509 | #define P_SPI0_SSEL2 P_UNDEF | ||
510 | #endif | ||
511 | |||
512 | #ifndef P_SPI0_SSEL3 | ||
513 | #define P_SPI0_SSEL3 P_UNDEF | ||
514 | #endif | ||
515 | |||
516 | #ifndef P_UART0_TX | ||
517 | #define P_UART0_TX P_UNDEF | ||
518 | #endif | ||
519 | |||
520 | #ifndef P_UART0_RX | ||
521 | #define P_UART0_RX P_UNDEF | ||
522 | #endif | ||
523 | |||
524 | #ifndef P_UART1_RTS | ||
525 | #define P_UART1_RTS P_UNDEF | ||
526 | #endif | ||
527 | |||
528 | #ifndef P_UART1_CTS | ||
529 | #define P_UART1_CTS P_UNDEF | ||
530 | #endif | ||
531 | |||
532 | #ifndef P_PPI1_CLK | ||
533 | #define P_PPI1_CLK P_UNDEF | ||
534 | #endif | ||
535 | |||
536 | #ifndef P_PPI1_FS1 | ||
537 | #define P_PPI1_FS1 P_UNDEF | ||
538 | #endif | ||
539 | |||
540 | #ifndef P_PPI1_FS2 | ||
541 | #define P_PPI1_FS2 P_UNDEF | ||
542 | #endif | ||
543 | |||
544 | #ifndef P_TWI0_SCL | ||
545 | #define P_TWI0_SCL P_UNDEF | ||
546 | #endif | ||
547 | |||
548 | #ifndef P_TWI0_SDA | ||
549 | #define P_TWI0_SDA P_UNDEF | ||
550 | #endif | ||
551 | |||
552 | #ifndef P_KEY_COL7 | ||
553 | #define P_KEY_COL7 P_UNDEF | ||
554 | #endif | ||
555 | |||
556 | #ifndef P_KEY_ROW6 | ||
557 | #define P_KEY_ROW6 P_UNDEF | ||
558 | #endif | ||
559 | |||
560 | #ifndef P_KEY_COL6 | ||
561 | #define P_KEY_COL6 P_UNDEF | ||
562 | #endif | ||
563 | |||
564 | #ifndef P_KEY_ROW5 | ||
565 | #define P_KEY_ROW5 P_UNDEF | ||
566 | #endif | ||
567 | |||
568 | #ifndef P_KEY_COL5 | ||
569 | #define P_KEY_COL5 P_UNDEF | ||
570 | #endif | ||
571 | |||
572 | #ifndef P_KEY_ROW4 | ||
573 | #define P_KEY_ROW4 P_UNDEF | ||
574 | #endif | ||
575 | |||
576 | #ifndef P_KEY_COL4 | ||
577 | #define P_KEY_COL4 P_UNDEF | ||
578 | #endif | ||
579 | |||
580 | #ifndef P_KEY_ROW7 | ||
581 | #define P_KEY_ROW7 P_UNDEF | ||
582 | #endif | ||
583 | |||
584 | #ifndef P_PPI0_D0 | ||
585 | #define P_PPI0_D0 P_UNDEF | ||
586 | #endif | ||
587 | |||
588 | #ifndef P_PPI0_D1 | ||
589 | #define P_PPI0_D1 P_UNDEF | ||
590 | #endif | ||
591 | |||
592 | #ifndef P_PPI0_D2 | ||
593 | #define P_PPI0_D2 P_UNDEF | ||
594 | #endif | ||
595 | |||
596 | #ifndef P_PPI0_D3 | ||
597 | #define P_PPI0_D3 P_UNDEF | ||
598 | #endif | ||
599 | |||
600 | #ifndef P_PPI0_D4 | ||
601 | #define P_PPI0_D4 P_UNDEF | ||
602 | #endif | ||
603 | |||
604 | #ifndef P_PPI0_D5 | ||
605 | #define P_PPI0_D5 P_UNDEF | ||
606 | #endif | ||
607 | |||
608 | #ifndef P_PPI0_D6 | ||
609 | #define P_PPI0_D6 P_UNDEF | ||
610 | #endif | ||
611 | |||
612 | #ifndef P_PPI0_D7 | ||
613 | #define P_PPI0_D7 P_UNDEF | ||
614 | #endif | ||
615 | |||
616 | #ifndef P_PPI0_D8 | ||
617 | #define P_PPI0_D8 P_UNDEF | ||
618 | #endif | ||
619 | |||
620 | #ifndef P_PPI0_D9 | ||
621 | #define P_PPI0_D9 P_UNDEF | ||
622 | #endif | ||
623 | |||
624 | #ifndef P_PPI0_D10 | ||
625 | #define P_PPI0_D10 P_UNDEF | ||
626 | #endif | ||
627 | |||
628 | #ifndef P_PPI0_D11 | ||
629 | #define P_PPI0_D11 P_UNDEF | ||
630 | #endif | ||
631 | |||
632 | #ifndef P_PPI0_D12 | ||
633 | #define P_PPI0_D12 P_UNDEF | ||
634 | #endif | ||
635 | |||
636 | #ifndef P_PPI0_D13 | ||
637 | #define P_PPI0_D13 P_UNDEF | ||
638 | #endif | ||
639 | |||
640 | #ifndef P_PPI0_D14 | ||
641 | #define P_PPI0_D14 P_UNDEF | ||
642 | #endif | ||
643 | |||
644 | #ifndef P_PPI0_D15 | ||
645 | #define P_PPI0_D15 P_UNDEF | ||
646 | #endif | ||
647 | |||
648 | #ifndef P_ATAPI_D0A | ||
649 | #define P_ATAPI_D0A P_UNDEF | ||
650 | #endif | ||
651 | |||
652 | #ifndef P_ATAPI_D1A | ||
653 | #define P_ATAPI_D1A P_UNDEF | ||
654 | #endif | ||
655 | |||
656 | #ifndef P_ATAPI_D2A | ||
657 | #define P_ATAPI_D2A P_UNDEF | ||
658 | #endif | ||
659 | |||
660 | #ifndef P_ATAPI_D3A | ||
661 | #define P_ATAPI_D3A P_UNDEF | ||
662 | #endif | ||
663 | |||
664 | #ifndef P_ATAPI_D4A | ||
665 | #define P_ATAPI_D4A P_UNDEF | ||
666 | #endif | ||
667 | |||
668 | #ifndef P_ATAPI_D5A | ||
669 | #define P_ATAPI_D5A P_UNDEF | ||
670 | #endif | ||
671 | |||
672 | #ifndef P_ATAPI_D6A | ||
673 | #define P_ATAPI_D6A P_UNDEF | ||
674 | #endif | ||
675 | |||
676 | #ifndef P_ATAPI_D7A | ||
677 | #define P_ATAPI_D7A P_UNDEF | ||
678 | #endif | ||
679 | |||
680 | #ifndef P_ATAPI_D8A | ||
681 | #define P_ATAPI_D8A P_UNDEF | ||
682 | #endif | ||
683 | |||
684 | #ifndef P_ATAPI_D9A | ||
685 | #define P_ATAPI_D9A P_UNDEF | ||
686 | #endif | ||
687 | |||
688 | #ifndef P_ATAPI_D10A | ||
689 | #define P_ATAPI_D10A P_UNDEF | ||
690 | #endif | ||
691 | |||
692 | #ifndef P_ATAPI_D11A | ||
693 | #define P_ATAPI_D11A P_UNDEF | ||
694 | #endif | ||
695 | |||
696 | #ifndef P_ATAPI_D12A | ||
697 | #define P_ATAPI_D12A P_UNDEF | ||
698 | #endif | ||
699 | |||
700 | #ifndef P_ATAPI_D13A | ||
701 | #define P_ATAPI_D13A P_UNDEF | ||
702 | #endif | ||
703 | |||
704 | #ifndef P_ATAPI_D14A | ||
705 | #define P_ATAPI_D14A P_UNDEF | ||
706 | #endif | ||
707 | |||
708 | #ifndef P_ATAPI_D15A | ||
709 | #define P_ATAPI_D15A P_UNDEF | ||
710 | #endif | ||
711 | |||
712 | #ifndef P_PPI0_CLK | ||
713 | #define P_PPI0_CLK P_UNDEF | ||
714 | #endif | ||
715 | |||
716 | #ifndef P_PPI0_FS1 | ||
717 | #define P_PPI0_FS1 P_UNDEF | ||
718 | #endif | ||
719 | |||
720 | #ifndef P_PPI0_FS2 | ||
721 | #define P_PPI0_FS2 P_UNDEF | ||
722 | #endif | ||
723 | |||
724 | #ifndef P_PPI0_D16 | ||
725 | #define P_PPI0_D16 P_UNDEF | ||
726 | #endif | ||
727 | |||
728 | #ifndef P_PPI0_D17 | ||
729 | #define P_PPI0_D17 P_UNDEF | ||
730 | #endif | ||
731 | |||
732 | #ifndef P_SPI1_SSEL1 | ||
733 | #define P_SPI1_SSEL1 P_UNDEF | ||
734 | #endif | ||
735 | |||
736 | #ifndef P_SPI1_SSEL2 | ||
737 | #define P_SPI1_SSEL2 P_UNDEF | ||
738 | #endif | ||
739 | |||
740 | #ifndef P_SPI1_SSEL3 | ||
741 | #define P_SPI1_SSEL3 P_UNDEF | ||
742 | #endif | ||
743 | |||
744 | #ifndef P_SPI1_SCK | ||
745 | #define P_SPI1_SCK P_UNDEF | ||
746 | #endif | ||
747 | |||
748 | #ifndef P_SPI1_MISO | ||
749 | #define P_SPI1_MISO P_UNDEF | ||
750 | #endif | ||
751 | |||
752 | #ifndef P_SPI1_MOSI | ||
753 | #define P_SPI1_MOSI P_UNDEF | ||
754 | #endif | ||
755 | |||
756 | #ifndef P_SPI1_SS | ||
757 | #define P_SPI1_SS P_UNDEF | ||
758 | #endif | ||
759 | |||
760 | #ifndef P_CAN0_TX | ||
761 | #define P_CAN0_TX P_UNDEF | ||
762 | #endif | ||
763 | |||
764 | #ifndef P_CAN0_RX | ||
765 | #define P_CAN0_RX P_UNDEF | ||
766 | #endif | ||
767 | |||
768 | #ifndef P_CAN1_TX | ||
769 | #define P_CAN1_TX P_UNDEF | ||
770 | #endif | ||
771 | |||
772 | #ifndef P_CAN1_RX | ||
773 | #define P_CAN1_RX P_UNDEF | ||
774 | #endif | ||
775 | |||
776 | #ifndef P_ATAPI_A0A | ||
777 | #define P_ATAPI_A0A P_UNDEF | ||
778 | #endif | ||
779 | |||
780 | #ifndef P_ATAPI_A1A | ||
781 | #define P_ATAPI_A1A P_UNDEF | ||
782 | #endif | ||
783 | |||
784 | #ifndef P_ATAPI_A2A | ||
785 | #define P_ATAPI_A2A P_UNDEF | ||
786 | #endif | ||
787 | |||
788 | #ifndef P_HOST_CE | ||
789 | #define P_HOST_CE P_UNDEF | ||
790 | #endif | ||
791 | |||
792 | #ifndef P_HOST_RD | ||
793 | #define P_HOST_RD P_UNDEF | ||
794 | #endif | ||
795 | |||
796 | #ifndef P_HOST_WR | ||
797 | #define P_HOST_WR P_UNDEF | ||
798 | #endif | ||
799 | |||
800 | #ifndef P_MTXONB | ||
801 | #define P_MTXONB P_UNDEF | ||
802 | #endif | ||
803 | |||
804 | #ifndef P_PPI2_FS2 | ||
805 | #define P_PPI2_FS2 P_UNDEF | ||
806 | #endif | ||
807 | |||
808 | #ifndef P_PPI2_FS1 | ||
809 | #define P_PPI2_FS1 P_UNDEF | ||
810 | #endif | ||
811 | |||
812 | #ifndef P_PPI2_CLK | ||
813 | #define P_PPI2_CLK P_UNDEF | ||
814 | #endif | ||
815 | |||
816 | #ifndef P_CNT_CZM | ||
817 | #define P_CNT_CZM P_UNDEF | ||
818 | #endif | ||
819 | |||
820 | #ifndef P_UART1_TX | ||
821 | #define P_UART1_TX P_UNDEF | ||
822 | #endif | ||
823 | |||
824 | #ifndef P_UART1_RX | ||
825 | #define P_UART1_RX P_UNDEF | ||
826 | #endif | ||
827 | |||
828 | #ifndef P_ATAPI_RESET | ||
829 | #define P_ATAPI_RESET P_UNDEF | ||
830 | #endif | ||
831 | |||
832 | #ifndef P_HOST_ADDR | ||
833 | #define P_HOST_ADDR P_UNDEF | ||
834 | #endif | ||
835 | |||
836 | #ifndef P_HOST_ACK | ||
837 | #define P_HOST_ACK P_UNDEF | ||
838 | #endif | ||
839 | |||
840 | #ifndef P_MTX | ||
841 | #define P_MTX P_UNDEF | ||
842 | #endif | ||
843 | |||
844 | #ifndef P_MRX | ||
845 | #define P_MRX P_UNDEF | ||
846 | #endif | ||
847 | |||
848 | #ifndef P_MRXONB | ||
849 | #define P_MRXONB P_UNDEF | ||
850 | #endif | ||
851 | |||
852 | #ifndef P_A4 | ||
853 | #define P_A4 P_UNDEF | ||
854 | #endif | ||
855 | |||
856 | #ifndef P_A5 | ||
857 | #define P_A5 P_UNDEF | ||
858 | #endif | ||
859 | |||
860 | #ifndef P_A6 | ||
861 | #define P_A6 P_UNDEF | ||
862 | #endif | ||
863 | |||
864 | #ifndef P_A7 | ||
865 | #define P_A7 P_UNDEF | ||
866 | #endif | ||
867 | |||
868 | #ifndef P_A8 | ||
869 | #define P_A8 P_UNDEF | ||
870 | #endif | ||
871 | |||
872 | #ifndef P_A9 | ||
873 | #define P_A9 P_UNDEF | ||
874 | #endif | ||
875 | |||
876 | #ifndef P_PPI1_FS3 | ||
877 | #define P_PPI1_FS3 P_UNDEF | ||
878 | #endif | ||
879 | |||
880 | #ifndef P_PPI2_FS3 | ||
881 | #define P_PPI2_FS3 P_UNDEF | ||
882 | #endif | ||
883 | |||
884 | #ifndef P_TMR8 | ||
885 | #define P_TMR8 P_UNDEF | ||
886 | #endif | ||
887 | |||
888 | #ifndef P_TMR9 | ||
889 | #define P_TMR9 P_UNDEF | ||
890 | #endif | ||
891 | |||
892 | #ifndef P_TMR10 | ||
893 | #define P_TMR10 P_UNDEF | ||
894 | #endif | ||
895 | #ifndef P_TMR11 | ||
896 | #define P_TMR11 P_UNDEF | ||
897 | #endif | ||
898 | |||
899 | #ifndef P_DMAR0 | ||
900 | #define P_DMAR0 P_UNDEF | ||
901 | #endif | ||
902 | |||
903 | #ifndef P_DMAR1 | ||
904 | #define P_DMAR1 P_UNDEF | ||
905 | #endif | ||
906 | |||
907 | #ifndef P_PPI0_FS3 | ||
908 | #define P_PPI0_FS3 P_UNDEF | ||
909 | #endif | ||
910 | |||
911 | #ifndef P_CNT_CDG | ||
912 | #define P_CNT_CDG P_UNDEF | ||
913 | #endif | ||
914 | |||
915 | #ifndef P_CNT_CUD | ||
916 | #define P_CNT_CUD P_UNDEF | ||
917 | #endif | ||
918 | |||
919 | #ifndef P_A10 | ||
920 | #define P_A10 P_UNDEF | ||
921 | #endif | ||
922 | |||
923 | #ifndef P_A11 | ||
924 | #define P_A11 P_UNDEF | ||
925 | #endif | ||
926 | |||
927 | #ifndef P_A12 | ||
928 | #define P_A12 P_UNDEF | ||
929 | #endif | ||
930 | |||
931 | #ifndef P_A13 | ||
932 | #define P_A13 P_UNDEF | ||
933 | #endif | ||
934 | |||
935 | #ifndef P_A14 | ||
936 | #define P_A14 P_UNDEF | ||
937 | #endif | ||
938 | |||
939 | #ifndef P_A15 | ||
940 | #define P_A15 P_UNDEF | ||
941 | #endif | ||
942 | |||
943 | #ifndef P_A16 | ||
944 | #define P_A16 P_UNDEF | ||
945 | #endif | ||
946 | |||
947 | #ifndef P_A17 | ||
948 | #define P_A17 P_UNDEF | ||
949 | #endif | ||
950 | |||
951 | #ifndef P_A18 | ||
952 | #define P_A18 P_UNDEF | ||
953 | #endif | ||
954 | |||
955 | #ifndef P_A19 | ||
956 | #define P_A19 P_UNDEF | ||
957 | #endif | ||
958 | |||
959 | #ifndef P_A20 | ||
960 | #define P_A20 P_UNDEF | ||
961 | #endif | ||
962 | |||
963 | #ifndef P_A21 | ||
964 | #define P_A21 P_UNDEF | ||
965 | #endif | ||
966 | |||
967 | #ifndef P_A22 | ||
968 | #define P_A22 P_UNDEF | ||
969 | #endif | ||
970 | |||
971 | #ifndef P_A23 | ||
972 | #define P_A23 P_UNDEF | ||
973 | #endif | ||
974 | |||
975 | #ifndef P_A24 | ||
976 | #define P_A24 P_UNDEF | ||
977 | #endif | ||
978 | |||
979 | #ifndef P_A25 | ||
980 | #define P_A25 P_UNDEF | ||
981 | #endif | ||
982 | |||
983 | #ifndef P_NOR_CLK | ||
984 | #define P_NOR_CLK P_UNDEF | ||
985 | #endif | ||
986 | |||
987 | #ifndef P_TMRCLK | ||
988 | #define P_TMRCLK P_UNDEF | ||
989 | #endif | ||
990 | |||
991 | #ifndef P_AMC_ARDY_NOR_WAIT | ||
992 | #define P_AMC_ARDY_NOR_WAIT P_UNDEF | ||
993 | #endif | ||
994 | |||
995 | #ifndef P_NAND_CE | ||
996 | #define P_NAND_CE P_UNDEF | ||
997 | #endif | ||
998 | |||
999 | #ifndef P_NAND_RB | ||
1000 | #define P_NAND_RB P_UNDEF | ||
1001 | #endif | ||
1002 | |||
1003 | #ifndef P_ATAPI_DIOR | ||
1004 | #define P_ATAPI_DIOR P_UNDEF | ||
1005 | #endif | ||
1006 | |||
1007 | #ifndef P_ATAPI_DIOW | ||
1008 | #define P_ATAPI_DIOW P_UNDEF | ||
1009 | #endif | ||
1010 | |||
1011 | #ifndef P_ATAPI_CS0 | ||
1012 | #define P_ATAPI_CS0 P_UNDEF | ||
1013 | #endif | ||
1014 | |||
1015 | #ifndef P_ATAPI_CS1 | ||
1016 | #define P_ATAPI_CS1 P_UNDEF | ||
1017 | #endif | ||
1018 | |||
1019 | #ifndef P_ATAPI_DMACK | ||
1020 | #define P_ATAPI_DMACK P_UNDEF | ||
1021 | #endif | ||
1022 | |||
1023 | #ifndef P_ATAPI_DMARQ | ||
1024 | #define P_ATAPI_DMARQ P_UNDEF | ||
1025 | #endif | ||
1026 | |||
1027 | #ifndef P_ATAPI_INTRQ | ||
1028 | #define P_ATAPI_INTRQ P_UNDEF | ||
1029 | #endif | ||
1030 | |||
1031 | #ifndef P_ATAPI_IORDY | ||
1032 | #define P_ATAPI_IORDY P_UNDEF | ||
1033 | #endif | ||
1034 | |||
1035 | #ifndef P_AMC_BR | ||
1036 | #define P_AMC_BR P_UNDEF | ||
1037 | #endif | ||
1038 | |||
1039 | #ifndef P_AMC_BG | ||
1040 | #define P_AMC_BG P_UNDEF | ||
1041 | #endif | ||
1042 | |||
1043 | #ifndef P_AMC_BGH | ||
1044 | #define P_AMC_BGH P_UNDEF | ||
1045 | #endif | ||
1046 | |||
1047 | /* EMAC */ | ||
1048 | |||
1049 | #ifndef P_MII0_ETxD0 | ||
1050 | #define P_MII0_ETxD0 P_UNDEF | ||
1051 | #endif | ||
1052 | |||
1053 | #ifndef P_MII0_ETxD1 | ||
1054 | #define P_MII0_ETxD1 P_UNDEF | ||
1055 | #endif | ||
1056 | |||
1057 | #ifndef P_MII0_ETxD2 | ||
1058 | #define P_MII0_ETxD2 P_UNDEF | ||
1059 | #endif | ||
1060 | |||
1061 | #ifndef P_MII0_ETxD3 | ||
1062 | #define P_MII0_ETxD3 P_UNDEF | ||
1063 | #endif | ||
1064 | |||
1065 | #ifndef P_MII0_ETxEN | ||
1066 | #define P_MII0_ETxEN P_UNDEF | ||
1067 | #endif | ||
1068 | |||
1069 | #ifndef P_MII0_TxCLK | ||
1070 | #define P_MII0_TxCLK P_UNDEF | ||
1071 | #endif | ||
1072 | |||
1073 | #ifndef P_MII0_PHYINT | ||
1074 | #define P_MII0_PHYINT P_UNDEF | ||
1075 | #endif | ||
1076 | |||
1077 | #ifndef P_MII0_COL | ||
1078 | #define P_MII0_COL P_UNDEF | ||
1079 | #endif | ||
1080 | |||
1081 | #ifndef P_MII0_ERxD0 | ||
1082 | #define P_MII0_ERxD0 P_UNDEF | ||
1083 | #endif | ||
1084 | |||
1085 | #ifndef P_MII0_ERxD1 | ||
1086 | #define P_MII0_ERxD1 P_UNDEF | ||
1087 | #endif | ||
1088 | |||
1089 | #ifndef P_MII0_ERxD2 | ||
1090 | #define P_MII0_ERxD2 P_UNDEF | ||
1091 | #endif | ||
1092 | |||
1093 | #ifndef P_MII0_ERxD3 | ||
1094 | #define P_MII0_ERxD3 P_UNDEF | ||
1095 | #endif | ||
1096 | |||
1097 | #ifndef P_MII0_ERxDV | ||
1098 | #define P_MII0_ERxDV P_UNDEF | ||
1099 | #endif | ||
1100 | |||
1101 | #ifndef P_MII0_ERxCLK | ||
1102 | #define P_MII0_ERxCLK P_UNDEF | ||
1103 | #endif | ||
1104 | |||
1105 | #ifndef P_MII0_ERxER | ||
1106 | #define P_MII0_ERxER P_UNDEF | ||
1107 | #endif | ||
1108 | |||
1109 | #ifndef P_MII0_CRS | ||
1110 | #define P_MII0_CRS P_UNDEF | ||
1111 | #endif | ||
1112 | |||
1113 | #ifndef P_RMII0_REF_CLK | ||
1114 | #define P_RMII0_REF_CLK P_UNDEF | ||
1115 | #endif | ||
1116 | |||
1117 | #ifndef P_RMII0_MDINT | ||
1118 | #define P_RMII0_MDINT P_UNDEF | ||
1119 | #endif | ||
1120 | |||
1121 | #ifndef P_RMII0_CRS_DV | ||
1122 | #define P_RMII0_CRS_DV P_UNDEF | ||
1123 | #endif | ||
1124 | |||
1125 | #ifndef P_MDC | ||
1126 | #define P_MDC P_UNDEF | ||
1127 | #endif | ||
1128 | |||
1129 | #ifndef P_MDIO | ||
1130 | #define P_MDIO P_UNDEF | ||
1131 | #endif | ||
1132 | |||
1133 | #endif /* _PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/termbits.h b/include/asm-blackfin/termbits.h index 2fd9dabdba77..4eac38de8ce1 100644 --- a/include/asm-blackfin/termbits.h +++ b/include/asm-blackfin/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-blackfin/trace.h b/include/asm-blackfin/trace.h new file mode 100644 index 000000000000..9c2474c9a589 --- /dev/null +++ b/include/asm-blackfin/trace.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Common header file for blackfin family of processors. | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifndef _BLACKFIN_TRACE_ | ||
7 | #define _BLACKFIN_TRACE_ | ||
8 | |||
9 | #ifndef __ASSEMBLY__ | ||
10 | /* Trace Macros for C files */ | ||
11 | |||
12 | #define trace_buffer_save(x) \ | ||
13 | do { \ | ||
14 | (x) = bfin_read_TBUFCTL(); \ | ||
15 | bfin_write_TBUFCTL((x) & ~TBUFEN); \ | ||
16 | } while (0) | ||
17 | |||
18 | #define trace_buffer_restore(x) \ | ||
19 | do { \ | ||
20 | bfin_write_TBUFCTL((x)); \ | ||
21 | } while (0) | ||
22 | |||
23 | #else | ||
24 | /* Trace Macros for Assembly files */ | ||
25 | |||
26 | #define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg) | ||
27 | #define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg) | ||
28 | |||
29 | #define trace_buffer_stop(preg, dreg) \ | ||
30 | preg.L = LO(TBUFCTL); \ | ||
31 | preg.H = HI(TBUFCTL); \ | ||
32 | dreg = 0x1; \ | ||
33 | [preg] = dreg; | ||
34 | |||
35 | #define trace_buffer_start(preg, dreg) \ | ||
36 | preg.L = LO(TBUFCTL); \ | ||
37 | preg.H = HI(TBUFCTL); \ | ||
38 | dreg = 0x13; \ | ||
39 | [preg] = dreg; | ||
40 | |||
41 | #ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | ||
42 | # define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg) | ||
43 | # define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg) | ||
44 | |||
45 | #else | ||
46 | # define DEBUG_START_HWTRACE(preg, dreg) | ||
47 | # define DEBUG_STOP_HWTRACE(preg, dreg) | ||
48 | #endif | ||
49 | |||
50 | #endif /* __ASSEMBLY__ */ | ||
51 | |||
52 | #endif /* _BLACKFIN_TRACE_ */ | ||
diff --git a/include/asm-cris/ioctls.h b/include/asm-cris/ioctls.h index 97787c3c575f..4f4e52531fa0 100644 --- a/include/asm-cris/ioctls.h +++ b/include/asm-cris/ioctls.h | |||
@@ -48,6 +48,10 @@ | |||
48 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 48 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
49 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 49 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
50 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 50 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
51 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
52 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
53 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
54 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
51 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 55 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
52 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 56 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
53 | 57 | ||
diff --git a/include/asm-cris/pci.h b/include/asm-cris/pci.h index b2ac8a331da1..730ce40fdd0f 100644 --- a/include/asm-cris/pci.h +++ b/include/asm-cris/pci.h | |||
@@ -52,47 +52,11 @@ struct pci_dev; | |||
52 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 52 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
53 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 53 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
54 | 54 | ||
55 | /* This is always fine. */ | ||
56 | #define pci_dac_dma_supported(pci_dev, mask) (1) | ||
57 | |||
58 | static inline dma64_addr_t | ||
59 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction) | ||
60 | { | ||
61 | return ((dma64_addr_t) page_to_phys(page) + | ||
62 | (dma64_addr_t) offset); | ||
63 | } | ||
64 | |||
65 | static inline struct page * | ||
66 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
67 | { | ||
68 | return pfn_to_page(dma_addr >> PAGE_SHIFT); | ||
69 | } | ||
70 | |||
71 | static inline unsigned long | ||
72 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
73 | { | ||
74 | return (dma_addr & ~PAGE_MASK); | ||
75 | } | ||
76 | |||
77 | static inline void | ||
78 | pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
79 | { | ||
80 | } | ||
81 | |||
82 | static inline void | ||
83 | pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | #define HAVE_PCI_MMAP | 55 | #define HAVE_PCI_MMAP |
88 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 56 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
89 | enum pci_mmap_state mmap_state, int write_combine); | 57 | enum pci_mmap_state mmap_state, int write_combine); |
90 | 58 | ||
91 | 59 | ||
92 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
93 | { | ||
94 | } | ||
95 | |||
96 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
97 | 61 | ||
98 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ | 62 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h index c94a7107019c..417f71116215 100644 --- a/include/asm-cris/pgtable.h +++ b/include/asm-cris/pgtable.h | |||
@@ -111,9 +111,7 @@ extern unsigned long empty_zero_page; | |||
111 | * Undefined behaviour if not.. | 111 | * Undefined behaviour if not.. |
112 | */ | 112 | */ |
113 | 113 | ||
114 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_READ; } | ||
115 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } | 114 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } |
116 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_READ; } | ||
117 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } | 115 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } |
118 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 116 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
119 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 117 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
@@ -124,18 +122,6 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
124 | return pte; | 122 | return pte; |
125 | } | 123 | } |
126 | 124 | ||
127 | static inline pte_t pte_rdprotect(pte_t pte) | ||
128 | { | ||
129 | pte_val(pte) &= ~(_PAGE_READ | _PAGE_SILENT_READ); | ||
130 | return pte; | ||
131 | } | ||
132 | |||
133 | static inline pte_t pte_exprotect(pte_t pte) | ||
134 | { | ||
135 | pte_val(pte) &= ~(_PAGE_READ | _PAGE_SILENT_READ); | ||
136 | return pte; | ||
137 | } | ||
138 | |||
139 | static inline pte_t pte_mkclean(pte_t pte) | 125 | static inline pte_t pte_mkclean(pte_t pte) |
140 | { | 126 | { |
141 | pte_val(pte) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); | 127 | pte_val(pte) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); |
@@ -156,22 +142,6 @@ static inline pte_t pte_mkwrite(pte_t pte) | |||
156 | return pte; | 142 | return pte; |
157 | } | 143 | } |
158 | 144 | ||
159 | static inline pte_t pte_mkread(pte_t pte) | ||
160 | { | ||
161 | pte_val(pte) |= _PAGE_READ; | ||
162 | if (pte_val(pte) & _PAGE_ACCESSED) | ||
163 | pte_val(pte) |= _PAGE_SILENT_READ; | ||
164 | return pte; | ||
165 | } | ||
166 | |||
167 | static inline pte_t pte_mkexec(pte_t pte) | ||
168 | { | ||
169 | pte_val(pte) |= _PAGE_READ; | ||
170 | if (pte_val(pte) & _PAGE_ACCESSED) | ||
171 | pte_val(pte) |= _PAGE_SILENT_READ; | ||
172 | return pte; | ||
173 | } | ||
174 | |||
175 | static inline pte_t pte_mkdirty(pte_t pte) | 145 | static inline pte_t pte_mkdirty(pte_t pte) |
176 | { | 146 | { |
177 | pte_val(pte) |= _PAGE_MODIFIED; | 147 | pte_val(pte) |= _PAGE_MODIFIED; |
diff --git a/include/asm-cris/termbits.h b/include/asm-cris/termbits.h index 8d8cec225fe1..71c1b36269b8 100644 --- a/include/asm-cris/termbits.h +++ b/include/asm-cris/termbits.h | |||
@@ -19,6 +19,17 @@ struct termios { | |||
19 | cc_t c_cc[NCCS]; /* control characters */ | 19 | cc_t c_cc[NCCS]; /* control characters */ |
20 | }; | 20 | }; |
21 | 21 | ||
22 | struct termios2 { | ||
23 | tcflag_t c_iflag; /* input mode flags */ | ||
24 | tcflag_t c_oflag; /* output mode flags */ | ||
25 | tcflag_t c_cflag; /* control mode flags */ | ||
26 | tcflag_t c_lflag; /* local mode flags */ | ||
27 | cc_t c_line; /* line discipline */ | ||
28 | cc_t c_cc[NCCS]; /* control characters */ | ||
29 | speed_t c_ispeed; /* input speed */ | ||
30 | speed_t c_ospeed; /* output speed */ | ||
31 | }; | ||
32 | |||
22 | struct ktermios { | 33 | struct ktermios { |
23 | tcflag_t c_iflag; /* input mode flags */ | 34 | tcflag_t c_iflag; /* input mode flags */ |
24 | tcflag_t c_oflag; /* output mode flags */ | 35 | tcflag_t c_oflag; /* output mode flags */ |
@@ -155,6 +166,7 @@ struct ktermios { | |||
155 | #define HUPCL 0002000 | 166 | #define HUPCL 0002000 |
156 | #define CLOCAL 0004000 | 167 | #define CLOCAL 0004000 |
157 | #define CBAUDEX 0010000 | 168 | #define CBAUDEX 0010000 |
169 | #define BOTHER 0010000 | ||
158 | #define B57600 0010001 | 170 | #define B57600 0010001 |
159 | #define B115200 0010002 | 171 | #define B115200 0010002 |
160 | #define B230400 0010003 | 172 | #define B230400 0010003 |
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h index c9dbd4d43368..b0124e6c2e41 100644 --- a/include/asm-cris/termios.h +++ b/include/asm-cris/termios.h | |||
@@ -81,8 +81,10 @@ struct termio { | |||
81 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 81 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
82 | }) | 82 | }) |
83 | 83 | ||
84 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 84 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
85 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 85 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
86 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
87 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
86 | 88 | ||
87 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
88 | 90 | ||
diff --git a/include/asm-frv/pci.h b/include/asm-frv/pci.h index f35a4511e7b9..585d9b49949a 100644 --- a/include/asm-frv/pci.h +++ b/include/asm-frv/pci.h | |||
@@ -22,10 +22,6 @@ struct pci_dev; | |||
22 | 22 | ||
23 | #define pcibios_assign_all_busses() 0 | 23 | #define pcibios_assign_all_busses() 0 |
24 | 24 | ||
25 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | extern void pcibios_set_master(struct pci_dev *dev); | 25 | extern void pcibios_set_master(struct pci_dev *dev); |
30 | 26 | ||
31 | extern void pcibios_penalize_isa_irq(int irq); | 27 | extern void pcibios_penalize_isa_irq(int irq); |
@@ -44,9 +40,6 @@ extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, | |||
44 | extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, | 40 | extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, |
45 | void *vaddr, dma_addr_t dma_handle); | 41 | void *vaddr, dma_addr_t dma_handle); |
46 | 42 | ||
47 | /* This is always fine. */ | ||
48 | #define pci_dac_dma_supported(pci_dev, mask) (1) | ||
49 | |||
50 | /* Return the index of the PCI controller for device PDEV. */ | 43 | /* Return the index of the PCI controller for device PDEV. */ |
51 | #define pci_controller_num(PDEV) (0) | 44 | #define pci_controller_num(PDEV) (0) |
52 | 45 | ||
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 114aefae2701..adde69985255 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -377,19 +377,13 @@ static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address) | |||
377 | * The following only work if pte_present() is true. | 377 | * The following only work if pte_present() is true. |
378 | * Undefined behaviour if not.. | 378 | * Undefined behaviour if not.. |
379 | */ | 379 | */ |
380 | static inline int pte_read(pte_t pte) { return !((pte).pte & _PAGE_SUPER); } | ||
381 | static inline int pte_exec(pte_t pte) { return !((pte).pte & _PAGE_SUPER); } | ||
382 | static inline int pte_dirty(pte_t pte) { return (pte).pte & _PAGE_DIRTY; } | 380 | static inline int pte_dirty(pte_t pte) { return (pte).pte & _PAGE_DIRTY; } |
383 | static inline int pte_young(pte_t pte) { return (pte).pte & _PAGE_ACCESSED; } | 381 | static inline int pte_young(pte_t pte) { return (pte).pte & _PAGE_ACCESSED; } |
384 | static inline int pte_write(pte_t pte) { return !((pte).pte & _PAGE_WP); } | 382 | static inline int pte_write(pte_t pte) { return !((pte).pte & _PAGE_WP); } |
385 | 383 | ||
386 | static inline pte_t pte_rdprotect(pte_t pte) { (pte).pte |= _PAGE_SUPER; return pte; } | ||
387 | static inline pte_t pte_exprotect(pte_t pte) { (pte).pte |= _PAGE_SUPER; return pte; } | ||
388 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte &= ~_PAGE_DIRTY; return pte; } | 384 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte &= ~_PAGE_DIRTY; return pte; } |
389 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte &= ~_PAGE_ACCESSED; return pte; } | 385 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte &= ~_PAGE_ACCESSED; return pte; } |
390 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte |= _PAGE_WP; return pte; } | 386 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte |= _PAGE_WP; return pte; } |
391 | static inline pte_t pte_mkread(pte_t pte) { (pte).pte &= ~_PAGE_SUPER; return pte; } | ||
392 | static inline pte_t pte_mkexec(pte_t pte) { (pte).pte &= ~_PAGE_SUPER; return pte; } | ||
393 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte |= _PAGE_DIRTY; return pte; } | 387 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte |= _PAGE_DIRTY; return pte; } |
394 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte |= _PAGE_ACCESSED; return pte; } | 388 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte |= _PAGE_ACCESSED; return pte; } |
395 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte &= ~_PAGE_WP; return pte; } | 389 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte &= ~_PAGE_WP; return pte; } |
diff --git a/include/asm-frv/termbits.h b/include/asm-frv/termbits.h index 2d6d389cff49..74851b424d4f 100644 --- a/include/asm-frv/termbits.h +++ b/include/asm-frv/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index 3d90e1018ee2..53650c958f41 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h | |||
@@ -277,6 +277,8 @@ extern long __memcpy_user(void *dst, const void *src, unsigned long count); | |||
277 | 277 | ||
278 | #endif | 278 | #endif |
279 | 279 | ||
280 | #define __clear_user clear_user | ||
281 | |||
280 | static inline unsigned long __must_check | 282 | static inline unsigned long __must_check |
281 | __copy_to_user(void __user *to, const void *from, unsigned long n) | 283 | __copy_to_user(void __user *to, const void *from, unsigned long n) |
282 | { | 284 | { |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index d0ea6789b31e..7306c71a8926 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -326,10 +326,14 @@ | |||
326 | #define __NR_move_pages 317 | 326 | #define __NR_move_pages 317 |
327 | #define __NR_getcpu 318 | 327 | #define __NR_getcpu 318 |
328 | #define __NR_epoll_pwait 319 | 328 | #define __NR_epoll_pwait 319 |
329 | #define __NR_utimensat 320 | ||
330 | #define __NR_signalfd 321 | ||
331 | #define __NR_timerfd 322 | ||
332 | #define __NR_eventfd 323 | ||
329 | 333 | ||
330 | #ifdef __KERNEL__ | 334 | #ifdef __KERNEL__ |
331 | 335 | ||
332 | #define NR_syscalls 320 | 336 | #define NR_syscalls 324 |
333 | 337 | ||
334 | #define __ARCH_WANT_IPC_PARSE_VERSION | 338 | #define __ARCH_WANT_IPC_PARSE_VERSION |
335 | /* #define __ARCH_WANT_OLD_READDIR */ | 339 | /* #define __ARCH_WANT_OLD_READDIR */ |
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index 29413d3d4605..e2468f894d2a 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h | |||
@@ -1,24 +1,82 @@ | |||
1 | #ifndef _ASM_GENERIC_DMA_MAPPING_H | 1 | #ifndef _ASM_GENERIC_DMA_MAPPING_H |
2 | #define _ASM_GENERIC_DMA_MAPPING_H | 2 | #define _ASM_GENERIC_DMA_MAPPING_H |
3 | 3 | ||
4 | /* This is used for archs that do not support DMA */ | 4 | /* define the dma api to allow compilation but not linking of |
5 | * dma dependent code. Code that depends on the dma-mapping | ||
6 | * API needs to set 'depends on HAS_DMA' in its Kconfig | ||
7 | */ | ||
5 | 8 | ||
6 | static inline void * | 9 | struct scatterlist; |
10 | |||
11 | extern void * | ||
7 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 12 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
8 | gfp_t flag) | 13 | gfp_t flag); |
9 | { | ||
10 | BUG(); | ||
11 | return NULL; | ||
12 | } | ||
13 | 14 | ||
14 | static inline void | 15 | extern void |
15 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 16 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
16 | dma_addr_t dma_handle) | 17 | dma_addr_t dma_handle); |
17 | { | ||
18 | BUG(); | ||
19 | } | ||
20 | 18 | ||
21 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 19 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
22 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 20 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
23 | 21 | ||
22 | extern dma_addr_t | ||
23 | dma_map_single(struct device *dev, void *ptr, size_t size, | ||
24 | enum dma_data_direction direction); | ||
25 | |||
26 | extern void | ||
27 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
28 | enum dma_data_direction direction); | ||
29 | |||
30 | extern int | ||
31 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
32 | enum dma_data_direction direction); | ||
33 | |||
34 | extern void | ||
35 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
36 | enum dma_data_direction direction); | ||
37 | |||
38 | extern dma_addr_t | ||
39 | dma_map_page(struct device *dev, struct page *page, unsigned long offset, | ||
40 | size_t size, enum dma_data_direction direction); | ||
41 | |||
42 | extern void | ||
43 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
44 | enum dma_data_direction direction); | ||
45 | |||
46 | extern void | ||
47 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
48 | enum dma_data_direction direction); | ||
49 | |||
50 | extern void | ||
51 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
52 | unsigned long offset, size_t size, | ||
53 | enum dma_data_direction direction); | ||
54 | |||
55 | extern void | ||
56 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | ||
57 | enum dma_data_direction direction); | ||
58 | |||
59 | #define dma_sync_single_for_device dma_sync_single_for_cpu | ||
60 | #define dma_sync_single_range_for_device dma_sync_single_range_for_cpu | ||
61 | #define dma_sync_sg_for_device dma_sync_sg_for_cpu | ||
62 | |||
63 | extern int | ||
64 | dma_mapping_error(dma_addr_t dma_addr); | ||
65 | |||
66 | extern int | ||
67 | dma_supported(struct device *dev, u64 mask); | ||
68 | |||
69 | extern int | ||
70 | dma_set_mask(struct device *dev, u64 mask); | ||
71 | |||
72 | extern int | ||
73 | dma_get_cache_alignment(void); | ||
74 | |||
75 | extern int | ||
76 | dma_is_consistent(struct device *dev, dma_addr_t dma_handle); | ||
77 | |||
78 | extern void | ||
79 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
80 | enum dma_data_direction direction); | ||
81 | |||
24 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ | 82 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index c154b9d6e7e5..b8477414c5c8 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
@@ -48,6 +48,9 @@ | |||
48 | #ifndef O_NOATIME | 48 | #ifndef O_NOATIME |
49 | #define O_NOATIME 01000000 | 49 | #define O_NOATIME 01000000 |
50 | #endif | 50 | #endif |
51 | #ifndef O_CLOEXEC | ||
52 | #define O_CLOEXEC 02000000 /* set close_on_exec */ | ||
53 | #endif | ||
51 | #ifndef O_NDELAY | 54 | #ifndef O_NDELAY |
52 | #define O_NDELAY O_NONBLOCK | 55 | #define O_NDELAY O_NONBLOCK |
53 | #endif | 56 | #endif |
diff --git a/include/asm-h8300/dma-mapping.h b/include/asm-h8300/dma-mapping.h deleted file mode 100644 index d00e40099165..000000000000 --- a/include/asm-h8300/dma-mapping.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/dma-mapping-broken.h> | ||
diff --git a/include/asm-h8300/ioctls.h b/include/asm-h8300/ioctls.h index ac20457e5978..98a53d067269 100644 --- a/include/asm-h8300/ioctls.h +++ b/include/asm-h8300/ioctls.h | |||
@@ -47,6 +47,10 @@ | |||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
50 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
51 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
52 | 56 | ||
diff --git a/include/asm-h8300/pci.h b/include/asm-h8300/pci.h index 0c771b05fdd5..97389b35aa35 100644 --- a/include/asm-h8300/pci.h +++ b/include/asm-h8300/pci.h | |||
@@ -22,8 +22,4 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
22 | 22 | ||
23 | #define PCI_DMA_BUS_IS_PHYS (1) | 23 | #define PCI_DMA_BUS_IS_PHYS (1) |
24 | 24 | ||
25 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | #endif /* _ASM_H8300_PCI_H */ | 25 | #endif /* _ASM_H8300_PCI_H */ |
diff --git a/include/asm-h8300/termbits.h b/include/asm-h8300/termbits.h index 6a1f4d3807b4..31eca81db3f7 100644 --- a/include/asm-h8300/termbits.h +++ b/include/asm-h8300/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
@@ -130,6 +141,7 @@ struct ktermios { | |||
130 | #define HUPCL 0002000 | 141 | #define HUPCL 0002000 |
131 | #define CLOCAL 0004000 | 142 | #define CLOCAL 0004000 |
132 | #define CBAUDEX 0010000 | 143 | #define CBAUDEX 0010000 |
144 | #define BOTHER 0010000 | ||
133 | #define B57600 0010001 | 145 | #define B57600 0010001 |
134 | #define B115200 0010002 | 146 | #define B115200 0010002 |
135 | #define B230400 0010003 | 147 | #define B230400 0010003 |
@@ -145,10 +157,12 @@ struct ktermios { | |||
145 | #define B3000000 0010015 | 157 | #define B3000000 0010015 |
146 | #define B3500000 0010016 | 158 | #define B3500000 0010016 |
147 | #define B4000000 0010017 | 159 | #define B4000000 0010017 |
148 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 160 | #define CIBAUD 002003600000 /* input baud rate */ |
149 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
150 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
151 | 163 | ||
164 | #define IBSHIFT 16 /* shift from CBAUD to CIBAUD */ | ||
165 | |||
152 | /* c_lflag bits */ | 166 | /* c_lflag bits */ |
153 | #define ISIG 0000001 | 167 | #define ISIG 0000001 |
154 | #define ICANON 0000002 | 168 | #define ICANON 0000002 |
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h index fb2925d08c49..70eea64b4213 100644 --- a/include/asm-h8300/termios.h +++ b/include/asm-h8300/termios.h | |||
@@ -82,8 +82,10 @@ struct termio { | |||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
83 | }) | 83 | }) |
84 | 84 | ||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
87 | 89 | ||
88 | #endif /* __KERNEL__ */ | 90 | #endif /* __KERNEL__ */ |
89 | 91 | ||
diff --git a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h index 45f09dc9caff..aee4009a498e 100644 --- a/include/asm-h8300/thread_info.h +++ b/include/asm-h8300/thread_info.h | |||
@@ -92,6 +92,7 @@ static inline struct thread_info *current_thread_info(void) | |||
92 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | 92 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling |
93 | TIF_NEED_RESCHED */ | 93 | TIF_NEED_RESCHED */ |
94 | #define TIF_MEMDIE 5 | 94 | #define TIF_MEMDIE 5 |
95 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | ||
95 | 96 | ||
96 | /* as above, but as bit values */ | 97 | /* as above, but as bit values */ |
97 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 98 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -99,6 +100,7 @@ static inline struct thread_info *current_thread_info(void) | |||
99 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 100 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
100 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 101 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
101 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 102 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
103 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
102 | 104 | ||
103 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 105 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
104 | 106 | ||
diff --git a/include/asm-i386/boot.h b/include/asm-i386/boot.h index bd024ab4fe53..ed8affbf96cb 100644 --- a/include/asm-i386/boot.h +++ b/include/asm-i386/boot.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _LINUX_BOOT_H | 1 | #ifndef _ASM_BOOT_H |
2 | #define _LINUX_BOOT_H | 2 | #define _ASM_BOOT_H |
3 | 3 | ||
4 | /* Don't touch these, unless you really know what you're doing. */ | 4 | /* Don't touch these, unless you really know what you're doing. */ |
5 | #define DEF_INITSEG 0x9000 | 5 | #define DEF_INITSEG 0x9000 |
@@ -17,4 +17,4 @@ | |||
17 | + (CONFIG_PHYSICAL_ALIGN - 1)) \ | 17 | + (CONFIG_PHYSICAL_ALIGN - 1)) \ |
18 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) | 18 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) |
19 | 19 | ||
20 | #endif /* _LINUX_BOOT_H */ | 20 | #endif /* _ASM_BOOT_H */ |
diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h new file mode 100644 index 000000000000..427d8652bfde --- /dev/null +++ b/include/asm-i386/bootparam.h | |||
@@ -0,0 +1,85 @@ | |||
1 | #ifndef _ASM_BOOTPARAM_H | ||
2 | #define _ASM_BOOTPARAM_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/screen_info.h> | ||
6 | #include <linux/apm_bios.h> | ||
7 | #include <asm/e820.h> | ||
8 | #include <linux/edd.h> | ||
9 | #include <video/edid.h> | ||
10 | |||
11 | struct setup_header { | ||
12 | u8 setup_sects; | ||
13 | u16 root_flags; | ||
14 | u32 syssize; | ||
15 | u16 ram_size; | ||
16 | u16 vid_mode; | ||
17 | u16 root_dev; | ||
18 | u16 boot_flag; | ||
19 | u16 jump; | ||
20 | u32 header; | ||
21 | u16 version; | ||
22 | u32 realmode_swtch; | ||
23 | u16 start_sys; | ||
24 | u16 kernel_version; | ||
25 | u8 type_of_loader; | ||
26 | u8 loadflags; | ||
27 | #define LOADED_HIGH 0x01 | ||
28 | #define CAN_USE_HEAP 0x80 | ||
29 | u16 setup_move_size; | ||
30 | u32 code32_start; | ||
31 | u32 ramdisk_image; | ||
32 | u32 ramdisk_size; | ||
33 | u32 bootsect_kludge; | ||
34 | u16 heap_end_ptr; | ||
35 | u16 _pad1; | ||
36 | u32 cmd_line_ptr; | ||
37 | u32 initrd_addr_max; | ||
38 | u32 kernel_alignment; | ||
39 | u8 relocatable_kernel; | ||
40 | } __attribute__((packed)); | ||
41 | |||
42 | struct sys_desc_table { | ||
43 | u16 length; | ||
44 | u8 table[14]; | ||
45 | }; | ||
46 | |||
47 | struct efi_info { | ||
48 | u32 _pad1; | ||
49 | u32 efi_systab; | ||
50 | u32 efi_memdesc_size; | ||
51 | u32 efi_memdec_version; | ||
52 | u32 efi_memmap; | ||
53 | u32 fi_memmap_size; | ||
54 | u32 _pad2[2]; | ||
55 | }; | ||
56 | |||
57 | /* The so-called "zeropage" */ | ||
58 | struct boot_params { | ||
59 | struct screen_info screen_info; /* 0x000 */ | ||
60 | struct apm_bios_info apm_bios_info; /* 0x040 */ | ||
61 | u8 _pad2[12]; /* 0x054 */ | ||
62 | u32 speedstep_info[4]; /* 0x060 */ | ||
63 | u8 _pad3[16]; /* 0x070 */ | ||
64 | u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ | ||
65 | u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ | ||
66 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ | ||
67 | u8 _pad4[144]; /* 0x0b0 */ | ||
68 | struct edid_info edid_info; /* 0x140 */ | ||
69 | struct efi_info efi_info; /* 0x1c0 */ | ||
70 | u32 alt_mem_k; /* 0x1e0 */ | ||
71 | u32 scratch; /* Scratch field! */ /* 0x1e4 */ | ||
72 | u8 e820_entries; /* 0x1e8 */ | ||
73 | u8 eddbuf_entries; /* 0x1e9 */ | ||
74 | u8 edd_mbr_sig_buf_entries; /* 0x1ea */ | ||
75 | u8 _pad6[6]; /* 0x1eb */ | ||
76 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | ||
77 | u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | ||
78 | u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | ||
79 | struct e820entry e820_map[E820MAX]; /* 0x2d0 */ | ||
80 | u8 _pad8[48]; /* 0xcd0 */ | ||
81 | struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ | ||
82 | u8 _pad9[276]; /* 0xeec */ | ||
83 | } __attribute__((packed)); | ||
84 | |||
85 | #endif /* _ASM_BOOTPARAM_H */ | ||
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index f514e906643a..c961c03cf1e2 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #endif | 12 | #endif |
13 | #include <asm/required-features.h> | 13 | #include <asm/required-features.h> |
14 | 14 | ||
15 | #define NCAPINTS 7 /* N 32-bit words worth of info */ | 15 | #define NCAPINTS 8 /* N 32-bit words worth of info */ |
16 | 16 | ||
17 | /* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */ | 17 | /* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */ |
18 | #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ | 18 | #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ |
@@ -81,6 +81,7 @@ | |||
81 | #define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */ | 81 | #define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */ |
82 | #define X86_FEATURE_LAPIC_TIMER_BROKEN (3*32+ 14) /* lapic timer broken in C1 */ | 82 | #define X86_FEATURE_LAPIC_TIMER_BROKEN (3*32+ 14) /* lapic timer broken in C1 */ |
83 | #define X86_FEATURE_SYNC_RDTSC (3*32+15) /* RDTSC synchronizes the CPU */ | 83 | #define X86_FEATURE_SYNC_RDTSC (3*32+15) /* RDTSC synchronizes the CPU */ |
84 | #define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well on this CPU */ | ||
84 | 85 | ||
85 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 86 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
86 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 87 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
@@ -108,11 +109,24 @@ | |||
108 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ | 109 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ |
109 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ | 110 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ |
110 | 111 | ||
111 | #define cpu_has(c, bit) \ | 112 | /* |
112 | ((__builtin_constant_p(bit) && (bit) < 32 && \ | 113 | * Auxiliary flags: Linux defined - For features scattered in various |
113 | (1UL << (bit)) & REQUIRED_MASK1) ? \ | 114 | * CPUID levels like 0x6, 0xA etc |
114 | 1 : \ | 115 | */ |
115 | test_bit(bit, (c)->x86_capability)) | 116 | #define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */ |
117 | |||
118 | #define cpu_has(c, bit) \ | ||
119 | (__builtin_constant_p(bit) && \ | ||
120 | ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \ | ||
121 | (((bit)>>5)==1 && (1UL<<((bit)&31) & REQUIRED_MASK1)) || \ | ||
122 | (((bit)>>5)==2 && (1UL<<((bit)&31) & REQUIRED_MASK2)) || \ | ||
123 | (((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) || \ | ||
124 | (((bit)>>5)==4 && (1UL<<((bit)&31) & REQUIRED_MASK4)) || \ | ||
125 | (((bit)>>5)==5 && (1UL<<((bit)&31) & REQUIRED_MASK5)) || \ | ||
126 | (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) || \ | ||
127 | (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ) \ | ||
128 | ? 1 : \ | ||
129 | test_bit(bit, (c)->x86_capability)) | ||
116 | #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) | 130 | #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) |
117 | 131 | ||
118 | #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) | 132 | #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) |
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h index 096a2a8eb1da..c03290ccecb2 100644 --- a/include/asm-i386/e820.h +++ b/include/asm-i386/e820.h | |||
@@ -25,13 +25,15 @@ | |||
25 | 25 | ||
26 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
27 | 27 | ||
28 | struct e820entry { | ||
29 | u64 addr; /* start of memory segment */ | ||
30 | u64 size; /* size of memory segment */ | ||
31 | u32 type; /* type of memory segment */ | ||
32 | } __attribute__((packed)); | ||
33 | |||
28 | struct e820map { | 34 | struct e820map { |
29 | int nr_map; | 35 | u32 nr_map; |
30 | struct e820entry { | 36 | struct e820entry map[E820MAX]; |
31 | unsigned long long addr; /* start of memory segment */ | ||
32 | unsigned long long size; /* size of memory segment */ | ||
33 | unsigned long type; /* type of memory segment */ | ||
34 | } map[E820MAX]; | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | extern struct e820map e820; | 39 | extern struct e820map e820; |
diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index 80ea052ee3a4..249e753ac805 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h | |||
@@ -54,6 +54,8 @@ extern unsigned long __FIXADDR_TOP; | |||
54 | enum fixed_addresses { | 54 | enum fixed_addresses { |
55 | FIX_HOLE, | 55 | FIX_HOLE, |
56 | FIX_VDSO, | 56 | FIX_VDSO, |
57 | FIX_DBGP_BASE, | ||
58 | FIX_EARLYCON_MEM_BASE, | ||
57 | #ifdef CONFIG_X86_LOCAL_APIC | 59 | #ifdef CONFIG_X86_LOCAL_APIC |
58 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 60 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
59 | #endif | 61 | #endif |
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 0fc240c80f49..e7817a3d6578 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h | |||
@@ -40,14 +40,13 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
40 | 40 | ||
41 | static __inline__ unsigned long ide_default_io_base(int index) | 41 | static __inline__ unsigned long ide_default_io_base(int index) |
42 | { | 42 | { |
43 | struct pci_dev *pdev; | ||
44 | /* | 43 | /* |
45 | * If PCI is present then it is not safe to poke around | 44 | * If PCI is present then it is not safe to poke around |
46 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | 45 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are |
47 | * defined compatibility mode ports for PCI. A user can | 46 | * defined compatibility mode ports for PCI. A user can |
48 | * override this using ide= but we must default safe. | 47 | * override this using ide= but we must default safe. |
49 | */ | 48 | */ |
50 | if ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL)) == NULL) { | 49 | if (no_pci_devices()) { |
51 | switch(index) { | 50 | switch(index) { |
52 | case 2: return 0x1e8; | 51 | case 2: return 0x1e8; |
53 | case 3: return 0x168; | 52 | case 3: return 0x168; |
@@ -55,7 +54,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
55 | case 5: return 0x160; | 54 | case 5: return 0x160; |
56 | } | 55 | } |
57 | } | 56 | } |
58 | pci_dev_put(pdev); | ||
59 | switch (index) { | 57 | switch (index) { |
60 | case 0: return 0x1f0; | 58 | case 0: return 0x1f0; |
61 | case 1: return 0x170; | 59 | case 1: return 0x170; |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index e797586a5bfc..7b65b5b00034 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -129,6 +129,7 @@ extern void iounmap(volatile void __iomem *addr); | |||
129 | */ | 129 | */ |
130 | extern void *bt_ioremap(unsigned long offset, unsigned long size); | 130 | extern void *bt_ioremap(unsigned long offset, unsigned long size); |
131 | extern void bt_iounmap(void *addr, unsigned long size); | 131 | extern void bt_iounmap(void *addr, unsigned long size); |
132 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
132 | 133 | ||
133 | /* Use early IO mappings for DMI because it's initialized early */ | 134 | /* Use early IO mappings for DMI because it's initialized early */ |
134 | #define dmi_ioremap bt_ioremap | 135 | #define dmi_ioremap bt_ioremap |
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index 64b6d0baedbc..392d3fe5d45e 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h | |||
@@ -56,48 +56,11 @@ struct pci_dev; | |||
56 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 56 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
57 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 57 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
58 | 58 | ||
59 | /* This is always fine. */ | ||
60 | #define pci_dac_dma_supported(pci_dev, mask) (1) | ||
61 | |||
62 | static inline dma64_addr_t | ||
63 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction) | ||
64 | { | ||
65 | return ((dma64_addr_t) page_to_phys(page) + | ||
66 | (dma64_addr_t) offset); | ||
67 | } | ||
68 | |||
69 | static inline struct page * | ||
70 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
71 | { | ||
72 | return pfn_to_page(dma_addr >> PAGE_SHIFT); | ||
73 | } | ||
74 | |||
75 | static inline unsigned long | ||
76 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
77 | { | ||
78 | return (dma_addr & ~PAGE_MASK); | ||
79 | } | ||
80 | |||
81 | static inline void | ||
82 | pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
83 | { | ||
84 | } | ||
85 | |||
86 | static inline void | ||
87 | pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
88 | { | ||
89 | flush_write_buffers(); | ||
90 | } | ||
91 | |||
92 | #define HAVE_PCI_MMAP | 59 | #define HAVE_PCI_MMAP |
93 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 60 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
94 | enum pci_mmap_state mmap_state, int write_combine); | 61 | enum pci_mmap_state mmap_state, int write_combine); |
95 | 62 | ||
96 | 63 | ||
97 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | #ifdef CONFIG_PCI | 64 | #ifdef CONFIG_PCI |
102 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 65 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
103 | enum pci_dma_burst_strategy *strat, | 66 | enum pci_dma_burst_strategy *strat, |
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index a50fd1773de8..84b03cf56a79 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h | |||
@@ -57,14 +57,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
57 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 57 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * All present user pages are user-executable: | ||
61 | */ | ||
62 | static inline int pte_exec(pte_t pte) | ||
63 | { | ||
64 | return pte_user(pte); | ||
65 | } | ||
66 | |||
67 | /* | ||
68 | * All present pages are kernel-executable: | 60 | * All present pages are kernel-executable: |
69 | */ | 61 | */ |
70 | static inline int pte_exec_kernel(pte_t pte) | 62 | static inline int pte_exec_kernel(pte_t pte) |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index eb0f1d7e96a1..948a33414118 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -20,26 +20,11 @@ | |||
20 | #define pud_present(pud) 1 | 20 | #define pud_present(pud) 1 |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Is the pte executable? | ||
24 | */ | ||
25 | static inline int pte_x(pte_t pte) | ||
26 | { | ||
27 | return !(pte_val(pte) & _PAGE_NX); | ||
28 | } | ||
29 | |||
30 | /* | ||
31 | * All present user-pages with !NX bit are user-executable: | ||
32 | */ | ||
33 | static inline int pte_exec(pte_t pte) | ||
34 | { | ||
35 | return pte_user(pte) && pte_x(pte); | ||
36 | } | ||
37 | /* | ||
38 | * All present pages with !NX bit are kernel-executable: | 23 | * All present pages with !NX bit are kernel-executable: |
39 | */ | 24 | */ |
40 | static inline int pte_exec_kernel(pte_t pte) | 25 | static inline int pte_exec_kernel(pte_t pte) |
41 | { | 26 | { |
42 | return pte_x(pte); | 27 | return !(pte_val(pte) & _PAGE_NX); |
43 | } | 28 | } |
44 | 29 | ||
45 | /* Rules for using set_pte: the pte being assigned *must* be | 30 | /* Rules for using set_pte: the pte being assigned *must* be |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 628fa7747d0c..01734e05e63b 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -79,7 +79,7 @@ void paging_init(void); | |||
79 | * area for the same reason. ;) | 79 | * area for the same reason. ;) |
80 | */ | 80 | */ |
81 | #define VMALLOC_OFFSET (8*1024*1024) | 81 | #define VMALLOC_OFFSET (8*1024*1024) |
82 | #define VMALLOC_START (((unsigned long) high_memory + vmalloc_earlyreserve + \ | 82 | #define VMALLOC_START (((unsigned long) high_memory + \ |
83 | 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) | 83 | 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) |
84 | #ifdef CONFIG_HIGHMEM | 84 | #ifdef CONFIG_HIGHMEM |
85 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) | 85 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) |
@@ -218,8 +218,6 @@ extern unsigned long pg0[]; | |||
218 | * The following only work if pte_present() is true. | 218 | * The following only work if pte_present() is true. |
219 | * Undefined behaviour if not.. | 219 | * Undefined behaviour if not.. |
220 | */ | 220 | */ |
221 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | ||
222 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | ||
223 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } | 221 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } |
224 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 222 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } |
225 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } | 223 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } |
@@ -230,13 +228,9 @@ static inline int pte_huge(pte_t pte) { return (pte).pte_low & _PAGE_PSE; } | |||
230 | */ | 228 | */ |
231 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } | 229 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } |
232 | 230 | ||
233 | static inline pte_t pte_rdprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_USER; return pte; } | ||
234 | static inline pte_t pte_exprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_USER; return pte; } | ||
235 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte_low &= ~_PAGE_DIRTY; return pte; } | 231 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte_low &= ~_PAGE_DIRTY; return pte; } |
236 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte_low &= ~_PAGE_ACCESSED; return pte; } | 232 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte_low &= ~_PAGE_ACCESSED; return pte; } |
237 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_RW; return pte; } | 233 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_RW; return pte; } |
238 | static inline pte_t pte_mkread(pte_t pte) { (pte).pte_low |= _PAGE_USER; return pte; } | ||
239 | static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return pte; } | ||
240 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 234 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
241 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 235 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
242 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 236 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 338668bfb0a2..422cffef00c9 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -119,6 +119,7 @@ void __init cpu_detect(struct cpuinfo_x86 *c); | |||
119 | extern void identify_boot_cpu(void); | 119 | extern void identify_boot_cpu(void); |
120 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); | 120 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); |
121 | extern void print_cpu_info(struct cpuinfo_x86 *); | 121 | extern void print_cpu_info(struct cpuinfo_x86 *); |
122 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | ||
122 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 123 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
123 | extern unsigned short num_cache_leaves; | 124 | extern unsigned short num_cache_leaves; |
124 | 125 | ||
@@ -227,6 +228,10 @@ extern int bootloader_type; | |||
227 | 228 | ||
228 | #define HAVE_ARCH_PICK_MMAP_LAYOUT | 229 | #define HAVE_ARCH_PICK_MMAP_LAYOUT |
229 | 230 | ||
231 | extern void hard_disable_TSC(void); | ||
232 | extern void disable_TSC(void); | ||
233 | extern void hard_enable_TSC(void); | ||
234 | |||
230 | /* | 235 | /* |
231 | * Size of io_bitmap. | 236 | * Size of io_bitmap. |
232 | */ | 237 | */ |
diff --git a/include/asm-i386/required-features.h b/include/asm-i386/required-features.h index 9db866c1e64c..65848a007050 100644 --- a/include/asm-i386/required-features.h +++ b/include/asm-i386/required-features.h | |||
@@ -3,32 +3,53 @@ | |||
3 | 3 | ||
4 | /* Define minimum CPUID feature set for kernel These bits are checked | 4 | /* Define minimum CPUID feature set for kernel These bits are checked |
5 | really early to actually display a visible error message before the | 5 | really early to actually display a visible error message before the |
6 | kernel dies. Only add word 0 bits here | 6 | kernel dies. Make sure to assign features to the proper mask! |
7 | 7 | ||
8 | Some requirements that are not in CPUID yet are also in the | 8 | Some requirements that are not in CPUID yet are also in the |
9 | CONFIG_X86_MINIMUM_CPU mode which is checked too. | 9 | CONFIG_X86_MINIMUM_CPU_FAMILY which is checked too. |
10 | 10 | ||
11 | The real information is in arch/i386/Kconfig.cpu, this just converts | 11 | The real information is in arch/i386/Kconfig.cpu, this just converts |
12 | the CONFIGs into a bitmask */ | 12 | the CONFIGs into a bitmask */ |
13 | 13 | ||
14 | #ifndef CONFIG_MATH_EMULATION | ||
15 | # define NEED_FPU (1<<(X86_FEATURE_FPU & 31)) | ||
16 | #else | ||
17 | # define NEED_FPU 0 | ||
18 | #endif | ||
19 | |||
14 | #ifdef CONFIG_X86_PAE | 20 | #ifdef CONFIG_X86_PAE |
15 | #define NEED_PAE (1<<X86_FEATURE_PAE) | 21 | # define NEED_PAE (1<<(X86_FEATURE_PAE & 31)) |
16 | #else | 22 | #else |
17 | #define NEED_PAE 0 | 23 | # define NEED_PAE 0 |
18 | #endif | 24 | #endif |
19 | 25 | ||
20 | #ifdef CONFIG_X86_CMOV | 26 | #ifdef CONFIG_X86_CMOV |
21 | #define NEED_CMOV (1<<X86_FEATURE_CMOV) | 27 | # define NEED_CMOV (1<<(X86_FEATURE_CMOV & 31)) |
22 | #else | 28 | #else |
23 | #define NEED_CMOV 0 | 29 | # define NEED_CMOV 0 |
24 | #endif | 30 | #endif |
25 | 31 | ||
26 | #ifdef CONFIG_X86_CMPXCHG64 | 32 | #ifdef CONFIG_X86_CMPXCHG64 |
27 | #define NEED_CMPXCHG64 (1<<X86_FEATURE_CX8) | 33 | # define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31)) |
34 | #else | ||
35 | # define NEED_CX8 0 | ||
36 | #endif | ||
37 | |||
38 | #define REQUIRED_MASK0 (NEED_FPU|NEED_PAE|NEED_CMOV|NEED_CX8) | ||
39 | |||
40 | #ifdef CONFIG_X86_USE_3DNOW | ||
41 | # define NEED_3DNOW (1<<(X86_FEATURE_3DNOW & 31)) | ||
28 | #else | 42 | #else |
29 | #define NEED_CMPXCHG64 0 | 43 | # define NEED_3DNOW 0 |
30 | #endif | 44 | #endif |
31 | 45 | ||
32 | #define REQUIRED_MASK1 (NEED_PAE|NEED_CMOV|NEED_CMPXCHG64) | 46 | #define REQUIRED_MASK1 (NEED_3DNOW) |
47 | |||
48 | #define REQUIRED_MASK2 0 | ||
49 | #define REQUIRED_MASK3 0 | ||
50 | #define REQUIRED_MASK4 0 | ||
51 | #define REQUIRED_MASK5 0 | ||
52 | #define REQUIRED_MASK6 0 | ||
53 | #define REQUIRED_MASK7 0 | ||
33 | 54 | ||
34 | #endif | 55 | #endif |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 0e8077cbfdac..0d5bff9dc4a5 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -26,12 +26,15 @@ | |||
26 | #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ | 26 | #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ |
27 | 27 | ||
28 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
29 | |||
30 | #include <asm/bootparam.h> | ||
31 | |||
29 | /* | 32 | /* |
30 | * This is set up by the setup-routine at boot-time | 33 | * This is set up by the setup-routine at boot-time |
31 | */ | 34 | */ |
32 | extern unsigned char boot_params[PARAM_SIZE]; | 35 | extern struct boot_params boot_params; |
33 | 36 | ||
34 | #define PARAM (boot_params) | 37 | #define PARAM ((char *)&boot_params) |
35 | #define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) | 38 | #define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) |
36 | #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) | 39 | #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) |
37 | #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) | 40 | #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) |
@@ -39,8 +42,7 @@ extern unsigned char boot_params[PARAM_SIZE]; | |||
39 | #define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) | 42 | #define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) |
40 | #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) | 43 | #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) |
41 | #define IST_INFO (*(struct ist_info *) (PARAM+0x60)) | 44 | #define IST_INFO (*(struct ist_info *) (PARAM+0x60)) |
42 | #define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80)) | 45 | #define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0)) |
43 | #define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0)) | ||
44 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) | 46 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) |
45 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) | 47 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) |
46 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) | 48 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 4cb0f91ae64f..54424e045e01 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -137,6 +137,7 @@ static inline struct thread_info *current_thread_info(void) | |||
137 | #define TIF_DEBUG 17 /* uses debug registers */ | 137 | #define TIF_DEBUG 17 /* uses debug registers */ |
138 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ | 138 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ |
139 | #define TIF_FREEZE 19 /* is freezing for suspend */ | 139 | #define TIF_FREEZE 19 /* is freezing for suspend */ |
140 | #define TIF_NOTSC 20 /* TSC is not accessible in userland */ | ||
140 | 141 | ||
141 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 142 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
142 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 143 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -151,6 +152,7 @@ static inline struct thread_info *current_thread_info(void) | |||
151 | #define _TIF_DEBUG (1<<TIF_DEBUG) | 152 | #define _TIF_DEBUG (1<<TIF_DEBUG) |
152 | #define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP) | 153 | #define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP) |
153 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 154 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
155 | #define _TIF_NOTSC (1<<TIF_NOTSC) | ||
154 | 156 | ||
155 | /* work to do on interrupt/exception return */ | 157 | /* work to do on interrupt/exception return */ |
156 | #define _TIF_WORK_MASK \ | 158 | #define _TIF_WORK_MASK \ |
@@ -160,7 +162,8 @@ static inline struct thread_info *current_thread_info(void) | |||
160 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 162 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
161 | 163 | ||
162 | /* flags to check in __switch_to() */ | 164 | /* flags to check in __switch_to() */ |
163 | #define _TIF_WORK_CTXSW (_TIF_DEBUG|_TIF_IO_BITMAP) | 165 | #define _TIF_WORK_CTXSW_NEXT (_TIF_IO_BITMAP | _TIF_NOTSC | _TIF_DEBUG) |
166 | #define _TIF_WORK_CTXSW_PREV (_TIF_IO_BITMAP | _TIF_NOTSC) | ||
164 | 167 | ||
165 | /* | 168 | /* |
166 | * Thread-synchronous status. | 169 | * Thread-synchronous status. |
diff --git a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h index 40d01d80610d..0f6e5264ab8f 100644 --- a/include/asm-ia64/compat.h +++ b/include/asm-ia64/compat.h | |||
@@ -31,8 +31,10 @@ typedef s32 compat_timer_t; | |||
31 | 31 | ||
32 | typedef s32 compat_int_t; | 32 | typedef s32 compat_int_t; |
33 | typedef s32 compat_long_t; | 33 | typedef s32 compat_long_t; |
34 | typedef s64 __attribute__((aligned(4))) compat_s64; | ||
34 | typedef u32 compat_uint_t; | 35 | typedef u32 compat_uint_t; |
35 | typedef u32 compat_ulong_t; | 36 | typedef u32 compat_ulong_t; |
37 | typedef u64 __attribute__((aligned(4))) compat_u64; | ||
36 | 38 | ||
37 | struct compat_timespec { | 39 | struct compat_timespec { |
38 | compat_time_t tv_sec; | 40 | compat_time_t tv_sec; |
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index 41098f459684..edd5d01028df 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -48,6 +48,7 @@ enum { | |||
48 | IA64_MCA_RENDEZ_CHECKIN_NOTDONE = 0x0, | 48 | IA64_MCA_RENDEZ_CHECKIN_NOTDONE = 0x0, |
49 | IA64_MCA_RENDEZ_CHECKIN_DONE = 0x1, | 49 | IA64_MCA_RENDEZ_CHECKIN_DONE = 0x1, |
50 | IA64_MCA_RENDEZ_CHECKIN_INIT = 0x2, | 50 | IA64_MCA_RENDEZ_CHECKIN_INIT = 0x2, |
51 | IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA = 0x3, | ||
51 | }; | 52 | }; |
52 | 53 | ||
53 | /* Information maintained by the MC infrastructure */ | 54 | /* Information maintained by the MC infrastructure */ |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index 5a5d1c2ce39d..0149097b736d 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -71,14 +71,6 @@ pcibios_penalize_isa_irq (int irq, int active) | |||
71 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 71 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
72 | (((PTR)->LEN_NAME) = (VAL)) | 72 | (((PTR)->LEN_NAME) = (VAL)) |
73 | 73 | ||
74 | /* The ia64 platform always supports 64-bit addressing. */ | ||
75 | #define pci_dac_dma_supported(pci_dev, mask) (1) | ||
76 | #define pci_dac_page_to_dma(dev,pg,off,dir) ((dma_addr_t) page_to_bus(pg) + (off)) | ||
77 | #define pci_dac_dma_to_page(dev,dma_addr) (virt_to_page(bus_to_virt(dma_addr))) | ||
78 | #define pci_dac_dma_to_offset(dev,dma_addr) offset_in_page(dma_addr) | ||
79 | #define pci_dac_dma_sync_single_for_cpu(dev,dma_addr,len,dir) do { } while (0) | ||
80 | #define pci_dac_dma_sync_single_for_device(dev,dma_addr,len,dir) do { mb(); } while (0) | ||
81 | |||
82 | #ifdef CONFIG_PCI | 74 | #ifdef CONFIG_PCI |
83 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 75 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
84 | enum pci_dma_burst_strategy *strat, | 76 | enum pci_dma_burst_strategy *strat, |
@@ -104,10 +96,12 @@ extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, | |||
104 | #define HAVE_PCI_LEGACY | 96 | #define HAVE_PCI_LEGACY |
105 | extern int pci_mmap_legacy_page_range(struct pci_bus *bus, | 97 | extern int pci_mmap_legacy_page_range(struct pci_bus *bus, |
106 | struct vm_area_struct *vma); | 98 | struct vm_area_struct *vma); |
107 | extern ssize_t pci_read_legacy_io(struct kobject *kobj, char *buf, loff_t off, | 99 | extern ssize_t pci_read_legacy_io(struct kobject *kobj, |
108 | size_t count); | 100 | struct bin_attribute *bin_attr, |
109 | extern ssize_t pci_write_legacy_io(struct kobject *kobj, char *buf, loff_t off, | 101 | char *buf, loff_t off, size_t count); |
110 | size_t count); | 102 | extern ssize_t pci_write_legacy_io(struct kobject *kobj, |
103 | struct bin_attribute *bin_attr, | ||
104 | char *buf, loff_t off, size_t count); | ||
111 | extern int pci_mmap_legacy_mem(struct kobject *kobj, | 105 | extern int pci_mmap_legacy_mem(struct kobject *kobj, |
112 | struct bin_attribute *attr, | 106 | struct bin_attribute *attr, |
113 | struct vm_area_struct *vma); | 107 | struct vm_area_struct *vma); |
@@ -143,10 +137,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
143 | return (pci_domain_nr(bus) != 0); | 137 | return (pci_domain_nr(bus) != 0); |
144 | } | 138 | } |
145 | 139 | ||
146 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
147 | { | ||
148 | } | ||
149 | |||
150 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 140 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
151 | struct pci_bus_region *region, struct resource *res); | 141 | struct pci_bus_region *region, struct resource *res); |
152 | 142 | ||
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 6580f31b3135..f923d811c421 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -297,8 +297,6 @@ ia64_phys_addr_valid (unsigned long addr) | |||
297 | /* | 297 | /* |
298 | * The following have defined behavior only work if pte_present() is true. | 298 | * The following have defined behavior only work if pte_present() is true. |
299 | */ | 299 | */ |
300 | #define pte_user(pte) ((pte_val(pte) & _PAGE_PL_MASK) == _PAGE_PL_3) | ||
301 | #define pte_read(pte) (((pte_val(pte) & _PAGE_AR_MASK) >> _PAGE_AR_SHIFT) < 6) | ||
302 | #define pte_write(pte) ((unsigned) (((pte_val(pte) & _PAGE_AR_MASK) >> _PAGE_AR_SHIFT) - 2) <= 4) | 300 | #define pte_write(pte) ((unsigned) (((pte_val(pte) & _PAGE_AR_MASK) >> _PAGE_AR_SHIFT) - 2) <= 4) |
303 | #define pte_exec(pte) ((pte_val(pte) & _PAGE_AR_RX) != 0) | 301 | #define pte_exec(pte) ((pte_val(pte) & _PAGE_AR_RX) != 0) |
304 | #define pte_dirty(pte) ((pte_val(pte) & _PAGE_D) != 0) | 302 | #define pte_dirty(pte) ((pte_val(pte) & _PAGE_D) != 0) |
@@ -310,7 +308,6 @@ ia64_phys_addr_valid (unsigned long addr) | |||
310 | */ | 308 | */ |
311 | #define pte_wrprotect(pte) (__pte(pte_val(pte) & ~_PAGE_AR_RW)) | 309 | #define pte_wrprotect(pte) (__pte(pte_val(pte) & ~_PAGE_AR_RW)) |
312 | #define pte_mkwrite(pte) (__pte(pte_val(pte) | _PAGE_AR_RW)) | 310 | #define pte_mkwrite(pte) (__pte(pte_val(pte) | _PAGE_AR_RW)) |
313 | #define pte_mkexec(pte) (__pte(pte_val(pte) | _PAGE_AR_RX)) | ||
314 | #define pte_mkold(pte) (__pte(pte_val(pte) & ~_PAGE_A)) | 311 | #define pte_mkold(pte) (__pte(pte_val(pte) & ~_PAGE_A)) |
315 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) | 312 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) |
316 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) | 313 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index d3566a298fa4..676b31a08c61 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #define SN_SAL_NO_FAULT_ZONE_VIRTUAL 0x02000010 | 32 | #define SN_SAL_NO_FAULT_ZONE_VIRTUAL 0x02000010 |
33 | #define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011 | 33 | #define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011 |
34 | #define SN_SAL_PRINT_ERROR 0x02000012 | 34 | #define SN_SAL_PRINT_ERROR 0x02000012 |
35 | #define SN_SAL_REGISTER_PMI_HANDLER 0x02000014 | ||
35 | #define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant | 36 | #define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant |
36 | #define SN_SAL_GET_FIT_COMPT 0x0200001b // reentrant | 37 | #define SN_SAL_GET_FIT_COMPT 0x0200001b // reentrant |
37 | #define SN_SAL_GET_SAPIC_INFO 0x0200001d | 38 | #define SN_SAL_GET_SAPIC_INFO 0x0200001d |
@@ -680,6 +681,25 @@ sn_register_nofault_code(u64 start_addr, u64 end_addr, u64 return_addr, | |||
680 | } | 681 | } |
681 | 682 | ||
682 | /* | 683 | /* |
684 | * Register or unregister a function to handle a PMI received by a CPU. | ||
685 | * Before calling the registered handler, SAL sets r1 to the value that | ||
686 | * was passed in as the global_pointer. | ||
687 | * | ||
688 | * If the handler pointer is NULL, then the currently registered handler | ||
689 | * will be unregistered. | ||
690 | * | ||
691 | * Returns 0 on success, or a negative value if an error occurred. | ||
692 | */ | ||
693 | static inline int | ||
694 | sn_register_pmi_handler(u64 handler, u64 global_pointer) | ||
695 | { | ||
696 | struct ia64_sal_retval ret_stuff; | ||
697 | ia64_sal_oemcall(&ret_stuff, SN_SAL_REGISTER_PMI_HANDLER, handler, | ||
698 | global_pointer, 0, 0, 0, 0, 0); | ||
699 | return ret_stuff.status; | ||
700 | } | ||
701 | |||
702 | /* | ||
683 | * Change or query the coherence domain for this partition. Each cpu-based | 703 | * Change or query the coherence domain for this partition. Each cpu-based |
684 | * nasid is represented by a bit in an array of 64-bit words: | 704 | * nasid is represented by a bit in an array of 64-bit words: |
685 | * 0 = not in this partition's coherency domain | 705 | * 0 = not in this partition's coherency domain |
diff --git a/include/asm-ia64/termbits.h b/include/asm-ia64/termbits.h index 4531a511bde5..7fae3109ef47 100644 --- a/include/asm-ia64/termbits.h +++ b/include/asm-ia64/termbits.h | |||
@@ -26,6 +26,17 @@ struct termios { | |||
26 | cc_t c_cc[NCCS]; /* control characters */ | 26 | cc_t c_cc[NCCS]; /* control characters */ |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct termios2 { | ||
30 | tcflag_t c_iflag; /* input mode flags */ | ||
31 | tcflag_t c_oflag; /* output mode flags */ | ||
32 | tcflag_t c_cflag; /* control mode flags */ | ||
33 | tcflag_t c_lflag; /* local mode flags */ | ||
34 | cc_t c_line; /* line discipline */ | ||
35 | cc_t c_cc[NCCS]; /* control characters */ | ||
36 | speed_t c_ispeed; /* input speed */ | ||
37 | speed_t c_ospeed; /* output speed */ | ||
38 | }; | ||
39 | |||
29 | struct ktermios { | 40 | struct ktermios { |
30 | tcflag_t c_iflag; /* input mode flags */ | 41 | tcflag_t c_iflag; /* input mode flags */ |
31 | tcflag_t c_oflag; /* output mode flags */ | 42 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-m32r/dma-mapping.h b/include/asm-m32r/dma-mapping.h deleted file mode 100644 index f9b58ebba361..000000000000 --- a/include/asm-m32r/dma-mapping.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_DMA_MAPPING_H | ||
2 | #define _ASM_M32R_DMA_MAPPING_H | ||
3 | |||
4 | #include <asm-generic/dma-mapping-broken.h> | ||
5 | |||
6 | #endif /* _ASM_M32R_DMA_MAPPING_H */ | ||
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h index d23cfc45738a..b9f54bb5d7cf 100644 --- a/include/asm-m32r/ioctls.h +++ b/include/asm-m32r/ioctls.h | |||
@@ -47,6 +47,10 @@ | |||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
50 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
51 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
52 | 56 | ||
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 6604303fc47c..35af58c6b812 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h | |||
@@ -191,16 +191,6 @@ extern unsigned long empty_zero_page[1024]; | |||
191 | * The following only work if pte_present() is true. | 191 | * The following only work if pte_present() is true. |
192 | * Undefined behaviour if not.. | 192 | * Undefined behaviour if not.. |
193 | */ | 193 | */ |
194 | static inline int pte_read(pte_t pte) | ||
195 | { | ||
196 | return pte_val(pte) & _PAGE_READ; | ||
197 | } | ||
198 | |||
199 | static inline int pte_exec(pte_t pte) | ||
200 | { | ||
201 | return pte_val(pte) & _PAGE_EXEC; | ||
202 | } | ||
203 | |||
204 | static inline int pte_dirty(pte_t pte) | 194 | static inline int pte_dirty(pte_t pte) |
205 | { | 195 | { |
206 | return pte_val(pte) & _PAGE_DIRTY; | 196 | return pte_val(pte) & _PAGE_DIRTY; |
@@ -224,18 +214,6 @@ static inline int pte_file(pte_t pte) | |||
224 | return pte_val(pte) & _PAGE_FILE; | 214 | return pte_val(pte) & _PAGE_FILE; |
225 | } | 215 | } |
226 | 216 | ||
227 | static inline pte_t pte_rdprotect(pte_t pte) | ||
228 | { | ||
229 | pte_val(pte) &= ~_PAGE_READ; | ||
230 | return pte; | ||
231 | } | ||
232 | |||
233 | static inline pte_t pte_exprotect(pte_t pte) | ||
234 | { | ||
235 | pte_val(pte) &= ~_PAGE_EXEC; | ||
236 | return pte; | ||
237 | } | ||
238 | |||
239 | static inline pte_t pte_mkclean(pte_t pte) | 217 | static inline pte_t pte_mkclean(pte_t pte) |
240 | { | 218 | { |
241 | pte_val(pte) &= ~_PAGE_DIRTY; | 219 | pte_val(pte) &= ~_PAGE_DIRTY; |
@@ -254,18 +232,6 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
254 | return pte; | 232 | return pte; |
255 | } | 233 | } |
256 | 234 | ||
257 | static inline pte_t pte_mkread(pte_t pte) | ||
258 | { | ||
259 | pte_val(pte) |= _PAGE_READ; | ||
260 | return pte; | ||
261 | } | ||
262 | |||
263 | static inline pte_t pte_mkexec(pte_t pte) | ||
264 | { | ||
265 | pte_val(pte) |= _PAGE_EXEC; | ||
266 | return pte; | ||
267 | } | ||
268 | |||
269 | static inline pte_t pte_mkdirty(pte_t pte) | 235 | static inline pte_t pte_mkdirty(pte_t pte) |
270 | { | 236 | { |
271 | pte_val(pte) |= _PAGE_DIRTY; | 237 | pte_val(pte) |= _PAGE_DIRTY; |
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h index e402641dfbad..bc104008b55b 100644 --- a/include/asm-m32r/termbits.h +++ b/include/asm-m32r/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
@@ -129,6 +140,7 @@ struct ktermios { | |||
129 | #define HUPCL 0002000 | 140 | #define HUPCL 0002000 |
130 | #define CLOCAL 0004000 | 141 | #define CLOCAL 0004000 |
131 | #define CBAUDEX 0010000 | 142 | #define CBAUDEX 0010000 |
143 | #define BOTHER 0010000 | ||
132 | #define B57600 0010001 | 144 | #define B57600 0010001 |
133 | #define B115200 0010002 | 145 | #define B115200 0010002 |
134 | #define B230400 0010003 | 146 | #define B230400 0010003 |
@@ -144,11 +156,13 @@ struct ktermios { | |||
144 | #define B3000000 0010015 | 156 | #define B3000000 0010015 |
145 | #define B3500000 0010016 | 157 | #define B3500000 0010016 |
146 | #define B4000000 0010017 | 158 | #define B4000000 0010017 |
147 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 159 | #define CIBAUD 002003600000 /** input baud rate */ |
148 | #define CTVB 004000000000 /* VisioBraille Terminal flow control */ | 160 | #define CTVB 004000000000 /* VisioBraille Terminal flow control */ |
149 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
150 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
151 | 163 | ||
164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
165 | |||
152 | /* c_lflag bits */ | 166 | /* c_lflag bits */ |
153 | #define ISIG 0000001 | 167 | #define ISIG 0000001 |
154 | #define ICANON 0000002 | 168 | #define ICANON 0000002 |
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h index 4943dd8db44d..93ce79fd342a 100644 --- a/include/asm-m32r/termios.h +++ b/include/asm-m32r/termios.h | |||
@@ -81,8 +81,10 @@ struct termio { | |||
81 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 81 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
82 | }) | 82 | }) |
83 | 83 | ||
84 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 84 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
85 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 85 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
86 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
87 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
86 | 88 | ||
87 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
88 | 90 | ||
diff --git a/include/asm-m68k/atari_SLM.h b/include/asm-m68k/atari_SLM.h deleted file mode 100644 index 42f4fcdd8bc7..000000000000 --- a/include/asm-m68k/atari_SLM.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | |||
2 | #ifndef _ATARI_SLM_H | ||
3 | #define _ATARI_SLM_H | ||
4 | |||
5 | /* Atari SLM laser printer specific ioctls */ | ||
6 | |||
7 | #define SLMIOGSTAT 0xa100 | ||
8 | #define SLMIOGPSIZE 0xa101 | ||
9 | #define SLMIOGMFEED 0xa102 | ||
10 | |||
11 | #define SLMIORESET 0xa140 | ||
12 | |||
13 | #define SLMIOSPSIZE 0xa181 | ||
14 | #define SLMIOSMFEED 0xa182 | ||
15 | |||
16 | /* Status returning structure (SLMIOGSTAT) */ | ||
17 | struct SLM_status { | ||
18 | int stat; /* numeric status code */ | ||
19 | char str[40]; /* status string */ | ||
20 | }; | ||
21 | |||
22 | /* Paper size structure (SLMIO[GS]PSIZE) */ | ||
23 | struct SLM_paper_size { | ||
24 | int width; | ||
25 | int height; | ||
26 | }; | ||
27 | |||
28 | #endif /* _ATARI_SLM_H */ | ||
diff --git a/include/asm-m68k/atari_acsi.h b/include/asm-m68k/atari_acsi.h deleted file mode 100644 index 10fea68f191a..000000000000 --- a/include/asm-m68k/atari_acsi.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #ifndef _ASM_ATARI_ACSI_H | ||
2 | #define _ASM_ATARI_ACSI_H | ||
3 | |||
4 | /* Functions exported by drivers/block/acsi.c */ | ||
5 | |||
6 | void acsi_delay_start( void ); | ||
7 | void acsi_delay_end( long usec ); | ||
8 | int acsi_wait_for_IRQ( unsigned timeout ); | ||
9 | int acsi_wait_for_noIRQ( unsigned timeout ); | ||
10 | int acsicmd_nodma( const char *cmd, int enable); | ||
11 | int acsi_getstatus( void ); | ||
12 | int acsi_extstatus( char *buffer, int cnt ); | ||
13 | void acsi_end_extstatus( void ); | ||
14 | int acsi_extcmd( unsigned char *buffer, int cnt ); | ||
15 | |||
16 | /* The ACSI buffer is guarantueed to reside in ST-RAM and may be used by other | ||
17 | * drivers that work on the ACSI bus, too. It's data are valid only as long as | ||
18 | * the ST-DMA is locked. */ | ||
19 | extern char *acsi_buffer; | ||
20 | extern unsigned long phys_acsi_buffer; | ||
21 | |||
22 | /* Utility macros */ | ||
23 | |||
24 | /* Send one data byte over the bus and set mode for next operation | ||
25 | * with one move.l -- Atari recommends this... | ||
26 | */ | ||
27 | |||
28 | #define DMA_LONG_WRITE(data,mode) \ | ||
29 | do { \ | ||
30 | *((unsigned long *)&dma_wd.fdc_acces_seccount) = \ | ||
31 | ((data)<<16) | (mode); \ | ||
32 | } while(0) | ||
33 | |||
34 | #define ENABLE_IRQ() atari_turnon_irq( IRQ_MFP_ACSI ) | ||
35 | #define DISABLE_IRQ() atari_turnoff_irq( IRQ_MFP_ACSI ) | ||
36 | |||
37 | #endif /* _ASM_ATARI_ACSI_H */ | ||
diff --git a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h index b5b78c01eb6c..d029b75bcf04 100644 --- a/include/asm-m68k/motorola_pgtable.h +++ b/include/asm-m68k/motorola_pgtable.h | |||
@@ -164,21 +164,15 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) | |||
164 | * The following only work if pte_present() is true. | 164 | * The following only work if pte_present() is true. |
165 | * Undefined behaviour if not.. | 165 | * Undefined behaviour if not.. |
166 | */ | 166 | */ |
167 | static inline int pte_read(pte_t pte) { return 1; } | ||
168 | static inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_RONLY); } | 167 | static inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_RONLY); } |
169 | static inline int pte_exec(pte_t pte) { return 1; } | ||
170 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 168 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
171 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 169 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
172 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 170 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
173 | 171 | ||
174 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_RONLY; return pte; } | 172 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_RONLY; return pte; } |
175 | static inline pte_t pte_rdprotect(pte_t pte) { return pte; } | ||
176 | static inline pte_t pte_exprotect(pte_t pte) { return pte; } | ||
177 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } | 173 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } |
178 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 174 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
179 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_RONLY; return pte; } | 175 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_RONLY; return pte; } |
180 | static inline pte_t pte_mkread(pte_t pte) { return pte; } | ||
181 | static inline pte_t pte_mkexec(pte_t pte) { return pte; } | ||
182 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } | 176 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } |
183 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 177 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
184 | static inline pte_t pte_mknocache(pte_t pte) | 178 | static inline pte_t pte_mknocache(pte_t pte) |
diff --git a/include/asm-m68k/pci.h b/include/asm-m68k/pci.h index 9d2c07abe44f..678cb0b52314 100644 --- a/include/asm-m68k/pci.h +++ b/include/asm-m68k/pci.h | |||
@@ -54,8 +54,4 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
54 | */ | 54 | */ |
55 | #define PCI_DMA_BUS_IS_PHYS (1) | 55 | #define PCI_DMA_BUS_IS_PHYS (1) |
56 | 56 | ||
57 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | #endif /* _ASM_M68K_PCI_H */ | 57 | #endif /* _ASM_M68K_PCI_H */ |
diff --git a/include/asm-m68k/sun3_pgtable.h b/include/asm-m68k/sun3_pgtable.h index b9e62c1e7ae3..b766fc261bde 100644 --- a/include/asm-m68k/sun3_pgtable.h +++ b/include/asm-m68k/sun3_pgtable.h | |||
@@ -165,21 +165,15 @@ static inline void pgd_clear (pgd_t *pgdp) {} | |||
165 | * Undefined behaviour if not... | 165 | * Undefined behaviour if not... |
166 | * [we have the full set here even if they don't change from m68k] | 166 | * [we have the full set here even if they don't change from m68k] |
167 | */ | 167 | */ |
168 | static inline int pte_read(pte_t pte) { return 1; } | ||
169 | static inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEABLE; } | 168 | static inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEABLE; } |
170 | static inline int pte_exec(pte_t pte) { return 1; } | ||
171 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & SUN3_PAGE_MODIFIED; } | 169 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & SUN3_PAGE_MODIFIED; } |
172 | static inline int pte_young(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; } | 170 | static inline int pte_young(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; } |
173 | static inline int pte_file(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; } | 171 | static inline int pte_file(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; } |
174 | 172 | ||
175 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_WRITEABLE; return pte; } | 173 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_WRITEABLE; return pte; } |
176 | static inline pte_t pte_rdprotect(pte_t pte) { return pte; } | ||
177 | static inline pte_t pte_exprotect(pte_t pte) { return pte; } | ||
178 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_MODIFIED; return pte; } | 174 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_MODIFIED; return pte; } |
179 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_ACCESSED; return pte; } | 175 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_ACCESSED; return pte; } |
180 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= SUN3_PAGE_WRITEABLE; return pte; } | 176 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= SUN3_PAGE_WRITEABLE; return pte; } |
181 | static inline pte_t pte_mkread(pte_t pte) { return pte; } | ||
182 | static inline pte_t pte_mkexec(pte_t pte) { return pte; } | ||
183 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= SUN3_PAGE_MODIFIED; return pte; } | 177 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= SUN3_PAGE_MODIFIED; return pte; } |
184 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= SUN3_PAGE_ACCESSED; return pte; } | 178 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= SUN3_PAGE_ACCESSED; return pte; } |
185 | static inline pte_t pte_mknocache(pte_t pte) { pte_val(pte) |= SUN3_PAGE_NOCACHE; return pte; } | 179 | static inline pte_t pte_mknocache(pte_t pte) { pte_val(pte) |= SUN3_PAGE_NOCACHE; return pte; } |
diff --git a/include/asm-m68k/termbits.h b/include/asm-m68k/termbits.h index a194092240fb..0e520f328f53 100644 --- a/include/asm-m68k/termbits.h +++ b/include/asm-m68k/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-m68knommu/pci.h b/include/asm-m68knommu/pci.h index e04c77e1184d..a13f3cc87451 100644 --- a/include/asm-m68knommu/pci.h +++ b/include/asm-m68knommu/pci.h | |||
@@ -24,16 +24,6 @@ static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) | |||
24 | return 1; | 24 | return 1; |
25 | } | 25 | } |
26 | 26 | ||
27 | /* | ||
28 | * Not supporting more than 32-bit PCI bus addresses now, but | ||
29 | * must satisfy references to this function. Change if needed. | ||
30 | */ | ||
31 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
32 | |||
33 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | #endif /* CONFIG_COMEMPCI */ | 27 | #endif /* CONFIG_COMEMPCI */ |
38 | 28 | ||
39 | #endif /* M68KNOMMU_PCI_H */ | 29 | #endif /* M68KNOMMU_PCI_H */ |
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 432653d7ae09..568c76cdd900 100644 --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h | |||
@@ -37,8 +37,10 @@ typedef s32 compat_key_t; | |||
37 | 37 | ||
38 | typedef s32 compat_int_t; | 38 | typedef s32 compat_int_t; |
39 | typedef s32 compat_long_t; | 39 | typedef s32 compat_long_t; |
40 | typedef s64 compat_s64; | ||
40 | typedef u32 compat_uint_t; | 41 | typedef u32 compat_uint_t; |
41 | typedef u32 compat_ulong_t; | 42 | typedef u32 compat_ulong_t; |
43 | typedef u64 compat_u64; | ||
42 | 44 | ||
43 | struct compat_timespec { | 45 | struct compat_timespec { |
44 | compat_time_t tv_sec; | 46 | compat_time_t tv_sec; |
@@ -132,7 +134,8 @@ typedef u32 compat_uptr_t; | |||
132 | 134 | ||
133 | static inline void __user *compat_ptr(compat_uptr_t uptr) | 135 | static inline void __user *compat_ptr(compat_uptr_t uptr) |
134 | { | 136 | { |
135 | return (void __user *)(long)uptr; | 137 | /* cast to a __user pointer via "unsigned long" makes sparse happy */ |
138 | return (void __user *)(unsigned long)(long)uptr; | ||
136 | } | 139 | } |
137 | 140 | ||
138 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | 141 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 12bcc1f9fba9..7ba92890ea13 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -212,7 +212,8 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
212 | */ | 212 | */ |
213 | if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && | 213 | if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && |
214 | flags == _CACHE_UNCACHED) | 214 | flags == _CACHE_UNCACHED) |
215 | return (void __iomem *)CKSEG1ADDR(phys_addr); | 215 | return (void __iomem *) |
216 | (unsigned long)CKSEG1ADDR(phys_addr); | ||
216 | } | 217 | } |
217 | 218 | ||
218 | return __ioremap(offset, size, flags); | 219 | return __ioremap(offset, size, flags); |
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 3ca6a076124d..97102ebc54b1 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h | |||
@@ -24,7 +24,7 @@ static inline int irq_canonicalize(int irq) | |||
24 | #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ | 24 | #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #ifdef CONFIG_MIPS_MT_SMTC | 27 | #ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP |
28 | /* | 28 | /* |
29 | * Clear interrupt mask handling "backstop" if irq_hwmask | 29 | * Clear interrupt mask handling "backstop" if irq_hwmask |
30 | * entry so indicates. This implies that the ack() or end() | 30 | * entry so indicates. This implies that the ack() or end() |
diff --git a/include/asm-mips/mach-tx49xx/ioremap.h b/include/asm-mips/mach-tx49xx/ioremap.h index 88cf546719b8..1e7beae72229 100644 --- a/include/asm-mips/mach-tx49xx/ioremap.h +++ b/include/asm-mips/mach-tx49xx/ioremap.h | |||
@@ -36,7 +36,8 @@ static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | |||
36 | 36 | ||
37 | static inline int plat_iounmap(const volatile void __iomem *addr) | 37 | static inline int plat_iounmap(const volatile void __iomem *addr) |
38 | { | 38 | { |
39 | return (unsigned long)addr >= (unsigned long)(int)TXX9_DIRECTMAP_BASE; | 39 | return (unsigned long)addr >= |
40 | (unsigned long)(int)(TXX9_DIRECTMAP_BASE & 0xffffffff); | ||
40 | } | 41 | } |
41 | 42 | ||
42 | #endif /* __ASM_MACH_TX49XX_IOREMAP_H */ | 43 | #endif /* __ASM_MACH_TX49XX_IOREMAP_H */ |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 706b3691f57e..18f47f1e8cd5 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -707,10 +707,10 @@ do { \ | |||
707 | */ | 707 | */ |
708 | #define __read_64bit_c0_split(source, sel) \ | 708 | #define __read_64bit_c0_split(source, sel) \ |
709 | ({ \ | 709 | ({ \ |
710 | unsigned long long val; \ | 710 | unsigned long long __val; \ |
711 | unsigned long flags; \ | 711 | unsigned long __flags; \ |
712 | \ | 712 | \ |
713 | local_irq_save(flags); \ | 713 | local_irq_save(__flags); \ |
714 | if (sel == 0) \ | 714 | if (sel == 0) \ |
715 | __asm__ __volatile__( \ | 715 | __asm__ __volatile__( \ |
716 | ".set\tmips64\n\t" \ | 716 | ".set\tmips64\n\t" \ |
@@ -719,7 +719,7 @@ do { \ | |||
719 | "dsrl\t%M0, %M0, 32\n\t" \ | 719 | "dsrl\t%M0, %M0, 32\n\t" \ |
720 | "dsrl\t%L0, %L0, 32\n\t" \ | 720 | "dsrl\t%L0, %L0, 32\n\t" \ |
721 | ".set\tmips0" \ | 721 | ".set\tmips0" \ |
722 | : "=r" (val)); \ | 722 | : "=r" (__val)); \ |
723 | else \ | 723 | else \ |
724 | __asm__ __volatile__( \ | 724 | __asm__ __volatile__( \ |
725 | ".set\tmips64\n\t" \ | 725 | ".set\tmips64\n\t" \ |
@@ -728,17 +728,17 @@ do { \ | |||
728 | "dsrl\t%M0, %M0, 32\n\t" \ | 728 | "dsrl\t%M0, %M0, 32\n\t" \ |
729 | "dsrl\t%L0, %L0, 32\n\t" \ | 729 | "dsrl\t%L0, %L0, 32\n\t" \ |
730 | ".set\tmips0" \ | 730 | ".set\tmips0" \ |
731 | : "=r" (val)); \ | 731 | : "=r" (__val)); \ |
732 | local_irq_restore(flags); \ | 732 | local_irq_restore(__flags); \ |
733 | \ | 733 | \ |
734 | val; \ | 734 | __val; \ |
735 | }) | 735 | }) |
736 | 736 | ||
737 | #define __write_64bit_c0_split(source, sel, val) \ | 737 | #define __write_64bit_c0_split(source, sel, val) \ |
738 | do { \ | 738 | do { \ |
739 | unsigned long flags; \ | 739 | unsigned long __flags; \ |
740 | \ | 740 | \ |
741 | local_irq_save(flags); \ | 741 | local_irq_save(__flags); \ |
742 | if (sel == 0) \ | 742 | if (sel == 0) \ |
743 | __asm__ __volatile__( \ | 743 | __asm__ __volatile__( \ |
744 | ".set\tmips64\n\t" \ | 744 | ".set\tmips64\n\t" \ |
@@ -759,7 +759,7 @@ do { \ | |||
759 | "dmtc0\t%L0, " #source ", " #sel "\n\t" \ | 759 | "dmtc0\t%L0, " #source ", " #sel "\n\t" \ |
760 | ".set\tmips0" \ | 760 | ".set\tmips0" \ |
761 | : : "r" (val)); \ | 761 | : : "r" (val)); \ |
762 | local_irq_restore(flags); \ | 762 | local_irq_restore(__flags); \ |
763 | } while (0) | 763 | } while (0) |
764 | 764 | ||
765 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 765 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index a59d54749eef..4fcc185cb2d1 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -121,20 +121,6 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
121 | 121 | ||
122 | #endif /* CONFIG_DMA_NEED_PCI_MAP_STATE */ | 122 | #endif /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
123 | 123 | ||
124 | /* This is always fine. */ | ||
125 | #define pci_dac_dma_supported(pci_dev, mask) (1) | ||
126 | |||
127 | extern dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev, | ||
128 | struct page *page, unsigned long offset, int direction); | ||
129 | extern struct page *pci_dac_dma_to_page(struct pci_dev *pdev, | ||
130 | dma64_addr_t dma_addr); | ||
131 | extern unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev, | ||
132 | dma64_addr_t dma_addr); | ||
133 | extern void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, | ||
134 | dma64_addr_t dma_addr, size_t len, int direction); | ||
135 | extern void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, | ||
136 | dma64_addr_t dma_addr, size_t len, int direction); | ||
137 | |||
138 | #ifdef CONFIG_PCI | 124 | #ifdef CONFIG_PCI |
139 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 125 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
140 | enum pci_dma_burst_strategy *strat, | 126 | enum pci_dma_burst_strategy *strat, |
@@ -181,10 +167,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
181 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ | 167 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
182 | #include <asm-generic/pci-dma-compat.h> | 168 | #include <asm-generic/pci-dma-compat.h> |
183 | 169 | ||
184 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
185 | { | ||
186 | } | ||
187 | |||
188 | /* Do platform specific device initialization at pci_enable_device() time */ | 170 | /* Do platform specific device initialization at pci_enable_device() time */ |
189 | extern int pcibios_plat_dev_init(struct pci_dev *dev); | 171 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
190 | 172 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 27d77d981937..2e2d70d13ff6 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -178,9 +178,7 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
178 | * The following only work if pte_present() is true. | 178 | * The following only work if pte_present() is true. |
179 | * Undefined behaviour if not.. | 179 | * Undefined behaviour if not.. |
180 | */ | 180 | */ |
181 | static inline int pte_user(pte_t pte) { BUG(); return 0; } | ||
182 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 181 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
183 | static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; } | ||
184 | static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; } | 182 | static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; } |
185 | static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; } | 183 | static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; } |
186 | static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; } | 184 | static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; } |
@@ -193,13 +191,6 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
193 | return pte; | 191 | return pte; |
194 | } | 192 | } |
195 | 193 | ||
196 | static inline pte_t pte_rdprotect(pte_t pte) | ||
197 | { | ||
198 | pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); | ||
199 | pte.pte_high &= ~_PAGE_SILENT_READ; | ||
200 | return pte; | ||
201 | } | ||
202 | |||
203 | static inline pte_t pte_mkclean(pte_t pte) | 194 | static inline pte_t pte_mkclean(pte_t pte) |
204 | { | 195 | { |
205 | pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); | 196 | pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); |
@@ -224,16 +215,6 @@ static inline pte_t pte_mkwrite(pte_t pte) | |||
224 | return pte; | 215 | return pte; |
225 | } | 216 | } |
226 | 217 | ||
227 | static inline pte_t pte_mkread(pte_t pte) | ||
228 | { | ||
229 | pte.pte_low |= _PAGE_READ; | ||
230 | if (pte.pte_low & _PAGE_ACCESSED) { | ||
231 | pte.pte_low |= _PAGE_SILENT_READ; | ||
232 | pte.pte_high |= _PAGE_SILENT_READ; | ||
233 | } | ||
234 | return pte; | ||
235 | } | ||
236 | |||
237 | static inline pte_t pte_mkdirty(pte_t pte) | 218 | static inline pte_t pte_mkdirty(pte_t pte) |
238 | { | 219 | { |
239 | pte.pte_low |= _PAGE_MODIFIED; | 220 | pte.pte_low |= _PAGE_MODIFIED; |
@@ -253,7 +234,6 @@ static inline pte_t pte_mkyoung(pte_t pte) | |||
253 | return pte; | 234 | return pte; |
254 | } | 235 | } |
255 | #else | 236 | #else |
256 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_READ; } | ||
257 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } | 237 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } |
258 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } | 238 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } |
259 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 239 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
@@ -265,12 +245,6 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
265 | return pte; | 245 | return pte; |
266 | } | 246 | } |
267 | 247 | ||
268 | static inline pte_t pte_rdprotect(pte_t pte) | ||
269 | { | ||
270 | pte_val(pte) &= ~(_PAGE_READ | _PAGE_SILENT_READ); | ||
271 | return pte; | ||
272 | } | ||
273 | |||
274 | static inline pte_t pte_mkclean(pte_t pte) | 248 | static inline pte_t pte_mkclean(pte_t pte) |
275 | { | 249 | { |
276 | pte_val(pte) &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); | 250 | pte_val(pte) &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); |
@@ -291,14 +265,6 @@ static inline pte_t pte_mkwrite(pte_t pte) | |||
291 | return pte; | 265 | return pte; |
292 | } | 266 | } |
293 | 267 | ||
294 | static inline pte_t pte_mkread(pte_t pte) | ||
295 | { | ||
296 | pte_val(pte) |= _PAGE_READ; | ||
297 | if (pte_val(pte) & _PAGE_ACCESSED) | ||
298 | pte_val(pte) |= _PAGE_SILENT_READ; | ||
299 | return pte; | ||
300 | } | ||
301 | |||
302 | static inline pte_t pte_mkdirty(pte_t pte) | 268 | static inline pte_t pte_mkdirty(pte_t pte) |
303 | { | 269 | { |
304 | pte_val(pte) |= _PAGE_MODIFIED; | 270 | pte_val(pte) |= _PAGE_MODIFIED; |
diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h deleted file mode 100644 index 82ad401c7dca..000000000000 --- a/include/asm-mips/rtc.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-mips/rtc.h | ||
3 | * | ||
4 | * (Really an interface for drivers/char/genrtc.c) | ||
5 | * | ||
6 | * Copyright (C) 2004 MontaVista Software Inc. | ||
7 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
8 | * | ||
9 | * Please read the COPYING file for all license details. | ||
10 | */ | ||
11 | |||
12 | #ifndef _MIPS_RTC_H | ||
13 | #define _MIPS_RTC_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/rtc.h> | ||
18 | #include <asm/time.h> | ||
19 | |||
20 | #define RTC_PIE 0x40 /* periodic interrupt enable */ | ||
21 | #define RTC_AIE 0x20 /* alarm interrupt enable */ | ||
22 | #define RTC_UIE 0x10 /* update-finished interrupt enable */ | ||
23 | |||
24 | /* some dummy definitions */ | ||
25 | #define RTC_BATT_BAD 0x100 /* battery bad */ | ||
26 | #define RTC_SQWE 0x08 /* enable square-wave output */ | ||
27 | #define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */ | ||
28 | #define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ | ||
29 | #define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ | ||
30 | |||
31 | static inline unsigned int get_rtc_time(struct rtc_time *time) | ||
32 | { | ||
33 | unsigned long nowtime; | ||
34 | |||
35 | nowtime = rtc_mips_get_time(); | ||
36 | to_tm(nowtime, time); | ||
37 | time->tm_year -= 1900; | ||
38 | |||
39 | return RTC_24H; | ||
40 | } | ||
41 | |||
42 | static inline int set_rtc_time(struct rtc_time *time) | ||
43 | { | ||
44 | unsigned long nowtime; | ||
45 | int ret; | ||
46 | |||
47 | nowtime = mktime(time->tm_year+1900, time->tm_mon+1, | ||
48 | time->tm_mday, time->tm_hour, time->tm_min, | ||
49 | time->tm_sec); | ||
50 | ret = rtc_mips_set_time(nowtime); | ||
51 | |||
52 | return ret; | ||
53 | } | ||
54 | |||
55 | static inline unsigned int get_rtc_ss(void) | ||
56 | { | ||
57 | struct rtc_time h; | ||
58 | |||
59 | get_rtc_time(&h); | ||
60 | return h.tm_sec; | ||
61 | } | ||
62 | |||
63 | static inline int get_rtc_pll(struct rtc_pll_info *pll) | ||
64 | { | ||
65 | return -EINVAL; | ||
66 | } | ||
67 | |||
68 | static inline int set_rtc_pll(struct rtc_pll_info *pll) | ||
69 | { | ||
70 | return -EINVAL; | ||
71 | } | ||
72 | #endif | ||
73 | #endif | ||
diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h index 0bbe07b42a07..5bfdc3b64510 100644 --- a/include/asm-mips/termbits.h +++ b/include/asm-mips/termbits.h | |||
@@ -30,6 +30,17 @@ struct termios { | |||
30 | cc_t c_cc[NCCS]; /* control characters */ | 30 | cc_t c_cc[NCCS]; /* control characters */ |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct termios2 { | ||
34 | tcflag_t c_iflag; /* input mode flags */ | ||
35 | tcflag_t c_oflag; /* output mode flags */ | ||
36 | tcflag_t c_cflag; /* control mode flags */ | ||
37 | tcflag_t c_lflag; /* local mode flags */ | ||
38 | cc_t c_line; /* line discipline */ | ||
39 | cc_t c_cc[NCCS]; /* control characters */ | ||
40 | speed_t c_ispeed; /* input speed */ | ||
41 | speed_t c_ospeed; /* output speed */ | ||
42 | }; | ||
43 | |||
33 | struct ktermios { | 44 | struct ktermios { |
34 | tcflag_t c_iflag; /* input mode flags */ | 45 | tcflag_t c_iflag; /* input mode flags */ |
35 | tcflag_t c_oflag; /* output mode flags */ | 46 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-mips/tlbdebug.h b/include/asm-mips/tlbdebug.h index fff7a73e22d0..bb8f5c29c3d9 100644 --- a/include/asm-mips/tlbdebug.h +++ b/include/asm-mips/tlbdebug.h | |||
@@ -11,10 +11,6 @@ | |||
11 | /* | 11 | /* |
12 | * TLB debugging functions: | 12 | * TLB debugging functions: |
13 | */ | 13 | */ |
14 | extern void dump_tlb(int first, int last); | ||
15 | extern void dump_tlb_all(void); | 14 | extern void dump_tlb_all(void); |
16 | extern void dump_tlb_wired(void); | ||
17 | extern void dump_tlb_addr(unsigned long addr); | ||
18 | extern void dump_tlb_nonwired(void); | ||
19 | 15 | ||
20 | #endif /* __ASM_TLBDEBUG_H */ | 16 | #endif /* __ASM_TLBDEBUG_H */ |
diff --git a/include/asm-mips/vr41xx/giu.h b/include/asm-mips/vr41xx/giu.h index 8109cda557dc..0bcdd3a5c256 100644 --- a/include/asm-mips/vr41xx/giu.h +++ b/include/asm-mips/vr41xx/giu.h | |||
@@ -20,6 +20,15 @@ | |||
20 | #ifndef __NEC_VR41XX_GIU_H | 20 | #ifndef __NEC_VR41XX_GIU_H |
21 | #define __NEC_VR41XX_GIU_H | 21 | #define __NEC_VR41XX_GIU_H |
22 | 22 | ||
23 | /* | ||
24 | * NEC VR4100 series GIU platform device IDs. | ||
25 | */ | ||
26 | enum { | ||
27 | GPIO_50PINS_PULLUPDOWN, | ||
28 | GPIO_36PINS, | ||
29 | GPIO_48PINS_EDGE_SELECT, | ||
30 | }; | ||
31 | |||
23 | typedef enum { | 32 | typedef enum { |
24 | IRQ_TRIGGER_LEVEL, | 33 | IRQ_TRIGGER_LEVEL, |
25 | IRQ_TRIGGER_EDGE, | 34 | IRQ_TRIGGER_EDGE, |
diff --git a/include/asm-mips/vr41xx/siu.h b/include/asm-mips/vr41xx/siu.h index 1fcf6e8082b4..98cdb4096485 100644 --- a/include/asm-mips/vr41xx/siu.h +++ b/include/asm-mips/vr41xx/siu.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __NEC_VR41XX_SIU_H | 20 | #ifndef __NEC_VR41XX_SIU_H |
21 | #define __NEC_VR41XX_SIU_H | 21 | #define __NEC_VR41XX_SIU_H |
22 | 22 | ||
23 | #define SIU_PORTS_MAX 2 | ||
24 | |||
23 | typedef enum { | 25 | typedef enum { |
24 | SIU_INTERFACE_RS232C, | 26 | SIU_INTERFACE_RS232C, |
25 | SIU_INTERFACE_IRDA, | 27 | SIU_INTERFACE_IRDA, |
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 11f4222597a0..5a85d1b025c8 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h | |||
@@ -31,8 +31,10 @@ typedef s32 compat_timer_t; | |||
31 | 31 | ||
32 | typedef s32 compat_int_t; | 32 | typedef s32 compat_int_t; |
33 | typedef s32 compat_long_t; | 33 | typedef s32 compat_long_t; |
34 | typedef s64 compat_s64; | ||
34 | typedef u32 compat_uint_t; | 35 | typedef u32 compat_uint_t; |
35 | typedef u32 compat_ulong_t; | 36 | typedef u32 compat_ulong_t; |
37 | typedef u64 compat_u64; | ||
36 | 38 | ||
37 | struct compat_timespec { | 39 | struct compat_timespec { |
38 | compat_time_t tv_sec; | 40 | compat_time_t tv_sec; |
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h index 317851fa78f3..1e1c824764ee 100644 --- a/include/asm-parisc/fcntl.h +++ b/include/asm-parisc/fcntl.h | |||
@@ -3,21 +3,22 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_APPEND 00000010 | 6 | #define O_APPEND 000000010 |
7 | #define O_BLKSEEK 00000100 /* HPUX only */ | 7 | #define O_BLKSEEK 000000100 /* HPUX only */ |
8 | #define O_CREAT 00000400 /* not fcntl */ | 8 | #define O_CREAT 000000400 /* not fcntl */ |
9 | #define O_EXCL 00002000 /* not fcntl */ | 9 | #define O_EXCL 000002000 /* not fcntl */ |
10 | #define O_LARGEFILE 00004000 | 10 | #define O_LARGEFILE 000004000 |
11 | #define O_SYNC 00100000 | 11 | #define O_SYNC 000100000 |
12 | #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ | 12 | #define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */ |
13 | #define O_NOCTTY 00400000 /* not fcntl */ | 13 | #define O_NOCTTY 000400000 /* not fcntl */ |
14 | #define O_DSYNC 01000000 /* HPUX only */ | 14 | #define O_DSYNC 001000000 /* HPUX only */ |
15 | #define O_RSYNC 02000000 /* HPUX only */ | 15 | #define O_RSYNC 002000000 /* HPUX only */ |
16 | #define O_NOATIME 04000000 | 16 | #define O_NOATIME 004000000 |
17 | #define O_CLOEXEC 010000000 /* set close_on_exec */ | ||
17 | 18 | ||
18 | #define O_DIRECTORY 00010000 /* must be a directory */ | 19 | #define O_DIRECTORY 000010000 /* must be a directory */ |
19 | #define O_NOFOLLOW 00000200 /* don't follow links */ | 20 | #define O_NOFOLLOW 000000200 /* don't follow links */ |
20 | #define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ | 21 | #define O_INVISIBLE 004000000 /* invisible I/O, for DMAPI/XDSM */ |
21 | 22 | ||
22 | #define F_GETLK64 8 | 23 | #define F_GETLK64 8 |
23 | #define F_SETLK64 9 | 24 | #define F_SETLK64 9 |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index 7b3be9ac0dda..61fbd57a8323 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
@@ -238,9 +238,6 @@ extern inline void pcibios_register_hba(struct pci_hba_data *x) | |||
238 | #define PCIBIOS_MIN_IO 0x10 | 238 | #define PCIBIOS_MIN_IO 0x10 |
239 | #define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */ | 239 | #define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */ |
240 | 240 | ||
241 | /* Don't support DAC yet. */ | ||
242 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
243 | |||
244 | /* export the pci_ DMA API in terms of the dma_ one */ | 241 | /* export the pci_ DMA API in terms of the dma_ one */ |
245 | #include <asm-generic/pci-dma-compat.h> | 242 | #include <asm-generic/pci-dma-compat.h> |
246 | 243 | ||
@@ -284,10 +281,6 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
284 | return root; | 281 | return root; |
285 | } | 282 | } |
286 | 283 | ||
287 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
288 | { | ||
289 | } | ||
290 | |||
291 | static inline void pcibios_penalize_isa_irq(int irq, int active) | 284 | static inline void pcibios_penalize_isa_irq(int irq, int active) |
292 | { | 285 | { |
293 | /* We don't need to penalize isa irq's */ | 286 | /* We don't need to penalize isa irq's */ |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index beb2adb979d9..7e222c8ba739 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -335,18 +335,14 @@ extern inline void pgd_clear(pgd_t * pgdp) { } | |||
335 | * The following only work if pte_present() is true. | 335 | * The following only work if pte_present() is true. |
336 | * Undefined behaviour if not.. | 336 | * Undefined behaviour if not.. |
337 | */ | 337 | */ |
338 | extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_READ; } | ||
339 | extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 338 | extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
340 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 339 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
341 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } | 340 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } |
342 | extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 341 | extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
343 | extern inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
344 | 342 | ||
345 | extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_READ; return pte; } | ||
346 | extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } | 343 | extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } |
347 | extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 344 | extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
348 | extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; } | 345 | extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; } |
349 | extern inline pte_t pte_mkread(pte_t pte) { pte_val(pte) |= _PAGE_READ; return pte; } | ||
350 | extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } | 346 | extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } |
351 | extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 347 | extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
352 | extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; } | 348 | extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; } |
diff --git a/include/asm-parisc/termbits.h b/include/asm-parisc/termbits.h index a46e299a9391..e847fe979684 100644 --- a/include/asm-parisc/termbits.h +++ b/include/asm-parisc/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h index aacaabd28ac1..64ab1ddbdf85 100644 --- a/include/asm-powerpc/compat.h +++ b/include/asm-powerpc/compat.h | |||
@@ -33,8 +33,10 @@ typedef s32 compat_timer_t; | |||
33 | 33 | ||
34 | typedef s32 compat_int_t; | 34 | typedef s32 compat_int_t; |
35 | typedef s32 compat_long_t; | 35 | typedef s32 compat_long_t; |
36 | typedef s64 compat_s64; | ||
36 | typedef u32 compat_uint_t; | 37 | typedef u32 compat_uint_t; |
37 | typedef u32 compat_ulong_t; | 38 | typedef u32 compat_ulong_t; |
39 | typedef u64 compat_u64; | ||
38 | 40 | ||
39 | struct compat_timespec { | 41 | struct compat_timespec { |
40 | compat_time_t tv_sec; | 42 | compat_time_t tv_sec; |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index a19a6f1a1cf1..f6bd804d9090 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -61,7 +61,6 @@ struct dma_mapping_ops { | |||
61 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, | 61 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, |
62 | int nents, enum dma_data_direction direction); | 62 | int nents, enum dma_data_direction direction); |
63 | int (*dma_supported)(struct device *dev, u64 mask); | 63 | int (*dma_supported)(struct device *dev, u64 mask); |
64 | int (*dac_dma_supported)(struct device *dev, u64 mask); | ||
65 | int (*set_dma_mask)(struct device *dev, u64 dma_mask); | 64 | int (*set_dma_mask)(struct device *dev, u64 dma_mask); |
66 | }; | 65 | }; |
67 | 66 | ||
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index ce0f13e8eb14..e16e7bc9ab5c 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -74,18 +74,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
74 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); | 74 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); |
75 | extern struct dma_mapping_ops *get_pci_dma_ops(void); | 75 | extern struct dma_mapping_ops *get_pci_dma_ops(void); |
76 | 76 | ||
77 | /* For DAC DMA, we currently don't support it by default, but | ||
78 | * we let 64-bit platforms override this. | ||
79 | */ | ||
80 | static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) | ||
81 | { | ||
82 | struct dma_mapping_ops *d = get_pci_dma_ops(); | ||
83 | |||
84 | if (d && d->dac_dma_supported) | ||
85 | return d->dac_dma_supported(&hwdev->dev, mask); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 77 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
90 | enum pci_dma_burst_strategy *strat, | 78 | enum pci_dma_burst_strategy *strat, |
91 | unsigned long *strategy_parameter) | 79 | unsigned long *strategy_parameter) |
@@ -124,12 +112,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
124 | } | 112 | } |
125 | #endif | 113 | #endif |
126 | 114 | ||
127 | /* | ||
128 | * At present there are very few 32-bit PPC machines that can have | ||
129 | * memory above the 4GB point, and we don't support that. | ||
130 | */ | ||
131 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
132 | |||
133 | /* Return the index of the PCI controller for device PDEV. */ | 115 | /* Return the index of the PCI controller for device PDEV. */ |
134 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index | 116 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index |
135 | 117 | ||
@@ -243,8 +225,6 @@ extern void of_scan_bus(struct device_node *node, struct pci_bus *bus); | |||
243 | 225 | ||
244 | extern int pci_read_irq_line(struct pci_dev *dev); | 226 | extern int pci_read_irq_line(struct pci_dev *dev); |
245 | 227 | ||
246 | extern void pcibios_add_platform_entries(struct pci_dev *dev); | ||
247 | |||
248 | struct file; | 228 | struct file; |
249 | extern pgprot_t pci_phys_mem_access_prot(struct file *file, | 229 | extern pgprot_t pci_phys_mem_access_prot(struct file *file, |
250 | unsigned long pfn, | 230 | unsigned long pfn, |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 7fb730c62f83..973c1c13bdc0 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -512,9 +512,7 @@ extern unsigned long empty_zero_page[1024]; | |||
512 | * The following only work if pte_present() is true. | 512 | * The following only work if pte_present() is true. |
513 | * Undefined behaviour if not.. | 513 | * Undefined behaviour if not.. |
514 | */ | 514 | */ |
515 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
516 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 515 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
517 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } | ||
518 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 516 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
519 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 517 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
520 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 518 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
@@ -522,21 +520,13 @@ static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | |||
522 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 520 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
523 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 521 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
524 | 522 | ||
525 | static inline pte_t pte_rdprotect(pte_t pte) { | ||
526 | pte_val(pte) &= ~_PAGE_USER; return pte; } | ||
527 | static inline pte_t pte_wrprotect(pte_t pte) { | 523 | static inline pte_t pte_wrprotect(pte_t pte) { |
528 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } | 524 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } |
529 | static inline pte_t pte_exprotect(pte_t pte) { | ||
530 | pte_val(pte) &= ~_PAGE_EXEC; return pte; } | ||
531 | static inline pte_t pte_mkclean(pte_t pte) { | 525 | static inline pte_t pte_mkclean(pte_t pte) { |
532 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } | 526 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } |
533 | static inline pte_t pte_mkold(pte_t pte) { | 527 | static inline pte_t pte_mkold(pte_t pte) { |
534 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 528 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
535 | 529 | ||
536 | static inline pte_t pte_mkread(pte_t pte) { | ||
537 | pte_val(pte) |= _PAGE_USER; return pte; } | ||
538 | static inline pte_t pte_mkexec(pte_t pte) { | ||
539 | pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; } | ||
540 | static inline pte_t pte_mkwrite(pte_t pte) { | 530 | static inline pte_t pte_mkwrite(pte_t pte) { |
541 | pte_val(pte) |= _PAGE_RW; return pte; } | 531 | pte_val(pte) |= _PAGE_RW; return pte; } |
542 | static inline pte_t pte_mkdirty(pte_t pte) { | 532 | static inline pte_t pte_mkdirty(pte_t pte) { |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 3cfd98f44bfe..0c879121c8fc 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -232,9 +232,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) | |||
232 | * The following only work if pte_present() is true. | 232 | * The following only work if pte_present() is true. |
233 | * Undefined behaviour if not.. | 233 | * Undefined behaviour if not.. |
234 | */ | 234 | */ |
235 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER;} | ||
236 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;} | 235 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;} |
237 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC;} | ||
238 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;} | 236 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;} |
239 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;} | 237 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;} |
240 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} | 238 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} |
@@ -242,20 +240,12 @@ static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} | |||
242 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 240 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
243 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 241 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
244 | 242 | ||
245 | static inline pte_t pte_rdprotect(pte_t pte) { | ||
246 | pte_val(pte) &= ~_PAGE_USER; return pte; } | ||
247 | static inline pte_t pte_exprotect(pte_t pte) { | ||
248 | pte_val(pte) &= ~_PAGE_EXEC; return pte; } | ||
249 | static inline pte_t pte_wrprotect(pte_t pte) { | 243 | static inline pte_t pte_wrprotect(pte_t pte) { |
250 | pte_val(pte) &= ~(_PAGE_RW); return pte; } | 244 | pte_val(pte) &= ~(_PAGE_RW); return pte; } |
251 | static inline pte_t pte_mkclean(pte_t pte) { | 245 | static inline pte_t pte_mkclean(pte_t pte) { |
252 | pte_val(pte) &= ~(_PAGE_DIRTY); return pte; } | 246 | pte_val(pte) &= ~(_PAGE_DIRTY); return pte; } |
253 | static inline pte_t pte_mkold(pte_t pte) { | 247 | static inline pte_t pte_mkold(pte_t pte) { |
254 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 248 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
255 | static inline pte_t pte_mkread(pte_t pte) { | ||
256 | pte_val(pte) |= _PAGE_USER; return pte; } | ||
257 | static inline pte_t pte_mkexec(pte_t pte) { | ||
258 | pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; } | ||
259 | static inline pte_t pte_mkwrite(pte_t pte) { | 249 | static inline pte_t pte_mkwrite(pte_t pte) { |
260 | pte_val(pte) |= _PAGE_RW; return pte; } | 250 | pte_val(pte) |= _PAGE_RW; return pte; } |
261 | static inline pte_t pte_mkdirty(pte_t pte) { | 251 | static inline pte_t pte_mkdirty(pte_t pte) { |
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 9d162028dab9..d2442cd72a59 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -102,12 +102,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
102 | } | 102 | } |
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | /* | ||
106 | * At present there are very few 32-bit PPC machines that can have | ||
107 | * memory above the 4GB point, and we don't support that. | ||
108 | */ | ||
109 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
110 | |||
111 | /* Return the index of the PCI controller for device PDEV. */ | 105 | /* Return the index of the PCI controller for device PDEV. */ |
112 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index | 106 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index |
113 | 107 | ||
@@ -145,8 +139,6 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
145 | return root; | 139 | return root; |
146 | } | 140 | } |
147 | 141 | ||
148 | extern void pcibios_add_platform_entries(struct pci_dev *dev); | ||
149 | |||
150 | struct file; | 142 | struct file; |
151 | extern pgprot_t pci_phys_mem_access_prot(struct file *file, | 143 | extern pgprot_t pci_phys_mem_access_prot(struct file *file, |
152 | unsigned long pfn, | 144 | unsigned long pfn, |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 9d0ce9ff5840..18aa776313b9 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -533,9 +533,7 @@ static inline int pgd_present(pgd_t pgd) { return 1; } | |||
533 | * The following only work if pte_present() is true. | 533 | * The following only work if pte_present() is true. |
534 | * Undefined behaviour if not.. | 534 | * Undefined behaviour if not.. |
535 | */ | 535 | */ |
536 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
537 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 536 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
538 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } | ||
539 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 537 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
540 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 538 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
541 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 539 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
@@ -543,21 +541,13 @@ static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | |||
543 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 541 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
544 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 542 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
545 | 543 | ||
546 | static inline pte_t pte_rdprotect(pte_t pte) { | ||
547 | pte_val(pte) &= ~_PAGE_USER; return pte; } | ||
548 | static inline pte_t pte_wrprotect(pte_t pte) { | 544 | static inline pte_t pte_wrprotect(pte_t pte) { |
549 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } | 545 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } |
550 | static inline pte_t pte_exprotect(pte_t pte) { | ||
551 | pte_val(pte) &= ~_PAGE_EXEC; return pte; } | ||
552 | static inline pte_t pte_mkclean(pte_t pte) { | 546 | static inline pte_t pte_mkclean(pte_t pte) { |
553 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } | 547 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } |
554 | static inline pte_t pte_mkold(pte_t pte) { | 548 | static inline pte_t pte_mkold(pte_t pte) { |
555 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 549 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
556 | 550 | ||
557 | static inline pte_t pte_mkread(pte_t pte) { | ||
558 | pte_val(pte) |= _PAGE_USER; return pte; } | ||
559 | static inline pte_t pte_mkexec(pte_t pte) { | ||
560 | pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; } | ||
561 | static inline pte_t pte_mkwrite(pte_t pte) { | 551 | static inline pte_t pte_mkwrite(pte_t pte) { |
562 | pte_val(pte) |= _PAGE_RW; return pte; } | 552 | pte_val(pte) |= _PAGE_RW; return pte; } |
563 | static inline pte_t pte_mkdirty(pte_t pte) { | 553 | static inline pte_t pte_mkdirty(pte_t pte) { |
diff --git a/include/asm-s390/compat.h b/include/asm-s390/compat.h index 296f4f1a20e1..7f4ad623f7d5 100644 --- a/include/asm-s390/compat.h +++ b/include/asm-s390/compat.h | |||
@@ -60,8 +60,10 @@ typedef s32 compat_timer_t; | |||
60 | 60 | ||
61 | typedef s32 compat_int_t; | 61 | typedef s32 compat_int_t; |
62 | typedef s32 compat_long_t; | 62 | typedef s32 compat_long_t; |
63 | typedef s64 compat_s64; | ||
63 | typedef u32 compat_uint_t; | 64 | typedef u32 compat_uint_t; |
64 | typedef u32 compat_ulong_t; | 65 | typedef u32 compat_ulong_t; |
66 | typedef u64 compat_u64; | ||
65 | 67 | ||
66 | struct compat_timespec { | 68 | struct compat_timespec { |
67 | compat_time_t tv_sec; | 69 | compat_time_t tv_sec; |
diff --git a/include/asm-s390/dma-mapping.h b/include/asm-s390/dma-mapping.h deleted file mode 100644 index 3f8c12fde0f0..000000000000 --- a/include/asm-s390/dma-mapping.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-s390/dma-mapping.h | ||
3 | * | ||
4 | * S390 version | ||
5 | * | ||
6 | * This file exists so that #include <dma-mapping.h> doesn't break anything. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_DMA_MAPPING_H | ||
10 | #define _ASM_DMA_MAPPING_H | ||
11 | |||
12 | #endif /* _ASM_DMA_MAPPING_H */ | ||
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 0a307bb2f353..26215a976127 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -530,14 +530,6 @@ static inline int pte_young(pte_t pte) | |||
530 | return 0; | 530 | return 0; |
531 | } | 531 | } |
532 | 532 | ||
533 | static inline int pte_read(pte_t pte) | ||
534 | { | ||
535 | /* All pages are readable since we don't use the fetch | ||
536 | * protection bit in the storage key. | ||
537 | */ | ||
538 | return 1; | ||
539 | } | ||
540 | |||
541 | /* | 533 | /* |
542 | * pgd/pmd/pte modification functions | 534 | * pgd/pmd/pte modification functions |
543 | */ | 535 | */ |
diff --git a/include/asm-s390/termbits.h b/include/asm-s390/termbits.h index 585c78a6e407..811b9a9cdc08 100644 --- a/include/asm-s390/termbits.h +++ b/include/asm-s390/termbits.h | |||
@@ -25,6 +25,17 @@ struct termios { | |||
25 | cc_t c_cc[NCCS]; /* control characters */ | 25 | cc_t c_cc[NCCS]; /* control characters */ |
26 | }; | 26 | }; |
27 | 27 | ||
28 | struct termios2 { | ||
29 | tcflag_t c_iflag; /* input mode flags */ | ||
30 | tcflag_t c_oflag; /* output mode flags */ | ||
31 | tcflag_t c_cflag; /* control mode flags */ | ||
32 | tcflag_t c_lflag; /* local mode flags */ | ||
33 | cc_t c_line; /* line discipline */ | ||
34 | cc_t c_cc[NCCS]; /* control characters */ | ||
35 | speed_t c_ispeed; /* input speed */ | ||
36 | speed_t c_ospeed; /* output speed */ | ||
37 | }; | ||
38 | |||
28 | struct ktermios { | 39 | struct ktermios { |
29 | tcflag_t c_iflag; /* input mode flags */ | 40 | tcflag_t c_iflag; /* input mode flags */ |
30 | tcflag_t c_oflag; /* output mode flags */ | 41 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index 5a117ec43c77..aeee8da9c54f 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
@@ -22,7 +22,7 @@ static void __init check_bugs(void) | |||
22 | current_cpu_data.loops_per_jiffy = loops_per_jiffy; | 22 | current_cpu_data.loops_per_jiffy = loops_per_jiffy; |
23 | 23 | ||
24 | switch (current_cpu_data.type) { | 24 | switch (current_cpu_data.type) { |
25 | case CPU_SH7604 ... CPU_SH7619: | 25 | case CPU_SH7619: |
26 | *p++ = '2'; | 26 | *p++ = '2'; |
27 | break; | 27 | break; |
28 | case CPU_SH7206: | 28 | case CPU_SH7206: |
@@ -35,7 +35,7 @@ static void __init check_bugs(void) | |||
35 | case CPU_SH7750 ... CPU_SH4_501: | 35 | case CPU_SH7750 ... CPU_SH4_501: |
36 | *p++ = '4'; | 36 | *p++ = '4'; |
37 | break; | 37 | break; |
38 | case CPU_SH7770 ... CPU_SH7785: | 38 | case CPU_SH7770 ... CPU_SHX3: |
39 | *p++ = '4'; | 39 | *p++ = '4'; |
40 | *p++ = 'a'; | 40 | *p++ = 'a'; |
41 | break; | 41 | break; |
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index 9a3cb6ba9d15..7a18649d1ccb 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define __ASM_SH_CACHE_H | 9 | #define __ASM_SH_CACHE_H |
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #include <linux/init.h> | ||
12 | #include <asm/cpu/cache.h> | 13 | #include <asm/cpu/cache.h> |
13 | 14 | ||
14 | #define SH_CACHE_VALID 1 | 15 | #define SH_CACHE_VALID 1 |
@@ -48,6 +49,9 @@ struct cache_info { | |||
48 | 49 | ||
49 | unsigned long flags; | 50 | unsigned long flags; |
50 | }; | 51 | }; |
52 | |||
53 | int __init detect_cpu_and_cache_system(void); | ||
54 | |||
51 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
52 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
53 | #endif /* __ASM_SH_CACHE_H */ | 57 | #endif /* __ASM_SH_CACHE_H */ |
diff --git a/include/asm-sh/cpu-sh2/cache.h b/include/asm-sh/cpu-sh2/cache.h index 20b9796842dc..f02ba7a672b2 100644 --- a/include/asm-sh/cpu-sh2/cache.h +++ b/include/asm-sh/cpu-sh2/cache.h | |||
@@ -12,23 +12,7 @@ | |||
12 | 12 | ||
13 | #define L1_CACHE_SHIFT 4 | 13 | #define L1_CACHE_SHIFT 4 |
14 | 14 | ||
15 | #if defined(CONFIG_CPU_SUBTYPE_SH7604) | 15 | #if defined(CONFIG_CPU_SUBTYPE_SH7619) |
16 | #define CCR 0xfffffe92 /* Address of Cache Control Register */ | ||
17 | |||
18 | #define CCR_CACHE_CE 0x01 /* Cache enable */ | ||
19 | #define CCR_CACHE_ID 0x02 /* Instruction Replacement disable */ | ||
20 | #define CCR_CACHE_OD 0x04 /* Data Replacement disable */ | ||
21 | #define CCR_CACHE_TW 0x08 /* Two-way mode */ | ||
22 | #define CCR_CACHE_CP 0x10 /* Cache purge */ | ||
23 | |||
24 | #define CACHE_OC_ADDRESS_ARRAY 0x60000000 | ||
25 | |||
26 | #define CCR_CACHE_ENABLE CCR_CACHE_CE | ||
27 | #define CCR_CACHE_INVALIDATE CCR_CACHE_CP | ||
28 | #define CCR_CACHE_ORA CCR_CACHE_TW | ||
29 | #define CCR_CACHE_WT 0x00 /* SH-2 is _always_ write-through */ | ||
30 | |||
31 | #elif defined(CONFIG_CPU_SUBTYPE_SH7619) | ||
32 | #define CCR1 0xffffffec | 16 | #define CCR1 0xffffffec |
33 | #define CCR CCR1 | 17 | #define CCR CCR1 |
34 | 18 | ||
@@ -49,5 +33,5 @@ | |||
49 | #define CCR_CACHE_ENABLE CCR_CACHE_CE | 33 | #define CCR_CACHE_ENABLE CCR_CACHE_CE |
50 | #define CCR_CACHE_INVALIDATE CCR_CACHE_CF | 34 | #define CCR_CACHE_INVALIDATE CCR_CACHE_CF |
51 | #endif | 35 | #endif |
52 | #endif /* __ASM_CPU_SH2_CACHE_H */ | ||
53 | 36 | ||
37 | #endif /* __ASM_CPU_SH2_CACHE_H */ | ||
diff --git a/include/asm-sh/cpu-sh3/timer.h b/include/asm-sh/cpu-sh3/timer.h index b2394cf76f49..4928b08f9d19 100644 --- a/include/asm-sh/cpu-sh3/timer.h +++ b/include/asm-sh/cpu-sh3/timer.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7710) | 31 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7710) |
32 | #define TMU_TSTR 0xa412fe92 /* Byte access */ | 32 | #define TMU_012_TSTR 0xa412fe92 /* Byte access */ |
33 | 33 | ||
34 | #define TMU0_TCOR 0xa412fe94 /* Long access */ | 34 | #define TMU0_TCOR 0xa412fe94 /* Long access */ |
35 | #define TMU0_TCNT 0xa412fe98 /* Long access */ | 35 | #define TMU0_TCNT 0xa412fe98 /* Long access */ |
@@ -44,7 +44,7 @@ | |||
44 | #define TMU2_TCR 0xa412feb4 /* Word access */ | 44 | #define TMU2_TCR 0xa412feb4 /* Word access */ |
45 | 45 | ||
46 | #else | 46 | #else |
47 | #define TMU_TSTR 0xfffffe92 /* Byte access */ | 47 | #define TMU_012_TSTR 0xfffffe92 /* Byte access */ |
48 | 48 | ||
49 | #define TMU0_TCOR 0xfffffe94 /* Long access */ | 49 | #define TMU0_TCOR 0xfffffe94 /* Long access */ |
50 | #define TMU0_TCNT 0xfffffe98 /* Long access */ | 50 | #define TMU0_TCNT 0xfffffe98 /* Long access */ |
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index 39f41fcd509d..026025b51cea 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #define FRQCR0 0xffc80000 | 22 | #define FRQCR0 0xffc80000 |
23 | #define FRQCR1 0xffc80004 | 23 | #define FRQCR1 0xffc80004 |
24 | #define FRQMR1 0xffc80014 | 24 | #define FRQMR1 0xffc80014 |
25 | #elif defined(CONFIG_CPU_SUBTYPE_SHX3) | ||
26 | #define FRQCR 0xffc00014 | ||
25 | #else | 27 | #else |
26 | #define FRQCR 0xffc00000 | 28 | #define FRQCR 0xffc00000 |
27 | #define FRQCR_PSTBY 0x0200 | 29 | #define FRQCR_PSTBY 0x0200 |
diff --git a/include/asm-sh/cpu-sh4/timer.h b/include/asm-sh/cpu-sh4/timer.h index 8a4af126c890..d1e796b96888 100644 --- a/include/asm-sh/cpu-sh4/timer.h +++ b/include/asm-sh/cpu-sh4/timer.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-sh/cpu-sh4/timer.h | 2 | * include/asm-sh/cpu-sh4/timer.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Lineo Solutions, Inc. | 4 | * Copyright (C) 2004 Lineo Solutions, Inc. |
5 | * | 5 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
7 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
@@ -16,36 +16,45 @@ | |||
16 | * SH7750S/SH7750R | 16 | * SH7750S/SH7750R |
17 | * SH7751/SH7751R | 17 | * SH7751/SH7751R |
18 | * SH7760 | 18 | * SH7760 |
19 | * SH-X3 | ||
19 | * --------------------------------------------------------------------------- | 20 | * --------------------------------------------------------------------------- |
20 | */ | 21 | */ |
21 | 22 | #ifdef CONFIG_CPU_SUBTYPE_SHX3 | |
22 | #if !defined(CONFIG_CPU_SUBTYPE_SH7760) | 23 | #define TMU_012_BASE 0xffc10000 |
23 | #define TMU_TOCR 0xffd80000 /* Byte access */ | 24 | #define TMU_345_BASE 0xffc20000 |
25 | #else | ||
26 | #define TMU_012_BASE 0xffd80000 | ||
27 | #define TMU_345_BASE 0xfe100000 | ||
24 | #endif | 28 | #endif |
25 | #define TMU_TSTR 0xffd80004 /* Byte access */ | ||
26 | 29 | ||
27 | #define TMU0_TCOR 0xffd80008 /* Long access */ | 30 | #define TMU_TOCR TMU_012_BASE /* Not supported on all CPUs */ |
28 | #define TMU0_TCNT 0xffd8000c /* Long access */ | ||
29 | #define TMU0_TCR 0xffd80010 /* Word access */ | ||
30 | 31 | ||
31 | #define TMU1_TCOR 0xffd80014 /* Long access */ | 32 | #define TMU_012_TSTR (TMU_012_BASE + 0x04) |
32 | #define TMU1_TCNT 0xffd80018 /* Long access */ | 33 | #define TMU_345_TSTR (TMU_345_BASE + 0x04) |
33 | #define TMU1_TCR 0xffd8001c /* Word access */ | ||
34 | 34 | ||
35 | #define TMU2_TCOR 0xffd80020 /* Long access */ | 35 | #define TMU0_TCOR (TMU_012_BASE + 0x08) |
36 | #define TMU2_TCNT 0xffd80024 /* Long access */ | 36 | #define TMU0_TCNT (TMU_012_BASE + 0x0c) |
37 | #define TMU2_TCR 0xffd80028 /* Word access */ | 37 | #define TMU0_TCR (TMU_012_BASE + 0x10) |
38 | #define TMU2_TCPR 0xffd8002c /* Long access */ | ||
39 | 38 | ||
40 | #if !defined(CONFIG_CPU_SUBTYPE_SH7760) | 39 | #define TMU1_TCOR (TMU_012_BASE + 0x14) |
41 | #define TMU3_TCOR 0xfe100008 /* Long access */ | 40 | #define TMU1_TCNT (TMU_012_BASE + 0x18) |
42 | #define TMU3_TCNT 0xfe10000c /* Long access */ | 41 | #define TMU1_TCR (TMU_012_BASE + 0x1c) |
43 | #define TMU3_TCR 0xfe100010 /* Word access */ | ||
44 | 42 | ||
45 | #define TMU4_TCOR 0xfe100014 /* Long access */ | 43 | #define TMU2_TCOR (TMU_012_BASE + 0x20) |
46 | #define TMU4_TCNT 0xfe100018 /* Long access */ | 44 | #define TMU2_TCNT (TMU_012_BASE + 0x24) |
47 | #define TMU4_TCR 0xfe10001c /* Word access */ | 45 | #define TMU2_TCR (TMU_012_BASE + 0x28) |
48 | #endif | 46 | #define TMU2_TCPR (TMU_012_BASE + 0x2c) |
49 | 47 | ||
50 | #endif /* __ASM_CPU_SH4_TIMER_H */ | 48 | #define TMU3_TCOR (TMU_345_BASE + 0x08) |
49 | #define TMU3_TCNT (TMU_345_BASE + 0x0c) | ||
50 | #define TMU3_TCR (TMU_345_BASE + 0x10) | ||
51 | 51 | ||
52 | #define TMU4_TCOR (TMU_345_BASE + 0x14) | ||
53 | #define TMU4_TCNT (TMU_345_BASE + 0x18) | ||
54 | #define TMU4_TCR (TMU_345_BASE + 0x1c) | ||
55 | |||
56 | #define TMU5_TCOR (TMU_345_BASE + 0x20) | ||
57 | #define TMU5_TCNT (TMU_345_BASE + 0x24) | ||
58 | #define TMU5_TCR (TMU_345_BASE + 0x28) | ||
59 | |||
60 | #endif /* __ASM_CPU_SH4_TIMER_H */ | ||
diff --git a/include/asm-sh/futex-irq.h b/include/asm-sh/futex-irq.h new file mode 100644 index 000000000000..a9f16a7f9aea --- /dev/null +++ b/include/asm-sh/futex-irq.h | |||
@@ -0,0 +1,111 @@ | |||
1 | #ifndef __ASM_SH_FUTEX_IRQ_H | ||
2 | #define __ASM_SH_FUTEX_IRQ_H | ||
3 | |||
4 | #include <asm/system.h> | ||
5 | |||
6 | static inline int atomic_futex_op_xchg_set(int oparg, int __user *uaddr, | ||
7 | int *oldval) | ||
8 | { | ||
9 | unsigned long flags; | ||
10 | int ret; | ||
11 | |||
12 | local_irq_save(flags); | ||
13 | |||
14 | ret = get_user(*oldval, uaddr); | ||
15 | if (!ret) | ||
16 | ret = put_user(oparg, uaddr); | ||
17 | |||
18 | local_irq_restore(flags); | ||
19 | |||
20 | return ret; | ||
21 | } | ||
22 | |||
23 | static inline int atomic_futex_op_xchg_add(int oparg, int __user *uaddr, | ||
24 | int *oldval) | ||
25 | { | ||
26 | unsigned long flags; | ||
27 | int ret; | ||
28 | |||
29 | local_irq_save(flags); | ||
30 | |||
31 | ret = get_user(*oldval, uaddr); | ||
32 | if (!ret) | ||
33 | ret = put_user(*oldval + oparg, uaddr); | ||
34 | |||
35 | local_irq_restore(flags); | ||
36 | |||
37 | return ret; | ||
38 | } | ||
39 | |||
40 | static inline int atomic_futex_op_xchg_or(int oparg, int __user *uaddr, | ||
41 | int *oldval) | ||
42 | { | ||
43 | unsigned long flags; | ||
44 | int ret; | ||
45 | |||
46 | local_irq_save(flags); | ||
47 | |||
48 | ret = get_user(*oldval, uaddr); | ||
49 | if (!ret) | ||
50 | ret = put_user(*oldval | oparg, uaddr); | ||
51 | |||
52 | local_irq_restore(flags); | ||
53 | |||
54 | return ret; | ||
55 | } | ||
56 | |||
57 | static inline int atomic_futex_op_xchg_and(int oparg, int __user *uaddr, | ||
58 | int *oldval) | ||
59 | { | ||
60 | unsigned long flags; | ||
61 | int ret; | ||
62 | |||
63 | local_irq_save(flags); | ||
64 | |||
65 | ret = get_user(*oldval, uaddr); | ||
66 | if (!ret) | ||
67 | ret = put_user(*oldval & oparg, uaddr); | ||
68 | |||
69 | local_irq_restore(flags); | ||
70 | |||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | static inline int atomic_futex_op_xchg_xor(int oparg, int __user *uaddr, | ||
75 | int *oldval) | ||
76 | { | ||
77 | unsigned long flags; | ||
78 | int ret; | ||
79 | |||
80 | local_irq_save(flags); | ||
81 | |||
82 | ret = get_user(*oldval, uaddr); | ||
83 | if (!ret) | ||
84 | ret = put_user(*oldval ^ oparg, uaddr); | ||
85 | |||
86 | local_irq_restore(flags); | ||
87 | |||
88 | return ret; | ||
89 | } | ||
90 | |||
91 | static inline int atomic_futex_op_cmpxchg_inatomic(int __user *uaddr, | ||
92 | int oldval, int newval) | ||
93 | { | ||
94 | unsigned long flags; | ||
95 | int ret, prev = 0; | ||
96 | |||
97 | local_irq_save(flags); | ||
98 | |||
99 | ret = get_user(prev, uaddr); | ||
100 | if (!ret && oldval == prev) | ||
101 | ret = put_user(newval, uaddr); | ||
102 | |||
103 | local_irq_restore(flags); | ||
104 | |||
105 | if (ret) | ||
106 | return ret; | ||
107 | |||
108 | return prev; | ||
109 | } | ||
110 | |||
111 | #endif /* __ASM_SH_FUTEX_IRQ_H */ | ||
diff --git a/include/asm-sh/futex.h b/include/asm-sh/futex.h index 6a332a9f099c..74ed3681d33c 100644 --- a/include/asm-sh/futex.h +++ b/include/asm-sh/futex.h | |||
@@ -1,6 +1,77 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef __ASM_SH_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define __ASM_SH_FUTEX_H |
3 | 3 | ||
4 | #include <asm-generic/futex.h> | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #endif | 6 | #include <linux/futex.h> |
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | /* XXX: UP variants, fix for SH-4A and SMP.. */ | ||
11 | #include <asm/futex-irq.h> | ||
12 | |||
13 | static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | ||
14 | { | ||
15 | int op = (encoded_op >> 28) & 7; | ||
16 | int cmp = (encoded_op >> 24) & 15; | ||
17 | int oparg = (encoded_op << 8) >> 20; | ||
18 | int cmparg = (encoded_op << 20) >> 20; | ||
19 | int oldval = 0, ret; | ||
20 | |||
21 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
22 | oparg = 1 << oparg; | ||
23 | |||
24 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
25 | return -EFAULT; | ||
26 | |||
27 | pagefault_disable(); | ||
28 | |||
29 | switch (op) { | ||
30 | case FUTEX_OP_SET: | ||
31 | ret = atomic_futex_op_xchg_set(oparg, uaddr, &oldval); | ||
32 | break; | ||
33 | case FUTEX_OP_ADD: | ||
34 | ret = atomic_futex_op_xchg_add(oparg, uaddr, &oldval); | ||
35 | break; | ||
36 | case FUTEX_OP_OR: | ||
37 | ret = atomic_futex_op_xchg_or(oparg, uaddr, &oldval); | ||
38 | break; | ||
39 | case FUTEX_OP_ANDN: | ||
40 | ret = atomic_futex_op_xchg_and(~oparg, uaddr, &oldval); | ||
41 | break; | ||
42 | case FUTEX_OP_XOR: | ||
43 | ret = atomic_futex_op_xchg_xor(oparg, uaddr, &oldval); | ||
44 | break; | ||
45 | default: | ||
46 | ret = -ENOSYS; | ||
47 | break; | ||
48 | } | ||
49 | |||
50 | pagefault_enable(); | ||
51 | |||
52 | if (!ret) { | ||
53 | switch (cmp) { | ||
54 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
55 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
56 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
57 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
58 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
59 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
60 | default: ret = -ENOSYS; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | return ret; | ||
65 | } | ||
66 | |||
67 | static inline int | ||
68 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | ||
69 | { | ||
70 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
71 | return -EFAULT; | ||
72 | |||
73 | return atomic_futex_op_cmpxchg_inatomic(uaddr, oldval, newval); | ||
74 | } | ||
75 | |||
76 | #endif /* __KERNEL__ */ | ||
77 | #endif /* __ASM_SH_FUTEX_H */ | ||
diff --git a/include/asm-sh/hd64461.h b/include/asm-sh/hd64461.h index 27e5c34e2659..4dd8592ca014 100644 --- a/include/asm-sh/hd64461.h +++ b/include/asm-sh/hd64461.h | |||
@@ -1,200 +1,241 @@ | |||
1 | #ifndef __ASM_SH_HD64461 | 1 | #ifndef __ASM_SH_HD64461 |
2 | #define __ASM_SH_HD64461 | 2 | #define __ASM_SH_HD64461 |
3 | /* | 3 | /* |
4 | * $Id: hd64461.h,v 1.5 2004/03/16 00:07:51 lethal Exp $ | 4 | * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> |
5 | * Copyright (C) 2004 Paul Mundt | ||
5 | * Copyright (C) 2000 YAEGASHI Takeshi | 6 | * Copyright (C) 2000 YAEGASHI Takeshi |
6 | * Hitachi HD64461 companion chip support | 7 | * |
8 | * Hitachi HD64461 companion chip support | ||
9 | * (please note manual reference 0x10000000 = 0xb0000000) | ||
7 | */ | 10 | */ |
8 | 11 | ||
9 | /* Constants for PCMCIA mappings */ | 12 | /* Constants for PCMCIA mappings */ |
10 | #define HD64461_PCC_WINDOW 0x01000000 | 13 | #define HD64461_PCC_WINDOW 0x01000000 |
11 | 14 | ||
12 | #define HD64461_PCC0_BASE 0xb8000000 /* area 6 */ | 15 | /* Area 6 - Slot 0 - memory and/or IO card */ |
13 | #define HD64461_PCC0_ATTR (HD64461_PCC0_BASE) | 16 | #define HD64461_PCC0_BASE (CONFIG_HD64461_IOBASE + 0x8000000) |
14 | #define HD64461_PCC0_COMM (HD64461_PCC0_BASE+HD64461_PCC_WINDOW) | 17 | #define HD64461_PCC0_ATTR (HD64461_PCC0_BASE) /* 0xb80000000 */ |
15 | #define HD64461_PCC0_IO (HD64461_PCC0_BASE+2*HD64461_PCC_WINDOW) | 18 | #define HD64461_PCC0_COMM (HD64461_PCC0_BASE+HD64461_PCC_WINDOW) /* 0xb90000000 */ |
16 | 19 | #define HD64461_PCC0_IO (HD64461_PCC0_BASE+2*HD64461_PCC_WINDOW) /* 0xba0000000 */ | |
17 | #define HD64461_PCC1_BASE 0xb4000000 /* area 5 */ | 20 | |
18 | #define HD64461_PCC1_ATTR (HD64461_PCC1_BASE) | 21 | /* Area 5 - Slot 1 - memory card only */ |
19 | #define HD64461_PCC1_COMM (HD64461_PCC1_BASE+HD64461_PCC_WINDOW) | 22 | #define HD64461_PCC1_BASE (CONFIG_HD64461_IOBASE + 0x4000000) |
20 | 23 | #define HD64461_PCC1_ATTR (HD64461_PCC1_BASE) /* 0xb4000000 */ | |
21 | #define HD64461_STBCR 0x10000 | 24 | #define HD64461_PCC1_COMM (HD64461_PCC1_BASE+HD64461_PCC_WINDOW) /* 0xb5000000 */ |
22 | #define HD64461_STBCR_CKIO_STBY 0x2000 | 25 | |
23 | #define HD64461_STBCR_SAFECKE_IST 0x1000 | 26 | /* Standby Control Register for HD64461 */ |
24 | #define HD64461_STBCR_SLCKE_IST 0x0800 | 27 | #define HD64461_STBCR CONFIG_HD64461_IOBASE |
25 | #define HD64461_STBCR_SAFECKE_OST 0x0400 | 28 | #define HD64461_STBCR_CKIO_STBY 0x2000 |
26 | #define HD64461_STBCR_SLCKE_OST 0x0200 | 29 | #define HD64461_STBCR_SAFECKE_IST 0x1000 |
27 | #define HD64461_STBCR_SMIAST 0x0100 | 30 | #define HD64461_STBCR_SLCKE_IST 0x0800 |
28 | #define HD64461_STBCR_SLCDST 0x0080 | 31 | #define HD64461_STBCR_SAFECKE_OST 0x0400 |
29 | #define HD64461_STBCR_SPC0ST 0x0040 | 32 | #define HD64461_STBCR_SLCKE_OST 0x0200 |
30 | #define HD64461_STBCR_SPC1ST 0x0020 | 33 | #define HD64461_STBCR_SMIAST 0x0100 |
31 | #define HD64461_STBCR_SAFEST 0x0010 | 34 | #define HD64461_STBCR_SLCDST 0x0080 |
32 | #define HD64461_STBCR_STM0ST 0x0008 | 35 | #define HD64461_STBCR_SPC0ST 0x0040 |
33 | #define HD64461_STBCR_STM1ST 0x0004 | 36 | #define HD64461_STBCR_SPC1ST 0x0020 |
34 | #define HD64461_STBCR_SIRST 0x0002 | 37 | #define HD64461_STBCR_SAFEST 0x0010 |
35 | #define HD64461_STBCR_SURTST 0x0001 | 38 | #define HD64461_STBCR_STM0ST 0x0008 |
36 | 39 | #define HD64461_STBCR_STM1ST 0x0004 | |
37 | #define HD64461_SYSCR 0x10002 | 40 | #define HD64461_STBCR_SIRST 0x0002 |
38 | #define HD64461_SCPUCR 0x10004 | 41 | #define HD64461_STBCR_SURTST 0x0001 |
39 | 42 | ||
40 | #define HD64461_LCDCBAR 0x11000 | 43 | /* System Configuration Register */ |
41 | #define HD64461_LCDCLOR 0x11002 | 44 | #define HD64461_SYSCR (CONFIG_HD64461_IOBASE + 0x02) |
42 | #define HD64461_LCDCCR 0x11004 | 45 | |
43 | #define HD64461_LCDCCR_STBACK 0x0400 | 46 | /* CPU Data Bus Control Register */ |
44 | #define HD64461_LCDCCR_STREQ 0x0100 | 47 | #define HD64461_SCPUCR (CONFIG_HD64461_IOBASE + 0x04) |
45 | #define HD64461_LCDCCR_MOFF 0x0080 | 48 | |
46 | #define HD64461_LCDCCR_REFSEL 0x0040 | 49 | /* Base Adress Register */ |
47 | #define HD64461_LCDCCR_EPON 0x0020 | 50 | #define HD64461_LCDCBAR (CONFIG_HD64461_IOBASE + 0x1000) |
48 | #define HD64461_LCDCCR_SPON 0x0010 | 51 | |
49 | 52 | /* Line increment adress */ | |
50 | #define HD64461_LDR1 0x11010 | 53 | #define HD64461_LCDCLOR (CONFIG_HD64461_IOBASE + 0x1002) |
51 | #define HD64461_LDR1_DON 0x01 | 54 | |
52 | #define HD64461_LDR1_DINV 0x80 | 55 | /* Controls LCD controller */ |
53 | 56 | #define HD64461_LCDCCR (CONFIG_HD64461_IOBASE + 0x1004) | |
54 | #define HD64461_LDR2 0x11012 | 57 | |
55 | #define HD64461_LDHNCR 0x11014 | 58 | /* LCCDR control bits */ |
56 | #define HD64461_LDHNSR 0x11016 | 59 | #define HD64461_LCDCCR_STBACK 0x0400 /* Standby Back */ |
57 | #define HD64461_LDVNTR 0x11018 | 60 | #define HD64461_LCDCCR_STREQ 0x0100 /* Standby Request */ |
58 | #define HD64461_LDVNDR 0x1101a | 61 | #define HD64461_LCDCCR_MOFF 0x0080 /* Memory Off */ |
59 | #define HD64461_LDVSPR 0x1101c | 62 | #define HD64461_LCDCCR_REFSEL 0x0040 /* Refresh Select */ |
60 | #define HD64461_LDR3 0x1101e | 63 | #define HD64461_LCDCCR_EPON 0x0020 /* End Power On */ |
61 | 64 | #define HD64461_LCDCCR_SPON 0x0010 /* Start Power On */ | |
62 | #define HD64461_CPTWAR 0x11030 | 65 | |
63 | #define HD64461_CPTWDR 0x11032 | 66 | /* Controls LCD (1) */ |
64 | #define HD64461_CPTRAR 0x11034 | 67 | #define HD64461_LDR1 (CONFIG_HD64461_IOBASE + 0x1010) |
65 | #define HD64461_CPTRDR 0x11036 | 68 | #define HD64461_LDR1_DON 0x01 /* Display On */ |
66 | 69 | #define HD64461_LDR1_DINV 0x80 /* Display Invert */ | |
67 | #define HD64461_GRDOR 0x11040 | 70 | |
68 | #define HD64461_GRSCR 0x11042 | 71 | /* Controls LCD (2) */ |
69 | #define HD64461_GRCFGR 0x11044 | 72 | #define HD64461_LDR2 (CONFIG_HD64461_IOBASE + 0x1012) |
70 | #define HD64461_GRCFGR_ACCSTATUS 0x10 | 73 | #define HD64461_LDHNCR (CONFIG_HD64461_IOBASE + 0x1014) /* Number of horizontal characters */ |
71 | #define HD64461_GRCFGR_ACCRESET 0x08 | 74 | #define HD64461_LDHNSR (CONFIG_HD64461_IOBASE + 0x1016) /* Specify output start position + width of CL1 */ |
72 | #define HD64461_GRCFGR_ACCSTART_BITBLT 0x06 | 75 | #define HD64461_LDVNTR (CONFIG_HD64461_IOBASE + 0x1018) /* Specify total vertical lines */ |
73 | #define HD64461_GRCFGR_ACCSTART_LINE 0x04 | 76 | #define HD64461_LDVNDR (CONFIG_HD64461_IOBASE + 0x101a) /* specify number of display vertical lines */ |
74 | #define HD64461_GRCFGR_COLORDEPTH16 0x01 | 77 | #define HD64461_LDVSPR (CONFIG_HD64461_IOBASE + 0x101c) /* specify vertical synchronization pos and AC nr */ |
75 | 78 | ||
76 | #define HD64461_LNSARH 0x11046 | 79 | /* Controls LCD (3) */ |
77 | #define HD64461_LNSARL 0x11048 | 80 | #define HD64461_LDR3 (CONFIG_HD64461_IOBASE + 0x101e) |
78 | #define HD64461_LNAXLR 0x1104a | 81 | |
79 | #define HD64461_LNDGR 0x1104c | 82 | /* Palette Registers */ |
80 | #define HD64461_LNAXR 0x1104e | 83 | #define HD64461_CPTWAR (CONFIG_HD64461_IOBASE + 0x1030) /* Color Palette Write Adress Register */ |
81 | #define HD64461_LNERTR 0x11050 | 84 | #define HD64461_CPTWDR (CONFIG_HD64461_IOBASE + 0x1032) /* Color Palette Write Data Register */ |
82 | #define HD64461_LNMDR 0x11052 | 85 | #define HD64461_CPTRAR (CONFIG_HD64461_IOBASE + 0x1034) /* Color Palette Read Adress Register */ |
83 | #define HD64461_BBTSSARH 0x11054 | 86 | #define HD64461_CPTRDR (CONFIG_HD64461_IOBASE + 0x1036) /* Color Palette Read Data Register */ |
84 | #define HD64461_BBTSSARL 0x11056 | 87 | |
85 | #define HD64461_BBTDSARH 0x11058 | 88 | #define HD64461_GRDOR (CONFIG_HD64461_IOBASE + 0x1040) /* Display Resolution Offset Register */ |
86 | #define HD64461_BBTDSARL 0x1105a | 89 | #define HD64461_GRSCR (CONFIG_HD64461_IOBASE + 0x1042) /* Solid Color Register */ |
87 | #define HD64461_BBTDWR 0x1105c | 90 | #define HD64461_GRCFGR (CONFIG_HD64461_IOBASE + 0x1044) /* Accelerator Configuration Register */ |
88 | #define HD64461_BBTDHR 0x1105e | 91 | |
89 | #define HD64461_BBTPARH 0x11060 | 92 | #define HD64461_GRCFGR_ACCSTATUS 0x10 /* Accelerator Status */ |
90 | #define HD64461_BBTPARL 0x11062 | 93 | #define HD64461_GRCFGR_ACCRESET 0x08 /* Accelerator Reset */ |
91 | #define HD64461_BBTMARH 0x11064 | 94 | #define HD64461_GRCFGR_ACCSTART_BITBLT 0x06 /* Accelerator Start BITBLT */ |
92 | #define HD64461_BBTMARL 0x11066 | 95 | #define HD64461_GRCFGR_ACCSTART_LINE 0x04 /* Accelerator Start Line Drawing */ |
93 | #define HD64461_BBTROPR 0x11068 | 96 | #define HD64461_GRCFGR_COLORDEPTH16 0x01 /* Sets Colordepth 16 for Accelerator */ |
94 | #define HD64461_BBTMDR 0x1106a | 97 | #define HD64461_GRCFGR_COLORDEPTH8 0x01 /* Sets Colordepth 8 for Accelerator */ |
98 | |||
99 | /* Line Drawing Registers */ | ||
100 | #define HD64461_LNSARH (CONFIG_HD64461_IOBASE + 0x1046) /* Line Start Adress Register (H) */ | ||
101 | #define HD64461_LNSARL (CONFIG_HD64461_IOBASE + 0x1048) /* Line Start Adress Register (L) */ | ||
102 | #define HD64461_LNAXLR (CONFIG_HD64461_IOBASE + 0x104a) /* Axis Pixel Length Register */ | ||
103 | #define HD64461_LNDGR (CONFIG_HD64461_IOBASE + 0x104c) /* Diagonal Register */ | ||
104 | #define HD64461_LNAXR (CONFIG_HD64461_IOBASE + 0x104e) /* Axial Register */ | ||
105 | #define HD64461_LNERTR (CONFIG_HD64461_IOBASE + 0x1050) /* Start Error Term Register */ | ||
106 | #define HD64461_LNMDR (CONFIG_HD64461_IOBASE + 0x1052) /* Line Mode Register */ | ||
107 | |||
108 | /* BitBLT Registers */ | ||
109 | #define HD64461_BBTSSARH (CONFIG_HD64461_IOBASE + 0x1054) /* Source Start Adress Register (H) */ | ||
110 | #define HD64461_BBTSSARL (CONFIG_HD64461_IOBASE + 0x1056) /* Source Start Adress Register (L) */ | ||
111 | #define HD64461_BBTDSARH (CONFIG_HD64461_IOBASE + 0x1058) /* Destination Start Adress Register (H) */ | ||
112 | #define HD64461_BBTDSARL (CONFIG_HD64461_IOBASE + 0x105a) /* Destination Start Adress Register (L) */ | ||
113 | #define HD64461_BBTDWR (CONFIG_HD64461_IOBASE + 0x105c) /* Destination Block Width Register */ | ||
114 | #define HD64461_BBTDHR (CONFIG_HD64461_IOBASE + 0x105e) /* Destination Block Height Register */ | ||
115 | #define HD64461_BBTPARH (CONFIG_HD64461_IOBASE + 0x1060) /* Pattern Start Adress Register (H) */ | ||
116 | #define HD64461_BBTPARL (CONFIG_HD64461_IOBASE + 0x1062) /* Pattern Start Adress Register (L) */ | ||
117 | #define HD64461_BBTMARH (CONFIG_HD64461_IOBASE + 0x1064) /* Mask Start Adress Register (H) */ | ||
118 | #define HD64461_BBTMARL (CONFIG_HD64461_IOBASE + 0x1066) /* Mask Start Adress Register (L) */ | ||
119 | #define HD64461_BBTROPR (CONFIG_HD64461_IOBASE + 0x1068) /* ROP Register */ | ||
120 | #define HD64461_BBTMDR (CONFIG_HD64461_IOBASE + 0x106a) /* BitBLT Mode Register */ | ||
95 | 121 | ||
96 | /* PC Card Controller Registers */ | 122 | /* PC Card Controller Registers */ |
97 | #define HD64461_PCC0ISR 0x12000 /* socket 0 interface status */ | 123 | /* Maps to Physical Area 6 */ |
98 | #define HD64461_PCC0GCR 0x12002 /* socket 0 general control */ | 124 | #define HD64461_PCC0ISR (CONFIG_HD64461_IOBASE + 0x2000) /* socket 0 interface status */ |
99 | #define HD64461_PCC0CSCR 0x12004 /* socket 0 card status change */ | 125 | #define HD64461_PCC0GCR (CONFIG_HD64461_IOBASE + 0x2002) /* socket 0 general control */ |
100 | #define HD64461_PCC0CSCIER 0x12006 /* socket 0 card status change interrupt enable */ | 126 | #define HD64461_PCC0CSCR (CONFIG_HD64461_IOBASE + 0x2004) /* socket 0 card status change */ |
101 | #define HD64461_PCC0SCR 0x12008 /* socket 0 software control */ | 127 | #define HD64461_PCC0CSCIER (CONFIG_HD64461_IOBASE + 0x2006) /* socket 0 card status change interrupt enable */ |
102 | #define HD64461_PCC1ISR 0x12010 /* socket 1 interface status */ | 128 | #define HD64461_PCC0SCR (CONFIG_HD64461_IOBASE + 0x2008) /* socket 0 software control */ |
103 | #define HD64461_PCC1GCR 0x12012 /* socket 1 general control */ | 129 | /* Maps to Physical Area 5 */ |
104 | #define HD64461_PCC1CSCR 0x12014 /* socket 1 card status change */ | 130 | #define HD64461_PCC1ISR (CONFIG_HD64461_IOBASE + 0x2010) /* socket 1 interface status */ |
105 | #define HD64461_PCC1CSCIER 0x12016 /* socket 1 card status change interrupt enable */ | 131 | #define HD64461_PCC1GCR (CONFIG_HD64461_IOBASE + 0x2012) /* socket 1 general control */ |
106 | #define HD64461_PCC1SCR 0x12018 /* socket 1 software control */ | 132 | #define HD64461_PCC1CSCR (CONFIG_HD64461_IOBASE + 0x2014) /* socket 1 card status change */ |
133 | #define HD64461_PCC1CSCIER (CONFIG_HD64461_IOBASE + 0x2016) /* socket 1 card status change interrupt enable */ | ||
134 | #define HD64461_PCC1SCR (CONFIG_HD64461_IOBASE + 0x2018) /* socket 1 software control */ | ||
107 | 135 | ||
108 | /* PCC Interface Status Register */ | 136 | /* PCC Interface Status Register */ |
109 | #define HD64461_PCCISR_READY 0x80 /* card ready */ | 137 | #define HD64461_PCCISR_READY 0x80 /* card ready */ |
110 | #define HD64461_PCCISR_MWP 0x40 /* card write-protected */ | 138 | #define HD64461_PCCISR_MWP 0x40 /* card write-protected */ |
111 | #define HD64461_PCCISR_VS2 0x20 /* voltage select pin 2 */ | 139 | #define HD64461_PCCISR_VS2 0x20 /* voltage select pin 2 */ |
112 | #define HD64461_PCCISR_VS1 0x10 /* voltage select pin 1 */ | 140 | #define HD64461_PCCISR_VS1 0x10 /* voltage select pin 1 */ |
113 | #define HD64461_PCCISR_CD2 0x08 /* card detect 2 */ | 141 | #define HD64461_PCCISR_CD2 0x08 /* card detect 2 */ |
114 | #define HD64461_PCCISR_CD1 0x04 /* card detect 1 */ | 142 | #define HD64461_PCCISR_CD1 0x04 /* card detect 1 */ |
115 | #define HD64461_PCCISR_BVD2 0x02 /* battery 1 */ | 143 | #define HD64461_PCCISR_BVD2 0x02 /* battery 1 */ |
116 | #define HD64461_PCCISR_BVD1 0x01 /* battery 1 */ | 144 | #define HD64461_PCCISR_BVD1 0x01 /* battery 1 */ |
117 | 145 | ||
118 | #define HD64461_PCCISR_PCD_MASK 0x0c /* card detect */ | 146 | #define HD64461_PCCISR_PCD_MASK 0x0c /* card detect */ |
119 | #define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */ | 147 | #define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */ |
120 | #define HD64461_PCCISR_BVD_BATGOOD 0x03 /* battery good */ | 148 | #define HD64461_PCCISR_BVD_BATGOOD 0x03 /* battery good */ |
121 | #define HD64461_PCCISR_BVD_BATWARN 0x01 /* battery low warning */ | 149 | #define HD64461_PCCISR_BVD_BATWARN 0x01 /* battery low warning */ |
122 | #define HD64461_PCCISR_BVD_BATDEAD1 0x02 /* battery dead */ | 150 | #define HD64461_PCCISR_BVD_BATDEAD1 0x02 /* battery dead */ |
123 | #define HD64461_PCCISR_BVD_BATDEAD2 0x00 /* battery dead */ | 151 | #define HD64461_PCCISR_BVD_BATDEAD2 0x00 /* battery dead */ |
124 | 152 | ||
125 | /* PCC General Control Register */ | 153 | /* PCC General Control Register */ |
126 | #define HD64461_PCCGCR_DRVE 0x80 /* output drive */ | 154 | #define HD64461_PCCGCR_DRVE 0x80 /* output drive */ |
127 | #define HD64461_PCCGCR_PCCR 0x40 /* PC card reset */ | 155 | #define HD64461_PCCGCR_PCCR 0x40 /* PC card reset */ |
128 | #define HD64461_PCCGCR_PCCT 0x20 /* PC card type, 1=IO&mem, 0=mem */ | 156 | #define HD64461_PCCGCR_PCCT 0x20 /* PC card type, 1=IO&mem, 0=mem */ |
129 | #define HD64461_PCCGCR_VCC0 0x10 /* voltage control pin VCC0SEL0 */ | 157 | #define HD64461_PCCGCR_VCC0 0x10 /* voltage control pin VCC0SEL0 */ |
130 | #define HD64461_PCCGCR_PMMOD 0x08 /* memory mode */ | 158 | #define HD64461_PCCGCR_PMMOD 0x08 /* memory mode */ |
131 | #define HD64461_PCCGCR_PA25 0x04 /* pin A25 */ | 159 | #define HD64461_PCCGCR_PA25 0x04 /* pin A25 */ |
132 | #define HD64461_PCCGCR_PA24 0x02 /* pin A24 */ | 160 | #define HD64461_PCCGCR_PA24 0x02 /* pin A24 */ |
133 | #define HD64461_PCCGCR_REG 0x01 /* pin PCC0REG# */ | 161 | #define HD64461_PCCGCR_REG 0x01 /* pin PCC0REG# */ |
134 | 162 | ||
135 | /* PCC Card Status Change Register */ | 163 | /* PCC Card Status Change Register */ |
136 | #define HD64461_PCCCSCR_SCDI 0x80 /* sw card detect intr */ | 164 | #define HD64461_PCCCSCR_SCDI 0x80 /* sw card detect intr */ |
137 | #define HD64461_PCCCSCR_SRV1 0x40 /* reserved */ | 165 | #define HD64461_PCCCSCR_SRV1 0x40 /* reserved */ |
138 | #define HD64461_PCCCSCR_IREQ 0x20 /* IREQ intr req */ | 166 | #define HD64461_PCCCSCR_IREQ 0x20 /* IREQ intr req */ |
139 | #define HD64461_PCCCSCR_SC 0x10 /* STSCHG (status change) pin */ | 167 | #define HD64461_PCCCSCR_SC 0x10 /* STSCHG (status change) pin */ |
140 | #define HD64461_PCCCSCR_CDC 0x08 /* CD (card detect) change */ | 168 | #define HD64461_PCCCSCR_CDC 0x08 /* CD (card detect) change */ |
141 | #define HD64461_PCCCSCR_RC 0x04 /* READY change */ | 169 | #define HD64461_PCCCSCR_RC 0x04 /* READY change */ |
142 | #define HD64461_PCCCSCR_BW 0x02 /* battery warning change */ | 170 | #define HD64461_PCCCSCR_BW 0x02 /* battery warning change */ |
143 | #define HD64461_PCCCSCR_BD 0x01 /* battery dead change */ | 171 | #define HD64461_PCCCSCR_BD 0x01 /* battery dead change */ |
144 | 172 | ||
145 | /* PCC Card Status Change Interrupt Enable Register */ | 173 | /* PCC Card Status Change Interrupt Enable Register */ |
146 | #define HD64461_PCCCSCIER_CRE 0x80 /* change reset enable */ | 174 | #define HD64461_PCCCSCIER_CRE 0x80 /* change reset enable */ |
147 | #define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */ | 175 | #define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */ |
148 | #define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 /* IREQ disabled */ | 176 | #define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 /* IREQ disabled */ |
149 | #define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */ | 177 | #define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */ |
150 | #define HD64461_PCCCSCIER_IREQE_FALLING 0x40 /* IREQ falling-edge-trig */ | 178 | #define HD64461_PCCCSCIER_IREQE_FALLING 0x40 /* IREQ falling-edge-trig */ |
151 | #define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */ | 179 | #define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */ |
152 | 180 | ||
153 | #define HD64461_PCCCSCIER_SCE 0x10 /* status change enable */ | 181 | #define HD64461_PCCCSCIER_SCE 0x10 /* status change enable */ |
154 | #define HD64461_PCCCSCIER_CDE 0x08 /* card detect change enable */ | 182 | #define HD64461_PCCCSCIER_CDE 0x08 /* card detect change enable */ |
155 | #define HD64461_PCCCSCIER_RE 0x04 /* ready change enable */ | 183 | #define HD64461_PCCCSCIER_RE 0x04 /* ready change enable */ |
156 | #define HD64461_PCCCSCIER_BWE 0x02 /* battery warn change enable */ | 184 | #define HD64461_PCCCSCIER_BWE 0x02 /* battery warn change enable */ |
157 | #define HD64461_PCCCSCIER_BDE 0x01 /* battery dead change enable*/ | 185 | #define HD64461_PCCCSCIER_BDE 0x01 /* battery dead change enable*/ |
158 | 186 | ||
159 | /* PCC Software Control Register */ | 187 | /* PCC Software Control Register */ |
160 | #define HD64461_PCCSCR_VCC1 0x02 /* voltage control pin 1 */ | 188 | #define HD64461_PCCSCR_VCC1 0x02 /* voltage control pin 1 */ |
161 | #define HD64461_PCCSCR_SWP 0x01 /* write protect */ | 189 | #define HD64461_PCCSCR_SWP 0x01 /* write protect */ |
162 | 190 | ||
163 | #define HD64461_P0OCR 0x1202a | 191 | /* PCC0 Output Pins Control Register */ |
164 | #define HD64461_P1OCR 0x1202c | 192 | #define HD64461_P0OCR (CONFIG_HD64461_IOBASE + 0x202a) |
165 | #define HD64461_PGCR 0x1202e | 193 | |
166 | 194 | /* PCC1 Output Pins Control Register */ | |
167 | #define HD64461_GPACR 0x14000 | 195 | #define HD64461_P1OCR (CONFIG_HD64461_IOBASE + 0x202c) |
168 | #define HD64461_GPBCR 0x14002 | 196 | |
169 | #define HD64461_GPCCR 0x14004 | 197 | /* PC Card General Control Register */ |
170 | #define HD64461_GPDCR 0x14006 | 198 | #define HD64461_PGCR (CONFIG_HD64461_IOBASE + 0x202e) |
171 | #define HD64461_GPADR 0x14010 | 199 | |
172 | #define HD64461_GPBDR 0x14012 | 200 | /* Port Control Registers */ |
173 | #define HD64461_GPCDR 0x14014 | 201 | #define HD64461_GPACR (CONFIG_HD64461_IOBASE + 0x4000) /* Port A - Handles IRDA/TIMER */ |
174 | #define HD64461_GPDDR 0x14016 | 202 | #define HD64461_GPBCR (CONFIG_HD64461_IOBASE + 0x4002) /* Port B - Handles UART */ |
175 | #define HD64461_GPAICR 0x14020 | 203 | #define HD64461_GPCCR (CONFIG_HD64461_IOBASE + 0x4004) /* Port C - Handles PCMCIA 1 */ |
176 | #define HD64461_GPBICR 0x14022 | 204 | #define HD64461_GPDCR (CONFIG_HD64461_IOBASE + 0x4006) /* Port D - Handles PCMCIA 1 */ |
177 | #define HD64461_GPCICR 0x14024 | 205 | |
178 | #define HD64461_GPDICR 0x14026 | 206 | /* Port Control Data Registers */ |
179 | #define HD64461_GPAISR 0x14040 | 207 | #define HD64461_GPADR (CONFIG_HD64461_IOBASE + 0x4010) /* A */ |
180 | #define HD64461_GPBISR 0x14042 | 208 | #define HD64461_GPBDR (CONFIG_HD64461_IOBASE + 0x4012) /* B */ |
181 | #define HD64461_GPCISR 0x14044 | 209 | #define HD64461_GPCDR (CONFIG_HD64461_IOBASE + 0x4014) /* C */ |
182 | #define HD64461_GPDISR 0x14046 | 210 | #define HD64461_GPDDR (CONFIG_HD64461_IOBASE + 0x4016) /* D */ |
183 | 211 | ||
184 | #define HD64461_NIRR 0x15000 | 212 | /* Interrupt Control Registers */ |
185 | #define HD64461_NIMR 0x15002 | 213 | #define HD64461_GPAICR (CONFIG_HD64461_IOBASE + 0x4020) /* A */ |
186 | 214 | #define HD64461_GPBICR (CONFIG_HD64461_IOBASE + 0x4022) /* B */ | |
187 | #define HD64461_IRQBASE OFFCHIP_IRQ_BASE | 215 | #define HD64461_GPCICR (CONFIG_HD64461_IOBASE + 0x4024) /* C */ |
188 | #define HD64461_IRQ_NUM 16 | 216 | #define HD64461_GPDICR (CONFIG_HD64461_IOBASE + 0x4026) /* D */ |
189 | 217 | ||
190 | #define HD64461_IRQ_UART (HD64461_IRQBASE+5) | 218 | /* Interrupt Status Registers */ |
191 | #define HD64461_IRQ_IRDA (HD64461_IRQBASE+6) | 219 | #define HD64461_GPAISR (CONFIG_HD64461_IOBASE + 0x4040) /* A */ |
192 | #define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9) | 220 | #define HD64461_GPBISR (CONFIG_HD64461_IOBASE + 0x4042) /* B */ |
193 | #define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10) | 221 | #define HD64461_GPCISR (CONFIG_HD64461_IOBASE + 0x4044) /* C */ |
194 | #define HD64461_IRQ_GPIO (HD64461_IRQBASE+11) | 222 | #define HD64461_GPDISR (CONFIG_HD64461_IOBASE + 0x4046) /* D */ |
195 | #define HD64461_IRQ_AFE (HD64461_IRQBASE+12) | 223 | |
196 | #define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13) | 224 | /* Interrupt Request Register & Interrupt Mask Register */ |
197 | #define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14) | 225 | #define HD64461_NIRR (CONFIG_HD64461_IOBASE + 0x5000) |
226 | #define HD64461_NIMR (CONFIG_HD64461_IOBASE + 0x5002) | ||
227 | |||
228 | #define HD64461_IRQBASE OFFCHIP_IRQ_BASE | ||
229 | #define HD64461_IRQ_NUM 16 | ||
230 | |||
231 | #define HD64461_IRQ_UART (HD64461_IRQBASE+5) | ||
232 | #define HD64461_IRQ_IRDA (HD64461_IRQBASE+6) | ||
233 | #define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9) | ||
234 | #define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10) | ||
235 | #define HD64461_IRQ_GPIO (HD64461_IRQBASE+11) | ||
236 | #define HD64461_IRQ_AFE (HD64461_IRQBASE+12) | ||
237 | #define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13) | ||
238 | #define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14) | ||
198 | 239 | ||
199 | #define __IO_PREFIX hd64461 | 240 | #define __IO_PREFIX hd64461 |
200 | #include <asm/io_generic.h> | 241 | #include <asm/io_generic.h> |
diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h index 80ee1cda7498..4ca3f765bacc 100644 --- a/include/asm-sh/hw_irq.h +++ b/include/asm-sh/hw_irq.h | |||
@@ -5,4 +5,46 @@ | |||
5 | 5 | ||
6 | extern atomic_t irq_err_count; | 6 | extern atomic_t irq_err_count; |
7 | 7 | ||
8 | struct intc2_data { | ||
9 | unsigned short irq; | ||
10 | unsigned char ipr_offset, ipr_shift; | ||
11 | unsigned char msk_offset, msk_shift; | ||
12 | unsigned char priority; | ||
13 | }; | ||
14 | |||
15 | struct intc2_desc { | ||
16 | unsigned long prio_base; | ||
17 | unsigned long msk_base; | ||
18 | unsigned long mskclr_base; | ||
19 | struct intc2_data *intc2_data; | ||
20 | unsigned int nr_irqs; | ||
21 | struct irq_chip chip; | ||
22 | }; | ||
23 | |||
24 | void register_intc2_controller(struct intc2_desc *); | ||
25 | void init_IRQ_intc2(void); | ||
26 | |||
27 | struct ipr_data { | ||
28 | unsigned char irq; | ||
29 | unsigned char ipr_idx; /* Index for the IPR registered */ | ||
30 | unsigned char shift; /* Number of bits to shift the data */ | ||
31 | unsigned char priority; /* The priority */ | ||
32 | }; | ||
33 | |||
34 | struct ipr_desc { | ||
35 | unsigned long *ipr_offsets; | ||
36 | unsigned int nr_offsets; | ||
37 | struct ipr_data *ipr_data; | ||
38 | unsigned int nr_irqs; | ||
39 | struct irq_chip chip; | ||
40 | }; | ||
41 | |||
42 | void register_ipr_controller(struct ipr_desc *); | ||
43 | void init_IRQ_ipr(void); | ||
44 | |||
45 | /* | ||
46 | * Enable individual interrupt mode for external IPR IRQs. | ||
47 | */ | ||
48 | void ipr_irq_enable_irlm(void); | ||
49 | |||
8 | #endif /* __ASM_SH_HW_IRQ_H */ | 50 | #endif /* __ASM_SH_HW_IRQ_H */ |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index e81bf21c801e..c61d902b8bff 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -31,47 +31,7 @@ extern unsigned short *irq_mask_register; | |||
31 | * PINT IRQs | 31 | * PINT IRQs |
32 | */ | 32 | */ |
33 | void init_IRQ_pint(void); | 33 | void init_IRQ_pint(void); |
34 | |||
35 | /* | ||
36 | * The shift value is now the number of bits to shift, not the number of | ||
37 | * bits/4. This is to make it easier to read the value directly from the | ||
38 | * datasheets. The IPR address, addr, will be set from ipr_idx via the | ||
39 | * map_ipridx_to_addr function. | ||
40 | */ | ||
41 | struct ipr_data { | ||
42 | unsigned int irq; | ||
43 | int ipr_idx; /* Index for the IPR registered */ | ||
44 | int shift; /* Number of bits to shift the data */ | ||
45 | int priority; /* The priority */ | ||
46 | unsigned int addr; /* Address of Interrupt Priority Register */ | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * Given an IPR IDX, map the value to an IPR register address. | ||
51 | */ | ||
52 | unsigned int map_ipridx_to_addr(int idx); | ||
53 | |||
54 | /* | ||
55 | * Enable individual interrupt mode for external IPR IRQs. | ||
56 | */ | ||
57 | void ipr_irq_enable_irlm(void); | ||
58 | |||
59 | /* | ||
60 | * Function for "on chip support modules". | ||
61 | */ | ||
62 | void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs); | ||
63 | void make_imask_irq(unsigned int irq); | 34 | void make_imask_irq(unsigned int irq); |
64 | void init_IRQ_ipr(void); | ||
65 | |||
66 | struct intc2_data { | ||
67 | unsigned short irq; | ||
68 | unsigned char ipr_offset, ipr_shift; | ||
69 | unsigned char msk_offset, msk_shift; | ||
70 | unsigned char priority; | ||
71 | }; | ||
72 | |||
73 | void make_intc2_irq(struct intc2_data *, unsigned int nr_irqs); | ||
74 | void init_IRQ_intc2(void); | ||
75 | 35 | ||
76 | static inline int generic_irq_demux(int irq) | 36 | static inline int generic_irq_demux(int irq) |
77 | { | 37 | { |
diff --git a/include/asm-sh/machvec.h b/include/asm-sh/machvec.h index 70389b72ffef..088698bacf2f 100644 --- a/include/asm-sh/machvec.h +++ b/include/asm-sh/machvec.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <asm/machtypes.h> | 15 | #include <asm/machtypes.h> |
16 | #include <asm/machvec_init.h> | ||
17 | 16 | ||
18 | struct device; | 17 | struct device; |
19 | 18 | ||
@@ -68,4 +67,7 @@ extern struct sh_machine_vector sh_mv; | |||
68 | 67 | ||
69 | #define get_system_type() sh_mv.mv_name | 68 | #define get_system_type() sh_mv.mv_name |
70 | 69 | ||
70 | #define __initmv \ | ||
71 | __attribute_used__ __attribute__((__section__ (".machvec.init"))) | ||
72 | |||
71 | #endif /* _ASM_SH_MACHVEC_H */ | 73 | #endif /* _ASM_SH_MACHVEC_H */ |
diff --git a/include/asm-sh/machvec_init.h b/include/asm-sh/machvec_init.h deleted file mode 100644 index e397798ebd94..000000000000 --- a/include/asm-sh/machvec_init.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/machvec_init.h | ||
3 | * | ||
4 | * Copyright 2000 Stuart Menefy (stuart.menefy@st.com) | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * This file has goodies to help simplify instantiation of machine vectors. | ||
10 | */ | ||
11 | |||
12 | #ifndef __SH_MACHVEC_INIT_H | ||
13 | #define __SH_MACHVEC_INIT_H | ||
14 | |||
15 | |||
16 | /* | ||
17 | * In a GENERIC kernel, we have lots of these vectors floating about, | ||
18 | * all but one of which we want to go away. In a non-GENERIC kernel, | ||
19 | * we want only one, ever. | ||
20 | * | ||
21 | * Accomplish this in the GENERIC kernel by puting all of the vectors | ||
22 | * in the .init.data section where they'll go away. We'll copy the | ||
23 | * one we want to the real alpha_mv vector in setup_arch. | ||
24 | * | ||
25 | * Accomplish this in a non-GENERIC kernel by ifdef'ing out all but | ||
26 | * one of the vectors, which will not reside in .init.data. We then | ||
27 | * alias this one vector to alpha_mv, so no copy is needed. | ||
28 | * | ||
29 | * Upshot: set __initdata to nothing for non-GENERIC kernels. | ||
30 | * | ||
31 | * Note we do the same thing for the UNKNOWN kernel, as we need to write | ||
32 | * to the machine vector while setting it up. | ||
33 | */ | ||
34 | |||
35 | #if defined(CONFIG_SH_GENERIC) || defined(CONFIG_SH_UNKNOWN) | ||
36 | #define __initmv __attribute__((unused,__section__ (".machvec.init"))) | ||
37 | #define ALIAS_MV(x) | ||
38 | #else | ||
39 | #define __initmv | ||
40 | |||
41 | /* GCC actually has a syntax for defining aliases, but is under some | ||
42 | delusion that you shouldn't be able to declare it extern somewhere | ||
43 | else beforehand. Fine. We'll do it ourselves. */ | ||
44 | #if 0 | ||
45 | #define ALIAS_MV(system) \ | ||
46 | struct sh_machine_vector sh_mv __attribute__((alias("mv_"#system))); | ||
47 | #else | ||
48 | #define ALIAS_MV(system) \ | ||
49 | asm(".global sh_mv\nsh_mv = mv_"#system ); | ||
50 | #endif | ||
51 | #endif /* GENERIC */ | ||
52 | |||
53 | #endif /* __SH_MACHVEC_INIT_H */ | ||
diff --git a/include/asm-sh/mmzone.h b/include/asm-sh/mmzone.h new file mode 100644 index 000000000000..7969f381dff2 --- /dev/null +++ b/include/asm-sh/mmzone.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __ASM_SH_MMZONE_H | ||
2 | #define __ASM_SH_MMZONE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
7 | extern struct pglist_data *node_data[]; | ||
8 | #define NODE_DATA(nid) (node_data[nid]) | ||
9 | |||
10 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
11 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ | ||
12 | NODE_DATA(nid)->node_spanned_pages) | ||
13 | |||
14 | static inline int pfn_to_nid(unsigned long pfn) | ||
15 | { | ||
16 | int nid; | ||
17 | |||
18 | for (nid = 0; nid < MAX_NUMNODES; nid++) | ||
19 | if (pfn >= node_start_pfn(nid) && pfn <= node_end_pfn(nid)) | ||
20 | break; | ||
21 | |||
22 | return nid; | ||
23 | } | ||
24 | |||
25 | static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) | ||
26 | { | ||
27 | return NODE_DATA(pfn_to_nid(pfn)); | ||
28 | } | ||
29 | |||
30 | /* arch/sh/mm/numa.c */ | ||
31 | void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end); | ||
32 | #else | ||
33 | static inline void | ||
34 | setup_bootmem_node(int nid, unsigned long start, unsigned long end) | ||
35 | { | ||
36 | } | ||
37 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ | ||
38 | |||
39 | /* Platform specific mem init */ | ||
40 | void __init plat_mem_setup(void); | ||
41 | |||
42 | /* arch/sh/kernel/setup.c */ | ||
43 | void __init setup_bootmem_allocator(unsigned long start_pfn); | ||
44 | |||
45 | #endif /* __KERNEL__ */ | ||
46 | #endif /* __ASM_SH_MMZONE_H */ | ||
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 7464de4ba07d..6bc9bba10105 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -60,6 +60,7 @@ extern void (*copy_page)(void *to, void *from); | |||
60 | 60 | ||
61 | extern unsigned long shm_align_mask; | 61 | extern unsigned long shm_align_mask; |
62 | extern unsigned long max_low_pfn, min_low_pfn; | 62 | extern unsigned long max_low_pfn, min_low_pfn; |
63 | extern unsigned long memory_start, memory_end; | ||
63 | 64 | ||
64 | #ifdef CONFIG_MMU | 65 | #ifdef CONFIG_MMU |
65 | extern void clear_page_slow(void *to); | 66 | extern void clear_page_slow(void *to); |
@@ -134,7 +135,9 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
134 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) | 135 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) |
135 | #define ARCH_PFN_OFFSET (PFN_START) | 136 | #define ARCH_PFN_OFFSET (PFN_START) |
136 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 137 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
138 | #ifdef CONFIG_FLATMEM | ||
137 | #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) | 139 | #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) |
140 | #endif | ||
138 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 141 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
139 | 142 | ||
140 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 143 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
@@ -148,5 +151,12 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
148 | #define __HAVE_ARCH_GATE_AREA | 151 | #define __HAVE_ARCH_GATE_AREA |
149 | #endif | 152 | #endif |
150 | 153 | ||
154 | /* | ||
155 | * Slub defaults to 8-byte alignment, we're only interested in 4. | ||
156 | * Slab defaults to BYTES_PER_WORD, which ends up being the same anyways. | ||
157 | */ | ||
158 | #define ARCH_KMALLOC_MINALIGN 4 | ||
159 | #define ARCH_SLAB_MINALIGN 4 | ||
160 | |||
151 | #endif /* __KERNEL__ */ | 161 | #endif /* __KERNEL__ */ |
152 | #endif /* __ASM_SH_PAGE_H */ | 162 | #endif /* __ASM_SH_PAGE_H */ |
diff --git a/include/asm-sh/parport.h b/include/asm-sh/parport.h new file mode 100644 index 000000000000..f67ba60a2acd --- /dev/null +++ b/include/asm-sh/parport.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> | ||
3 | * | ||
4 | * This file should only be included by drivers/parport/parport_pc.c. | ||
5 | */ | ||
6 | #ifndef __ASM_SH_PARPORT_H | ||
7 | #define __ASM_SH_PARPORT_H | ||
8 | |||
9 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); | ||
10 | |||
11 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | ||
12 | { | ||
13 | return parport_pc_find_isa_ports(autoirq, autodma); | ||
14 | } | ||
15 | |||
16 | #endif /* __ASM_SH_PARPORT_H */ | ||
diff --git a/include/asm-sh/pci.h b/include/asm-sh/pci.h index b1f9a9e0231e..2757ce096ff7 100644 --- a/include/asm-sh/pci.h +++ b/include/asm-sh/pci.h | |||
@@ -110,11 +110,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
110 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 110 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | /* Not supporting more than 32-bit PCI bus addresses now, but | ||
114 | * must satisfy references to this function. Change if needed. | ||
115 | */ | ||
116 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
117 | |||
118 | #ifdef CONFIG_PCI | 113 | #ifdef CONFIG_PCI |
119 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 114 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
120 | enum pci_dma_burst_strategy *strat, | 115 | enum pci_dma_burst_strategy *strat, |
@@ -134,10 +129,6 @@ int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); | |||
134 | int pciauto_assign_resources(int busno, struct pci_channel *hose); | 129 | int pciauto_assign_resources(int busno, struct pci_channel *hose); |
135 | #endif | 130 | #endif |
136 | 131 | ||
137 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
138 | { | ||
139 | } | ||
140 | |||
141 | #endif /* __KERNEL__ */ | 132 | #endif /* __KERNEL__ */ |
142 | 133 | ||
143 | /* generic pci stuff */ | 134 | /* generic pci stuff */ |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 5b523c7e7d99..22efffe45019 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -402,12 +402,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
402 | #define pte_file(pte) (pte_val(pte) & _PAGE_FILE) | 402 | #define pte_file(pte) (pte_val(pte) & _PAGE_FILE) |
403 | 403 | ||
404 | #ifdef CONFIG_X2TLB | 404 | #ifdef CONFIG_X2TLB |
405 | #define pte_read(pte) ((pte).pte_high & _PAGE_EXT_USER_READ) | ||
406 | #define pte_exec(pte) ((pte).pte_high & _PAGE_EXT_USER_EXEC) | ||
407 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) | 405 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) |
408 | #else | 406 | #else |
409 | #define pte_read(pte) (pte_val(pte) & _PAGE_USER) | ||
410 | #define pte_exec(pte) (pte_val(pte) & _PAGE_USER) | ||
411 | #define pte_write(pte) (pte_val(pte) & _PAGE_RW) | 407 | #define pte_write(pte) (pte_val(pte) & _PAGE_RW) |
412 | #endif | 408 | #endif |
413 | 409 | ||
@@ -420,20 +416,12 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; } | |||
420 | * individually toggled (and user permissions are entirely decoupled from | 416 | * individually toggled (and user permissions are entirely decoupled from |
421 | * kernel permissions), we attempt to couple them a bit more sanely here. | 417 | * kernel permissions), we attempt to couple them a bit more sanely here. |
422 | */ | 418 | */ |
423 | PTE_BIT_FUNC(high, rdprotect, &= ~_PAGE_EXT_USER_READ); | ||
424 | PTE_BIT_FUNC(high, mkread, |= _PAGE_EXT_USER_READ | _PAGE_EXT_KERN_READ); | ||
425 | PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); | 419 | PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); |
426 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); | 420 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); |
427 | PTE_BIT_FUNC(high, exprotect, &= ~_PAGE_EXT_USER_EXEC); | ||
428 | PTE_BIT_FUNC(high, mkexec, |= _PAGE_EXT_USER_EXEC | _PAGE_EXT_KERN_EXEC); | ||
429 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); | 421 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); |
430 | #else | 422 | #else |
431 | PTE_BIT_FUNC(low, rdprotect, &= ~_PAGE_USER); | ||
432 | PTE_BIT_FUNC(low, mkread, |= _PAGE_USER); | ||
433 | PTE_BIT_FUNC(low, wrprotect, &= ~_PAGE_RW); | 423 | PTE_BIT_FUNC(low, wrprotect, &= ~_PAGE_RW); |
434 | PTE_BIT_FUNC(low, mkwrite, |= _PAGE_RW); | 424 | PTE_BIT_FUNC(low, mkwrite, |= _PAGE_RW); |
435 | PTE_BIT_FUNC(low, exprotect, &= ~_PAGE_USER); | ||
436 | PTE_BIT_FUNC(low, mkexec, |= _PAGE_USER); | ||
437 | PTE_BIT_FUNC(low, mkhuge, |= _PAGE_SZHUGE); | 425 | PTE_BIT_FUNC(low, mkhuge, |= _PAGE_SZHUGE); |
438 | #endif | 426 | #endif |
439 | 427 | ||
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index d42f68e724fa..2252e75daa26 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | enum cpu_type { | 37 | enum cpu_type { |
38 | /* SH-2 types */ | 38 | /* SH-2 types */ |
39 | CPU_SH7604, CPU_SH7619, | 39 | CPU_SH7619, |
40 | 40 | ||
41 | /* SH-2A types */ | 41 | /* SH-2A types */ |
42 | CPU_SH7206, | 42 | CPU_SH7206, |
@@ -52,7 +52,7 @@ enum cpu_type { | |||
52 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, | 52 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, |
53 | 53 | ||
54 | /* SH-4A types */ | 54 | /* SH-4A types */ |
55 | CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, | 55 | CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, |
56 | 56 | ||
57 | /* SH4AL-DSP types */ | 57 | /* SH4AL-DSP types */ |
58 | CPU_SH73180, CPU_SH7343, CPU_SH7722, | 58 | CPU_SH73180, CPU_SH7343, CPU_SH7722, |
@@ -228,11 +228,7 @@ static __inline__ void grab_fpu(struct pt_regs *regs) | |||
228 | regs->sr &= ~SR_FD; | 228 | regs->sr &= ~SR_FD; |
229 | } | 229 | } |
230 | 230 | ||
231 | #ifdef CONFIG_CPU_SH4 | ||
232 | extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); | 231 | extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); |
233 | #else | ||
234 | #define save_fpu(tsk) do { } while (0) | ||
235 | #endif | ||
236 | 232 | ||
237 | #define unlazy_fpu(tsk, regs) do { \ | 233 | #define unlazy_fpu(tsk, regs) do { \ |
238 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 234 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
diff --git a/include/asm-sh/rwsem.h b/include/asm-sh/rwsem.h index 4931ba817d73..1987f3ea7f1b 100644 --- a/include/asm-sh/rwsem.h +++ b/include/asm-sh/rwsem.h | |||
@@ -1,11 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-ppc/rwsem.h: R/W semaphores for SH using the stuff | 2 | * include/asm-sh/rwsem.h: R/W semaphores for SH using the stuff |
3 | * in lib/rwsem.c. | 3 | * in lib/rwsem.c. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _ASM_SH_RWSEM_H | 6 | #ifndef _ASM_SH_RWSEM_H |
7 | #define _ASM_SH_RWSEM_H | 7 | #define _ASM_SH_RWSEM_H |
8 | 8 | ||
9 | #ifndef _LINUX_RWSEM_H | ||
10 | #error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" | ||
11 | #endif | ||
12 | |||
9 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
10 | #include <linux/list.h> | 14 | #include <linux/list.h> |
11 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
diff --git a/include/asm-sh/saturn/io.h b/include/asm-sh/saturn/io.h deleted file mode 100644 index f1b9b5d633f4..000000000000 --- a/include/asm-sh/saturn/io.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/saturn/io.h | ||
3 | * | ||
4 | * I/O functions for use on the Sega Saturn. | ||
5 | * | ||
6 | * Copyright (C) 2002 Paul Mundt | ||
7 | * | ||
8 | * Released under the terms of the GNU GPL v2.0. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_SATURN_IO_H | ||
11 | #define __ASM_SH_SATURN_IO_H | ||
12 | |||
13 | /* arch/sh/boards/saturn/io.c */ | ||
14 | extern unsigned long saturn_isa_port2addr(unsigned long offset); | ||
15 | extern void *saturn_ioremap(unsigned long offset, unsigned long size); | ||
16 | extern void saturn_iounmap(void *addr); | ||
17 | |||
18 | #endif /* __ASM_SH_SATURN_IO_H */ | ||
19 | |||
diff --git a/include/asm-sh/saturn/smpc.h b/include/asm-sh/saturn/smpc.h deleted file mode 100644 index 5de5c12d6347..000000000000 --- a/include/asm-sh/saturn/smpc.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/saturn/smpc.h | ||
3 | * | ||
4 | * System Manager / Peripheral Control definitions. | ||
5 | * | ||
6 | * Copyright (C) 2002 Paul Mundt | ||
7 | * | ||
8 | * Released under the terms of the GNU GPL v2.0. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_SATURN_SMPC_H | ||
11 | #define __ASM_SH_SATURN_SMPC_H | ||
12 | |||
13 | #include <asm/io.h> | ||
14 | |||
15 | #define SMPC_COMMAND 0x2010001f /* SMPC command register */ | ||
16 | #define SMPC_RESULT 0x2010005f /* SMPC result register */ | ||
17 | #define SMPC_STATUS 0x20100063 /* SMPC status register */ | ||
18 | |||
19 | #define SMPC_CMD_MSHON 0x0001 /* Master SH On */ | ||
20 | #define SMPC_CMD_SSHON 0x0002 /* Slave SH On */ | ||
21 | #define SMPC_CMD_SSHOFF 0x0003 /* Slave SH Off */ | ||
22 | #define SMPC_CMD_SNDON 0x0004 /* Sound On */ | ||
23 | #define SMPC_CMD_SNDOFF 0x0005 /* Sound Off */ | ||
24 | #define SMPC_CMD_CDON 0x0006 /* CD On */ | ||
25 | #define SMPC_CMD_CDOFF 0x0007 /* CD Off */ | ||
26 | |||
27 | static inline void smpc_barrier(void) | ||
28 | { | ||
29 | while ((ctrl_inb(SMPC_STATUS) & 0x0001) == 0x0001) | ||
30 | ; | ||
31 | } | ||
32 | |||
33 | #endif /* __ASM_SH_SATURN_SMPC_H */ | ||
34 | |||
diff --git a/include/asm-sh/sections.h b/include/asm-sh/sections.h index 57abd708b236..2a696b8ee4f5 100644 --- a/include/asm-sh/sections.h +++ b/include/asm-sh/sections.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/sections.h> | 4 | #include <asm-generic/sections.h> |
5 | 5 | ||
6 | extern char _end[]; | 6 | extern long __machvec_start, __machvec_end; |
7 | 7 | ||
8 | #endif /* __ASM_SH_SECTIONS_H */ | 8 | #endif /* __ASM_SH_SECTIONS_H */ |
9 | 9 | ||
diff --git a/include/asm-sh/setup.h b/include/asm-sh/setup.h index 1583c6b7bdaa..586a9711a75d 100644 --- a/include/asm-sh/setup.h +++ b/include/asm-sh/setup.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | 7 | ||
8 | int setup_early_printk(char *); | 8 | int setup_early_printk(char *); |
9 | void sh_mv_setup(void); | ||
9 | 10 | ||
10 | #endif /* __KERNEL__ */ | 11 | #endif /* __KERNEL__ */ |
11 | 12 | ||
diff --git a/include/asm-sh/sh03/io.h b/include/asm-sh/sh03/io.h index df3b187ef883..4ff1eb900301 100644 --- a/include/asm-sh/sh03/io.h +++ b/include/asm-sh/sh03/io.h | |||
@@ -14,22 +14,18 @@ | |||
14 | #define INTC_IPRD 0xffd00010UL | 14 | #define INTC_IPRD 0xffd00010UL |
15 | 15 | ||
16 | #define IRL0_IRQ 2 | 16 | #define IRL0_IRQ 2 |
17 | #define IRL0_IPR_ADDR INTC_IPRD | ||
18 | #define IRL0_IPR_POS 3 | 17 | #define IRL0_IPR_POS 3 |
19 | #define IRL0_PRIORITY 13 | 18 | #define IRL0_PRIORITY 13 |
20 | 19 | ||
21 | #define IRL1_IRQ 5 | 20 | #define IRL1_IRQ 5 |
22 | #define IRL1_IPR_ADDR INTC_IPRD | ||
23 | #define IRL1_IPR_POS 2 | 21 | #define IRL1_IPR_POS 2 |
24 | #define IRL1_PRIORITY 10 | 22 | #define IRL1_PRIORITY 10 |
25 | 23 | ||
26 | #define IRL2_IRQ 8 | 24 | #define IRL2_IRQ 8 |
27 | #define IRL2_IPR_ADDR INTC_IPRD | ||
28 | #define IRL2_IPR_POS 1 | 25 | #define IRL2_IPR_POS 1 |
29 | #define IRL2_PRIORITY 7 | 26 | #define IRL2_PRIORITY 7 |
30 | 27 | ||
31 | #define IRL3_IRQ 11 | 28 | #define IRL3_IRQ 11 |
32 | #define IRL3_IPR_ADDR INTC_IPRD | ||
33 | #define IRL3_IPR_POS 0 | 29 | #define IRL3_IPR_POS 0 |
34 | #define IRL3_PRIORITY 4 | 30 | #define IRL3_PRIORITY 4 |
35 | 31 | ||
diff --git a/include/asm-sh/smp.h b/include/asm-sh/smp.h index caa7b93f1bce..b99ca786c0c1 100644 --- a/include/asm-sh/smp.h +++ b/include/asm-sh/smp.h | |||
@@ -39,4 +39,6 @@ extern struct smp_fn_call_struct smp_fn_call; | |||
39 | 39 | ||
40 | #endif /* CONFIG_SMP */ | 40 | #endif /* CONFIG_SMP */ |
41 | 41 | ||
42 | #define hard_smp_processor_id() (0) | ||
43 | |||
42 | #endif /* __ASM_SH_SMP_H */ | 44 | #endif /* __ASM_SH_SMP_H */ |
diff --git a/include/asm-sh/snapgear.h b/include/asm-sh/snapgear.h index 2d712e72c9e5..3554e3a74e99 100644 --- a/include/asm-sh/snapgear.h +++ b/include/asm-sh/snapgear.h | |||
@@ -20,22 +20,18 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define IRL0_IRQ 2 | 22 | #define IRL0_IRQ 2 |
23 | #define IRL0_IPR_ADDR INTC_IPRD | ||
24 | #define IRL0_IPR_POS 3 | 23 | #define IRL0_IPR_POS 3 |
25 | #define IRL0_PRIORITY 13 | 24 | #define IRL0_PRIORITY 13 |
26 | 25 | ||
27 | #define IRL1_IRQ 5 | 26 | #define IRL1_IRQ 5 |
28 | #define IRL1_IPR_ADDR INTC_IPRD | ||
29 | #define IRL1_IPR_POS 2 | 27 | #define IRL1_IPR_POS 2 |
30 | #define IRL1_PRIORITY 10 | 28 | #define IRL1_PRIORITY 10 |
31 | 29 | ||
32 | #define IRL2_IRQ 8 | 30 | #define IRL2_IRQ 8 |
33 | #define IRL2_IPR_ADDR INTC_IPRD | ||
34 | #define IRL2_IPR_POS 1 | 31 | #define IRL2_IPR_POS 1 |
35 | #define IRL2_PRIORITY 7 | 32 | #define IRL2_PRIORITY 7 |
36 | 33 | ||
37 | #define IRL3_IRQ 11 | 34 | #define IRL3_IRQ 11 |
38 | #define IRL3_IPR_ADDR INTC_IPRD | ||
39 | #define IRL3_IPR_POS 0 | 35 | #define IRL3_IPR_POS 0 |
40 | #define IRL3_PRIORITY 4 | 36 | #define IRL3_PRIORITY 4 |
41 | #endif | 37 | #endif |
diff --git a/include/asm-sh/sparsemem.h b/include/asm-sh/sparsemem.h new file mode 100644 index 000000000000..547a540b6667 --- /dev/null +++ b/include/asm-sh/sparsemem.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef __ASM_SH_SPARSEMEM_H | ||
2 | #define __ASM_SH_SPARSEMEM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | /* | ||
6 | * SECTION_SIZE_BITS 2^N: how big each section will be | ||
7 | * MAX_PHYSADDR_BITS 2^N: how much physical address space we have | ||
8 | * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space | ||
9 | */ | ||
10 | #define SECTION_SIZE_BITS 26 | ||
11 | #define MAX_PHYSADDR_BITS 32 | ||
12 | #define MAX_PHYSMEM_BITS 32 | ||
13 | |||
14 | #endif | ||
15 | |||
16 | #endif /* __ASM_SH_SPARSEMEM_H */ | ||
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 82f3e229e621..7c75045ae22b 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -8,9 +8,13 @@ | |||
8 | 8 | ||
9 | #include <linux/irqflags.h> | 9 | #include <linux/irqflags.h> |
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/linkage.h> | ||
11 | #include <asm/types.h> | 12 | #include <asm/types.h> |
12 | #include <asm/ptrace.h> | 13 | #include <asm/ptrace.h> |
13 | 14 | ||
15 | struct task_struct *__switch_to(struct task_struct *prev, | ||
16 | struct task_struct *next); | ||
17 | |||
14 | /* | 18 | /* |
15 | * switch_to() should switch tasks to task nr n, first | 19 | * switch_to() should switch tasks to task nr n, first |
16 | */ | 20 | */ |
@@ -122,7 +126,7 @@ static inline void sched_cacheflush(void) | |||
122 | #define smp_read_barrier_depends() do { } while(0) | 126 | #define smp_read_barrier_depends() do { } while(0) |
123 | #endif | 127 | #endif |
124 | 128 | ||
125 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 129 | #define set_mb(var, value) do { (void)xchg(&var, value); } while (0) |
126 | 130 | ||
127 | /* | 131 | /* |
128 | * Jump to P2 area. | 132 | * Jump to P2 area. |
@@ -271,6 +275,16 @@ extern unsigned int instruction_size(unsigned int insn); | |||
271 | void disable_hlt(void); | 275 | void disable_hlt(void); |
272 | void enable_hlt(void); | 276 | void enable_hlt(void); |
273 | 277 | ||
278 | void default_idle(void); | ||
279 | |||
280 | asmlinkage void break_point_trap(void); | ||
281 | asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5, | ||
282 | unsigned long r6, unsigned long r7, | ||
283 | struct pt_regs __regs); | ||
284 | asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5, | ||
285 | unsigned long r6, unsigned long r7, | ||
286 | struct pt_regs __regs); | ||
287 | |||
274 | #define arch_align_stack(x) (x) | 288 | #define arch_align_stack(x) (x) |
275 | 289 | ||
276 | #endif | 290 | #endif |
diff --git a/include/asm-sh/termbits.h b/include/asm-sh/termbits.h index f1b7b46f4e9a..7ee1b42eeab0 100644 --- a/include/asm-sh/termbits.h +++ b/include/asm-sh/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/asm-sh/topology.h b/include/asm-sh/topology.h index cff001c316fe..f402a3b1cfa4 100644 --- a/include/asm-sh/topology.h +++ b/include/asm-sh/topology.h | |||
@@ -1,6 +1,36 @@ | |||
1 | #ifndef _ASM_SH_TOPOLOGY_H | 1 | #ifndef _ASM_SH_TOPOLOGY_H |
2 | #define _ASM_SH_TOPOLOGY_H | 2 | #define _ASM_SH_TOPOLOGY_H |
3 | 3 | ||
4 | #ifdef CONFIG_NUMA | ||
5 | |||
6 | /* sched_domains SD_NODE_INIT for sh machines */ | ||
7 | #define SD_NODE_INIT (struct sched_domain) { \ | ||
8 | .span = CPU_MASK_NONE, \ | ||
9 | .parent = NULL, \ | ||
10 | .child = NULL, \ | ||
11 | .groups = NULL, \ | ||
12 | .min_interval = 8, \ | ||
13 | .max_interval = 32, \ | ||
14 | .busy_factor = 32, \ | ||
15 | .imbalance_pct = 125, \ | ||
16 | .cache_nice_tries = 2, \ | ||
17 | .busy_idx = 3, \ | ||
18 | .idle_idx = 2, \ | ||
19 | .newidle_idx = 0, \ | ||
20 | .wake_idx = 1, \ | ||
21 | .forkexec_idx = 1, \ | ||
22 | .flags = SD_LOAD_BALANCE \ | ||
23 | | SD_BALANCE_FORK \ | ||
24 | | SD_BALANCE_EXEC \ | ||
25 | | SD_SERIALIZE \ | ||
26 | | SD_WAKE_BALANCE, \ | ||
27 | .last_balance = jiffies, \ | ||
28 | .balance_interval = 1, \ | ||
29 | .nr_balance_failed = 0, \ | ||
30 | } | ||
31 | |||
32 | #endif | ||
33 | |||
4 | #include <asm-generic/topology.h> | 34 | #include <asm-generic/topology.h> |
5 | 35 | ||
6 | #endif /* _ASM_SH_TOPOLOGY_H */ | 36 | #endif /* _ASM_SH_TOPOLOGY_H */ |
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h index 5c49ed6715f2..f18a1a5c95c0 100644 --- a/include/asm-sh/uaccess.h +++ b/include/asm-sh/uaccess.h | |||
@@ -61,8 +61,6 @@ static inline void set_fs(mm_segment_t s) | |||
61 | */ | 61 | */ |
62 | static inline int __access_ok(unsigned long addr, unsigned long size) | 62 | static inline int __access_ok(unsigned long addr, unsigned long size) |
63 | { | 63 | { |
64 | extern unsigned long memory_start, memory_end; | ||
65 | |||
66 | return ((addr >= memory_start) && ((addr + size) < memory_end)); | 64 | return ((addr >= memory_start) && ((addr + size) < memory_end)); |
67 | } | 65 | } |
68 | #else /* CONFIG_MMU */ | 66 | #else /* CONFIG_MMU */ |
@@ -76,7 +74,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size) | |||
76 | * __access_ok: Check if address with size is OK or not. | 74 | * __access_ok: Check if address with size is OK or not. |
77 | * | 75 | * |
78 | * We do three checks: | 76 | * We do three checks: |
79 | * (1) is it user space? | 77 | * (1) is it user space? |
80 | * (2) addr + size --> carry? | 78 | * (2) addr + size --> carry? |
81 | * (3) addr + size >= 0x80000000 (PAGE_OFFSET) | 79 | * (3) addr + size >= 0x80000000 (PAGE_OFFSET) |
82 | * | 80 | * |
@@ -142,11 +140,12 @@ static inline int access_ok(int type, const void __user *p, unsigned long size) | |||
142 | __get_user_nocheck((x),(ptr),sizeof(*(ptr))) | 140 | __get_user_nocheck((x),(ptr),sizeof(*(ptr))) |
143 | 141 | ||
144 | struct __large_struct { unsigned long buf[100]; }; | 142 | struct __large_struct { unsigned long buf[100]; }; |
145 | #define __m(x) (*(struct __large_struct *)(x)) | 143 | #define __m(x) (*(struct __large_struct __user *)(x)) |
146 | 144 | ||
147 | #define __get_user_size(x,ptr,size,retval) \ | 145 | #define __get_user_size(x,ptr,size,retval) \ |
148 | do { \ | 146 | do { \ |
149 | retval = 0; \ | 147 | retval = 0; \ |
148 | __chk_user_ptr(ptr); \ | ||
150 | switch (size) { \ | 149 | switch (size) { \ |
151 | case 1: \ | 150 | case 1: \ |
152 | __get_user_asm(x, ptr, retval, "b"); \ | 151 | __get_user_asm(x, ptr, retval, "b"); \ |
@@ -175,6 +174,7 @@ do { \ | |||
175 | #define __get_user_check(x,ptr,size) \ | 174 | #define __get_user_check(x,ptr,size) \ |
176 | ({ \ | 175 | ({ \ |
177 | long __gu_err, __gu_val; \ | 176 | long __gu_err, __gu_val; \ |
177 | __chk_user_ptr(ptr); \ | ||
178 | switch (size) { \ | 178 | switch (size) { \ |
179 | case 1: \ | 179 | case 1: \ |
180 | __get_user_1(__gu_val, (ptr), __gu_err); \ | 180 | __get_user_1(__gu_val, (ptr), __gu_err); \ |
@@ -300,6 +300,7 @@ extern void __get_user_unknown(void); | |||
300 | #define __put_user_size(x,ptr,size,retval) \ | 300 | #define __put_user_size(x,ptr,size,retval) \ |
301 | do { \ | 301 | do { \ |
302 | retval = 0; \ | 302 | retval = 0; \ |
303 | __chk_user_ptr(ptr); \ | ||
303 | switch (size) { \ | 304 | switch (size) { \ |
304 | case 1: \ | 305 | case 1: \ |
305 | __put_user_asm(x, ptr, retval, "b"); \ | 306 | __put_user_asm(x, ptr, retval, "b"); \ |
@@ -328,7 +329,7 @@ do { \ | |||
328 | #define __put_user_check(x,ptr,size) \ | 329 | #define __put_user_check(x,ptr,size) \ |
329 | ({ \ | 330 | ({ \ |
330 | long __pu_err = -EFAULT; \ | 331 | long __pu_err = -EFAULT; \ |
331 | __typeof__(*(ptr)) *__pu_addr = (ptr); \ | 332 | __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ |
332 | \ | 333 | \ |
333 | if (__access_ok((unsigned long)__pu_addr,size)) \ | 334 | if (__access_ok((unsigned long)__pu_addr,size)) \ |
334 | __put_user_size((x),__pu_addr,(size),__pu_err); \ | 335 | __put_user_size((x),__pu_addr,(size),__pu_err); \ |
@@ -406,10 +407,10 @@ __asm__ __volatile__( \ | |||
406 | #endif | 407 | #endif |
407 | 408 | ||
408 | extern void __put_user_unknown(void); | 409 | extern void __put_user_unknown(void); |
409 | 410 | ||
410 | /* Generic arbitrary sized copy. */ | 411 | /* Generic arbitrary sized copy. */ |
411 | /* Return the number of bytes NOT copied */ | 412 | /* Return the number of bytes NOT copied */ |
412 | extern __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); | 413 | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); |
413 | 414 | ||
414 | #define copy_to_user(to,from,n) ({ \ | 415 | #define copy_to_user(to,from,n) ({ \ |
415 | void *__copy_to = (void *) (to); \ | 416 | void *__copy_to = (void *) (to); \ |
@@ -420,14 +421,6 @@ __copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \ | |||
420 | } else __copy_res = __copy_size; \ | 421 | } else __copy_res = __copy_size; \ |
421 | __copy_res; }) | 422 | __copy_res; }) |
422 | 423 | ||
423 | #define __copy_to_user(to,from,n) \ | ||
424 | __copy_user((void *)(to), \ | ||
425 | (void *)(from), n) | ||
426 | |||
427 | #define __copy_to_user_inatomic __copy_to_user | ||
428 | #define __copy_from_user_inatomic __copy_from_user | ||
429 | |||
430 | |||
431 | #define copy_from_user(to,from,n) ({ \ | 424 | #define copy_from_user(to,from,n) ({ \ |
432 | void *__copy_to = (void *) (to); \ | 425 | void *__copy_to = (void *) (to); \ |
433 | void *__copy_from = (void *) (from); \ | 426 | void *__copy_from = (void *) (from); \ |
@@ -438,9 +431,20 @@ __copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \ | |||
438 | } else __copy_res = __copy_size; \ | 431 | } else __copy_res = __copy_size; \ |
439 | __copy_res; }) | 432 | __copy_res; }) |
440 | 433 | ||
441 | #define __copy_from_user(to,from,n) \ | 434 | static __always_inline unsigned long |
442 | __copy_user((void *)(to), \ | 435 | __copy_from_user(void *to, const void __user *from, unsigned long n) |
443 | (void *)(from), n) | 436 | { |
437 | return __copy_user(to, (__force void *)from, n); | ||
438 | } | ||
439 | |||
440 | static __always_inline unsigned long __must_check | ||
441 | __copy_to_user(void __user *to, const void *from, unsigned long n) | ||
442 | { | ||
443 | return __copy_user((__force void *)to, from, n); | ||
444 | } | ||
445 | |||
446 | #define __copy_to_user_inatomic __copy_to_user | ||
447 | #define __copy_from_user_inatomic __copy_from_user | ||
444 | 448 | ||
445 | /* | 449 | /* |
446 | * Clear the area and return remaining number of bytes | 450 | * Clear the area and return remaining number of bytes |
diff --git a/include/asm-sh/ubc.h b/include/asm-sh/ubc.h index ae9bbdeefbe1..38d46e01b846 100644 --- a/include/asm-sh/ubc.h +++ b/include/asm-sh/ubc.h | |||
@@ -51,9 +51,14 @@ | |||
51 | #define BRCR_UBDE (1 << 0) | 51 | #define BRCR_UBDE (1 << 0) |
52 | 52 | ||
53 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
54 | /* arch/sh/kernel/ubc.S */ | 54 | /* arch/sh/kernel/cpu/ubc.S */ |
55 | extern void ubc_wakeup(void); | ||
56 | extern void ubc_sleep(void); | 55 | extern void ubc_sleep(void); |
56 | |||
57 | #ifdef CONFIG_UBC_WAKEUP | ||
58 | extern void ubc_wakeup(void); | ||
59 | #else | ||
60 | #define ubc_wakeup() do { } while (0) | ||
61 | #endif | ||
57 | #endif | 62 | #endif |
58 | 63 | ||
59 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh64/pci.h b/include/asm-sh64/pci.h index aa8043089bb6..57a67cf7a5c4 100644 --- a/include/asm-sh64/pci.h +++ b/include/asm-sh64/pci.h | |||
@@ -72,11 +72,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | /* Not supporting more than 32-bit PCI bus addresses now, but | ||
76 | * must satisfy references to this function. Change if needed. | ||
77 | */ | ||
78 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
79 | |||
80 | /* These macros should be used after a pci_map_sg call has been done | 75 | /* These macros should be used after a pci_map_sg call has been done |
81 | * to get bus addresses of each of the SG entries and their lengths. | 76 | * to get bus addresses of each of the SG entries and their lengths. |
82 | * You should only work with the number of sg entries pci_map_sg | 77 | * You should only work with the number of sg entries pci_map_sg |
@@ -104,10 +99,6 @@ extern void pcibios_fixup_irqs(void); | |||
104 | extern int pciauto_assign_resources(int busno, struct pci_channel *hose); | 99 | extern int pciauto_assign_resources(int busno, struct pci_channel *hose); |
105 | #endif | 100 | #endif |
106 | 101 | ||
107 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | #endif /* __KERNEL__ */ | 102 | #endif /* __KERNEL__ */ |
112 | 103 | ||
113 | /* generic pci stuff */ | 104 | /* generic pci stuff */ |
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index b875482eb592..3488fe32e436 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h | |||
@@ -415,22 +415,15 @@ extern void __handle_bad_pmd_kernel(pmd_t * pmd); | |||
415 | /* | 415 | /* |
416 | * The following have defined behavior only work if pte_present() is true. | 416 | * The following have defined behavior only work if pte_present() is true. |
417 | */ | 417 | */ |
418 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_READ; } | ||
419 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXECUTE; } | ||
420 | static inline int pte_dirty(pte_t pte){ return pte_val(pte) & _PAGE_DIRTY; } | 418 | static inline int pte_dirty(pte_t pte){ return pte_val(pte) & _PAGE_DIRTY; } |
421 | static inline int pte_young(pte_t pte){ return pte_val(pte) & _PAGE_ACCESSED; } | 419 | static inline int pte_young(pte_t pte){ return pte_val(pte) & _PAGE_ACCESSED; } |
422 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 420 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
423 | static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_WRITE; } | 421 | static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_WRITE; } |
424 | 422 | ||
425 | static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_READ)); return pte; } | ||
426 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; } | 423 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; } |
427 | static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_EXECUTE)); return pte; } | ||
428 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 424 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
429 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } | 425 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } |
430 | |||
431 | static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_READ)); return pte; } | ||
432 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_WRITE)); return pte; } | 426 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_WRITE)); return pte; } |
433 | static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_EXECUTE)); return pte; } | ||
434 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 427 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
435 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 428 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
436 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; } | 429 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; } |
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h index a750c688408b..b93b6c79e08f 100644 --- a/include/asm-sparc/pci.h +++ b/include/asm-sparc/pci.h | |||
@@ -142,8 +142,6 @@ static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) | |||
142 | return 1; | 142 | return 1; |
143 | } | 143 | } |
144 | 144 | ||
145 | #define pci_dac_dma_supported(dev, mask) (0) | ||
146 | |||
147 | #ifdef CONFIG_PCI | 145 | #ifdef CONFIG_PCI |
148 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 146 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
149 | enum pci_dma_burst_strategy *strat, | 147 | enum pci_dma_burst_strategy *strat, |
@@ -154,10 +152,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
154 | } | 152 | } |
155 | #endif | 153 | #endif |
156 | 154 | ||
157 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
158 | { | ||
159 | } | ||
160 | |||
161 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) | 155 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) |
162 | 156 | ||
163 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | 157 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 59229aeba27b..a55f4c3488b0 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -151,7 +151,6 @@ BTFIXUPDEF_CALL_CONST(unsigned long, pgd_page_vaddr, pgd_t) | |||
151 | BTFIXUPDEF_SETHI(none_mask) | 151 | BTFIXUPDEF_SETHI(none_mask) |
152 | BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) | 152 | BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) |
153 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) | 153 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) |
154 | BTFIXUPDEF_CALL(int, pte_read, pte_t) | ||
155 | 154 | ||
156 | static inline int pte_none(pte_t pte) | 155 | static inline int pte_none(pte_t pte) |
157 | { | 156 | { |
@@ -160,7 +159,6 @@ static inline int pte_none(pte_t pte) | |||
160 | 159 | ||
161 | #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) | 160 | #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) |
162 | #define pte_clear(mm,addr,pte) BTFIXUP_CALL(pte_clear)(pte) | 161 | #define pte_clear(mm,addr,pte) BTFIXUP_CALL(pte_clear)(pte) |
163 | #define pte_read(pte) BTFIXUP_CALL(pte_read)(pte) | ||
164 | 162 | ||
165 | BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t) | 163 | BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t) |
166 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) | 164 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) |
diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h index bf39d86c0c9e..11ade6841971 100644 --- a/include/asm-sparc64/bugs.h +++ b/include/asm-sparc64/bugs.h | |||
@@ -4,12 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | #include <asm/sstate.h> | 5 | #include <asm/sstate.h> |
6 | 6 | ||
7 | extern unsigned long loops_per_jiffy; | ||
8 | |||
9 | static void __init check_bugs(void) | 7 | static void __init check_bugs(void) |
10 | { | 8 | { |
11 | #ifndef CONFIG_SMP | ||
12 | cpu_data(0).udelay_val = loops_per_jiffy; | ||
13 | #endif | ||
14 | sstate_running(); | 9 | sstate_running(); |
15 | } | 10 | } |
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h index 36511ca51416..01fe6682b405 100644 --- a/include/asm-sparc64/compat.h +++ b/include/asm-sparc64/compat.h | |||
@@ -31,8 +31,10 @@ typedef s32 compat_timer_t; | |||
31 | 31 | ||
32 | typedef s32 compat_int_t; | 32 | typedef s32 compat_int_t; |
33 | typedef s32 compat_long_t; | 33 | typedef s32 compat_long_t; |
34 | typedef s64 compat_s64; | ||
34 | typedef u32 compat_uint_t; | 35 | typedef u32 compat_uint_t; |
35 | typedef u32 compat_ulong_t; | 36 | typedef u32 compat_ulong_t; |
37 | typedef u64 compat_u64; | ||
36 | 38 | ||
37 | struct compat_timespec { | 39 | struct compat_timespec { |
38 | compat_time_t tv_sec; | 40 | compat_time_t tv_sec; |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index 445026fbec35..98a6e609163e 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -19,7 +19,7 @@ typedef struct { | |||
19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ | 19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ |
20 | unsigned int __pad0; | 20 | unsigned int __pad0; |
21 | unsigned long clock_tick; /* %tick's per second */ | 21 | unsigned long clock_tick; /* %tick's per second */ |
22 | unsigned long udelay_val; | 22 | unsigned long __pad; |
23 | unsigned int __pad1; | 23 | unsigned int __pad1; |
24 | unsigned int __pad2; | 24 | unsigned int __pad2; |
25 | 25 | ||
@@ -80,7 +80,8 @@ struct trap_per_cpu { | |||
80 | unsigned int dev_mondo_qmask; | 80 | unsigned int dev_mondo_qmask; |
81 | unsigned int resum_qmask; | 81 | unsigned int resum_qmask; |
82 | unsigned int nonresum_qmask; | 82 | unsigned int nonresum_qmask; |
83 | unsigned int __pad2[3]; | 83 | unsigned int __pad2[1]; |
84 | void *hdesc; | ||
84 | } __attribute__((aligned(64))); | 85 | } __attribute__((aligned(64))); |
85 | extern struct trap_per_cpu trap_block[NR_CPUS]; | 86 | extern struct trap_per_cpu trap_block[NR_CPUS]; |
86 | extern void init_cur_cpu_trap(struct thread_info *); | 87 | extern void init_cur_cpu_trap(struct thread_info *); |
diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h index a4aae6f80627..a77aa622d762 100644 --- a/include/asm-sparc64/delay.h +++ b/include/asm-sparc64/delay.h | |||
@@ -1,37 +1,17 @@ | |||
1 | /* delay.h: Linux delay routines on sparc64. | 1 | /* delay.h: Linux delay routines on sparc64. |
2 | * | 2 | * |
3 | * Copyright (C) 1996, 2004 David S. Miller (davem@davemloft.net). | 3 | * Copyright (C) 1996, 2004, 2007 David S. Miller (davem@davemloft.net). |
4 | * | ||
5 | * Based heavily upon x86 variant which is: | ||
6 | * Copyright (C) 1993 Linus Torvalds | ||
7 | * | ||
8 | * Delay routines calling functions in arch/sparc64/lib/delay.c | ||
9 | */ | 4 | */ |
10 | 5 | ||
11 | #ifndef __SPARC64_DELAY_H | 6 | #ifndef _SPARC64_DELAY_H |
12 | #define __SPARC64_DELAY_H | 7 | #define _SPARC64_DELAY_H |
13 | |||
14 | #include <linux/param.h> | ||
15 | #include <asm/cpudata.h> | ||
16 | 8 | ||
17 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
18 | 10 | ||
19 | extern void __bad_udelay(void); | ||
20 | extern void __bad_ndelay(void); | ||
21 | |||
22 | extern void __udelay(unsigned long usecs); | ||
23 | extern void __ndelay(unsigned long nsecs); | ||
24 | extern void __const_udelay(unsigned long usecs); | ||
25 | extern void __delay(unsigned long loops); | 11 | extern void __delay(unsigned long loops); |
26 | 12 | extern void udelay(unsigned long usecs); | |
27 | #define udelay(n) (__builtin_constant_p(n) ? \ | 13 | #define mdelay(n) udelay((n) * 1000) |
28 | ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \ | ||
29 | __udelay(n)) | ||
30 | |||
31 | #define ndelay(n) (__builtin_constant_p(n) ? \ | ||
32 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ | ||
33 | __ndelay(n)) | ||
34 | 14 | ||
35 | #endif /* !__ASSEMBLY__ */ | 15 | #endif /* !__ASSEMBLY__ */ |
36 | 16 | ||
37 | #endif /* defined(__SPARC64_DELAY_H) */ | 17 | #endif /* _SPARC64_DELAY_H */ |
diff --git a/include/asm-sparc64/hvtramp.h b/include/asm-sparc64/hvtramp.h new file mode 100644 index 000000000000..c7dd6ad056df --- /dev/null +++ b/include/asm-sparc64/hvtramp.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef _SPARC64_HVTRAP_H | ||
2 | #define _SPARC64_HVTRAP_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | |||
8 | struct hvtramp_mapping { | ||
9 | __u64 vaddr; | ||
10 | __u64 tte; | ||
11 | }; | ||
12 | |||
13 | struct hvtramp_descr { | ||
14 | __u32 cpu; | ||
15 | __u32 num_mappings; | ||
16 | __u64 fault_info_va; | ||
17 | __u64 fault_info_pa; | ||
18 | __u64 thread_reg; | ||
19 | struct hvtramp_mapping maps[2]; | ||
20 | }; | ||
21 | |||
22 | extern void hv_cpu_startup(unsigned long hvdescr_pa); | ||
23 | |||
24 | #endif | ||
25 | |||
26 | #define HVTRAMP_DESCR_CPU 0x00 | ||
27 | #define HVTRAMP_DESCR_NUM_MAPPINGS 0x04 | ||
28 | #define HVTRAMP_DESCR_FAULT_INFO_VA 0x08 | ||
29 | #define HVTRAMP_DESCR_FAULT_INFO_PA 0x10 | ||
30 | #define HVTRAMP_DESCR_THREAD_REG 0x18 | ||
31 | #define HVTRAMP_DESCR_MAPS 0x20 | ||
32 | |||
33 | #define HVTRAMP_MAPPING_VADDR 0x00 | ||
34 | #define HVTRAMP_MAPPING_TTE 0x08 | ||
35 | #define HVTRAMP_MAPPING_SIZE 0x10 | ||
36 | |||
37 | #endif /* _SPARC64_HVTRAP_H */ | ||
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h index db2130a95d68..524d49835dfd 100644 --- a/include/asm-sparc64/hypervisor.h +++ b/include/asm-sparc64/hypervisor.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define HV_FAST_MACH_EXIT 0x00 | 98 | #define HV_FAST_MACH_EXIT 0x00 |
99 | 99 | ||
100 | #ifndef __ASSEMBLY__ | 100 | #ifndef __ASSEMBLY__ |
101 | extern void sun4v_mach_exit(unsigned long exit_core); | 101 | extern void sun4v_mach_exit(unsigned long exit_code); |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | /* Domain services. */ | 104 | /* Domain services. */ |
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 90781e34a95c..e6c436ef9356 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -53,6 +53,8 @@ extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | |||
53 | extern void sun4v_destroy_msi(unsigned int virt_irq); | 53 | extern void sun4v_destroy_msi(unsigned int virt_irq); |
54 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); | 54 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); |
55 | 55 | ||
56 | extern void fixup_irqs(void); | ||
57 | |||
56 | static __inline__ void set_softint(unsigned long bits) | 58 | static __inline__ void set_softint(unsigned long bits) |
57 | { | 59 | { |
58 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" | 60 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" |
diff --git a/include/asm-sparc64/ldc.h b/include/asm-sparc64/ldc.h new file mode 100644 index 000000000000..bdb524a7b814 --- /dev/null +++ b/include/asm-sparc64/ldc.h | |||
@@ -0,0 +1,138 @@ | |||
1 | #ifndef _SPARC64_LDC_H | ||
2 | #define _SPARC64_LDC_H | ||
3 | |||
4 | #include <asm/hypervisor.h> | ||
5 | |||
6 | extern int ldom_domaining_enabled; | ||
7 | extern void ldom_set_var(const char *var, const char *value); | ||
8 | extern void ldom_reboot(const char *boot_command); | ||
9 | extern void ldom_power_off(void); | ||
10 | |||
11 | /* The event handler will be evoked when link state changes | ||
12 | * or data becomes available on the receive side. | ||
13 | * | ||
14 | * For non-RAW links, if the LDC_EVENT_RESET event arrives the | ||
15 | * driver should reset all of it's internal state and reinvoke | ||
16 | * ldc_connect() to try and bring the link up again. | ||
17 | * | ||
18 | * For RAW links, ldc_connect() is not used. Instead the driver | ||
19 | * just waits for the LDC_EVENT_UP event. | ||
20 | */ | ||
21 | struct ldc_channel_config { | ||
22 | void (*event)(void *arg, int event); | ||
23 | |||
24 | u32 mtu; | ||
25 | unsigned int rx_irq; | ||
26 | unsigned int tx_irq; | ||
27 | u8 mode; | ||
28 | #define LDC_MODE_RAW 0x00 | ||
29 | #define LDC_MODE_UNRELIABLE 0x01 | ||
30 | #define LDC_MODE_RESERVED 0x02 | ||
31 | #define LDC_MODE_STREAM 0x03 | ||
32 | |||
33 | u8 debug; | ||
34 | #define LDC_DEBUG_HS 0x01 | ||
35 | #define LDC_DEBUG_STATE 0x02 | ||
36 | #define LDC_DEBUG_RX 0x04 | ||
37 | #define LDC_DEBUG_TX 0x08 | ||
38 | #define LDC_DEBUG_DATA 0x10 | ||
39 | }; | ||
40 | |||
41 | #define LDC_EVENT_RESET 0x01 | ||
42 | #define LDC_EVENT_UP 0x02 | ||
43 | #define LDC_EVENT_DATA_READY 0x04 | ||
44 | |||
45 | #define LDC_STATE_INVALID 0x00 | ||
46 | #define LDC_STATE_INIT 0x01 | ||
47 | #define LDC_STATE_BOUND 0x02 | ||
48 | #define LDC_STATE_READY 0x03 | ||
49 | #define LDC_STATE_CONNECTED 0x04 | ||
50 | |||
51 | struct ldc_channel; | ||
52 | |||
53 | /* Allocate state for a channel. */ | ||
54 | extern struct ldc_channel *ldc_alloc(unsigned long id, | ||
55 | const struct ldc_channel_config *cfgp, | ||
56 | void *event_arg); | ||
57 | |||
58 | /* Shut down and free state for a channel. */ | ||
59 | extern void ldc_free(struct ldc_channel *lp); | ||
60 | |||
61 | /* Register TX and RX queues of the link with the hypervisor. */ | ||
62 | extern int ldc_bind(struct ldc_channel *lp, const char *name); | ||
63 | |||
64 | /* For non-RAW protocols we need to complete a handshake before | ||
65 | * communication can proceed. ldc_connect() does that, if the | ||
66 | * handshake completes successfully, an LDC_EVENT_UP event will | ||
67 | * be sent up to the driver. | ||
68 | */ | ||
69 | extern int ldc_connect(struct ldc_channel *lp); | ||
70 | extern int ldc_disconnect(struct ldc_channel *lp); | ||
71 | |||
72 | extern int ldc_state(struct ldc_channel *lp); | ||
73 | |||
74 | /* Read and write operations. Only valid when the link is up. */ | ||
75 | extern int ldc_write(struct ldc_channel *lp, const void *buf, | ||
76 | unsigned int size); | ||
77 | extern int ldc_read(struct ldc_channel *lp, void *buf, unsigned int size); | ||
78 | |||
79 | #define LDC_MAP_SHADOW 0x01 | ||
80 | #define LDC_MAP_DIRECT 0x02 | ||
81 | #define LDC_MAP_IO 0x04 | ||
82 | #define LDC_MAP_R 0x08 | ||
83 | #define LDC_MAP_W 0x10 | ||
84 | #define LDC_MAP_X 0x20 | ||
85 | #define LDC_MAP_RW (LDC_MAP_R | LDC_MAP_W) | ||
86 | #define LDC_MAP_RWX (LDC_MAP_R | LDC_MAP_W | LDC_MAP_X) | ||
87 | #define LDC_MAP_ALL 0x03f | ||
88 | |||
89 | struct ldc_trans_cookie { | ||
90 | u64 cookie_addr; | ||
91 | u64 cookie_size; | ||
92 | }; | ||
93 | |||
94 | struct scatterlist; | ||
95 | extern int ldc_map_sg(struct ldc_channel *lp, | ||
96 | struct scatterlist *sg, int num_sg, | ||
97 | struct ldc_trans_cookie *cookies, int ncookies, | ||
98 | unsigned int map_perm); | ||
99 | |||
100 | extern int ldc_map_single(struct ldc_channel *lp, | ||
101 | void *buf, unsigned int len, | ||
102 | struct ldc_trans_cookie *cookies, int ncookies, | ||
103 | unsigned int map_perm); | ||
104 | |||
105 | extern void ldc_unmap(struct ldc_channel *lp, struct ldc_trans_cookie *cookies, | ||
106 | int ncookies); | ||
107 | |||
108 | extern int ldc_copy(struct ldc_channel *lp, int copy_dir, | ||
109 | void *buf, unsigned int len, unsigned long offset, | ||
110 | struct ldc_trans_cookie *cookies, int ncookies); | ||
111 | |||
112 | static inline int ldc_get_dring_entry(struct ldc_channel *lp, | ||
113 | void *buf, unsigned int len, | ||
114 | unsigned long offset, | ||
115 | struct ldc_trans_cookie *cookies, | ||
116 | int ncookies) | ||
117 | { | ||
118 | return ldc_copy(lp, LDC_COPY_IN, buf, len, offset, cookies, ncookies); | ||
119 | } | ||
120 | |||
121 | static inline int ldc_put_dring_entry(struct ldc_channel *lp, | ||
122 | void *buf, unsigned int len, | ||
123 | unsigned long offset, | ||
124 | struct ldc_trans_cookie *cookies, | ||
125 | int ncookies) | ||
126 | { | ||
127 | return ldc_copy(lp, LDC_COPY_OUT, buf, len, offset, cookies, ncookies); | ||
128 | } | ||
129 | |||
130 | extern void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len, | ||
131 | struct ldc_trans_cookie *cookies, | ||
132 | int *ncookies, unsigned int map_perm); | ||
133 | |||
134 | extern void ldc_free_exp_dring(struct ldc_channel *lp, void *buf, | ||
135 | unsigned int len, | ||
136 | struct ldc_trans_cookie *cookies, int ncookies); | ||
137 | |||
138 | #endif /* _SPARC64_LDC_H */ | ||
diff --git a/include/asm-sparc64/mdesc.h b/include/asm-sparc64/mdesc.h index c6383982b53d..e97c43133752 100644 --- a/include/asm-sparc64/mdesc.h +++ b/include/asm-sparc64/mdesc.h | |||
@@ -2,38 +2,66 @@ | |||
2 | #define _SPARC64_MDESC_H | 2 | #define _SPARC64_MDESC_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/cpumask.h> | ||
5 | #include <asm/prom.h> | 6 | #include <asm/prom.h> |
6 | 7 | ||
7 | struct mdesc_node; | 8 | struct mdesc_handle; |
8 | struct mdesc_arc { | 9 | |
9 | const char *name; | 10 | /* Machine description operations are to be surrounded by grab and |
10 | struct mdesc_node *arc; | 11 | * release calls. The mdesc_handle returned from the grab is |
11 | }; | 12 | * the first argument to all of the operational calls that work |
12 | 13 | * on mdescs. | |
13 | struct mdesc_node { | 14 | */ |
14 | const char *name; | 15 | extern struct mdesc_handle *mdesc_grab(void); |
15 | u64 node; | 16 | extern void mdesc_release(struct mdesc_handle *); |
16 | unsigned int unique_id; | 17 | |
17 | unsigned int num_arcs; | 18 | #define MDESC_NODE_NULL (~(u64)0) |
18 | unsigned int irqs[2]; | 19 | |
19 | struct property *properties; | 20 | extern u64 mdesc_node_by_name(struct mdesc_handle *handle, |
20 | struct mdesc_node *hash_next; | 21 | u64 from_node, const char *name); |
21 | struct mdesc_node *allnodes_next; | 22 | #define mdesc_for_each_node_by_name(__hdl, __node, __name) \ |
22 | struct mdesc_arc arcs[0]; | 23 | for (__node = mdesc_node_by_name(__hdl, MDESC_NODE_NULL, __name); \ |
23 | }; | 24 | (__node) != MDESC_NODE_NULL; \ |
24 | 25 | __node = mdesc_node_by_name(__hdl, __node, __name)) | |
25 | extern struct mdesc_node *md_find_node_by_name(struct mdesc_node *from, | 26 | |
26 | const char *name); | 27 | /* Access to property values returned from mdesc_get_property() are |
27 | #define md_for_each_node_by_name(__mn, __name) \ | 28 | * only valid inside of a mdesc_grab()/mdesc_release() sequence. |
28 | for (__mn = md_find_node_by_name(NULL, __name); __mn; \ | 29 | * Once mdesc_release() is called, the memory backed up by these |
29 | __mn = md_find_node_by_name(__mn, __name)) | 30 | * pointers may reference freed up memory. |
30 | 31 | * | |
31 | extern struct property *md_find_property(const struct mdesc_node *mp, | 32 | * Therefore callers must make copies of any property values |
32 | const char *name, | 33 | * they need. |
33 | int *lenp); | 34 | * |
34 | extern const void *md_get_property(const struct mdesc_node *mp, | 35 | * These same rules apply to mdesc_node_name(). |
35 | const char *name, | 36 | */ |
36 | int *lenp); | 37 | extern const void *mdesc_get_property(struct mdesc_handle *handle, |
38 | u64 node, const char *name, int *lenp); | ||
39 | extern const char *mdesc_node_name(struct mdesc_handle *hp, u64 node); | ||
40 | |||
41 | /* MD arc iteration, the standard sequence is: | ||
42 | * | ||
43 | * unsigned long arc; | ||
44 | * mdesc_for_each_arc(arc, handle, node, MDESC_ARC_TYPE_{FWD,BACK}) { | ||
45 | * unsigned long target = mdesc_arc_target(handle, arc); | ||
46 | * ... | ||
47 | * } | ||
48 | */ | ||
49 | |||
50 | #define MDESC_ARC_TYPE_FWD "fwd" | ||
51 | #define MDESC_ARC_TYPE_BACK "back" | ||
52 | |||
53 | extern u64 mdesc_next_arc(struct mdesc_handle *handle, u64 from, | ||
54 | const char *arc_type); | ||
55 | #define mdesc_for_each_arc(__arc, __hdl, __node, __type) \ | ||
56 | for (__arc = mdesc_next_arc(__hdl, __node, __type); \ | ||
57 | (__arc) != MDESC_NODE_NULL; \ | ||
58 | __arc = mdesc_next_arc(__hdl, __arc, __type)) | ||
59 | |||
60 | extern u64 mdesc_arc_target(struct mdesc_handle *hp, u64 arc); | ||
61 | |||
62 | extern void mdesc_update(void); | ||
63 | |||
64 | extern void mdesc_fill_in_cpu_data(cpumask_t mask); | ||
37 | 65 | ||
38 | extern void sun4v_mdesc_init(void); | 66 | extern void sun4v_mdesc_init(void); |
39 | 67 | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 8d129032013e..9fc225ed5500 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -76,6 +76,9 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str | |||
76 | unsigned long ctx_valid, flags; | 76 | unsigned long ctx_valid, flags; |
77 | int cpu; | 77 | int cpu; |
78 | 78 | ||
79 | if (unlikely(mm == &init_mm)) | ||
80 | return; | ||
81 | |||
79 | spin_lock_irqsave(&mm->context.lock, flags); | 82 | spin_lock_irqsave(&mm->context.lock, flags); |
80 | ctx_valid = CTX_VALID(mm->context); | 83 | ctx_valid = CTX_VALID(mm->context); |
81 | if (!ctx_valid) | 84 | if (!ctx_valid) |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index 47cea16e1bad..e11ac100f043 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -206,49 +206,6 @@ extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); | |||
206 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) | 206 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) |
207 | #define PCI64_ADDR_BASE 0xfffc000000000000UL | 207 | #define PCI64_ADDR_BASE 0xfffc000000000000UL |
208 | 208 | ||
209 | /* Usage of the pci_dac_foo interfaces is only valid if this | ||
210 | * test passes. | ||
211 | */ | ||
212 | #define pci_dac_dma_supported(pci_dev, mask) \ | ||
213 | ((((mask) & PCI64_REQUIRED_MASK) == PCI64_REQUIRED_MASK) ? 1 : 0) | ||
214 | |||
215 | static inline dma64_addr_t | ||
216 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction) | ||
217 | { | ||
218 | return (PCI64_ADDR_BASE + | ||
219 | __pa(page_address(page)) + offset); | ||
220 | } | ||
221 | |||
222 | static inline struct page * | ||
223 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
224 | { | ||
225 | unsigned long paddr = (dma_addr & PAGE_MASK) - PCI64_ADDR_BASE; | ||
226 | |||
227 | return virt_to_page(__va(paddr)); | ||
228 | } | ||
229 | |||
230 | static inline unsigned long | ||
231 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
232 | { | ||
233 | return (dma_addr & ~PAGE_MASK); | ||
234 | } | ||
235 | |||
236 | static inline void | ||
237 | pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
238 | { | ||
239 | /* DAC cycle addressing does not make use of the | ||
240 | * PCI controller's streaming cache, so nothing to do. | ||
241 | */ | ||
242 | } | ||
243 | |||
244 | static inline void | ||
245 | pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
246 | { | ||
247 | /* DAC cycle addressing does not make use of the | ||
248 | * PCI controller's streaming cache, so nothing to do. | ||
249 | */ | ||
250 | } | ||
251 | |||
252 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) | 209 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) |
253 | 210 | ||
254 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | 211 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) |
@@ -303,10 +260,6 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | |||
303 | 260 | ||
304 | extern struct resource *pcibios_select_root(struct pci_dev *, struct resource *); | 261 | extern struct resource *pcibios_select_root(struct pci_dev *, struct resource *); |
305 | 262 | ||
306 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
307 | { | ||
308 | } | ||
309 | |||
310 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 263 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
311 | { | 264 | { |
312 | return PCI_IRQ_NONE; | 265 | return PCI_IRQ_NONE; |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 9e80ad43b29c..0393380d754a 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -573,24 +573,6 @@ static inline unsigned long pte_exec(pte_t pte) | |||
573 | return (pte_val(pte) & mask); | 573 | return (pte_val(pte) & mask); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline unsigned long pte_read(pte_t pte) | ||
577 | { | ||
578 | unsigned long mask; | ||
579 | |||
580 | __asm__ __volatile__( | ||
581 | "\n661: mov %1, %0\n" | ||
582 | " nop\n" | ||
583 | " .section .sun4v_2insn_patch, \"ax\"\n" | ||
584 | " .word 661b\n" | ||
585 | " sethi %%uhi(%2), %0\n" | ||
586 | " sllx %0, 32, %0\n" | ||
587 | " .previous\n" | ||
588 | : "=r" (mask) | ||
589 | : "i" (_PAGE_READ_4U), "i" (_PAGE_READ_4V)); | ||
590 | |||
591 | return (pte_val(pte) & mask); | ||
592 | } | ||
593 | |||
594 | static inline unsigned long pte_file(pte_t pte) | 576 | static inline unsigned long pte_file(pte_t pte) |
595 | { | 577 | { |
596 | unsigned long val = pte_val(pte); | 578 | unsigned long val = pte_val(pte); |
diff --git a/include/asm-sparc64/power.h b/include/asm-sparc64/power.h new file mode 100644 index 000000000000..94495c1ac4f6 --- /dev/null +++ b/include/asm-sparc64/power.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _SPARC64_POWER_H | ||
2 | #define _SPARC64_POWER_H | ||
3 | |||
4 | extern void wake_up_powerd(void); | ||
5 | extern int start_powerd(void); | ||
6 | |||
7 | #endif /* !(_SPARC64_POWER_H) */ | ||
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 4fb8c4bfb848..e8a96a31761b 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h | |||
@@ -29,9 +29,6 @@ | |||
29 | #include <asm/bitops.h> | 29 | #include <asm/bitops.h> |
30 | #include <asm/atomic.h> | 30 | #include <asm/atomic.h> |
31 | 31 | ||
32 | extern cpumask_t phys_cpu_present_map; | ||
33 | #define cpu_possible_map phys_cpu_present_map | ||
34 | |||
35 | extern cpumask_t cpu_sibling_map[NR_CPUS]; | 32 | extern cpumask_t cpu_sibling_map[NR_CPUS]; |
36 | extern cpumask_t cpu_core_map[NR_CPUS]; | 33 | extern cpumask_t cpu_core_map[NR_CPUS]; |
37 | extern int sparc64_multi_core; | 34 | extern int sparc64_multi_core; |
@@ -44,7 +41,12 @@ extern int hard_smp_processor_id(void); | |||
44 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 41 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
45 | 42 | ||
46 | extern void smp_fill_in_sib_core_maps(void); | 43 | extern void smp_fill_in_sib_core_maps(void); |
47 | extern unsigned char boot_cpu_id; | 44 | extern void cpu_play_dead(void); |
45 | |||
46 | #ifdef CONFIG_HOTPLUG_CPU | ||
47 | extern int __cpu_disable(void); | ||
48 | extern void __cpu_die(unsigned int cpu); | ||
49 | #endif | ||
48 | 50 | ||
49 | #endif /* !(__ASSEMBLY__) */ | 51 | #endif /* !(__ASSEMBLY__) */ |
50 | 52 | ||
@@ -52,7 +54,6 @@ extern unsigned char boot_cpu_id; | |||
52 | 54 | ||
53 | #define hard_smp_processor_id() 0 | 55 | #define hard_smp_processor_id() 0 |
54 | #define smp_fill_in_sib_core_maps() do { } while (0) | 56 | #define smp_fill_in_sib_core_maps() do { } while (0) |
55 | #define boot_cpu_id (0) | ||
56 | 57 | ||
57 | #endif /* !(CONFIG_SMP) */ | 58 | #endif /* !(CONFIG_SMP) */ |
58 | 59 | ||
diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h new file mode 100644 index 000000000000..83c96422e9d6 --- /dev/null +++ b/include/asm-sparc64/vio.h | |||
@@ -0,0 +1,404 @@ | |||
1 | #ifndef _SPARC64_VIO_H | ||
2 | #define _SPARC64_VIO_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/device.h> | ||
6 | #include <linux/mod_devicetable.h> | ||
7 | #include <linux/timer.h> | ||
8 | #include <linux/spinlock.h> | ||
9 | #include <linux/completion.h> | ||
10 | #include <linux/list.h> | ||
11 | |||
12 | #include <asm/ldc.h> | ||
13 | #include <asm/mdesc.h> | ||
14 | |||
15 | struct vio_msg_tag { | ||
16 | u8 type; | ||
17 | #define VIO_TYPE_CTRL 0x01 | ||
18 | #define VIO_TYPE_DATA 0x02 | ||
19 | #define VIO_TYPE_ERR 0x04 | ||
20 | |||
21 | u8 stype; | ||
22 | #define VIO_SUBTYPE_INFO 0x01 | ||
23 | #define VIO_SUBTYPE_ACK 0x02 | ||
24 | #define VIO_SUBTYPE_NACK 0x04 | ||
25 | |||
26 | u16 stype_env; | ||
27 | #define VIO_VER_INFO 0x0001 | ||
28 | #define VIO_ATTR_INFO 0x0002 | ||
29 | #define VIO_DRING_REG 0x0003 | ||
30 | #define VIO_DRING_UNREG 0x0004 | ||
31 | #define VIO_RDX 0x0005 | ||
32 | #define VIO_PKT_DATA 0x0040 | ||
33 | #define VIO_DESC_DATA 0x0041 | ||
34 | #define VIO_DRING_DATA 0x0042 | ||
35 | #define VNET_MCAST_INFO 0x0101 | ||
36 | |||
37 | u32 sid; | ||
38 | }; | ||
39 | |||
40 | struct vio_rdx { | ||
41 | struct vio_msg_tag tag; | ||
42 | u64 resv[6]; | ||
43 | }; | ||
44 | |||
45 | struct vio_ver_info { | ||
46 | struct vio_msg_tag tag; | ||
47 | u16 major; | ||
48 | u16 minor; | ||
49 | u8 dev_class; | ||
50 | #define VDEV_NETWORK 0x01 | ||
51 | #define VDEV_NETWORK_SWITCH 0x02 | ||
52 | #define VDEV_DISK 0x03 | ||
53 | #define VDEV_DISK_SERVER 0x04 | ||
54 | |||
55 | u8 resv1[3]; | ||
56 | u64 resv2[5]; | ||
57 | }; | ||
58 | |||
59 | struct vio_dring_register { | ||
60 | struct vio_msg_tag tag; | ||
61 | u64 dring_ident; | ||
62 | u32 num_descr; | ||
63 | u32 descr_size; | ||
64 | u16 options; | ||
65 | #define VIO_TX_DRING 0x0001 | ||
66 | #define VIO_RX_DRING 0x0002 | ||
67 | u16 resv; | ||
68 | u32 num_cookies; | ||
69 | struct ldc_trans_cookie cookies[0]; | ||
70 | }; | ||
71 | |||
72 | struct vio_dring_unregister { | ||
73 | struct vio_msg_tag tag; | ||
74 | u64 dring_ident; | ||
75 | u64 resv[5]; | ||
76 | }; | ||
77 | |||
78 | /* Data transfer modes */ | ||
79 | #define VIO_PKT_MODE 0x01 /* Packet based transfer */ | ||
80 | #define VIO_DESC_MODE 0x02 /* In-band descriptors */ | ||
81 | #define VIO_DRING_MODE 0x03 /* Descriptor rings */ | ||
82 | |||
83 | struct vio_dring_data { | ||
84 | struct vio_msg_tag tag; | ||
85 | u64 seq; | ||
86 | u64 dring_ident; | ||
87 | u32 start_idx; | ||
88 | u32 end_idx; | ||
89 | u8 state; | ||
90 | #define VIO_DRING_ACTIVE 0x01 | ||
91 | #define VIO_DRING_STOPPED 0x02 | ||
92 | |||
93 | u8 __pad1; | ||
94 | u16 __pad2; | ||
95 | u32 __pad3; | ||
96 | u64 __par4[2]; | ||
97 | }; | ||
98 | |||
99 | struct vio_dring_hdr { | ||
100 | u8 state; | ||
101 | #define VIO_DESC_FREE 0x01 | ||
102 | #define VIO_DESC_READY 0x02 | ||
103 | #define VIO_DESC_ACCEPTED 0x03 | ||
104 | #define VIO_DESC_DONE 0x04 | ||
105 | u8 ack; | ||
106 | #define VIO_ACK_ENABLE 0x01 | ||
107 | #define VIO_ACK_DISABLE 0x00 | ||
108 | |||
109 | u16 __pad1; | ||
110 | u32 __pad2; | ||
111 | }; | ||
112 | |||
113 | /* VIO disk specific structures and defines */ | ||
114 | struct vio_disk_attr_info { | ||
115 | struct vio_msg_tag tag; | ||
116 | u8 xfer_mode; | ||
117 | u8 vdisk_type; | ||
118 | #define VD_DISK_TYPE_SLICE 0x01 /* Slice in block device */ | ||
119 | #define VD_DISK_TYPE_DISK 0x02 /* Entire block device */ | ||
120 | u16 resv1; | ||
121 | u32 vdisk_block_size; | ||
122 | u64 operations; | ||
123 | u64 vdisk_size; | ||
124 | u64 max_xfer_size; | ||
125 | u64 resv2[2]; | ||
126 | }; | ||
127 | |||
128 | struct vio_disk_desc { | ||
129 | struct vio_dring_hdr hdr; | ||
130 | u64 req_id; | ||
131 | u8 operation; | ||
132 | #define VD_OP_BREAD 0x01 /* Block read */ | ||
133 | #define VD_OP_BWRITE 0x02 /* Block write */ | ||
134 | #define VD_OP_FLUSH 0x03 /* Flush disk contents */ | ||
135 | #define VD_OP_GET_WCE 0x04 /* Get write-cache status */ | ||
136 | #define VD_OP_SET_WCE 0x05 /* Enable/disable write-cache */ | ||
137 | #define VD_OP_GET_VTOC 0x06 /* Get VTOC */ | ||
138 | #define VD_OP_SET_VTOC 0x07 /* Set VTOC */ | ||
139 | #define VD_OP_GET_DISKGEOM 0x08 /* Get disk geometry */ | ||
140 | #define VD_OP_SET_DISKGEOM 0x09 /* Set disk geometry */ | ||
141 | #define VD_OP_SCSICMD 0x0a /* SCSI control command */ | ||
142 | #define VD_OP_GET_DEVID 0x0b /* Get device ID */ | ||
143 | #define VD_OP_GET_EFI 0x0c /* Get EFI */ | ||
144 | #define VD_OP_SET_EFI 0x0d /* Set EFI */ | ||
145 | u8 slice; | ||
146 | u16 resv1; | ||
147 | u32 status; | ||
148 | u64 offset; | ||
149 | u64 size; | ||
150 | u32 ncookies; | ||
151 | u32 resv2; | ||
152 | struct ldc_trans_cookie cookies[0]; | ||
153 | }; | ||
154 | |||
155 | #define VIO_DISK_VNAME_LEN 8 | ||
156 | #define VIO_DISK_ALABEL_LEN 128 | ||
157 | #define VIO_DISK_NUM_PART 8 | ||
158 | |||
159 | struct vio_disk_vtoc { | ||
160 | u8 volume_name[VIO_DISK_VNAME_LEN]; | ||
161 | u16 sector_size; | ||
162 | u16 num_partitions; | ||
163 | u8 ascii_label[VIO_DISK_ALABEL_LEN]; | ||
164 | struct { | ||
165 | u16 id; | ||
166 | u16 perm_flags; | ||
167 | u32 resv; | ||
168 | u64 start_block; | ||
169 | u64 num_blocks; | ||
170 | } partitions[VIO_DISK_NUM_PART]; | ||
171 | }; | ||
172 | |||
173 | struct vio_disk_geom { | ||
174 | u16 num_cyl; /* Num data cylinders */ | ||
175 | u16 alt_cyl; /* Num alternate cylinders */ | ||
176 | u16 beg_cyl; /* Cyl off of fixed head area */ | ||
177 | u16 num_hd; /* Num heads */ | ||
178 | u16 num_sec; /* Num sectors */ | ||
179 | u16 ifact; /* Interleave factor */ | ||
180 | u16 apc; /* Alts per cylinder (SCSI) */ | ||
181 | u16 rpm; /* Revolutions per minute */ | ||
182 | u16 phy_cyl; /* Num physical cylinders */ | ||
183 | u16 wr_skip; /* Num sects to skip, writes */ | ||
184 | u16 rd_skip; /* Num sects to skip, writes */ | ||
185 | }; | ||
186 | |||
187 | struct vio_disk_devid { | ||
188 | u16 resv; | ||
189 | u16 type; | ||
190 | u32 len; | ||
191 | char id[0]; | ||
192 | }; | ||
193 | |||
194 | struct vio_disk_efi { | ||
195 | u64 lba; | ||
196 | u64 len; | ||
197 | char data[0]; | ||
198 | }; | ||
199 | |||
200 | /* VIO net specific structures and defines */ | ||
201 | struct vio_net_attr_info { | ||
202 | struct vio_msg_tag tag; | ||
203 | u8 xfer_mode; | ||
204 | u8 addr_type; | ||
205 | #define VNET_ADDR_ETHERMAC 0x01 | ||
206 | u16 ack_freq; | ||
207 | u32 resv1; | ||
208 | u64 addr; | ||
209 | u64 mtu; | ||
210 | u64 resv2[3]; | ||
211 | }; | ||
212 | |||
213 | #define VNET_NUM_MCAST 7 | ||
214 | |||
215 | struct vio_net_mcast_info { | ||
216 | struct vio_msg_tag tag; | ||
217 | u8 set; | ||
218 | u8 count; | ||
219 | u8 mcast_addr[VNET_NUM_MCAST * 6]; | ||
220 | u32 resv; | ||
221 | }; | ||
222 | |||
223 | struct vio_net_desc { | ||
224 | struct vio_dring_hdr hdr; | ||
225 | u32 size; | ||
226 | u32 ncookies; | ||
227 | struct ldc_trans_cookie cookies[0]; | ||
228 | }; | ||
229 | |||
230 | #define VIO_MAX_RING_COOKIES 24 | ||
231 | |||
232 | struct vio_dring_state { | ||
233 | u64 ident; | ||
234 | void *base; | ||
235 | u64 snd_nxt; | ||
236 | u64 rcv_nxt; | ||
237 | u32 entry_size; | ||
238 | u32 num_entries; | ||
239 | u32 prod; | ||
240 | u32 cons; | ||
241 | u32 pending; | ||
242 | int ncookies; | ||
243 | struct ldc_trans_cookie cookies[VIO_MAX_RING_COOKIES]; | ||
244 | }; | ||
245 | |||
246 | static inline void *vio_dring_cur(struct vio_dring_state *dr) | ||
247 | { | ||
248 | return dr->base + (dr->entry_size * dr->prod); | ||
249 | } | ||
250 | |||
251 | static inline void *vio_dring_entry(struct vio_dring_state *dr, | ||
252 | unsigned int index) | ||
253 | { | ||
254 | return dr->base + (dr->entry_size * index); | ||
255 | } | ||
256 | |||
257 | static inline u32 vio_dring_avail(struct vio_dring_state *dr, | ||
258 | unsigned int ring_size) | ||
259 | { | ||
260 | /* Ensure build-time power-of-2. */ | ||
261 | BUILD_BUG_ON(ring_size & (ring_size - 1)); | ||
262 | |||
263 | return (dr->pending - | ||
264 | ((dr->prod - dr->cons) & (ring_size - 1))); | ||
265 | } | ||
266 | |||
267 | #define VIO_MAX_TYPE_LEN 64 | ||
268 | #define VIO_MAX_COMPAT_LEN 64 | ||
269 | |||
270 | struct vio_dev { | ||
271 | u64 mp; | ||
272 | struct device_node *dp; | ||
273 | |||
274 | char type[VIO_MAX_TYPE_LEN]; | ||
275 | char compat[VIO_MAX_COMPAT_LEN]; | ||
276 | int compat_len; | ||
277 | |||
278 | unsigned long channel_id; | ||
279 | |||
280 | unsigned int tx_irq; | ||
281 | unsigned int rx_irq; | ||
282 | |||
283 | struct device dev; | ||
284 | }; | ||
285 | |||
286 | struct vio_driver { | ||
287 | struct list_head node; | ||
288 | const struct vio_device_id *id_table; | ||
289 | int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); | ||
290 | int (*remove)(struct vio_dev *dev); | ||
291 | void (*shutdown)(struct vio_dev *dev); | ||
292 | unsigned long driver_data; | ||
293 | struct device_driver driver; | ||
294 | }; | ||
295 | |||
296 | struct vio_version { | ||
297 | u16 major; | ||
298 | u16 minor; | ||
299 | }; | ||
300 | |||
301 | struct vio_driver_state; | ||
302 | struct vio_driver_ops { | ||
303 | int (*send_attr)(struct vio_driver_state *vio); | ||
304 | int (*handle_attr)(struct vio_driver_state *vio, void *pkt); | ||
305 | void (*handshake_complete)(struct vio_driver_state *vio); | ||
306 | }; | ||
307 | |||
308 | struct vio_completion { | ||
309 | struct completion com; | ||
310 | int err; | ||
311 | int waiting_for; | ||
312 | }; | ||
313 | |||
314 | struct vio_driver_state { | ||
315 | /* Protects VIO handshake and, optionally, driver private state. */ | ||
316 | spinlock_t lock; | ||
317 | |||
318 | struct ldc_channel *lp; | ||
319 | |||
320 | u32 _peer_sid; | ||
321 | u32 _local_sid; | ||
322 | struct vio_dring_state drings[2]; | ||
323 | #define VIO_DRIVER_TX_RING 0 | ||
324 | #define VIO_DRIVER_RX_RING 1 | ||
325 | |||
326 | u8 hs_state; | ||
327 | #define VIO_HS_INVALID 0x00 | ||
328 | #define VIO_HS_GOTVERS 0x01 | ||
329 | #define VIO_HS_GOT_ATTR 0x04 | ||
330 | #define VIO_HS_SENT_DREG 0x08 | ||
331 | #define VIO_HS_SENT_RDX 0x10 | ||
332 | #define VIO_HS_GOT_RDX_ACK 0x20 | ||
333 | #define VIO_HS_GOT_RDX 0x40 | ||
334 | #define VIO_HS_SENT_RDX_ACK 0x80 | ||
335 | #define VIO_HS_COMPLETE (VIO_HS_GOT_RDX_ACK | VIO_HS_SENT_RDX_ACK) | ||
336 | |||
337 | u8 dev_class; | ||
338 | |||
339 | u8 dr_state; | ||
340 | #define VIO_DR_STATE_TXREG 0x01 | ||
341 | #define VIO_DR_STATE_RXREG 0x02 | ||
342 | #define VIO_DR_STATE_TXREQ 0x10 | ||
343 | #define VIO_DR_STATE_RXREQ 0x20 | ||
344 | |||
345 | u8 debug; | ||
346 | #define VIO_DEBUG_HS 0x01 | ||
347 | #define VIO_DEBUG_DATA 0x02 | ||
348 | |||
349 | void *desc_buf; | ||
350 | unsigned int desc_buf_len; | ||
351 | |||
352 | struct vio_completion *cmp; | ||
353 | |||
354 | struct vio_dev *vdev; | ||
355 | |||
356 | struct timer_list timer; | ||
357 | |||
358 | struct vio_version ver; | ||
359 | |||
360 | struct vio_version *ver_table; | ||
361 | int ver_table_entries; | ||
362 | |||
363 | char *name; | ||
364 | |||
365 | struct vio_driver_ops *ops; | ||
366 | }; | ||
367 | |||
368 | #define viodbg(TYPE, f, a...) \ | ||
369 | do { if (vio->debug & VIO_DEBUG_##TYPE) \ | ||
370 | printk(KERN_INFO "vio: ID[%lu] " f, \ | ||
371 | vio->vdev->channel_id, ## a); \ | ||
372 | } while (0) | ||
373 | |||
374 | extern int vio_register_driver(struct vio_driver *drv); | ||
375 | extern void vio_unregister_driver(struct vio_driver *drv); | ||
376 | |||
377 | static inline struct vio_driver *to_vio_driver(struct device_driver *drv) | ||
378 | { | ||
379 | return container_of(drv, struct vio_driver, driver); | ||
380 | } | ||
381 | |||
382 | static inline struct vio_dev *to_vio_dev(struct device *dev) | ||
383 | { | ||
384 | return container_of(dev, struct vio_dev, dev); | ||
385 | } | ||
386 | |||
387 | extern int vio_ldc_send(struct vio_driver_state *vio, void *data, int len); | ||
388 | extern void vio_link_state_change(struct vio_driver_state *vio, int event); | ||
389 | extern void vio_conn_reset(struct vio_driver_state *vio); | ||
390 | extern int vio_control_pkt_engine(struct vio_driver_state *vio, void *pkt); | ||
391 | extern int vio_validate_sid(struct vio_driver_state *vio, | ||
392 | struct vio_msg_tag *tp); | ||
393 | extern u32 vio_send_sid(struct vio_driver_state *vio); | ||
394 | extern int vio_ldc_alloc(struct vio_driver_state *vio, | ||
395 | struct ldc_channel_config *base_cfg, void *event_arg); | ||
396 | extern void vio_ldc_free(struct vio_driver_state *vio); | ||
397 | extern int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev, | ||
398 | u8 dev_class, struct vio_version *ver_table, | ||
399 | int ver_table_size, struct vio_driver_ops *ops, | ||
400 | char *name); | ||
401 | |||
402 | extern void vio_port_up(struct vio_driver_state *vio); | ||
403 | |||
404 | #endif /* _SPARC64_VIO_H */ | ||
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 1b1090a91a58..830fc6e5d49d 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -175,12 +175,6 @@ static inline int pte_none(pte_t pte) | |||
175 | * The following only work if pte_present() is true. | 175 | * The following only work if pte_present() is true. |
176 | * Undefined behaviour if not.. | 176 | * Undefined behaviour if not.. |
177 | */ | 177 | */ |
178 | static inline int pte_user(pte_t pte) | ||
179 | { | ||
180 | return((pte_get_bits(pte, _PAGE_USER)) && | ||
181 | !(pte_get_bits(pte, _PAGE_PROTNONE))); | ||
182 | } | ||
183 | |||
184 | static inline int pte_read(pte_t pte) | 178 | static inline int pte_read(pte_t pte) |
185 | { | 179 | { |
186 | return((pte_get_bits(pte, _PAGE_USER)) && | 180 | return((pte_get_bits(pte, _PAGE_USER)) && |
@@ -238,18 +232,6 @@ static inline pte_t pte_mknewprot(pte_t pte) | |||
238 | return(pte); | 232 | return(pte); |
239 | } | 233 | } |
240 | 234 | ||
241 | static inline pte_t pte_rdprotect(pte_t pte) | ||
242 | { | ||
243 | pte_clear_bits(pte, _PAGE_USER); | ||
244 | return(pte_mknewprot(pte)); | ||
245 | } | ||
246 | |||
247 | static inline pte_t pte_exprotect(pte_t pte) | ||
248 | { | ||
249 | pte_clear_bits(pte, _PAGE_USER); | ||
250 | return(pte_mknewprot(pte)); | ||
251 | } | ||
252 | |||
253 | static inline pte_t pte_mkclean(pte_t pte) | 235 | static inline pte_t pte_mkclean(pte_t pte) |
254 | { | 236 | { |
255 | pte_clear_bits(pte, _PAGE_DIRTY); | 237 | pte_clear_bits(pte, _PAGE_DIRTY); |
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 18a13ba74605..6e5fd5c892d0 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -52,10 +52,21 @@ static inline struct thread_info *current_thread_info(void) | |||
52 | return ti; | 52 | return ti; |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
56 | |||
57 | #define alloc_thread_info(tsk) \ | ||
58 | ((struct thread_info *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, \ | ||
59 | CONFIG_KERNEL_STACK_ORDER)) | ||
60 | #else | ||
61 | |||
55 | /* thread information allocation */ | 62 | /* thread information allocation */ |
56 | #define alloc_thread_info(tsk) \ | 63 | #define alloc_thread_info(tsk) \ |
57 | ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) | 64 | ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ |
58 | #define free_thread_info(ti) kfree(ti) | 65 | CONFIG_KERNEL_STACK_ORDER)) |
66 | #endif | ||
67 | |||
68 | #define free_thread_info(ti) \ | ||
69 | free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) | ||
59 | 70 | ||
60 | #endif | 71 | #endif |
61 | 72 | ||
diff --git a/include/asm-v850/ioctls.h b/include/asm-v850/ioctls.h index 05c0dc9ce1ea..5313abd5f388 100644 --- a/include/asm-v850/ioctls.h +++ b/include/asm-v850/ioctls.h | |||
@@ -46,6 +46,10 @@ | |||
46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
48 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 48 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
49 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
50 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
51 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
49 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
50 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
51 | 55 | ||
diff --git a/include/asm-v850/pci.h b/include/asm-v850/pci.h index 4581826e1cac..de2a7d0a81cc 100644 --- a/include/asm-v850/pci.h +++ b/include/asm-v850/pci.h | |||
@@ -116,8 +116,4 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
116 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | 116 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
117 | extern void pci_iounmap (struct pci_dev *dev, void __iomem *addr); | 117 | extern void pci_iounmap (struct pci_dev *dev, void __iomem *addr); |
118 | 118 | ||
119 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | #endif /* __V850_PCI_H__ */ | 119 | #endif /* __V850_PCI_H__ */ |
diff --git a/include/asm-v850/rte_cb.h b/include/asm-v850/rte_cb.h index 9f7f02cb0391..e85d261b79bf 100644 --- a/include/asm-v850/rte_cb.h +++ b/include/asm-v850/rte_cb.h | |||
@@ -64,7 +64,6 @@ | |||
64 | /* As we don't really support PCI DMA to cpu memory, and use bounce-buffers | 64 | /* As we don't really support PCI DMA to cpu memory, and use bounce-buffers |
65 | instead, perversely enough, this becomes always true! */ | 65 | instead, perversely enough, this becomes always true! */ |
66 | # define pci_dma_supported(dev, mask) 1 | 66 | # define pci_dma_supported(dev, mask) 1 |
67 | # define pci_dac_dma_supported(dev, mask) 0 | ||
68 | # define pcibios_assign_all_busses() 1 | 67 | # define pcibios_assign_all_busses() 1 |
69 | 68 | ||
70 | #endif /* CONFIG_RTE_MB_A_PCI */ | 69 | #endif /* CONFIG_RTE_MB_A_PCI */ |
diff --git a/include/asm-v850/termbits.h b/include/asm-v850/termbits.h index f3b433032089..295d7bf69451 100644 --- a/include/asm-v850/termbits.h +++ b/include/asm-v850/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
@@ -130,6 +141,7 @@ struct ktermios { | |||
130 | #define HUPCL 0002000 | 141 | #define HUPCL 0002000 |
131 | #define CLOCAL 0004000 | 142 | #define CLOCAL 0004000 |
132 | #define CBAUDEX 0010000 | 143 | #define CBAUDEX 0010000 |
144 | #define BOTHER 0010000 | ||
133 | #define B57600 0010001 | 145 | #define B57600 0010001 |
134 | #define B115200 0010002 | 146 | #define B115200 0010002 |
135 | #define B230400 0010003 | 147 | #define B230400 0010003 |
@@ -145,10 +157,12 @@ struct ktermios { | |||
145 | #define B3000000 0010015 | 157 | #define B3000000 0010015 |
146 | #define B3500000 0010016 | 158 | #define B3500000 0010016 |
147 | #define B4000000 0010017 | 159 | #define B4000000 0010017 |
148 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 160 | #define CIBAUD 002003600000 /* input baud rate */ |
149 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
150 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
151 | 163 | ||
164 | #define IBSHIFT 16 /* Shifr from CBAUD to CIBAUD */ | ||
165 | |||
152 | /* c_lflag bits */ | 166 | /* c_lflag bits */ |
153 | #define ISIG 0000001 | 167 | #define ISIG 0000001 |
154 | #define ICANON 0000002 | 168 | #define ICANON 0000002 |
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h index c2c2b1d58776..fcd171838d9c 100644 --- a/include/asm-v850/termios.h +++ b/include/asm-v850/termios.h | |||
@@ -80,8 +80,10 @@ struct termio { | |||
80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
81 | }) | 81 | }) |
82 | 82 | ||
83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
85 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
86 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
85 | 87 | ||
86 | #endif /* __KERNEL__ */ | 88 | #endif /* __KERNEL__ */ |
87 | 89 | ||
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h index a09427640764..eea7aecfac78 100644 --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h | |||
@@ -5,6 +5,41 @@ | |||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | |||
9 | /* | ||
10 | * Alternative inline assembly for SMP. | ||
11 | * | ||
12 | * The LOCK_PREFIX macro defined here replaces the LOCK and | ||
13 | * LOCK_PREFIX macros used everywhere in the source tree. | ||
14 | * | ||
15 | * SMP alternatives use the same data structures as the other | ||
16 | * alternatives and the X86_FEATURE_UP flag to indicate the case of a | ||
17 | * UP system running a SMP kernel. The existing apply_alternatives() | ||
18 | * works fine for patching a SMP kernel for UP. | ||
19 | * | ||
20 | * The SMP alternative tables can be kept after boot and contain both | ||
21 | * UP and SMP versions of the instructions to allow switching back to | ||
22 | * SMP at runtime, when hotplugging in a new CPU, which is especially | ||
23 | * useful in virtualized environments. | ||
24 | * | ||
25 | * The very common lock prefix is handled as special case in a | ||
26 | * separate table which is a pure address list without replacement ptr | ||
27 | * and size information. That keeps the table sizes small. | ||
28 | */ | ||
29 | |||
30 | #ifdef CONFIG_SMP | ||
31 | #define LOCK_PREFIX \ | ||
32 | ".section .smp_locks,\"a\"\n" \ | ||
33 | " .align 8\n" \ | ||
34 | " .quad 661f\n" /* address */ \ | ||
35 | ".previous\n" \ | ||
36 | "661:\n\tlock; " | ||
37 | |||
38 | #else /* ! CONFIG_SMP */ | ||
39 | #define LOCK_PREFIX "" | ||
40 | #endif | ||
41 | |||
42 | /* This must be included *after* the definition of LOCK_PREFIX */ | ||
8 | #include <asm/cpufeature.h> | 43 | #include <asm/cpufeature.h> |
9 | 44 | ||
10 | struct alt_instr { | 45 | struct alt_instr { |
@@ -108,39 +143,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
108 | */ | 143 | */ |
109 | #define ASM_OUTPUT2(a, b) a, b | 144 | #define ASM_OUTPUT2(a, b) a, b |
110 | 145 | ||
111 | /* | ||
112 | * Alternative inline assembly for SMP. | ||
113 | * | ||
114 | * The LOCK_PREFIX macro defined here replaces the LOCK and | ||
115 | * LOCK_PREFIX macros used everywhere in the source tree. | ||
116 | * | ||
117 | * SMP alternatives use the same data structures as the other | ||
118 | * alternatives and the X86_FEATURE_UP flag to indicate the case of a | ||
119 | * UP system running a SMP kernel. The existing apply_alternatives() | ||
120 | * works fine for patching a SMP kernel for UP. | ||
121 | * | ||
122 | * The SMP alternative tables can be kept after boot and contain both | ||
123 | * UP and SMP versions of the instructions to allow switching back to | ||
124 | * SMP at runtime, when hotplugging in a new CPU, which is especially | ||
125 | * useful in virtualized environments. | ||
126 | * | ||
127 | * The very common lock prefix is handled as special case in a | ||
128 | * separate table which is a pure address list without replacement ptr | ||
129 | * and size information. That keeps the table sizes small. | ||
130 | */ | ||
131 | |||
132 | #ifdef CONFIG_SMP | ||
133 | #define LOCK_PREFIX \ | ||
134 | ".section .smp_locks,\"a\"\n" \ | ||
135 | " .align 8\n" \ | ||
136 | " .quad 661f\n" /* address */ \ | ||
137 | ".previous\n" \ | ||
138 | "661:\n\tlock; " | ||
139 | |||
140 | #else /* ! CONFIG_SMP */ | ||
141 | #define LOCK_PREFIX "" | ||
142 | #endif | ||
143 | |||
144 | struct paravirt_patch; | 146 | struct paravirt_patch; |
145 | #ifdef CONFIG_PARAVIRT | 147 | #ifdef CONFIG_PARAVIRT |
146 | void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end); | 148 | void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end); |
diff --git a/include/asm-x86_64/boot.h b/include/asm-x86_64/boot.h index 96b228e6e79c..3c46cea8db7f 100644 --- a/include/asm-x86_64/boot.h +++ b/include/asm-x86_64/boot.h | |||
@@ -1,15 +1 @@ | |||
1 | #ifndef _LINUX_BOOT_H | #include <asm-i386/boot.h> | |
2 | #define _LINUX_BOOT_H | ||
3 | |||
4 | /* Don't touch these, unless you really know what you're doing. */ | ||
5 | #define DEF_INITSEG 0x9000 | ||
6 | #define DEF_SYSSEG 0x1000 | ||
7 | #define DEF_SETUPSEG 0x9020 | ||
8 | #define DEF_SYSSIZE 0x7F00 | ||
9 | |||
10 | /* Internal svga startup constants */ | ||
11 | #define NORMAL_VGA 0xffff /* 80x25 mode */ | ||
12 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ | ||
13 | #define ASK_VGA 0xfffd /* ask for it at bootup */ | ||
14 | |||
15 | #endif | ||
diff --git a/include/asm-x86_64/bootparam.h b/include/asm-x86_64/bootparam.h new file mode 100644 index 000000000000..aa82e5238d82 --- /dev/null +++ b/include/asm-x86_64/bootparam.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-i386/bootparam.h> | |||
diff --git a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h index b37ab8218ef0..53cb96b68a62 100644 --- a/include/asm-x86_64/compat.h +++ b/include/asm-x86_64/compat.h | |||
@@ -33,8 +33,10 @@ typedef s32 compat_key_t; | |||
33 | 33 | ||
34 | typedef s32 compat_int_t; | 34 | typedef s32 compat_int_t; |
35 | typedef s32 compat_long_t; | 35 | typedef s32 compat_long_t; |
36 | typedef s64 __attribute__((aligned(4))) compat_s64; | ||
36 | typedef u32 compat_uint_t; | 37 | typedef u32 compat_uint_t; |
37 | typedef u32 compat_ulong_t; | 38 | typedef u32 compat_ulong_t; |
39 | typedef u64 __attribute__((aligned(4))) compat_u64; | ||
38 | 40 | ||
39 | struct compat_timespec { | 41 | struct compat_timespec { |
40 | compat_time_t tv_sec; | 42 | compat_time_t tv_sec; |
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index 0b3c686139f1..8baefc3beb2e 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h | |||
@@ -7,115 +7,24 @@ | |||
7 | #ifndef __ASM_X8664_CPUFEATURE_H | 7 | #ifndef __ASM_X8664_CPUFEATURE_H |
8 | #define __ASM_X8664_CPUFEATURE_H | 8 | #define __ASM_X8664_CPUFEATURE_H |
9 | 9 | ||
10 | #define NCAPINTS 7 /* N 32-bit words worth of info */ | 10 | #include <asm-i386/cpufeature.h> |
11 | 11 | ||
12 | /* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ | 12 | #undef cpu_has_vme |
13 | #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ | ||
14 | #define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ | ||
15 | #define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ | ||
16 | #define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ | ||
17 | #define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ | ||
18 | #define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ | ||
19 | #define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ | ||
20 | #define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ | ||
21 | #define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ | ||
22 | #define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ | ||
23 | #define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ | ||
24 | #define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ | ||
25 | #define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ | ||
26 | #define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ | ||
27 | #define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ | ||
28 | #define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ | ||
29 | #define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ | ||
30 | #define X86_FEATURE_PN (0*32+18) /* Processor serial number */ | ||
31 | #define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ | ||
32 | #define X86_FEATURE_DS (0*32+21) /* Debug Store */ | ||
33 | #define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ | ||
34 | #define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ | ||
35 | #define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ | ||
36 | /* of FPU context), and CR4.OSFXSR available */ | ||
37 | #define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ | ||
38 | #define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ | ||
39 | #define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */ | ||
40 | #define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ | ||
41 | #define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ | ||
42 | #define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ | ||
43 | |||
44 | /* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ | ||
45 | /* Don't duplicate feature flags which are redundant with Intel! */ | ||
46 | #define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ | ||
47 | #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ | ||
48 | #define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSR optimizations */ | ||
49 | #define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */ | ||
50 | #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ | ||
51 | #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ | ||
52 | #define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ | ||
53 | |||
54 | /* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ | ||
55 | #define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */ | ||
56 | #define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */ | ||
57 | #define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */ | ||
58 | |||
59 | /* Other features, Linux-defined mapping, word 3 */ | ||
60 | /* This range is used for feature bits which conflict or are synthesized */ | ||
61 | #define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */ | ||
62 | #define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ | ||
63 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ | ||
64 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ | ||
65 | #define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */ | ||
66 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ | ||
67 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ | ||
68 | #define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */ | ||
69 | #define X86_FEATURE_UP (3*32+8) /* SMP kernel running on UP */ | ||
70 | #define X86_FEATURE_ARCH_PERFMON (3*32+9) /* Intel Architectural PerfMon */ | ||
71 | #define X86_FEATURE_PEBS (3*32+10) /* Precise-Event Based Sampling */ | ||
72 | #define X86_FEATURE_BTS (3*32+11) /* Branch Trace Store */ | ||
73 | |||
74 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | ||
75 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | ||
76 | #define X86_FEATURE_MWAIT (4*32+ 3) /* Monitor/Mwait support */ | ||
77 | #define X86_FEATURE_DSCPL (4*32+ 4) /* CPL Qualified Debug Store */ | ||
78 | #define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ | ||
79 | #define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */ | ||
80 | #define X86_FEATURE_CID (4*32+10) /* Context ID */ | ||
81 | #define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ | ||
82 | #define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ | ||
83 | |||
84 | /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ | ||
85 | #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ | ||
86 | #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ | ||
87 | #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ | ||
88 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ | ||
89 | |||
90 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ | ||
91 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ | ||
92 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ | ||
93 | |||
94 | #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) | ||
95 | #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) | ||
96 | |||
97 | #define cpu_has_fpu 1 | ||
98 | #define cpu_has_vme 0 | 13 | #define cpu_has_vme 0 |
99 | #define cpu_has_de 1 | 14 | |
100 | #define cpu_has_pse 1 | 15 | #undef cpu_has_pae |
101 | #define cpu_has_tsc 1 | ||
102 | #define cpu_has_pae ___BUG___ | 16 | #define cpu_has_pae ___BUG___ |
103 | #define cpu_has_pge 1 | 17 | |
104 | #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) | 18 | #undef cpu_has_mp |
105 | #define cpu_has_mtrr 1 | ||
106 | #define cpu_has_mmx 1 | ||
107 | #define cpu_has_fxsr 1 | ||
108 | #define cpu_has_xmm 1 | ||
109 | #define cpu_has_xmm2 1 | ||
110 | #define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) | ||
111 | #define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) | ||
112 | #define cpu_has_mp 1 /* XXX */ | 19 | #define cpu_has_mp 1 /* XXX */ |
20 | |||
21 | #undef cpu_has_k6_mtrr | ||
113 | #define cpu_has_k6_mtrr 0 | 22 | #define cpu_has_k6_mtrr 0 |
23 | |||
24 | #undef cpu_has_cyrix_arr | ||
114 | #define cpu_has_cyrix_arr 0 | 25 | #define cpu_has_cyrix_arr 0 |
26 | |||
27 | #undef cpu_has_centaur_mcr | ||
115 | #define cpu_has_centaur_mcr 0 | 28 | #define cpu_has_centaur_mcr 0 |
116 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) | ||
117 | #define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) | ||
118 | #define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) | ||
119 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) | ||
120 | 29 | ||
121 | #endif /* __ASM_X8664_CPUFEATURE_H */ | 30 | #endif /* __ASM_X8664_CPUFEATURE_H */ |
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index 6216fa3f2802..3486e701bd86 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __E820_HEADER | 11 | #ifndef __E820_HEADER |
12 | #define __E820_HEADER | 12 | #define __E820_HEADER |
13 | 13 | ||
14 | #include <linux/mmzone.h> | ||
15 | |||
16 | #define E820MAP 0x2d0 /* our map */ | 14 | #define E820MAP 0x2d0 /* our map */ |
17 | #define E820MAX 128 /* number of entries in E820MAP */ | 15 | #define E820MAX 128 /* number of entries in E820MAP */ |
18 | #define E820NR 0x1e8 /* # entries in E820MAP */ | 16 | #define E820NR 0x1e8 /* # entries in E820MAP */ |
@@ -30,7 +28,7 @@ struct e820entry { | |||
30 | } __attribute__((packed)); | 28 | } __attribute__((packed)); |
31 | 29 | ||
32 | struct e820map { | 30 | struct e820map { |
33 | int nr_map; | 31 | u32 nr_map; |
34 | struct e820entry map[E820MAX]; | 32 | struct e820entry map[E820MAX]; |
35 | }; | 33 | }; |
36 | 34 | ||
diff --git a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h index e90e1677531b..2acb9b7f6418 100644 --- a/include/asm-x86_64/fixmap.h +++ b/include/asm-x86_64/fixmap.h | |||
@@ -35,6 +35,8 @@ enum fixed_addresses { | |||
35 | VSYSCALL_LAST_PAGE, | 35 | VSYSCALL_LAST_PAGE, |
36 | VSYSCALL_FIRST_PAGE = VSYSCALL_LAST_PAGE + ((VSYSCALL_END-VSYSCALL_START) >> PAGE_SHIFT) - 1, | 36 | VSYSCALL_FIRST_PAGE = VSYSCALL_LAST_PAGE + ((VSYSCALL_END-VSYSCALL_START) >> PAGE_SHIFT) - 1, |
37 | VSYSCALL_HPET, | 37 | VSYSCALL_HPET, |
38 | FIX_DBGP_BASE, | ||
39 | FIX_EARLYCON_MEM_BASE, | ||
38 | FIX_HPET_BASE, | 40 | FIX_HPET_BASE, |
39 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 41 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
40 | FIX_IO_APIC_BASE_0, | 42 | FIX_IO_APIC_BASE_0, |
@@ -84,7 +86,7 @@ static __always_inline unsigned long fix_to_virt(const unsigned int idx) | |||
84 | if (idx >= __end_of_fixed_addresses) | 86 | if (idx >= __end_of_fixed_addresses) |
85 | __this_fixmap_does_not_exist(); | 87 | __this_fixmap_does_not_exist(); |
86 | 88 | ||
87 | return __fix_to_virt(idx); | 89 | return __fix_to_virt(idx); |
88 | } | 90 | } |
89 | 91 | ||
90 | #endif | 92 | #endif |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index de2cd9a2303a..7475095c5061 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -144,6 +144,7 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
144 | */ | 144 | */ |
145 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); | 145 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); |
146 | extern void iounmap(volatile void __iomem *addr); | 146 | extern void iounmap(volatile void __iomem *addr); |
147 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
147 | 148 | ||
148 | /* | 149 | /* |
149 | * ISA I/O bus memory addresses are 1:1 with the physical address. | 150 | * ISA I/O bus memory addresses are 1:1 with the physical address. |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index 49c5e9280598..bda94fd5176f 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -54,14 +54,6 @@ extern int iommu_setup(char *opt); | |||
54 | 54 | ||
55 | #if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU) | 55 | #if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU) |
56 | 56 | ||
57 | /* | ||
58 | * x86-64 always supports DAC, but sometimes it is useful to force | ||
59 | * devices through the IOMMU to get automatic sg list merging. | ||
60 | * Optional right now. | ||
61 | */ | ||
62 | extern int iommu_sac_force; | ||
63 | #define pci_dac_dma_supported(pci_dev, mask) (!iommu_sac_force) | ||
64 | |||
65 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 57 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
66 | dma_addr_t ADDR_NAME; | 58 | dma_addr_t ADDR_NAME; |
67 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ | 59 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ |
@@ -78,8 +70,6 @@ extern int iommu_sac_force; | |||
78 | #else | 70 | #else |
79 | /* No IOMMU */ | 71 | /* No IOMMU */ |
80 | 72 | ||
81 | #define pci_dac_dma_supported(pci_dev, mask) 1 | ||
82 | |||
83 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 73 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
84 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | 74 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) |
85 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | 75 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) |
@@ -91,36 +81,6 @@ extern int iommu_sac_force; | |||
91 | 81 | ||
92 | #include <asm-generic/pci-dma-compat.h> | 82 | #include <asm-generic/pci-dma-compat.h> |
93 | 83 | ||
94 | static inline dma64_addr_t | ||
95 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction) | ||
96 | { | ||
97 | return ((dma64_addr_t) page_to_phys(page) + | ||
98 | (dma64_addr_t) offset); | ||
99 | } | ||
100 | |||
101 | static inline struct page * | ||
102 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
103 | { | ||
104 | return virt_to_page(__va(dma_addr)); | ||
105 | } | ||
106 | |||
107 | static inline unsigned long | ||
108 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
109 | { | ||
110 | return (dma_addr & ~PAGE_MASK); | ||
111 | } | ||
112 | |||
113 | static inline void | ||
114 | pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
115 | { | ||
116 | } | ||
117 | |||
118 | static inline void | ||
119 | pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, size_t len, int direction) | ||
120 | { | ||
121 | flush_write_buffers(); | ||
122 | } | ||
123 | |||
124 | #ifdef CONFIG_PCI | 84 | #ifdef CONFIG_PCI |
125 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 85 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
126 | enum pci_dma_burst_strategy *strat, | 86 | enum pci_dma_burst_strategy *strat, |
@@ -135,10 +95,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
135 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 95 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
136 | enum pci_mmap_state mmap_state, int write_combine); | 96 | enum pci_mmap_state mmap_state, int write_combine); |
137 | 97 | ||
138 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
139 | { | ||
140 | } | ||
141 | |||
142 | #endif /* __KERNEL__ */ | 98 | #endif /* __KERNEL__ */ |
143 | 99 | ||
144 | /* generic pci stuff */ | 100 | /* generic pci stuff */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 0a71e0b9a619..4f169ac6b10a 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -266,21 +266,15 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | |||
266 | * Undefined behaviour if not.. | 266 | * Undefined behaviour if not.. |
267 | */ | 267 | */ |
268 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | 268 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) |
269 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
270 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
271 | static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); } | ||
272 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 269 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
273 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 270 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
274 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 271 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
275 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 272 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
276 | static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } | 273 | static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } |
277 | 274 | ||
278 | static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | ||
279 | static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | ||
280 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 275 | static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
281 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } | 276 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } |
282 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; } | 277 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; } |
283 | static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; } | ||
284 | static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_NX)); return pte; } | 278 | static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_NX)); return pte; } |
285 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 279 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
286 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 280 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 461ffe4c1fcc..efc87a5aff7f 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -100,6 +100,7 @@ extern char ignore_irq13; | |||
100 | 100 | ||
101 | extern void identify_cpu(struct cpuinfo_x86 *); | 101 | extern void identify_cpu(struct cpuinfo_x86 *); |
102 | extern void print_cpu_info(struct cpuinfo_x86 *); | 102 | extern void print_cpu_info(struct cpuinfo_x86 *); |
103 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | ||
103 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 104 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
104 | extern unsigned short num_cache_leaves; | 105 | extern unsigned short num_cache_leaves; |
105 | 106 | ||
@@ -368,8 +369,6 @@ static inline void sync_core(void) | |||
368 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); | 369 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); |
369 | } | 370 | } |
370 | 371 | ||
371 | #define cpu_has_fpu 1 | ||
372 | |||
373 | #define ARCH_HAS_PREFETCH | 372 | #define ARCH_HAS_PREFETCH |
374 | static inline void prefetch(void *x) | 373 | static inline void prefetch(void *x) |
375 | { | 374 | { |
diff --git a/include/asm-x86_64/required-features.h b/include/asm-x86_64/required-features.h new file mode 100644 index 000000000000..e80d5761b00a --- /dev/null +++ b/include/asm-x86_64/required-features.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef _ASM_REQUIRED_FEATURES_H | ||
2 | #define _ASM_REQUIRED_FEATURES_H 1 | ||
3 | |||
4 | /* Define minimum CPUID feature set for kernel These bits are checked | ||
5 | really early to actually display a visible error message before the | ||
6 | kernel dies. Make sure to assign features to the proper mask! | ||
7 | |||
8 | The real information is in arch/x86_64/Kconfig.cpu, this just converts | ||
9 | the CONFIGs into a bitmask */ | ||
10 | |||
11 | /* x86-64 baseline features */ | ||
12 | #define NEED_FPU (1<<(X86_FEATURE_FPU & 31)) | ||
13 | #define NEED_PSE (1<<(X86_FEATURE_PSE & 31)) | ||
14 | #define NEED_MSR (1<<(X86_FEATURE_MSR & 31)) | ||
15 | #define NEED_PAE (1<<(X86_FEATURE_PAE & 31)) | ||
16 | #define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31)) | ||
17 | #define NEED_PGE (1<<(X86_FEATURE_PGE & 31)) | ||
18 | #define NEED_FXSR (1<<(X86_FEATURE_FXSR & 31)) | ||
19 | #define NEED_CMOV (1<<(X86_FEATURE_CMOV & 31)) | ||
20 | #define NEED_XMM (1<<(X86_FEATURE_XMM & 31)) | ||
21 | #define NEED_XMM2 (1<<(X86_FEATURE_XMM2 & 31)) | ||
22 | |||
23 | #define REQUIRED_MASK0 (NEED_FPU|NEED_PSE|NEED_MSR|NEED_PAE|\ | ||
24 | NEED_CX8|NEED_PGE|NEED_FXSR|NEED_CMOV|\ | ||
25 | NEED_XMM|NEED_XMM2) | ||
26 | #define SSE_MASK (NEED_XMM|NEED_XMM2) | ||
27 | |||
28 | /* x86-64 baseline features */ | ||
29 | #define NEED_LM (1<<(X86_FEATURE_LM & 31)) | ||
30 | |||
31 | #ifdef CONFIG_X86_USE_3DNOW | ||
32 | # define NEED_3DNOW (1<<(X86_FEATURE_3DNOW & 31)) | ||
33 | #else | ||
34 | # define NEED_3DNOW 0 | ||
35 | #endif | ||
36 | |||
37 | #define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW) | ||
38 | |||
39 | #define REQUIRED_MASK2 0 | ||
40 | #define REQUIRED_MASK3 0 | ||
41 | #define REQUIRED_MASK4 0 | ||
42 | #define REQUIRED_MASK5 0 | ||
43 | #define REQUIRED_MASK6 0 | ||
44 | #define REQUIRED_MASK7 0 | ||
45 | |||
46 | #endif | ||
diff --git a/include/asm-x86_64/segment.h b/include/asm-x86_64/segment.h index adf2bf1e187c..04b8ab21328f 100644 --- a/include/asm-x86_64/segment.h +++ b/include/asm-x86_64/segment.h | |||
@@ -3,6 +3,14 @@ | |||
3 | 3 | ||
4 | #include <asm/cache.h> | 4 | #include <asm/cache.h> |
5 | 5 | ||
6 | /* Simple and small GDT entries for booting only */ | ||
7 | |||
8 | #define GDT_ENTRY_BOOT_CS 2 | ||
9 | #define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8) | ||
10 | |||
11 | #define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1) | ||
12 | #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) | ||
13 | |||
6 | #define __KERNEL_CS 0x10 | 14 | #define __KERNEL_CS 0x10 |
7 | #define __KERNEL_DS 0x18 | 15 | #define __KERNEL_DS 0x18 |
8 | 16 | ||
diff --git a/include/asm-xtensa/pci.h b/include/asm-xtensa/pci.h index 24eb7fc25da8..66410acf18b4 100644 --- a/include/asm-xtensa/pci.h +++ b/include/asm-xtensa/pci.h | |||
@@ -64,9 +64,6 @@ struct pci_dev; | |||
64 | #define pci_ubnmap_len(PTR, LEN_NAME) (0) | 64 | #define pci_ubnmap_len(PTR, LEN_NAME) (0) |
65 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 65 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
66 | 66 | ||
67 | /* We cannot access memory above 4GB */ | ||
68 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
69 | |||
70 | /* Map a range of PCI memory or I/O space for a device into user space */ | 67 | /* Map a range of PCI memory or I/O space for a device into user space */ |
71 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | 68 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, |
72 | enum pci_mmap_state mmap_state, int write_combine); | 69 | enum pci_mmap_state mmap_state, int write_combine); |
@@ -74,10 +71,6 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | |||
74 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ | 71 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ |
75 | #define HAVE_PCI_MMAP 1 | 72 | #define HAVE_PCI_MMAP 1 |
76 | 73 | ||
77 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | ||
78 | { | ||
79 | } | ||
80 | |||
81 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
82 | 75 | ||
83 | /* Implement the pci_ DMA API in terms of the generic device dma_ one */ | 76 | /* Implement the pci_ DMA API in terms of the generic device dma_ one */ |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 2d4b5db6ea63..e9fc512cc247 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -197,16 +197,13 @@ extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)]; | |||
197 | 197 | ||
198 | /* Note: We use the _PAGE_USER bit to indicate write-protect kernel memory */ | 198 | /* Note: We use the _PAGE_USER bit to indicate write-protect kernel memory */ |
199 | 199 | ||
200 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | ||
201 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 200 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
202 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 201 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
203 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 202 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
204 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 203 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
205 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~(_PAGE_RW | _PAGE_WRENABLE); return pte; } | 204 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~(_PAGE_RW | _PAGE_WRENABLE); return pte; } |
206 | static inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_USER; return pte; } | ||
207 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } | 205 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } |
208 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 206 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
209 | static inline pte_t pte_mkread(pte_t pte) { pte_val(pte) |= _PAGE_USER; return pte; } | ||
210 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } | 207 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } |
211 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 208 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
212 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pte; } | 209 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pte; } |
diff --git a/include/asm-xtensa/termbits.h b/include/asm-xtensa/termbits.h index 057b9a3d8f83..9972c25ec86f 100644 --- a/include/asm-xtensa/termbits.h +++ b/include/asm-xtensa/termbits.h | |||
@@ -30,6 +30,17 @@ struct termios { | |||
30 | cc_t c_cc[NCCS]; /* control characters */ | 30 | cc_t c_cc[NCCS]; /* control characters */ |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct termios2 { | ||
34 | tcflag_t c_iflag; /* input mode flags */ | ||
35 | tcflag_t c_oflag; /* output mode flags */ | ||
36 | tcflag_t c_cflag; /* control mode flags */ | ||
37 | tcflag_t c_lflag; /* local mode flags */ | ||
38 | cc_t c_line; /* line discipline */ | ||
39 | cc_t c_cc[NCCS]; /* control characters */ | ||
40 | speed_t c_ispeed; /* input speed */ | ||
41 | speed_t c_ospeed; /* output speed */ | ||
42 | }; | ||
43 | |||
33 | struct ktermios { | 44 | struct ktermios { |
34 | tcflag_t c_iflag; /* input mode flags */ | 45 | tcflag_t c_iflag; /* input mode flags */ |
35 | tcflag_t c_oflag; /* output mode flags */ | 46 | tcflag_t c_oflag; /* output mode flags */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index afae306b177c..bcf875e844fe 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -91,7 +91,6 @@ header-y += in6.h | |||
91 | header-y += in_route.h | 91 | header-y += in_route.h |
92 | header-y += ioctl.h | 92 | header-y += ioctl.h |
93 | header-y += ipmi_msgdefs.h | 93 | header-y += ipmi_msgdefs.h |
94 | header-y += ip_mp_alg.h | ||
95 | header-y += ipsec.h | 94 | header-y += ipsec.h |
96 | header-y += ipx.h | 95 | header-y += ipx.h |
97 | header-y += irda.h | 96 | header-y += irda.h |
@@ -226,6 +225,7 @@ unifdef-y += if_fddi.h | |||
226 | unifdef-y += if_frad.h | 225 | unifdef-y += if_frad.h |
227 | unifdef-y += if_ltalk.h | 226 | unifdef-y += if_ltalk.h |
228 | unifdef-y += if_link.h | 227 | unifdef-y += if_link.h |
228 | unifdef-y += if_pppol2tp.h | ||
229 | unifdef-y += if_pppox.h | 229 | unifdef-y += if_pppox.h |
230 | unifdef-y += if_shaper.h | 230 | unifdef-y += if_shaper.h |
231 | unifdef-y += if_tr.h | 231 | unifdef-y += if_tr.h |
@@ -247,7 +247,6 @@ unifdef-y += isdn.h | |||
247 | unifdef-y += isdnif.h | 247 | unifdef-y += isdnif.h |
248 | unifdef-y += isdn_divertif.h | 248 | unifdef-y += isdn_divertif.h |
249 | unifdef-y += isdn_ppp.h | 249 | unifdef-y += isdn_ppp.h |
250 | unifdef-y += isicom.h | ||
251 | unifdef-y += jbd.h | 250 | unifdef-y += jbd.h |
252 | unifdef-y += joystick.h | 251 | unifdef-y += joystick.h |
253 | unifdef-y += kdev_t.h | 252 | unifdef-y += kdev_t.h |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 402e178b38eb..509656286e53 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -13,11 +13,13 @@ extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | |||
13 | extern int pci_find_aer_capability(struct pci_dev *dev); | 13 | extern int pci_find_aer_capability(struct pci_dev *dev); |
14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | 14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); |
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); | ||
16 | #else | 17 | #else |
17 | #define pci_enable_pcie_error_reporting(dev) do { } while (0) | 18 | #define pci_enable_pcie_error_reporting(dev) (-EINVAL) |
18 | #define pci_find_aer_capability(dev) do { } while (0) | 19 | #define pci_find_aer_capability(dev) (0) |
19 | #define pci_disable_pcie_error_reporting(dev) do { } while (0) | 20 | #define pci_disable_pcie_error_reporting(dev) (-EINVAL) |
20 | #define pci_cleanup_aer_uncorrect_error_status(dev) do { } while (0) | 21 | #define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) |
22 | #define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) | ||
21 | #endif | 23 | #endif |
22 | 24 | ||
23 | #endif //_AER_H_ | 25 | #endif //_AER_H_ |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h new file mode 100644 index 000000000000..ff1255079fa1 --- /dev/null +++ b/include/linux/async_tx.h | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * Copyright © 2006, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef _ASYNC_TX_H_ | ||
19 | #define _ASYNC_TX_H_ | ||
20 | #include <linux/dmaengine.h> | ||
21 | #include <linux/spinlock.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | |||
24 | /** | ||
25 | * dma_chan_ref - object used to manage dma channels received from the | ||
26 | * dmaengine core. | ||
27 | * @chan - the channel being tracked | ||
28 | * @node - node for the channel to be placed on async_tx_master_list | ||
29 | * @rcu - for list_del_rcu | ||
30 | * @count - number of times this channel is listed in the pool | ||
31 | * (for channels with multiple capabiities) | ||
32 | */ | ||
33 | struct dma_chan_ref { | ||
34 | struct dma_chan *chan; | ||
35 | struct list_head node; | ||
36 | struct rcu_head rcu; | ||
37 | atomic_t count; | ||
38 | }; | ||
39 | |||
40 | /** | ||
41 | * async_tx_flags - modifiers for the async_* calls | ||
42 | * @ASYNC_TX_XOR_ZERO_DST: this flag must be used for xor operations where the | ||
43 | * the destination address is not a source. The asynchronous case handles this | ||
44 | * implicitly, the synchronous case needs to zero the destination block. | ||
45 | * @ASYNC_TX_XOR_DROP_DST: this flag must be used if the destination address is | ||
46 | * also one of the source addresses. In the synchronous case the destination | ||
47 | * address is an implied source, whereas the asynchronous case it must be listed | ||
48 | * as a source. The destination address must be the first address in the source | ||
49 | * array. | ||
50 | * @ASYNC_TX_ASSUME_COHERENT: skip cache maintenance operations | ||
51 | * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a | ||
52 | * dependency chain | ||
53 | * @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining. | ||
54 | * @ASYNC_TX_KMAP_SRC: if the transaction is to be performed synchronously | ||
55 | * take an atomic mapping (KM_USER0) on the source page(s) | ||
56 | * @ASYNC_TX_KMAP_DST: if the transaction is to be performed synchronously | ||
57 | * take an atomic mapping (KM_USER0) on the dest page(s) | ||
58 | */ | ||
59 | enum async_tx_flags { | ||
60 | ASYNC_TX_XOR_ZERO_DST = (1 << 0), | ||
61 | ASYNC_TX_XOR_DROP_DST = (1 << 1), | ||
62 | ASYNC_TX_ASSUME_COHERENT = (1 << 2), | ||
63 | ASYNC_TX_ACK = (1 << 3), | ||
64 | ASYNC_TX_DEP_ACK = (1 << 4), | ||
65 | ASYNC_TX_KMAP_SRC = (1 << 5), | ||
66 | ASYNC_TX_KMAP_DST = (1 << 6), | ||
67 | }; | ||
68 | |||
69 | #ifdef CONFIG_DMA_ENGINE | ||
70 | void async_tx_issue_pending_all(void); | ||
71 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | ||
72 | void async_tx_run_dependencies(struct dma_async_tx_descriptor *tx); | ||
73 | struct dma_chan * | ||
74 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | ||
75 | enum dma_transaction_type tx_type); | ||
76 | #else | ||
77 | static inline void async_tx_issue_pending_all(void) | ||
78 | { | ||
79 | do { } while (0); | ||
80 | } | ||
81 | |||
82 | static inline enum dma_status | ||
83 | dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | ||
84 | { | ||
85 | return DMA_SUCCESS; | ||
86 | } | ||
87 | |||
88 | static inline void | ||
89 | async_tx_run_dependencies(struct dma_async_tx_descriptor *tx, | ||
90 | struct dma_chan *host_chan) | ||
91 | { | ||
92 | do { } while (0); | ||
93 | } | ||
94 | |||
95 | static inline struct dma_chan * | ||
96 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | ||
97 | enum dma_transaction_type tx_type) | ||
98 | { | ||
99 | return NULL; | ||
100 | } | ||
101 | #endif | ||
102 | |||
103 | /** | ||
104 | * async_tx_sync_epilog - actions to take if an operation is run synchronously | ||
105 | * @flags: async_tx flags | ||
106 | * @depend_tx: transaction depends on depend_tx | ||
107 | * @cb_fn: function to call when the transaction completes | ||
108 | * @cb_fn_param: parameter to pass to the callback routine | ||
109 | */ | ||
110 | static inline void | ||
111 | async_tx_sync_epilog(unsigned long flags, | ||
112 | struct dma_async_tx_descriptor *depend_tx, | ||
113 | dma_async_tx_callback cb_fn, void *cb_fn_param) | ||
114 | { | ||
115 | if (cb_fn) | ||
116 | cb_fn(cb_fn_param); | ||
117 | |||
118 | if (depend_tx && (flags & ASYNC_TX_DEP_ACK)) | ||
119 | async_tx_ack(depend_tx); | ||
120 | } | ||
121 | |||
122 | void | ||
123 | async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx, | ||
124 | enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx, | ||
125 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
126 | |||
127 | struct dma_async_tx_descriptor * | ||
128 | async_xor(struct page *dest, struct page **src_list, unsigned int offset, | ||
129 | int src_cnt, size_t len, enum async_tx_flags flags, | ||
130 | struct dma_async_tx_descriptor *depend_tx, | ||
131 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
132 | |||
133 | struct dma_async_tx_descriptor * | ||
134 | async_xor_zero_sum(struct page *dest, struct page **src_list, | ||
135 | unsigned int offset, int src_cnt, size_t len, | ||
136 | u32 *result, enum async_tx_flags flags, | ||
137 | struct dma_async_tx_descriptor *depend_tx, | ||
138 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
139 | |||
140 | struct dma_async_tx_descriptor * | ||
141 | async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | ||
142 | unsigned int src_offset, size_t len, enum async_tx_flags flags, | ||
143 | struct dma_async_tx_descriptor *depend_tx, | ||
144 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
145 | |||
146 | struct dma_async_tx_descriptor * | ||
147 | async_memset(struct page *dest, int val, unsigned int offset, | ||
148 | size_t len, enum async_tx_flags flags, | ||
149 | struct dma_async_tx_descriptor *depend_tx, | ||
150 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
151 | |||
152 | struct dma_async_tx_descriptor * | ||
153 | async_trigger_callback(enum async_tx_flags flags, | ||
154 | struct dma_async_tx_descriptor *depend_tx, | ||
155 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
156 | #endif /* _ASYNC_TX_H_ */ | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 407dc7e098bc..b5a20162af32 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -164,6 +164,8 @@ enum { | |||
164 | ATA_CMD_SET_MAX = 0xF9, | 164 | ATA_CMD_SET_MAX = 0xF9, |
165 | ATA_CMD_SET_MAX_EXT = 0x37, | 165 | ATA_CMD_SET_MAX_EXT = 0x37, |
166 | ATA_CMD_READ_LOG_EXT = 0x2f, | 166 | ATA_CMD_READ_LOG_EXT = 0x2f, |
167 | ATA_CMD_PMP_READ = 0xE4, | ||
168 | ATA_CMD_PMP_WRITE = 0xE8, | ||
167 | 169 | ||
168 | /* READ_LOG_EXT pages */ | 170 | /* READ_LOG_EXT pages */ |
169 | ATA_LOG_SATA_NCQ = 0x10, | 171 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -212,6 +214,28 @@ enum { | |||
212 | 0=to device, 1=to host */ | 214 | 0=to device, 1=to host */ |
213 | ATAPI_CDB_LEN = 16, | 215 | ATAPI_CDB_LEN = 16, |
214 | 216 | ||
217 | /* PMP stuff */ | ||
218 | SATA_PMP_MAX_PORTS = 15, | ||
219 | SATA_PMP_CTRL_PORT = 15, | ||
220 | |||
221 | SATA_PMP_GSCR_DWORDS = 128, | ||
222 | SATA_PMP_GSCR_PROD_ID = 0, | ||
223 | SATA_PMP_GSCR_REV = 1, | ||
224 | SATA_PMP_GSCR_PORT_INFO = 2, | ||
225 | SATA_PMP_GSCR_ERROR = 32, | ||
226 | SATA_PMP_GSCR_ERROR_EN = 33, | ||
227 | SATA_PMP_GSCR_FEAT = 64, | ||
228 | SATA_PMP_GSCR_FEAT_EN = 96, | ||
229 | |||
230 | SATA_PMP_PSCR_STATUS = 0, | ||
231 | SATA_PMP_PSCR_ERROR = 1, | ||
232 | SATA_PMP_PSCR_CONTROL = 2, | ||
233 | |||
234 | SATA_PMP_FEAT_BIST = (1 << 0), | ||
235 | SATA_PMP_FEAT_PMREQ = (1 << 1), | ||
236 | SATA_PMP_FEAT_DYNSSC = (1 << 2), | ||
237 | SATA_PMP_FEAT_NOTIFY = (1 << 3), | ||
238 | |||
215 | /* cable types */ | 239 | /* cable types */ |
216 | ATA_CBL_NONE = 0, | 240 | ATA_CBL_NONE = 0, |
217 | ATA_CBL_PATA40 = 1, | 241 | ATA_CBL_PATA40 = 1, |
@@ -418,4 +442,9 @@ static inline int lba_48_ok(u64 block, u32 n_block) | |||
418 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); | 442 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); |
419 | } | 443 | } |
420 | 444 | ||
445 | #define sata_pmp_gscr_vendor(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff) | ||
446 | #define sata_pmp_gscr_devid(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] >> 16) | ||
447 | #define sata_pmp_gscr_rev(gscr) (((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff) | ||
448 | #define sata_pmp_gscr_ports(gscr) ((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf) | ||
449 | |||
421 | #endif /* __LINUX_ATA_H__ */ | 450 | #endif /* __LINUX_ATA_H__ */ |
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index 93bfb0beb62a..8ff274933948 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/klist.h> | 14 | #include <linux/klist.h> |
15 | #include <linux/spinlock.h> | ||
16 | 15 | ||
17 | struct attribute_container { | 16 | struct attribute_container { |
18 | struct list_head node; | 17 | struct list_head node; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index fccc6e50298a..8ca7ca0b47f0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -63,9 +63,12 @@ | |||
63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ | 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ |
64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ | 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ |
65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ | 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ |
66 | #define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ | ||
67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | ||
66 | 68 | ||
67 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
68 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
71 | #define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */ | ||
69 | #define AUDIT_LAST_USER_MSG 1199 | 72 | #define AUDIT_LAST_USER_MSG 1199 |
70 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ | 73 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ |
71 | #define AUDIT_LAST_USER_MSG2 2999 | 74 | #define AUDIT_LAST_USER_MSG2 2999 |
@@ -92,6 +95,7 @@ | |||
92 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 95 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
93 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | 96 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ |
94 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ | 97 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ |
98 | #define AUDIT_TTY 1319 /* Input on an administrative TTY */ | ||
95 | 99 | ||
96 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 100 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
97 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 101 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -289,6 +293,10 @@ struct audit_status { | |||
289 | __u32 backlog; /* messages waiting in queue */ | 293 | __u32 backlog; /* messages waiting in queue */ |
290 | }; | 294 | }; |
291 | 295 | ||
296 | struct audit_tty_status { | ||
297 | __u32 enabled; /* 1 = enabled, 0 = disabled */ | ||
298 | }; | ||
299 | |||
292 | /* audit_rule_data supports filter rules with both integer and string | 300 | /* audit_rule_data supports filter rules with both integer and string |
293 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and | 301 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and |
294 | * AUDIT_LIST_RULES requests. | 302 | * AUDIT_LIST_RULES requests. |
@@ -515,11 +523,13 @@ extern void audit_log_d_path(struct audit_buffer *ab, | |||
515 | const char *prefix, | 523 | const char *prefix, |
516 | struct dentry *dentry, | 524 | struct dentry *dentry, |
517 | struct vfsmount *vfsmnt); | 525 | struct vfsmount *vfsmnt); |
526 | extern void audit_log_lost(const char *message); | ||
518 | /* Private API (for audit.c only) */ | 527 | /* Private API (for audit.c only) */ |
519 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 528 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); |
520 | extern int audit_filter_type(int type); | 529 | extern int audit_filter_type(int type); |
521 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 530 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
522 | void *data, size_t datasz, uid_t loginuid, u32 sid); | 531 | void *data, size_t datasz, uid_t loginuid, u32 sid); |
532 | extern int audit_enabled; | ||
523 | #else | 533 | #else |
524 | #define audit_log(c,g,t,f,...) do { ; } while (0) | 534 | #define audit_log(c,g,t,f,...) do { ; } while (0) |
525 | #define audit_log_start(c,g,t) ({ NULL; }) | 535 | #define audit_log_start(c,g,t) ({ NULL; }) |
@@ -530,6 +540,7 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq, | |||
530 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 540 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
531 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 541 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
532 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 542 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) |
543 | #define audit_enabled 0 | ||
533 | #endif | 544 | #endif |
534 | #endif | 545 | #endif |
535 | #endif | 546 | #endif |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index f2542c24b328..7011d6255593 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -93,7 +93,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); |
94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | 94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); |
95 | long congestion_wait(int rw, long timeout); | 95 | long congestion_wait(int rw, long timeout); |
96 | long congestion_wait_interruptible(int rw, long timeout); | ||
97 | void congestion_end(int rw); | 96 | void congestion_end(int rw); |
98 | 97 | ||
99 | #define bdi_cap_writeback_dirty(bdi) \ | 98 | #define bdi_cap_writeback_dirty(bdi) \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index fae138bd2207..b32564a1e105 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/bio.h> | 14 | #include <linux/bio.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
17 | #include <linux/bsg.h> | ||
17 | 18 | ||
18 | #include <asm/scatterlist.h> | 19 | #include <asm/scatterlist.h> |
19 | 20 | ||
@@ -41,6 +42,8 @@ struct elevator_queue; | |||
41 | typedef struct elevator_queue elevator_t; | 42 | typedef struct elevator_queue elevator_t; |
42 | struct request_pm_state; | 43 | struct request_pm_state; |
43 | struct blk_trace; | 44 | struct blk_trace; |
45 | struct request; | ||
46 | struct sg_io_hdr; | ||
44 | 47 | ||
45 | #define BLKDEV_MIN_RQ 4 | 48 | #define BLKDEV_MIN_RQ 4 |
46 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ | 49 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ |
@@ -314,6 +317,9 @@ struct request { | |||
314 | */ | 317 | */ |
315 | rq_end_io_fn *end_io; | 318 | rq_end_io_fn *end_io; |
316 | void *end_io_data; | 319 | void *end_io_data; |
320 | |||
321 | /* for bidi */ | ||
322 | struct request *next_rq; | ||
317 | }; | 323 | }; |
318 | 324 | ||
319 | /* | 325 | /* |
@@ -468,6 +474,10 @@ struct request_queue | |||
468 | unsigned int bi_size; | 474 | unsigned int bi_size; |
469 | 475 | ||
470 | struct mutex sysfs_lock; | 476 | struct mutex sysfs_lock; |
477 | |||
478 | #if defined(CONFIG_BLK_DEV_BSG) | ||
479 | struct bsg_class_device bsg_dev; | ||
480 | #endif | ||
471 | }; | 481 | }; |
472 | 482 | ||
473 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
@@ -479,6 +489,7 @@ struct request_queue | |||
479 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ |
480 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ |
481 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ | 491 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ |
492 | #define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */ | ||
482 | 493 | ||
483 | enum { | 494 | enum { |
484 | /* | 495 | /* |
@@ -543,6 +554,7 @@ enum { | |||
543 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) | 554 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) |
544 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) | 555 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) |
545 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) | 556 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) |
557 | #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) | ||
546 | 558 | ||
547 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) | 559 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) |
548 | 560 | ||
@@ -607,6 +619,11 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; | |||
607 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) | 619 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) |
608 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) | 620 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) |
609 | 621 | ||
622 | /* | ||
623 | * default timeout for SG_IO if none specified | ||
624 | */ | ||
625 | #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) | ||
626 | |||
610 | #ifdef CONFIG_MMU | 627 | #ifdef CONFIG_MMU |
611 | extern int init_emergency_isa_pool(void); | 628 | extern int init_emergency_isa_pool(void); |
612 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); | 629 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); |
@@ -637,7 +654,8 @@ extern void blk_requeue_request(request_queue_t *, struct request *); | |||
637 | extern void blk_plug_device(request_queue_t *); | 654 | extern void blk_plug_device(request_queue_t *); |
638 | extern int blk_remove_plug(request_queue_t *); | 655 | extern int blk_remove_plug(request_queue_t *); |
639 | extern void blk_recount_segments(request_queue_t *, struct bio *); | 656 | extern void blk_recount_segments(request_queue_t *, struct bio *); |
640 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); | 657 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, |
658 | struct gendisk *, unsigned int, void __user *); | ||
641 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 659 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, |
642 | struct gendisk *, struct scsi_ioctl_command __user *); | 660 | struct gendisk *, struct scsi_ioctl_command __user *); |
643 | 661 | ||
@@ -680,6 +698,12 @@ extern int blk_execute_rq(request_queue_t *, struct gendisk *, | |||
680 | struct request *, int); | 698 | struct request *, int); |
681 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
682 | struct request *, int, rq_end_io_fn *); | 700 | struct request *, int, rq_end_io_fn *); |
701 | extern int blk_fill_sghdr_rq(request_queue_t *, struct request *, | ||
702 | struct sg_io_hdr *, int); | ||
703 | extern int blk_unmap_sghdr_rq(struct request *, struct sg_io_hdr *); | ||
704 | extern int blk_complete_sghdr_rq(struct request *, struct sg_io_hdr *, | ||
705 | struct bio *); | ||
706 | extern int blk_verify_command(unsigned char *, int); | ||
683 | 707 | ||
684 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 708 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |
685 | { | 709 | { |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h new file mode 100644 index 000000000000..bd998ca6cb2e --- /dev/null +++ b/include/linux/bsg.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef BSG_H | ||
2 | #define BSG_H | ||
3 | |||
4 | #define BSG_PROTOCOL_SCSI 0 | ||
5 | |||
6 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 | ||
7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | ||
8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | ||
9 | |||
10 | struct sg_io_v4 { | ||
11 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | ||
12 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | ||
13 | __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task | ||
14 | management function, .... */ | ||
15 | |||
16 | __u32 request_len; /* [i] in bytes */ | ||
17 | __u64 request; /* [i], [*i] {SCSI: cdb} */ | ||
18 | __u32 request_attr; /* [i] {SCSI: task attribute} */ | ||
19 | __u32 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ | ||
20 | __u32 request_priority; /* [i] {SCSI: task priority} */ | ||
21 | __u32 max_response_len; /* [i] in bytes */ | ||
22 | __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ | ||
23 | |||
24 | /* "din_" for data in (from device); "dout_" for data out (to device) */ | ||
25 | __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ | ||
26 | __u32 din_xfer_len; /* [i] bytes to be transferred from device */ | ||
27 | __u64 dout_xferp; /* [i], [*i] */ | ||
28 | __u64 din_xferp; /* [i], [*o] */ | ||
29 | |||
30 | __u32 timeout; /* [i] units: millisecond */ | ||
31 | __u32 flags; /* [i] bit mask */ | ||
32 | __u64 usr_ptr; /* [i->o] unused internally */ | ||
33 | __u32 spare_in; /* [i] */ | ||
34 | |||
35 | __u32 driver_status; /* [o] 0 -> ok */ | ||
36 | __u32 transport_status; /* [o] 0 -> ok */ | ||
37 | __u32 device_status; /* [o] {SCSI: command completion status} */ | ||
38 | __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ | ||
39 | __u32 info; /* [o] additional information */ | ||
40 | __u32 duration; /* [o] time to complete, in milliseconds */ | ||
41 | __u32 response_len; /* [o] bytes of response actually written */ | ||
42 | __s32 din_resid; /* [o] actual_din_xfer_len - din_xfer_len */ | ||
43 | __u32 generated_tag; /* [o] {SCSI: task tag that transport chose} */ | ||
44 | __u32 spare_out; /* [o] */ | ||
45 | |||
46 | __u32 padding; | ||
47 | }; | ||
48 | |||
49 | #ifdef __KERNEL__ | ||
50 | |||
51 | #if defined(CONFIG_BLK_DEV_BSG) | ||
52 | struct bsg_class_device { | ||
53 | struct class_device *class_dev; | ||
54 | struct device *dev; | ||
55 | int minor; | ||
56 | struct list_head list; | ||
57 | struct request_queue *queue; | ||
58 | }; | ||
59 | |||
60 | extern int bsg_register_queue(struct request_queue *, const char *); | ||
61 | extern void bsg_unregister_queue(struct request_queue *); | ||
62 | #else | ||
63 | struct bsg_class_device { }; | ||
64 | #define bsg_register_queue(disk, name) (0) | ||
65 | #define bsg_unregister_queue(disk) do { } while (0) | ||
66 | #endif | ||
67 | |||
68 | #endif /* __KERNEL__ */ | ||
69 | |||
70 | #endif | ||
diff --git a/include/linux/bug.h b/include/linux/bug.h index 42aa0a54b6f4..54398d2c6d8d 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
@@ -10,6 +10,8 @@ enum bug_trap_type { | |||
10 | BUG_TRAP_TYPE_BUG = 2, | 10 | BUG_TRAP_TYPE_BUG = 2, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | struct pt_regs; | ||
14 | |||
13 | #ifdef CONFIG_GENERIC_BUG | 15 | #ifdef CONFIG_GENERIC_BUG |
14 | #include <asm-generic/bug.h> | 16 | #include <asm-generic/bug.h> |
15 | 17 | ||
@@ -20,7 +22,7 @@ static inline int is_warning_bug(const struct bug_entry *bug) | |||
20 | 22 | ||
21 | const struct bug_entry *find_bug(unsigned long bugaddr); | 23 | const struct bug_entry *find_bug(unsigned long bugaddr); |
22 | 24 | ||
23 | enum bug_trap_type report_bug(unsigned long bug_addr); | 25 | enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs); |
24 | 26 | ||
25 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 27 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
26 | struct module *); | 28 | struct module *); |
@@ -31,7 +33,8 @@ int is_valid_bugaddr(unsigned long addr); | |||
31 | 33 | ||
32 | #else /* !CONFIG_GENERIC_BUG */ | 34 | #else /* !CONFIG_GENERIC_BUG */ |
33 | 35 | ||
34 | static inline enum bug_trap_type report_bug(unsigned long bug_addr) | 36 | static inline enum bug_trap_type report_bug(unsigned long bug_addr, |
37 | struct pt_regs *regs) | ||
35 | { | 38 | { |
36 | return BUG_TRAP_TYPE_BUG; | 39 | return BUG_TRAP_TYPE_BUG; |
37 | } | 40 | } |
diff --git a/include/linux/capability.h b/include/linux/capability.h index bbf8df7de28f..2dfa58555934 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -44,7 +44,6 @@ typedef struct __user_cap_data_struct { | |||
44 | 44 | ||
45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
46 | 46 | ||
47 | #include <linux/spinlock.h> | ||
48 | #include <asm/current.h> | 47 | #include <asm/current.h> |
49 | 48 | ||
50 | /* #define STRICT_CAP_T_TYPECHECKS */ | 49 | /* #define STRICT_CAP_T_TYPECHECKS */ |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index f50f04bdbc16..2b641b176e7f 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -414,8 +414,8 @@ struct cdrom_generic_command | |||
414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ | 414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ |
415 | 415 | ||
416 | /* Special codes used when specifying changer slots. */ | 416 | /* Special codes used when specifying changer slots. */ |
417 | #define CDSL_NONE ((int) (~0U>>1)-1) | 417 | #define CDSL_NONE (INT_MAX-1) |
418 | #define CDSL_CURRENT ((int) (~0U>>1)) | 418 | #define CDSL_CURRENT INT_MAX |
419 | 419 | ||
420 | /* For partition based multisession access. IDE can handle 64 partitions | 420 | /* For partition based multisession access. IDE can handle 64 partitions |
421 | * per drive - SCSI CD-ROM's use minors to differentiate between the | 421 | * per drive - SCSI CD-ROM's use minors to differentiate between the |
diff --git a/include/linux/cobalt-nvram.h b/include/linux/cobalt-nvram.h deleted file mode 100644 index ea429562ff36..000000000000 --- a/include/linux/cobalt-nvram.h +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * $Id: cobalt-nvram.h,v 1.20 2001/10/17 23:16:55 thockin Exp $ | ||
3 | * cobalt-nvram.h : defines for the various fields in the cobalt NVRAM | ||
4 | * | ||
5 | * Copyright 2001,2002 Sun Microsystems, Inc. | ||
6 | */ | ||
7 | |||
8 | #ifndef COBALT_NVRAM_H | ||
9 | #define COBALT_NVRAM_H | ||
10 | |||
11 | #include <linux/nvram.h> | ||
12 | |||
13 | #define COBT_CMOS_INFO_MAX 0x7f /* top address allowed */ | ||
14 | #define COBT_CMOS_BIOS_DRIVE_INFO 0x12 /* drive info would go here */ | ||
15 | |||
16 | #define COBT_CMOS_CKS_START NVRAM_OFFSET(0x0e) | ||
17 | #define COBT_CMOS_CKS_END NVRAM_OFFSET(0x7f) | ||
18 | |||
19 | /* flag bytes - 16 flags for now, leave room for more */ | ||
20 | #define COBT_CMOS_FLAG_BYTE_0 NVRAM_OFFSET(0x10) | ||
21 | #define COBT_CMOS_FLAG_BYTE_1 NVRAM_OFFSET(0x11) | ||
22 | |||
23 | /* flags in flag bytes - up to 16 */ | ||
24 | #define COBT_CMOS_FLAG_MIN 0x0001 | ||
25 | #define COBT_CMOS_CONSOLE_FLAG 0x0001 /* console on/off */ | ||
26 | #define COBT_CMOS_DEBUG_FLAG 0x0002 /* ROM debug messages */ | ||
27 | #define COBT_CMOS_AUTO_PROMPT_FLAG 0x0004 /* boot to ROM prompt? */ | ||
28 | #define COBT_CMOS_CLEAN_BOOT_FLAG 0x0008 /* set by a clean shutdown */ | ||
29 | #define COBT_CMOS_HW_NOPROBE_FLAG 0x0010 /* go easy on the probing */ | ||
30 | #define COBT_CMOS_SYSFAULT_FLAG 0x0020 /* system fault detected */ | ||
31 | #define COBT_CMOS_OOPSPANIC_FLAG 0x0040 /* panic on oops */ | ||
32 | #define COBT_CMOS_DELAY_CACHE_FLAG 0x0080 /* delay cache initialization */ | ||
33 | #define COBT_CMOS_NOLOGO_FLAG 0x0100 /* hide "C" logo @ boot */ | ||
34 | #define COBT_CMOS_VERSION_FLAG 0x0200 /* the version field is valid */ | ||
35 | #define COBT_CMOS_FLAG_MAX 0x0200 | ||
36 | |||
37 | /* leave byte 0x12 blank - Linux looks for drive info here */ | ||
38 | |||
39 | /* CMOS structure version, valid if COBT_CMOS_VERSION_FLAG is true */ | ||
40 | #define COBT_CMOS_VERSION NVRAM_OFFSET(0x13) | ||
41 | #define COBT_CMOS_VER_BTOCODE 1 /* min. version needed for btocode */ | ||
42 | |||
43 | /* index of default boot method */ | ||
44 | #define COBT_CMOS_BOOT_METHOD NVRAM_OFFSET(0x20) | ||
45 | #define COBT_CMOS_BOOT_METHOD_DISK 0 | ||
46 | #define COBT_CMOS_BOOT_METHOD_ROM 1 | ||
47 | #define COBT_CMOS_BOOT_METHOD_NET 2 | ||
48 | |||
49 | #define COBT_CMOS_BOOT_DEV_MIN NVRAM_OFFSET(0x21) | ||
50 | /* major #, minor # of first through fourth boot device */ | ||
51 | #define COBT_CMOS_BOOT_DEV0_MAJ NVRAM_OFFSET(0x21) | ||
52 | #define COBT_CMOS_BOOT_DEV0_MIN NVRAM_OFFSET(0x22) | ||
53 | #define COBT_CMOS_BOOT_DEV1_MAJ NVRAM_OFFSET(0x23) | ||
54 | #define COBT_CMOS_BOOT_DEV1_MIN NVRAM_OFFSET(0x24) | ||
55 | #define COBT_CMOS_BOOT_DEV2_MAJ NVRAM_OFFSET(0x25) | ||
56 | #define COBT_CMOS_BOOT_DEV2_MIN NVRAM_OFFSET(0x26) | ||
57 | #define COBT_CMOS_BOOT_DEV3_MAJ NVRAM_OFFSET(0x27) | ||
58 | #define COBT_CMOS_BOOT_DEV3_MIN NVRAM_OFFSET(0x28) | ||
59 | #define COBT_CMOS_BOOT_DEV_MAX NVRAM_OFFSET(0x28) | ||
60 | |||
61 | /* checksum of bytes 0xe-0x7f */ | ||
62 | #define COBT_CMOS_CHECKSUM NVRAM_OFFSET(0x2e) | ||
63 | |||
64 | /* running uptime counter, units of 5 minutes (32 bits =~ 41000 years) */ | ||
65 | #define COBT_CMOS_UPTIME_0 NVRAM_OFFSET(0x30) | ||
66 | #define COBT_CMOS_UPTIME_1 NVRAM_OFFSET(0x31) | ||
67 | #define COBT_CMOS_UPTIME_2 NVRAM_OFFSET(0x32) | ||
68 | #define COBT_CMOS_UPTIME_3 NVRAM_OFFSET(0x33) | ||
69 | |||
70 | /* count of successful boots (32 bits) */ | ||
71 | #define COBT_CMOS_BOOTCOUNT_0 NVRAM_OFFSET(0x38) | ||
72 | #define COBT_CMOS_BOOTCOUNT_1 NVRAM_OFFSET(0x39) | ||
73 | #define COBT_CMOS_BOOTCOUNT_2 NVRAM_OFFSET(0x3a) | ||
74 | #define COBT_CMOS_BOOTCOUNT_3 NVRAM_OFFSET(0x3b) | ||
75 | |||
76 | /* 13 bytes: system serial number, same as on the back of the system */ | ||
77 | #define COBT_CMOS_SYS_SERNUM_LEN 13 | ||
78 | #define COBT_CMOS_SYS_SERNUM_0 NVRAM_OFFSET(0x40) | ||
79 | #define COBT_CMOS_SYS_SERNUM_1 NVRAM_OFFSET(0x41) | ||
80 | #define COBT_CMOS_SYS_SERNUM_2 NVRAM_OFFSET(0x42) | ||
81 | #define COBT_CMOS_SYS_SERNUM_3 NVRAM_OFFSET(0x43) | ||
82 | #define COBT_CMOS_SYS_SERNUM_4 NVRAM_OFFSET(0x44) | ||
83 | #define COBT_CMOS_SYS_SERNUM_5 NVRAM_OFFSET(0x45) | ||
84 | #define COBT_CMOS_SYS_SERNUM_6 NVRAM_OFFSET(0x46) | ||
85 | #define COBT_CMOS_SYS_SERNUM_7 NVRAM_OFFSET(0x47) | ||
86 | #define COBT_CMOS_SYS_SERNUM_8 NVRAM_OFFSET(0x48) | ||
87 | #define COBT_CMOS_SYS_SERNUM_9 NVRAM_OFFSET(0x49) | ||
88 | #define COBT_CMOS_SYS_SERNUM_10 NVRAM_OFFSET(0x4a) | ||
89 | #define COBT_CMOS_SYS_SERNUM_11 NVRAM_OFFSET(0x4b) | ||
90 | #define COBT_CMOS_SYS_SERNUM_12 NVRAM_OFFSET(0x4c) | ||
91 | /* checksum for serial num - 1 byte */ | ||
92 | #define COBT_CMOS_SYS_SERNUM_CSUM NVRAM_OFFSET(0x4f) | ||
93 | |||
94 | #define COBT_CMOS_ROM_REV_MAJ NVRAM_OFFSET(0x50) | ||
95 | #define COBT_CMOS_ROM_REV_MIN NVRAM_OFFSET(0x51) | ||
96 | #define COBT_CMOS_ROM_REV_REV NVRAM_OFFSET(0x52) | ||
97 | |||
98 | #define COBT_CMOS_BTO_CODE_0 NVRAM_OFFSET(0x53) | ||
99 | #define COBT_CMOS_BTO_CODE_1 NVRAM_OFFSET(0x54) | ||
100 | #define COBT_CMOS_BTO_CODE_2 NVRAM_OFFSET(0x55) | ||
101 | #define COBT_CMOS_BTO_CODE_3 NVRAM_OFFSET(0x56) | ||
102 | |||
103 | #define COBT_CMOS_BTO_IP_CSUM NVRAM_OFFSET(0x57) | ||
104 | #define COBT_CMOS_BTO_IP_0 NVRAM_OFFSET(0x58) | ||
105 | #define COBT_CMOS_BTO_IP_1 NVRAM_OFFSET(0x59) | ||
106 | #define COBT_CMOS_BTO_IP_2 NVRAM_OFFSET(0x5a) | ||
107 | #define COBT_CMOS_BTO_IP_3 NVRAM_OFFSET(0x5b) | ||
108 | |||
109 | #endif /* COBALT_NVRAM_H */ | ||
diff --git a/include/linux/console.h b/include/linux/console.h index 62ef6e11d0d2..56a7bcda49cb 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #define _LINUX_CONSOLE_H_ 1 | 15 | #define _LINUX_CONSOLE_H_ 1 |
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/spinlock.h> | ||
19 | 18 | ||
20 | struct vc_data; | 19 | struct vc_data; |
21 | struct console_font_op; | 20 | struct console_font_op; |
@@ -99,6 +98,7 @@ struct console { | |||
99 | struct tty_driver *(*device)(struct console *, int *); | 98 | struct tty_driver *(*device)(struct console *, int *); |
100 | void (*unblank)(void); | 99 | void (*unblank)(void); |
101 | int (*setup)(struct console *, char *); | 100 | int (*setup)(struct console *, char *); |
101 | int (*early_setup)(void); | ||
102 | short flags; | 102 | short flags; |
103 | short index; | 103 | short index; |
104 | int cflag; | 104 | int cflag; |
@@ -107,6 +107,7 @@ struct console { | |||
107 | }; | 107 | }; |
108 | 108 | ||
109 | extern int add_preferred_console(char *name, int idx, char *options); | 109 | extern int add_preferred_console(char *name, int idx, char *options); |
110 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | ||
110 | extern void register_console(struct console *); | 111 | extern void register_console(struct console *); |
111 | extern int unregister_console(struct console *); | 112 | extern int unregister_console(struct console *); |
112 | extern struct console *console_drivers; | 113 | extern struct console *console_drivers; |
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index 82c9a1f11020..06b2768c603f 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h | |||
@@ -8,9 +8,12 @@ | |||
8 | #define IBMPC_MAP 2 | 8 | #define IBMPC_MAP 2 |
9 | #define USER_MAP 3 | 9 | #define USER_MAP 3 |
10 | 10 | ||
11 | #include <linux/types.h> | ||
12 | |||
11 | struct vc_data; | 13 | struct vc_data; |
12 | 14 | ||
13 | extern unsigned char inverse_translate(struct vc_data *conp, int glyph); | 15 | extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); |
14 | extern unsigned short *set_translate(int m, struct vc_data *vc); | 16 | extern unsigned short *set_translate(int m, struct vc_data *vc); |
15 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); | 17 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); |
18 | extern u32 conv_8bit_to_uni(unsigned char c); | ||
16 | void console_map_init(void); | 19 | void console_map_init(void); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 3b2df2523f1d..c2236bbff412 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -120,7 +120,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
120 | 120 | ||
121 | #define lock_cpu_hotplug() do { } while (0) | 121 | #define lock_cpu_hotplug() do { } while (0) |
122 | #define unlock_cpu_hotplug() do { } while (0) | 122 | #define unlock_cpu_hotplug() do { } while (0) |
123 | #define lock_cpu_hotplug_interruptible() 0 | ||
124 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 123 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
125 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 124 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
126 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 125 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0de7e2ace822..357e8cfedc37 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -295,28 +295,8 @@ struct blkcipher_tfm { | |||
295 | }; | 295 | }; |
296 | 296 | ||
297 | struct cipher_tfm { | 297 | struct cipher_tfm { |
298 | void *cit_iv; | ||
299 | unsigned int cit_ivsize; | ||
300 | u32 cit_mode; | ||
301 | int (*cit_setkey)(struct crypto_tfm *tfm, | 298 | int (*cit_setkey)(struct crypto_tfm *tfm, |
302 | const u8 *key, unsigned int keylen); | 299 | const u8 *key, unsigned int keylen); |
303 | int (*cit_encrypt)(struct crypto_tfm *tfm, | ||
304 | struct scatterlist *dst, | ||
305 | struct scatterlist *src, | ||
306 | unsigned int nbytes); | ||
307 | int (*cit_encrypt_iv)(struct crypto_tfm *tfm, | ||
308 | struct scatterlist *dst, | ||
309 | struct scatterlist *src, | ||
310 | unsigned int nbytes, u8 *iv); | ||
311 | int (*cit_decrypt)(struct crypto_tfm *tfm, | ||
312 | struct scatterlist *dst, | ||
313 | struct scatterlist *src, | ||
314 | unsigned int nbytes); | ||
315 | int (*cit_decrypt_iv)(struct crypto_tfm *tfm, | ||
316 | struct scatterlist *dst, | ||
317 | struct scatterlist *src, | ||
318 | unsigned int nbytes, u8 *iv); | ||
319 | void (*cit_xor_block)(u8 *dst, const u8 *src); | ||
320 | void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 300 | void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
321 | void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 301 | void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
322 | }; | 302 | }; |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 5a9c49534d08..104e51e20e14 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -38,6 +38,9 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | |||
38 | 38 | ||
39 | void debugfs_remove(struct dentry *dentry); | 39 | void debugfs_remove(struct dentry *dentry); |
40 | 40 | ||
41 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
42 | struct dentry *new_dir, const char *new_name); | ||
43 | |||
41 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 44 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
42 | struct dentry *parent, u8 *value); | 45 | struct dentry *parent, u8 *value); |
43 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 46 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, |
@@ -85,6 +88,12 @@ static inline struct dentry *debugfs_create_symlink(const char *name, | |||
85 | static inline void debugfs_remove(struct dentry *dentry) | 88 | static inline void debugfs_remove(struct dentry *dentry) |
86 | { } | 89 | { } |
87 | 90 | ||
91 | static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
92 | struct dentry *new_dir, char *new_name) | ||
93 | { | ||
94 | return ERR_PTR(-ENODEV); | ||
95 | } | ||
96 | |||
88 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 97 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
89 | struct dentry *parent, | 98 | struct dentry *parent, |
90 | u8 *value) | 99 | u8 *value) |
diff --git a/include/linux/device.h b/include/linux/device.h index 2e1a2988b7e1..be2debed70d2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -238,7 +238,6 @@ extern int __must_check class_device_create_file(struct class_device *, | |||
238 | * @devt: for internal use by the driver core only. | 238 | * @devt: for internal use by the driver core only. |
239 | * @node: for internal use by the driver core only. | 239 | * @node: for internal use by the driver core only. |
240 | * @kobj: for internal use by the driver core only. | 240 | * @kobj: for internal use by the driver core only. |
241 | * @devt_attr: for internal use by the driver core only. | ||
242 | * @groups: optional additional groups to be created | 241 | * @groups: optional additional groups to be created |
243 | * @dev: if set, a symlink to the struct device is created in the sysfs | 242 | * @dev: if set, a symlink to the struct device is created in the sysfs |
244 | * directory for this struct class device. | 243 | * directory for this struct class device. |
@@ -263,8 +262,6 @@ struct class_device { | |||
263 | struct kobject kobj; | 262 | struct kobject kobj; |
264 | struct class * class; /* required */ | 263 | struct class * class; /* required */ |
265 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 264 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
266 | struct class_device_attribute *devt_attr; | ||
267 | struct class_device_attribute uevent_attr; | ||
268 | struct device * dev; /* not necessary, but nice to have */ | 265 | struct device * dev; /* not necessary, but nice to have */ |
269 | void * class_data; /* class-specific data */ | 266 | void * class_data; /* class-specific data */ |
270 | struct class_device *parent; /* parent of this child device, if there is one */ | 267 | struct class_device *parent; /* parent of this child device, if there is one */ |
@@ -419,8 +416,6 @@ struct device { | |||
419 | struct device_type *type; | 416 | struct device_type *type; |
420 | unsigned is_registered:1; | 417 | unsigned is_registered:1; |
421 | unsigned uevent_suppress:1; | 418 | unsigned uevent_suppress:1; |
422 | struct device_attribute uevent_attr; | ||
423 | struct device_attribute *devt_attr; | ||
424 | 419 | ||
425 | struct semaphore sem; /* semaphore to synchronize calls to | 420 | struct semaphore sem; /* semaphore to synchronize calls to |
426 | * its driver. | 421 | * its driver. |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9a663c6db16a..2dc21cbeb304 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -31,7 +31,11 @@ static inline int valid_dma_direction(int dma_direction) | |||
31 | (dma_direction == DMA_FROM_DEVICE)); | 31 | (dma_direction == DMA_FROM_DEVICE)); |
32 | } | 32 | } |
33 | 33 | ||
34 | #ifdef CONFIG_HAS_DMA | ||
34 | #include <asm/dma-mapping.h> | 35 | #include <asm/dma-mapping.h> |
36 | #else | ||
37 | #include <asm-generic/dma-mapping-broken.h> | ||
38 | #endif | ||
35 | 39 | ||
36 | /* Backwards compat, remove in 2.7.x */ | 40 | /* Backwards compat, remove in 2.7.x */ |
37 | #define dma_sync_single dma_sync_single_for_cpu | 41 | #define dma_sync_single dma_sync_single_for_cpu |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c94d8f1d62e5..a3b6035b6c86 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -21,29 +21,40 @@ | |||
21 | #ifndef DMAENGINE_H | 21 | #ifndef DMAENGINE_H |
22 | #define DMAENGINE_H | 22 | #define DMAENGINE_H |
23 | 23 | ||
24 | #ifdef CONFIG_DMA_ENGINE | ||
25 | |||
26 | #include <linux/device.h> | 24 | #include <linux/device.h> |
27 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
28 | #include <linux/kref.h> | 26 | #include <linux/kref.h> |
29 | #include <linux/completion.h> | 27 | #include <linux/completion.h> |
30 | #include <linux/rcupdate.h> | 28 | #include <linux/rcupdate.h> |
29 | #include <linux/dma-mapping.h> | ||
31 | 30 | ||
32 | /** | 31 | /** |
33 | * enum dma_event - resource PNP/power managment events | 32 | * enum dma_state - resource PNP/power managment state |
34 | * @DMA_RESOURCE_SUSPEND: DMA device going into low power state | 33 | * @DMA_RESOURCE_SUSPEND: DMA device going into low power state |
35 | * @DMA_RESOURCE_RESUME: DMA device returning to full power | 34 | * @DMA_RESOURCE_RESUME: DMA device returning to full power |
36 | * @DMA_RESOURCE_ADDED: DMA device added to the system | 35 | * @DMA_RESOURCE_AVAILABLE: DMA device available to the system |
37 | * @DMA_RESOURCE_REMOVED: DMA device removed from the system | 36 | * @DMA_RESOURCE_REMOVED: DMA device removed from the system |
38 | */ | 37 | */ |
39 | enum dma_event { | 38 | enum dma_state { |
40 | DMA_RESOURCE_SUSPEND, | 39 | DMA_RESOURCE_SUSPEND, |
41 | DMA_RESOURCE_RESUME, | 40 | DMA_RESOURCE_RESUME, |
42 | DMA_RESOURCE_ADDED, | 41 | DMA_RESOURCE_AVAILABLE, |
43 | DMA_RESOURCE_REMOVED, | 42 | DMA_RESOURCE_REMOVED, |
44 | }; | 43 | }; |
45 | 44 | ||
46 | /** | 45 | /** |
46 | * enum dma_state_client - state of the channel in the client | ||
47 | * @DMA_ACK: client would like to use, or was using this channel | ||
48 | * @DMA_DUP: client has already seen this channel, or is not using this channel | ||
49 | * @DMA_NAK: client does not want to see any more channels | ||
50 | */ | ||
51 | enum dma_state_client { | ||
52 | DMA_ACK, | ||
53 | DMA_DUP, | ||
54 | DMA_NAK, | ||
55 | }; | ||
56 | |||
57 | /** | ||
47 | * typedef dma_cookie_t - an opaque DMA cookie | 58 | * typedef dma_cookie_t - an opaque DMA cookie |
48 | * | 59 | * |
49 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code | 60 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code |
@@ -65,6 +76,31 @@ enum dma_status { | |||
65 | }; | 76 | }; |
66 | 77 | ||
67 | /** | 78 | /** |
79 | * enum dma_transaction_type - DMA transaction types/indexes | ||
80 | */ | ||
81 | enum dma_transaction_type { | ||
82 | DMA_MEMCPY, | ||
83 | DMA_XOR, | ||
84 | DMA_PQ_XOR, | ||
85 | DMA_DUAL_XOR, | ||
86 | DMA_PQ_UPDATE, | ||
87 | DMA_ZERO_SUM, | ||
88 | DMA_PQ_ZERO_SUM, | ||
89 | DMA_MEMSET, | ||
90 | DMA_MEMCPY_CRC32C, | ||
91 | DMA_INTERRUPT, | ||
92 | }; | ||
93 | |||
94 | /* last transaction type for creation of the capabilities mask */ | ||
95 | #define DMA_TX_TYPE_END (DMA_INTERRUPT + 1) | ||
96 | |||
97 | /** | ||
98 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. | ||
99 | * See linux/cpumask.h | ||
100 | */ | ||
101 | typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; | ||
102 | |||
103 | /** | ||
68 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan | 104 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan |
69 | * @refcount: local_t used for open-coded "bigref" counting | 105 | * @refcount: local_t used for open-coded "bigref" counting |
70 | * @memcpy_count: transaction counter | 106 | * @memcpy_count: transaction counter |
@@ -80,7 +116,6 @@ struct dma_chan_percpu { | |||
80 | 116 | ||
81 | /** | 117 | /** |
82 | * struct dma_chan - devices supply DMA channels, clients use them | 118 | * struct dma_chan - devices supply DMA channels, clients use them |
83 | * @client: ptr to the client user of this chan, will be %NULL when unused | ||
84 | * @device: ptr to the dma device who supplies this channel, always !%NULL | 119 | * @device: ptr to the dma device who supplies this channel, always !%NULL |
85 | * @cookie: last cookie value returned to client | 120 | * @cookie: last cookie value returned to client |
86 | * @chan_id: channel ID for sysfs | 121 | * @chan_id: channel ID for sysfs |
@@ -88,12 +123,10 @@ struct dma_chan_percpu { | |||
88 | * @refcount: kref, used in "bigref" slow-mode | 123 | * @refcount: kref, used in "bigref" slow-mode |
89 | * @slow_ref: indicates that the DMA channel is free | 124 | * @slow_ref: indicates that the DMA channel is free |
90 | * @rcu: the DMA channel's RCU head | 125 | * @rcu: the DMA channel's RCU head |
91 | * @client_node: used to add this to the client chan list | ||
92 | * @device_node: used to add this to the device chan list | 126 | * @device_node: used to add this to the device chan list |
93 | * @local: per-cpu pointer to a struct dma_chan_percpu | 127 | * @local: per-cpu pointer to a struct dma_chan_percpu |
94 | */ | 128 | */ |
95 | struct dma_chan { | 129 | struct dma_chan { |
96 | struct dma_client *client; | ||
97 | struct dma_device *device; | 130 | struct dma_device *device; |
98 | dma_cookie_t cookie; | 131 | dma_cookie_t cookie; |
99 | 132 | ||
@@ -105,11 +138,11 @@ struct dma_chan { | |||
105 | int slow_ref; | 138 | int slow_ref; |
106 | struct rcu_head rcu; | 139 | struct rcu_head rcu; |
107 | 140 | ||
108 | struct list_head client_node; | ||
109 | struct list_head device_node; | 141 | struct list_head device_node; |
110 | struct dma_chan_percpu *local; | 142 | struct dma_chan_percpu *local; |
111 | }; | 143 | }; |
112 | 144 | ||
145 | |||
113 | void dma_chan_cleanup(struct kref *kref); | 146 | void dma_chan_cleanup(struct kref *kref); |
114 | 147 | ||
115 | static inline void dma_chan_get(struct dma_chan *chan) | 148 | static inline void dma_chan_get(struct dma_chan *chan) |
@@ -134,169 +167,206 @@ static inline void dma_chan_put(struct dma_chan *chan) | |||
134 | 167 | ||
135 | /* | 168 | /* |
136 | * typedef dma_event_callback - function pointer to a DMA event callback | 169 | * typedef dma_event_callback - function pointer to a DMA event callback |
170 | * For each channel added to the system this routine is called for each client. | ||
171 | * If the client would like to use the channel it returns '1' to signal (ack) | ||
172 | * the dmaengine core to take out a reference on the channel and its | ||
173 | * corresponding device. A client must not 'ack' an available channel more | ||
174 | * than once. When a channel is removed all clients are notified. If a client | ||
175 | * is using the channel it must 'ack' the removal. A client must not 'ack' a | ||
176 | * removed channel more than once. | ||
177 | * @client - 'this' pointer for the client context | ||
178 | * @chan - channel to be acted upon | ||
179 | * @state - available or removed | ||
137 | */ | 180 | */ |
138 | typedef void (*dma_event_callback) (struct dma_client *client, | 181 | struct dma_client; |
139 | struct dma_chan *chan, enum dma_event event); | 182 | typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client, |
183 | struct dma_chan *chan, enum dma_state state); | ||
140 | 184 | ||
141 | /** | 185 | /** |
142 | * struct dma_client - info on the entity making use of DMA services | 186 | * struct dma_client - info on the entity making use of DMA services |
143 | * @event_callback: func ptr to call when something happens | 187 | * @event_callback: func ptr to call when something happens |
144 | * @chan_count: number of chans allocated | 188 | * @cap_mask: only return channels that satisfy the requested capabilities |
145 | * @chans_desired: number of chans requested. Can be +/- chan_count | 189 | * a value of zero corresponds to any capability |
146 | * @lock: protects access to the channels list | ||
147 | * @channels: the list of DMA channels allocated | ||
148 | * @global_node: list_head for global dma_client_list | 190 | * @global_node: list_head for global dma_client_list |
149 | */ | 191 | */ |
150 | struct dma_client { | 192 | struct dma_client { |
151 | dma_event_callback event_callback; | 193 | dma_event_callback event_callback; |
152 | unsigned int chan_count; | 194 | dma_cap_mask_t cap_mask; |
153 | unsigned int chans_desired; | ||
154 | |||
155 | spinlock_t lock; | ||
156 | struct list_head channels; | ||
157 | struct list_head global_node; | 195 | struct list_head global_node; |
158 | }; | 196 | }; |
159 | 197 | ||
198 | typedef void (*dma_async_tx_callback)(void *dma_async_param); | ||
199 | /** | ||
200 | * struct dma_async_tx_descriptor - async transaction descriptor | ||
201 | * ---dma generic offload fields--- | ||
202 | * @cookie: tracking cookie for this transaction, set to -EBUSY if | ||
203 | * this tx is sitting on a dependency list | ||
204 | * @ack: the descriptor can not be reused until the client acknowledges | ||
205 | * receipt, i.e. has has a chance to establish any dependency chains | ||
206 | * @phys: physical address of the descriptor | ||
207 | * @tx_list: driver common field for operations that require multiple | ||
208 | * descriptors | ||
209 | * @chan: target channel for this operation | ||
210 | * @tx_submit: set the prepared descriptor(s) to be executed by the engine | ||
211 | * @tx_set_dest: set a destination address in a hardware descriptor | ||
212 | * @tx_set_src: set a source address in a hardware descriptor | ||
213 | * @callback: routine to call after this operation is complete | ||
214 | * @callback_param: general parameter to pass to the callback routine | ||
215 | * ---async_tx api specific fields--- | ||
216 | * @depend_list: at completion this list of transactions are submitted | ||
217 | * @depend_node: allow this transaction to be executed after another | ||
218 | * transaction has completed, possibly on another channel | ||
219 | * @parent: pointer to the next level up in the dependency chain | ||
220 | * @lock: protect the dependency list | ||
221 | */ | ||
222 | struct dma_async_tx_descriptor { | ||
223 | dma_cookie_t cookie; | ||
224 | int ack; | ||
225 | dma_addr_t phys; | ||
226 | struct list_head tx_list; | ||
227 | struct dma_chan *chan; | ||
228 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | ||
229 | void (*tx_set_dest)(dma_addr_t addr, | ||
230 | struct dma_async_tx_descriptor *tx, int index); | ||
231 | void (*tx_set_src)(dma_addr_t addr, | ||
232 | struct dma_async_tx_descriptor *tx, int index); | ||
233 | dma_async_tx_callback callback; | ||
234 | void *callback_param; | ||
235 | struct list_head depend_list; | ||
236 | struct list_head depend_node; | ||
237 | struct dma_async_tx_descriptor *parent; | ||
238 | spinlock_t lock; | ||
239 | }; | ||
240 | |||
160 | /** | 241 | /** |
161 | * struct dma_device - info on the entity supplying DMA services | 242 | * struct dma_device - info on the entity supplying DMA services |
162 | * @chancnt: how many DMA channels are supported | 243 | * @chancnt: how many DMA channels are supported |
163 | * @channels: the list of struct dma_chan | 244 | * @channels: the list of struct dma_chan |
164 | * @global_node: list_head for global dma_device_list | 245 | * @global_node: list_head for global dma_device_list |
246 | * @cap_mask: one or more dma_capability flags | ||
247 | * @max_xor: maximum number of xor sources, 0 if no capability | ||
165 | * @refcount: reference count | 248 | * @refcount: reference count |
166 | * @done: IO completion struct | 249 | * @done: IO completion struct |
167 | * @dev_id: unique device ID | 250 | * @dev_id: unique device ID |
251 | * @dev: struct device reference for dma mapping api | ||
168 | * @device_alloc_chan_resources: allocate resources and return the | 252 | * @device_alloc_chan_resources: allocate resources and return the |
169 | * number of allocated descriptors | 253 | * number of allocated descriptors |
170 | * @device_free_chan_resources: release DMA channel's resources | 254 | * @device_free_chan_resources: release DMA channel's resources |
171 | * @device_memcpy_buf_to_buf: memcpy buf pointer to buf pointer | 255 | * @device_prep_dma_memcpy: prepares a memcpy operation |
172 | * @device_memcpy_buf_to_pg: memcpy buf pointer to struct page | 256 | * @device_prep_dma_xor: prepares a xor operation |
173 | * @device_memcpy_pg_to_pg: memcpy struct page/offset to struct page/offset | 257 | * @device_prep_dma_zero_sum: prepares a zero_sum operation |
174 | * @device_memcpy_complete: poll the status of an IOAT DMA transaction | 258 | * @device_prep_dma_memset: prepares a memset operation |
175 | * @device_memcpy_issue_pending: push appended descriptors to hardware | 259 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
260 | * @device_dependency_added: async_tx notifies the channel about new deps | ||
261 | * @device_issue_pending: push pending transactions to hardware | ||
176 | */ | 262 | */ |
177 | struct dma_device { | 263 | struct dma_device { |
178 | 264 | ||
179 | unsigned int chancnt; | 265 | unsigned int chancnt; |
180 | struct list_head channels; | 266 | struct list_head channels; |
181 | struct list_head global_node; | 267 | struct list_head global_node; |
268 | dma_cap_mask_t cap_mask; | ||
269 | int max_xor; | ||
182 | 270 | ||
183 | struct kref refcount; | 271 | struct kref refcount; |
184 | struct completion done; | 272 | struct completion done; |
185 | 273 | ||
186 | int dev_id; | 274 | int dev_id; |
275 | struct device *dev; | ||
187 | 276 | ||
188 | int (*device_alloc_chan_resources)(struct dma_chan *chan); | 277 | int (*device_alloc_chan_resources)(struct dma_chan *chan); |
189 | void (*device_free_chan_resources)(struct dma_chan *chan); | 278 | void (*device_free_chan_resources)(struct dma_chan *chan); |
190 | dma_cookie_t (*device_memcpy_buf_to_buf)(struct dma_chan *chan, | 279 | |
191 | void *dest, void *src, size_t len); | 280 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( |
192 | dma_cookie_t (*device_memcpy_buf_to_pg)(struct dma_chan *chan, | 281 | struct dma_chan *chan, size_t len, int int_en); |
193 | struct page *page, unsigned int offset, void *kdata, | 282 | struct dma_async_tx_descriptor *(*device_prep_dma_xor)( |
194 | size_t len); | 283 | struct dma_chan *chan, unsigned int src_cnt, size_t len, |
195 | dma_cookie_t (*device_memcpy_pg_to_pg)(struct dma_chan *chan, | 284 | int int_en); |
196 | struct page *dest_pg, unsigned int dest_off, | 285 | struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)( |
197 | struct page *src_pg, unsigned int src_off, size_t len); | 286 | struct dma_chan *chan, unsigned int src_cnt, size_t len, |
198 | enum dma_status (*device_memcpy_complete)(struct dma_chan *chan, | 287 | u32 *result, int int_en); |
288 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( | ||
289 | struct dma_chan *chan, int value, size_t len, int int_en); | ||
290 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( | ||
291 | struct dma_chan *chan); | ||
292 | |||
293 | void (*device_dependency_added)(struct dma_chan *chan); | ||
294 | enum dma_status (*device_is_tx_complete)(struct dma_chan *chan, | ||
199 | dma_cookie_t cookie, dma_cookie_t *last, | 295 | dma_cookie_t cookie, dma_cookie_t *last, |
200 | dma_cookie_t *used); | 296 | dma_cookie_t *used); |
201 | void (*device_memcpy_issue_pending)(struct dma_chan *chan); | 297 | void (*device_issue_pending)(struct dma_chan *chan); |
202 | }; | 298 | }; |
203 | 299 | ||
204 | /* --- public DMA engine API --- */ | 300 | /* --- public DMA engine API --- */ |
205 | 301 | ||
206 | struct dma_client *dma_async_client_register(dma_event_callback event_callback); | 302 | void dma_async_client_register(struct dma_client *client); |
207 | void dma_async_client_unregister(struct dma_client *client); | 303 | void dma_async_client_unregister(struct dma_client *client); |
208 | void dma_async_client_chan_request(struct dma_client *client, | 304 | void dma_async_client_chan_request(struct dma_client *client); |
209 | unsigned int number); | 305 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
306 | void *dest, void *src, size_t len); | ||
307 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | ||
308 | struct page *page, unsigned int offset, void *kdata, size_t len); | ||
309 | dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, | ||
310 | struct page *dest_pg, unsigned int dest_off, struct page *src_pg, | ||
311 | unsigned int src_off, size_t len); | ||
312 | void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, | ||
313 | struct dma_chan *chan); | ||
210 | 314 | ||
211 | /** | 315 | static inline void |
212 | * dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses | 316 | async_tx_ack(struct dma_async_tx_descriptor *tx) |
213 | * @chan: DMA channel to offload copy to | ||
214 | * @dest: destination address (virtual) | ||
215 | * @src: source address (virtual) | ||
216 | * @len: length | ||
217 | * | ||
218 | * Both @dest and @src must be mappable to a bus address according to the | ||
219 | * DMA mapping API rules for streaming mappings. | ||
220 | * Both @dest and @src must stay memory resident (kernel memory or locked | ||
221 | * user space pages). | ||
222 | */ | ||
223 | static inline dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | ||
224 | void *dest, void *src, size_t len) | ||
225 | { | 317 | { |
226 | int cpu = get_cpu(); | 318 | tx->ack = 1; |
227 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | ||
228 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | ||
229 | put_cpu(); | ||
230 | |||
231 | return chan->device->device_memcpy_buf_to_buf(chan, dest, src, len); | ||
232 | } | 319 | } |
233 | 320 | ||
234 | /** | 321 | #define first_dma_cap(mask) __first_dma_cap(&(mask)) |
235 | * dma_async_memcpy_buf_to_pg - offloaded copy from address to page | 322 | static inline int __first_dma_cap(const dma_cap_mask_t *srcp) |
236 | * @chan: DMA channel to offload copy to | ||
237 | * @page: destination page | ||
238 | * @offset: offset in page to copy to | ||
239 | * @kdata: source address (virtual) | ||
240 | * @len: length | ||
241 | * | ||
242 | * Both @page/@offset and @kdata must be mappable to a bus address according | ||
243 | * to the DMA mapping API rules for streaming mappings. | ||
244 | * Both @page/@offset and @kdata must stay memory resident (kernel memory or | ||
245 | * locked user space pages) | ||
246 | */ | ||
247 | static inline dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | ||
248 | struct page *page, unsigned int offset, void *kdata, size_t len) | ||
249 | { | 323 | { |
250 | int cpu = get_cpu(); | 324 | return min_t(int, DMA_TX_TYPE_END, |
251 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | 325 | find_first_bit(srcp->bits, DMA_TX_TYPE_END)); |
252 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | 326 | } |
253 | put_cpu(); | ||
254 | 327 | ||
255 | return chan->device->device_memcpy_buf_to_pg(chan, page, offset, | 328 | #define next_dma_cap(n, mask) __next_dma_cap((n), &(mask)) |
256 | kdata, len); | 329 | static inline int __next_dma_cap(int n, const dma_cap_mask_t *srcp) |
330 | { | ||
331 | return min_t(int, DMA_TX_TYPE_END, | ||
332 | find_next_bit(srcp->bits, DMA_TX_TYPE_END, n+1)); | ||
257 | } | 333 | } |
258 | 334 | ||
259 | /** | 335 | #define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask)) |
260 | * dma_async_memcpy_pg_to_pg - offloaded copy from page to page | 336 | static inline void |
261 | * @chan: DMA channel to offload copy to | 337 | __dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp) |
262 | * @dest_pg: destination page | ||
263 | * @dest_off: offset in page to copy to | ||
264 | * @src_pg: source page | ||
265 | * @src_off: offset in page to copy from | ||
266 | * @len: length | ||
267 | * | ||
268 | * Both @dest_page/@dest_off and @src_page/@src_off must be mappable to a bus | ||
269 | * address according to the DMA mapping API rules for streaming mappings. | ||
270 | * Both @dest_page/@dest_off and @src_page/@src_off must stay memory resident | ||
271 | * (kernel memory or locked user space pages). | ||
272 | */ | ||
273 | static inline dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, | ||
274 | struct page *dest_pg, unsigned int dest_off, struct page *src_pg, | ||
275 | unsigned int src_off, size_t len) | ||
276 | { | 338 | { |
277 | int cpu = get_cpu(); | 339 | set_bit(tx_type, dstp->bits); |
278 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | 340 | } |
279 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | ||
280 | put_cpu(); | ||
281 | 341 | ||
282 | return chan->device->device_memcpy_pg_to_pg(chan, dest_pg, dest_off, | 342 | #define dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask)) |
283 | src_pg, src_off, len); | 343 | static inline int |
344 | __dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp) | ||
345 | { | ||
346 | return test_bit(tx_type, srcp->bits); | ||
284 | } | 347 | } |
285 | 348 | ||
349 | #define for_each_dma_cap_mask(cap, mask) \ | ||
350 | for ((cap) = first_dma_cap(mask); \ | ||
351 | (cap) < DMA_TX_TYPE_END; \ | ||
352 | (cap) = next_dma_cap((cap), (mask))) | ||
353 | |||
286 | /** | 354 | /** |
287 | * dma_async_memcpy_issue_pending - flush pending copies to HW | 355 | * dma_async_issue_pending - flush pending transactions to HW |
288 | * @chan: target DMA channel | 356 | * @chan: target DMA channel |
289 | * | 357 | * |
290 | * This allows drivers to push copies to HW in batches, | 358 | * This allows drivers to push copies to HW in batches, |
291 | * reducing MMIO writes where possible. | 359 | * reducing MMIO writes where possible. |
292 | */ | 360 | */ |
293 | static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan) | 361 | static inline void dma_async_issue_pending(struct dma_chan *chan) |
294 | { | 362 | { |
295 | return chan->device->device_memcpy_issue_pending(chan); | 363 | return chan->device->device_issue_pending(chan); |
296 | } | 364 | } |
297 | 365 | ||
366 | #define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan) | ||
367 | |||
298 | /** | 368 | /** |
299 | * dma_async_memcpy_complete - poll for transaction completion | 369 | * dma_async_is_tx_complete - poll for transaction completion |
300 | * @chan: DMA channel | 370 | * @chan: DMA channel |
301 | * @cookie: transaction identifier to check status of | 371 | * @cookie: transaction identifier to check status of |
302 | * @last: returns last completed cookie, can be NULL | 372 | * @last: returns last completed cookie, can be NULL |
@@ -306,12 +376,15 @@ static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan) | |||
306 | * internal state and can be used with dma_async_is_complete() to check | 376 | * internal state and can be used with dma_async_is_complete() to check |
307 | * the status of multiple cookies without re-checking hardware state. | 377 | * the status of multiple cookies without re-checking hardware state. |
308 | */ | 378 | */ |
309 | static inline enum dma_status dma_async_memcpy_complete(struct dma_chan *chan, | 379 | static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan, |
310 | dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) | 380 | dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) |
311 | { | 381 | { |
312 | return chan->device->device_memcpy_complete(chan, cookie, last, used); | 382 | return chan->device->device_is_tx_complete(chan, cookie, last, used); |
313 | } | 383 | } |
314 | 384 | ||
385 | #define dma_async_memcpy_complete(chan, cookie, last, used)\ | ||
386 | dma_async_is_tx_complete(chan, cookie, last, used) | ||
387 | |||
315 | /** | 388 | /** |
316 | * dma_async_is_complete - test a cookie against chan state | 389 | * dma_async_is_complete - test a cookie against chan state |
317 | * @cookie: transaction identifier to test status of | 390 | * @cookie: transaction identifier to test status of |
@@ -334,6 +407,7 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie, | |||
334 | return DMA_IN_PROGRESS; | 407 | return DMA_IN_PROGRESS; |
335 | } | 408 | } |
336 | 409 | ||
410 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | ||
337 | 411 | ||
338 | /* --- DMA device --- */ | 412 | /* --- DMA device --- */ |
339 | 413 | ||
@@ -362,5 +436,4 @@ dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov, | |||
362 | struct dma_pinned_list *pinned_list, struct page *page, | 436 | struct dma_pinned_list *pinned_list, struct page *page, |
363 | unsigned int offset, size_t len); | 437 | unsigned int offset, size_t len); |
364 | 438 | ||
365 | #endif /* CONFIG_DMA_ENGINE */ | ||
366 | #endif /* DMAENGINE_H */ | 439 | #endif /* DMAENGINE_H */ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 904bf3d2d90b..b8ac7b01c45e 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -12,9 +12,17 @@ enum dmi_field { | |||
12 | DMI_PRODUCT_NAME, | 12 | DMI_PRODUCT_NAME, |
13 | DMI_PRODUCT_VERSION, | 13 | DMI_PRODUCT_VERSION, |
14 | DMI_PRODUCT_SERIAL, | 14 | DMI_PRODUCT_SERIAL, |
15 | DMI_PRODUCT_UUID, | ||
15 | DMI_BOARD_VENDOR, | 16 | DMI_BOARD_VENDOR, |
16 | DMI_BOARD_NAME, | 17 | DMI_BOARD_NAME, |
17 | DMI_BOARD_VERSION, | 18 | DMI_BOARD_VERSION, |
19 | DMI_BOARD_SERIAL, | ||
20 | DMI_BOARD_ASSET_TAG, | ||
21 | DMI_CHASSIS_VENDOR, | ||
22 | DMI_CHASSIS_TYPE, | ||
23 | DMI_CHASSIS_VERSION, | ||
24 | DMI_CHASSIS_SERIAL, | ||
25 | DMI_CHASSIS_ASSET_TAG, | ||
18 | DMI_STRING_MAX, | 26 | DMI_STRING_MAX, |
19 | }; | 27 | }; |
20 | 28 | ||
diff --git a/include/linux/ds17287rtc.h b/include/linux/ds17287rtc.h index c281ba42e28f..d85d3f497b96 100644 --- a/include/linux/ds17287rtc.h +++ b/include/linux/ds17287rtc.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #define __LINUX_DS17287RTC_H | 11 | #define __LINUX_DS17287RTC_H |
12 | 12 | ||
13 | #include <linux/rtc.h> /* get the user-level API */ | 13 | #include <linux/rtc.h> /* get the user-level API */ |
14 | #include <linux/spinlock.h> /* spinlock_t */ | ||
15 | #include <linux/mc146818rtc.h> | 14 | #include <linux/mc146818rtc.h> |
16 | 15 | ||
17 | /* Register A */ | 16 | /* Register A */ |
diff --git a/include/linux/edd.h b/include/linux/edd.h index b2b3e68aa512..7b647822d6dc 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -49,10 +49,6 @@ | |||
49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ | 49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ |
50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF | 50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF |
51 | in boot_params - treat this as 1 byte */ | 51 | in boot_params - treat this as 1 byte */ |
52 | #define EDD_CL_EQUALS 0x3d646465 /* "edd=" */ | ||
53 | #define EDD_CL_OFF 0x666f /* "of" for off */ | ||
54 | #define EDD_CL_SKIP 0x6b73 /* "sk" for skipmbr */ | ||
55 | #define EDD_CL_ON 0x6e6f /* "on" for on */ | ||
56 | 52 | ||
57 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
58 | 54 | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 071c67abed86..6cdb97365e47 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -39,13 +39,8 @@ extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev | |||
39 | extern int eth_header_cache(struct neighbour *neigh, | 39 | extern int eth_header_cache(struct neighbour *neigh, |
40 | struct hh_cache *hh); | 40 | struct hh_cache *hh); |
41 | 41 | ||
42 | extern struct net_device *alloc_etherdev(int sizeof_priv); | 42 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); |
43 | static inline void eth_copy_and_sum (struct sk_buff *dest, | 43 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
44 | const unsigned char *src, | ||
45 | int len, int base) | ||
46 | { | ||
47 | memcpy (dest->data, src, len); | ||
48 | } | ||
49 | 44 | ||
50 | /** | 45 | /** |
51 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 46 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index f2d248f8cc92..3a632244f31b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -265,6 +265,7 @@ u32 ethtool_op_get_link(struct net_device *dev); | |||
265 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 265 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
266 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 266 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); |
267 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); | 267 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); |
268 | int ethtool_op_set_tx_ipv6_csum(struct net_device *dev, u32 data); | ||
268 | u32 ethtool_op_get_sg(struct net_device *dev); | 269 | u32 ethtool_op_get_sg(struct net_device *dev); |
269 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 270 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
270 | u32 ethtool_op_get_tso(struct net_device *dev); | 271 | u32 ethtool_op_get_tso(struct net_device *dev); |
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index 4eda0ed76a48..d149f2959e67 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h | |||
@@ -33,6 +33,8 @@ struct ext2_sb_info { | |||
33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
35 | unsigned long s_groups_count; /* Number of groups in the fs */ | 35 | unsigned long s_groups_count; /* Number of groups in the fs */ |
36 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
37 | unsigned long s_blocks_last; /* Last seen block count */ | ||
36 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 38 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
37 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ | 39 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ |
38 | struct buffer_head ** s_group_desc; | 40 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index f61309c81cc4..d3c08353edf6 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h | |||
@@ -38,6 +38,8 @@ struct ext3_sb_info { | |||
38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
40 | unsigned long s_groups_count; /* Number of groups in the fs */ | 40 | unsigned long s_groups_count; /* Number of groups in the fs */ |
41 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
42 | unsigned long s_blocks_last; /* Last seen block count */ | ||
41 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 43 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
42 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ | 44 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ |
43 | struct buffer_head ** s_group_desc; | 45 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext4_fs_sb.h b/include/linux/ext4_fs_sb.h index 691a713139ce..2347557a327a 100644 --- a/include/linux/ext4_fs_sb.h +++ b/include/linux/ext4_fs_sb.h | |||
@@ -39,6 +39,8 @@ struct ext4_sb_info { | |||
39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
41 | unsigned long s_groups_count; /* Number of groups in the fs */ | 41 | unsigned long s_groups_count; /* Number of groups in the fs */ |
42 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
43 | unsigned long s_blocks_last; /* Last seen block count */ | ||
42 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 44 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
43 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ | 45 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ |
44 | struct buffer_head ** s_group_desc; | 46 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/file.h b/include/linux/file.h index a59001e9ea58..0114fbc78061 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -73,6 +73,7 @@ extern struct file * FASTCALL(fget_light(unsigned int fd, int *fput_needed)); | |||
73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); | 73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); |
74 | extern void put_filp(struct file *); | 74 | extern void put_filp(struct file *); |
75 | extern int get_unused_fd(void); | 75 | extern int get_unused_fd(void); |
76 | extern int get_unused_fd_flags(int flags); | ||
76 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 77 | extern void FASTCALL(put_unused_fd(unsigned int fd)); |
77 | struct kmem_cache; | 78 | struct kmem_cache; |
78 | 79 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f0b3bf5983c..e68780810279 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -44,7 +44,7 @@ extern int get_max_files(void); | |||
44 | struct inodes_stat_t { | 44 | struct inodes_stat_t { |
45 | int nr_inodes; | 45 | int nr_inodes; |
46 | int nr_unused; | 46 | int nr_unused; |
47 | int dummy[5]; | 47 | int dummy[5]; /* padding for sysctl ABI compatibility */ |
48 | }; | 48 | }; |
49 | extern struct inodes_stat_t inodes_stat; | 49 | extern struct inodes_stat_t inodes_stat; |
50 | 50 | ||
@@ -820,6 +820,10 @@ struct file_lock { | |||
820 | union { | 820 | union { |
821 | struct nfs_lock_info nfs_fl; | 821 | struct nfs_lock_info nfs_fl; |
822 | struct nfs4_lock_info nfs4_fl; | 822 | struct nfs4_lock_info nfs4_fl; |
823 | struct { | ||
824 | struct list_head link; /* link in AFS vnode's pending_locks list */ | ||
825 | int state; /* state of grant or error if -ve */ | ||
826 | } afs; | ||
823 | } fl_u; | 827 | } fl_u; |
824 | }; | 828 | }; |
825 | 829 | ||
@@ -1610,6 +1614,9 @@ extern int __invalidate_device(struct block_device *); | |||
1610 | extern int invalidate_partition(struct gendisk *, int); | 1614 | extern int invalidate_partition(struct gendisk *, int); |
1611 | #endif | 1615 | #endif |
1612 | extern int invalidate_inodes(struct super_block *); | 1616 | extern int invalidate_inodes(struct super_block *); |
1617 | unsigned long __invalidate_mapping_pages(struct address_space *mapping, | ||
1618 | pgoff_t start, pgoff_t end, | ||
1619 | bool be_atomic); | ||
1613 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1620 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1614 | pgoff_t start, pgoff_t end); | 1621 | pgoff_t start, pgoff_t end); |
1615 | 1622 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 534744efe30d..9fbe9d258e22 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -339,7 +339,7 @@ struct fuse_dirent { | |||
339 | char name[0]; | 339 | char name[0]; |
340 | }; | 340 | }; |
341 | 341 | ||
342 | #define FUSE_NAME_OFFSET ((unsigned) ((struct fuse_dirent *) 0)->name) | 342 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) |
344 | #define FUSE_DIRENT_SIZE(d) \ | 344 | #define FUSE_DIRENT_SIZE(d) \ |
345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 17c29dca8354..540799bc85f8 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -329,12 +329,13 @@ extern void sysrq_timer_list_show(void); | |||
329 | #ifdef CONFIG_TIMER_STATS | 329 | #ifdef CONFIG_TIMER_STATS |
330 | 330 | ||
331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
332 | void *timerf, char * comm); | 332 | void *timerf, char *comm, |
333 | unsigned int timer_flag); | ||
333 | 334 | ||
334 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 335 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
335 | { | 336 | { |
336 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 337 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
337 | timer->function, timer->start_comm); | 338 | timer->function, timer->start_comm, 0); |
338 | } | 339 | } |
339 | 340 | ||
340 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | 341 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cae7d618030c..2eaba21b9b1a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -90,7 +90,7 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client, | |||
90 | const u8 *values); | 90 | const u8 *values); |
91 | /* Returns the number of read bytes */ | 91 | /* Returns the number of read bytes */ |
92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | 92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, |
93 | u8 command, u8 *values); | 93 | u8 command, u8 length, u8 *values); |
94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | 94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, |
95 | u8 command, u8 length, | 95 | u8 command, u8 length, |
96 | const u8 *values); | 96 | const u8 *values); |
@@ -150,15 +150,20 @@ struct i2c_driver { | |||
150 | 150 | ||
151 | /** | 151 | /** |
152 | * struct i2c_client - represent an I2C slave device | 152 | * struct i2c_client - represent an I2C slave device |
153 | * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address; | ||
154 | * I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking | ||
153 | * @addr: Address used on the I2C bus connected to the parent adapter. | 155 | * @addr: Address used on the I2C bus connected to the parent adapter. |
154 | * @name: Indicates the type of the device, usually a chip name that's | 156 | * @name: Indicates the type of the device, usually a chip name that's |
155 | * generic enough to hide second-sourcing and compatible revisions. | 157 | * generic enough to hide second-sourcing and compatible revisions. |
158 | * @adapter: manages the bus segment hosting this I2C device | ||
156 | * @dev: Driver model device node for the slave. | 159 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | ||
157 | * @driver_name: Identifies new-style driver used with this device; also | 161 | * @driver_name: Identifies new-style driver used with this device; also |
158 | * used as the module name for hotplug/coldplug modprobe support. | 162 | * used as the module name for hotplug/coldplug modprobe support. |
159 | * | 163 | * |
160 | * An i2c_client identifies a single device (i.e. chip) connected to an | 164 | * An i2c_client identifies a single device (i.e. chip) connected to an |
161 | * i2c bus. The behaviour is defined by the routines of the driver. | 165 | * i2c bus. The behaviour exposed to Linux is defined by the driver |
166 | * managing the device. | ||
162 | */ | 167 | */ |
163 | struct i2c_client { | 168 | struct i2c_client { |
164 | unsigned short flags; /* div., see below */ | 169 | unsigned short flags; /* div., see below */ |
@@ -180,7 +185,8 @@ struct i2c_client { | |||
180 | 185 | ||
181 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
182 | { | 187 | { |
183 | return to_i2c_client(container_of(kobj, struct device, kobj)); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
189 | return to_i2c_client(dev); | ||
184 | } | 190 | } |
185 | 191 | ||
186 | static inline void *i2c_get_clientdata (struct i2c_client *dev) | 192 | static inline void *i2c_get_clientdata (struct i2c_client *dev) |
@@ -201,7 +207,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
201 | * @addr: stored in i2c_client.addr | 207 | * @addr: stored in i2c_client.addr |
202 | * @platform_data: stored in i2c_client.dev.platform_data | 208 | * @platform_data: stored in i2c_client.dev.platform_data |
203 | * @irq: stored in i2c_client.irq | 209 | * @irq: stored in i2c_client.irq |
204 | 210 | * | |
205 | * I2C doesn't actually support hardware probing, although controllers and | 211 | * I2C doesn't actually support hardware probing, although controllers and |
206 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's | 212 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's |
207 | * a device at a given address. Drivers commonly need more information than | 213 | * a device at a given address. Drivers commonly need more information than |
@@ -210,7 +216,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
210 | * i2c_board_info is used to build tables of information listing I2C devices | 216 | * i2c_board_info is used to build tables of information listing I2C devices |
211 | * that are present. This information is used to grow the driver model tree | 217 | * that are present. This information is used to grow the driver model tree |
212 | * for "new style" I2C drivers. For mainboards this is done statically using | 218 | * for "new style" I2C drivers. For mainboards this is done statically using |
213 | * i2c_register_board_info(), where @bus_num represents an adapter that isn't | 219 | * i2c_register_board_info(); bus numbers identify adapters that aren't |
214 | * yet available. For add-on boards, i2c_new_device() does this dynamically | 220 | * yet available. For add-on boards, i2c_new_device() does this dynamically |
215 | * with the adapter already known. | 221 | * with the adapter already known. |
216 | */ | 222 | */ |
@@ -518,8 +524,9 @@ union i2c_smbus_data { | |||
518 | #define I2C_SMBUS_WORD_DATA 3 | 524 | #define I2C_SMBUS_WORD_DATA 3 |
519 | #define I2C_SMBUS_PROC_CALL 4 | 525 | #define I2C_SMBUS_PROC_CALL 4 |
520 | #define I2C_SMBUS_BLOCK_DATA 5 | 526 | #define I2C_SMBUS_BLOCK_DATA 5 |
521 | #define I2C_SMBUS_I2C_BLOCK_DATA 6 | 527 | #define I2C_SMBUS_I2C_BLOCK_BROKEN 6 |
522 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ | 528 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ |
529 | #define I2C_SMBUS_I2C_BLOCK_DATA 8 | ||
523 | 530 | ||
524 | 531 | ||
525 | /* ----- commands for the ioctl like i2c_command call: | 532 | /* ----- commands for the ioctl like i2c_command call: |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 52f53e2e70c3..333a370a3bdc 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/workqueue.h> /* work_struct */ | 32 | #include <linux/workqueue.h> /* work_struct */ |
33 | #include <linux/mempool.h> | 33 | #include <linux/mempool.h> |
34 | #include <linux/mutex.h> | ||
34 | 35 | ||
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
36 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | 37 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ |
@@ -425,7 +426,7 @@ struct i2o_device { | |||
425 | 426 | ||
426 | struct device device; | 427 | struct device device; |
427 | 428 | ||
428 | struct semaphore lock; /* device lock */ | 429 | struct mutex lock; /* device lock */ |
429 | }; | 430 | }; |
430 | 431 | ||
431 | /* | 432 | /* |
@@ -544,7 +545,7 @@ struct i2o_controller { | |||
544 | struct i2o_dma hrt; /* HW Resource Table */ | 545 | struct i2o_dma hrt; /* HW Resource Table */ |
545 | i2o_lct *lct; /* Logical Config Table */ | 546 | i2o_lct *lct; /* Logical Config Table */ |
546 | struct i2o_dma dlct; /* Temp LCT */ | 547 | struct i2o_dma dlct; /* Temp LCT */ |
547 | struct semaphore lct_lock; /* Lock for LCT updates */ | 548 | struct mutex lct_lock; /* Lock for LCT updates */ |
548 | struct i2o_dma status_block; /* IOP status block */ | 549 | struct i2o_dma status_block; /* IOP status block */ |
549 | 550 | ||
550 | struct i2o_io base; /* controller messaging unit */ | 551 | struct i2o_io base; /* controller messaging unit */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 826803449db7..0edda411959c 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -78,9 +78,41 @@ void *idr_find(struct idr *idp, int id); | |||
78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); |
79 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
81 | int idr_for_each(struct idr *idp, | ||
82 | int (*fn)(int id, void *p, void *data), void *data); | ||
81 | void *idr_replace(struct idr *idp, void *ptr, int id); | 83 | void *idr_replace(struct idr *idp, void *ptr, int id); |
82 | void idr_remove(struct idr *idp, int id); | 84 | void idr_remove(struct idr *idp, int id); |
85 | void idr_remove_all(struct idr *idp); | ||
83 | void idr_destroy(struct idr *idp); | 86 | void idr_destroy(struct idr *idp); |
84 | void idr_init(struct idr *idp); | 87 | void idr_init(struct idr *idp); |
85 | 88 | ||
89 | |||
90 | /* | ||
91 | * IDA - IDR based id allocator, use when translation from id to | ||
92 | * pointer isn't necessary. | ||
93 | */ | ||
94 | #define IDA_CHUNK_SIZE 128 /* 128 bytes per chunk */ | ||
95 | #define IDA_BITMAP_LONGS (128 / sizeof(long) - 1) | ||
96 | #define IDA_BITMAP_BITS (IDA_BITMAP_LONGS * sizeof(long) * 8) | ||
97 | |||
98 | struct ida_bitmap { | ||
99 | long nr_busy; | ||
100 | unsigned long bitmap[IDA_BITMAP_LONGS]; | ||
101 | }; | ||
102 | |||
103 | struct ida { | ||
104 | struct idr idr; | ||
105 | struct ida_bitmap *free_bitmap; | ||
106 | }; | ||
107 | |||
108 | #define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, } | ||
109 | #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) | ||
110 | |||
111 | int ida_pre_get(struct ida *ida, gfp_t gfp_mask); | ||
112 | int ida_get_new_above(struct ida *ida, int starting_id, int *p_id); | ||
113 | int ida_get_new(struct ida *ida, int *p_id); | ||
114 | void ida_remove(struct ida *ida, int id); | ||
115 | void ida_destroy(struct ida *ida); | ||
116 | void ida_init(struct ida *ida); | ||
117 | |||
86 | #endif /* __IDR_H__ */ | 118 | #endif /* __IDR_H__ */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ecd61e8438a5..272f8c8c90da 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -227,6 +227,17 @@ struct ieee80211_cts { | |||
227 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) | 227 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) |
228 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) | 228 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) |
229 | 229 | ||
230 | /* 802.11g ERP information element */ | ||
231 | #define WLAN_ERP_NON_ERP_PRESENT (1<<0) | ||
232 | #define WLAN_ERP_USE_PROTECTION (1<<1) | ||
233 | #define WLAN_ERP_BARKER_PREAMBLE (1<<2) | ||
234 | |||
235 | /* WLAN_ERP_BARKER_PREAMBLE values */ | ||
236 | enum { | ||
237 | WLAN_ERP_PREAMBLE_SHORT = 0, | ||
238 | WLAN_ERP_PREAMBLE_LONG = 1, | ||
239 | }; | ||
240 | |||
230 | /* Status codes */ | 241 | /* Status codes */ |
231 | enum ieee80211_statuscode { | 242 | enum ieee80211_statuscode { |
232 | WLAN_STATUS_SUCCESS = 0, | 243 | WLAN_STATUS_SUCCESS = 0, |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 604c2434f71c..422084d18ce1 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -76,6 +76,8 @@ enum | |||
76 | #define IFLA_WEIGHT IFLA_WEIGHT | 76 | #define IFLA_WEIGHT IFLA_WEIGHT |
77 | IFLA_OPERSTATE, | 77 | IFLA_OPERSTATE, |
78 | IFLA_LINKMODE, | 78 | IFLA_LINKMODE, |
79 | IFLA_LINKINFO, | ||
80 | #define IFLA_LINKINFO IFLA_LINKINFO | ||
79 | __IFLA_MAX | 81 | __IFLA_MAX |
80 | }; | 82 | }; |
81 | 83 | ||
@@ -140,4 +142,49 @@ struct ifla_cacheinfo | |||
140 | __u32 retrans_time; | 142 | __u32 retrans_time; |
141 | }; | 143 | }; |
142 | 144 | ||
145 | enum | ||
146 | { | ||
147 | IFLA_INFO_UNSPEC, | ||
148 | IFLA_INFO_KIND, | ||
149 | IFLA_INFO_DATA, | ||
150 | IFLA_INFO_XSTATS, | ||
151 | __IFLA_INFO_MAX, | ||
152 | }; | ||
153 | |||
154 | #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) | ||
155 | |||
156 | /* VLAN section */ | ||
157 | |||
158 | enum | ||
159 | { | ||
160 | IFLA_VLAN_UNSPEC, | ||
161 | IFLA_VLAN_ID, | ||
162 | IFLA_VLAN_FLAGS, | ||
163 | IFLA_VLAN_EGRESS_QOS, | ||
164 | IFLA_VLAN_INGRESS_QOS, | ||
165 | __IFLA_VLAN_MAX, | ||
166 | }; | ||
167 | |||
168 | #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) | ||
169 | |||
170 | struct ifla_vlan_flags { | ||
171 | __u32 flags; | ||
172 | __u32 mask; | ||
173 | }; | ||
174 | |||
175 | enum | ||
176 | { | ||
177 | IFLA_VLAN_QOS_UNSPEC, | ||
178 | IFLA_VLAN_QOS_MAPPING, | ||
179 | __IFLA_VLAN_QOS_MAX | ||
180 | }; | ||
181 | |||
182 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | ||
183 | |||
184 | struct ifla_vlan_qos_mapping | ||
185 | { | ||
186 | __u32 from; | ||
187 | __u32 to; | ||
188 | }; | ||
189 | |||
143 | #endif /* _LINUX_IF_LINK_H */ | 190 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h new file mode 100644 index 000000000000..0d9d7ea2c1cc --- /dev/null +++ b/include/linux/if_macvlan.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _LINUX_IF_MACVLAN_H | ||
2 | #define _LINUX_IF_MACVLAN_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); | ||
7 | |||
8 | #endif /* __KERNEL__ */ | ||
9 | #endif /* _LINUX_IF_MACVLAN_H */ | ||
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index 768372f07caa..0f2f70d4e48c 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -110,6 +110,21 @@ struct ifpppcstatsreq { | |||
110 | struct ppp_comp_stats stats; | 110 | struct ppp_comp_stats stats; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* For PPPIOCGL2TPSTATS */ | ||
114 | struct pppol2tp_ioc_stats { | ||
115 | __u16 tunnel_id; /* redundant */ | ||
116 | __u16 session_id; /* if zero, get tunnel stats */ | ||
117 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | ||
118 | aligned_u64 tx_packets; | ||
119 | aligned_u64 tx_bytes; | ||
120 | aligned_u64 tx_errors; | ||
121 | aligned_u64 rx_packets; | ||
122 | aligned_u64 rx_bytes; | ||
123 | aligned_u64 rx_seq_discards; | ||
124 | aligned_u64 rx_oos_packets; | ||
125 | aligned_u64 rx_errors; | ||
126 | }; | ||
127 | |||
113 | #define ifr__name b.ifr_ifrn.ifrn_name | 128 | #define ifr__name b.ifr_ifrn.ifrn_name |
114 | #define stats_ptr b.ifr_ifru.ifru_data | 129 | #define stats_ptr b.ifr_ifru.ifru_data |
115 | 130 | ||
@@ -146,6 +161,7 @@ struct ifpppcstatsreq { | |||
146 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ | 161 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ |
147 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ | 162 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ |
148 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ | 163 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ |
164 | #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) | ||
149 | 165 | ||
150 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) | 166 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) |
151 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ | 167 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h new file mode 100644 index 000000000000..516203b6fdeb --- /dev/null +++ b/include/linux/if_pppol2tp.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /*************************************************************************** | ||
2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) | ||
3 | * | ||
4 | * This file supplies definitions required by the PPP over L2TP driver | ||
5 | * (pppol2tp.c). All version information wrt this file is located in pppol2tp.c | ||
6 | * | ||
7 | * License: | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __LINUX_IF_PPPOL2TP_H | ||
16 | #define __LINUX_IF_PPPOL2TP_H | ||
17 | |||
18 | #include <asm/types.h> | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | #include <linux/in.h> | ||
22 | #endif | ||
23 | |||
24 | /* Structure used to connect() the socket to a particular tunnel UDP | ||
25 | * socket. | ||
26 | */ | ||
27 | struct pppol2tp_addr | ||
28 | { | ||
29 | pid_t pid; /* pid that owns the fd. | ||
30 | * 0 => current */ | ||
31 | int fd; /* FD of UDP socket to use */ | ||
32 | |||
33 | struct sockaddr_in addr; /* IP address and port to send to */ | ||
34 | |||
35 | __be16 s_tunnel, s_session; /* For matching incoming packets */ | ||
36 | __be16 d_tunnel, d_session; /* For sending outgoing packets */ | ||
37 | }; | ||
38 | |||
39 | /* Socket options: | ||
40 | * DEBUG - bitmask of debug message categories | ||
41 | * SENDSEQ - 0 => don't send packets with sequence numbers | ||
42 | * 1 => send packets with sequence numbers | ||
43 | * RECVSEQ - 0 => receive packet sequence numbers are optional | ||
44 | * 1 => drop receive packets without sequence numbers | ||
45 | * LNSMODE - 0 => act as LAC. | ||
46 | * 1 => act as LNS. | ||
47 | * REORDERTO - reorder timeout (in millisecs). If 0, don't try to reorder. | ||
48 | */ | ||
49 | enum { | ||
50 | PPPOL2TP_SO_DEBUG = 1, | ||
51 | PPPOL2TP_SO_RECVSEQ = 2, | ||
52 | PPPOL2TP_SO_SENDSEQ = 3, | ||
53 | PPPOL2TP_SO_LNSMODE = 4, | ||
54 | PPPOL2TP_SO_REORDERTO = 5, | ||
55 | }; | ||
56 | |||
57 | /* Debug message categories for the DEBUG socket option */ | ||
58 | enum { | ||
59 | PPPOL2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if | ||
60 | * compiled in) */ | ||
61 | PPPOL2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel | ||
62 | * interface */ | ||
63 | PPPOL2TP_MSG_SEQ = (1 << 2), /* sequence numbers */ | ||
64 | PPPOL2TP_MSG_DATA = (1 << 3), /* data packets */ | ||
65 | }; | ||
66 | |||
67 | |||
68 | |||
69 | #endif | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 6f987be60fe2..25652545ba6e 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <linux/ppp_channel.h> | 28 | #include <linux/ppp_channel.h> |
29 | #endif /* __KERNEL__ */ | 29 | #endif /* __KERNEL__ */ |
30 | #include <linux/if_pppol2tp.h> | ||
30 | 31 | ||
31 | /* For user-space programs to pick up these definitions | 32 | /* For user-space programs to pick up these definitions |
32 | * which they wouldn't get otherwise without defining __KERNEL__ | 33 | * which they wouldn't get otherwise without defining __KERNEL__ |
@@ -50,8 +51,9 @@ struct pppoe_addr{ | |||
50 | * Protocols supported by AF_PPPOX | 51 | * Protocols supported by AF_PPPOX |
51 | */ | 52 | */ |
52 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ | 53 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ |
53 | #define PX_MAX_PROTO 1 | 54 | #define PX_PROTO_OL2TP 1 /* Now L2TP also */ |
54 | 55 | #define PX_MAX_PROTO 2 | |
56 | |||
55 | struct sockaddr_pppox { | 57 | struct sockaddr_pppox { |
56 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 58 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
57 | unsigned int sa_protocol; /* protocol identifier */ | 59 | unsigned int sa_protocol; /* protocol identifier */ |
@@ -60,6 +62,16 @@ struct sockaddr_pppox { | |||
60 | }sa_addr; | 62 | }sa_addr; |
61 | }__attribute__ ((packed)); | 63 | }__attribute__ ((packed)); |
62 | 64 | ||
65 | /* The use of the above union isn't viable because the size of this | ||
66 | * struct must stay fixed over time -- applications use sizeof(struct | ||
67 | * sockaddr_pppox) to fill it. We use a protocol specific sockaddr | ||
68 | * type instead. | ||
69 | */ | ||
70 | struct sockaddr_pppol2tp { | ||
71 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
72 | unsigned int sa_protocol; /* protocol identifier */ | ||
73 | struct pppol2tp_addr pppol2tp; | ||
74 | }__attribute__ ((packed)); | ||
63 | 75 | ||
64 | /********************************************************************* | 76 | /********************************************************************* |
65 | * | 77 | * |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 88aef7b86ef4..42eb6945b93e 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -36,6 +36,7 @@ struct tun_struct { | |||
36 | unsigned long flags; | 36 | unsigned long flags; |
37 | int attached; | 37 | int attached; |
38 | uid_t owner; | 38 | uid_t owner; |
39 | gid_t group; | ||
39 | 40 | ||
40 | wait_queue_head_t read_wait; | 41 | wait_queue_head_t read_wait; |
41 | struct sk_buff_head readq; | 42 | struct sk_buff_head readq; |
@@ -78,6 +79,7 @@ struct tun_struct { | |||
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 79 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 80 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | 81 | #define TUNSETLINK _IOW('T', 205, int) |
82 | #define TUNSETGROUP _IOW('T', 206, int) | ||
81 | 83 | ||
82 | /* TUNSETIFF ifr flags */ | 84 | /* TUNSETIFF ifr flags */ |
83 | #define IFF_TUN 0x0001 | 85 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 81e9bc93569b..f8443fdb124a 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -99,7 +99,7 @@ static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id, | |||
99 | } | 99 | } |
100 | 100 | ||
101 | struct vlan_priority_tci_mapping { | 101 | struct vlan_priority_tci_mapping { |
102 | unsigned long priority; | 102 | u32 priority; |
103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | 103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it |
104 | * at provisioning time. | 104 | * at provisioning time. |
105 | * ((skb->priority << 13) & 0xE000) | 105 | * ((skb->priority << 13) & 0xE000) |
@@ -112,7 +112,10 @@ struct vlan_dev_info { | |||
112 | /** This will be the mapping that correlates skb->priority to | 112 | /** This will be the mapping that correlates skb->priority to |
113 | * 3 bits of VLAN QOS tags... | 113 | * 3 bits of VLAN QOS tags... |
114 | */ | 114 | */ |
115 | unsigned long ingress_priority_map[8]; | 115 | unsigned int nr_ingress_mappings; |
116 | u32 ingress_priority_map[8]; | ||
117 | |||
118 | unsigned int nr_egress_mappings; | ||
116 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ | 119 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ |
117 | 120 | ||
118 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ | 121 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ |
@@ -124,14 +127,8 @@ struct vlan_dev_info { | |||
124 | * like DHCP that use packet-filtering and don't understand | 127 | * like DHCP that use packet-filtering and don't understand |
125 | * 802.1Q | 128 | * 802.1Q |
126 | */ | 129 | */ |
127 | struct dev_mc_list *old_mc_list; /* old multi-cast list for the VLAN interface.. | ||
128 | * we save this so we can tell what changes were | ||
129 | * made, in order to feed the right changes down | ||
130 | * to the real hardware... | ||
131 | */ | ||
132 | int old_allmulti; /* similar to above. */ | ||
133 | int old_promiscuity; /* similar to above. */ | ||
134 | struct net_device *real_dev; /* the underlying device/interface */ | 130 | struct net_device *real_dev; /* the underlying device/interface */ |
131 | unsigned char real_dev_addr[ETH_ALEN]; | ||
135 | struct proc_dir_entry *dent; /* Holds the proc data */ | 132 | struct proc_dir_entry *dent; /* Holds the proc data */ |
136 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ | 133 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ |
137 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ | 134 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ |
@@ -395,6 +392,10 @@ enum vlan_ioctl_cmds { | |||
395 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ | 392 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ |
396 | }; | 393 | }; |
397 | 394 | ||
395 | enum vlan_flags { | ||
396 | VLAN_FLAG_REORDER_HDR = 0x1, | ||
397 | }; | ||
398 | |||
398 | enum vlan_name_types { | 399 | enum vlan_name_types { |
399 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ | 400 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ |
400 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ | 401 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ |
diff --git a/include/linux/init.h b/include/linux/init.h index 56ec4c62eee0..5b5285316339 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -171,9 +171,6 @@ struct obs_kernel_param { | |||
171 | #define __setup(str, fn) \ | 171 | #define __setup(str, fn) \ |
172 | __setup_param(str, fn, fn, 0) | 172 | __setup_param(str, fn, fn, 0) |
173 | 173 | ||
174 | #define __obsolete_setup(str) \ | ||
175 | __setup_null_param(str, __LINE__) | ||
176 | |||
177 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn | 174 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn |
178 | * returns non-zero. */ | 175 | * returns non-zero. */ |
179 | #define early_param(str, fn) \ | 176 | #define early_param(str, fn) \ |
@@ -239,7 +236,6 @@ void __init parse_early_param(void); | |||
239 | #define __setup_param(str, unique_id, fn) /* nothing */ | 236 | #define __setup_param(str, unique_id, fn) /* nothing */ |
240 | #define __setup_null_param(str, unique_id) /* nothing */ | 237 | #define __setup_null_param(str, unique_id) /* nothing */ |
241 | #define __setup(str, func) /* nothing */ | 238 | #define __setup(str, func) /* nothing */ |
242 | #define __obsolete_setup(str) /* nothing */ | ||
243 | #endif | 239 | #endif |
244 | 240 | ||
245 | /* Data marked not to be saved by software suspend */ | 241 | /* Data marked not to be saved by software suspend */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 276ccaa2670c..cab741c2d603 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
9 | #include <linux/ipc.h> | 9 | #include <linux/ipc.h> |
10 | #include <linux/pid_namespace.h> | 10 | #include <linux/pid_namespace.h> |
11 | #include <linux/user_namespace.h> | ||
11 | 12 | ||
12 | #define INIT_FDTABLE \ | 13 | #define INIT_FDTABLE \ |
13 | { \ | 14 | { \ |
@@ -78,6 +79,7 @@ extern struct nsproxy init_nsproxy; | |||
78 | .uts_ns = &init_uts_ns, \ | 79 | .uts_ns = &init_uts_ns, \ |
79 | .mnt_ns = NULL, \ | 80 | .mnt_ns = NULL, \ |
80 | INIT_IPC_NS(ipc_ns) \ | 81 | INIT_IPC_NS(ipc_ns) \ |
82 | .user_ns = &init_user_ns, \ | ||
81 | } | 83 | } |
82 | 84 | ||
83 | #define INIT_SIGHAND(sighand) { \ | 85 | #define INIT_SIGHAND(sighand) { \ |
diff --git a/include/linux/io.h b/include/linux/io.h index 8423dd376514..e3b2dda6c8eb 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -63,32 +63,7 @@ void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | |||
63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | 63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, |
64 | unsigned long size); | 64 | unsigned long size); |
65 | void devm_iounmap(struct device *dev, void __iomem *addr); | 65 | void devm_iounmap(struct device *dev, void __iomem *addr); |
66 | 66 | int check_signature(const volatile void __iomem *io_addr, | |
67 | /** | 67 | const unsigned char *signature, int length); |
68 | * check_signature - find BIOS signatures | ||
69 | * @io_addr: mmio address to check | ||
70 | * @signature: signature block | ||
71 | * @length: length of signature | ||
72 | * | ||
73 | * Perform a signature comparison with the mmio address io_addr. This | ||
74 | * address should have been obtained by ioremap. | ||
75 | * Returns 1 on a match. | ||
76 | */ | ||
77 | |||
78 | static inline int check_signature(const volatile void __iomem *io_addr, | ||
79 | const unsigned char *signature, int length) | ||
80 | { | ||
81 | int retval = 0; | ||
82 | do { | ||
83 | if (readb(io_addr) != *signature) | ||
84 | goto out; | ||
85 | io_addr++; | ||
86 | signature++; | ||
87 | length--; | ||
88 | } while (length); | ||
89 | retval = 1; | ||
90 | out: | ||
91 | return retval; | ||
92 | } | ||
93 | 68 | ||
94 | #endif /* _LINUX_IO_H */ | 69 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/ip_mp_alg.h b/include/linux/ip_mp_alg.h deleted file mode 100644 index e234e2008f5d..000000000000 --- a/include/linux/ip_mp_alg.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* ip_mp_alg.h: IPV4 multipath algorithm support, user-visible values. | ||
2 | * | ||
3 | * Copyright (C) 2004, 2005 Einar Lueck <elueck@de.ibm.com> | ||
4 | * Copyright (C) 2005 David S. Miller <davem@davemloft.net> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_IP_MP_ALG_H | ||
8 | #define _LINUX_IP_MP_ALG_H | ||
9 | |||
10 | enum ip_mp_alg { | ||
11 | IP_MP_ALG_NONE, | ||
12 | IP_MP_ALG_RR, | ||
13 | IP_MP_ALG_DRR, | ||
14 | IP_MP_ALG_RANDOM, | ||
15 | IP_MP_ALG_WRANDOM, | ||
16 | __IP_MP_ALG_MAX | ||
17 | }; | ||
18 | |||
19 | #define IP_MP_ALG_MAX (__IP_MP_ALG_MAX - 1) | ||
20 | |||
21 | #endif /* _LINUX_IP_MP_ALG_H */ | ||
22 | |||
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 1980867a64a4..3fd3ddd5f0d9 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -52,6 +52,7 @@ struct ipc_perm | |||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | 53 | ||
54 | #include <linux/kref.h> | 54 | #include <linux/kref.h> |
55 | #include <linux/spinlock.h> | ||
55 | 56 | ||
56 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ | 57 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
57 | 58 | ||
@@ -92,6 +93,7 @@ extern struct ipc_namespace init_ipc_ns; | |||
92 | 93 | ||
93 | #ifdef CONFIG_SYSVIPC | 94 | #ifdef CONFIG_SYSVIPC |
94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 95 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
96 | extern void free_ipc_ns(struct kref *kref); | ||
95 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 97 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
96 | struct ipc_namespace *ns); | 98 | struct ipc_namespace *ns); |
97 | #else | 99 | #else |
@@ -103,13 +105,9 @@ static inline struct ipc_namespace *copy_ipcs(unsigned long flags, | |||
103 | } | 105 | } |
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #ifdef CONFIG_IPC_NS | ||
107 | extern void free_ipc_ns(struct kref *kref); | ||
108 | #endif | ||
109 | |||
110 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 108 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
111 | { | 109 | { |
112 | #ifdef CONFIG_IPC_NS | 110 | #ifdef CONFIG_SYSVIPC |
113 | if (ns) | 111 | if (ns) |
114 | kref_get(&ns->kref); | 112 | kref_get(&ns->kref); |
115 | #endif | 113 | #endif |
@@ -118,7 +116,7 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | |||
118 | 116 | ||
119 | static inline void put_ipc_ns(struct ipc_namespace *ns) | 117 | static inline void put_ipc_ns(struct ipc_namespace *ns) |
120 | { | 118 | { |
121 | #ifdef CONFIG_IPC_NS | 119 | #ifdef CONFIG_SYSVIPC |
122 | kref_put(&ns->kref, free_ipc_ns); | 120 | kref_put(&ns->kref, free_ipc_ns); |
123 | #endif | 121 | #endif |
124 | } | 122 | } |
@@ -126,5 +124,3 @@ static inline void put_ipc_ns(struct ipc_namespace *ns) | |||
126 | #endif /* __KERNEL__ */ | 124 | #endif /* __KERNEL__ */ |
127 | 125 | ||
128 | #endif /* _LINUX_IPC_H */ | 126 | #endif /* _LINUX_IPC_H */ |
129 | |||
130 | |||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 648bd1f0912d..97983dc9df13 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -27,8 +27,8 @@ struct in6_ifreq { | |||
27 | int ifr6_ifindex; | 27 | int ifr6_ifindex; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */ | 30 | #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */ |
31 | #define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ | 31 | #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */ |
32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ | 32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ |
33 | 33 | ||
34 | /* | 34 | /* |
@@ -247,7 +247,7 @@ struct inet6_skb_parm { | |||
247 | __u16 lastopt; | 247 | __u16 lastopt; |
248 | __u32 nhoff; | 248 | __u32 nhoff; |
249 | __u16 flags; | 249 | __u16 flags; |
250 | #ifdef CONFIG_IPV6_MIP6 | 250 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
251 | __u16 dsthao; | 251 | __u16 dsthao; |
252 | #endif | 252 | #endif |
253 | 253 | ||
@@ -299,8 +299,8 @@ struct ipv6_pinfo { | |||
299 | /* pktoption flags */ | 299 | /* pktoption flags */ |
300 | union { | 300 | union { |
301 | struct { | 301 | struct { |
302 | __u16 srcrt:2, | 302 | __u16 srcrt:1, |
303 | osrcrt:2, | 303 | osrcrt:1, |
304 | rxinfo:1, | 304 | rxinfo:1, |
305 | rxoinfo:1, | 305 | rxoinfo:1, |
306 | rxhlim:1, | 306 | rxhlim:1, |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 945ba3110874..8e3735714c1c 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
@@ -216,6 +216,34 @@ struct if_irda_req { | |||
216 | #define ifr_dtr ifr_ifru.ifru_line.dtr | 216 | #define ifr_dtr ifr_ifru.ifru_line.dtr |
217 | #define ifr_rts ifr_ifru.ifru_line.rts | 217 | #define ifr_rts ifr_ifru.ifru_line.rts |
218 | 218 | ||
219 | |||
220 | /* IrDA netlink definitions */ | ||
221 | #define IRDA_NL_NAME "irda" | ||
222 | #define IRDA_NL_VERSION 1 | ||
223 | |||
224 | enum irda_nl_commands { | ||
225 | IRDA_NL_CMD_UNSPEC, | ||
226 | IRDA_NL_CMD_SET_MODE, | ||
227 | IRDA_NL_CMD_GET_MODE, | ||
228 | |||
229 | __IRDA_NL_CMD_AFTER_LAST | ||
230 | }; | ||
231 | #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1) | ||
232 | |||
233 | enum nl80211_attrs { | ||
234 | IRDA_NL_ATTR_UNSPEC, | ||
235 | IRDA_NL_ATTR_IFNAME, | ||
236 | IRDA_NL_ATTR_MODE, | ||
237 | |||
238 | __IRDA_NL_ATTR_AFTER_LAST | ||
239 | }; | ||
240 | #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1) | ||
241 | |||
242 | /* IrDA modes */ | ||
243 | #define IRDA_MODE_PRIMARY 0x1 | ||
244 | #define IRDA_MODE_SECONDARY 0x2 | ||
245 | #define IRDA_MODE_MONITOR 0x4 | ||
246 | |||
219 | #endif /* KERNEL_IRDA_H */ | 247 | #endif /* KERNEL_IRDA_H */ |
220 | 248 | ||
221 | 249 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1695054e8c63..44657197fcb0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -161,6 +161,7 @@ struct irq_desc { | |||
161 | unsigned int wake_depth; /* nested wake enables */ | 161 | unsigned int wake_depth; /* nested wake enables */ |
162 | unsigned int irq_count; /* For detecting broken IRQs */ | 162 | unsigned int irq_count; /* For detecting broken IRQs */ |
163 | unsigned int irqs_unhandled; | 163 | unsigned int irqs_unhandled; |
164 | unsigned long last_unhandled; /* Aging timer for unhandled count */ | ||
164 | spinlock_t lock; | 165 | spinlock_t lock; |
165 | #ifdef CONFIG_SMP | 166 | #ifdef CONFIG_SMP |
166 | cpumask_t affinity; | 167 | cpumask_t affinity; |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c288e41ba331..06cbf41d32d2 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -55,7 +55,7 @@ struct kobject { | |||
55 | struct kobject * parent; | 55 | struct kobject * parent; |
56 | struct kset * kset; | 56 | struct kset * kset; |
57 | struct kobj_type * ktype; | 57 | struct kobj_type * ktype; |
58 | struct dentry * dentry; | 58 | struct sysfs_dirent * sd; |
59 | wait_queue_head_t poll; | 59 | wait_queue_head_t poll; |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -71,13 +71,14 @@ extern void kobject_init(struct kobject *); | |||
71 | extern void kobject_cleanup(struct kobject *); | 71 | extern void kobject_cleanup(struct kobject *); |
72 | 72 | ||
73 | extern int __must_check kobject_add(struct kobject *); | 73 | extern int __must_check kobject_add(struct kobject *); |
74 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | 74 | extern int __must_check kobject_shadow_add(struct kobject *kobj, |
75 | struct sysfs_dirent *shadow_parent); | ||
75 | extern void kobject_del(struct kobject *); | 76 | extern void kobject_del(struct kobject *); |
76 | 77 | ||
77 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
78 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | 79 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, |
79 | struct dentry *new_parent, | 80 | struct sysfs_dirent *new_parent, |
80 | const char *new_name); | 81 | const char *new_name); |
81 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 82 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
82 | 83 | ||
83 | extern int __must_check kobject_register(struct kobject *); | 84 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 2b139f66027f..dae7143644fe 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -279,6 +279,16 @@ static inline s64 ktime_to_us(const ktime_t kt) | |||
279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; | 279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; |
280 | } | 280 | } |
281 | 281 | ||
282 | static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | ||
283 | { | ||
284 | return ktime_to_us(ktime_sub(later, earlier)); | ||
285 | } | ||
286 | |||
287 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) | ||
288 | { | ||
289 | return ktime_add_ns(kt, usec * 1000); | ||
290 | } | ||
291 | |||
282 | /* | 292 | /* |
283 | * The resolution of the clocks. The resolution value is returned in | 293 | * The resolution of the clocks. The resolution value is returned in |
284 | * the clock_getres() system call to give application programmers an | 294 | * the clock_getres() system call to give application programmers an |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 88afceffb7cb..494bed7c2fc1 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
14 | 14 | ||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/spinlock.h> | ||
17 | 16 | ||
18 | struct device; | 17 | struct device; |
19 | struct class_device; | 18 | struct class_device; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index a3df64677ac3..47cd2a1c5544 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -196,7 +196,6 @@ enum { | |||
196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | 196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ |
197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ | 197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ |
198 | 198 | ||
199 | ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ | ||
200 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 199 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
201 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 200 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
202 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ | 201 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ |
@@ -435,6 +434,7 @@ struct ata_device { | |||
435 | struct ata_port *ap; | 434 | struct ata_port *ap; |
436 | unsigned int devno; /* 0 or 1 */ | 435 | unsigned int devno; /* 0 or 1 */ |
437 | unsigned long flags; /* ATA_DFLAG_xxx */ | 436 | unsigned long flags; /* ATA_DFLAG_xxx */ |
437 | unsigned int horkage; /* List of broken features */ | ||
438 | struct scsi_device *sdev; /* attached SCSI device */ | 438 | struct scsi_device *sdev; /* attached SCSI device */ |
439 | #ifdef CONFIG_ATA_ACPI | 439 | #ifdef CONFIG_ATA_ACPI |
440 | acpi_handle acpi_handle; | 440 | acpi_handle acpi_handle; |
@@ -466,7 +466,6 @@ struct ata_device { | |||
466 | /* error history */ | 466 | /* error history */ |
467 | struct ata_ering ering; | 467 | struct ata_ering ering; |
468 | int spdn_cnt; | 468 | int spdn_cnt; |
469 | unsigned int horkage; /* List of broken features */ | ||
470 | }; | 469 | }; |
471 | 470 | ||
472 | /* Offset into struct ata_device. Fields above it are maintained | 471 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -794,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
794 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 793 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
795 | unsigned int ofs, unsigned int len); | 794 | unsigned int ofs, unsigned int len); |
796 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); | 795 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); |
797 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | ||
798 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 796 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
799 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 797 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
800 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 798 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -871,11 +869,11 @@ struct pci_bits { | |||
871 | unsigned long val; | 869 | unsigned long val; |
872 | }; | 870 | }; |
873 | 871 | ||
874 | extern int ata_pci_init_native_host(struct ata_host *host); | 872 | extern int ata_pci_init_sff_host(struct ata_host *host); |
875 | extern int ata_pci_init_bmdma(struct ata_host *host); | 873 | extern int ata_pci_init_bmdma(struct ata_host *host); |
876 | extern int ata_pci_prepare_native_host(struct pci_dev *pdev, | 874 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, |
877 | const struct ata_port_info * const * ppi, | 875 | const struct ata_port_info * const * ppi, |
878 | struct ata_host **r_host); | 876 | struct ata_host **r_host); |
879 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 877 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
880 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); | 878 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); |
881 | #endif /* CONFIG_PCI */ | 879 | #endif /* CONFIG_PCI */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 05707e2fccae..e2d1ce36b367 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -39,6 +39,7 @@ | |||
39 | struct nlm_host { | 39 | struct nlm_host { |
40 | struct hlist_node h_hash; /* doubly linked list */ | 40 | struct hlist_node h_hash; /* doubly linked list */ |
41 | struct sockaddr_in h_addr; /* peer address */ | 41 | struct sockaddr_in h_addr; /* peer address */ |
42 | struct sockaddr_in h_saddr; /* our address (optional) */ | ||
42 | struct rpc_clnt * h_rpcclnt; /* RPC client to talk to peer */ | 43 | struct rpc_clnt * h_rpcclnt; /* RPC client to talk to peer */ |
43 | char * h_name; /* remote hostname */ | 44 | char * h_name; /* remote hostname */ |
44 | u32 h_version; /* interface version */ | 45 | u32 h_version; /* interface version */ |
diff --git a/include/linux/lzo.h b/include/linux/lzo.h new file mode 100644 index 000000000000..d793497ec1ca --- /dev/null +++ b/include/linux/lzo.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef __LZO_H__ | ||
2 | #define __LZO_H__ | ||
3 | /* | ||
4 | * LZO Public Kernel Interface | ||
5 | * A mini subset of the LZO real-time data compression library | ||
6 | * | ||
7 | * Copyright (C) 1996-2005 Markus F.X.J. Oberhumer <markus@oberhumer.com> | ||
8 | * | ||
9 | * The full LZO package can be found at: | ||
10 | * http://www.oberhumer.com/opensource/lzo/ | ||
11 | * | ||
12 | * Changed for kernel use by: | ||
13 | * Nitin Gupta <nitingupta910@gmail.com> | ||
14 | * Richard Purdie <rpurdie@openedhand.com> | ||
15 | */ | ||
16 | |||
17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) | ||
18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS | ||
19 | |||
20 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) | ||
21 | |||
22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ | ||
23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | ||
24 | unsigned char *dst, size_t *dst_len, void *wrkmem); | ||
25 | |||
26 | /* safe decompression with overrun testing */ | ||
27 | int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, | ||
28 | unsigned char *dst, size_t *dst_len); | ||
29 | |||
30 | /* | ||
31 | * Return values (< 0 = Error) | ||
32 | */ | ||
33 | #define LZO_E_OK 0 | ||
34 | #define LZO_E_ERROR (-1) | ||
35 | #define LZO_E_OUT_OF_MEMORY (-2) | ||
36 | #define LZO_E_NOT_COMPRESSIBLE (-3) | ||
37 | #define LZO_E_INPUT_OVERRUN (-4) | ||
38 | #define LZO_E_OUTPUT_OVERRUN (-5) | ||
39 | #define LZO_E_LOOKBEHIND_OVERRUN (-6) | ||
40 | #define LZO_E_EOF_NOT_FOUND (-7) | ||
41 | #define LZO_E_INPUT_NOT_CONSUMED (-8) | ||
42 | #define LZO_E_NOT_YET_IMPLEMENTED (-9) | ||
43 | |||
44 | #endif | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index b372f5910fc1..cfb78fb2c046 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -172,6 +172,7 @@ struct mlx4_caps { | |||
172 | int num_pds; | 172 | int num_pds; |
173 | int reserved_pds; | 173 | int reserved_pds; |
174 | int mtt_entry_sz; | 174 | int mtt_entry_sz; |
175 | u32 max_msg_sz; | ||
175 | u32 page_size_cap; | 176 | u32 page_size_cap; |
176 | u32 flags; | 177 | u32 flags; |
177 | u16 stat_rate_support; | 178 | u16 stat_rate_support; |
@@ -322,6 +323,7 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, | |||
322 | u64 db_rec, struct mlx4_srq *srq); | 323 | u64 db_rec, struct mlx4_srq *srq); |
323 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); | 324 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); |
324 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); | 325 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); |
326 | int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark); | ||
325 | 327 | ||
326 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); | 328 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); |
327 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 329 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 10c57d279144..3968b943259a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -282,6 +282,9 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, | 282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, |
283 | int sqd_event, struct mlx4_qp *qp); | 283 | int sqd_event, struct mlx4_qp *qp); |
284 | 284 | ||
285 | int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp, | ||
286 | struct mlx4_qp_context *context); | ||
287 | |||
285 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) | 288 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) |
286 | { | 289 | { |
287 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); | 290 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1c1207472bb4..97d0cddfd223 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_MM_H | 2 | #define _LINUX_MM_H |
3 | 3 | ||
4 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
5 | #include <linux/capability.h> | ||
6 | 5 | ||
7 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
8 | 7 | ||
@@ -27,7 +26,6 @@ extern unsigned long max_mapnr; | |||
27 | 26 | ||
28 | extern unsigned long num_physpages; | 27 | extern unsigned long num_physpages; |
29 | extern void * high_memory; | 28 | extern void * high_memory; |
30 | extern unsigned long vmalloc_earlyreserve; | ||
31 | extern int page_cluster; | 29 | extern int page_cluster; |
32 | 30 | ||
33 | #ifdef CONFIG_SYSCTL | 31 | #ifdef CONFIG_SYSCTL |
@@ -1072,6 +1070,10 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
1072 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | 1070 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, |
1073 | unsigned long len, unsigned long prot, | 1071 | unsigned long len, unsigned long prot, |
1074 | unsigned long flag, unsigned long pgoff); | 1072 | unsigned long flag, unsigned long pgoff); |
1073 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | ||
1074 | unsigned long len, unsigned long flags, | ||
1075 | unsigned int vm_flags, unsigned long pgoff, | ||
1076 | int accountable); | ||
1075 | 1077 | ||
1076 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1078 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1077 | unsigned long len, unsigned long prot, | 1079 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index d09b1345a3a1..04b1636a970b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -566,6 +566,11 @@ int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, | |||
566 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, | 566 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, |
567 | struct file *, void __user *, size_t *, loff_t *); | 567 | struct file *, void __user *, size_t *, loff_t *); |
568 | 568 | ||
569 | extern int numa_zonelist_order_handler(struct ctl_table *, int, | ||
570 | struct file *, void __user *, size_t *, loff_t *); | ||
571 | extern char numa_zonelist_order[]; | ||
572 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ | ||
573 | |||
569 | #include <linux/topology.h> | 574 | #include <linux/topology.h> |
570 | /* Returns the number of the current Node. */ | 575 | /* Returns the number of the current Node. */ |
571 | #ifndef numa_node_id | 576 | #ifndef numa_node_id |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 1fa4d9813b31..8eed44f8ca73 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -14,7 +14,7 @@ struct mnt_namespace { | |||
14 | int event; | 14 | int event; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | extern struct mnt_namespace *copy_mnt_ns(int, struct mnt_namespace *, | 17 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
18 | struct fs_struct *); | 18 | struct fs_struct *); |
19 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 19 | extern void __put_mnt_ns(struct mnt_namespace *ns); |
20 | 20 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index e6e0f86ef5fc..b6a646cea1cb 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
7 | * Rewritten again by Rusty Russell, 2002 | 7 | * Rewritten again by Rusty Russell, 2002 |
8 | */ | 8 | */ |
9 | #include <linux/spinlock.h> | ||
10 | #include <linux/list.h> | 9 | #include <linux/list.h> |
11 | #include <linux/stat.h> | 10 | #include <linux/stat.h> |
12 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 0e09c005dda8..f950921523f5 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -146,7 +146,7 @@ struct fat_boot_fsinfo { | |||
146 | }; | 146 | }; |
147 | 147 | ||
148 | struct msdos_dir_entry { | 148 | struct msdos_dir_entry { |
149 | __u8 name[8],ext[3]; /* name and extension */ | 149 | __u8 name[MSDOS_NAME];/* name and extension */ |
150 | __u8 attr; /* attribute bits */ | 150 | __u8 attr; /* attribute bits */ |
151 | __u8 lcase; /* Case for base and extension */ | 151 | __u8 lcase; /* Case for base and extension */ |
152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ | 152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 83e39eb054d3..88766e43e121 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -148,8 +148,6 @@ struct ncp_nls_ioctl | |||
148 | #include <linux/ncp_fs_i.h> | 148 | #include <linux/ncp_fs_i.h> |
149 | #include <linux/ncp_fs_sb.h> | 149 | #include <linux/ncp_fs_sb.h> |
150 | 150 | ||
151 | /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ | ||
152 | #undef PRINTK | ||
153 | /* define because it is easy to change PRINTK to {*}PRINTK */ | 151 | /* define because it is easy to change PRINTK to {*}PRINTK */ |
154 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) | 152 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) |
155 | 153 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3a70f553b28f..322b5eae57dd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -108,6 +108,14 @@ struct wireless_dev; | |||
108 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 108 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct net_device_subqueue | ||
112 | { | ||
113 | /* Give a control state for each queue. This struct may contain | ||
114 | * per-queue locks in the future. | ||
115 | */ | ||
116 | unsigned long state; | ||
117 | }; | ||
118 | |||
111 | /* | 119 | /* |
112 | * Network device statistics. Akin to the 2.0 ether stats but | 120 | * Network device statistics. Akin to the 2.0 ether stats but |
113 | * with byte counters. | 121 | * with byte counters. |
@@ -177,19 +185,25 @@ struct netif_rx_stats | |||
177 | 185 | ||
178 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 186 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
179 | 187 | ||
188 | struct dev_addr_list | ||
189 | { | ||
190 | struct dev_addr_list *next; | ||
191 | u8 da_addr[MAX_ADDR_LEN]; | ||
192 | u8 da_addrlen; | ||
193 | u8 da_synced; | ||
194 | int da_users; | ||
195 | int da_gusers; | ||
196 | }; | ||
180 | 197 | ||
181 | /* | 198 | /* |
182 | * We tag multicasts with these structures. | 199 | * We tag multicasts with these structures. |
183 | */ | 200 | */ |
184 | 201 | ||
185 | struct dev_mc_list | 202 | #define dev_mc_list dev_addr_list |
186 | { | 203 | #define dmi_addr da_addr |
187 | struct dev_mc_list *next; | 204 | #define dmi_addrlen da_addrlen |
188 | __u8 dmi_addr[MAX_ADDR_LEN]; | 205 | #define dmi_users da_users |
189 | unsigned char dmi_addrlen; | 206 | #define dmi_gusers da_gusers |
190 | int dmi_users; | ||
191 | int dmi_gusers; | ||
192 | }; | ||
193 | 207 | ||
194 | struct hh_cache | 208 | struct hh_cache |
195 | { | 209 | { |
@@ -248,6 +262,8 @@ enum netdev_state_t | |||
248 | __LINK_STATE_LINKWATCH_PENDING, | 262 | __LINK_STATE_LINKWATCH_PENDING, |
249 | __LINK_STATE_DORMANT, | 263 | __LINK_STATE_DORMANT, |
250 | __LINK_STATE_QDISC_RUNNING, | 264 | __LINK_STATE_QDISC_RUNNING, |
265 | /* Set by the netpoll NAPI code */ | ||
266 | __LINK_STATE_POLL_LIST_FROZEN, | ||
251 | }; | 267 | }; |
252 | 268 | ||
253 | 269 | ||
@@ -314,9 +330,10 @@ struct net_device | |||
314 | /* Net device features */ | 330 | /* Net device features */ |
315 | unsigned long features; | 331 | unsigned long features; |
316 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 332 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
317 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | 333 | #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */ |
318 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 334 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
319 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | 335 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ |
336 | #define NETIF_F_IPV6_CSUM 16 /* Can checksum TCP/UDP over IPV6 */ | ||
320 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | 337 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ |
321 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | 338 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ |
322 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | 339 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ |
@@ -325,6 +342,7 @@ struct net_device | |||
325 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | 342 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ |
326 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ | 343 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ |
327 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | 344 | #define NETIF_F_LLTX 4096 /* LockLess TX */ |
345 | #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ | ||
328 | 346 | ||
329 | /* Segmentation offload features */ | 347 | /* Segmentation offload features */ |
330 | #define NETIF_F_GSO_SHIFT 16 | 348 | #define NETIF_F_GSO_SHIFT 16 |
@@ -338,8 +356,11 @@ struct net_device | |||
338 | /* List of features with software fallbacks. */ | 356 | /* List of features with software fallbacks. */ |
339 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | 357 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) |
340 | 358 | ||
359 | |||
341 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 360 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
342 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 361 | #define NETIF_F_V4_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IP_CSUM) |
362 | #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) | ||
363 | #define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) | ||
343 | 364 | ||
344 | struct net_device *next_sched; | 365 | struct net_device *next_sched; |
345 | 366 | ||
@@ -388,7 +409,10 @@ struct net_device | |||
388 | unsigned char addr_len; /* hardware address length */ | 409 | unsigned char addr_len; /* hardware address length */ |
389 | unsigned short dev_id; /* for shared network cards */ | 410 | unsigned short dev_id; /* for shared network cards */ |
390 | 411 | ||
391 | struct dev_mc_list *mc_list; /* Multicast mac addresses */ | 412 | struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */ |
413 | int uc_count; /* Number of installed ucasts */ | ||
414 | int uc_promisc; | ||
415 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | ||
392 | int mc_count; /* Number of installed mcasts */ | 416 | int mc_count; /* Number of installed mcasts */ |
393 | int promiscuity; | 417 | int promiscuity; |
394 | int allmulti; | 418 | int allmulti; |
@@ -493,6 +517,11 @@ struct net_device | |||
493 | void *saddr, | 517 | void *saddr, |
494 | unsigned len); | 518 | unsigned len); |
495 | int (*rebuild_header)(struct sk_buff *skb); | 519 | int (*rebuild_header)(struct sk_buff *skb); |
520 | #define HAVE_CHANGE_RX_FLAGS | ||
521 | void (*change_rx_flags)(struct net_device *dev, | ||
522 | int flags); | ||
523 | #define HAVE_SET_RX_MODE | ||
524 | void (*set_rx_mode)(struct net_device *dev); | ||
496 | #define HAVE_MULTICAST | 525 | #define HAVE_MULTICAST |
497 | void (*set_multicast_list)(struct net_device *dev); | 526 | void (*set_multicast_list)(struct net_device *dev); |
498 | #define HAVE_SET_MAC_ADDR | 527 | #define HAVE_SET_MAC_ADDR |
@@ -535,22 +564,29 @@ struct net_device | |||
535 | 564 | ||
536 | /* bridge stuff */ | 565 | /* bridge stuff */ |
537 | struct net_bridge_port *br_port; | 566 | struct net_bridge_port *br_port; |
567 | /* macvlan */ | ||
568 | struct macvlan_port *macvlan_port; | ||
538 | 569 | ||
539 | /* class/net/name entry */ | 570 | /* class/net/name entry */ |
540 | struct device dev; | 571 | struct device dev; |
541 | /* space for optional statistics and wireless sysfs groups */ | 572 | /* space for optional statistics and wireless sysfs groups */ |
542 | struct attribute_group *sysfs_groups[3]; | 573 | struct attribute_group *sysfs_groups[3]; |
574 | |||
575 | /* rtnetlink link ops */ | ||
576 | const struct rtnl_link_ops *rtnl_link_ops; | ||
577 | |||
578 | /* The TX queue control structures */ | ||
579 | unsigned int egress_subqueue_count; | ||
580 | struct net_device_subqueue egress_subqueue[0]; | ||
543 | }; | 581 | }; |
544 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 582 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
545 | 583 | ||
546 | #define NETDEV_ALIGN 32 | 584 | #define NETDEV_ALIGN 32 |
547 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 585 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
548 | 586 | ||
549 | static inline void *netdev_priv(struct net_device *dev) | 587 | static inline void *netdev_priv(const struct net_device *dev) |
550 | { | 588 | { |
551 | return (char *)dev + ((sizeof(struct net_device) | 589 | return dev->priv; |
552 | + NETDEV_ALIGN_CONST) | ||
553 | & ~NETDEV_ALIGN_CONST); | ||
554 | } | 590 | } |
555 | 591 | ||
556 | #define SET_MODULE_OWNER(dev) do { } while (0) | 592 | #define SET_MODULE_OWNER(dev) do { } while (0) |
@@ -702,6 +738,62 @@ static inline int netif_running(const struct net_device *dev) | |||
702 | return test_bit(__LINK_STATE_START, &dev->state); | 738 | return test_bit(__LINK_STATE_START, &dev->state); |
703 | } | 739 | } |
704 | 740 | ||
741 | /* | ||
742 | * Routines to manage the subqueues on a device. We only need start | ||
743 | * stop, and a check if it's stopped. All other device management is | ||
744 | * done at the overall netdevice level. | ||
745 | * Also test the device if we're multiqueue. | ||
746 | */ | ||
747 | static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) | ||
748 | { | ||
749 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
750 | clear_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
751 | #endif | ||
752 | } | ||
753 | |||
754 | static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index) | ||
755 | { | ||
756 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
757 | #ifdef CONFIG_NETPOLL_TRAP | ||
758 | if (netpoll_trap()) | ||
759 | return; | ||
760 | #endif | ||
761 | set_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
762 | #endif | ||
763 | } | ||
764 | |||
765 | static inline int netif_subqueue_stopped(const struct net_device *dev, | ||
766 | u16 queue_index) | ||
767 | { | ||
768 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
769 | return test_bit(__LINK_STATE_XOFF, | ||
770 | &dev->egress_subqueue[queue_index].state); | ||
771 | #else | ||
772 | return 0; | ||
773 | #endif | ||
774 | } | ||
775 | |||
776 | static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | ||
777 | { | ||
778 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
779 | #ifdef CONFIG_NETPOLL_TRAP | ||
780 | if (netpoll_trap()) | ||
781 | return; | ||
782 | #endif | ||
783 | if (test_and_clear_bit(__LINK_STATE_XOFF, | ||
784 | &dev->egress_subqueue[queue_index].state)) | ||
785 | __netif_schedule(dev); | ||
786 | #endif | ||
787 | } | ||
788 | |||
789 | static inline int netif_is_multiqueue(const struct net_device *dev) | ||
790 | { | ||
791 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
792 | return (!!(NETIF_F_MULTI_QUEUE & dev->features)); | ||
793 | #else | ||
794 | return 0; | ||
795 | #endif | ||
796 | } | ||
705 | 797 | ||
706 | /* Use this variant when it is known for sure that it | 798 | /* Use this variant when it is known for sure that it |
707 | * is executing from interrupt context. | 799 | * is executing from interrupt context. |
@@ -930,6 +1022,14 @@ static inline void netif_rx_complete(struct net_device *dev) | |||
930 | { | 1022 | { |
931 | unsigned long flags; | 1023 | unsigned long flags; |
932 | 1024 | ||
1025 | #ifdef CONFIG_NETPOLL | ||
1026 | /* Prevent race with netpoll - yes, this is a kludge. | ||
1027 | * But at least it doesn't penalize the non-netpoll | ||
1028 | * code path. */ | ||
1029 | if (test_bit(__LINK_STATE_POLL_LIST_FROZEN, &dev->state)) | ||
1030 | return; | ||
1031 | #endif | ||
1032 | |||
933 | local_irq_save(flags); | 1033 | local_irq_save(flags); |
934 | __netif_rx_complete(dev); | 1034 | __netif_rx_complete(dev); |
935 | local_irq_restore(flags); | 1035 | local_irq_restore(flags); |
@@ -992,15 +1092,26 @@ static inline void netif_tx_disable(struct net_device *dev) | |||
992 | extern void ether_setup(struct net_device *dev); | 1092 | extern void ether_setup(struct net_device *dev); |
993 | 1093 | ||
994 | /* Support for loadable net-drivers */ | 1094 | /* Support for loadable net-drivers */ |
995 | extern struct net_device *alloc_netdev(int sizeof_priv, const char *name, | 1095 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, |
996 | void (*setup)(struct net_device *)); | 1096 | void (*setup)(struct net_device *), |
1097 | unsigned int queue_count); | ||
1098 | #define alloc_netdev(sizeof_priv, name, setup) \ | ||
1099 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | ||
997 | extern int register_netdev(struct net_device *dev); | 1100 | extern int register_netdev(struct net_device *dev); |
998 | extern void unregister_netdev(struct net_device *dev); | 1101 | extern void unregister_netdev(struct net_device *dev); |
999 | /* Functions used for multicast support */ | 1102 | /* Functions used for secondary unicast and multicast support */ |
1000 | extern void dev_mc_upload(struct net_device *dev); | 1103 | extern void dev_set_rx_mode(struct net_device *dev); |
1104 | extern void __dev_set_rx_mode(struct net_device *dev); | ||
1105 | extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); | ||
1106 | extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); | ||
1001 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | 1107 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); |
1002 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | 1108 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); |
1109 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
1110 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
1003 | extern void dev_mc_discard(struct net_device *dev); | 1111 | extern void dev_mc_discard(struct net_device *dev); |
1112 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
1113 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
1114 | extern void __dev_addr_discard(struct dev_addr_list **list); | ||
1004 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 1115 | extern void dev_set_promiscuity(struct net_device *dev, int inc); |
1005 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 1116 | extern void dev_set_allmulti(struct net_device *dev, int inc); |
1006 | extern void netdev_state_change(struct net_device *dev); | 1117 | extern void netdev_state_change(struct net_device *dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 10b5c6275706..0eed0b7ab2df 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -275,7 +275,8 @@ struct nf_queue_handler { | |||
275 | }; | 275 | }; |
276 | extern int nf_register_queue_handler(int pf, | 276 | extern int nf_register_queue_handler(int pf, |
277 | struct nf_queue_handler *qh); | 277 | struct nf_queue_handler *qh); |
278 | extern int nf_unregister_queue_handler(int pf); | 278 | extern int nf_unregister_queue_handler(int pf, |
279 | struct nf_queue_handler *qh); | ||
279 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); | 280 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); |
280 | extern void nf_reinject(struct sk_buff *skb, | 281 | extern void nf_reinject(struct sk_buff *skb, |
281 | struct nf_info *info, | 282 | struct nf_info *info, |
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h index 9d8144a488cd..c93061f33144 100644 --- a/include/linux/netfilter/nf_conntrack_pptp.h +++ b/include/linux/netfilter/nf_conntrack_pptp.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #include <linux/netfilter/nf_conntrack_common.h> | 5 | #include <linux/netfilter/nf_conntrack_common.h> |
6 | 6 | ||
7 | extern const char *pptp_msg_name[]; | ||
8 | |||
7 | /* state of the control session */ | 9 | /* state of the control session */ |
8 | enum pptp_ctrlsess_state { | 10 | enum pptp_ctrlsess_state { |
9 | PPTP_SESSION_NONE, /* no session present */ | 11 | PPTP_SESSION_NONE, /* no session present */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7e733a6ba4f6..64f425a855bb 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -141,22 +141,22 @@ struct xt_match | |||
141 | /* Arguments changed since 2.6.9, as this must now handle | 141 | /* Arguments changed since 2.6.9, as this must now handle |
142 | non-linear skb, using skb_header_pointer and | 142 | non-linear skb, using skb_header_pointer and |
143 | skb_ip_make_writable. */ | 143 | skb_ip_make_writable. */ |
144 | int (*match)(const struct sk_buff *skb, | 144 | bool (*match)(const struct sk_buff *skb, |
145 | const struct net_device *in, | 145 | const struct net_device *in, |
146 | const struct net_device *out, | 146 | const struct net_device *out, |
147 | const struct xt_match *match, | 147 | const struct xt_match *match, |
148 | const void *matchinfo, | 148 | const void *matchinfo, |
149 | int offset, | 149 | int offset, |
150 | unsigned int protoff, | 150 | unsigned int protoff, |
151 | int *hotdrop); | 151 | bool *hotdrop); |
152 | 152 | ||
153 | /* Called when user tries to insert an entry of this type. */ | 153 | /* Called when user tries to insert an entry of this type. */ |
154 | /* Should return true or false. */ | 154 | /* Should return true or false. */ |
155 | int (*checkentry)(const char *tablename, | 155 | bool (*checkentry)(const char *tablename, |
156 | const void *ip, | 156 | const void *ip, |
157 | const struct xt_match *match, | 157 | const struct xt_match *match, |
158 | void *matchinfo, | 158 | void *matchinfo, |
159 | unsigned int hook_mask); | 159 | unsigned int hook_mask); |
160 | 160 | ||
161 | /* Called when entry of this type deleted. */ | 161 | /* Called when entry of this type deleted. */ |
162 | void (*destroy)(const struct xt_match *match, void *matchinfo); | 162 | void (*destroy)(const struct xt_match *match, void *matchinfo); |
@@ -202,11 +202,11 @@ struct xt_target | |||
202 | hook_mask is a bitmask of hooks from which it can be | 202 | hook_mask is a bitmask of hooks from which it can be |
203 | called. */ | 203 | called. */ |
204 | /* Should return true or false. */ | 204 | /* Should return true or false. */ |
205 | int (*checkentry)(const char *tablename, | 205 | bool (*checkentry)(const char *tablename, |
206 | const void *entry, | 206 | const void *entry, |
207 | const struct xt_target *target, | 207 | const struct xt_target *target, |
208 | void *targinfo, | 208 | void *targinfo, |
209 | unsigned int hook_mask); | 209 | unsigned int hook_mask); |
210 | 210 | ||
211 | /* Called when entry of this type deleted. */ | 211 | /* Called when entry of this type deleted. */ |
212 | void (*destroy)(const struct xt_target *target, void *targinfo); | 212 | void (*destroy)(const struct xt_target *target, void *targinfo); |
diff --git a/include/linux/netfilter/xt_connlimit.h b/include/linux/netfilter/xt_connlimit.h new file mode 100644 index 000000000000..90ae8b474cb8 --- /dev/null +++ b/include/linux/netfilter/xt_connlimit.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _XT_CONNLIMIT_H | ||
2 | #define _XT_CONNLIMIT_H | ||
3 | |||
4 | struct xt_connlimit_data; | ||
5 | |||
6 | struct xt_connlimit_info { | ||
7 | union { | ||
8 | u_int32_t v4_mask; | ||
9 | u_int32_t v6_mask[4]; | ||
10 | }; | ||
11 | unsigned int limit, inverse; | ||
12 | |||
13 | /* this needs to be at the end */ | ||
14 | struct xt_connlimit_data *data __attribute__((aligned(8))); | ||
15 | }; | ||
16 | |||
17 | #endif /* _XT_CONNLIMIT_H */ | ||
diff --git a/include/linux/netfilter/xt_u32.h b/include/linux/netfilter/xt_u32.h new file mode 100644 index 000000000000..9947f56cdbdd --- /dev/null +++ b/include/linux/netfilter/xt_u32.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _XT_U32_H | ||
2 | #define _XT_U32_H 1 | ||
3 | |||
4 | enum xt_u32_ops { | ||
5 | XT_U32_AND, | ||
6 | XT_U32_LEFTSH, | ||
7 | XT_U32_RIGHTSH, | ||
8 | XT_U32_AT, | ||
9 | }; | ||
10 | |||
11 | struct xt_u32_location_element { | ||
12 | u_int32_t number; | ||
13 | u_int8_t nextop; | ||
14 | }; | ||
15 | |||
16 | struct xt_u32_value_element { | ||
17 | u_int32_t min; | ||
18 | u_int32_t max; | ||
19 | }; | ||
20 | |||
21 | /* | ||
22 | * Any way to allow for an arbitrary number of elements? | ||
23 | * For now, I settle with a limit of 10 each. | ||
24 | */ | ||
25 | #define XT_U32_MAXSIZE 10 | ||
26 | |||
27 | struct xt_u32_test { | ||
28 | struct xt_u32_location_element location[XT_U32_MAXSIZE+1]; | ||
29 | struct xt_u32_value_element value[XT_U32_MAXSIZE+1]; | ||
30 | u_int8_t nnums; | ||
31 | u_int8_t nvalues; | ||
32 | }; | ||
33 | |||
34 | struct xt_u32 { | ||
35 | struct xt_u32_test tests[XT_U32_MAXSIZE+1]; | ||
36 | u_int8_t ntests; | ||
37 | u_int8_t invert; | ||
38 | }; | ||
39 | |||
40 | #endif /* _XT_U32_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h index d9bceedfb3dc..daf50be22c9d 100644 --- a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h +++ b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | |||
@@ -18,13 +18,13 @@ struct clusterip_config; | |||
18 | struct ipt_clusterip_tgt_info { | 18 | struct ipt_clusterip_tgt_info { |
19 | 19 | ||
20 | u_int32_t flags; | 20 | u_int32_t flags; |
21 | 21 | ||
22 | /* only relevant for new ones */ | 22 | /* only relevant for new ones */ |
23 | u_int8_t clustermac[6]; | 23 | u_int8_t clustermac[6]; |
24 | u_int16_t num_total_nodes; | 24 | u_int16_t num_total_nodes; |
25 | u_int16_t num_local_nodes; | 25 | u_int16_t num_local_nodes; |
26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; | 26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; |
27 | enum clusterip_hashmode hash_mode; | 27 | u_int32_t hash_mode; |
28 | u_int32_t hash_initval; | 28 | u_int32_t hash_initval; |
29 | 29 | ||
30 | struct clusterip_config *config; | 30 | struct clusterip_config *config; |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4686f8342cbd..9a720f05888f 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -44,8 +44,14 @@ struct ip6t_ip6 { | |||
44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; | 44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; |
45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | 45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; |
46 | 46 | ||
47 | /* ARGH, HopByHop uses 0, so can't do 0 = ANY, | 47 | /* Upper protocol number |
48 | instead IP6T_F_NOPROTO must be set */ | 48 | * - The allowed value is 0 (any) or protocol number of last parsable |
49 | * header, which is 50 (ESP), 59 (No Next Header), 135 (MH), or | ||
50 | * the non IPv6 extension headers. | ||
51 | * - The protocol numbers of IPv6 extension headers except of ESP and | ||
52 | * MH do not match any packets. | ||
53 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. | ||
54 | */ | ||
49 | u_int16_t proto; | 55 | u_int16_t proto; |
50 | /* TOS to match iff flags & IP6T_F_TOS */ | 56 | /* TOS to match iff flags & IP6T_F_TOS */ |
51 | u_int8_t tos; | 57 | u_int8_t tos; |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 7e7f33a38fc0..8726491de154 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | #define NFS4_BITMAP_SIZE 2 | ||
18 | #define NFS4_VERIFIER_SIZE 8 | 19 | #define NFS4_VERIFIER_SIZE 8 |
19 | #define NFS4_STATEID_SIZE 16 | 20 | #define NFS4_STATEID_SIZE 16 |
20 | #define NFS4_FHSIZE 128 | 21 | #define NFS4_FHSIZE 128 |
diff --git a/include/linux/nfs4_mount.h b/include/linux/nfs4_mount.h index 26b4c83f831d..a0dcf6655657 100644 --- a/include/linux/nfs4_mount.h +++ b/include/linux/nfs4_mount.h | |||
@@ -65,6 +65,7 @@ struct nfs4_mount_data { | |||
65 | #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ | 65 | #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ |
66 | #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ | 66 | #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ |
67 | #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ | 67 | #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ |
68 | #define NFS4_MOUNT_FLAGMASK 0xFFFF | 68 | #define NFS4_MOUNT_UNSHARED 0x8000 /* 1 */ |
69 | #define NFS4_MOUNT_FLAGMASK 0x9033 | ||
69 | 70 | ||
70 | #endif | 71 | #endif |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 0543439a97af..c098ae194f79 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -30,7 +30,9 @@ | |||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | 31 | ||
32 | #include <linux/in.h> | 32 | #include <linux/in.h> |
33 | #include <linux/kref.h> | ||
33 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/namei.h> | ||
34 | #include <linux/pagemap.h> | 36 | #include <linux/pagemap.h> |
35 | #include <linux/rbtree.h> | 37 | #include <linux/rbtree.h> |
36 | #include <linux/rwsem.h> | 38 | #include <linux/rwsem.h> |
@@ -69,9 +71,8 @@ struct nfs_access_entry { | |||
69 | 71 | ||
70 | struct nfs4_state; | 72 | struct nfs4_state; |
71 | struct nfs_open_context { | 73 | struct nfs_open_context { |
72 | atomic_t count; | 74 | struct kref kref; |
73 | struct vfsmount *vfsmnt; | 75 | struct path path; |
74 | struct dentry *dentry; | ||
75 | struct rpc_cred *cred; | 76 | struct rpc_cred *cred; |
76 | struct nfs4_state *state; | 77 | struct nfs4_state *state; |
77 | fl_owner_t lockowner; | 78 | fl_owner_t lockowner; |
@@ -155,13 +156,9 @@ struct nfs_inode { | |||
155 | /* | 156 | /* |
156 | * This is the list of dirty unwritten pages. | 157 | * This is the list of dirty unwritten pages. |
157 | */ | 158 | */ |
158 | spinlock_t req_lock; | ||
159 | struct list_head dirty; | ||
160 | struct list_head commit; | ||
161 | struct radix_tree_root nfs_page_tree; | 159 | struct radix_tree_root nfs_page_tree; |
162 | 160 | ||
163 | unsigned int ndirty, | 161 | unsigned long ncommit, |
164 | ncommit, | ||
165 | npages; | 162 | npages; |
166 | 163 | ||
167 | /* Open contexts for shared mmap writes */ | 164 | /* Open contexts for shared mmap writes */ |
@@ -187,6 +184,7 @@ struct nfs_inode { | |||
187 | #define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */ | 184 | #define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */ |
188 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ | 185 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ |
189 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ | 186 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ |
187 | #define NFS_INO_REVAL_FORCED 0x0040 /* force revalidation ignoring a delegation */ | ||
190 | 188 | ||
191 | /* | 189 | /* |
192 | * Bit offsets in flags field | 190 | * Bit offsets in flags field |
@@ -496,21 +494,18 @@ static inline void nfs3_forget_cached_acls(struct inode *inode) | |||
496 | 494 | ||
497 | /* | 495 | /* |
498 | * linux/fs/mount_clnt.c | 496 | * linux/fs/mount_clnt.c |
499 | * (Used only by nfsroot module) | ||
500 | */ | 497 | */ |
501 | extern int nfsroot_mount(struct sockaddr_in *, char *, struct nfs_fh *, | 498 | extern int nfs_mount(struct sockaddr *, size_t, char *, char *, |
502 | int, int); | 499 | int, int, struct nfs_fh *); |
503 | 500 | ||
504 | /* | 501 | /* |
505 | * inline functions | 502 | * inline functions |
506 | */ | 503 | */ |
507 | 504 | ||
508 | static inline loff_t | 505 | static inline loff_t nfs_size_to_loff_t(__u64 size) |
509 | nfs_size_to_loff_t(__u64 size) | ||
510 | { | 506 | { |
511 | loff_t maxsz = (((loff_t) ULONG_MAX) << PAGE_CACHE_SHIFT) + PAGE_CACHE_SIZE - 1; | 507 | if (size > (__u64) OFFSET_MAX - 1) |
512 | if (size > maxsz) | 508 | return OFFSET_MAX - 1; |
513 | return maxsz; | ||
514 | return (loff_t) size; | 509 | return (loff_t) size; |
515 | } | 510 | } |
516 | 511 | ||
@@ -557,6 +552,7 @@ extern void * nfs_root_data(void); | |||
557 | #define NFSDBG_ROOT 0x0080 | 552 | #define NFSDBG_ROOT 0x0080 |
558 | #define NFSDBG_CALLBACK 0x0100 | 553 | #define NFSDBG_CALLBACK 0x0100 |
559 | #define NFSDBG_CLIENT 0x0200 | 554 | #define NFSDBG_CLIENT 0x0200 |
555 | #define NFSDBG_MOUNT 0x0400 | ||
560 | #define NFSDBG_ALL 0xFFFF | 556 | #define NFSDBG_ALL 0xFFFF |
561 | 557 | ||
562 | #ifdef __KERNEL__ | 558 | #ifdef __KERNEL__ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 52b4378311c8..0cac49bc0955 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -16,7 +16,6 @@ struct nfs_client { | |||
16 | #define NFS_CS_INITING 1 /* busy initialising */ | 16 | #define NFS_CS_INITING 1 /* busy initialising */ |
17 | int cl_nfsversion; /* NFS protocol version */ | 17 | int cl_nfsversion; /* NFS protocol version */ |
18 | unsigned long cl_res_state; /* NFS resources state */ | 18 | unsigned long cl_res_state; /* NFS resources state */ |
19 | #define NFS_CS_RPCIOD 0 /* - rpciod started */ | ||
20 | #define NFS_CS_CALLBACK 1 /* - callback started */ | 19 | #define NFS_CS_CALLBACK 1 /* - callback started */ |
21 | #define NFS_CS_IDMAP 2 /* - idmap started */ | 20 | #define NFS_CS_IDMAP 2 /* - idmap started */ |
22 | #define NFS_CS_RENEWD 3 /* - renewd started */ | 21 | #define NFS_CS_RENEWD 3 /* - renewd started */ |
@@ -35,7 +34,8 @@ struct nfs_client { | |||
35 | nfs4_verifier cl_confirm; | 34 | nfs4_verifier cl_confirm; |
36 | unsigned long cl_state; | 35 | unsigned long cl_state; |
37 | 36 | ||
38 | u32 cl_lockowner_id; | 37 | struct rb_root cl_openowner_id; |
38 | struct rb_root cl_lockowner_id; | ||
39 | 39 | ||
40 | /* | 40 | /* |
41 | * The following rwsem ensures exclusive access to the server | 41 | * The following rwsem ensures exclusive access to the server |
@@ -44,9 +44,7 @@ struct nfs_client { | |||
44 | struct rw_semaphore cl_sem; | 44 | struct rw_semaphore cl_sem; |
45 | 45 | ||
46 | struct list_head cl_delegations; | 46 | struct list_head cl_delegations; |
47 | struct list_head cl_state_owners; | 47 | struct rb_root cl_state_owners; |
48 | struct list_head cl_unused; | ||
49 | int cl_nunused; | ||
50 | spinlock_t cl_lock; | 48 | spinlock_t cl_lock; |
51 | 49 | ||
52 | unsigned long cl_lease_time; | 50 | unsigned long cl_lease_time; |
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index cc8b9c59acb8..a3ade89a64d2 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h | |||
@@ -37,7 +37,7 @@ struct nfs_mount_data { | |||
37 | int acdirmin; /* 1 */ | 37 | int acdirmin; /* 1 */ |
38 | int acdirmax; /* 1 */ | 38 | int acdirmax; /* 1 */ |
39 | struct sockaddr_in addr; /* 1 */ | 39 | struct sockaddr_in addr; /* 1 */ |
40 | char hostname[256]; /* 1 */ | 40 | char hostname[NFS_MAXNAMLEN + 1]; /* 1 */ |
41 | int namlen; /* 2 */ | 41 | int namlen; /* 2 */ |
42 | unsigned int bsize; /* 3 */ | 42 | unsigned int bsize; /* 3 */ |
43 | struct nfs3_fh root; /* 4 */ | 43 | struct nfs3_fh root; /* 4 */ |
@@ -62,6 +62,7 @@ struct nfs_mount_data { | |||
62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ | 62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ |
63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ | 63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ |
64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ | 64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ |
65 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ | ||
65 | #define NFS_MOUNT_FLAGMASK 0xFFFF | 66 | #define NFS_MOUNT_FLAGMASK 0xFFFF |
66 | 67 | ||
67 | #endif | 68 | #endif |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index bd193af80162..78e60798d10e 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -16,12 +16,13 @@ | |||
16 | #include <linux/sunrpc/auth.h> | 16 | #include <linux/sunrpc/auth.h> |
17 | #include <linux/nfs_xdr.h> | 17 | #include <linux/nfs_xdr.h> |
18 | 18 | ||
19 | #include <asm/atomic.h> | 19 | #include <linux/kref.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Valid flags for the radix tree | 22 | * Valid flags for the radix tree |
23 | */ | 23 | */ |
24 | #define NFS_PAGE_TAG_WRITEBACK 0 | 24 | #define NFS_PAGE_TAG_LOCKED 0 |
25 | #define NFS_PAGE_TAG_COMMIT 1 | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Valid flags for a dirty buffer | 28 | * Valid flags for a dirty buffer |
@@ -33,8 +34,7 @@ | |||
33 | 34 | ||
34 | struct nfs_inode; | 35 | struct nfs_inode; |
35 | struct nfs_page { | 36 | struct nfs_page { |
36 | struct list_head wb_list, /* Defines state of page: */ | 37 | struct list_head wb_list; /* Defines state of page: */ |
37 | *wb_list_head; /* read/write/commit */ | ||
38 | struct page *wb_page; /* page to read in/write out */ | 38 | struct page *wb_page; /* page to read in/write out */ |
39 | struct nfs_open_context *wb_context; /* File state context info */ | 39 | struct nfs_open_context *wb_context; /* File state context info */ |
40 | atomic_t wb_complete; /* i/os we're waiting for */ | 40 | atomic_t wb_complete; /* i/os we're waiting for */ |
@@ -42,7 +42,7 @@ struct nfs_page { | |||
42 | unsigned int wb_offset, /* Offset & ~PAGE_CACHE_MASK */ | 42 | unsigned int wb_offset, /* Offset & ~PAGE_CACHE_MASK */ |
43 | wb_pgbase, /* Start of page data */ | 43 | wb_pgbase, /* Start of page data */ |
44 | wb_bytes; /* Length of request */ | 44 | wb_bytes; /* Length of request */ |
45 | atomic_t wb_count; /* reference count */ | 45 | struct kref wb_kref; /* reference count */ |
46 | unsigned long wb_flags; | 46 | unsigned long wb_flags; |
47 | struct nfs_writeverf wb_verf; /* Commit cookie */ | 47 | struct nfs_writeverf wb_verf; /* Commit cookie */ |
48 | }; | 48 | }; |
@@ -71,8 +71,8 @@ extern void nfs_clear_request(struct nfs_page *req); | |||
71 | extern void nfs_release_request(struct nfs_page *req); | 71 | extern void nfs_release_request(struct nfs_page *req); |
72 | 72 | ||
73 | 73 | ||
74 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, struct list_head *dst, | 74 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst, |
75 | pgoff_t idx_start, unsigned int npages); | 75 | pgoff_t idx_start, unsigned int npages, int tag); |
76 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | 76 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, |
77 | struct inode *inode, | 77 | struct inode *inode, |
78 | int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), | 78 | int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), |
@@ -84,12 +84,11 @@ extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); | |||
84 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); | 84 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); |
85 | extern int nfs_wait_on_request(struct nfs_page *); | 85 | extern int nfs_wait_on_request(struct nfs_page *); |
86 | extern void nfs_unlock_request(struct nfs_page *req); | 86 | extern void nfs_unlock_request(struct nfs_page *req); |
87 | extern int nfs_set_page_writeback_locked(struct nfs_page *req); | 87 | extern void nfs_clear_page_tag_locked(struct nfs_page *req); |
88 | extern void nfs_clear_page_writeback(struct nfs_page *req); | ||
89 | 88 | ||
90 | 89 | ||
91 | /* | 90 | /* |
92 | * Lock the page of an asynchronous request without incrementing the wb_count | 91 | * Lock the page of an asynchronous request without getting a new reference |
93 | */ | 92 | */ |
94 | static inline int | 93 | static inline int |
95 | nfs_lock_request_dontget(struct nfs_page *req) | 94 | nfs_lock_request_dontget(struct nfs_page *req) |
@@ -98,14 +97,14 @@ nfs_lock_request_dontget(struct nfs_page *req) | |||
98 | } | 97 | } |
99 | 98 | ||
100 | /* | 99 | /* |
101 | * Lock the page of an asynchronous request | 100 | * Lock the page of an asynchronous request and take a reference |
102 | */ | 101 | */ |
103 | static inline int | 102 | static inline int |
104 | nfs_lock_request(struct nfs_page *req) | 103 | nfs_lock_request(struct nfs_page *req) |
105 | { | 104 | { |
106 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) | 105 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) |
107 | return 0; | 106 | return 0; |
108 | atomic_inc(&req->wb_count); | 107 | kref_get(&req->wb_kref); |
109 | return 1; | 108 | return 1; |
110 | } | 109 | } |
111 | 110 | ||
@@ -118,7 +117,6 @@ static inline void | |||
118 | nfs_list_add_request(struct nfs_page *req, struct list_head *head) | 117 | nfs_list_add_request(struct nfs_page *req, struct list_head *head) |
119 | { | 118 | { |
120 | list_add_tail(&req->wb_list, head); | 119 | list_add_tail(&req->wb_list, head); |
121 | req->wb_list_head = head; | ||
122 | } | 120 | } |
123 | 121 | ||
124 | 122 | ||
@@ -132,7 +130,6 @@ nfs_list_remove_request(struct nfs_page *req) | |||
132 | if (list_empty(&req->wb_list)) | 130 | if (list_empty(&req->wb_list)) |
133 | return; | 131 | return; |
134 | list_del_init(&req->wb_list); | 132 | list_del_init(&req->wb_list); |
135 | req->wb_list_head = NULL; | ||
136 | } | 133 | } |
137 | 134 | ||
138 | static inline struct nfs_page * | 135 | static inline struct nfs_page * |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 10c26ed0db71..38d77681cf27 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -119,7 +119,7 @@ struct nfs_openargs { | |||
119 | struct nfs_seqid * seqid; | 119 | struct nfs_seqid * seqid; |
120 | int open_flags; | 120 | int open_flags; |
121 | __u64 clientid; | 121 | __u64 clientid; |
122 | __u32 id; | 122 | __u64 id; |
123 | union { | 123 | union { |
124 | struct iattr * attrs; /* UNCHECKED, GUARDED */ | 124 | struct iattr * attrs; /* UNCHECKED, GUARDED */ |
125 | nfs4_verifier verifier; /* EXCLUSIVE */ | 125 | nfs4_verifier verifier; /* EXCLUSIVE */ |
@@ -144,6 +144,7 @@ struct nfs_openres { | |||
144 | nfs4_stateid delegation; | 144 | nfs4_stateid delegation; |
145 | __u32 do_recall; | 145 | __u32 do_recall; |
146 | __u64 maxsize; | 146 | __u64 maxsize; |
147 | __u32 attrset[NFS4_BITMAP_SIZE]; | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | /* | 150 | /* |
@@ -180,7 +181,7 @@ struct nfs_closeres { | |||
180 | * */ | 181 | * */ |
181 | struct nfs_lowner { | 182 | struct nfs_lowner { |
182 | __u64 clientid; | 183 | __u64 clientid; |
183 | u32 id; | 184 | __u64 id; |
184 | }; | 185 | }; |
185 | 186 | ||
186 | struct nfs_lock_args { | 187 | struct nfs_lock_args { |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 189e0dc993ab..ce06188b7a56 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -28,10 +28,11 @@ struct nsproxy { | |||
28 | struct ipc_namespace *ipc_ns; | 28 | struct ipc_namespace *ipc_ns; |
29 | struct mnt_namespace *mnt_ns; | 29 | struct mnt_namespace *mnt_ns; |
30 | struct pid_namespace *pid_ns; | 30 | struct pid_namespace *pid_ns; |
31 | struct user_namespace *user_ns; | ||
31 | }; | 32 | }; |
32 | extern struct nsproxy init_nsproxy; | 33 | extern struct nsproxy init_nsproxy; |
33 | 34 | ||
34 | int copy_namespaces(int flags, struct task_struct *tsk); | 35 | int copy_namespaces(unsigned long flags, struct task_struct *tsk); |
35 | void get_task_namespaces(struct task_struct *tsk); | 36 | void get_task_namespaces(struct task_struct *tsk); |
36 | void free_nsproxy(struct nsproxy *ns); | 37 | void free_nsproxy(struct nsproxy *ns); |
37 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, | 38 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 086a0e5a6318..5e84f2e8d54c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -111,7 +111,8 @@ enum pcie_reset_state { | |||
111 | 111 | ||
112 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
113 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
115 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, | ||
115 | }; | 116 | }; |
116 | 117 | ||
117 | struct pci_cap_saved_state { | 118 | struct pci_cap_saved_state { |
@@ -138,6 +139,7 @@ struct pci_dev { | |||
138 | unsigned short subsystem_vendor; | 139 | unsigned short subsystem_vendor; |
139 | unsigned short subsystem_device; | 140 | unsigned short subsystem_device; |
140 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 141 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
142 | u8 revision; /* PCI revision, low byte of class word */ | ||
141 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 143 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
142 | u8 rom_base_reg; /* which config register controls the ROM */ | 144 | u8 rom_base_reg; /* which config register controls the ROM */ |
143 | u8 pin; /* which interrupt pin this device uses */ | 145 | u8 pin; /* which interrupt pin this device uses */ |
@@ -313,7 +315,7 @@ struct pci_dynids { | |||
313 | 315 | ||
314 | /* ---------------------------------------------------------------- */ | 316 | /* ---------------------------------------------------------------- */ |
315 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides | 317 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides |
316 | * a set fof callbacks in struct pci_error_handlers, then that device driver | 318 | * a set of callbacks in struct pci_error_handlers, then that device driver |
317 | * will be notified of PCI bus errors, and will be driven to recovery | 319 | * will be notified of PCI bus errors, and will be driven to recovery |
318 | * when an error occurs. | 320 | * when an error occurs. |
319 | */ | 321 | */ |
@@ -370,7 +372,6 @@ struct pci_driver { | |||
370 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); | 372 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); |
371 | int (*resume_early) (struct pci_dev *dev); | 373 | int (*resume_early) (struct pci_dev *dev); |
372 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 374 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
373 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ | ||
374 | void (*shutdown) (struct pci_dev *dev); | 375 | void (*shutdown) (struct pci_dev *dev); |
375 | 376 | ||
376 | struct pci_error_handlers *err_handler; | 377 | struct pci_error_handlers *err_handler; |
@@ -431,6 +432,8 @@ extern struct bus_type pci_bus_type; | |||
431 | * code, or pci core code. */ | 432 | * code, or pci core code. */ |
432 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 433 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
433 | extern struct list_head pci_devices; /* list of all devices */ | 434 | extern struct list_head pci_devices; /* list of all devices */ |
435 | /* Some device drivers need know if pci is initiated */ | ||
436 | extern int no_pci_devices(void); | ||
434 | 437 | ||
435 | void pcibios_fixup_bus(struct pci_bus *); | 438 | void pcibios_fixup_bus(struct pci_bus *); |
436 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 439 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
@@ -475,7 +478,7 @@ extern void pci_sort_breadthfirst(void); | |||
475 | /* Generic PCI functions exported to card drivers */ | 478 | /* Generic PCI functions exported to card drivers */ |
476 | 479 | ||
477 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 480 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
478 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 481 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); |
479 | int pci_find_capability (struct pci_dev *dev, int cap); | 482 | int pci_find_capability (struct pci_dev *dev, int cap); |
480 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 483 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
481 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 484 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
@@ -544,11 +547,16 @@ void pci_set_master(struct pci_dev *dev); | |||
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 547 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); |
545 | #define HAVE_PCI_SET_MWI | 548 | #define HAVE_PCI_SET_MWI |
546 | int __must_check pci_set_mwi(struct pci_dev *dev); | 549 | int __must_check pci_set_mwi(struct pci_dev *dev); |
550 | int pci_try_set_mwi(struct pci_dev *dev); | ||
547 | void pci_clear_mwi(struct pci_dev *dev); | 551 | void pci_clear_mwi(struct pci_dev *dev); |
548 | void pci_intx(struct pci_dev *dev, int enable); | 552 | void pci_intx(struct pci_dev *dev, int enable); |
549 | void pci_msi_off(struct pci_dev *dev); | 553 | void pci_msi_off(struct pci_dev *dev); |
550 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 554 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
551 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 555 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
556 | int pcix_get_max_mmrbc(struct pci_dev *dev); | ||
557 | int pcix_get_mmrbc(struct pci_dev *dev); | ||
558 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | ||
559 | int pcie_set_readrq(struct pci_dev *dev, int rq); | ||
552 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 560 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
553 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 561 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
554 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 562 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
@@ -560,6 +568,7 @@ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | |||
560 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); | 568 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); |
561 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 569 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
562 | void pci_remove_rom(struct pci_dev *pdev); | 570 | void pci_remove_rom(struct pci_dev *pdev); |
571 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | ||
563 | 572 | ||
564 | /* Power management related routines */ | 573 | /* Power management related routines */ |
565 | int pci_save_state(struct pci_dev *dev); | 574 | int pci_save_state(struct pci_dev *dev); |
@@ -717,6 +726,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev * | |||
717 | { return NULL; } | 726 | { return NULL; } |
718 | 727 | ||
719 | #define pci_dev_present(ids) (0) | 728 | #define pci_dev_present(ids) (0) |
729 | #define no_pci_devices() (1) | ||
720 | #define pci_find_present(ids) (NULL) | 730 | #define pci_find_present(ids) (NULL) |
721 | #define pci_dev_put(dev) do { } while (0) | 731 | #define pci_dev_put(dev) do { } while (0) |
722 | 732 | ||
@@ -876,5 +886,7 @@ extern int pci_pci_problems; | |||
876 | extern unsigned long pci_cardbus_io_size; | 886 | extern unsigned long pci_cardbus_io_size; |
877 | extern unsigned long pci_cardbus_mem_size; | 887 | extern unsigned long pci_cardbus_mem_size; |
878 | 888 | ||
889 | extern int pcibios_add_platform_entries(struct pci_dev *dev); | ||
890 | |||
879 | #endif /* __KERNEL__ */ | 891 | #endif /* __KERNEL__ */ |
880 | #endif /* LINUX_PCI_H */ | 892 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 75c4d4d06892..2c7add169539 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -133,6 +133,9 @@ | |||
133 | 133 | ||
134 | /* Vendors and devices. Sort key: vendor first, device next. */ | 134 | /* Vendors and devices. Sort key: vendor first, device next. */ |
135 | 135 | ||
136 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
137 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000a | ||
138 | |||
136 | #define PCI_VENDOR_ID_DYNALINK 0x0675 | 139 | #define PCI_VENDOR_ID_DYNALINK 0x0675 |
137 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 | 140 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 |
138 | 141 | ||
@@ -371,6 +374,7 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 374 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 375 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
373 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 376 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
377 | #define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 | ||
374 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 378 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
375 | 379 | ||
376 | #define PCI_VENDOR_ID_VLSI 0x1004 | 380 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -475,6 +479,9 @@ | |||
475 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | 479 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 |
476 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 480 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
477 | 481 | ||
482 | #define PCI_VENDOR_ID_UNISYS 0x1018 | ||
483 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C | ||
484 | |||
478 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ | 485 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ |
479 | #define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 | 486 | #define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 |
480 | 487 | ||
@@ -732,7 +739,6 @@ | |||
732 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 | 739 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 |
733 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 | 740 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 |
734 | 741 | ||
735 | |||
736 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B | 742 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B |
737 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 | 743 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 |
738 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 | 744 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 |
@@ -778,7 +784,6 @@ | |||
778 | 784 | ||
779 | #define PCI_VENDOR_ID_SONY 0x104d | 785 | #define PCI_VENDOR_ID_SONY 0x104d |
780 | 786 | ||
781 | |||
782 | /* Winbond have two vendor IDs! See 0x10ad as well */ | 787 | /* Winbond have two vendor IDs! See 0x10ad as well */ |
783 | #define PCI_VENDOR_ID_WINBOND2 0x1050 | 788 | #define PCI_VENDOR_ID_WINBOND2 0x1050 |
784 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a | 789 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a |
@@ -816,7 +821,6 @@ | |||
816 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 821 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
817 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 822 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
818 | 823 | ||
819 | |||
820 | #define PCI_VENDOR_ID_UMC 0x1060 | 824 | #define PCI_VENDOR_ID_UMC 0x1060 |
821 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 825 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
822 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 826 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
@@ -832,7 +836,6 @@ | |||
832 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 836 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
833 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | 837 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 |
834 | 838 | ||
835 | |||
836 | #define PCI_VENDOR_ID_APPLE 0x106b | 839 | #define PCI_VENDOR_ID_APPLE 0x106b |
837 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 | 840 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 |
838 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e | 841 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e |
@@ -868,7 +871,6 @@ | |||
868 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 | 871 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 |
869 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 | 872 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 |
870 | 873 | ||
871 | |||
872 | #define PCI_VENDOR_ID_QLOGIC 0x1077 | 874 | #define PCI_VENDOR_ID_QLOGIC 0x1077 |
873 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 | 875 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 |
874 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 | 876 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 |
@@ -899,12 +901,9 @@ | |||
899 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 | 901 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 |
900 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 | 902 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 |
901 | 903 | ||
902 | |||
903 | |||
904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 | 904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 |
905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 | 905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 |
906 | 906 | ||
907 | |||
908 | #define PCI_VENDOR_ID_OLICOM 0x108d | 907 | #define PCI_VENDOR_ID_OLICOM 0x108d |
909 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 | 908 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 |
910 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 | 909 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 |
@@ -936,23 +935,19 @@ | |||
936 | #define PCI_DEVICE_ID_SII_3112 0x3112 | 935 | #define PCI_DEVICE_ID_SII_3112 0x3112 |
937 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 | 936 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 |
938 | 937 | ||
939 | |||
940 | #define PCI_VENDOR_ID_BROOKTREE 0x109e | 938 | #define PCI_VENDOR_ID_BROOKTREE 0x109e |
941 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 | 939 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 |
942 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 | 940 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 |
943 | 941 | ||
944 | |||
945 | #define PCI_VENDOR_ID_SGI 0x10a9 | 942 | #define PCI_VENDOR_ID_SGI 0x10a9 |
946 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 | 943 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 |
944 | #define PCI_DEVICE_ID_SGI_LITHIUM 0x1002 | ||
947 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a | 945 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a |
948 | #define PCI_VENDOR_ID_SGI_LITHIUM 0x1002 | ||
949 | |||
950 | 946 | ||
951 | #define PCI_VENDOR_ID_WINBOND 0x10ad | 947 | #define PCI_VENDOR_ID_WINBOND 0x10ad |
952 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 | 948 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 |
953 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 | 949 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 |
954 | 950 | ||
955 | |||
956 | #define PCI_VENDOR_ID_PLX 0x10b5 | 951 | #define PCI_VENDOR_ID_PLX 0x10b5 |
957 | #define PCI_DEVICE_ID_PLX_R685 0x1030 | 952 | #define PCI_DEVICE_ID_PLX_R685 0x1030 |
958 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a | 953 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a |
@@ -986,7 +981,6 @@ | |||
986 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 | 981 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 |
987 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a | 982 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a |
988 | 983 | ||
989 | |||
990 | #define PCI_VENDOR_ID_AL 0x10b9 | 984 | #define PCI_VENDOR_ID_AL 0x10b9 |
991 | #define PCI_DEVICE_ID_AL_M1533 0x1533 | 985 | #define PCI_DEVICE_ID_AL_M1533 0x1533 |
992 | #define PCI_DEVICE_ID_AL_M1535 0x1535 | 986 | #define PCI_DEVICE_ID_AL_M1535 0x1535 |
@@ -1009,18 +1003,14 @@ | |||
1009 | #define PCI_DEVICE_ID_AL_M5451 0x5451 | 1003 | #define PCI_DEVICE_ID_AL_M5451 0x5451 |
1010 | #define PCI_DEVICE_ID_AL_M7101 0x7101 | 1004 | #define PCI_DEVICE_ID_AL_M7101 0x7101 |
1011 | 1005 | ||
1012 | |||
1013 | |||
1014 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 | 1006 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 |
1015 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | 1007 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 |
1016 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 | 1008 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 |
1017 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 | 1009 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 |
1018 | 1010 | ||
1019 | |||
1020 | #define PCI_VENDOR_ID_TCONRAD 0x10da | 1011 | #define PCI_VENDOR_ID_TCONRAD 0x10da |
1021 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 | 1012 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 |
1022 | 1013 | ||
1023 | |||
1024 | #define PCI_VENDOR_ID_NVIDIA 0x10de | 1014 | #define PCI_VENDOR_ID_NVIDIA 0x10de |
1025 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 | 1015 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 |
1026 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 | 1016 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 |
@@ -1241,9 +1231,6 @@ | |||
1241 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1231 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
1242 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 | 1232 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 |
1243 | 1233 | ||
1244 | |||
1245 | |||
1246 | |||
1247 | #define PCI_VENDOR_ID_INTERG 0x10ea | 1234 | #define PCI_VENDOR_ID_INTERG 0x10ea |
1248 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 | 1235 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 |
1249 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 | 1236 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 |
@@ -1262,7 +1249,6 @@ | |||
1262 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 | 1249 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 |
1263 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 | 1250 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 |
1264 | 1251 | ||
1265 | |||
1266 | #define PCI_VENDOR_ID_INIT 0x1101 | 1252 | #define PCI_VENDOR_ID_INIT 0x1101 |
1267 | 1253 | ||
1268 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ | 1254 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ |
@@ -1357,7 +1343,6 @@ | |||
1357 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1343 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
1358 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 | 1344 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
1359 | 1345 | ||
1360 | |||
1361 | #define PCI_VENDOR_ID_VORTEX 0x1119 | 1346 | #define PCI_VENDOR_ID_VORTEX 0x1119 |
1362 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 | 1347 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 |
1363 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 | 1348 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 |
@@ -1383,8 +1368,8 @@ | |||
1383 | #define PCI_VENDOR_ID_EF 0x111a | 1368 | #define PCI_VENDOR_ID_EF 0x111a |
1384 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 | 1369 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 |
1385 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 | 1370 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 |
1386 | #define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003 | 1371 | #define PCI_DEVICE_ID_EF_ATM_LANAI2 0x0003 |
1387 | #define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005 | 1372 | #define PCI_DEVICE_ID_EF_ATM_LANAIHB 0x0005 |
1388 | 1373 | ||
1389 | #define PCI_VENDOR_ID_IDT 0x111d | 1374 | #define PCI_VENDOR_ID_IDT 0x111d |
1390 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 | 1375 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 |
@@ -1392,7 +1377,6 @@ | |||
1392 | #define PCI_VENDOR_ID_FORE 0x1127 | 1377 | #define PCI_VENDOR_ID_FORE 0x1127 |
1393 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 | 1378 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 |
1394 | 1379 | ||
1395 | |||
1396 | #define PCI_VENDOR_ID_PHILIPS 0x1131 | 1380 | #define PCI_VENDOR_ID_PHILIPS 0x1131 |
1397 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 | 1381 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 |
1398 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 | 1382 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 |
@@ -1411,7 +1395,6 @@ | |||
1411 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 | 1395 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 |
1412 | 1396 | ||
1413 | 1397 | ||
1414 | |||
1415 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 | 1398 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 |
1416 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 | 1399 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 |
1417 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 | 1400 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 |
@@ -1419,7 +1402,6 @@ | |||
1419 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 | 1402 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 |
1420 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 | 1403 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 |
1421 | 1404 | ||
1422 | |||
1423 | #define PCI_VENDOR_ID_DIGI 0x114f | 1405 | #define PCI_VENDOR_ID_DIGI 0x114f |
1424 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 | 1406 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 |
1425 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 | 1407 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 |
@@ -1430,12 +1412,10 @@ | |||
1430 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA | 1412 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA |
1431 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB | 1413 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB |
1432 | 1414 | ||
1433 | |||
1434 | #define PCI_VENDOR_ID_XIRCOM 0x115d | 1415 | #define PCI_VENDOR_ID_XIRCOM 0x115d |
1435 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 | 1416 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 |
1436 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 | 1417 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 |
1437 | 1418 | ||
1438 | |||
1439 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 | 1419 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 |
1440 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1420 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1441 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1421 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
@@ -1504,7 +1484,6 @@ | |||
1504 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 | 1484 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 |
1505 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 | 1485 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 |
1506 | 1486 | ||
1507 | |||
1508 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e | 1487 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e |
1509 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 | 1488 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 |
1510 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 | 1489 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 |
@@ -1522,28 +1501,23 @@ | |||
1522 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1501 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
1523 | #define PCI_DEVICE_ID_V3_V351 0x0002 | 1502 | #define PCI_DEVICE_ID_V3_V351 0x0002 |
1524 | 1503 | ||
1525 | |||
1526 | #define PCI_VENDOR_ID_ATT 0x11c1 | 1504 | #define PCI_VENDOR_ID_ATT 0x11c1 |
1527 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 | 1505 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 |
1528 | 1506 | ||
1529 | |||
1530 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb | 1507 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb |
1531 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 | 1508 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 |
1532 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 | 1509 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 |
1533 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 | 1510 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 |
1534 | 1511 | ||
1535 | |||
1536 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 | 1512 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 |
1537 | #define PCI_DEVICE_ID_AD1889JS 0x1889 | 1513 | #define PCI_DEVICE_ID_AD1889JS 0x1889 |
1538 | 1514 | ||
1539 | |||
1540 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 | 1515 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 |
1541 | 1516 | ||
1542 | #define PCI_VENDOR_ID_ZORAN 0x11de | 1517 | #define PCI_VENDOR_ID_ZORAN 0x11de |
1543 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 | 1518 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 |
1544 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 | 1519 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 |
1545 | 1520 | ||
1546 | |||
1547 | #define PCI_VENDOR_ID_COMPEX 0x11f6 | 1521 | #define PCI_VENDOR_ID_COMPEX 0x11f6 |
1548 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 | 1522 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 |
1549 | 1523 | ||
@@ -1602,8 +1576,6 @@ | |||
1602 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 | 1576 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 |
1603 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 | 1577 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 |
1604 | 1578 | ||
1605 | |||
1606 | |||
1607 | #define PCI_VENDOR_ID_AVM 0x1244 | 1579 | #define PCI_VENDOR_ID_AVM 0x1244 |
1608 | #define PCI_DEVICE_ID_AVM_B1 0x0700 | 1580 | #define PCI_DEVICE_ID_AVM_B1 0x0700 |
1609 | #define PCI_DEVICE_ID_AVM_C4 0x0800 | 1581 | #define PCI_DEVICE_ID_AVM_C4 0x0800 |
@@ -1612,7 +1584,6 @@ | |||
1612 | #define PCI_DEVICE_ID_AVM_C2 0x1100 | 1584 | #define PCI_DEVICE_ID_AVM_C2 0x1100 |
1613 | #define PCI_DEVICE_ID_AVM_T1 0x1200 | 1585 | #define PCI_DEVICE_ID_AVM_T1 0x1200 |
1614 | 1586 | ||
1615 | |||
1616 | #define PCI_VENDOR_ID_STALLION 0x124d | 1587 | #define PCI_VENDOR_ID_STALLION 0x124d |
1617 | 1588 | ||
1618 | /* Allied Telesyn */ | 1589 | /* Allied Telesyn */ |
@@ -1635,7 +1606,6 @@ | |||
1635 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 | 1606 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 |
1636 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 | 1607 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 |
1637 | 1608 | ||
1638 | |||
1639 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 | 1609 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 |
1640 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 | 1610 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 |
1641 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 | 1611 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 |
@@ -1658,7 +1628,6 @@ | |||
1658 | 1628 | ||
1659 | #define PCI_VENDOR_ID_ALTEON 0x12ae | 1629 | #define PCI_VENDOR_ID_ALTEON 0x12ae |
1660 | 1630 | ||
1661 | |||
1662 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 | 1631 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 |
1663 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 | 1632 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 |
1664 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 | 1633 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 |
@@ -1689,7 +1658,6 @@ | |||
1689 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 | 1658 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 |
1690 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 | 1659 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 |
1691 | 1660 | ||
1692 | |||
1693 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 | 1661 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 |
1694 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 | 1662 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 |
1695 | 1663 | ||
@@ -1799,7 +1767,6 @@ | |||
1799 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 | 1767 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 |
1800 | #define PCI_DEVICE_ID_LMC_T1 0x0006 | 1768 | #define PCI_DEVICE_ID_LMC_T1 0x0006 |
1801 | 1769 | ||
1802 | |||
1803 | #define PCI_VENDOR_ID_NETGEAR 0x1385 | 1770 | #define PCI_VENDOR_ID_NETGEAR 0x1385 |
1804 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a | 1771 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a |
1805 | 1772 | ||
@@ -1902,6 +1869,8 @@ | |||
1902 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 | 1869 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 |
1903 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 | 1870 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 |
1904 | 1871 | ||
1872 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
1873 | |||
1905 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1874 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1906 | 1875 | ||
1907 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1876 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
@@ -2010,13 +1979,10 @@ | |||
2010 | #define PCI_DEVICE_ID_ENE_720 0x1421 | 1979 | #define PCI_DEVICE_ID_ENE_720 0x1421 |
2011 | #define PCI_DEVICE_ID_ENE_722 0x1422 | 1980 | #define PCI_DEVICE_ID_ENE_722 0x1422 |
2012 | 1981 | ||
2013 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
2014 | |||
2015 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | 1982 | #define PCI_SUBVENDOR_ID_PERLE 0x155f |
2016 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | 1983 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 |
2017 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | 1984 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 |
2018 | 1985 | ||
2019 | |||
2020 | #define PCI_VENDOR_ID_SYBA 0x1592 | 1986 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2021 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 1987 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2022 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 1988 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
@@ -2035,8 +2001,10 @@ | |||
2035 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2001 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2036 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2002 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2037 | 2003 | ||
2038 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2004 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2005 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
2039 | 2006 | ||
2007 | #define PCI_VENDOR_ID_PDC 0x15e9 | ||
2040 | 2008 | ||
2041 | #define PCI_VENDOR_ID_FARSITE 0x1619 | 2009 | #define PCI_VENDOR_ID_FARSITE 0x1619 |
2042 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 | 2010 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 |
@@ -2053,6 +2021,8 @@ | |||
2053 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 | 2021 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 |
2054 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 | 2022 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 |
2055 | 2023 | ||
2024 | #define PCI_VENDOR_ID_ATHEROS 0x168c | ||
2025 | |||
2056 | #define PCI_VENDOR_ID_NETCELL 0x169c | 2026 | #define PCI_VENDOR_ID_NETCELL 0x169c |
2057 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 | 2027 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 |
2058 | 2028 | ||
@@ -2091,7 +2061,6 @@ | |||
2091 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 | 2061 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 |
2092 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 | 2062 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 |
2093 | 2063 | ||
2094 | |||
2095 | #define PCI_VENDOR_ID_SITECOM 0x182d | 2064 | #define PCI_VENDOR_ID_SITECOM 0x182d |
2096 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | 2065 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 |
2097 | 2066 | ||
@@ -2127,12 +2096,9 @@ | |||
2127 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 | 2096 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 |
2128 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 | 2097 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 |
2129 | 2098 | ||
2130 | |||
2131 | #define PCI_VENDOR_ID_AKS 0x416c | 2099 | #define PCI_VENDOR_ID_AKS 0x416c |
2132 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 | 2100 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 |
2133 | 2101 | ||
2134 | |||
2135 | |||
2136 | #define PCI_VENDOR_ID_S3 0x5333 | 2102 | #define PCI_VENDOR_ID_S3 0x5333 |
2137 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 | 2103 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 |
2138 | #define PCI_DEVICE_ID_S3_868 0x8880 | 2104 | #define PCI_DEVICE_ID_S3_868 0x8880 |
@@ -2144,7 +2110,6 @@ | |||
2144 | #define PCI_VENDOR_ID_DUNORD 0x5544 | 2110 | #define PCI_VENDOR_ID_DUNORD 0x5544 |
2145 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 | 2111 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 |
2146 | 2112 | ||
2147 | |||
2148 | #define PCI_VENDOR_ID_DCI 0x6666 | 2113 | #define PCI_VENDOR_ID_DCI 0x6666 |
2149 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 | 2114 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 |
2150 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 | 2115 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 |
@@ -2388,7 +2353,6 @@ | |||
2388 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 | 2353 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 |
2389 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 | 2354 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 |
2390 | 2355 | ||
2391 | |||
2392 | #define PCI_VENDOR_ID_HOLTEK 0x9412 | 2356 | #define PCI_VENDOR_ID_HOLTEK 0x9412 |
2393 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 | 2357 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 |
2394 | 2358 | ||
@@ -2404,6 +2368,8 @@ | |||
2404 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2368 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2405 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2369 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2406 | 2370 | ||
2371 | #define PCI_VENDOR_ID_3COM_2 0xa727 | ||
2372 | |||
2407 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2373 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2408 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2374 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2409 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | 2375 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 |
@@ -2412,13 +2378,7 @@ | |||
2412 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2378 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
2413 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 | 2379 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 |
2414 | 2380 | ||
2415 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
2416 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A | ||
2417 | |||
2418 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 | 2381 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 |
2419 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 | 2382 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 |
2420 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 | 2383 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 |
2421 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 | 2384 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 |
2422 | |||
2423 | #define PCI_VENDOR_ID_QUICKNET 0x15E2 | ||
2424 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index b72be2f79e6a..926adaae0f96 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_PERCPU_H | 1 | #ifndef __LINUX_PERCPU_H |
2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
3 | 3 | ||
4 | #include <linux/spinlock.h> /* For preempt_disable() */ | 4 | #include <linux/preempt.h> |
5 | #include <linux/slab.h> /* For kmalloc() */ | 5 | #include <linux/slab.h> /* For kmalloc() */ |
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/string.h> /* For memset() */ | 7 | #include <linux/string.h> /* For memset() */ |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index f5aa593ccf32..3d9f70972cdf 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
11 | #include <linux/list.h> | ||
11 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
12 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
@@ -17,6 +18,9 @@ | |||
17 | struct percpu_counter { | 18 | struct percpu_counter { |
18 | spinlock_t lock; | 19 | spinlock_t lock; |
19 | s64 count; | 20 | s64 count; |
21 | #ifdef CONFIG_HOTPLUG_CPU | ||
22 | struct list_head list; /* All percpu_counters are on a list */ | ||
23 | #endif | ||
20 | s32 *counters; | 24 | s32 *counters; |
21 | }; | 25 | }; |
22 | 26 | ||
@@ -26,18 +30,8 @@ struct percpu_counter { | |||
26 | #define FBC_BATCH (NR_CPUS*4) | 30 | #define FBC_BATCH (NR_CPUS*4) |
27 | #endif | 31 | #endif |
28 | 32 | ||
29 | static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount) | 33 | void percpu_counter_init(struct percpu_counter *fbc, s64 amount); |
30 | { | 34 | void percpu_counter_destroy(struct percpu_counter *fbc); |
31 | spin_lock_init(&fbc->lock); | ||
32 | fbc->count = amount; | ||
33 | fbc->counters = alloc_percpu(s32); | ||
34 | } | ||
35 | |||
36 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) | ||
37 | { | ||
38 | free_percpu(fbc->counters); | ||
39 | } | ||
40 | |||
41 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); | 35 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); |
42 | s64 percpu_counter_sum(struct percpu_counter *fbc); | 36 | s64 percpu_counter_sum(struct percpu_counter *fbc); |
43 | 37 | ||
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 169c6c24209b..b9a17e08ff0f 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -29,7 +29,7 @@ static inline void get_pid_ns(struct pid_namespace *ns) | |||
29 | kref_get(&ns->kref); | 29 | kref_get(&ns->kref); |
30 | } | 30 | } |
31 | 31 | ||
32 | extern struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *ns); | 32 | extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); |
33 | extern void free_pid_ns(struct kref *kref); | 33 | extern void free_pid_ns(struct kref *kref); |
34 | 34 | ||
35 | static inline void put_pid_ns(struct pid_namespace *ns) | 35 | static inline void put_pid_ns(struct pid_namespace *ns) |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index c3f01b3085a4..30b8571e6b34 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -403,16 +403,13 @@ enum | |||
403 | * 1..32767 Reserved for ematches inside kernel tree | 403 | * 1..32767 Reserved for ematches inside kernel tree |
404 | * 32768..65535 Free to use, not reliable | 404 | * 32768..65535 Free to use, not reliable |
405 | */ | 405 | */ |
406 | enum | 406 | #define TCF_EM_CONTAINER 0 |
407 | { | 407 | #define TCF_EM_CMP 1 |
408 | TCF_EM_CONTAINER, | 408 | #define TCF_EM_NBYTE 2 |
409 | TCF_EM_CMP, | 409 | #define TCF_EM_U32 3 |
410 | TCF_EM_NBYTE, | 410 | #define TCF_EM_META 4 |
411 | TCF_EM_U32, | 411 | #define TCF_EM_TEXT 5 |
412 | TCF_EM_META, | 412 | #define TCF_EM_MAX 5 |
413 | TCF_EM_TEXT, | ||
414 | __TCF_EM_MAX | ||
415 | }; | ||
416 | 413 | ||
417 | enum | 414 | enum |
418 | { | 415 | { |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d10f35338507..268c51599eb8 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -101,6 +101,15 @@ struct tc_prio_qopt | |||
101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
102 | }; | 102 | }; |
103 | 103 | ||
104 | enum | ||
105 | { | ||
106 | TCA_PRIO_UNSPEC, | ||
107 | TCA_PRIO_MQ, | ||
108 | __TCA_PRIO_MAX | ||
109 | }; | ||
110 | |||
111 | #define TCA_PRIO_MAX (__TCA_PRIO_MAX - 1) | ||
112 | |||
104 | /* TBF section */ | 113 | /* TBF section */ |
105 | 114 | ||
106 | struct tc_tbf_qopt | 115 | struct tc_tbf_qopt |
diff --git a/include/linux/pm.h b/include/linux/pm.h index b2c4fde4e994..273781c82e4d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -267,15 +267,10 @@ struct dev_pm_info { | |||
267 | unsigned can_wakeup:1; | 267 | unsigned can_wakeup:1; |
268 | #ifdef CONFIG_PM | 268 | #ifdef CONFIG_PM |
269 | unsigned should_wakeup:1; | 269 | unsigned should_wakeup:1; |
270 | pm_message_t prev_state; | ||
271 | void * saved_state; | ||
272 | struct device * pm_parent; | ||
273 | struct list_head entry; | 270 | struct list_head entry; |
274 | #endif | 271 | #endif |
275 | }; | 272 | }; |
276 | 273 | ||
277 | extern void device_pm_set_parent(struct device * dev, struct device * parent); | ||
278 | |||
279 | extern int device_power_down(pm_message_t state); | 274 | extern int device_power_down(pm_message_t state); |
280 | extern void device_power_up(void); | 275 | extern void device_power_up(void); |
281 | extern void device_resume(void); | 276 | extern void device_resume(void); |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 52a9be41250d..e2eff9079fe9 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -59,4 +59,8 @@ | |||
59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ | 59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ |
60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ | 60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ |
61 | 61 | ||
62 | /* Get/set process seccomp mode */ | ||
63 | #define PR_GET_SECCOMP 21 | ||
64 | #define PR_SET_SECCOMP 22 | ||
65 | |||
62 | #endif /* _LINUX_PRCTL_H */ | 66 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index fc86f274147f..1adfe668d031 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | prefetch(x) - prefetches the cacheline at "x" for read | 28 | prefetch(x) - prefetches the cacheline at "x" for read |
29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
30 | spin_lock_prefetch(x) - prefectches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
31 | 31 | ||
32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-prefered |
33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 3469f96bc8b2..28e3664fdf1b 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/magic.h> | 7 | #include <linux/magic.h> |
8 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
9 | 9 | ||
10 | struct completion; | ||
11 | |||
10 | /* | 12 | /* |
11 | * The proc filesystem constants/structures | 13 | * The proc filesystem constants/structures |
12 | */ | 14 | */ |
@@ -56,6 +58,14 @@ struct proc_dir_entry { | |||
56 | gid_t gid; | 58 | gid_t gid; |
57 | loff_t size; | 59 | loff_t size; |
58 | const struct inode_operations *proc_iops; | 60 | const struct inode_operations *proc_iops; |
61 | /* | ||
62 | * NULL ->proc_fops means "PDE is going away RSN" or | ||
63 | * "PDE is just created". In either case, e.g. ->read_proc won't be | ||
64 | * called because it's too late or too early, respectively. | ||
65 | * | ||
66 | * If you're allocating ->proc_fops dynamically, save a pointer | ||
67 | * somewhere. | ||
68 | */ | ||
59 | const struct file_operations *proc_fops; | 69 | const struct file_operations *proc_fops; |
60 | get_info_t *get_info; | 70 | get_info_t *get_info; |
61 | struct module *owner; | 71 | struct module *owner; |
@@ -66,6 +76,9 @@ struct proc_dir_entry { | |||
66 | atomic_t count; /* use count */ | 76 | atomic_t count; /* use count */ |
67 | int deleted; /* delete flag */ | 77 | int deleted; /* delete flag */ |
68 | void *set; | 78 | void *set; |
79 | int pde_users; /* number of callers into module in progress */ | ||
80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | ||
81 | struct completion *pde_unload_completion; | ||
69 | }; | 82 | }; |
70 | 83 | ||
71 | struct kcore_list { | 84 | struct kcore_list { |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index d8286db60b96..93678f57ccbe 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -116,13 +116,46 @@ | |||
116 | * attach a request to an active stripe (add_stripe_bh()) | 116 | * attach a request to an active stripe (add_stripe_bh()) |
117 | * lockdev attach-buffer unlockdev | 117 | * lockdev attach-buffer unlockdev |
118 | * handle a stripe (handle_stripe()) | 118 | * handle a stripe (handle_stripe()) |
119 | * lockstripe clrSTRIPE_HANDLE ... (lockdev check-buffers unlockdev) .. change-state .. record io needed unlockstripe schedule io | 119 | * lockstripe clrSTRIPE_HANDLE ... |
120 | * (lockdev check-buffers unlockdev) .. | ||
121 | * change-state .. | ||
122 | * record io/ops needed unlockstripe schedule io/ops | ||
120 | * release an active stripe (release_stripe()) | 123 | * release an active stripe (release_stripe()) |
121 | * lockdev if (!--cnt) { if STRIPE_HANDLE, add to handle_list else add to inactive-list } unlockdev | 124 | * lockdev if (!--cnt) { if STRIPE_HANDLE, add to handle_list else add to inactive-list } unlockdev |
122 | * | 125 | * |
123 | * The refcount counts each thread that have activated the stripe, | 126 | * The refcount counts each thread that have activated the stripe, |
124 | * plus raid5d if it is handling it, plus one for each active request | 127 | * plus raid5d if it is handling it, plus one for each active request |
125 | * on a cached buffer. | 128 | * on a cached buffer, and plus one if the stripe is undergoing stripe |
129 | * operations. | ||
130 | * | ||
131 | * Stripe operations are performed outside the stripe lock, | ||
132 | * the stripe operations are: | ||
133 | * -copying data between the stripe cache and user application buffers | ||
134 | * -computing blocks to save a disk access, or to recover a missing block | ||
135 | * -updating the parity on a write operation (reconstruct write and | ||
136 | * read-modify-write) | ||
137 | * -checking parity correctness | ||
138 | * -running i/o to disk | ||
139 | * These operations are carried out by raid5_run_ops which uses the async_tx | ||
140 | * api to (optionally) offload operations to dedicated hardware engines. | ||
141 | * When requesting an operation handle_stripe sets the pending bit for the | ||
142 | * operation and increments the count. raid5_run_ops is then run whenever | ||
143 | * the count is non-zero. | ||
144 | * There are some critical dependencies between the operations that prevent some | ||
145 | * from being requested while another is in flight. | ||
146 | * 1/ Parity check operations destroy the in cache version of the parity block, | ||
147 | * so we prevent parity dependent operations like writes and compute_blocks | ||
148 | * from starting while a check is in progress. Some dma engines can perform | ||
149 | * the check without damaging the parity block, in these cases the parity | ||
150 | * block is re-marked up to date (assuming the check was successful) and is | ||
151 | * not re-read from disk. | ||
152 | * 2/ When a write operation is requested we immediately lock the affected | ||
153 | * blocks, and mark them as not up to date. This causes new read requests | ||
154 | * to be held off, as well as parity checks and compute block operations. | ||
155 | * 3/ Once a compute block operation has been requested handle_stripe treats | ||
156 | * that block as if it is up to date. raid5_run_ops guaruntees that any | ||
157 | * operation that is dependent on the compute block result is initiated after | ||
158 | * the compute block completes. | ||
126 | */ | 159 | */ |
127 | 160 | ||
128 | struct stripe_head { | 161 | struct stripe_head { |
@@ -136,15 +169,46 @@ struct stripe_head { | |||
136 | spinlock_t lock; | 169 | spinlock_t lock; |
137 | int bm_seq; /* sequence number for bitmap flushes */ | 170 | int bm_seq; /* sequence number for bitmap flushes */ |
138 | int disks; /* disks in stripe */ | 171 | int disks; /* disks in stripe */ |
172 | /* stripe_operations | ||
173 | * @pending - pending ops flags (set for request->issue->complete) | ||
174 | * @ack - submitted ops flags (set for issue->complete) | ||
175 | * @complete - completed ops flags (set for complete) | ||
176 | * @target - STRIPE_OP_COMPUTE_BLK target | ||
177 | * @count - raid5_runs_ops is set to run when this is non-zero | ||
178 | */ | ||
179 | struct stripe_operations { | ||
180 | unsigned long pending; | ||
181 | unsigned long ack; | ||
182 | unsigned long complete; | ||
183 | int target; | ||
184 | int count; | ||
185 | u32 zero_sum_result; | ||
186 | } ops; | ||
139 | struct r5dev { | 187 | struct r5dev { |
140 | struct bio req; | 188 | struct bio req; |
141 | struct bio_vec vec; | 189 | struct bio_vec vec; |
142 | struct page *page; | 190 | struct page *page; |
143 | struct bio *toread, *towrite, *written; | 191 | struct bio *toread, *read, *towrite, *written; |
144 | sector_t sector; /* sector of this page */ | 192 | sector_t sector; /* sector of this page */ |
145 | unsigned long flags; | 193 | unsigned long flags; |
146 | } dev[1]; /* allocated with extra space depending of RAID geometry */ | 194 | } dev[1]; /* allocated with extra space depending of RAID geometry */ |
147 | }; | 195 | }; |
196 | |||
197 | /* stripe_head_state - collects and tracks the dynamic state of a stripe_head | ||
198 | * for handle_stripe. It is only valid under spin_lock(sh->lock); | ||
199 | */ | ||
200 | struct stripe_head_state { | ||
201 | int syncing, expanding, expanded; | ||
202 | int locked, uptodate, to_read, to_write, failed, written; | ||
203 | int to_fill, compute, req_compute, non_overwrite; | ||
204 | int failed_num; | ||
205 | }; | ||
206 | |||
207 | /* r6_state - extra state data only relevant to r6 */ | ||
208 | struct r6_state { | ||
209 | int p_failed, q_failed, qd_idx, failed_num[2]; | ||
210 | }; | ||
211 | |||
148 | /* Flags */ | 212 | /* Flags */ |
149 | #define R5_UPTODATE 0 /* page contains current data */ | 213 | #define R5_UPTODATE 0 /* page contains current data */ |
150 | #define R5_LOCKED 1 /* IO has been submitted on "req" */ | 214 | #define R5_LOCKED 1 /* IO has been submitted on "req" */ |
@@ -158,6 +222,15 @@ struct stripe_head { | |||
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | 222 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ |
159 | 223 | ||
160 | #define R5_Expanded 10 /* This block now has post-expand data */ | 224 | #define R5_Expanded 10 /* This block now has post-expand data */ |
225 | #define R5_Wantcompute 11 /* compute_block in progress treat as | ||
226 | * uptodate | ||
227 | */ | ||
228 | #define R5_Wantfill 12 /* dev->toread contains a bio that needs | ||
229 | * filling | ||
230 | */ | ||
231 | #define R5_Wantprexor 13 /* distinguish blocks ready for rmw from | ||
232 | * other "towrites" | ||
233 | */ | ||
161 | /* | 234 | /* |
162 | * Write method | 235 | * Write method |
163 | */ | 236 | */ |
@@ -180,6 +253,24 @@ struct stripe_head { | |||
180 | #define STRIPE_EXPAND_SOURCE 10 | 253 | #define STRIPE_EXPAND_SOURCE 10 |
181 | #define STRIPE_EXPAND_READY 11 | 254 | #define STRIPE_EXPAND_READY 11 |
182 | /* | 255 | /* |
256 | * Operations flags (in issue order) | ||
257 | */ | ||
258 | #define STRIPE_OP_BIOFILL 0 | ||
259 | #define STRIPE_OP_COMPUTE_BLK 1 | ||
260 | #define STRIPE_OP_PREXOR 2 | ||
261 | #define STRIPE_OP_BIODRAIN 3 | ||
262 | #define STRIPE_OP_POSTXOR 4 | ||
263 | #define STRIPE_OP_CHECK 5 | ||
264 | #define STRIPE_OP_IO 6 | ||
265 | |||
266 | /* modifiers to the base operations | ||
267 | * STRIPE_OP_MOD_REPAIR_PD - compute the parity block and write it back | ||
268 | * STRIPE_OP_MOD_DMA_CHECK - parity is not corrupted by the check | ||
269 | */ | ||
270 | #define STRIPE_OP_MOD_REPAIR_PD 7 | ||
271 | #define STRIPE_OP_MOD_DMA_CHECK 8 | ||
272 | |||
273 | /* | ||
183 | * Plugging: | 274 | * Plugging: |
184 | * | 275 | * |
185 | * To improve write throughput, we need to delay the handling of some | 276 | * To improve write throughput, we need to delay the handling of some |
diff --git a/include/linux/raid/xor.h b/include/linux/raid/xor.h index f0d67cbdea40..3e120587eada 100644 --- a/include/linux/raid/xor.h +++ b/include/linux/raid/xor.h | |||
@@ -3,9 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/raid/md.h> | 4 | #include <linux/raid/md.h> |
5 | 5 | ||
6 | #define MAX_XOR_BLOCKS 5 | 6 | #define MAX_XOR_BLOCKS 4 |
7 | 7 | ||
8 | extern void xor_block(unsigned int count, unsigned int bytes, void **ptr); | 8 | extern void xor_blocks(unsigned int count, unsigned int bytes, |
9 | void *dest, void **srcs); | ||
9 | 10 | ||
10 | struct xor_block_template { | 11 | struct xor_block_template { |
11 | struct xor_block_template *next; | 12 | struct xor_block_template *next; |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 1fae30af91f3..c91476ce314a 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -261,7 +261,7 @@ enum rtattr_type_t | |||
261 | RTA_FLOW, | 261 | RTA_FLOW, |
262 | RTA_CACHEINFO, | 262 | RTA_CACHEINFO, |
263 | RTA_SESSION, | 263 | RTA_SESSION, |
264 | RTA_MP_ALGO, | 264 | RTA_MP_ALGO, /* no longer used */ |
265 | RTA_TABLE, | 265 | RTA_TABLE, |
266 | __RTA_MAX | 266 | __RTA_MAX |
267 | }; | 267 | }; |
@@ -570,10 +570,16 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | |||
570 | } | 570 | } |
571 | 571 | ||
572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); | 572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); |
573 | extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, | ||
574 | struct rtattr *rta, int len); | ||
573 | 575 | ||
574 | #define rtattr_parse_nested(tb, max, rta) \ | 576 | #define rtattr_parse_nested(tb, max, rta) \ |
575 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) | 577 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) |
576 | 578 | ||
579 | #define rtattr_parse_nested_compat(tb, max, rta, data, len) \ | ||
580 | ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ | ||
581 | __rtattr_parse_nested_compat(tb, max, rta, len); }) | ||
582 | |||
577 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); | 583 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); |
578 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); | 584 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); |
579 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, | 585 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, |
@@ -638,6 +644,18 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
638 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | 644 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ |
639 | (skb)->len; }) | 645 | (skb)->len; }) |
640 | 646 | ||
647 | #define RTA_NEST_COMPAT(skb, type, attrlen, data) \ | ||
648 | ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \ | ||
649 | RTA_PUT(skb, type, attrlen, data); \ | ||
650 | RTA_NEST(skb, type); \ | ||
651 | __start; }) | ||
652 | |||
653 | #define RTA_NEST_COMPAT_END(skb, start) \ | ||
654 | ({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \ | ||
655 | (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | ||
656 | RTA_NEST_END(skb, __nest); \ | ||
657 | (skb)->len; }) | ||
658 | |||
641 | #define RTA_NEST_CANCEL(skb, start) \ | 659 | #define RTA_NEST_CANCEL(skb, start) \ |
642 | ({ if (start) \ | 660 | ({ if (start) \ |
643 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | 661 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index cfb680585ab8..731edaca8ffd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | 26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ |
27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ | 27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ | 28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
29 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Scheduling policies | 32 | * Scheduling policies |
@@ -287,6 +288,7 @@ extern signed long schedule_timeout_uninterruptible(signed long timeout); | |||
287 | asmlinkage void schedule(void); | 288 | asmlinkage void schedule(void); |
288 | 289 | ||
289 | struct nsproxy; | 290 | struct nsproxy; |
291 | struct user_namespace; | ||
290 | 292 | ||
291 | /* Maximum number of active map areas.. This is a random (large) number */ | 293 | /* Maximum number of active map areas.. This is a random (large) number */ |
292 | #define DEFAULT_MAX_MAP_COUNT 65536 | 294 | #define DEFAULT_MAX_MAP_COUNT 65536 |
@@ -529,6 +531,10 @@ struct signal_struct { | |||
529 | #ifdef CONFIG_TASKSTATS | 531 | #ifdef CONFIG_TASKSTATS |
530 | struct taskstats *stats; | 532 | struct taskstats *stats; |
531 | #endif | 533 | #endif |
534 | #ifdef CONFIG_AUDIT | ||
535 | unsigned audit_tty; | ||
536 | struct tty_audit_buf *tty_audit_buf; | ||
537 | #endif | ||
532 | }; | 538 | }; |
533 | 539 | ||
534 | /* Context switch must be unlocked if interrupts are to be enabled */ | 540 | /* Context switch must be unlocked if interrupts are to be enabled */ |
@@ -972,7 +978,8 @@ struct task_struct { | |||
972 | unsigned int rt_priority; | 978 | unsigned int rt_priority; |
973 | cputime_t utime, stime; | 979 | cputime_t utime, stime; |
974 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 980 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
975 | struct timespec start_time; | 981 | struct timespec start_time; /* monotonic time */ |
982 | struct timespec real_start_time; /* boot based time */ | ||
976 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ | 983 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ |
977 | unsigned long min_flt, maj_flt; | 984 | unsigned long min_flt, maj_flt; |
978 | 985 | ||
@@ -1403,7 +1410,7 @@ extern struct task_struct *find_task_by_pid_type(int type, int pid); | |||
1403 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1410 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
1404 | 1411 | ||
1405 | /* per-UID process charging. */ | 1412 | /* per-UID process charging. */ |
1406 | extern struct user_struct * alloc_uid(uid_t); | 1413 | extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); |
1407 | static inline struct user_struct *get_uid(struct user_struct *u) | 1414 | static inline struct user_struct *get_uid(struct user_struct *u) |
1408 | { | 1415 | { |
1409 | atomic_inc(&u->__count); | 1416 | atomic_inc(&u->__count); |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index b02308ee7667..3ee412bc00ec 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -10,7 +10,7 @@ | |||
10 | struct screen_info { | 10 | struct screen_info { |
11 | u8 orig_x; /* 0x00 */ | 11 | u8 orig_x; /* 0x00 */ |
12 | u8 orig_y; /* 0x01 */ | 12 | u8 orig_y; /* 0x01 */ |
13 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | 13 | u16 ext_mem_k; /* 0x02 */ |
14 | u16 orig_video_page; /* 0x04 */ | 14 | u16 orig_video_page; /* 0x04 */ |
15 | u8 orig_video_mode; /* 0x06 */ | 15 | u8 orig_video_mode; /* 0x06 */ |
16 | u8 orig_video_cols; /* 0x07 */ | 16 | u8 orig_video_cols; /* 0x07 */ |
@@ -27,7 +27,7 @@ struct screen_info { | |||
27 | u16 lfb_depth; /* 0x16 */ | 27 | u16 lfb_depth; /* 0x16 */ |
28 | u32 lfb_base; /* 0x18 */ | 28 | u32 lfb_base; /* 0x18 */ |
29 | u32 lfb_size; /* 0x1c */ | 29 | u32 lfb_size; /* 0x1c */ |
30 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | 30 | u16 cl_magic, cl_offset; /* 0x20 */ |
31 | u16 lfb_linelength; /* 0x24 */ | 31 | u16 lfb_linelength; /* 0x24 */ |
32 | u8 red_size; /* 0x26 */ | 32 | u8 red_size; /* 0x26 */ |
33 | u8 red_pos; /* 0x27 */ | 33 | u8 red_pos; /* 0x27 */ |
@@ -42,9 +42,8 @@ struct screen_info { | |||
42 | u16 pages; /* 0x32 */ | 42 | u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | u16 vesa_attributes; /* 0x34 */ |
44 | u32 capabilities; /* 0x36 */ | 44 | u32 capabilities; /* 0x36 */ |
45 | /* 0x3a -- 0x3b reserved for future expansion */ | 45 | u8 _reserved[6]; /* 0x3a */ |
46 | /* 0x3c -- 0x3f micro stack for relocatable kernels */ | 46 | } __attribute__((packed)); |
47 | }; | ||
48 | 47 | ||
49 | extern struct screen_info screen_info; | 48 | extern struct screen_info screen_info; |
50 | 49 | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 1a82d30c4b17..d2b058130eb1 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <linux/spinlock.h> | ||
2 | |||
3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); | 1 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
4 | 2 | ||
5 | extern unsigned scx200_gpio_base; | 3 | extern unsigned scx200_gpio_base; |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3e8b1cf54303..262a8dccfa81 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -4,8 +4,6 @@ | |||
4 | 4 | ||
5 | #ifdef CONFIG_SECCOMP | 5 | #ifdef CONFIG_SECCOMP |
6 | 6 | ||
7 | #define NR_SECCOMP_MODES 1 | ||
8 | |||
9 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
10 | #include <asm/seccomp.h> | 8 | #include <asm/seccomp.h> |
11 | 9 | ||
@@ -18,20 +16,23 @@ static inline void secure_computing(int this_syscall) | |||
18 | __secure_computing(this_syscall); | 16 | __secure_computing(this_syscall); |
19 | } | 17 | } |
20 | 18 | ||
21 | static inline int has_secure_computing(struct thread_info *ti) | 19 | extern long prctl_get_seccomp(void); |
22 | { | 20 | extern long prctl_set_seccomp(unsigned long); |
23 | return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); | ||
24 | } | ||
25 | 21 | ||
26 | #else /* CONFIG_SECCOMP */ | 22 | #else /* CONFIG_SECCOMP */ |
27 | 23 | ||
28 | typedef struct { } seccomp_t; | 24 | typedef struct { } seccomp_t; |
29 | 25 | ||
30 | #define secure_computing(x) do { } while (0) | 26 | #define secure_computing(x) do { } while (0) |
31 | /* static inline to preserve typechecking */ | 27 | |
32 | static inline int has_secure_computing(struct thread_info *ti) | 28 | static inline long prctl_get_seccomp(void) |
29 | { | ||
30 | return -EINVAL; | ||
31 | } | ||
32 | |||
33 | static inline long prctl_set_seccomp(unsigned long arg2) | ||
33 | { | 34 | { |
34 | return 0; | 35 | return -EINVAL; |
35 | } | 36 | } |
36 | 37 | ||
37 | #endif /* CONFIG_SECCOMP */ | 38 | #endif /* CONFIG_SECCOMP */ |
diff --git a/include/linux/security.h b/include/linux/security.h index 9eb9e0fe0331..c11dc8aa0351 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -71,6 +71,7 @@ struct xfrm_user_sec_ctx; | |||
71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
73 | 73 | ||
74 | extern unsigned long mmap_min_addr; | ||
74 | /* | 75 | /* |
75 | * Values used in the task_security_ops calls | 76 | * Values used in the task_security_ops calls |
76 | */ | 77 | */ |
@@ -1241,8 +1242,9 @@ struct security_operations { | |||
1241 | int (*file_ioctl) (struct file * file, unsigned int cmd, | 1242 | int (*file_ioctl) (struct file * file, unsigned int cmd, |
1242 | unsigned long arg); | 1243 | unsigned long arg); |
1243 | int (*file_mmap) (struct file * file, | 1244 | int (*file_mmap) (struct file * file, |
1244 | unsigned long reqprot, | 1245 | unsigned long reqprot, unsigned long prot, |
1245 | unsigned long prot, unsigned long flags); | 1246 | unsigned long flags, unsigned long addr, |
1247 | unsigned long addr_only); | ||
1246 | int (*file_mprotect) (struct vm_area_struct * vma, | 1248 | int (*file_mprotect) (struct vm_area_struct * vma, |
1247 | unsigned long reqprot, | 1249 | unsigned long reqprot, |
1248 | unsigned long prot); | 1250 | unsigned long prot); |
@@ -1814,9 +1816,12 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
1814 | 1816 | ||
1815 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 1817 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
1816 | unsigned long prot, | 1818 | unsigned long prot, |
1817 | unsigned long flags) | 1819 | unsigned long flags, |
1820 | unsigned long addr, | ||
1821 | unsigned long addr_only) | ||
1818 | { | 1822 | { |
1819 | return security_ops->file_mmap (file, reqprot, prot, flags); | 1823 | return security_ops->file_mmap (file, reqprot, prot, flags, addr, |
1824 | addr_only); | ||
1820 | } | 1825 | } |
1821 | 1826 | ||
1822 | static inline int security_file_mprotect (struct vm_area_struct *vma, | 1827 | static inline int security_file_mprotect (struct vm_area_struct *vma, |
@@ -2489,7 +2494,9 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
2489 | 2494 | ||
2490 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 2495 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
2491 | unsigned long prot, | 2496 | unsigned long prot, |
2492 | unsigned long flags) | 2497 | unsigned long flags, |
2498 | unsigned long addr, | ||
2499 | unsigned long addr_only) | ||
2493 | { | 2500 | { |
2494 | return 0; | 2501 | return 0; |
2495 | } | 2502 | } |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 3e3cccbb1cac..83783ab0f552 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -50,5 +50,16 @@ int seq_release_private(struct inode *, struct file *); | |||
50 | 50 | ||
51 | #define SEQ_START_TOKEN ((void *)1) | 51 | #define SEQ_START_TOKEN ((void *)1) |
52 | 52 | ||
53 | /* | ||
54 | * Helpers for iteration over list_head-s in seq_files | ||
55 | */ | ||
56 | |||
57 | extern struct list_head *seq_list_start(struct list_head *head, | ||
58 | loff_t pos); | ||
59 | extern struct list_head *seq_list_start_head(struct list_head *head, | ||
60 | loff_t pos); | ||
61 | extern struct list_head *seq_list_next(void *v, struct list_head *head, | ||
62 | loff_t *ppos); | ||
63 | |||
53 | #endif | 64 | #endif |
54 | #endif | 65 | #endif |
diff --git a/include/linux/serial.h b/include/linux/serial.h index 33fc8cb8ddfb..deb714314fb1 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -177,11 +177,5 @@ struct serial_icounter_struct { | |||
177 | #ifdef __KERNEL__ | 177 | #ifdef __KERNEL__ |
178 | #include <linux/compiler.h> | 178 | #include <linux/compiler.h> |
179 | 179 | ||
180 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ | ||
181 | struct uart_port; /* forward declaration */ | ||
182 | extern int early_serial_setup(struct uart_port *port); | ||
183 | extern int early_serial_console_init(char *options); | ||
184 | extern int serial8250_start_console(struct uart_port *port, char *options); | ||
185 | |||
186 | #endif /* __KERNEL__ */ | 180 | #endif /* __KERNEL__ */ |
187 | #endif /* _LINUX_SERIAL_H */ | 181 | #endif /* _LINUX_SERIAL_H */ |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 71310d80c09a..706ee9a4c80c 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -60,4 +60,8 @@ void serial8250_unregister_port(int line); | |||
60 | void serial8250_suspend_port(int line); | 60 | void serial8250_suspend_port(int line); |
61 | void serial8250_resume_port(int line); | 61 | void serial8250_resume_port(int line); |
62 | 62 | ||
63 | extern int serial8250_find_port(struct uart_port *p); | ||
64 | extern int serial8250_find_port_for_earlycon(void); | ||
65 | extern int setup_early_serial8250_console(char *cmdline); | ||
66 | |||
63 | #endif | 67 | #endif |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 1ebf0455e224..d9377ce9ffd1 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -209,5 +209,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
209 | #define SERIO_PENMOUNT 0x31 | 209 | #define SERIO_PENMOUNT 0x31 |
210 | #define SERIO_TOUCHRIGHT 0x32 | 210 | #define SERIO_TOUCHRIGHT 0x32 |
211 | #define SERIO_TOUCHWIN 0x33 | 211 | #define SERIO_TOUCHWIN 0x33 |
212 | #define SERIO_TAOSEVM 0x34 | ||
212 | 213 | ||
213 | #endif | 214 | #endif |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 9a5eac508e5e..ea91abe740da 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | #include <linux/spinlock.h> | ||
10 | 9 | ||
11 | /* | 10 | /* |
12 | * Real Time signals may be queued. | 11 | * Real Time signals may be queued. |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6f0b2f7d0010..ce256438e619 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -65,13 +65,20 @@ | |||
65 | * is able to produce some skb->csum, it MUST use COMPLETE, | 65 | * is able to produce some skb->csum, it MUST use COMPLETE, |
66 | * not UNNECESSARY. | 66 | * not UNNECESSARY. |
67 | * | 67 | * |
68 | * PARTIAL: identical to the case for output below. This may occur | ||
69 | * on a packet received directly from another Linux OS, e.g., | ||
70 | * a virtualised Linux kernel on the same host. The packet can | ||
71 | * be treated in the same way as UNNECESSARY except that on | ||
72 | * output (i.e., forwarding) the checksum must be filled in | ||
73 | * by the OS or the hardware. | ||
74 | * | ||
68 | * B. Checksumming on output. | 75 | * B. Checksumming on output. |
69 | * | 76 | * |
70 | * NONE: skb is checksummed by protocol or csum is not required. | 77 | * NONE: skb is checksummed by protocol or csum is not required. |
71 | * | 78 | * |
72 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit | 79 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit |
73 | * from skb->transport_header to the end and to record the checksum | 80 | * from skb->csum_start to the end and to record the checksum |
74 | * at skb->transport_header + skb->csum. | 81 | * at skb->csum_start + skb->csum_offset. |
75 | * | 82 | * |
76 | * Device must show its capabilities in dev->features, set | 83 | * Device must show its capabilities in dev->features, set |
77 | * at device setup time. | 84 | * at device setup time. |
@@ -82,6 +89,7 @@ | |||
82 | * TCP/UDP over IPv4. Sigh. Vendors like this | 89 | * TCP/UDP over IPv4. Sigh. Vendors like this |
83 | * way by an unknown reason. Though, see comment above | 90 | * way by an unknown reason. Though, see comment above |
84 | * about CHECKSUM_UNNECESSARY. 8) | 91 | * about CHECKSUM_UNNECESSARY. 8) |
92 | * NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead. | ||
85 | * | 93 | * |
86 | * Any questions? No questions, good. --ANK | 94 | * Any questions? No questions, good. --ANK |
87 | */ | 95 | */ |
@@ -147,8 +155,8 @@ struct skb_shared_info { | |||
147 | 155 | ||
148 | /* We divide dataref into two halves. The higher 16 bits hold references | 156 | /* We divide dataref into two halves. The higher 16 bits hold references |
149 | * to the payload part of skb->data. The lower 16 bits hold references to | 157 | * to the payload part of skb->data. The lower 16 bits hold references to |
150 | * the entire skb->data. It is up to the users of the skb to agree on | 158 | * the entire skb->data. A clone of a headerless skb holds the length of |
151 | * where the payload starts. | 159 | * the header in skb->hdr_len. |
152 | * | 160 | * |
153 | * All users must obey the rule that the skb->data reference count must be | 161 | * All users must obey the rule that the skb->data reference count must be |
154 | * greater than or equal to the payload reference count. | 162 | * greater than or equal to the payload reference count. |
@@ -196,7 +204,6 @@ typedef unsigned char *sk_buff_data_t; | |||
196 | * @sk: Socket we are owned by | 204 | * @sk: Socket we are owned by |
197 | * @tstamp: Time we arrived | 205 | * @tstamp: Time we arrived |
198 | * @dev: Device we arrived on/are leaving by | 206 | * @dev: Device we arrived on/are leaving by |
199 | * @iif: ifindex of device we arrived on | ||
200 | * @transport_header: Transport layer header | 207 | * @transport_header: Transport layer header |
201 | * @network_header: Network layer header | 208 | * @network_header: Network layer header |
202 | * @mac_header: Link layer header | 209 | * @mac_header: Link layer header |
@@ -206,6 +213,7 @@ typedef unsigned char *sk_buff_data_t; | |||
206 | * @len: Length of actual data | 213 | * @len: Length of actual data |
207 | * @data_len: Data length | 214 | * @data_len: Data length |
208 | * @mac_len: Length of link layer header | 215 | * @mac_len: Length of link layer header |
216 | * @hdr_len: writable header length of cloned skb | ||
209 | * @csum: Checksum (must include start/offset pair) | 217 | * @csum: Checksum (must include start/offset pair) |
210 | * @csum_start: Offset from skb->head where checksumming should start | 218 | * @csum_start: Offset from skb->head where checksumming should start |
211 | * @csum_offset: Offset from csum_start where checksum should be stored | 219 | * @csum_offset: Offset from csum_start where checksum should be stored |
@@ -227,9 +235,12 @@ typedef unsigned char *sk_buff_data_t; | |||
227 | * @mark: Generic packet mark | 235 | * @mark: Generic packet mark |
228 | * @nfct: Associated connection, if any | 236 | * @nfct: Associated connection, if any |
229 | * @ipvs_property: skbuff is owned by ipvs | 237 | * @ipvs_property: skbuff is owned by ipvs |
238 | * @nf_trace: netfilter packet trace flag | ||
230 | * @nfctinfo: Relationship of this skb to the connection | 239 | * @nfctinfo: Relationship of this skb to the connection |
231 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 240 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
232 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 241 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
242 | * @iif: ifindex of device we arrived on | ||
243 | * @queue_mapping: Queue mapping for multiqueue devices | ||
233 | * @tc_index: Traffic control index | 244 | * @tc_index: Traffic control index |
234 | * @tc_verd: traffic control verdict | 245 | * @tc_verd: traffic control verdict |
235 | * @dma_cookie: a cookie to one of several possible DMA operations | 246 | * @dma_cookie: a cookie to one of several possible DMA operations |
@@ -245,8 +256,6 @@ struct sk_buff { | |||
245 | struct sock *sk; | 256 | struct sock *sk; |
246 | ktime_t tstamp; | 257 | ktime_t tstamp; |
247 | struct net_device *dev; | 258 | struct net_device *dev; |
248 | int iif; | ||
249 | /* 4 byte hole on 64 bit*/ | ||
250 | 259 | ||
251 | struct dst_entry *dst; | 260 | struct dst_entry *dst; |
252 | struct sec_path *sp; | 261 | struct sec_path *sp; |
@@ -260,8 +269,9 @@ struct sk_buff { | |||
260 | char cb[48]; | 269 | char cb[48]; |
261 | 270 | ||
262 | unsigned int len, | 271 | unsigned int len, |
263 | data_len, | 272 | data_len; |
264 | mac_len; | 273 | __u16 mac_len, |
274 | hdr_len; | ||
265 | union { | 275 | union { |
266 | __wsum csum; | 276 | __wsum csum; |
267 | struct { | 277 | struct { |
@@ -277,7 +287,8 @@ struct sk_buff { | |||
277 | nfctinfo:3; | 287 | nfctinfo:3; |
278 | __u8 pkt_type:3, | 288 | __u8 pkt_type:3, |
279 | fclone:2, | 289 | fclone:2, |
280 | ipvs_property:1; | 290 | ipvs_property:1, |
291 | nf_trace:1; | ||
281 | __be16 protocol; | 292 | __be16 protocol; |
282 | 293 | ||
283 | void (*destructor)(struct sk_buff *skb); | 294 | void (*destructor)(struct sk_buff *skb); |
@@ -288,12 +299,18 @@ struct sk_buff { | |||
288 | #ifdef CONFIG_BRIDGE_NETFILTER | 299 | #ifdef CONFIG_BRIDGE_NETFILTER |
289 | struct nf_bridge_info *nf_bridge; | 300 | struct nf_bridge_info *nf_bridge; |
290 | #endif | 301 | #endif |
302 | |||
303 | int iif; | ||
304 | __u16 queue_mapping; | ||
305 | |||
291 | #ifdef CONFIG_NET_SCHED | 306 | #ifdef CONFIG_NET_SCHED |
292 | __u16 tc_index; /* traffic control index */ | 307 | __u16 tc_index; /* traffic control index */ |
293 | #ifdef CONFIG_NET_CLS_ACT | 308 | #ifdef CONFIG_NET_CLS_ACT |
294 | __u16 tc_verd; /* traffic control verdict */ | 309 | __u16 tc_verd; /* traffic control verdict */ |
295 | #endif | 310 | #endif |
296 | #endif | 311 | #endif |
312 | /* 2 byte hole */ | ||
313 | |||
297 | #ifdef CONFIG_NET_DMA | 314 | #ifdef CONFIG_NET_DMA |
298 | dma_cookie_t dma_cookie; | 315 | dma_cookie_t dma_cookie; |
299 | #endif | 316 | #endif |
@@ -1322,6 +1339,20 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1322 | } | 1339 | } |
1323 | 1340 | ||
1324 | /** | 1341 | /** |
1342 | * skb_clone_writable - is the header of a clone writable | ||
1343 | * @skb: buffer to check | ||
1344 | * @len: length up to which to write | ||
1345 | * | ||
1346 | * Returns true if modifying the header part of the cloned buffer | ||
1347 | * does not requires the data to be copied. | ||
1348 | */ | ||
1349 | static inline int skb_clone_writable(struct sk_buff *skb, int len) | ||
1350 | { | ||
1351 | return !skb_header_cloned(skb) && | ||
1352 | skb_headroom(skb) + len <= skb->hdr_len; | ||
1353 | } | ||
1354 | |||
1355 | /** | ||
1325 | * skb_cow - copy header of skb when it is required | 1356 | * skb_cow - copy header of skb when it is required |
1326 | * @skb: buffer to cow | 1357 | * @skb: buffer to cow |
1327 | * @headroom: needed headroom | 1358 | * @headroom: needed headroom |
@@ -1608,7 +1639,7 @@ static inline int skb_csum_unnecessary(const struct sk_buff *skb) | |||
1608 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the | 1639 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the |
1609 | * hardware has already verified the correctness of the checksum. | 1640 | * hardware has already verified the correctness of the checksum. |
1610 | */ | 1641 | */ |
1611 | static inline unsigned int skb_checksum_complete(struct sk_buff *skb) | 1642 | static inline __sum16 skb_checksum_complete(struct sk_buff *skb) |
1612 | { | 1643 | { |
1613 | return skb_csum_unnecessary(skb) ? | 1644 | return skb_csum_unnecessary(skb) ? |
1614 | 0 : __skb_checksum_complete(skb); | 1645 | 0 : __skb_checksum_complete(skb); |
@@ -1709,6 +1740,20 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1709 | { } | 1740 | { } |
1710 | #endif | 1741 | #endif |
1711 | 1742 | ||
1743 | static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | ||
1744 | { | ||
1745 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1746 | skb->queue_mapping = queue_mapping; | ||
1747 | #endif | ||
1748 | } | ||
1749 | |||
1750 | static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) | ||
1751 | { | ||
1752 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1753 | to->queue_mapping = from->queue_mapping; | ||
1754 | #endif | ||
1755 | } | ||
1756 | |||
1712 | static inline int skb_is_gso(const struct sk_buff *skb) | 1757 | static inline int skb_is_gso(const struct sk_buff *skb) |
1713 | { | 1758 | { |
1714 | return skb_shinfo(skb)->gso_size; | 1759 | return skb_shinfo(skb)->gso_size; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index cebcd3833c76..27402fea9b79 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | typedef struct kmem_cache kmem_cache_t __deprecated; | ||
18 | |||
19 | /* | 17 | /* |
20 | * Flags to pass to kmem_cache_create(). | 18 | * Flags to pass to kmem_cache_create(). |
21 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. | 19 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. |
@@ -44,7 +42,6 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | |||
44 | void (*)(void *, struct kmem_cache *, unsigned long)); | 42 | void (*)(void *, struct kmem_cache *, unsigned long)); |
45 | void kmem_cache_destroy(struct kmem_cache *); | 43 | void kmem_cache_destroy(struct kmem_cache *); |
46 | int kmem_cache_shrink(struct kmem_cache *); | 44 | int kmem_cache_shrink(struct kmem_cache *); |
47 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
48 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | 45 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); |
49 | void kmem_cache_free(struct kmem_cache *, void *); | 46 | void kmem_cache_free(struct kmem_cache *, void *); |
50 | unsigned int kmem_cache_size(struct kmem_cache *); | 47 | unsigned int kmem_cache_size(struct kmem_cache *); |
@@ -63,16 +60,6 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
63 | sizeof(struct __struct), __alignof__(struct __struct),\ | 60 | sizeof(struct __struct), __alignof__(struct __struct),\ |
64 | (__flags), NULL, NULL) | 61 | (__flags), NULL, NULL) |
65 | 62 | ||
66 | #ifdef CONFIG_NUMA | ||
67 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
68 | #else | ||
69 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
70 | gfp_t flags, int node) | ||
71 | { | ||
72 | return kmem_cache_alloc(cachep, flags); | ||
73 | } | ||
74 | #endif | ||
75 | |||
76 | /* | 63 | /* |
77 | * The largest kmalloc size supported by the slab allocators is | 64 | * The largest kmalloc size supported by the slab allocators is |
78 | * 32 megabyte (2^25) or the maximum allocatable page order if that is | 65 | * 32 megabyte (2^25) or the maximum allocatable page order if that is |
@@ -91,7 +78,6 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
91 | /* | 78 | /* |
92 | * Common kmalloc functions provided by all allocators | 79 | * Common kmalloc functions provided by all allocators |
93 | */ | 80 | */ |
94 | void *__kmalloc(size_t, gfp_t); | ||
95 | void *__kzalloc(size_t, gfp_t); | 81 | void *__kzalloc(size_t, gfp_t); |
96 | void * __must_check krealloc(const void *, size_t, gfp_t); | 82 | void * __must_check krealloc(const void *, size_t, gfp_t); |
97 | void kfree(const void *); | 83 | void kfree(const void *); |
@@ -102,40 +88,6 @@ size_t ksize(const void *); | |||
102 | * @n: number of elements. | 88 | * @n: number of elements. |
103 | * @size: element size. | 89 | * @size: element size. |
104 | * @flags: the type of memory to allocate. | 90 | * @flags: the type of memory to allocate. |
105 | */ | ||
106 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
107 | { | ||
108 | if (n != 0 && size > ULONG_MAX / n) | ||
109 | return NULL; | ||
110 | return __kzalloc(n * size, flags); | ||
111 | } | ||
112 | |||
113 | /* | ||
114 | * Allocator specific definitions. These are mainly used to establish optimized | ||
115 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by selecting | ||
116 | * the appropriate general cache at compile time. | ||
117 | */ | ||
118 | |||
119 | #if defined(CONFIG_SLAB) || defined(CONFIG_SLUB) | ||
120 | #ifdef CONFIG_SLUB | ||
121 | #include <linux/slub_def.h> | ||
122 | #else | ||
123 | #include <linux/slab_def.h> | ||
124 | #endif /* !CONFIG_SLUB */ | ||
125 | #else | ||
126 | |||
127 | /* | ||
128 | * Fallback definitions for an allocator not wanting to provide | ||
129 | * its own optimized kmalloc definitions (like SLOB). | ||
130 | */ | ||
131 | |||
132 | /** | ||
133 | * kmalloc - allocate memory | ||
134 | * @size: how many bytes of memory are required. | ||
135 | * @flags: the type of memory to allocate. | ||
136 | * | ||
137 | * kmalloc is the normal method of allocating memory | ||
138 | * in the kernel. | ||
139 | * | 91 | * |
140 | * The @flags argument may be one of: | 92 | * The @flags argument may be one of: |
141 | * | 93 | * |
@@ -143,7 +95,7 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
143 | * | 95 | * |
144 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | 96 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. |
145 | * | 97 | * |
146 | * %GFP_ATOMIC - Allocation will not sleep. | 98 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. |
147 | * For example, use this inside interrupt handlers. | 99 | * For example, use this inside interrupt handlers. |
148 | * | 100 | * |
149 | * %GFP_HIGHUSER - Allocate pages from high memory. | 101 | * %GFP_HIGHUSER - Allocate pages from high memory. |
@@ -152,18 +104,22 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
152 | * | 104 | * |
153 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | 105 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. |
154 | * | 106 | * |
107 | * %GFP_NOWAIT - Allocation will not sleep. | ||
108 | * | ||
109 | * %GFP_THISNODE - Allocate node-local memory only. | ||
110 | * | ||
111 | * %GFP_DMA - Allocation suitable for DMA. | ||
112 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
113 | * slab created with SLAB_DMA. | ||
114 | * | ||
155 | * Also it is possible to set different flags by OR'ing | 115 | * Also it is possible to set different flags by OR'ing |
156 | * in one or more of the following additional @flags: | 116 | * in one or more of the following additional @flags: |
157 | * | 117 | * |
158 | * %__GFP_COLD - Request cache-cold pages instead of | 118 | * %__GFP_COLD - Request cache-cold pages instead of |
159 | * trying to return cache-warm pages. | 119 | * trying to return cache-warm pages. |
160 | * | 120 | * |
161 | * %__GFP_DMA - Request memory from the DMA-capable zone. | ||
162 | * | ||
163 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | 121 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. |
164 | * | 122 | * |
165 | * %__GFP_HIGHMEM - Allocated memory may be from highmem. | ||
166 | * | ||
167 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | 123 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail |
168 | * (think twice before using). | 124 | * (think twice before using). |
169 | * | 125 | * |
@@ -173,24 +129,57 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
173 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | 129 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. |
174 | * | 130 | * |
175 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | 131 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. |
132 | * | ||
133 | * There are other flags available as well, but these are not intended | ||
134 | * for general use, and so are not documented here. For a full list of | ||
135 | * potential flags, always refer to linux/gfp.h. | ||
176 | */ | 136 | */ |
177 | static inline void *kmalloc(size_t size, gfp_t flags) | 137 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
178 | { | 138 | { |
179 | return __kmalloc(size, flags); | 139 | if (n != 0 && size > ULONG_MAX / n) |
140 | return NULL; | ||
141 | return __kzalloc(n * size, flags); | ||
180 | } | 142 | } |
181 | 143 | ||
182 | /** | 144 | /* |
183 | * kzalloc - allocate memory. The memory is set to zero. | 145 | * Allocator specific definitions. These are mainly used to establish optimized |
184 | * @size: how many bytes of memory are required. | 146 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by |
185 | * @flags: the type of memory to allocate (see kmalloc). | 147 | * selecting the appropriate general cache at compile time. |
148 | * | ||
149 | * Allocators must define at least: | ||
150 | * | ||
151 | * kmem_cache_alloc() | ||
152 | * __kmalloc() | ||
153 | * kmalloc() | ||
154 | * kzalloc() | ||
155 | * | ||
156 | * Those wishing to support NUMA must also define: | ||
157 | * | ||
158 | * kmem_cache_alloc_node() | ||
159 | * kmalloc_node() | ||
160 | * | ||
161 | * See each allocator definition file for additional comments and | ||
162 | * implementation notes. | ||
186 | */ | 163 | */ |
187 | static inline void *kzalloc(size_t size, gfp_t flags) | 164 | #ifdef CONFIG_SLUB |
188 | { | 165 | #include <linux/slub_def.h> |
189 | return __kzalloc(size, flags); | 166 | #elif defined(CONFIG_SLOB) |
190 | } | 167 | #include <linux/slob_def.h> |
168 | #else | ||
169 | #include <linux/slab_def.h> | ||
191 | #endif | 170 | #endif |
192 | 171 | ||
193 | #ifndef CONFIG_NUMA | 172 | #if !defined(CONFIG_NUMA) && !defined(CONFIG_SLOB) |
173 | /** | ||
174 | * kmalloc_node - allocate memory from a specific node | ||
175 | * @size: how many bytes of memory are required. | ||
176 | * @flags: the type of memory to allocate (see kcalloc). | ||
177 | * @node: node to allocate from. | ||
178 | * | ||
179 | * kmalloc() for non-local nodes, used to allocate from a specific node | ||
180 | * if available. Equivalent to kmalloc() in the non-NUMA single-node | ||
181 | * case. | ||
182 | */ | ||
194 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 183 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
195 | { | 184 | { |
196 | return kmalloc(size, flags); | 185 | return kmalloc(size, flags); |
@@ -200,7 +189,15 @@ static inline void *__kmalloc_node(size_t size, gfp_t flags, int node) | |||
200 | { | 189 | { |
201 | return __kmalloc(size, flags); | 190 | return __kmalloc(size, flags); |
202 | } | 191 | } |
203 | #endif /* !CONFIG_NUMA */ | 192 | |
193 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
194 | |||
195 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
196 | gfp_t flags, int node) | ||
197 | { | ||
198 | return kmem_cache_alloc(cachep, flags); | ||
199 | } | ||
200 | #endif /* !CONFIG_NUMA && !CONFIG_SLOB */ | ||
204 | 201 | ||
205 | /* | 202 | /* |
206 | * kmalloc_track_caller is a special version of kmalloc that records the | 203 | * kmalloc_track_caller is a special version of kmalloc that records the |
@@ -247,4 +244,3 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | |||
247 | 244 | ||
248 | #endif /* __KERNEL__ */ | 245 | #endif /* __KERNEL__ */ |
249 | #endif /* _LINUX_SLAB_H */ | 246 | #endif /* _LINUX_SLAB_H */ |
250 | |||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 8d81a60518e4..365d036c454a 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -25,6 +25,9 @@ struct cache_sizes { | |||
25 | }; | 25 | }; |
26 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
27 | 27 | ||
28 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
29 | void *__kmalloc(size_t size, gfp_t flags); | ||
30 | |||
28 | static inline void *kmalloc(size_t size, gfp_t flags) | 31 | static inline void *kmalloc(size_t size, gfp_t flags) |
29 | { | 32 | { |
30 | if (__builtin_constant_p(size)) { | 33 | if (__builtin_constant_p(size)) { |
@@ -79,6 +82,7 @@ found: | |||
79 | 82 | ||
80 | #ifdef CONFIG_NUMA | 83 | #ifdef CONFIG_NUMA |
81 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 84 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); |
85 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
82 | 86 | ||
83 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 87 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
84 | { | 88 | { |
diff --git a/include/linux/slob_def.h b/include/linux/slob_def.h new file mode 100644 index 000000000000..a2daf2d418a9 --- /dev/null +++ b/include/linux/slob_def.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __LINUX_SLOB_DEF_H | ||
2 | #define __LINUX_SLOB_DEF_H | ||
3 | |||
4 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
5 | |||
6 | static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) | ||
7 | { | ||
8 | return kmem_cache_alloc_node(cachep, flags, -1); | ||
9 | } | ||
10 | |||
11 | void *__kmalloc_node(size_t size, gfp_t flags, int node); | ||
12 | |||
13 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
14 | { | ||
15 | return __kmalloc_node(size, flags, node); | ||
16 | } | ||
17 | |||
18 | /** | ||
19 | * kmalloc - allocate memory | ||
20 | * @size: how many bytes of memory are required. | ||
21 | * @flags: the type of memory to allocate (see kcalloc). | ||
22 | * | ||
23 | * kmalloc is the normal method of allocating memory | ||
24 | * in the kernel. | ||
25 | */ | ||
26 | static inline void *kmalloc(size_t size, gfp_t flags) | ||
27 | { | ||
28 | return __kmalloc_node(size, flags, -1); | ||
29 | } | ||
30 | |||
31 | static inline void *__kmalloc(size_t size, gfp_t flags) | ||
32 | { | ||
33 | return kmalloc(size, flags); | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * kzalloc - allocate memory. The memory is set to zero. | ||
38 | * @size: how many bytes of memory are required. | ||
39 | * @flags: the type of memory to allocate (see kcalloc). | ||
40 | */ | ||
41 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
42 | { | ||
43 | return __kzalloc(size, flags); | ||
44 | } | ||
45 | |||
46 | #endif /* __LINUX_SLOB_DEF_H */ | ||
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 6207a3d8da71..a582f6771525 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -171,6 +171,9 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
171 | #define ZERO_SIZE_PTR ((void *)16) | 171 | #define ZERO_SIZE_PTR ((void *)16) |
172 | 172 | ||
173 | 173 | ||
174 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
175 | void *__kmalloc(size_t size, gfp_t flags); | ||
176 | |||
174 | static inline void *kmalloc(size_t size, gfp_t flags) | 177 | static inline void *kmalloc(size_t size, gfp_t flags) |
175 | { | 178 | { |
176 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 179 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
@@ -198,7 +201,8 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
198 | } | 201 | } |
199 | 202 | ||
200 | #ifdef CONFIG_NUMA | 203 | #ifdef CONFIG_NUMA |
201 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 204 | void *__kmalloc_node(size_t size, gfp_t flags, int node); |
205 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
202 | 206 | ||
203 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 207 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
204 | { | 208 | { |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index cf715a40d833..58962c51dee1 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/spinlock.h> | ||
7 | 6 | ||
8 | #define kernel_locked() (current->lock_depth >= 0) | 7 | #define kernel_locked() (current->lock_depth >= 0) |
9 | 8 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 6e7c9483a6a6..f852e1afd65a 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -253,6 +253,9 @@ struct ucred { | |||
253 | 253 | ||
254 | #define MSG_EOF MSG_FIN | 254 | #define MSG_EOF MSG_FIN |
255 | 255 | ||
256 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | ||
257 | descriptor received through | ||
258 | SCM_RIGHTS */ | ||
256 | #if defined(CONFIG_COMPAT) | 259 | #if defined(CONFIG_COMPAT) |
257 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ | 260 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ |
258 | #else | 261 | #else |
@@ -287,6 +290,7 @@ struct ucred { | |||
287 | #define SOL_NETLINK 270 | 290 | #define SOL_NETLINK 270 |
288 | #define SOL_TIPC 271 | 291 | #define SOL_TIPC 271 |
289 | #define SOL_RXRPC 272 | 292 | #define SOL_RXRPC 272 |
293 | #define SOL_PPPOL2TP 273 | ||
290 | 294 | ||
291 | /* IPX options */ | 295 | /* IPX options */ |
292 | #define IPX_TYPE 1 | 296 | #define IPX_TYPE 1 |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 34d4b075f7b8..40c7b5d993b9 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -153,8 +153,6 @@ | |||
153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ | 153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ |
154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ | 154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ |
155 | 155 | ||
156 | int sonypi_camera_command(int command, u8 value); | ||
157 | |||
158 | #endif /* __KERNEL__ */ | 156 | #endif /* __KERNEL__ */ |
159 | 157 | ||
160 | #endif /* _SONYPI_H_ */ | 158 | #endif /* _SONYPI_H_ */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index a946176db638..c376f3b36c89 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -282,6 +282,13 @@ do { \ | |||
282 | 1 : ({ local_irq_restore(flags); 0; }); \ | 282 | 1 : ({ local_irq_restore(flags); 0; }); \ |
283 | }) | 283 | }) |
284 | 284 | ||
285 | #define write_trylock_irqsave(lock, flags) \ | ||
286 | ({ \ | ||
287 | local_irq_save(flags); \ | ||
288 | write_trylock(lock) ? \ | ||
289 | 1 : ({ local_irq_restore(flags); 0; }); \ | ||
290 | }) | ||
291 | |||
285 | /* | 292 | /* |
286 | * Locks two spinlocks l1 and l2. | 293 | * Locks two spinlocks l1 and l2. |
287 | * l1_first indicates if spinlock l1 should be taken first. | 294 | * l1_first indicates if spinlock l1 should be taken first. |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 534cdc7be58d..7a69ca3bebaf 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
19 | #include <linux/rcupdate.h> | ||
19 | 20 | ||
20 | /* size of the nodename buffer */ | 21 | /* size of the nodename buffer */ |
21 | #define UNX_MAXNODENAME 32 | 22 | #define UNX_MAXNODENAME 32 |
@@ -30,22 +31,28 @@ struct auth_cred { | |||
30 | /* | 31 | /* |
31 | * Client user credentials | 32 | * Client user credentials |
32 | */ | 33 | */ |
34 | struct rpc_auth; | ||
35 | struct rpc_credops; | ||
33 | struct rpc_cred { | 36 | struct rpc_cred { |
34 | struct hlist_node cr_hash; /* hash chain */ | 37 | struct hlist_node cr_hash; /* hash chain */ |
35 | struct rpc_credops * cr_ops; | 38 | struct list_head cr_lru; /* lru garbage collection */ |
36 | unsigned long cr_expire; /* when to gc */ | 39 | struct rcu_head cr_rcu; |
37 | atomic_t cr_count; /* ref count */ | 40 | struct rpc_auth * cr_auth; |
38 | unsigned short cr_flags; /* various flags */ | 41 | const struct rpc_credops *cr_ops; |
39 | #ifdef RPC_DEBUG | 42 | #ifdef RPC_DEBUG |
40 | unsigned long cr_magic; /* 0x0f4aa4f0 */ | 43 | unsigned long cr_magic; /* 0x0f4aa4f0 */ |
41 | #endif | 44 | #endif |
45 | unsigned long cr_expire; /* when to gc */ | ||
46 | unsigned long cr_flags; /* various flags */ | ||
47 | atomic_t cr_count; /* ref count */ | ||
42 | 48 | ||
43 | uid_t cr_uid; | 49 | uid_t cr_uid; |
44 | 50 | ||
45 | /* per-flavor data */ | 51 | /* per-flavor data */ |
46 | }; | 52 | }; |
47 | #define RPCAUTH_CRED_NEW 0x0001 | 53 | #define RPCAUTH_CRED_NEW 0 |
48 | #define RPCAUTH_CRED_UPTODATE 0x0002 | 54 | #define RPCAUTH_CRED_UPTODATE 1 |
55 | #define RPCAUTH_CRED_HASHED 2 | ||
49 | 56 | ||
50 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 57 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
51 | 58 | ||
@@ -56,10 +63,10 @@ struct rpc_cred { | |||
56 | #define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1) | 63 | #define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1) |
57 | struct rpc_cred_cache { | 64 | struct rpc_cred_cache { |
58 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; | 65 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; |
59 | unsigned long nextgc; /* next garbage collection */ | 66 | spinlock_t lock; |
60 | unsigned long expire; /* cache expiry interval */ | ||
61 | }; | 67 | }; |
62 | 68 | ||
69 | struct rpc_authops; | ||
63 | struct rpc_auth { | 70 | struct rpc_auth { |
64 | unsigned int au_cslack; /* call cred size estimate */ | 71 | unsigned int au_cslack; /* call cred size estimate */ |
65 | /* guess at number of u32's auth adds before | 72 | /* guess at number of u32's auth adds before |
@@ -69,7 +76,7 @@ struct rpc_auth { | |||
69 | unsigned int au_verfsize; | 76 | unsigned int au_verfsize; |
70 | 77 | ||
71 | unsigned int au_flags; /* various flags */ | 78 | unsigned int au_flags; /* various flags */ |
72 | struct rpc_authops * au_ops; /* operations */ | 79 | const struct rpc_authops *au_ops; /* operations */ |
73 | rpc_authflavor_t au_flavor; /* pseudoflavor (note may | 80 | rpc_authflavor_t au_flavor; /* pseudoflavor (note may |
74 | * differ from the flavor in | 81 | * differ from the flavor in |
75 | * au_ops->au_flavor in gss | 82 | * au_ops->au_flavor in gss |
@@ -115,17 +122,19 @@ struct rpc_credops { | |||
115 | void *, __be32 *, void *); | 122 | void *, __be32 *, void *); |
116 | }; | 123 | }; |
117 | 124 | ||
118 | extern struct rpc_authops authunix_ops; | 125 | extern const struct rpc_authops authunix_ops; |
119 | extern struct rpc_authops authnull_ops; | 126 | extern const struct rpc_authops authnull_ops; |
120 | #ifdef CONFIG_SUNRPC_SECURE | 127 | |
121 | extern struct rpc_authops authdes_ops; | 128 | void __init rpc_init_authunix(void); |
122 | #endif | 129 | void __init rpcauth_init_module(void); |
130 | void __exit rpcauth_remove_module(void); | ||
123 | 131 | ||
124 | int rpcauth_register(struct rpc_authops *); | 132 | int rpcauth_register(const struct rpc_authops *); |
125 | int rpcauth_unregister(struct rpc_authops *); | 133 | int rpcauth_unregister(const struct rpc_authops *); |
126 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); | 134 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); |
127 | void rpcauth_destroy(struct rpc_auth *); | 135 | void rpcauth_release(struct rpc_auth *); |
128 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 136 | 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 *); | ||
129 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); | 138 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); |
130 | struct rpc_cred * rpcauth_bindcred(struct rpc_task *); | 139 | struct rpc_cred * rpcauth_bindcred(struct rpc_task *); |
131 | void rpcauth_holdcred(struct rpc_task *); | 140 | void rpcauth_holdcred(struct rpc_task *); |
@@ -138,8 +147,9 @@ int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, | |||
138 | int rpcauth_refreshcred(struct rpc_task *); | 147 | int rpcauth_refreshcred(struct rpc_task *); |
139 | void rpcauth_invalcred(struct rpc_task *); | 148 | void rpcauth_invalcred(struct rpc_task *); |
140 | int rpcauth_uptodatecred(struct rpc_task *); | 149 | int rpcauth_uptodatecred(struct rpc_task *); |
141 | int rpcauth_init_credcache(struct rpc_auth *, unsigned long); | 150 | int rpcauth_init_credcache(struct rpc_auth *); |
142 | void rpcauth_free_credcache(struct rpc_auth *); | 151 | void rpcauth_destroy_credcache(struct rpc_auth *); |
152 | void rpcauth_clear_credcache(struct rpc_cred_cache *); | ||
143 | 153 | ||
144 | static inline | 154 | static inline |
145 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) | 155 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) |
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index 2db2fbf34947..67658e17a375 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
@@ -75,6 +75,7 @@ struct gss_cl_ctx { | |||
75 | struct xdr_netobj gc_wire_ctx; | 75 | struct xdr_netobj gc_wire_ctx; |
76 | u32 gc_win; | 76 | u32 gc_win; |
77 | unsigned long gc_expiry; | 77 | unsigned long gc_expiry; |
78 | struct rcu_head gc_rcu; | ||
78 | }; | 79 | }; |
79 | 80 | ||
80 | struct gss_upcall_msg; | 81 | struct gss_upcall_msg; |
@@ -85,11 +86,6 @@ struct gss_cred { | |||
85 | struct gss_upcall_msg *gc_upcall; | 86 | struct gss_upcall_msg *gc_upcall; |
86 | }; | 87 | }; |
87 | 88 | ||
88 | #define gc_uid gc_base.cr_uid | ||
89 | #define gc_count gc_base.cr_count | ||
90 | #define gc_flags gc_base.cr_flags | ||
91 | #define gc_expire gc_base.cr_expire | ||
92 | |||
93 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
94 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ | 90 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ |
95 | 91 | ||
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 66611423c8ee..c0d9d14983b3 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -24,8 +24,10 @@ struct rpc_inode; | |||
24 | * The high-level client handle | 24 | * The high-level client handle |
25 | */ | 25 | */ |
26 | struct rpc_clnt { | 26 | struct rpc_clnt { |
27 | atomic_t cl_count; /* Number of clones */ | 27 | struct kref cl_kref; /* Number of references */ |
28 | atomic_t cl_users; /* number of references */ | 28 | struct list_head cl_clients; /* Global list of clients */ |
29 | struct list_head cl_tasks; /* List of tasks */ | ||
30 | spinlock_t cl_lock; /* spinlock */ | ||
29 | struct rpc_xprt * cl_xprt; /* transport */ | 31 | struct rpc_xprt * cl_xprt; /* transport */ |
30 | struct rpc_procinfo * cl_procinfo; /* procedure info */ | 32 | struct rpc_procinfo * cl_procinfo; /* procedure info */ |
31 | u32 cl_prog, /* RPC program number */ | 33 | u32 cl_prog, /* RPC program number */ |
@@ -41,9 +43,7 @@ struct rpc_clnt { | |||
41 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 43 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
42 | cl_intr : 1,/* interruptible */ | 44 | cl_intr : 1,/* interruptible */ |
43 | cl_discrtry : 1,/* disconnect before retry */ | 45 | cl_discrtry : 1,/* disconnect before retry */ |
44 | cl_autobind : 1,/* use getport() */ | 46 | cl_autobind : 1;/* use getport() */ |
45 | cl_oneshot : 1,/* dispose after use */ | ||
46 | cl_dead : 1;/* abandoned */ | ||
47 | 47 | ||
48 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ | 48 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ |
49 | 49 | ||
@@ -98,6 +98,7 @@ struct rpc_create_args { | |||
98 | int protocol; | 98 | int protocol; |
99 | struct sockaddr *address; | 99 | struct sockaddr *address; |
100 | size_t addrsize; | 100 | size_t addrsize; |
101 | struct sockaddr *saddress; | ||
101 | struct rpc_timeout *timeout; | 102 | struct rpc_timeout *timeout; |
102 | char *servername; | 103 | char *servername; |
103 | struct rpc_program *program; | 104 | struct rpc_program *program; |
@@ -110,20 +111,20 @@ struct rpc_create_args { | |||
110 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) | 111 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) |
111 | #define RPC_CLNT_CREATE_INTR (1UL << 1) | 112 | #define RPC_CLNT_CREATE_INTR (1UL << 1) |
112 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) | 113 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) |
113 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) | 114 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3) |
114 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) | 115 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) |
115 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) | 116 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) |
116 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 6) | ||
117 | 117 | ||
118 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 118 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
119 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 119 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
120 | struct rpc_program *, int); | 120 | struct rpc_program *, int); |
121 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 121 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
122 | int rpc_shutdown_client(struct rpc_clnt *); | 122 | void rpc_shutdown_client(struct rpc_clnt *); |
123 | int rpc_destroy_client(struct rpc_clnt *); | ||
124 | void rpc_release_client(struct rpc_clnt *); | 123 | void rpc_release_client(struct rpc_clnt *); |
124 | |||
125 | int rpcb_register(u32, u32, int, unsigned short, int *); | 125 | int rpcb_register(u32, u32, int, unsigned short, int *); |
126 | void rpcb_getport(struct rpc_task *); | 126 | int rpcb_getport_sync(struct sockaddr_in *, __u32, __u32, int); |
127 | void rpcb_getport_async(struct rpc_task *); | ||
127 | 128 | ||
128 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); | 129 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); |
129 | 130 | ||
@@ -132,20 +133,16 @@ int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, | |||
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, struct rpc_message *msg, |
134 | int flags); | 135 | int flags); |
136 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | ||
137 | int flags); | ||
135 | void rpc_restart_call(struct rpc_task *); | 138 | void rpc_restart_call(struct rpc_task *); |
136 | void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); | 139 | void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); |
137 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); | 140 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); |
138 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 141 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
139 | size_t rpc_max_payload(struct rpc_clnt *); | 142 | size_t rpc_max_payload(struct rpc_clnt *); |
140 | void rpc_force_rebind(struct rpc_clnt *); | 143 | void rpc_force_rebind(struct rpc_clnt *); |
141 | int rpc_ping(struct rpc_clnt *clnt, int flags); | ||
142 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 144 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
143 | char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 145 | char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
144 | 146 | ||
145 | /* | ||
146 | * Helper function for NFSroot support | ||
147 | */ | ||
148 | int rpcb_getport_external(struct sockaddr_in *, __u32, __u32, int); | ||
149 | |||
150 | #endif /* __KERNEL__ */ | 147 | #endif /* __KERNEL__ */ |
151 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 148 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 5eca9e442051..bbac101ac372 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -77,7 +77,7 @@ struct gss_api_mech { | |||
77 | struct module *gm_owner; | 77 | struct module *gm_owner; |
78 | struct xdr_netobj gm_oid; | 78 | struct xdr_netobj gm_oid; |
79 | char *gm_name; | 79 | char *gm_name; |
80 | struct gss_api_ops *gm_ops; | 80 | const struct gss_api_ops *gm_ops; |
81 | /* pseudoflavors supported by this mechanism: */ | 81 | /* pseudoflavors supported by this mechanism: */ |
82 | int gm_pf_num; | 82 | int gm_pf_num; |
83 | struct pf_desc * gm_pfs; | 83 | struct pf_desc * gm_pfs; |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index ad293760f6eb..51b977a4ca20 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -23,9 +23,11 @@ struct rpc_inode { | |||
23 | void *private; | 23 | void *private; |
24 | struct list_head pipe; | 24 | struct list_head pipe; |
25 | struct list_head in_upcall; | 25 | struct list_head in_upcall; |
26 | struct list_head in_downcall; | ||
26 | int pipelen; | 27 | int pipelen; |
27 | int nreaders; | 28 | int nreaders; |
28 | int nwriters; | 29 | int nwriters; |
30 | int nkern_readwriters; | ||
29 | wait_queue_head_t waitq; | 31 | wait_queue_head_t waitq; |
30 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | 32 | #define RPC_PIPE_WAIT_FOR_OPEN 1 |
31 | int flags; | 33 | int flags; |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 2047fb202a13..8ea077db0099 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -98,7 +98,6 @@ struct rpc_task { | |||
98 | unsigned short tk_pid; /* debugging aid */ | 98 | unsigned short tk_pid; /* debugging aid */ |
99 | #endif | 99 | #endif |
100 | }; | 100 | }; |
101 | #define tk_auth tk_client->cl_auth | ||
102 | #define tk_xprt tk_client->cl_xprt | 101 | #define tk_xprt tk_client->cl_xprt |
103 | 102 | ||
104 | /* support walking a list of tasks on a wait queue */ | 103 | /* support walking a list of tasks on a wait queue */ |
@@ -110,11 +109,6 @@ struct rpc_task { | |||
110 | if (!list_empty(head) && \ | 109 | if (!list_empty(head) && \ |
111 | ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1)) | 110 | ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1)) |
112 | 111 | ||
113 | /* .. and walking list of all tasks */ | ||
114 | #define alltask_for_each(task, pos, head) \ | ||
115 | list_for_each(pos, head) \ | ||
116 | if ((task=list_entry(pos, struct rpc_task, tk_task)),1) | ||
117 | |||
118 | typedef void (*rpc_action)(struct rpc_task *); | 112 | typedef void (*rpc_action)(struct rpc_task *); |
119 | 113 | ||
120 | struct rpc_call_ops { | 114 | struct rpc_call_ops { |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index e21dd93ac4b7..a53e0fa855d2 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -59,6 +59,7 @@ struct svc_sock { | |||
59 | /* cache of various info for TCP sockets */ | 59 | /* cache of various info for TCP sockets */ |
60 | void *sk_info_authunix; | 60 | void *sk_info_authunix; |
61 | 61 | ||
62 | struct sockaddr_storage sk_local; /* local address */ | ||
62 | struct sockaddr_storage sk_remote; /* remote peer's address */ | 63 | struct sockaddr_storage sk_remote; /* remote peer's address */ |
63 | int sk_remotelen; /* length of address */ | 64 | int sk_remotelen; /* length of address */ |
64 | }; | 65 | }; |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 34f7590506fa..d11cedd14f0f 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/sunrpc/xdr.h> | 17 | #include <linux/sunrpc/xdr.h> |
18 | #include <linux/sunrpc/msg_prot.h> | 18 | #include <linux/sunrpc/msg_prot.h> |
19 | 19 | ||
20 | #ifdef __KERNEL__ | ||
21 | |||
20 | extern unsigned int xprt_udp_slot_table_entries; | 22 | extern unsigned int xprt_udp_slot_table_entries; |
21 | extern unsigned int xprt_tcp_slot_table_entries; | 23 | extern unsigned int xprt_tcp_slot_table_entries; |
22 | 24 | ||
@@ -194,7 +196,13 @@ struct rpc_xprt { | |||
194 | char * address_strings[RPC_DISPLAY_MAX]; | 196 | char * address_strings[RPC_DISPLAY_MAX]; |
195 | }; | 197 | }; |
196 | 198 | ||
197 | #ifdef __KERNEL__ | 199 | struct rpc_xprtsock_create { |
200 | int proto; /* IPPROTO_UDP or IPPROTO_TCP */ | ||
201 | struct sockaddr * srcaddr; /* optional local address */ | ||
202 | struct sockaddr * dstaddr; /* remote peer address */ | ||
203 | size_t addrlen; | ||
204 | struct rpc_timeout * timeout; /* optional timeout parameters */ | ||
205 | }; | ||
198 | 206 | ||
199 | /* | 207 | /* |
200 | * Transport operations used by ULPs | 208 | * Transport operations used by ULPs |
@@ -204,7 +212,7 @@ void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long | |||
204 | /* | 212 | /* |
205 | * Generic internal transport functions | 213 | * Generic internal transport functions |
206 | */ | 214 | */ |
207 | struct rpc_xprt * xprt_create_transport(int proto, struct sockaddr *addr, size_t size, struct rpc_timeout *toparms); | 215 | struct rpc_xprt * xprt_create_transport(struct rpc_xprtsock_create *args); |
208 | void xprt_connect(struct rpc_task *task); | 216 | void xprt_connect(struct rpc_task *task); |
209 | void xprt_reserve(struct rpc_task *task); | 217 | void xprt_reserve(struct rpc_task *task); |
210 | int xprt_reserve_xprt(struct rpc_task *task); | 218 | int xprt_reserve_xprt(struct rpc_task *task); |
@@ -242,8 +250,8 @@ void xprt_disconnect(struct rpc_xprt *xprt); | |||
242 | /* | 250 | /* |
243 | * Socket transport setup operations | 251 | * Socket transport setup operations |
244 | */ | 252 | */ |
245 | struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 253 | struct rpc_xprt * xs_setup_udp(struct rpc_xprtsock_create *args); |
246 | struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 254 | struct rpc_xprt * xs_setup_tcp(struct rpc_xprtsock_create *args); |
247 | int init_socket_xprt(void); | 255 | int init_socket_xprt(void); |
248 | void cleanup_socket_xprt(void); | 256 | void cleanup_socket_xprt(void); |
249 | 257 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index e699ab279c2c..e285746588d6 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -101,8 +101,7 @@ struct sysdev_attribute { | |||
101 | 101 | ||
102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ | 102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ |
103 | { \ | 103 | { \ |
104 | .attr = { .name = __stringify(_name), .mode = _mode, \ | 104 | .attr = { .name = __stringify(_name), .mode = _mode }, \ |
105 | .owner = THIS_MODULE }, \ | ||
106 | .show = _show, \ | 105 | .show = _show, \ |
107 | .store = _store, \ | 106 | .store = _store, \ |
108 | } | 107 | } |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 7d5d1ec95c2e..be8228e50a27 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -19,10 +19,15 @@ struct kobject; | |||
19 | struct module; | 19 | struct module; |
20 | struct nameidata; | 20 | struct nameidata; |
21 | struct dentry; | 21 | struct dentry; |
22 | struct sysfs_dirent; | ||
22 | 23 | ||
24 | /* FIXME | ||
25 | * The *owner field is no longer used, but leave around | ||
26 | * until the tree gets cleaned up fully. | ||
27 | */ | ||
23 | struct attribute { | 28 | struct attribute { |
24 | const char * name; | 29 | const char * name; |
25 | struct module * owner; | 30 | struct module * owner; |
26 | mode_t mode; | 31 | mode_t mode; |
27 | }; | 32 | }; |
28 | 33 | ||
@@ -39,14 +44,14 @@ struct attribute_group { | |||
39 | */ | 44 | */ |
40 | 45 | ||
41 | #define __ATTR(_name,_mode,_show,_store) { \ | 46 | #define __ATTR(_name,_mode,_show,_store) { \ |
42 | .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \ | 47 | .attr = {.name = __stringify(_name), .mode = _mode }, \ |
43 | .show = _show, \ | 48 | .show = _show, \ |
44 | .store = _store, \ | 49 | .store = _store, \ |
45 | } | 50 | } |
46 | 51 | ||
47 | #define __ATTR_RO(_name) { \ | 52 | #define __ATTR_RO(_name) { \ |
48 | .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, \ | 53 | .attr = { .name = __stringify(_name), .mode = 0444 }, \ |
49 | .show = _name##_show, \ | 54 | .show = _name##_show, \ |
50 | } | 55 | } |
51 | 56 | ||
52 | #define __ATTR_NULL { .attr = { .name = NULL } } | 57 | #define __ATTR_NULL { .attr = { .name = NULL } } |
@@ -59,8 +64,10 @@ struct bin_attribute { | |||
59 | struct attribute attr; | 64 | struct attribute attr; |
60 | size_t size; | 65 | size_t size; |
61 | void *private; | 66 | void *private; |
62 | ssize_t (*read)(struct kobject *, char *, loff_t, size_t); | 67 | ssize_t (*read)(struct kobject *, struct bin_attribute *, |
63 | ssize_t (*write)(struct kobject *, char *, loff_t, size_t); | 68 | char *, loff_t, size_t); |
69 | ssize_t (*write)(struct kobject *, struct bin_attribute *, | ||
70 | char *, loff_t, size_t); | ||
64 | int (*mmap)(struct kobject *, struct bin_attribute *attr, | 71 | int (*mmap)(struct kobject *, struct bin_attribute *attr, |
65 | struct vm_area_struct *vma); | 72 | struct vm_area_struct *vma); |
66 | }; | 73 | }; |
@@ -70,12 +77,16 @@ struct sysfs_ops { | |||
70 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 77 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
71 | }; | 78 | }; |
72 | 79 | ||
80 | #define SYSFS_TYPE_MASK 0x00ff | ||
73 | #define SYSFS_ROOT 0x0001 | 81 | #define SYSFS_ROOT 0x0001 |
74 | #define SYSFS_DIR 0x0002 | 82 | #define SYSFS_DIR 0x0002 |
75 | #define SYSFS_KOBJ_ATTR 0x0004 | 83 | #define SYSFS_KOBJ_ATTR 0x0004 |
76 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 | 84 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 |
77 | #define SYSFS_KOBJ_LINK 0x0020 | 85 | #define SYSFS_KOBJ_LINK 0x0020 |
78 | #define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK) | 86 | #define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK) |
87 | |||
88 | #define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK | ||
89 | #define SYSFS_FLAG_REMOVED 0x0100 | ||
79 | 90 | ||
80 | #ifdef CONFIG_SYSFS | 91 | #ifdef CONFIG_SYSFS |
81 | 92 | ||
@@ -83,13 +94,14 @@ extern int sysfs_schedule_callback(struct kobject *kobj, | |||
83 | void (*func)(void *), void *data, struct module *owner); | 94 | void (*func)(void *), void *data, struct module *owner); |
84 | 95 | ||
85 | extern int __must_check | 96 | extern int __must_check |
86 | sysfs_create_dir(struct kobject *, struct dentry *); | 97 | sysfs_create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent_sd); |
87 | 98 | ||
88 | extern void | 99 | extern void |
89 | sysfs_remove_dir(struct kobject *); | 100 | sysfs_remove_dir(struct kobject *); |
90 | 101 | ||
91 | extern int __must_check | 102 | extern int __must_check |
92 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); | 103 | sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd, |
104 | const char *new_name); | ||
93 | 105 | ||
94 | extern int __must_check | 106 | extern int __must_check |
95 | sysfs_move_dir(struct kobject *, struct kobject *); | 107 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -129,8 +141,8 @@ void sysfs_notify(struct kobject * k, char *dir, char *attr); | |||
129 | 141 | ||
130 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | 142 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, |
131 | void * (*follow_link)(struct dentry *, struct nameidata *)); | 143 | void * (*follow_link)(struct dentry *, struct nameidata *)); |
132 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | 144 | extern struct sysfs_dirent *sysfs_create_shadow_dir(struct kobject *kobj); |
133 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | 145 | extern void sysfs_remove_shadow_dir(struct sysfs_dirent *shadow_sd); |
134 | 146 | ||
135 | extern int __must_check sysfs_init(void); | 147 | extern int __must_check sysfs_init(void); |
136 | 148 | ||
@@ -142,7 +154,8 @@ static inline int sysfs_schedule_callback(struct kobject *kobj, | |||
142 | return -ENOSYS; | 154 | return -ENOSYS; |
143 | } | 155 | } |
144 | 156 | ||
145 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) | 157 | static inline int sysfs_create_dir(struct kobject *kobj, |
158 | struct sysfs_dirent *shadow_parent_sd) | ||
146 | { | 159 | { |
147 | return 0; | 160 | return 0; |
148 | } | 161 | } |
@@ -152,9 +165,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
152 | ; | 165 | ; |
153 | } | 166 | } |
154 | 167 | ||
155 | static inline int sysfs_rename_dir(struct kobject * k, | 168 | static inline int sysfs_rename_dir(struct kobject *kobj, |
156 | struct dentry *new_parent, | 169 | struct sysfs_dirent *new_parent_sd, |
157 | const char *new_name) | 170 | const char *new_name) |
158 | { | 171 | { |
159 | return 0; | 172 | return 0; |
160 | } | 173 | } |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index a46104a28f66..dce1ed204972 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | 33 | ||
34 | #define TASKSTATS_VERSION 4 | 34 | #define TASKSTATS_VERSION 5 |
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
37 | 37 | ||
@@ -149,6 +149,9 @@ struct taskstats { | |||
149 | __u64 read_bytes; /* bytes of read I/O */ | 149 | __u64 read_bytes; /* bytes of read I/O */ |
150 | __u64 write_bytes; /* bytes of write I/O */ | 150 | __u64 write_bytes; /* bytes of write I/O */ |
151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ | 151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ |
152 | |||
153 | __u64 nvcsw; /* voluntary_ctxt_switches */ | ||
154 | __u64 nivcsw; /* nonvoluntary_ctxt_switches */ | ||
152 | }; | 155 | }; |
153 | 156 | ||
154 | 157 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index dda9be685ab6..4bb05a829be9 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -116,6 +116,8 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
116 | extern unsigned int alarm_setitimer(unsigned int seconds); | 116 | extern unsigned int alarm_setitimer(unsigned int seconds); |
117 | extern int do_getitimer(int which, struct itimerval *value); | 117 | extern int do_getitimer(int which, struct itimerval *value); |
118 | extern void getnstimeofday(struct timespec *tv); | 118 | extern void getnstimeofday(struct timespec *tv); |
119 | extern void getboottime(struct timespec *ts); | ||
120 | extern void monotonic_to_bootbased(struct timespec *ts); | ||
119 | 121 | ||
120 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 122 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
121 | extern int timekeeping_is_continuous(void); | 123 | extern int timekeeping_is_continuous(void); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index c661710d3627..78cf899b4409 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/ktime.h> | 5 | #include <linux/ktime.h> |
6 | #include <linux/spinlock.h> | ||
7 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
8 | 7 | ||
9 | struct tvec_t_base_s; | 8 | struct tvec_t_base_s; |
@@ -91,16 +90,13 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); | |||
91 | */ | 90 | */ |
92 | #ifdef CONFIG_TIMER_STATS | 91 | #ifdef CONFIG_TIMER_STATS |
93 | 92 | ||
93 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 | ||
94 | |||
94 | extern void init_timer_stats(void); | 95 | extern void init_timer_stats(void); |
95 | 96 | ||
96 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 97 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
97 | void *timerf, char * comm); | 98 | void *timerf, char *comm, |
98 | 99 | unsigned int timer_flag); | |
99 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
100 | { | ||
101 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
102 | timer->function, timer->start_comm); | ||
103 | } | ||
104 | 100 | ||
105 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | 101 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, |
106 | void *addr); | 102 | void *addr); |
@@ -119,10 +115,6 @@ static inline void init_timer_stats(void) | |||
119 | { | 115 | { |
120 | } | 116 | } |
121 | 117 | ||
122 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
123 | { | ||
124 | } | ||
125 | |||
126 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | 118 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) |
127 | { | 119 | { |
128 | } | 120 | } |
diff --git a/include/linux/topology.h b/include/linux/topology.h index da6c39b2d051..d0890a7e5bab 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -50,10 +50,10 @@ | |||
50 | for_each_online_node(node) \ | 50 | for_each_online_node(node) \ |
51 | if (nr_cpus_node(node)) | 51 | if (nr_cpus_node(node)) |
52 | 52 | ||
53 | #ifndef node_distance | ||
54 | /* Conform to ACPI 2.0 SLIT distance definitions */ | 53 | /* Conform to ACPI 2.0 SLIT distance definitions */ |
55 | #define LOCAL_DISTANCE 10 | 54 | #define LOCAL_DISTANCE 10 |
56 | #define REMOTE_DISTANCE 20 | 55 | #define REMOTE_DISTANCE 20 |
56 | #ifndef node_distance | ||
57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) | 57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) |
58 | #endif | 58 | #endif |
59 | #ifndef RECLAIM_DISTANCE | 59 | #ifndef RECLAIM_DISTANCE |
diff --git a/include/linux/tty.h b/include/linux/tty.h index bb4576085203..691a1748d9d2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -178,6 +178,7 @@ struct tty_bufhead { | |||
178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) | 178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) |
179 | 179 | ||
180 | struct device; | 180 | struct device; |
181 | struct signal_struct; | ||
181 | /* | 182 | /* |
182 | * Where all of the state associated with a tty is kept while the tty | 183 | * Where all of the state associated with a tty is kept while the tty |
183 | * is open. Since the termios state should be kept even if the tty | 184 | * is open. Since the termios state should be kept even if the tty |
@@ -310,6 +311,7 @@ extern void tty_hangup(struct tty_struct * tty); | |||
310 | extern void tty_vhangup(struct tty_struct * tty); | 311 | extern void tty_vhangup(struct tty_struct * tty); |
311 | extern void tty_unhangup(struct file *filp); | 312 | extern void tty_unhangup(struct file *filp); |
312 | extern int tty_hung_up_p(struct file * filp); | 313 | extern int tty_hung_up_p(struct file * filp); |
314 | extern int is_tty(struct file *filp); | ||
313 | extern void do_SAK(struct tty_struct *tty); | 315 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | 316 | extern void __do_SAK(struct tty_struct *tty); |
315 | extern void disassociate_ctty(int priv); | 317 | extern void disassociate_ctty(int priv); |
@@ -338,9 +340,46 @@ extern struct tty_struct *get_current_tty(void); | |||
338 | 340 | ||
339 | extern struct mutex tty_mutex; | 341 | extern struct mutex tty_mutex; |
340 | 342 | ||
343 | extern void tty_write_unlock(struct tty_struct *tty); | ||
344 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); | ||
345 | #define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock)) | ||
346 | |||
347 | |||
348 | |||
341 | /* n_tty.c */ | 349 | /* n_tty.c */ |
342 | extern struct tty_ldisc tty_ldisc_N_TTY; | 350 | extern struct tty_ldisc tty_ldisc_N_TTY; |
343 | 351 | ||
352 | /* tty_audit.c */ | ||
353 | #ifdef CONFIG_AUDIT | ||
354 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | ||
355 | size_t size); | ||
356 | extern void tty_audit_exit(void); | ||
357 | extern void tty_audit_fork(struct signal_struct *sig); | ||
358 | extern void tty_audit_push(struct tty_struct *tty); | ||
359 | extern void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid); | ||
360 | extern void tty_audit_opening(void); | ||
361 | #else | ||
362 | static inline void tty_audit_add_data(struct tty_struct *tty, | ||
363 | unsigned char *data, size_t size) | ||
364 | { | ||
365 | } | ||
366 | static inline void tty_audit_exit(void) | ||
367 | { | ||
368 | } | ||
369 | static inline void tty_audit_fork(struct signal_struct *sig) | ||
370 | { | ||
371 | } | ||
372 | static inline void tty_audit_push(struct tty_struct *tty) | ||
373 | { | ||
374 | } | ||
375 | static inline void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid) | ||
376 | { | ||
377 | } | ||
378 | static inline void tty_audit_opening(void) | ||
379 | { | ||
380 | } | ||
381 | #endif | ||
382 | |||
344 | /* tty_ioctl.c */ | 383 | /* tty_ioctl.c */ |
345 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, | 384 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
346 | unsigned int cmd, unsigned long arg); | 385 | unsigned int cmd, unsigned long arg); |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 6de445c31a64..8ec703f462da 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -42,6 +42,7 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | |||
42 | /* UDP encapsulation types */ | 42 | /* UDP encapsulation types */ |
43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ | 43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ |
44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ | 44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ |
45 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ | ||
45 | 46 | ||
46 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
47 | #include <linux/types.h> | 48 | #include <linux/types.h> |
@@ -70,6 +71,11 @@ struct udp_sock { | |||
70 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ | 71 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ |
71 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ | 72 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ |
72 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ | 73 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ |
74 | __u8 unused[3]; | ||
75 | /* | ||
76 | * For encapsulation sockets. | ||
77 | */ | ||
78 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | ||
73 | }; | 79 | }; |
74 | 80 | ||
75 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 81 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 9af8bbcd8963..b7fe13883bdb 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -13,10 +13,6 @@ | |||
13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | |||
17 | /* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C | ||
18 | library one from sys/uio.h if you have a very old library set */ | ||
19 | |||
20 | struct iovec | 16 | struct iovec |
21 | { | 17 | { |
22 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ | 18 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ |
@@ -38,11 +34,6 @@ struct kvec { | |||
38 | 34 | ||
39 | #define UIO_FASTIOV 8 | 35 | #define UIO_FASTIOV 8 |
40 | #define UIO_MAXIOV 1024 | 36 | #define UIO_MAXIOV 1024 |
41 | #if 0 | ||
42 | #define UIO_MAXIOV 16 /* Maximum iovec's in one operation | ||
43 | 16 matches BSD */ | ||
44 | /* Beg pardon: BSD has 1024 --ANK */ | ||
45 | #endif | ||
46 | 37 | ||
47 | /* | 38 | /* |
48 | * Total number of bytes covered by an iovec. | 39 | * Total number of bytes covered by an iovec. |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 56aa2ee21f1b..7a60946df3b6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -146,6 +146,10 @@ struct usb_interface { | |||
146 | * active alternate setting */ | 146 | * active alternate setting */ |
147 | unsigned num_altsetting; /* number of alternate settings */ | 147 | unsigned num_altsetting; /* number of alternate settings */ |
148 | 148 | ||
149 | /* If there is an interface association descriptor then it will list | ||
150 | * the associated interfaces */ | ||
151 | struct usb_interface_assoc_descriptor *intf_assoc; | ||
152 | |||
149 | int minor; /* minor number this interface is | 153 | int minor; /* minor number this interface is |
150 | * bound to */ | 154 | * bound to */ |
151 | enum usb_interface_condition condition; /* state of binding */ | 155 | enum usb_interface_condition condition; /* state of binding */ |
@@ -175,6 +179,7 @@ void usb_put_intf(struct usb_interface *intf); | |||
175 | 179 | ||
176 | /* this maximum is arbitrary */ | 180 | /* this maximum is arbitrary */ |
177 | #define USB_MAXINTERFACES 32 | 181 | #define USB_MAXINTERFACES 32 |
182 | #define USB_MAXIADS USB_MAXINTERFACES/2 | ||
178 | 183 | ||
179 | /** | 184 | /** |
180 | * struct usb_interface_cache - long-term representation of a device interface | 185 | * struct usb_interface_cache - long-term representation of a device interface |
@@ -245,6 +250,11 @@ struct usb_host_config { | |||
245 | struct usb_config_descriptor desc; | 250 | struct usb_config_descriptor desc; |
246 | 251 | ||
247 | char *string; /* iConfiguration string, if present */ | 252 | char *string; /* iConfiguration string, if present */ |
253 | |||
254 | /* List of any Interface Association Descriptors in this | ||
255 | * configuration. */ | ||
256 | struct usb_interface_assoc_descriptor *intf_assoc[USB_MAXIADS]; | ||
257 | |||
248 | /* the interfaces associated with this configuration, | 258 | /* the interfaces associated with this configuration, |
249 | * stored in no particular order */ | 259 | * stored in no particular order */ |
250 | struct usb_interface *interface[USB_MAXINTERFACES]; | 260 | struct usb_interface *interface[USB_MAXINTERFACES]; |
@@ -403,6 +413,8 @@ struct usb_device { | |||
403 | 413 | ||
404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 414 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
405 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 415 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
416 | unsigned reset_resume:1; /* needs reset instead of resume */ | ||
417 | unsigned persist_enabled:1; /* USB_PERSIST enabled for this dev */ | ||
406 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | 418 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ |
407 | unsigned autoresume_disabled:1; /* disabled by the user */ | 419 | unsigned autoresume_disabled:1; /* disabled by the user */ |
408 | #endif | 420 | #endif |
@@ -770,6 +782,28 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
770 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ | 782 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ |
771 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | 783 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) |
772 | 784 | ||
785 | /** | ||
786 | * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device | ||
787 | * with a class of usb interfaces | ||
788 | * @vend: the 16 bit USB Vendor ID | ||
789 | * @prod: the 16 bit USB Product ID | ||
790 | * @cl: bInterfaceClass value | ||
791 | * @sc: bInterfaceSubClass value | ||
792 | * @pr: bInterfaceProtocol value | ||
793 | * | ||
794 | * This macro is used to create a struct usb_device_id that matches a | ||
795 | * specific device with a specific class of interfaces. | ||
796 | * | ||
797 | * This is especially useful when explicitly matching devices that have | ||
798 | * vendor specific bDeviceClass values, but standards-compliant interfaces. | ||
799 | */ | ||
800 | #define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \ | ||
801 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ | ||
802 | | USB_DEVICE_ID_MATCH_DEVICE, \ | ||
803 | .idVendor = (vend), .idProduct = (prod), \ | ||
804 | .bInterfaceClass = (cl), \ | ||
805 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | ||
806 | |||
773 | /* ----------------------------------------------------------------------- */ | 807 | /* ----------------------------------------------------------------------- */ |
774 | 808 | ||
775 | /* Stuff for dynamic usb ids */ | 809 | /* Stuff for dynamic usb ids */ |
@@ -816,10 +850,15 @@ struct usbdrv_wrap { | |||
816 | * do (or don't) show up otherwise in the filesystem. | 850 | * do (or don't) show up otherwise in the filesystem. |
817 | * @suspend: Called when the device is going to be suspended by the system. | 851 | * @suspend: Called when the device is going to be suspended by the system. |
818 | * @resume: Called when the device is being resumed by the system. | 852 | * @resume: Called when the device is being resumed by the system. |
853 | * @reset_resume: Called when the suspended device has been reset instead | ||
854 | * of being resumed. | ||
819 | * @pre_reset: Called by usb_reset_composite_device() when the device | 855 | * @pre_reset: Called by usb_reset_composite_device() when the device |
820 | * is about to be reset. | 856 | * is about to be reset. |
821 | * @post_reset: Called by usb_reset_composite_device() after the device | 857 | * @post_reset: Called by usb_reset_composite_device() after the device |
822 | * has been reset. | 858 | * has been reset, or in lieu of @resume following a reset-resume |
859 | * (i.e., the device is reset instead of being resumed, as might | ||
860 | * happen if power was lost). The second argument tells which is | ||
861 | * the reason. | ||
823 | * @id_table: USB drivers use ID table to support hotplugging. | 862 | * @id_table: USB drivers use ID table to support hotplugging. |
824 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 863 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
825 | * or your driver's probe function will never get called. | 864 | * or your driver's probe function will never get called. |
@@ -859,9 +898,10 @@ struct usb_driver { | |||
859 | 898 | ||
860 | int (*suspend) (struct usb_interface *intf, pm_message_t message); | 899 | int (*suspend) (struct usb_interface *intf, pm_message_t message); |
861 | int (*resume) (struct usb_interface *intf); | 900 | int (*resume) (struct usb_interface *intf); |
901 | int (*reset_resume)(struct usb_interface *intf); | ||
862 | 902 | ||
863 | void (*pre_reset) (struct usb_interface *intf); | 903 | int (*pre_reset)(struct usb_interface *intf); |
864 | void (*post_reset) (struct usb_interface *intf); | 904 | int (*post_reset)(struct usb_interface *intf); |
865 | 905 | ||
866 | const struct usb_device_id *id_table; | 906 | const struct usb_device_id *id_table; |
867 | 907 | ||
@@ -964,6 +1004,7 @@ extern int usb_disabled(void); | |||
964 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ | 1004 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ |
965 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt | 1005 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt |
966 | * needed */ | 1006 | * needed */ |
1007 | #define URB_FREE_BUFFER 0x0100 /* Free transfer buffer with the URB */ | ||
967 | 1008 | ||
968 | struct usb_iso_packet_descriptor { | 1009 | struct usb_iso_packet_descriptor { |
969 | unsigned int offset; | 1010 | unsigned int offset; |
@@ -974,11 +1015,26 @@ struct usb_iso_packet_descriptor { | |||
974 | 1015 | ||
975 | struct urb; | 1016 | struct urb; |
976 | 1017 | ||
1018 | struct usb_anchor { | ||
1019 | struct list_head urb_list; | ||
1020 | wait_queue_head_t wait; | ||
1021 | spinlock_t lock; | ||
1022 | }; | ||
1023 | |||
1024 | static inline void init_usb_anchor(struct usb_anchor *anchor) | ||
1025 | { | ||
1026 | INIT_LIST_HEAD(&anchor->urb_list); | ||
1027 | init_waitqueue_head(&anchor->wait); | ||
1028 | spin_lock_init(&anchor->lock); | ||
1029 | } | ||
1030 | |||
977 | typedef void (*usb_complete_t)(struct urb *); | 1031 | typedef void (*usb_complete_t)(struct urb *); |
978 | 1032 | ||
979 | /** | 1033 | /** |
980 | * struct urb - USB Request Block | 1034 | * struct urb - USB Request Block |
981 | * @urb_list: For use by current owner of the URB. | 1035 | * @urb_list: For use by current owner of the URB. |
1036 | * @anchor_list: membership in the list of an anchor | ||
1037 | * @anchor: to anchor URBs to a common mooring | ||
982 | * @pipe: Holds endpoint number, direction, type, and more. | 1038 | * @pipe: Holds endpoint number, direction, type, and more. |
983 | * Create these values with the eight macros available; | 1039 | * Create these values with the eight macros available; |
984 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" | 1040 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" |
@@ -1151,6 +1207,8 @@ struct urb | |||
1151 | /* public: documented fields in the urb that can be used by drivers */ | 1207 | /* public: documented fields in the urb that can be used by drivers */ |
1152 | struct list_head urb_list; /* list head for use by the urb's | 1208 | struct list_head urb_list; /* list head for use by the urb's |
1153 | * current owner */ | 1209 | * current owner */ |
1210 | struct list_head anchor_list; /* the URB may be anchored by the driver */ | ||
1211 | struct usb_anchor *anchor; | ||
1154 | struct usb_device *dev; /* (in) pointer to associated device */ | 1212 | struct usb_device *dev; /* (in) pointer to associated device */ |
1155 | unsigned int pipe; /* (in) pipe information */ | 1213 | unsigned int pipe; /* (in) pipe information */ |
1156 | int status; /* (return) non-ISO status */ | 1214 | int status; /* (return) non-ISO status */ |
@@ -1286,6 +1344,11 @@ extern struct urb *usb_get_urb(struct urb *urb); | |||
1286 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | 1344 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); |
1287 | extern int usb_unlink_urb(struct urb *urb); | 1345 | extern int usb_unlink_urb(struct urb *urb); |
1288 | extern void usb_kill_urb(struct urb *urb); | 1346 | extern void usb_kill_urb(struct urb *urb); |
1347 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | ||
1348 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | ||
1349 | extern void usb_unanchor_urb(struct urb *urb); | ||
1350 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | ||
1351 | unsigned int timeout); | ||
1289 | 1352 | ||
1290 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 1353 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
1291 | gfp_t mem_flags, dma_addr_t *dma); | 1354 | gfp_t mem_flags, dma_addr_t *dma); |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 43f160cfe003..6ce42bf9f743 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | unifdef-y += audio.h | 1 | unifdef-y += audio.h |
2 | unifdef-y += cdc.h | 2 | unifdef-y += cdc.h |
3 | unifdef-y += ch9.h | 3 | unifdef-y += ch9.h |
4 | unifdef-y += gadgetfs.h | ||
4 | unifdef-y += midi.h | 5 | unifdef-y += midi.h |
5 | 6 | ||
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb/gadgetfs.h index 8086d5a9b94e..e8654c338729 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef __LINUX_USB_GADGETFS_H | ||
2 | #define __LINUX_USB_GADGETFS_H | ||
1 | 3 | ||
2 | #include <asm/types.h> | 4 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 5 | #include <asm/ioctl.h> |
@@ -7,11 +9,12 @@ | |||
7 | /* | 9 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 10 | * Filesystem based user-mode API to USB Gadget controller hardware |
9 | * | 11 | * |
10 | * Almost everything can be done with only read and write operations, | 12 | * Other than ep0 operations, most things are done by read() and write() |
11 | * on endpoint files found in one directory. They are configured by | 13 | * on endpoint files found in one directory. They are configured by |
12 | * writing descriptors, and then may be used for normal stream style | 14 | * writing descriptors, and then may be used for normal stream style |
13 | * i/o requests. When ep0 is configured, the device can enumerate; | 15 | * i/o requests. When ep0 is configured, the device can enumerate; |
14 | * when it's closed, the device disconnects from usb. | 16 | * when it's closed, the device disconnects from usb. Operations on |
17 | * ep0 require ioctl() operations. | ||
15 | * | 18 | * |
16 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, | 19 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, |
17 | * which may then be used to read usb_gadgetfs_event structs. The driver | 20 | * which may then be used to read usb_gadgetfs_event structs. The driver |
@@ -21,9 +24,9 @@ | |||
21 | */ | 24 | */ |
22 | 25 | ||
23 | /* | 26 | /* |
24 | * Events are delivered on the ep0 file descriptor, if the user mode driver | 27 | * Events are delivered on the ep0 file descriptor, when the user mode driver |
25 | * reads from this file descriptor after writing the descriptors. Don't | 28 | * reads from this file descriptor after writing the descriptors. Don't |
26 | * stop polling this descriptor, if you write that kind of driver. | 29 | * stop polling this descriptor. |
27 | */ | 30 | */ |
28 | 31 | ||
29 | enum usb_gadgetfs_event_type { | 32 | enum usb_gadgetfs_event_type { |
@@ -36,8 +39,10 @@ enum usb_gadgetfs_event_type { | |||
36 | // and likely more ! | 39 | // and likely more ! |
37 | }; | 40 | }; |
38 | 41 | ||
42 | /* NOTE: this structure must stay the same size and layout on | ||
43 | * both 32-bit and 64-bit kernels. | ||
44 | */ | ||
39 | struct usb_gadgetfs_event { | 45 | struct usb_gadgetfs_event { |
40 | enum usb_gadgetfs_event_type type; | ||
41 | union { | 46 | union { |
42 | // NOP, DISCONNECT, SUSPEND: nothing | 47 | // NOP, DISCONNECT, SUSPEND: nothing |
43 | // ... some hardware can't report disconnection | 48 | // ... some hardware can't report disconnection |
@@ -46,19 +51,20 @@ struct usb_gadgetfs_event { | |||
46 | enum usb_device_speed speed; | 51 | enum usb_device_speed speed; |
47 | 52 | ||
48 | // SETUP: packet; DATA phase i/o precedes next event | 53 | // SETUP: packet; DATA phase i/o precedes next event |
49 | // (setup.bmRequestType & USB_DIR_IN) flags direction | 54 | // (setup.bmRequestType & USB_DIR_IN) flags direction |
50 | // ... includes SET_CONFIGURATION, SET_INTERFACE | 55 | // ... includes SET_CONFIGURATION, SET_INTERFACE |
51 | struct usb_ctrlrequest setup; | 56 | struct usb_ctrlrequest setup; |
52 | } u; | 57 | } u; |
58 | enum usb_gadgetfs_event_type type; | ||
53 | }; | 59 | }; |
54 | 60 | ||
55 | 61 | ||
56 | /* endpoint ioctls */ | 62 | /* endpoint ioctls */ |
57 | 63 | ||
58 | /* IN transfers may be reported to the gadget driver as complete | 64 | /* IN transfers may be reported to the gadget driver as complete |
59 | * when the fifo is loaded, before the host reads the data; | 65 | * when the fifo is loaded, before the host reads the data; |
60 | * OUT transfers may be reported to the host's "client" driver as | 66 | * OUT transfers may be reported to the host's "client" driver as |
61 | * complete when they're sitting in the FIFO unread. | 67 | * complete when they're sitting in the FIFO unread. |
62 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo | 68 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo |
63 | * (needed for precise fault handling, when the hardware allows it) | 69 | * (needed for precise fault handling, when the hardware allows it) |
64 | */ | 70 | */ |
@@ -72,4 +78,4 @@ struct usb_gadgetfs_event { | |||
72 | */ | 78 | */ |
73 | #define GADGETFS_CLEAR_HALT _IO('g',3) | 79 | #define GADGETFS_CLEAR_HALT _IO('g',3) |
74 | 80 | ||
75 | 81 | #endif /* __LINUX_USB_GADGETFS_H */ | |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 6bac8faacbc6..8da374caf582 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -9,3 +9,6 @@ | |||
9 | 9 | ||
10 | /* string descriptors must not be fetched using a 255-byte read */ | 10 | /* string descriptors must not be fetched using a 255-byte read */ |
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | 11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 |
12 | |||
13 | /* device can't resume correctly so reset it instead */ | ||
14 | #define USB_QUIRK_RESET_RESUME 0x00000004 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 32acbae28d24..e8b8928232c8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -221,6 +221,9 @@ struct usb_serial_driver { | |||
221 | int (*port_probe) (struct usb_serial_port *port); | 221 | int (*port_probe) (struct usb_serial_port *port); |
222 | int (*port_remove) (struct usb_serial_port *port); | 222 | int (*port_remove) (struct usb_serial_port *port); |
223 | 223 | ||
224 | int (*suspend) (struct usb_serial *serial, pm_message_t message); | ||
225 | int (*resume) (struct usb_serial *serial); | ||
226 | |||
224 | /* serial function calls */ | 227 | /* serial function calls */ |
225 | int (*open) (struct usb_serial_port *port, struct file * filp); | 228 | int (*open) (struct usb_serial_port *port, struct file * filp); |
226 | void (*close) (struct usb_serial_port *port, struct file * filp); | 229 | void (*close) (struct usb_serial_port *port, struct file * filp); |
@@ -249,6 +252,9 @@ extern void usb_serial_port_softint(struct usb_serial_port *port); | |||
249 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); | 252 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); |
250 | extern void usb_serial_disconnect(struct usb_interface *iface); | 253 | extern void usb_serial_disconnect(struct usb_interface *iface); |
251 | 254 | ||
255 | extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); | ||
256 | extern int usb_serial_resume(struct usb_interface *intf); | ||
257 | |||
252 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); | 258 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); |
253 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); | 259 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); |
254 | 260 | ||
@@ -269,6 +275,7 @@ extern void usb_serial_put(struct usb_serial *serial); | |||
269 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); | 275 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); |
270 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); | 276 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); |
271 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); | 277 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); |
278 | extern int usb_serial_generic_resume (struct usb_serial *serial); | ||
272 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); | 279 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); |
273 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | 280 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); |
274 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); | 281 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index e17186dbcdca..4f59b2aa8a9e 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -110,13 +110,6 @@ struct usb_ep_ops { | |||
110 | gfp_t gfp_flags); | 110 | gfp_t gfp_flags); |
111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); | 111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); |
112 | 112 | ||
113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, | ||
114 | dma_addr_t *dma, gfp_t gfp_flags); | ||
115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, | ||
116 | unsigned bytes); | ||
117 | // NOTE: on 2.6, drivers may also use dma_map() and | ||
118 | // dma_sync_single_*() to directly manage dma overhead. | ||
119 | |||
120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, | 113 | int (*queue) (struct usb_ep *ep, struct usb_request *req, |
121 | gfp_t gfp_flags); | 114 | gfp_t gfp_flags); |
122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 115 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
@@ -235,47 +228,6 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
235 | } | 228 | } |
236 | 229 | ||
237 | /** | 230 | /** |
238 | * usb_ep_alloc_buffer - allocate an I/O buffer | ||
239 | * @ep:the endpoint associated with the buffer | ||
240 | * @len:length of the desired buffer | ||
241 | * @dma:pointer to the buffer's DMA address; must be valid | ||
242 | * @gfp_flags:GFP_* flags to use | ||
243 | * | ||
244 | * Returns a new buffer, or null if one could not be allocated. | ||
245 | * The buffer is suitably aligned for dma, if that endpoint uses DMA, | ||
246 | * and the caller won't have to care about dma-inconsistency | ||
247 | * or any hidden "bounce buffer" mechanism. No additional per-request | ||
248 | * DMA mapping will be required for such buffers. | ||
249 | * Free it later with usb_ep_free_buffer(). | ||
250 | * | ||
251 | * You don't need to use this call to allocate I/O buffers unless you | ||
252 | * want to make sure drivers don't incur costs for such "bounce buffer" | ||
253 | * copies or per-request DMA mappings. | ||
254 | */ | ||
255 | static inline void * | ||
256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, | ||
257 | gfp_t gfp_flags) | ||
258 | { | ||
259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); | ||
260 | } | ||
261 | |||
262 | /** | ||
263 | * usb_ep_free_buffer - frees an i/o buffer | ||
264 | * @ep:the endpoint associated with the buffer | ||
265 | * @buf:CPU view address of the buffer | ||
266 | * @dma:the buffer's DMA address | ||
267 | * @len:length of the buffer | ||
268 | * | ||
269 | * reverses the effect of usb_ep_alloc_buffer(). | ||
270 | * caller guarantees the buffer will no longer be accessed | ||
271 | */ | ||
272 | static inline void | ||
273 | usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) | ||
274 | { | ||
275 | ep->ops->free_buffer (ep, buf, dma, len); | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. | 231 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. |
280 | * @ep:the endpoint associated with the request | 232 | * @ep:the endpoint associated with the request |
281 | * @req:the request being submitted | 233 | * @req:the request being submitted |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h new file mode 100644 index 000000000000..bb320573bb9e --- /dev/null +++ b/include/linux/user_namespace.h | |||
@@ -0,0 +1,61 @@ | |||
1 | #ifndef _LINUX_USER_NAMESPACE_H | ||
2 | #define _LINUX_USER_NAMESPACE_H | ||
3 | |||
4 | #include <linux/kref.h> | ||
5 | #include <linux/nsproxy.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/err.h> | ||
8 | |||
9 | #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) | ||
10 | #define UIDHASH_SZ (1 << UIDHASH_BITS) | ||
11 | |||
12 | struct user_namespace { | ||
13 | struct kref kref; | ||
14 | struct list_head uidhash_table[UIDHASH_SZ]; | ||
15 | struct user_struct *root_user; | ||
16 | }; | ||
17 | |||
18 | extern struct user_namespace init_user_ns; | ||
19 | |||
20 | #ifdef CONFIG_USER_NS | ||
21 | |||
22 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
23 | { | ||
24 | if (ns) | ||
25 | kref_get(&ns->kref); | ||
26 | return ns; | ||
27 | } | ||
28 | |||
29 | extern struct user_namespace *copy_user_ns(int flags, | ||
30 | struct user_namespace *old_ns); | ||
31 | extern void free_user_ns(struct kref *kref); | ||
32 | |||
33 | static inline void put_user_ns(struct user_namespace *ns) | ||
34 | { | ||
35 | if (ns) | ||
36 | kref_put(&ns->kref, free_user_ns); | ||
37 | } | ||
38 | |||
39 | #else | ||
40 | |||
41 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
42 | { | ||
43 | return &init_user_ns; | ||
44 | } | ||
45 | |||
46 | static inline struct user_namespace *copy_user_ns(int flags, | ||
47 | struct user_namespace *old_ns) | ||
48 | { | ||
49 | if (flags & CLONE_NEWUSER) | ||
50 | return ERR_PTR(-EINVAL); | ||
51 | |||
52 | return NULL; | ||
53 | } | ||
54 | |||
55 | static inline void put_user_ns(struct user_namespace *ns) | ||
56 | { | ||
57 | } | ||
58 | |||
59 | #endif | ||
60 | |||
61 | #endif /* _LINUX_USER_H */ | ||
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index f8d3b326e93a..923db99175f2 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -48,26 +48,14 @@ static inline void get_uts_ns(struct uts_namespace *ns) | |||
48 | kref_get(&ns->kref); | 48 | kref_get(&ns->kref); |
49 | } | 49 | } |
50 | 50 | ||
51 | #ifdef CONFIG_UTS_NS | 51 | extern struct uts_namespace *copy_utsname(unsigned long flags, |
52 | extern struct uts_namespace *copy_utsname(int flags, struct uts_namespace *ns); | 52 | struct uts_namespace *ns); |
53 | extern void free_uts_ns(struct kref *kref); | 53 | extern void free_uts_ns(struct kref *kref); |
54 | 54 | ||
55 | static inline void put_uts_ns(struct uts_namespace *ns) | 55 | static inline void put_uts_ns(struct uts_namespace *ns) |
56 | { | 56 | { |
57 | kref_put(&ns->kref, free_uts_ns); | 57 | kref_put(&ns->kref, free_uts_ns); |
58 | } | 58 | } |
59 | #else | ||
60 | static inline struct uts_namespace *copy_utsname(int flags, | ||
61 | struct uts_namespace *ns) | ||
62 | { | ||
63 | return ns; | ||
64 | } | ||
65 | |||
66 | static inline void put_uts_ns(struct uts_namespace *ns) | ||
67 | { | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | static inline struct new_utsname *utsname(void) | 59 | static inline struct new_utsname *utsname(void) |
72 | { | 60 | { |
73 | return ¤t->nsproxy->uts_ns->name; | 61 | return ¤t->nsproxy->uts_ns->name; |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index ce0719a2cfeb..ce6badc98f6d 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -148,7 +148,7 @@ extern int keventd_up(void); | |||
148 | extern void init_workqueues(void); | 148 | extern void init_workqueues(void); |
149 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 149 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
150 | 150 | ||
151 | extern void cancel_work_sync(struct work_struct *work); | 151 | extern int cancel_work_sync(struct work_struct *work); |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 154 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
@@ -166,14 +166,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
168 | 168 | ||
169 | extern void cancel_rearming_delayed_work(struct delayed_work *work); | 169 | extern int cancel_delayed_work_sync(struct delayed_work *work); |
170 | 170 | ||
171 | /* Obsolete. use cancel_rearming_delayed_work() */ | 171 | /* Obsolete. use cancel_delayed_work_sync() */ |
172 | static inline | 172 | static inline |
173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
174 | struct delayed_work *work) | 174 | struct delayed_work *work) |
175 | { | 175 | { |
176 | cancel_rearming_delayed_work(work); | 176 | cancel_delayed_work_sync(work); |
177 | } | ||
178 | |||
179 | /* Obsolete. use cancel_delayed_work_sync() */ | ||
180 | static inline | ||
181 | void cancel_rearming_delayed_work(struct delayed_work *work) | ||
182 | { | ||
183 | cancel_delayed_work_sync(work); | ||
177 | } | 184 | } |
178 | 185 | ||
179 | #endif | 186 | #endif |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h new file mode 100644 index 000000000000..88884d39f28f --- /dev/null +++ b/include/net/9p/9p.h | |||
@@ -0,0 +1,417 @@ | |||
1 | /* | ||
2 | * include/net/9p/9p.h | ||
3 | * | ||
4 | * 9P protocol definitions. | ||
5 | * | ||
6 | * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net> | ||
7 | * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> | ||
8 | * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 | ||
12 | * as published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to: | ||
21 | * Free Software Foundation | ||
22 | * 51 Franklin Street, Fifth Floor | ||
23 | * Boston, MA 02111-1301 USA | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | #ifndef NET_9P_H | ||
28 | #define NET_9P_H | ||
29 | |||
30 | #ifdef CONFIG_NET_9P_DEBUG | ||
31 | |||
32 | #define P9_DEBUG_ERROR (1<<0) | ||
33 | #define P9_DEBUG_9P (1<<2) | ||
34 | #define P9_DEBUG_VFS (1<<3) | ||
35 | #define P9_DEBUG_CONV (1<<4) | ||
36 | #define P9_DEBUG_MUX (1<<5) | ||
37 | #define P9_DEBUG_TRANS (1<<6) | ||
38 | #define P9_DEBUG_SLABS (1<<7) | ||
39 | #define P9_DEBUG_FCALL (1<<8) | ||
40 | |||
41 | extern unsigned int p9_debug_level; | ||
42 | |||
43 | #define P9_DPRINTK(level, format, arg...) \ | ||
44 | do { \ | ||
45 | if ((p9_debug_level & level) == level) \ | ||
46 | printk(KERN_NOTICE "-- %s (%d): " \ | ||
47 | format , __FUNCTION__, current->pid , ## arg); \ | ||
48 | } while (0) | ||
49 | |||
50 | #define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \ | ||
51 | "%s: %.*s\n", s, fcall?fcall->params.rerror.error.len:0, \ | ||
52 | fcall?fcall->params.rerror.error.str:""); | ||
53 | |||
54 | #else | ||
55 | #define P9_DPRINTK(level, format, arg...) do { } while (0) | ||
56 | #define PRINT_FCALL_ERROR(s, fcall) do { } while (0) | ||
57 | #endif | ||
58 | |||
59 | #define P9_EPRINTK(level, format, arg...) \ | ||
60 | do { \ | ||
61 | printk(level "9p: %s (%d): " \ | ||
62 | format , __FUNCTION__, current->pid , ## arg); \ | ||
63 | } while (0) | ||
64 | |||
65 | |||
66 | /* Message Types */ | ||
67 | enum { | ||
68 | P9_TVERSION = 100, | ||
69 | P9_RVERSION, | ||
70 | P9_TAUTH = 102, | ||
71 | P9_RAUTH, | ||
72 | P9_TATTACH = 104, | ||
73 | P9_RATTACH, | ||
74 | P9_TERROR = 106, | ||
75 | P9_RERROR, | ||
76 | P9_TFLUSH = 108, | ||
77 | P9_RFLUSH, | ||
78 | P9_TWALK = 110, | ||
79 | P9_RWALK, | ||
80 | P9_TOPEN = 112, | ||
81 | P9_ROPEN, | ||
82 | P9_TCREATE = 114, | ||
83 | P9_RCREATE, | ||
84 | P9_TREAD = 116, | ||
85 | P9_RREAD, | ||
86 | P9_TWRITE = 118, | ||
87 | P9_RWRITE, | ||
88 | P9_TCLUNK = 120, | ||
89 | P9_RCLUNK, | ||
90 | P9_TREMOVE = 122, | ||
91 | P9_RREMOVE, | ||
92 | P9_TSTAT = 124, | ||
93 | P9_RSTAT, | ||
94 | P9_TWSTAT = 126, | ||
95 | P9_RWSTAT, | ||
96 | }; | ||
97 | |||
98 | /* open modes */ | ||
99 | enum { | ||
100 | P9_OREAD = 0x00, | ||
101 | P9_OWRITE = 0x01, | ||
102 | P9_ORDWR = 0x02, | ||
103 | P9_OEXEC = 0x03, | ||
104 | P9_OEXCL = 0x04, | ||
105 | P9_OTRUNC = 0x10, | ||
106 | P9_OREXEC = 0x20, | ||
107 | P9_ORCLOSE = 0x40, | ||
108 | P9_OAPPEND = 0x80, | ||
109 | }; | ||
110 | |||
111 | /* permissions */ | ||
112 | enum { | ||
113 | P9_DMDIR = 0x80000000, | ||
114 | P9_DMAPPEND = 0x40000000, | ||
115 | P9_DMEXCL = 0x20000000, | ||
116 | P9_DMMOUNT = 0x10000000, | ||
117 | P9_DMAUTH = 0x08000000, | ||
118 | P9_DMTMP = 0x04000000, | ||
119 | P9_DMSYMLINK = 0x02000000, | ||
120 | P9_DMLINK = 0x01000000, | ||
121 | /* 9P2000.u extensions */ | ||
122 | P9_DMDEVICE = 0x00800000, | ||
123 | P9_DMNAMEDPIPE = 0x00200000, | ||
124 | P9_DMSOCKET = 0x00100000, | ||
125 | P9_DMSETUID = 0x00080000, | ||
126 | P9_DMSETGID = 0x00040000, | ||
127 | }; | ||
128 | |||
129 | /* qid.types */ | ||
130 | enum { | ||
131 | P9_QTDIR = 0x80, | ||
132 | P9_QTAPPEND = 0x40, | ||
133 | P9_QTEXCL = 0x20, | ||
134 | P9_QTMOUNT = 0x10, | ||
135 | P9_QTAUTH = 0x08, | ||
136 | P9_QTTMP = 0x04, | ||
137 | P9_QTSYMLINK = 0x02, | ||
138 | P9_QTLINK = 0x01, | ||
139 | P9_QTFILE = 0x00, | ||
140 | }; | ||
141 | |||
142 | #define P9_NOTAG (u16)(~0) | ||
143 | #define P9_NOFID (u32)(~0) | ||
144 | #define P9_MAXWELEM 16 | ||
145 | |||
146 | /* ample room for Twrite/Rread header */ | ||
147 | #define P9_IOHDRSZ 24 | ||
148 | |||
149 | struct p9_str { | ||
150 | u16 len; | ||
151 | char *str; | ||
152 | }; | ||
153 | |||
154 | /* qids are the unique ID for a file (like an inode */ | ||
155 | struct p9_qid { | ||
156 | u8 type; | ||
157 | u32 version; | ||
158 | u64 path; | ||
159 | }; | ||
160 | |||
161 | /* Plan 9 file metadata (stat) structure */ | ||
162 | struct p9_stat { | ||
163 | u16 size; | ||
164 | u16 type; | ||
165 | u32 dev; | ||
166 | struct p9_qid qid; | ||
167 | u32 mode; | ||
168 | u32 atime; | ||
169 | u32 mtime; | ||
170 | u64 length; | ||
171 | struct p9_str name; | ||
172 | struct p9_str uid; | ||
173 | struct p9_str gid; | ||
174 | struct p9_str muid; | ||
175 | struct p9_str extension; /* 9p2000.u extensions */ | ||
176 | u32 n_uid; /* 9p2000.u extensions */ | ||
177 | u32 n_gid; /* 9p2000.u extensions */ | ||
178 | u32 n_muid; /* 9p2000.u extensions */ | ||
179 | }; | ||
180 | |||
181 | /* file metadata (stat) structure used to create Twstat message | ||
182 | The is similar to p9_stat, but the strings don't point to | ||
183 | the same memory block and should be freed separately | ||
184 | */ | ||
185 | struct p9_wstat { | ||
186 | u16 size; | ||
187 | u16 type; | ||
188 | u32 dev; | ||
189 | struct p9_qid qid; | ||
190 | u32 mode; | ||
191 | u32 atime; | ||
192 | u32 mtime; | ||
193 | u64 length; | ||
194 | char *name; | ||
195 | char *uid; | ||
196 | char *gid; | ||
197 | char *muid; | ||
198 | char *extension; /* 9p2000.u extensions */ | ||
199 | u32 n_uid; /* 9p2000.u extensions */ | ||
200 | u32 n_gid; /* 9p2000.u extensions */ | ||
201 | u32 n_muid; /* 9p2000.u extensions */ | ||
202 | }; | ||
203 | |||
204 | /* Structures for Protocol Operations */ | ||
205 | struct p9_tversion { | ||
206 | u32 msize; | ||
207 | struct p9_str version; | ||
208 | }; | ||
209 | |||
210 | struct p9_rversion { | ||
211 | u32 msize; | ||
212 | struct p9_str version; | ||
213 | }; | ||
214 | |||
215 | struct p9_tauth { | ||
216 | u32 afid; | ||
217 | struct p9_str uname; | ||
218 | struct p9_str aname; | ||
219 | }; | ||
220 | |||
221 | struct p9_rauth { | ||
222 | struct p9_qid qid; | ||
223 | }; | ||
224 | |||
225 | struct p9_rerror { | ||
226 | struct p9_str error; | ||
227 | u32 errno; /* 9p2000.u extension */ | ||
228 | }; | ||
229 | |||
230 | struct p9_tflush { | ||
231 | u16 oldtag; | ||
232 | }; | ||
233 | |||
234 | struct p9_rflush { | ||
235 | }; | ||
236 | |||
237 | struct p9_tattach { | ||
238 | u32 fid; | ||
239 | u32 afid; | ||
240 | struct p9_str uname; | ||
241 | struct p9_str aname; | ||
242 | }; | ||
243 | |||
244 | struct p9_rattach { | ||
245 | struct p9_qid qid; | ||
246 | }; | ||
247 | |||
248 | struct p9_twalk { | ||
249 | u32 fid; | ||
250 | u32 newfid; | ||
251 | u16 nwname; | ||
252 | struct p9_str wnames[16]; | ||
253 | }; | ||
254 | |||
255 | struct p9_rwalk { | ||
256 | u16 nwqid; | ||
257 | struct p9_qid wqids[16]; | ||
258 | }; | ||
259 | |||
260 | struct p9_topen { | ||
261 | u32 fid; | ||
262 | u8 mode; | ||
263 | }; | ||
264 | |||
265 | struct p9_ropen { | ||
266 | struct p9_qid qid; | ||
267 | u32 iounit; | ||
268 | }; | ||
269 | |||
270 | struct p9_tcreate { | ||
271 | u32 fid; | ||
272 | struct p9_str name; | ||
273 | u32 perm; | ||
274 | u8 mode; | ||
275 | struct p9_str extension; | ||
276 | }; | ||
277 | |||
278 | struct p9_rcreate { | ||
279 | struct p9_qid qid; | ||
280 | u32 iounit; | ||
281 | }; | ||
282 | |||
283 | struct p9_tread { | ||
284 | u32 fid; | ||
285 | u64 offset; | ||
286 | u32 count; | ||
287 | }; | ||
288 | |||
289 | struct p9_rread { | ||
290 | u32 count; | ||
291 | u8 *data; | ||
292 | }; | ||
293 | |||
294 | struct p9_twrite { | ||
295 | u32 fid; | ||
296 | u64 offset; | ||
297 | u32 count; | ||
298 | u8 *data; | ||
299 | }; | ||
300 | |||
301 | struct p9_rwrite { | ||
302 | u32 count; | ||
303 | }; | ||
304 | |||
305 | struct p9_tclunk { | ||
306 | u32 fid; | ||
307 | }; | ||
308 | |||
309 | struct p9_rclunk { | ||
310 | }; | ||
311 | |||
312 | struct p9_tremove { | ||
313 | u32 fid; | ||
314 | }; | ||
315 | |||
316 | struct p9_rremove { | ||
317 | }; | ||
318 | |||
319 | struct p9_tstat { | ||
320 | u32 fid; | ||
321 | }; | ||
322 | |||
323 | struct p9_rstat { | ||
324 | struct p9_stat stat; | ||
325 | }; | ||
326 | |||
327 | struct p9_twstat { | ||
328 | u32 fid; | ||
329 | struct p9_stat stat; | ||
330 | }; | ||
331 | |||
332 | struct p9_rwstat { | ||
333 | }; | ||
334 | |||
335 | /* | ||
336 | * fcall is the primary packet structure | ||
337 | * | ||
338 | */ | ||
339 | |||
340 | struct p9_fcall { | ||
341 | u32 size; | ||
342 | u8 id; | ||
343 | u16 tag; | ||
344 | void *sdata; | ||
345 | |||
346 | union { | ||
347 | struct p9_tversion tversion; | ||
348 | struct p9_rversion rversion; | ||
349 | struct p9_tauth tauth; | ||
350 | struct p9_rauth rauth; | ||
351 | struct p9_rerror rerror; | ||
352 | struct p9_tflush tflush; | ||
353 | struct p9_rflush rflush; | ||
354 | struct p9_tattach tattach; | ||
355 | struct p9_rattach rattach; | ||
356 | struct p9_twalk twalk; | ||
357 | struct p9_rwalk rwalk; | ||
358 | struct p9_topen topen; | ||
359 | struct p9_ropen ropen; | ||
360 | struct p9_tcreate tcreate; | ||
361 | struct p9_rcreate rcreate; | ||
362 | struct p9_tread tread; | ||
363 | struct p9_rread rread; | ||
364 | struct p9_twrite twrite; | ||
365 | struct p9_rwrite rwrite; | ||
366 | struct p9_tclunk tclunk; | ||
367 | struct p9_rclunk rclunk; | ||
368 | struct p9_tremove tremove; | ||
369 | struct p9_rremove rremove; | ||
370 | struct p9_tstat tstat; | ||
371 | struct p9_rstat rstat; | ||
372 | struct p9_twstat twstat; | ||
373 | struct p9_rwstat rwstat; | ||
374 | } params; | ||
375 | }; | ||
376 | |||
377 | struct p9_idpool; | ||
378 | |||
379 | int p9_deserialize_stat(void *buf, u32 buflen, struct p9_stat *stat, | ||
380 | int dotu); | ||
381 | int p9_deserialize_fcall(void *buf, u32 buflen, struct p9_fcall *fc, int dotu); | ||
382 | void p9_set_tag(struct p9_fcall *fc, u16 tag); | ||
383 | struct p9_fcall *p9_create_tversion(u32 msize, char *version); | ||
384 | struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname, | ||
385 | char *aname); | ||
386 | struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname); | ||
387 | struct p9_fcall *p9_create_tflush(u16 oldtag); | ||
388 | struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname, | ||
389 | char **wnames); | ||
390 | struct p9_fcall *p9_create_topen(u32 fid, u8 mode); | ||
391 | struct p9_fcall *p9_create_tcreate(u32 fid, char *name, u32 perm, u8 mode, | ||
392 | char *extension, int dotu); | ||
393 | struct p9_fcall *p9_create_tread(u32 fid, u64 offset, u32 count); | ||
394 | struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count, | ||
395 | const char *data); | ||
396 | struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count, | ||
397 | const char __user *data); | ||
398 | struct p9_fcall *p9_create_tclunk(u32 fid); | ||
399 | struct p9_fcall *p9_create_tremove(u32 fid); | ||
400 | struct p9_fcall *p9_create_tstat(u32 fid); | ||
401 | struct p9_fcall *p9_create_twstat(u32 fid, struct p9_wstat *wstat, | ||
402 | int dotu); | ||
403 | |||
404 | int p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int dotu); | ||
405 | int p9_errstr2errno(char *errstr, int len); | ||
406 | |||
407 | struct p9_idpool *p9_idpool_create(void); | ||
408 | void p9_idpool_destroy(struct p9_idpool *); | ||
409 | int p9_idpool_get(struct p9_idpool *p); | ||
410 | void p9_idpool_put(int id, struct p9_idpool *p); | ||
411 | int p9_idpool_check(int id, struct p9_idpool *p); | ||
412 | |||
413 | int p9_error_init(void); | ||
414 | int p9_errstr2errno(char *, int); | ||
415 | int __init p9_sysctl_register(void); | ||
416 | void __exit p9_sysctl_unregister(void); | ||
417 | #endif /* NET_9P_H */ | ||
diff --git a/include/net/9p/client.h b/include/net/9p/client.h new file mode 100644 index 000000000000..d65ed7c69063 --- /dev/null +++ b/include/net/9p/client.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * include/net/9p/client.h | ||
3 | * | ||
4 | * 9P Client Definitions | ||
5 | * | ||
6 | * Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 | ||
10 | * as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to: | ||
19 | * Free Software Foundation | ||
20 | * 51 Franklin Street, Fifth Floor | ||
21 | * Boston, MA 02111-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef NET_9P_CLIENT_H | ||
26 | #define NET_9P_CLIENT_H | ||
27 | |||
28 | struct p9_client { | ||
29 | spinlock_t lock; /* protect client structure */ | ||
30 | int msize; | ||
31 | unsigned char dotu; | ||
32 | struct p9_transport *trans; | ||
33 | struct p9_conn *conn; | ||
34 | |||
35 | struct p9_idpool *fidpool; | ||
36 | struct list_head fidlist; | ||
37 | }; | ||
38 | |||
39 | struct p9_fid { | ||
40 | struct p9_client *clnt; | ||
41 | u32 fid; | ||
42 | int mode; | ||
43 | struct p9_qid qid; | ||
44 | u32 iounit; | ||
45 | uid_t uid; | ||
46 | void *aux; | ||
47 | |||
48 | int rdir_fpos; | ||
49 | int rdir_pos; | ||
50 | struct p9_fcall *rdir_fcall; | ||
51 | struct list_head flist; | ||
52 | struct list_head dlist; /* list of all fids attached to a dentry */ | ||
53 | }; | ||
54 | |||
55 | struct p9_client *p9_client_create(struct p9_transport *trans, int msize, | ||
56 | int dotu); | ||
57 | void p9_client_destroy(struct p9_client *clnt); | ||
58 | void p9_client_disconnect(struct p9_client *clnt); | ||
59 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | ||
60 | char *uname, char *aname); | ||
61 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, char *aname); | ||
62 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | ||
63 | int clone); | ||
64 | int p9_client_open(struct p9_fid *fid, int mode); | ||
65 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | ||
66 | char *extension); | ||
67 | int p9_client_clunk(struct p9_fid *fid); | ||
68 | int p9_client_remove(struct p9_fid *fid); | ||
69 | int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count); | ||
70 | int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); | ||
71 | int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count); | ||
72 | int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, | ||
73 | u32 count); | ||
74 | int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset, | ||
75 | u32 count); | ||
76 | struct p9_stat *p9_client_stat(struct p9_fid *fid); | ||
77 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | ||
78 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); | ||
79 | |||
80 | #endif /* NET_9P_CLIENT_H */ | ||
diff --git a/include/net/9p/conn.h b/include/net/9p/conn.h new file mode 100644 index 000000000000..583b6a2cb3df --- /dev/null +++ b/include/net/9p/conn.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * include/net/9p/conn.h | ||
3 | * | ||
4 | * Connection Definitions | ||
5 | * | ||
6 | * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net> | ||
7 | * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 | ||
11 | * as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to: | ||
20 | * Free Software Foundation | ||
21 | * 51 Franklin Street, Fifth Floor | ||
22 | * Boston, MA 02111-1301 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #ifndef NET_9P_CONN_H | ||
27 | #define NET_9P_CONN_H | ||
28 | |||
29 | #undef P9_NONBLOCK | ||
30 | |||
31 | struct p9_conn; | ||
32 | struct p9_req; | ||
33 | |||
34 | /** | ||
35 | * p9_mux_req_callback - callback function that is called when the | ||
36 | * response of a request is received. The callback is called from | ||
37 | * a workqueue and shouldn't block. | ||
38 | * | ||
39 | * @req - request | ||
40 | * @a - the pointer that was specified when the request was send to be | ||
41 | * passed to the callback | ||
42 | */ | ||
43 | typedef void (*p9_conn_req_callback)(struct p9_req *req, void *a); | ||
44 | |||
45 | struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize, | ||
46 | unsigned char *dotu); | ||
47 | void p9_conn_destroy(struct p9_conn *); | ||
48 | int p9_conn_rpc(struct p9_conn *m, struct p9_fcall *tc, struct p9_fcall **rc); | ||
49 | |||
50 | #ifdef P9_NONBLOCK | ||
51 | int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc, | ||
52 | p9_conn_req_callback cb, void *a); | ||
53 | #endif /* P9_NONBLOCK */ | ||
54 | |||
55 | void p9_conn_cancel(struct p9_conn *m, int err); | ||
56 | |||
57 | #endif /* NET_9P_CONN_H */ | ||
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h new file mode 100644 index 000000000000..462d42279fb0 --- /dev/null +++ b/include/net/9p/transport.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/net/9p/transport.h | ||
3 | * | ||
4 | * Transport Definition | ||
5 | * | ||
6 | * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net> | ||
7 | * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 | ||
11 | * as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to: | ||
20 | * Free Software Foundation | ||
21 | * 51 Franklin Street, Fifth Floor | ||
22 | * Boston, MA 02111-1301 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #ifndef NET_9P_TRANSPORT_H | ||
27 | #define NET_9P_TRANSPORT_H | ||
28 | |||
29 | enum p9_transport_status { | ||
30 | Connected, | ||
31 | Disconnected, | ||
32 | Hung, | ||
33 | }; | ||
34 | |||
35 | struct p9_transport { | ||
36 | enum p9_transport_status status; | ||
37 | void *priv; | ||
38 | |||
39 | int (*write) (struct p9_transport *, void *, int); | ||
40 | int (*read) (struct p9_transport *, void *, int); | ||
41 | void (*close) (struct p9_transport *); | ||
42 | unsigned int (*poll)(struct p9_transport *, struct poll_table_struct *); | ||
43 | }; | ||
44 | |||
45 | struct p9_transport *p9_trans_create_tcp(const char *addr, int port); | ||
46 | struct p9_transport *p9_trans_create_unix(const char *addr); | ||
47 | struct p9_transport *p9_trans_create_fd(int rfd, int wfd); | ||
48 | |||
49 | #endif /* NET_9P_TRANSPORT_H */ | ||
diff --git a/include/net/act_api.h b/include/net/act_api.h index 8b06c2f3657f..68b4eaf7719d 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -19,7 +19,6 @@ struct tcf_common { | |||
19 | struct gnet_stats_basic tcfc_bstats; | 19 | struct gnet_stats_basic tcfc_bstats; |
20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est tcfc_rate_est; |
22 | spinlock_t *tcfc_stats_lock; | ||
23 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
24 | }; | 23 | }; |
25 | #define tcf_next common.tcfc_next | 24 | #define tcf_next common.tcfc_next |
@@ -32,7 +31,6 @@ struct tcf_common { | |||
32 | #define tcf_bstats common.tcfc_bstats | 31 | #define tcf_bstats common.tcfc_bstats |
33 | #define tcf_qstats common.tcfc_qstats | 32 | #define tcf_qstats common.tcfc_qstats |
34 | #define tcf_rate_est common.tcfc_rate_est | 33 | #define tcf_rate_est common.tcfc_rate_est |
35 | #define tcf_stats_lock common.tcfc_stats_lock | ||
36 | #define tcf_lock common.tcfc_lock | 34 | #define tcf_lock common.tcfc_lock |
37 | 35 | ||
38 | struct tcf_police { | 36 | struct tcf_police { |
@@ -123,34 +121,4 @@ extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, in | |||
123 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 121 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
124 | extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); | 122 | extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); |
125 | #endif /* CONFIG_NET_CLS_ACT */ | 123 | #endif /* CONFIG_NET_CLS_ACT */ |
126 | |||
127 | extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); | ||
128 | extern void tcf_police_destroy(struct tcf_police *p); | ||
129 | extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est); | ||
130 | extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); | ||
131 | extern int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *p); | ||
132 | |||
133 | static inline int | ||
134 | tcf_police_release(struct tcf_police *p, int bind) | ||
135 | { | ||
136 | int ret = 0; | ||
137 | #ifdef CONFIG_NET_CLS_ACT | ||
138 | if (p) { | ||
139 | if (bind) | ||
140 | p->tcf_bindcnt--; | ||
141 | |||
142 | p->tcf_refcnt--; | ||
143 | if (p->tcf_refcnt <= 0 && !p->tcf_bindcnt) { | ||
144 | tcf_police_destroy(p); | ||
145 | ret = 1; | ||
146 | } | ||
147 | } | ||
148 | #else | ||
149 | if (p && --p->tcf_refcnt == 0) | ||
150 | tcf_police_destroy(p); | ||
151 | |||
152 | #endif /* CONFIG_NET_CLS_ACT */ | ||
153 | return ret; | ||
154 | } | ||
155 | |||
156 | #endif | 124 | #endif |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index f3531d0bcd05..33b593e17441 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -61,7 +61,7 @@ extern int addrconf_set_dstaddr(void __user *arg); | |||
61 | extern int ipv6_chk_addr(struct in6_addr *addr, | 61 | extern int ipv6_chk_addr(struct in6_addr *addr, |
62 | struct net_device *dev, | 62 | struct net_device *dev, |
63 | int strict); | 63 | int strict); |
64 | #ifdef CONFIG_IPV6_MIP6 | 64 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
65 | extern int ipv6_chk_home_addr(struct in6_addr *addr); | 65 | extern int ipv6_chk_home_addr(struct in6_addr *addr); |
66 | #endif | 66 | #endif |
67 | extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr, | 67 | extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr, |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 65f49fd7deff..6de1e9e35c73 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -79,9 +79,10 @@ struct unix_sock { | |||
79 | struct mutex readlock; | 79 | struct mutex readlock; |
80 | struct sock *peer; | 80 | struct sock *peer; |
81 | struct sock *other; | 81 | struct sock *other; |
82 | struct sock *gc_tree; | 82 | struct list_head link; |
83 | atomic_t inflight; | 83 | atomic_t inflight; |
84 | spinlock_t lock; | 84 | spinlock_t lock; |
85 | unsigned int gc_candidate : 1; | ||
85 | wait_queue_head_t peer_wait; | 86 | wait_queue_head_t peer_wait; |
86 | }; | 87 | }; |
87 | #define unix_sk(__sk) ((struct unix_sock *)__sk) | 88 | #define unix_sk(__sk) ((struct unix_sock *)__sk) |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 93ce272a5d27..ebfb96b41106 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -107,14 +107,14 @@ enum { | |||
107 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ | 107 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ |
108 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ | 108 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ |
109 | 109 | ||
110 | /* HCI Packet types */ | 110 | /* HCI data types */ |
111 | #define HCI_COMMAND_PKT 0x01 | 111 | #define HCI_COMMAND_PKT 0x01 |
112 | #define HCI_ACLDATA_PKT 0x02 | 112 | #define HCI_ACLDATA_PKT 0x02 |
113 | #define HCI_SCODATA_PKT 0x03 | 113 | #define HCI_SCODATA_PKT 0x03 |
114 | #define HCI_EVENT_PKT 0x04 | 114 | #define HCI_EVENT_PKT 0x04 |
115 | #define HCI_VENDOR_PKT 0xff | 115 | #define HCI_VENDOR_PKT 0xff |
116 | 116 | ||
117 | /* HCI Packet types */ | 117 | /* HCI packet types */ |
118 | #define HCI_DM1 0x0008 | 118 | #define HCI_DM1 0x0008 |
119 | #define HCI_DM3 0x0400 | 119 | #define HCI_DM3 0x0400 |
120 | #define HCI_DM5 0x4000 | 120 | #define HCI_DM5 0x4000 |
@@ -129,6 +129,14 @@ enum { | |||
129 | #define SCO_PTYPE_MASK (HCI_HV1 | HCI_HV2 | HCI_HV3) | 129 | #define SCO_PTYPE_MASK (HCI_HV1 | HCI_HV2 | HCI_HV3) |
130 | #define ACL_PTYPE_MASK (~SCO_PTYPE_MASK) | 130 | #define ACL_PTYPE_MASK (~SCO_PTYPE_MASK) |
131 | 131 | ||
132 | /* eSCO packet types */ | ||
133 | #define ESCO_HV1 0x0001 | ||
134 | #define ESCO_HV2 0x0002 | ||
135 | #define ESCO_HV3 0x0004 | ||
136 | #define ESCO_EV3 0x0008 | ||
137 | #define ESCO_EV4 0x0010 | ||
138 | #define ESCO_EV5 0x0020 | ||
139 | |||
132 | /* ACL flags */ | 140 | /* ACL flags */ |
133 | #define ACL_CONT 0x01 | 141 | #define ACL_CONT 0x01 |
134 | #define ACL_START 0x02 | 142 | #define ACL_START 0x02 |
@@ -138,6 +146,7 @@ enum { | |||
138 | /* Baseband links */ | 146 | /* Baseband links */ |
139 | #define SCO_LINK 0x00 | 147 | #define SCO_LINK 0x00 |
140 | #define ACL_LINK 0x01 | 148 | #define ACL_LINK 0x01 |
149 | #define ESCO_LINK 0x02 | ||
141 | 150 | ||
142 | /* LMP features */ | 151 | /* LMP features */ |
143 | #define LMP_3SLOT 0x01 | 152 | #define LMP_3SLOT 0x01 |
@@ -162,6 +171,11 @@ enum { | |||
162 | #define LMP_PSCHEME 0x02 | 171 | #define LMP_PSCHEME 0x02 |
163 | #define LMP_PCONTROL 0x04 | 172 | #define LMP_PCONTROL 0x04 |
164 | 173 | ||
174 | #define LMP_ESCO 0x80 | ||
175 | |||
176 | #define LMP_EV4 0x01 | ||
177 | #define LMP_EV5 0x02 | ||
178 | |||
165 | #define LMP_SNIFF_SUBR 0x02 | 179 | #define LMP_SNIFF_SUBR 0x02 |
166 | 180 | ||
167 | /* Connection modes */ | 181 | /* Connection modes */ |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index c0fc39620f36..8f67c8a7169b 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -78,6 +78,7 @@ struct hci_dev { | |||
78 | __u16 voice_setting; | 78 | __u16 voice_setting; |
79 | 79 | ||
80 | __u16 pkt_type; | 80 | __u16 pkt_type; |
81 | __u16 esco_type; | ||
81 | __u16 link_policy; | 82 | __u16 link_policy; |
82 | __u16 link_mode; | 83 | __u16 link_mode; |
83 | 84 | ||
@@ -109,6 +110,7 @@ struct hci_dev { | |||
109 | struct sk_buff_head cmd_q; | 110 | struct sk_buff_head cmd_q; |
110 | 111 | ||
111 | struct sk_buff *sent_cmd; | 112 | struct sk_buff *sent_cmd; |
113 | struct sk_buff *reassembly[3]; | ||
112 | 114 | ||
113 | struct semaphore req_lock; | 115 | struct semaphore req_lock; |
114 | wait_queue_head_t req_wait_q; | 116 | wait_queue_head_t req_wait_q; |
@@ -437,6 +439,8 @@ static inline int hci_recv_frame(struct sk_buff *skb) | |||
437 | return 0; | 439 | return 0; |
438 | } | 440 | } |
439 | 441 | ||
442 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | ||
443 | |||
440 | int hci_register_sysfs(struct hci_dev *hdev); | 444 | int hci_register_sysfs(struct hci_dev *hdev); |
441 | void hci_unregister_sysfs(struct hci_dev *hdev); | 445 | void hci_unregister_sysfs(struct hci_dev *hdev); |
442 | void hci_conn_add_sysfs(struct hci_conn *conn); | 446 | void hci_conn_add_sysfs(struct hci_conn *conn); |
@@ -449,6 +453,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn); | |||
449 | #define lmp_encrypt_capable(dev) ((dev)->features[0] & LMP_ENCRYPT) | 453 | #define lmp_encrypt_capable(dev) ((dev)->features[0] & LMP_ENCRYPT) |
450 | #define lmp_sniff_capable(dev) ((dev)->features[0] & LMP_SNIFF) | 454 | #define lmp_sniff_capable(dev) ((dev)->features[0] & LMP_SNIFF) |
451 | #define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR) | 455 | #define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR) |
456 | #define lmp_esco_capable(dev) ((dev)->features[3] & LMP_ESCO) | ||
452 | 457 | ||
453 | /* ----- HCI protocols ----- */ | 458 | /* ----- HCI protocols ----- */ |
454 | struct hci_proto { | 459 | struct hci_proto { |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 3c563f02907c..25aa575db807 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -323,6 +323,7 @@ int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc | |||
323 | #define RFCOMM_RELEASE_ONHUP 1 | 323 | #define RFCOMM_RELEASE_ONHUP 1 |
324 | #define RFCOMM_HANGUP_NOW 2 | 324 | #define RFCOMM_HANGUP_NOW 2 |
325 | #define RFCOMM_TTY_ATTACHED 3 | 325 | #define RFCOMM_TTY_ATTACHED 3 |
326 | #define RFCOMM_TTY_RELEASED 4 | ||
326 | 327 | ||
327 | struct rfcomm_dev_req { | 328 | struct rfcomm_dev_req { |
328 | s16 dev_id; | 329 | s16 dev_id; |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 88171f8ce58a..7edaef6b29d6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -11,6 +11,44 @@ | |||
11 | * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> | 11 | * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | |||
15 | /* Radiotap header iteration | ||
16 | * implemented in net/wireless/radiotap.c | ||
17 | * docs in Documentation/networking/radiotap-headers.txt | ||
18 | */ | ||
19 | /** | ||
20 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args | ||
21 | * @rtheader: pointer to the radiotap header we are walking through | ||
22 | * @max_length: length of radiotap header in cpu byte ordering | ||
23 | * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg | ||
24 | * @this_arg: pointer to current radiotap arg | ||
25 | * @arg_index: internal next argument index | ||
26 | * @arg: internal next argument pointer | ||
27 | * @next_bitmap: internal pointer to next present u32 | ||
28 | * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | ||
29 | */ | ||
30 | |||
31 | struct ieee80211_radiotap_iterator { | ||
32 | struct ieee80211_radiotap_header *rtheader; | ||
33 | int max_length; | ||
34 | int this_arg_index; | ||
35 | u8 *this_arg; | ||
36 | |||
37 | int arg_index; | ||
38 | u8 *arg; | ||
39 | __le32 *next_bitmap; | ||
40 | u32 bitmap_shifter; | ||
41 | }; | ||
42 | |||
43 | extern int ieee80211_radiotap_iterator_init( | ||
44 | struct ieee80211_radiotap_iterator *iterator, | ||
45 | struct ieee80211_radiotap_header *radiotap_header, | ||
46 | int max_length); | ||
47 | |||
48 | extern int ieee80211_radiotap_iterator_next( | ||
49 | struct ieee80211_radiotap_iterator *iterator); | ||
50 | |||
51 | |||
14 | /* from net/wireless.h */ | 52 | /* from net/wireless.h */ |
15 | struct wiphy; | 53 | struct wiphy; |
16 | 54 | ||
diff --git a/include/net/dn.h b/include/net/dn.h index ac4ce9091747..627778384c84 100644 --- a/include/net/dn.h +++ b/include/net/dn.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/dn.h> | 4 | #include <linux/dn.h> |
5 | #include <net/sock.h> | 5 | #include <net/sock.h> |
6 | #include <net/tcp.h> | ||
7 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
8 | 7 | ||
9 | #define dn_ntohs(x) le16_to_cpu(x) | 8 | #define dn_ntohs(x) le16_to_cpu(x) |
diff --git a/include/net/dst.h b/include/net/dst.h index 82270f9332db..e9ff4a4caef9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -47,7 +47,6 @@ struct dst_entry | |||
47 | #define DST_NOXFRM 2 | 47 | #define DST_NOXFRM 2 |
48 | #define DST_NOPOLICY 4 | 48 | #define DST_NOPOLICY 4 |
49 | #define DST_NOHASH 8 | 49 | #define DST_NOHASH 8 |
50 | #define DST_BALANCED 0x10 | ||
51 | unsigned long expires; | 50 | unsigned long expires; |
52 | 51 | ||
53 | unsigned short header_len; /* more space at head required */ | 52 | unsigned short header_len; /* more space at head required */ |
diff --git a/include/net/flow.h b/include/net/flow.h index f3cc1f812619..af59fa5cc1f8 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -67,20 +67,16 @@ struct flowi { | |||
67 | 67 | ||
68 | __be32 spi; | 68 | __be32 spi; |
69 | 69 | ||
70 | #ifdef CONFIG_IPV6_MIP6 | ||
71 | struct { | 70 | struct { |
72 | __u8 type; | 71 | __u8 type; |
73 | } mht; | 72 | } mht; |
74 | #endif | ||
75 | } uli_u; | 73 | } uli_u; |
76 | #define fl_ip_sport uli_u.ports.sport | 74 | #define fl_ip_sport uli_u.ports.sport |
77 | #define fl_ip_dport uli_u.ports.dport | 75 | #define fl_ip_dport uli_u.ports.dport |
78 | #define fl_icmp_type uli_u.icmpt.type | 76 | #define fl_icmp_type uli_u.icmpt.type |
79 | #define fl_icmp_code uli_u.icmpt.code | 77 | #define fl_icmp_code uli_u.icmpt.code |
80 | #define fl_ipsec_spi uli_u.spi | 78 | #define fl_ipsec_spi uli_u.spi |
81 | #ifdef CONFIG_IPV6_MIP6 | ||
82 | #define fl_mh_type uli_u.mht.type | 79 | #define fl_mh_type uli_u.mht.type |
83 | #endif | ||
84 | __u32 secid; /* used by xfrm; see secid.txt */ | 80 | __u32 secid; /* used by xfrm; see secid.txt */ |
85 | } __attribute__((__aligned__(BITS_PER_LONG/8))); | 81 | } __attribute__((__aligned__(BITS_PER_LONG/8))); |
86 | 82 | ||
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 09a2532699b2..47d52b2414db 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -209,9 +209,6 @@ static inline void inet_twsk_put(struct inet_timewait_sock *tw) | |||
209 | extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, | 209 | extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, |
210 | const int state); | 210 | const int state); |
211 | 211 | ||
212 | extern void __inet_twsk_kill(struct inet_timewait_sock *tw, | ||
213 | struct inet_hashinfo *hashinfo); | ||
214 | |||
215 | extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw, | 212 | extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw, |
216 | struct sock *sk, | 213 | struct sock *sk, |
217 | struct inet_hashinfo *hashinfo); | 214 | struct inet_hashinfo *hashinfo); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 69252cbe05b0..8cadc77c7df4 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -39,7 +39,6 @@ struct fib_config { | |||
39 | int fc_mx_len; | 39 | int fc_mx_len; |
40 | int fc_mp_len; | 40 | int fc_mp_len; |
41 | u32 fc_flow; | 41 | u32 fc_flow; |
42 | u32 fc_mp_alg; | ||
43 | u32 fc_nlflags; | 42 | u32 fc_nlflags; |
44 | struct nl_info fc_nlinfo; | 43 | struct nl_info fc_nlinfo; |
45 | }; | 44 | }; |
@@ -86,9 +85,6 @@ struct fib_info { | |||
86 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 85 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
87 | int fib_power; | 86 | int fib_power; |
88 | #endif | 87 | #endif |
89 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
90 | u32 fib_mp_alg; | ||
91 | #endif | ||
92 | struct fib_nh fib_nh[0]; | 88 | struct fib_nh fib_nh[0]; |
93 | #define fib_dev fib_nh[0].nh_dev | 89 | #define fib_dev fib_nh[0].nh_dev |
94 | }; | 90 | }; |
@@ -103,10 +99,6 @@ struct fib_result { | |||
103 | unsigned char nh_sel; | 99 | unsigned char nh_sel; |
104 | unsigned char type; | 100 | unsigned char type; |
105 | unsigned char scope; | 101 | unsigned char scope; |
106 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
107 | __be32 network; | ||
108 | __be32 netmask; | ||
109 | #endif | ||
110 | struct fib_info *fi; | 102 | struct fib_info *fi; |
111 | #ifdef CONFIG_IP_MULTIPLE_TABLES | 103 | #ifdef CONFIG_IP_MULTIPLE_TABLES |
112 | struct fib_rule *r; | 104 | struct fib_rule *r; |
@@ -145,14 +137,6 @@ struct fib_result_nl { | |||
145 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) | 137 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) |
146 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) | 138 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) |
147 | 139 | ||
148 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
149 | #define FIB_RES_NETWORK(res) ((res).network) | ||
150 | #define FIB_RES_NETMASK(res) ((res).netmask) | ||
151 | #else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ | ||
152 | #define FIB_RES_NETWORK(res) (0) | ||
153 | #define FIB_RES_NETMASK(res) (0) | ||
154 | #endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */ | ||
155 | |||
156 | struct fib_table { | 140 | struct fib_table { |
157 | struct hlist_node tb_hlist; | 141 | struct hlist_node tb_hlist; |
158 | u32 tb_id; | 142 | u32 tb_id; |
diff --git a/include/net/ip_mp_alg.h b/include/net/ip_mp_alg.h deleted file mode 100644 index 25b56571e54b..000000000000 --- a/include/net/ip_mp_alg.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* ip_mp_alg.h: IPV4 multipath algorithm support. | ||
2 | * | ||
3 | * Copyright (C) 2004, 2005 Einar Lueck <elueck@de.ibm.com> | ||
4 | * Copyright (C) 2005 David S. Miller <davem@davemloft.net> | ||
5 | */ | ||
6 | |||
7 | #ifndef _NET_IP_MP_ALG_H | ||
8 | #define _NET_IP_MP_ALG_H | ||
9 | |||
10 | #include <linux/ip_mp_alg.h> | ||
11 | #include <net/flow.h> | ||
12 | #include <net/route.h> | ||
13 | |||
14 | struct fib_nh; | ||
15 | |||
16 | struct ip_mp_alg_ops { | ||
17 | void (*mp_alg_select_route)(const struct flowi *flp, | ||
18 | struct rtable *rth, struct rtable **rp); | ||
19 | void (*mp_alg_flush)(void); | ||
20 | void (*mp_alg_set_nhinfo)(__be32 network, __be32 netmask, | ||
21 | unsigned char prefixlen, | ||
22 | const struct fib_nh *nh); | ||
23 | void (*mp_alg_remove)(struct rtable *rth); | ||
24 | }; | ||
25 | |||
26 | extern int multipath_alg_register(struct ip_mp_alg_ops *, enum ip_mp_alg); | ||
27 | extern void multipath_alg_unregister(struct ip_mp_alg_ops *, enum ip_mp_alg); | ||
28 | |||
29 | extern struct ip_mp_alg_ops *ip_mp_alg_table[]; | ||
30 | |||
31 | static inline int multipath_select_route(const struct flowi *flp, | ||
32 | struct rtable *rth, | ||
33 | struct rtable **rp) | ||
34 | { | ||
35 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
36 | struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; | ||
37 | |||
38 | /* mp_alg_select_route _MUST_ be implemented */ | ||
39 | if (ops && (rth->u.dst.flags & DST_BALANCED)) { | ||
40 | ops->mp_alg_select_route(flp, rth, rp); | ||
41 | return 1; | ||
42 | } | ||
43 | #endif | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static inline void multipath_flush(void) | ||
48 | { | ||
49 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
50 | int i; | ||
51 | |||
52 | for (i = IP_MP_ALG_NONE; i <= IP_MP_ALG_MAX; i++) { | ||
53 | struct ip_mp_alg_ops *ops = ip_mp_alg_table[i]; | ||
54 | |||
55 | if (ops && ops->mp_alg_flush) | ||
56 | ops->mp_alg_flush(); | ||
57 | } | ||
58 | #endif | ||
59 | } | ||
60 | |||
61 | static inline void multipath_set_nhinfo(struct rtable *rth, | ||
62 | __be32 network, __be32 netmask, | ||
63 | unsigned char prefixlen, | ||
64 | const struct fib_nh *nh) | ||
65 | { | ||
66 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
67 | struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; | ||
68 | |||
69 | if (ops && ops->mp_alg_set_nhinfo) | ||
70 | ops->mp_alg_set_nhinfo(network, netmask, prefixlen, nh); | ||
71 | #endif | ||
72 | } | ||
73 | |||
74 | static inline void multipath_remove(struct rtable *rth) | ||
75 | { | ||
76 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | ||
77 | struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; | ||
78 | |||
79 | if (ops && ops->mp_alg_remove && | ||
80 | (rth->u.dst.flags & DST_BALANCED)) | ||
81 | ops->mp_alg_remove(rth); | ||
82 | #endif | ||
83 | } | ||
84 | |||
85 | static inline int multipath_comparekeys(const struct flowi *flp1, | ||
86 | const struct flowi *flp2) | ||
87 | { | ||
88 | return flp1->fl4_dst == flp2->fl4_dst && | ||
89 | flp1->fl4_src == flp2->fl4_src && | ||
90 | flp1->oif == flp2->oif && | ||
91 | flp1->mark == flp2->mark && | ||
92 | !((flp1->fl4_tos ^ flp2->fl4_tos) & | ||
93 | (IPTOS_RT_MASK | RTO_ONLINK)); | ||
94 | } | ||
95 | |||
96 | #endif /* _NET_IP_MP_ALG_H */ | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 78a0d06d98d5..46b9dce82f6e 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -512,10 +512,6 @@ extern int ipv6_ext_hdr(u8 nexthdr); | |||
512 | 512 | ||
513 | extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); | 513 | extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); |
514 | 514 | ||
515 | extern struct ipv6_txoptions * ipv6_invert_rthdr(struct sock *sk, | ||
516 | struct ipv6_rt_hdr *hdr); | ||
517 | |||
518 | |||
519 | /* | 515 | /* |
520 | * socket options (ipv6_sockglue.c) | 516 | * socket options (ipv6_sockglue.c) |
521 | */ | 517 | */ |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 36bee441aa56..08387553b57e 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -125,6 +125,9 @@ extern void irda_sysctl_unregister(void); | |||
125 | extern int irsock_init(void); | 125 | extern int irsock_init(void); |
126 | extern void irsock_cleanup(void); | 126 | extern void irsock_cleanup(void); |
127 | 127 | ||
128 | extern int irda_nl_register(void); | ||
129 | extern void irda_nl_unregister(void); | ||
130 | |||
128 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | 131 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, |
129 | struct packet_type *ptype, | 132 | struct packet_type *ptype, |
130 | struct net_device *orig_dev); | 133 | struct net_device *orig_dev); |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index a3d370efb903..9d0c78ea92f5 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -208,6 +208,8 @@ struct irlap_cb { | |||
208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
211 | |||
212 | int mode; /* IrLAP mode (primary, secondary or monitor) */ | ||
211 | }; | 213 | }; |
212 | 214 | ||
213 | /* | 215 | /* |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index f9bd11be1891..b6c468cd7f5b 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
@@ -60,6 +60,7 @@ struct iucv_sock { | |||
60 | char dst_user_id[8]; | 60 | char dst_user_id[8]; |
61 | char dst_name[8]; | 61 | char dst_name[8]; |
62 | struct list_head accept_q; | 62 | struct list_head accept_q; |
63 | spinlock_t accept_q_lock; | ||
63 | struct sock *parent; | 64 | struct sock *parent; |
64 | struct iucv_path *path; | 65 | struct iucv_path *path; |
65 | struct sk_buff_head send_skb_q; | 66 | struct sk_buff_head send_skb_q; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index a7f122b79948..c34fd9a6160a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -347,9 +347,16 @@ enum ieee80211_if_types { | |||
347 | * @mac_addr: pointer to MAC address of the interface. This pointer is valid | 347 | * @mac_addr: pointer to MAC address of the interface. This pointer is valid |
348 | * until the interface is removed (i.e. it cannot be used after | 348 | * until the interface is removed (i.e. it cannot be used after |
349 | * remove_interface() callback was called for this interface). | 349 | * remove_interface() callback was called for this interface). |
350 | * This pointer will be %NULL for monitor interfaces, be careful. | ||
350 | * | 351 | * |
351 | * This structure is used in add_interface() and remove_interface() | 352 | * This structure is used in add_interface() and remove_interface() |
352 | * callbacks of &struct ieee80211_hw. | 353 | * callbacks of &struct ieee80211_hw. |
354 | * | ||
355 | * When you allow multiple interfaces to be added to your PHY, take care | ||
356 | * that the hardware can actually handle multiple MAC addresses. However, | ||
357 | * also take care that when there's no interface left with mac_addr != %NULL | ||
358 | * you remove the MAC address from the device to avoid acknowledging packets | ||
359 | * in pure monitor mode. | ||
353 | */ | 360 | */ |
354 | struct ieee80211_if_init_conf { | 361 | struct ieee80211_if_init_conf { |
355 | int if_id; | 362 | int if_id; |
@@ -574,10 +581,11 @@ struct ieee80211_ops { | |||
574 | * to returning zero. By returning non-zero addition of the interface | 581 | * to returning zero. By returning non-zero addition of the interface |
575 | * is inhibited. Unless monitor_during_oper is set, it is guaranteed | 582 | * is inhibited. Unless monitor_during_oper is set, it is guaranteed |
576 | * that monitor interfaces and normal interfaces are mutually | 583 | * that monitor interfaces and normal interfaces are mutually |
577 | * exclusive. The open() handler is called after add_interface() | 584 | * exclusive. If assigned, the open() handler is called after |
578 | * if this is the first device added. At least one of the open() | 585 | * add_interface() if this is the first device added. The |
579 | * open() and add_interface() callbacks has to be assigned. If | 586 | * add_interface() callback has to be assigned because it is the only |
580 | * add_interface() is NULL, one STA interface is permitted only. */ | 587 | * way to obtain the requested MAC address for any interface. |
588 | */ | ||
581 | int (*add_interface)(struct ieee80211_hw *hw, | 589 | int (*add_interface)(struct ieee80211_hw *hw, |
582 | struct ieee80211_if_init_conf *conf); | 590 | struct ieee80211_if_init_conf *conf); |
583 | 591 | ||
@@ -921,12 +929,6 @@ struct sk_buff * | |||
921 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, int if_id, | 929 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, int if_id, |
922 | struct ieee80211_tx_control *control); | 930 | struct ieee80211_tx_control *control); |
923 | 931 | ||
924 | /* Low level drivers that have their own MLME and MAC indicate | ||
925 | * the aid for an associating station with this call */ | ||
926 | int ieee80211_set_aid_for_sta(struct ieee80211_hw *hw, | ||
927 | u8 *peer_address, u16 aid); | ||
928 | |||
929 | |||
930 | /* Given an sk_buff with a raw 802.11 header at the data pointer this function | 932 | /* Given an sk_buff with a raw 802.11 header at the data pointer this function |
931 | * returns the 802.11 header length in bytes (not including encryption | 933 | * returns the 802.11 header length in bytes (not including encryption |
932 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | 934 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 |
diff --git a/include/net/mip6.h b/include/net/mip6.h index 68263c6d9996..63272610a24a 100644 --- a/include/net/mip6.h +++ b/include/net/mip6.h | |||
@@ -54,8 +54,4 @@ struct ip6_mh { | |||
54 | #define IP6_MH_TYPE_BERROR 7 /* Binding Error */ | 54 | #define IP6_MH_TYPE_BERROR 7 /* Binding Error */ |
55 | #define IP6_MH_TYPE_MAX IP6_MH_TYPE_BERROR | 55 | #define IP6_MH_TYPE_MAX IP6_MH_TYPE_BERROR |
56 | 56 | ||
57 | extern int mip6_init(void); | ||
58 | extern void mip6_fini(void); | ||
59 | extern int mip6_mh_filter(struct sock *sk, struct sk_buff *skb); | ||
60 | |||
61 | #endif | 57 | #endif |
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h index 1401ccc051c4..7a671603fca6 100644 --- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h +++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h | |||
@@ -9,29 +9,10 @@ | |||
9 | #ifndef _NF_CONNTRACK_IPV4_H | 9 | #ifndef _NF_CONNTRACK_IPV4_H |
10 | #define _NF_CONNTRACK_IPV4_H | 10 | #define _NF_CONNTRACK_IPV4_H |
11 | 11 | ||
12 | #ifdef CONFIG_NF_NAT_NEEDED | ||
13 | #include <net/netfilter/nf_nat.h> | ||
14 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
15 | |||
16 | /* per conntrack: nat application helper private data */ | ||
17 | union nf_conntrack_nat_help { | ||
18 | /* insert nat helper private data here */ | ||
19 | struct nf_nat_pptp nat_pptp_info; | ||
20 | }; | ||
21 | |||
22 | struct nf_conn_nat { | ||
23 | struct nf_nat_info info; | ||
24 | union nf_conntrack_nat_help help; | ||
25 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
26 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | ||
27 | int masq_index; | ||
28 | #endif | ||
29 | }; | ||
30 | #endif /* CONFIG_NF_NAT_NEEDED */ | ||
31 | |||
32 | /* Returns new sk_buff, or NULL */ | 12 | /* Returns new sk_buff, or NULL */ |
33 | struct sk_buff * | 13 | struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); |
34 | nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); | 14 | |
15 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | ||
35 | 16 | ||
36 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; | 17 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; |
37 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; | 18 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; |
diff --git a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h index b4b6049e01fa..5a8965904377 100644 --- a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h +++ b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h | |||
@@ -7,7 +7,7 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; | |||
7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; | 7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; |
8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; | 8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; |
9 | 9 | ||
10 | extern int nf_ct_ipv6_skip_exthdr(struct sk_buff *skb, int start, | 10 | extern int nf_ct_ipv6_skip_exthdr(const struct sk_buff *skb, int start, |
11 | u8 *nexthdrp, int len); | 11 | u8 *nexthdrp, int len); |
12 | 12 | ||
13 | extern int nf_ct_frag6_init(void); | 13 | extern int nf_ct_frag6_init(void); |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 4732432f8eb0..810020ec345d 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -82,6 +82,8 @@ struct nf_conn_help { | |||
82 | 82 | ||
83 | union nf_conntrack_help help; | 83 | union nf_conntrack_help help; |
84 | 84 | ||
85 | struct hlist_head expectations; | ||
86 | |||
85 | /* Current number of expected connections */ | 87 | /* Current number of expected connections */ |
86 | unsigned int expecting; | 88 | unsigned int expecting; |
87 | }; | 89 | }; |
@@ -117,9 +119,6 @@ struct nf_conn | |||
117 | /* Unique ID that identifies this conntrack*/ | 119 | /* Unique ID that identifies this conntrack*/ |
118 | unsigned int id; | 120 | unsigned int id; |
119 | 121 | ||
120 | /* features - nat, helper, ... used by allocating system */ | ||
121 | u_int32_t features; | ||
122 | |||
123 | #if defined(CONFIG_NF_CONNTRACK_MARK) | 122 | #if defined(CONFIG_NF_CONNTRACK_MARK) |
124 | u_int32_t mark; | 123 | u_int32_t mark; |
125 | #endif | 124 | #endif |
@@ -131,8 +130,8 @@ struct nf_conn | |||
131 | /* Storage reserved for other modules: */ | 130 | /* Storage reserved for other modules: */ |
132 | union nf_conntrack_proto proto; | 131 | union nf_conntrack_proto proto; |
133 | 132 | ||
134 | /* features dynamically at the end: helper, nat (both optional) */ | 133 | /* Extensions */ |
135 | char data[0]; | 134 | struct nf_ct_ext *ext; |
136 | }; | 135 | }; |
137 | 136 | ||
138 | static inline struct nf_conn * | 137 | static inline struct nf_conn * |
@@ -175,6 +174,10 @@ static inline void nf_ct_put(struct nf_conn *ct) | |||
175 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); | 174 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); |
176 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); | 175 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); |
177 | 176 | ||
177 | extern struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced); | ||
178 | extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, | ||
179 | int size); | ||
180 | |||
178 | extern struct nf_conntrack_tuple_hash * | 181 | extern struct nf_conntrack_tuple_hash * |
179 | __nf_conntrack_find(const struct nf_conntrack_tuple *tuple, | 182 | __nf_conntrack_find(const struct nf_conntrack_tuple *tuple, |
180 | const struct nf_conn *ignored_conntrack); | 183 | const struct nf_conn *ignored_conntrack); |
@@ -183,6 +186,10 @@ extern void nf_conntrack_hash_insert(struct nf_conn *ct); | |||
183 | 186 | ||
184 | extern void nf_conntrack_flush(void); | 187 | extern void nf_conntrack_flush(void); |
185 | 188 | ||
189 | extern int nf_ct_get_tuplepr(const struct sk_buff *skb, | ||
190 | unsigned int nhoff, | ||
191 | u_int16_t l3num, | ||
192 | struct nf_conntrack_tuple *tuple); | ||
186 | extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, | 193 | extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, |
187 | const struct nf_conntrack_tuple *orig); | 194 | const struct nf_conntrack_tuple *orig); |
188 | 195 | ||
@@ -216,9 +223,6 @@ extern void nf_conntrack_tcp_update(struct sk_buff *skb, | |||
216 | struct nf_conn *conntrack, | 223 | struct nf_conn *conntrack, |
217 | int dir); | 224 | int dir); |
218 | 225 | ||
219 | /* Call me when a conntrack is destroyed. */ | ||
220 | extern void (*nf_conntrack_destroyed)(struct nf_conn *conntrack); | ||
221 | |||
222 | /* Fake conntrack entry for untracked connections */ | 226 | /* Fake conntrack entry for untracked connections */ |
223 | extern struct nf_conn nf_conntrack_untracked; | 227 | extern struct nf_conn nf_conntrack_untracked; |
224 | 228 | ||
@@ -262,60 +266,10 @@ do { \ | |||
262 | local_bh_enable(); \ | 266 | local_bh_enable(); \ |
263 | } while (0) | 267 | } while (0) |
264 | 268 | ||
265 | /* no helper, no nat */ | ||
266 | #define NF_CT_F_BASIC 0 | ||
267 | /* for helper */ | ||
268 | #define NF_CT_F_HELP 1 | ||
269 | /* for nat. */ | ||
270 | #define NF_CT_F_NAT 2 | ||
271 | #define NF_CT_F_NUM 4 | ||
272 | |||
273 | extern int | 269 | extern int |
274 | nf_conntrack_register_cache(u_int32_t features, const char *name, size_t size); | 270 | nf_conntrack_register_cache(u_int32_t features, const char *name, size_t size); |
275 | extern void | 271 | extern void |
276 | nf_conntrack_unregister_cache(u_int32_t features); | 272 | nf_conntrack_unregister_cache(u_int32_t features); |
277 | 273 | ||
278 | /* valid combinations: | ||
279 | * basic: nf_conn, nf_conn .. nf_conn_help | ||
280 | * nat: nf_conn .. nf_conn_nat, nf_conn .. nf_conn_nat .. nf_conn help | ||
281 | */ | ||
282 | #ifdef CONFIG_NF_NAT_NEEDED | ||
283 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) | ||
284 | { | ||
285 | unsigned int offset = sizeof(struct nf_conn); | ||
286 | |||
287 | if (!(ct->features & NF_CT_F_NAT)) | ||
288 | return NULL; | ||
289 | |||
290 | offset = ALIGN(offset, __alignof__(struct nf_conn_nat)); | ||
291 | return (struct nf_conn_nat *) ((void *)ct + offset); | ||
292 | } | ||
293 | |||
294 | static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) | ||
295 | { | ||
296 | unsigned int offset = sizeof(struct nf_conn); | ||
297 | |||
298 | if (!(ct->features & NF_CT_F_HELP)) | ||
299 | return NULL; | ||
300 | if (ct->features & NF_CT_F_NAT) { | ||
301 | offset = ALIGN(offset, __alignof__(struct nf_conn_nat)); | ||
302 | offset += sizeof(struct nf_conn_nat); | ||
303 | } | ||
304 | |||
305 | offset = ALIGN(offset, __alignof__(struct nf_conn_help)); | ||
306 | return (struct nf_conn_help *) ((void *)ct + offset); | ||
307 | } | ||
308 | #else /* No NAT */ | ||
309 | static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) | ||
310 | { | ||
311 | unsigned int offset = sizeof(struct nf_conn); | ||
312 | |||
313 | if (!(ct->features & NF_CT_F_HELP)) | ||
314 | return NULL; | ||
315 | |||
316 | offset = ALIGN(offset, __alignof__(struct nf_conn_help)); | ||
317 | return (struct nf_conn_help *) ((void *)ct + offset); | ||
318 | } | ||
319 | #endif /* CONFIG_NF_NAT_NEEDED */ | ||
320 | #endif /* __KERNEL__ */ | 274 | #endif /* __KERNEL__ */ |
321 | #endif /* _NF_CONNTRACK_H */ | 275 | #endif /* _NF_CONNTRACK_H */ |
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index 9fb906688ffa..4056f5f08da1 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
@@ -30,6 +30,9 @@ extern void nf_conntrack_cleanup(void); | |||
30 | extern int nf_conntrack_proto_init(void); | 30 | extern int nf_conntrack_proto_init(void); |
31 | extern void nf_conntrack_proto_fini(void); | 31 | extern void nf_conntrack_proto_fini(void); |
32 | 32 | ||
33 | extern int nf_conntrack_helper_init(void); | ||
34 | extern void nf_conntrack_helper_fini(void); | ||
35 | |||
33 | struct nf_conntrack_l3proto; | 36 | struct nf_conntrack_l3proto; |
34 | extern struct nf_conntrack_l3proto *nf_ct_find_l3proto(u_int16_t pf); | 37 | extern struct nf_conntrack_l3proto *nf_ct_find_l3proto(u_int16_t pf); |
35 | /* Like above, but you already have conntrack read lock. */ | 38 | /* Like above, but you already have conntrack read lock. */ |
@@ -55,8 +58,7 @@ nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, | |||
55 | 58 | ||
56 | /* Find a connection corresponding to a tuple. */ | 59 | /* Find a connection corresponding to a tuple. */ |
57 | extern struct nf_conntrack_tuple_hash * | 60 | extern struct nf_conntrack_tuple_hash * |
58 | nf_conntrack_find_get(const struct nf_conntrack_tuple *tuple, | 61 | nf_conntrack_find_get(const struct nf_conntrack_tuple *tuple); |
59 | const struct nf_conn *ignored_conntrack); | ||
60 | 62 | ||
61 | extern int __nf_conntrack_confirm(struct sk_buff **pskb); | 63 | extern int __nf_conntrack_confirm(struct sk_buff **pskb); |
62 | 64 | ||
@@ -81,9 +83,8 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, | |||
81 | struct nf_conntrack_l3proto *l3proto, | 83 | struct nf_conntrack_l3proto *l3proto, |
82 | struct nf_conntrack_l4proto *proto); | 84 | struct nf_conntrack_l4proto *proto); |
83 | 85 | ||
84 | extern struct list_head *nf_conntrack_hash; | 86 | extern struct hlist_head *nf_conntrack_hash; |
85 | extern struct list_head nf_conntrack_expect_list; | ||
86 | extern rwlock_t nf_conntrack_lock ; | 87 | extern rwlock_t nf_conntrack_lock ; |
87 | extern struct list_head unconfirmed; | 88 | extern struct hlist_head unconfirmed; |
88 | 89 | ||
89 | #endif /* _NF_CONNTRACK_CORE_H */ | 90 | #endif /* _NF_CONNTRACK_CORE_H */ |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index 811c9073c532..f0b9078235c9 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -49,15 +49,15 @@ static inline void nf_conntrack_event(enum ip_conntrack_events event, | |||
49 | atomic_notifier_call_chain(&nf_conntrack_chain, event, ct); | 49 | atomic_notifier_call_chain(&nf_conntrack_chain, event, ct); |
50 | } | 50 | } |
51 | 51 | ||
52 | extern struct atomic_notifier_head nf_conntrack_expect_chain; | 52 | extern struct atomic_notifier_head nf_ct_expect_chain; |
53 | extern int nf_conntrack_expect_register_notifier(struct notifier_block *nb); | 53 | extern int nf_ct_expect_register_notifier(struct notifier_block *nb); |
54 | extern int nf_conntrack_expect_unregister_notifier(struct notifier_block *nb); | 54 | extern int nf_ct_expect_unregister_notifier(struct notifier_block *nb); |
55 | 55 | ||
56 | static inline void | 56 | static inline void |
57 | nf_conntrack_expect_event(enum ip_conntrack_expect_events event, | 57 | nf_ct_expect_event(enum ip_conntrack_expect_events event, |
58 | struct nf_conntrack_expect *exp) | 58 | struct nf_conntrack_expect *exp) |
59 | { | 59 | { |
60 | atomic_notifier_call_chain(&nf_conntrack_expect_chain, event, exp); | 60 | atomic_notifier_call_chain(&nf_ct_expect_chain, event, exp); |
61 | } | 61 | } |
62 | 62 | ||
63 | #else /* CONFIG_NF_CONNTRACK_EVENTS */ | 63 | #else /* CONFIG_NF_CONNTRACK_EVENTS */ |
@@ -67,9 +67,8 @@ static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, | |||
67 | static inline void nf_conntrack_event(enum ip_conntrack_events event, | 67 | static inline void nf_conntrack_event(enum ip_conntrack_events event, |
68 | struct nf_conn *ct) {} | 68 | struct nf_conn *ct) {} |
69 | static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {} | 69 | static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {} |
70 | static inline void | 70 | static inline void nf_ct_expect_event(enum ip_conntrack_expect_events event, |
71 | nf_conntrack_expect_event(enum ip_conntrack_expect_events event, | 71 | struct nf_conntrack_expect *exp) {} |
72 | struct nf_conntrack_expect *exp) {} | ||
73 | static inline void nf_ct_event_cache_flush(void) {} | 72 | static inline void nf_ct_event_cache_flush(void) {} |
74 | #endif /* CONFIG_NF_CONNTRACK_EVENTS */ | 73 | #endif /* CONFIG_NF_CONNTRACK_EVENTS */ |
75 | 74 | ||
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index 173c7c1eff23..cae1a0dce365 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -6,17 +6,21 @@ | |||
6 | #define _NF_CONNTRACK_EXPECT_H | 6 | #define _NF_CONNTRACK_EXPECT_H |
7 | #include <net/netfilter/nf_conntrack.h> | 7 | #include <net/netfilter/nf_conntrack.h> |
8 | 8 | ||
9 | extern struct list_head nf_conntrack_expect_list; | 9 | extern struct hlist_head *nf_ct_expect_hash; |
10 | extern struct kmem_cache *nf_conntrack_expect_cachep; | 10 | extern unsigned int nf_ct_expect_hsize; |
11 | extern const struct file_operations exp_file_ops; | 11 | extern unsigned int nf_ct_expect_max; |
12 | 12 | ||
13 | struct nf_conntrack_expect | 13 | struct nf_conntrack_expect |
14 | { | 14 | { |
15 | /* Internal linked list (global expectation list) */ | 15 | /* Conntrack expectation list member */ |
16 | struct list_head list; | 16 | struct hlist_node lnode; |
17 | |||
18 | /* Hash member */ | ||
19 | struct hlist_node hnode; | ||
17 | 20 | ||
18 | /* We expect this tuple, with the following mask */ | 21 | /* We expect this tuple, with the following mask */ |
19 | struct nf_conntrack_tuple tuple, mask; | 22 | struct nf_conntrack_tuple tuple; |
23 | struct nf_conntrack_tuple_mask mask; | ||
20 | 24 | ||
21 | /* Function to call after setup and insertion */ | 25 | /* Function to call after setup and insertion */ |
22 | void (*expectfn)(struct nf_conn *new, | 26 | void (*expectfn)(struct nf_conn *new, |
@@ -52,29 +56,31 @@ struct nf_conntrack_expect | |||
52 | 56 | ||
53 | #define NF_CT_EXPECT_PERMANENT 0x1 | 57 | #define NF_CT_EXPECT_PERMANENT 0x1 |
54 | 58 | ||
59 | int nf_conntrack_expect_init(void); | ||
60 | void nf_conntrack_expect_fini(void); | ||
55 | 61 | ||
56 | struct nf_conntrack_expect * | 62 | struct nf_conntrack_expect * |
57 | __nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple); | 63 | __nf_ct_expect_find(const struct nf_conntrack_tuple *tuple); |
58 | 64 | ||
59 | struct nf_conntrack_expect * | 65 | struct nf_conntrack_expect * |
60 | nf_conntrack_expect_find_get(const struct nf_conntrack_tuple *tuple); | 66 | nf_ct_expect_find_get(const struct nf_conntrack_tuple *tuple); |
61 | 67 | ||
62 | struct nf_conntrack_expect * | 68 | struct nf_conntrack_expect * |
63 | find_expectation(const struct nf_conntrack_tuple *tuple); | 69 | nf_ct_find_expectation(const struct nf_conntrack_tuple *tuple); |
64 | 70 | ||
65 | void nf_ct_unlink_expect(struct nf_conntrack_expect *exp); | 71 | void nf_ct_unlink_expect(struct nf_conntrack_expect *exp); |
66 | void nf_ct_remove_expectations(struct nf_conn *ct); | 72 | void nf_ct_remove_expectations(struct nf_conn *ct); |
67 | void nf_conntrack_unexpect_related(struct nf_conntrack_expect *exp); | 73 | void nf_ct_unexpect_related(struct nf_conntrack_expect *exp); |
68 | 74 | ||
69 | /* Allocate space for an expectation: this is mandatory before calling | 75 | /* Allocate space for an expectation: this is mandatory before calling |
70 | nf_conntrack_expect_related. You will have to call put afterwards. */ | 76 | nf_ct_expect_related. You will have to call put afterwards. */ |
71 | struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me); | 77 | struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me); |
72 | void nf_conntrack_expect_init(struct nf_conntrack_expect *, int, | 78 | void nf_ct_expect_init(struct nf_conntrack_expect *, int, |
73 | union nf_conntrack_address *, | 79 | union nf_conntrack_address *, |
74 | union nf_conntrack_address *, | 80 | union nf_conntrack_address *, |
75 | u_int8_t, __be16 *, __be16 *); | 81 | u_int8_t, __be16 *, __be16 *); |
76 | void nf_conntrack_expect_put(struct nf_conntrack_expect *exp); | 82 | void nf_ct_expect_put(struct nf_conntrack_expect *exp); |
77 | int nf_conntrack_expect_related(struct nf_conntrack_expect *expect); | 83 | int nf_ct_expect_related(struct nf_conntrack_expect *expect); |
78 | 84 | ||
79 | #endif /*_NF_CONNTRACK_EXPECT_H*/ | 85 | #endif /*_NF_CONNTRACK_EXPECT_H*/ |
80 | 86 | ||
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h new file mode 100644 index 000000000000..73b5711faf32 --- /dev/null +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -0,0 +1,85 @@ | |||
1 | #ifndef _NF_CONNTRACK_EXTEND_H | ||
2 | #define _NF_CONNTRACK_EXTEND_H | ||
3 | |||
4 | #include <net/netfilter/nf_conntrack.h> | ||
5 | |||
6 | enum nf_ct_ext_id | ||
7 | { | ||
8 | NF_CT_EXT_HELPER, | ||
9 | NF_CT_EXT_NAT, | ||
10 | NF_CT_EXT_NUM, | ||
11 | }; | ||
12 | |||
13 | #define NF_CT_EXT_HELPER_TYPE struct nf_conn_help | ||
14 | #define NF_CT_EXT_NAT_TYPE struct nf_conn_nat | ||
15 | |||
16 | /* Extensions: optional stuff which isn't permanently in struct. */ | ||
17 | struct nf_ct_ext { | ||
18 | u8 offset[NF_CT_EXT_NUM]; | ||
19 | u8 len; | ||
20 | u8 real_len; | ||
21 | char data[0]; | ||
22 | }; | ||
23 | |||
24 | static inline int nf_ct_ext_exist(const struct nf_conn *ct, u8 id) | ||
25 | { | ||
26 | return (ct->ext && ct->ext->offset[id]); | ||
27 | } | ||
28 | |||
29 | static inline void *__nf_ct_ext_find(const struct nf_conn *ct, u8 id) | ||
30 | { | ||
31 | if (!nf_ct_ext_exist(ct, id)) | ||
32 | return NULL; | ||
33 | |||
34 | return (void *)ct->ext + ct->ext->offset[id]; | ||
35 | } | ||
36 | #define nf_ct_ext_find(ext, id) \ | ||
37 | ((id##_TYPE *)__nf_ct_ext_find((ext), (id))) | ||
38 | |||
39 | /* Destroy all relationships */ | ||
40 | extern void __nf_ct_ext_destroy(struct nf_conn *ct); | ||
41 | static inline void nf_ct_ext_destroy(struct nf_conn *ct) | ||
42 | { | ||
43 | if (ct->ext) | ||
44 | __nf_ct_ext_destroy(ct); | ||
45 | } | ||
46 | |||
47 | /* Free operation. If you want to free a object referred from private area, | ||
48 | * please implement __nf_ct_ext_free() and call it. | ||
49 | */ | ||
50 | static inline void nf_ct_ext_free(struct nf_conn *ct) | ||
51 | { | ||
52 | if (ct->ext) | ||
53 | kfree(ct->ext); | ||
54 | } | ||
55 | |||
56 | /* Add this type, returns pointer to data or NULL. */ | ||
57 | void * | ||
58 | __nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp); | ||
59 | #define nf_ct_ext_add(ct, id, gfp) \ | ||
60 | ((id##_TYPE *)__nf_ct_ext_add((ct), (id), (gfp))) | ||
61 | |||
62 | #define NF_CT_EXT_F_PREALLOC 0x0001 | ||
63 | |||
64 | struct nf_ct_ext_type | ||
65 | { | ||
66 | /* Destroys relationships (can be NULL). */ | ||
67 | void (*destroy)(struct nf_conn *ct); | ||
68 | /* Called when realloacted (can be NULL). | ||
69 | Contents has already been moved. */ | ||
70 | void (*move)(struct nf_conn *ct, void *old); | ||
71 | |||
72 | enum nf_ct_ext_id id; | ||
73 | |||
74 | unsigned int flags; | ||
75 | |||
76 | /* Length and min alignment. */ | ||
77 | u8 len; | ||
78 | u8 align; | ||
79 | /* initial size of nf_ct_ext. */ | ||
80 | u8 alloc_size; | ||
81 | }; | ||
82 | |||
83 | int nf_ct_extend_register(struct nf_ct_ext_type *type); | ||
84 | void nf_ct_extend_unregister(struct nf_ct_ext_type *type); | ||
85 | #endif /* _NF_CONNTRACK_EXTEND_H */ | ||
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index 8c72ac9f0ab8..d04f99964d94 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
@@ -10,12 +10,13 @@ | |||
10 | #ifndef _NF_CONNTRACK_HELPER_H | 10 | #ifndef _NF_CONNTRACK_HELPER_H |
11 | #define _NF_CONNTRACK_HELPER_H | 11 | #define _NF_CONNTRACK_HELPER_H |
12 | #include <net/netfilter/nf_conntrack.h> | 12 | #include <net/netfilter/nf_conntrack.h> |
13 | #include <net/netfilter/nf_conntrack_extend.h> | ||
13 | 14 | ||
14 | struct module; | 15 | struct module; |
15 | 16 | ||
16 | struct nf_conntrack_helper | 17 | struct nf_conntrack_helper |
17 | { | 18 | { |
18 | struct list_head list; /* Internal use. */ | 19 | struct hlist_node hnode; /* Internal use. */ |
19 | 20 | ||
20 | const char *name; /* name of the module */ | 21 | const char *name; /* name of the module */ |
21 | struct module *me; /* pointer to self */ | 22 | struct module *me; /* pointer to self */ |
@@ -23,10 +24,9 @@ struct nf_conntrack_helper | |||
23 | * expected connections */ | 24 | * expected connections */ |
24 | unsigned int timeout; /* timeout for expecteds */ | 25 | unsigned int timeout; /* timeout for expecteds */ |
25 | 26 | ||
26 | /* Mask of things we will help (compared against server response) */ | 27 | /* Tuple of things we will help (compared against server response) */ |
27 | struct nf_conntrack_tuple tuple; | 28 | struct nf_conntrack_tuple tuple; |
28 | struct nf_conntrack_tuple mask; | 29 | |
29 | |||
30 | /* Function to call when data passes; return verdict, or -1 to | 30 | /* Function to call when data passes; return verdict, or -1 to |
31 | invalidate. */ | 31 | invalidate. */ |
32 | int (*help)(struct sk_buff **pskb, | 32 | int (*help)(struct sk_buff **pskb, |
@@ -52,4 +52,10 @@ extern void nf_ct_helper_put(struct nf_conntrack_helper *helper); | |||
52 | extern int nf_conntrack_helper_register(struct nf_conntrack_helper *); | 52 | extern int nf_conntrack_helper_register(struct nf_conntrack_helper *); |
53 | extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *); | 53 | extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *); |
54 | 54 | ||
55 | extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp); | ||
56 | |||
57 | static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) | ||
58 | { | ||
59 | return nf_ct_ext_find(ct, NF_CT_EXT_HELPER); | ||
60 | } | ||
55 | #endif /*_NF_CONNTRACK_HELPER_H*/ | 61 | #endif /*_NF_CONNTRACK_HELPER_H*/ |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 96a58d8e1d3f..3c58a2c4df28 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -58,13 +58,11 @@ struct nf_conntrack_l3proto | |||
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Called before tracking. | 60 | * Called before tracking. |
61 | * *dataoff: offset of protocol header (TCP, UDP,...) in *pskb | 61 | * *dataoff: offset of protocol header (TCP, UDP,...) in skb |
62 | * *protonum: protocol number | 62 | * *protonum: protocol number |
63 | */ | 63 | */ |
64 | int (*prepare)(struct sk_buff **pskb, unsigned int hooknum, | 64 | int (*get_l4proto)(const struct sk_buff *skb, unsigned int nhoff, |
65 | unsigned int *dataoff, u_int8_t *protonum); | 65 | unsigned int *dataoff, u_int8_t *protonum); |
66 | |||
67 | u_int32_t (*get_features)(const struct nf_conntrack_tuple *tuple); | ||
68 | 66 | ||
69 | int (*tuple_to_nfattr)(struct sk_buff *skb, | 67 | int (*tuple_to_nfattr)(struct sk_buff *skb, |
70 | const struct nf_conntrack_tuple *t); | 68 | const struct nf_conntrack_tuple *t); |
@@ -91,8 +89,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto); | |||
91 | extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); | 89 | extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); |
92 | 90 | ||
93 | /* Existing built-in protocols */ | 91 | /* Existing built-in protocols */ |
94 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | ||
95 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | ||
96 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic; | 92 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic; |
97 | 93 | ||
98 | static inline struct nf_conntrack_l3proto * | 94 | static inline struct nf_conntrack_l3proto * |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index 5d72b16e876f..040dae5f0c9e 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -100,6 +100,14 @@ struct nf_conntrack_tuple | |||
100 | } dst; | 100 | } dst; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | struct nf_conntrack_tuple_mask | ||
104 | { | ||
105 | struct { | ||
106 | union nf_conntrack_address u3; | ||
107 | union nf_conntrack_man_proto u; | ||
108 | } src; | ||
109 | }; | ||
110 | |||
103 | /* This is optimized opposed to a memset of the whole structure. Everything we | 111 | /* This is optimized opposed to a memset of the whole structure. Everything we |
104 | * really care about is the source/destination unions */ | 112 | * really care about is the source/destination unions */ |
105 | #define NF_CT_TUPLE_U_BLANK(tuple) \ | 113 | #define NF_CT_TUPLE_U_BLANK(tuple) \ |
@@ -112,11 +120,11 @@ struct nf_conntrack_tuple | |||
112 | 120 | ||
113 | #ifdef __KERNEL__ | 121 | #ifdef __KERNEL__ |
114 | 122 | ||
115 | #define NF_CT_DUMP_TUPLE(tp) \ | 123 | #define NF_CT_DUMP_TUPLE(tp) \ |
116 | DEBUGP("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", \ | 124 | pr_debug("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", \ |
117 | (tp), (tp)->src.l3num, (tp)->dst.protonum, \ | 125 | (tp), (tp)->src.l3num, (tp)->dst.protonum, \ |
118 | NIP6(*(struct in6_addr *)(tp)->src.u3.all), ntohs((tp)->src.u.all), \ | 126 | NIP6(*(struct in6_addr *)(tp)->src.u3.all), ntohs((tp)->src.u.all), \ |
119 | NIP6(*(struct in6_addr *)(tp)->dst.u3.all), ntohs((tp)->dst.u.all)) | 127 | NIP6(*(struct in6_addr *)(tp)->dst.u3.all), ntohs((tp)->dst.u.all)) |
120 | 128 | ||
121 | /* If we're the first tuple, it's the original dir. */ | 129 | /* If we're the first tuple, it's the original dir. */ |
122 | #define NF_CT_DIRECTION(h) \ | 130 | #define NF_CT_DIRECTION(h) \ |
@@ -125,8 +133,7 @@ DEBUGP("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", \ | |||
125 | /* Connections have two entries in the hash table: one for each way */ | 133 | /* Connections have two entries in the hash table: one for each way */ |
126 | struct nf_conntrack_tuple_hash | 134 | struct nf_conntrack_tuple_hash |
127 | { | 135 | { |
128 | struct list_head list; | 136 | struct hlist_node hnode; |
129 | |||
130 | struct nf_conntrack_tuple tuple; | 137 | struct nf_conntrack_tuple tuple; |
131 | }; | 138 | }; |
132 | 139 | ||
@@ -162,31 +169,44 @@ static inline int nf_ct_tuple_equal(const struct nf_conntrack_tuple *t1, | |||
162 | return nf_ct_tuple_src_equal(t1, t2) && nf_ct_tuple_dst_equal(t1, t2); | 169 | return nf_ct_tuple_src_equal(t1, t2) && nf_ct_tuple_dst_equal(t1, t2); |
163 | } | 170 | } |
164 | 171 | ||
172 | static inline int nf_ct_tuple_mask_equal(const struct nf_conntrack_tuple_mask *m1, | ||
173 | const struct nf_conntrack_tuple_mask *m2) | ||
174 | { | ||
175 | return (m1->src.u3.all[0] == m2->src.u3.all[0] && | ||
176 | m1->src.u3.all[1] == m2->src.u3.all[1] && | ||
177 | m1->src.u3.all[2] == m2->src.u3.all[2] && | ||
178 | m1->src.u3.all[3] == m2->src.u3.all[3] && | ||
179 | m1->src.u.all == m2->src.u.all); | ||
180 | } | ||
181 | |||
182 | static inline int nf_ct_tuple_src_mask_cmp(const struct nf_conntrack_tuple *t1, | ||
183 | const struct nf_conntrack_tuple *t2, | ||
184 | const struct nf_conntrack_tuple_mask *mask) | ||
185 | { | ||
186 | int count; | ||
187 | |||
188 | for (count = 0; count < NF_CT_TUPLE_L3SIZE; count++) { | ||
189 | if ((t1->src.u3.all[count] ^ t2->src.u3.all[count]) & | ||
190 | mask->src.u3.all[count]) | ||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | if ((t1->src.u.all ^ t2->src.u.all) & mask->src.u.all) | ||
195 | return 0; | ||
196 | |||
197 | if (t1->src.l3num != t2->src.l3num || | ||
198 | t1->dst.protonum != t2->dst.protonum) | ||
199 | return 0; | ||
200 | |||
201 | return 1; | ||
202 | } | ||
203 | |||
165 | static inline int nf_ct_tuple_mask_cmp(const struct nf_conntrack_tuple *t, | 204 | static inline int nf_ct_tuple_mask_cmp(const struct nf_conntrack_tuple *t, |
166 | const struct nf_conntrack_tuple *tuple, | 205 | const struct nf_conntrack_tuple *tuple, |
167 | const struct nf_conntrack_tuple *mask) | 206 | const struct nf_conntrack_tuple_mask *mask) |
168 | { | 207 | { |
169 | int count = 0; | 208 | return nf_ct_tuple_src_mask_cmp(t, tuple, mask) && |
170 | 209 | nf_ct_tuple_dst_equal(t, tuple); | |
171 | for (count = 0; count < NF_CT_TUPLE_L3SIZE; count++){ | ||
172 | if ((t->src.u3.all[count] ^ tuple->src.u3.all[count]) & | ||
173 | mask->src.u3.all[count]) | ||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | for (count = 0; count < NF_CT_TUPLE_L3SIZE; count++){ | ||
178 | if ((t->dst.u3.all[count] ^ tuple->dst.u3.all[count]) & | ||
179 | mask->dst.u3.all[count]) | ||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | if ((t->src.u.all ^ tuple->src.u.all) & mask->src.u.all || | ||
184 | (t->dst.u.all ^ tuple->dst.u.all) & mask->dst.u.all || | ||
185 | (t->src.l3num ^ tuple->src.l3num) & mask->src.l3num || | ||
186 | (t->dst.protonum ^ tuple->dst.protonum) & mask->dst.protonum) | ||
187 | return 0; | ||
188 | |||
189 | return 1; | ||
190 | } | 210 | } |
191 | 211 | ||
192 | #endif /* _NF_CONNTRACK_TUPLE_H */ | 212 | #endif /* _NF_CONNTRACK_TUPLE_H */ |
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index bc57dd7b9b5c..6ae52f7c9f55 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -51,16 +51,31 @@ struct nf_nat_multi_range_compat | |||
51 | 51 | ||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | #include <linux/list.h> | 53 | #include <linux/list.h> |
54 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
55 | #include <net/netfilter/nf_conntrack_extend.h> | ||
54 | 56 | ||
55 | /* The structure embedded in the conntrack structure. */ | 57 | /* per conntrack: nat application helper private data */ |
56 | struct nf_nat_info | 58 | union nf_conntrack_nat_help |
57 | { | 59 | { |
58 | struct list_head bysource; | 60 | /* insert nat helper private data here */ |
59 | struct nf_nat_seq seq[IP_CT_DIR_MAX]; | 61 | struct nf_nat_pptp nat_pptp_info; |
60 | }; | 62 | }; |
61 | 63 | ||
62 | struct nf_conn; | 64 | struct nf_conn; |
63 | 65 | ||
66 | /* The structure embedded in the conntrack structure. */ | ||
67 | struct nf_conn_nat | ||
68 | { | ||
69 | struct hlist_node bysource; | ||
70 | struct nf_nat_seq seq[IP_CT_DIR_MAX]; | ||
71 | struct nf_conn *ct; | ||
72 | union nf_conntrack_nat_help help; | ||
73 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
74 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | ||
75 | int masq_index; | ||
76 | #endif | ||
77 | }; | ||
78 | |||
64 | /* Set up the info structure to map into this range. */ | 79 | /* Set up the info structure to map into this range. */ |
65 | extern unsigned int nf_nat_setup_info(struct nf_conn *ct, | 80 | extern unsigned int nf_nat_setup_info(struct nf_conn *ct, |
66 | const struct nf_nat_range *range, | 81 | const struct nf_nat_range *range, |
@@ -70,7 +85,10 @@ extern unsigned int nf_nat_setup_info(struct nf_conn *ct, | |||
70 | extern int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple, | 85 | extern int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple, |
71 | const struct nf_conn *ignored_conntrack); | 86 | const struct nf_conn *ignored_conntrack); |
72 | 87 | ||
73 | extern int nf_nat_module_is_loaded; | 88 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) |
89 | { | ||
90 | return nf_ct_ext_find(ct, NF_CT_EXT_NAT); | ||
91 | } | ||
74 | 92 | ||
75 | #else /* !__KERNEL__: iptables wants this to compile. */ | 93 | #else /* !__KERNEL__: iptables wants this to compile. */ |
76 | #define nf_nat_multi_range nf_nat_multi_range_compat | 94 | #define nf_nat_multi_range nf_nat_multi_range_compat |
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index 9778ffa93440..c3cd127ba4bb 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _NF_NAT_CORE_H | 2 | #define _NF_NAT_CORE_H |
3 | #include <linux/list.h> | 3 | #include <linux/list.h> |
4 | #include <net/netfilter/nf_conntrack.h> | 4 | #include <net/netfilter/nf_conntrack.h> |
5 | #include <net/netfilter/nf_nat.h> | ||
5 | 6 | ||
6 | /* This header used to share core functionality between the standalone | 7 | /* This header used to share core functionality between the standalone |
7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ | 8 | NAT module, and the compatibility layer's use of NAT for masquerading. */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 7b510a9edb91..d7b824be5422 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -118,6 +118,9 @@ | |||
118 | * Nested Attributes Construction: | 118 | * Nested Attributes Construction: |
119 | * nla_nest_start(skb, type) start a nested attribute | 119 | * nla_nest_start(skb, type) start a nested attribute |
120 | * nla_nest_end(skb, nla) finalize a nested attribute | 120 | * nla_nest_end(skb, nla) finalize a nested attribute |
121 | * nla_nest_compat_start(skb, type, start a nested compat attribute | ||
122 | * len, data) | ||
123 | * nla_nest_compat_end(skb, type) finalize a nested compat attribute | ||
121 | * nla_nest_cancel(skb, nla) cancel nested attribute construction | 124 | * nla_nest_cancel(skb, nla) cancel nested attribute construction |
122 | * | 125 | * |
123 | * Attribute Length Calculations: | 126 | * Attribute Length Calculations: |
@@ -152,6 +155,7 @@ | |||
152 | * nla_find_nested() find attribute in nested attributes | 155 | * nla_find_nested() find attribute in nested attributes |
153 | * nla_parse() parse and validate stream of attrs | 156 | * nla_parse() parse and validate stream of attrs |
154 | * nla_parse_nested() parse nested attribuets | 157 | * nla_parse_nested() parse nested attribuets |
158 | * nla_parse_nested_compat() parse nested compat attributes | ||
155 | * nla_for_each_attr() loop over all attributes | 159 | * nla_for_each_attr() loop over all attributes |
156 | * nla_for_each_nested() loop over the nested attributes | 160 | * nla_for_each_nested() loop over the nested attributes |
157 | *========================================================================= | 161 | *========================================================================= |
@@ -170,6 +174,7 @@ enum { | |||
170 | NLA_FLAG, | 174 | NLA_FLAG, |
171 | NLA_MSECS, | 175 | NLA_MSECS, |
172 | NLA_NESTED, | 176 | NLA_NESTED, |
177 | NLA_NESTED_COMPAT, | ||
173 | NLA_NUL_STRING, | 178 | NLA_NUL_STRING, |
174 | NLA_BINARY, | 179 | NLA_BINARY, |
175 | __NLA_TYPE_MAX, | 180 | __NLA_TYPE_MAX, |
@@ -190,6 +195,7 @@ enum { | |||
190 | * NLA_NUL_STRING Maximum length of string (excluding NUL) | 195 | * NLA_NUL_STRING Maximum length of string (excluding NUL) |
191 | * NLA_FLAG Unused | 196 | * NLA_FLAG Unused |
192 | * NLA_BINARY Maximum length of attribute payload | 197 | * NLA_BINARY Maximum length of attribute payload |
198 | * NLA_NESTED_COMPAT Exact length of structure payload | ||
193 | * All other Exact length of attribute payload | 199 | * All other Exact length of attribute payload |
194 | * | 200 | * |
195 | * Example: | 201 | * Example: |
@@ -733,6 +739,39 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype, | |||
733 | { | 739 | { |
734 | return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); | 740 | return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); |
735 | } | 741 | } |
742 | |||
743 | /** | ||
744 | * nla_parse_nested_compat - parse nested compat attributes | ||
745 | * @tb: destination array with maxtype+1 elements | ||
746 | * @maxtype: maximum attribute type to be expected | ||
747 | * @nla: attribute containing the nested attributes | ||
748 | * @data: pointer to point to contained structure | ||
749 | * @len: length of contained structure | ||
750 | * @policy: validation policy | ||
751 | * | ||
752 | * Parse a nested compat attribute. The compat attribute contains a structure | ||
753 | * and optionally a set of nested attributes. On success the data pointer | ||
754 | * points to the nested data and tb contains the parsed attributes | ||
755 | * (see nla_parse). | ||
756 | */ | ||
757 | static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | ||
758 | struct nlattr *nla, | ||
759 | const struct nla_policy *policy, | ||
760 | int len) | ||
761 | { | ||
762 | if (nla_len(nla) < len) | ||
763 | return -1; | ||
764 | if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) | ||
765 | return nla_parse_nested(tb, maxtype, | ||
766 | nla_data(nla) + NLA_ALIGN(len), | ||
767 | policy); | ||
768 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); | ||
769 | return 0; | ||
770 | } | ||
771 | |||
772 | #define nla_parse_nested_compat(tb, maxtype, nla, policy, data, len) \ | ||
773 | ({ data = nla_len(nla) >= len ? nla_data(nla) : NULL; \ | ||
774 | __nla_parse_nested_compat(tb, maxtype, nla, policy, len); }) | ||
736 | /** | 775 | /** |
737 | * nla_put_u8 - Add a u16 netlink attribute to a socket buffer | 776 | * nla_put_u8 - Add a u16 netlink attribute to a socket buffer |
738 | * @skb: socket buffer to add attribute to | 777 | * @skb: socket buffer to add attribute to |
@@ -965,6 +1004,51 @@ static inline int nla_nest_end(struct sk_buff *skb, struct nlattr *start) | |||
965 | } | 1004 | } |
966 | 1005 | ||
967 | /** | 1006 | /** |
1007 | * nla_nest_compat_start - Start a new level of nested compat attributes | ||
1008 | * @skb: socket buffer to add attributes to | ||
1009 | * @attrtype: attribute type of container | ||
1010 | * @attrlen: length of structure | ||
1011 | * @data: pointer to structure | ||
1012 | * | ||
1013 | * Start a nested compat attribute that contains both a structure and | ||
1014 | * a set of nested attributes. | ||
1015 | * | ||
1016 | * Returns the container attribute | ||
1017 | */ | ||
1018 | static inline struct nlattr *nla_nest_compat_start(struct sk_buff *skb, | ||
1019 | int attrtype, int attrlen, | ||
1020 | const void *data) | ||
1021 | { | ||
1022 | struct nlattr *start = (struct nlattr *)skb_tail_pointer(skb); | ||
1023 | |||
1024 | if (nla_put(skb, attrtype, attrlen, data) < 0) | ||
1025 | return NULL; | ||
1026 | if (nla_nest_start(skb, attrtype) == NULL) { | ||
1027 | nlmsg_trim(skb, start); | ||
1028 | return NULL; | ||
1029 | } | ||
1030 | return start; | ||
1031 | } | ||
1032 | |||
1033 | /** | ||
1034 | * nla_nest_compat_end - Finalize nesting of compat attributes | ||
1035 | * @skb: socket buffer the attribtues are stored in | ||
1036 | * @start: container attribute | ||
1037 | * | ||
1038 | * Corrects the container attribute header to include the all | ||
1039 | * appeneded attributes. | ||
1040 | * | ||
1041 | * Returns the total data length of the skb. | ||
1042 | */ | ||
1043 | static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | ||
1044 | { | ||
1045 | struct nlattr *nest = (void *)start + NLMSG_ALIGN(start->nla_len); | ||
1046 | |||
1047 | start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start; | ||
1048 | return nla_nest_end(skb, nest); | ||
1049 | } | ||
1050 | |||
1051 | /** | ||
968 | * nla_nest_cancel - Cancel nesting of attributes | 1052 | * nla_nest_cancel - Cancel nesting of attributes |
969 | * @skb: socket buffer the message is stored in | 1053 | * @skb: socket buffer the message is stored in |
970 | * @start: container attribute | 1054 | * @start: container attribute |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 4129df708079..7968b1d66369 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -65,8 +65,6 @@ struct tcf_exts | |||
65 | { | 65 | { |
66 | #ifdef CONFIG_NET_CLS_ACT | 66 | #ifdef CONFIG_NET_CLS_ACT |
67 | struct tc_action *action; | 67 | struct tc_action *action; |
68 | #elif defined CONFIG_NET_CLS_POLICE | ||
69 | struct tcf_police *police; | ||
70 | #endif | 68 | #endif |
71 | }; | 69 | }; |
72 | 70 | ||
@@ -91,8 +89,6 @@ tcf_exts_is_predicative(struct tcf_exts *exts) | |||
91 | { | 89 | { |
92 | #ifdef CONFIG_NET_CLS_ACT | 90 | #ifdef CONFIG_NET_CLS_ACT |
93 | return !!exts->action; | 91 | return !!exts->action; |
94 | #elif defined CONFIG_NET_CLS_POLICE | ||
95 | return !!exts->police; | ||
96 | #else | 92 | #else |
97 | return 0; | 93 | return 0; |
98 | #endif | 94 | #endif |
@@ -129,11 +125,7 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts, | |||
129 | #ifdef CONFIG_NET_CLS_ACT | 125 | #ifdef CONFIG_NET_CLS_ACT |
130 | if (exts->action) | 126 | if (exts->action) |
131 | return tcf_action_exec(skb, exts->action, res); | 127 | return tcf_action_exec(skb, exts->action, res); |
132 | #elif defined CONFIG_NET_CLS_POLICE | ||
133 | if (exts->police) | ||
134 | return tcf_police(skb, exts->police); | ||
135 | #endif | 128 | #endif |
136 | |||
137 | return 0; | 129 | return 0; |
138 | } | 130 | } |
139 | 131 | ||
@@ -306,6 +298,8 @@ static inline int tcf_em_tree_match(struct sk_buff *skb, | |||
306 | return 1; | 298 | return 1; |
307 | } | 299 | } |
308 | 300 | ||
301 | #define MODULE_ALIAS_TCF_EMATCH(kind) MODULE_ALIAS("ematch-kind-" __stringify(kind)) | ||
302 | |||
309 | #else /* CONFIG_NET_EMATCH */ | 303 | #else /* CONFIG_NET_EMATCH */ |
310 | 304 | ||
311 | struct tcf_ematch_tree | 305 | struct tcf_ematch_tree |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 5754d53d9efc..9e22526e80e7 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -89,8 +89,10 @@ static inline void qdisc_run(struct net_device *dev) | |||
89 | __qdisc_run(dev); | 89 | __qdisc_run(dev); |
90 | } | 90 | } |
91 | 91 | ||
92 | extern int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp, | ||
93 | struct tcf_result *res); | ||
92 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, | 94 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, |
93 | struct tcf_result *res); | 95 | struct tcf_result *res); |
94 | 96 | ||
95 | /* Calculate maximal size of packet seen by hard_start_xmit | 97 | /* Calculate maximal size of packet seen by hard_start_xmit |
96 | routine of this device. | 98 | routine of this device. |
diff --git a/include/net/rawv6.h b/include/net/rawv6.h index af8960878ef4..a5819891d525 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <net/protocol.h> | ||
7 | |||
6 | #define RAWV6_HTABLE_SIZE MAX_INET_PROTOS | 8 | #define RAWV6_HTABLE_SIZE MAX_INET_PROTOS |
7 | extern struct hlist_head raw_v6_htable[RAWV6_HTABLE_SIZE]; | 9 | extern struct hlist_head raw_v6_htable[RAWV6_HTABLE_SIZE]; |
8 | extern rwlock_t raw_v6_lock; | 10 | extern rwlock_t raw_v6_lock; |
@@ -23,6 +25,13 @@ extern void rawv6_err(struct sock *sk, | |||
23 | int type, int code, | 25 | int type, int code, |
24 | int offset, __be32 info); | 26 | int offset, __be32 info); |
25 | 27 | ||
28 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | ||
29 | int rawv6_mh_filter_register(int (*filter)(struct sock *sock, | ||
30 | struct sk_buff *skb)); | ||
31 | int rawv6_mh_filter_unregister(int (*filter)(struct sock *sock, | ||
32 | struct sk_buff *skb)); | ||
33 | #endif | ||
34 | |||
26 | #endif | 35 | #endif |
27 | 36 | ||
28 | #endif | 37 | #endif |
diff --git a/include/net/route.h b/include/net/route.h index 749e4dfe5ff3..f7ce6259f86f 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -62,7 +62,6 @@ struct rtable | |||
62 | 62 | ||
63 | unsigned rt_flags; | 63 | unsigned rt_flags; |
64 | __u16 rt_type; | 64 | __u16 rt_type; |
65 | __u16 rt_multipath_alg; | ||
66 | 65 | ||
67 | __be32 rt_dst; /* Path destination */ | 66 | __be32 rt_dst; /* Path destination */ |
68 | __be32 rt_src; /* Path source */ | 67 | __be32 rt_src; /* Path source */ |
@@ -136,7 +135,7 @@ static inline void ip_rt_put(struct rtable * rt) | |||
136 | 135 | ||
137 | #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) | 136 | #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) |
138 | 137 | ||
139 | extern __u8 ip_tos2prio[16]; | 138 | extern const __u8 ip_tos2prio[16]; |
140 | 139 | ||
141 | static inline char rt_tos2priority(u8 tos) | 140 | static inline char rt_tos2priority(u8 tos) |
142 | { | 141 | { |
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 3b3d4745618d..3861c05cdf0f 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -22,4 +22,62 @@ static inline int rtnl_msg_family(struct nlmsghdr *nlh) | |||
22 | return AF_UNSPEC; | 22 | return AF_UNSPEC; |
23 | } | 23 | } |
24 | 24 | ||
25 | /** | ||
26 | * struct rtnl_link_ops - rtnetlink link operations | ||
27 | * | ||
28 | * @list: Used internally | ||
29 | * @kind: Identifier | ||
30 | * @maxtype: Highest device specific netlink attribute number | ||
31 | * @policy: Netlink policy for device specific attribute validation | ||
32 | * @validate: Optional validation function for netlink/changelink parameters | ||
33 | * @priv_size: sizeof net_device private space | ||
34 | * @setup: net_device setup function | ||
35 | * @newlink: Function for configuring and registering a new device | ||
36 | * @changelink: Function for changing parameters of an existing device | ||
37 | * @dellink: Function to remove a device | ||
38 | * @get_size: Function to calculate required room for dumping device | ||
39 | * specific netlink attributes | ||
40 | * @fill_info: Function to dump device specific netlink attributes | ||
41 | * @get_xstats_size: Function to calculate required room for dumping devic | ||
42 | * specific statistics | ||
43 | * @fill_xstats: Function to dump device specific statistics | ||
44 | */ | ||
45 | struct rtnl_link_ops { | ||
46 | struct list_head list; | ||
47 | |||
48 | const char *kind; | ||
49 | |||
50 | size_t priv_size; | ||
51 | void (*setup)(struct net_device *dev); | ||
52 | |||
53 | int maxtype; | ||
54 | const struct nla_policy *policy; | ||
55 | int (*validate)(struct nlattr *tb[], | ||
56 | struct nlattr *data[]); | ||
57 | |||
58 | int (*newlink)(struct net_device *dev, | ||
59 | struct nlattr *tb[], | ||
60 | struct nlattr *data[]); | ||
61 | int (*changelink)(struct net_device *dev, | ||
62 | struct nlattr *tb[], | ||
63 | struct nlattr *data[]); | ||
64 | void (*dellink)(struct net_device *dev); | ||
65 | |||
66 | size_t (*get_size)(const struct net_device *dev); | ||
67 | int (*fill_info)(struct sk_buff *skb, | ||
68 | const struct net_device *dev); | ||
69 | |||
70 | size_t (*get_xstats_size)(const struct net_device *dev); | ||
71 | int (*fill_xstats)(struct sk_buff *skb, | ||
72 | const struct net_device *dev); | ||
73 | }; | ||
74 | |||
75 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); | ||
76 | extern void __rtnl_link_unregister(struct rtnl_link_ops *ops); | ||
77 | |||
78 | extern int rtnl_link_register(struct rtnl_link_ops *ops); | ||
79 | extern void rtnl_link_unregister(struct rtnl_link_ops *ops); | ||
80 | |||
81 | #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) | ||
82 | |||
25 | #endif | 83 | #endif |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 1b8e35197ebe..8a67f24cbe02 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -290,7 +290,7 @@ static inline int qdisc_reshape_fail(struct sk_buff *skb, struct Qdisc *sch) | |||
290 | { | 290 | { |
291 | sch->qstats.drops++; | 291 | sch->qstats.drops++; |
292 | 292 | ||
293 | #ifdef CONFIG_NET_CLS_POLICE | 293 | #ifdef CONFIG_NET_CLS_ACT |
294 | if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) | 294 | if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) |
295 | goto drop; | 295 | goto drop; |
296 | 296 | ||
diff --git a/include/net/tipc/tipc_port.h b/include/net/tipc/tipc_port.h index 333bba6dc522..cfc4ba46de8f 100644 --- a/include/net/tipc/tipc_port.h +++ b/include/net/tipc/tipc_port.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * include/net/tipc/tipc_port.h: Include file for privileged access to TIPC ports | 2 | * include/net/tipc/tipc_port.h: Include file for privileged access to TIPC ports |
3 | * | 3 | * |
4 | * Copyright (c) 1994-2006, Ericsson AB | 4 | * Copyright (c) 1994-2007, Ericsson AB |
5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005-2007, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
@@ -55,6 +55,7 @@ | |||
55 | * @conn_unacked: number of unacknowledged messages received from peer port | 55 | * @conn_unacked: number of unacknowledged messages received from peer port |
56 | * @published: non-zero if port has one or more associated names | 56 | * @published: non-zero if port has one or more associated names |
57 | * @congested: non-zero if cannot send because of link or port congestion | 57 | * @congested: non-zero if cannot send because of link or port congestion |
58 | * @max_pkt: maximum packet size "hint" used when building messages sent by port | ||
58 | * @ref: unique reference to port in TIPC object registry | 59 | * @ref: unique reference to port in TIPC object registry |
59 | * @phdr: preformatted message header used when sending messages | 60 | * @phdr: preformatted message header used when sending messages |
60 | */ | 61 | */ |
@@ -68,6 +69,7 @@ struct tipc_port { | |||
68 | u32 conn_unacked; | 69 | u32 conn_unacked; |
69 | int published; | 70 | int published; |
70 | u32 congested; | 71 | u32 congested; |
72 | u32 max_pkt; | ||
71 | u32 ref; | 73 | u32 ref; |
72 | struct tipc_msg phdr; | 74 | struct tipc_msg phdr; |
73 | }; | 75 | }; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 311f25af5e1a..ae959e950174 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -19,9 +19,19 @@ | |||
19 | #include <net/ipv6.h> | 19 | #include <net/ipv6.h> |
20 | #include <net/ip6_fib.h> | 20 | #include <net/ip6_fib.h> |
21 | 21 | ||
22 | #define XFRM_PROTO_ESP 50 | ||
23 | #define XFRM_PROTO_AH 51 | ||
24 | #define XFRM_PROTO_COMP 108 | ||
25 | #define XFRM_PROTO_IPIP 4 | ||
26 | #define XFRM_PROTO_IPV6 41 | ||
27 | #define XFRM_PROTO_ROUTING IPPROTO_ROUTING | ||
28 | #define XFRM_PROTO_DSTOPTS IPPROTO_DSTOPTS | ||
29 | |||
22 | #define XFRM_ALIGN8(len) (((len) + 7) & ~7) | 30 | #define XFRM_ALIGN8(len) (((len) + 7) & ~7) |
23 | #define MODULE_ALIAS_XFRM_MODE(family, encap) \ | 31 | #define MODULE_ALIAS_XFRM_MODE(family, encap) \ |
24 | MODULE_ALIAS("xfrm-mode-" __stringify(family) "-" __stringify(encap)) | 32 | MODULE_ALIAS("xfrm-mode-" __stringify(family) "-" __stringify(encap)) |
33 | #define MODULE_ALIAS_XFRM_TYPE(family, proto) \ | ||
34 | MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto)) | ||
25 | 35 | ||
26 | extern struct sock *xfrm_nl; | 36 | extern struct sock *xfrm_nl; |
27 | extern u32 sysctl_xfrm_aevent_etime; | 37 | extern u32 sysctl_xfrm_aevent_etime; |
@@ -509,11 +519,9 @@ __be16 xfrm_flowi_sport(struct flowi *fl) | |||
509 | case IPPROTO_ICMPV6: | 519 | case IPPROTO_ICMPV6: |
510 | port = htons(fl->fl_icmp_type); | 520 | port = htons(fl->fl_icmp_type); |
511 | break; | 521 | break; |
512 | #ifdef CONFIG_IPV6_MIP6 | ||
513 | case IPPROTO_MH: | 522 | case IPPROTO_MH: |
514 | port = htons(fl->fl_mh_type); | 523 | port = htons(fl->fl_mh_type); |
515 | break; | 524 | break; |
516 | #endif | ||
517 | default: | 525 | default: |
518 | port = 0; /*XXX*/ | 526 | port = 0; /*XXX*/ |
519 | } | 527 | } |
@@ -920,6 +928,10 @@ extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t | |||
920 | struct flowi *fl, struct xfrm_tmpl *tmpl, | 928 | struct flowi *fl, struct xfrm_tmpl *tmpl, |
921 | struct xfrm_policy *pol, int *err, | 929 | struct xfrm_policy *pol, int *err, |
922 | unsigned short family); | 930 | unsigned short family); |
931 | extern struct xfrm_state * xfrm_stateonly_find(xfrm_address_t *daddr, | ||
932 | xfrm_address_t *saddr, | ||
933 | unsigned short family, | ||
934 | u8 mode, u8 proto, u32 reqid); | ||
923 | extern int xfrm_state_check_expire(struct xfrm_state *x); | 935 | extern int xfrm_state_check_expire(struct xfrm_state *x); |
924 | extern void xfrm_state_insert(struct xfrm_state *x); | 936 | extern void xfrm_state_insert(struct xfrm_state *x); |
925 | extern int xfrm_state_add(struct xfrm_state *x); | 937 | extern int xfrm_state_add(struct xfrm_state *x); |
@@ -991,7 +1003,7 @@ extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | |||
991 | u8 **prevhdr); | 1003 | u8 **prevhdr); |
992 | 1004 | ||
993 | #ifdef CONFIG_XFRM | 1005 | #ifdef CONFIG_XFRM |
994 | extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); | 1006 | extern int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb); |
995 | extern int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen); | 1007 | extern int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen); |
996 | extern int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family); | 1008 | extern int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family); |
997 | #else | 1009 | #else |
@@ -1000,12 +1012,13 @@ static inline int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optv | |||
1000 | return -ENOPROTOOPT; | 1012 | return -ENOPROTOOPT; |
1001 | } | 1013 | } |
1002 | 1014 | ||
1003 | static inline int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) | 1015 | static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb) |
1004 | { | 1016 | { |
1005 | /* should not happen */ | 1017 | /* should not happen */ |
1006 | kfree_skb(skb); | 1018 | kfree_skb(skb); |
1007 | return 0; | 1019 | return 0; |
1008 | } | 1020 | } |
1021 | |||
1009 | static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family) | 1022 | static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family) |
1010 | { | 1023 | { |
1011 | return -EINVAL; | 1024 | return -EINVAL; |
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h index 5c070176d9ab..12243e80c706 100644 --- a/include/rdma/ib_cm.h +++ b/include/rdma/ib_cm.h | |||
@@ -385,7 +385,6 @@ struct ib_cm_rep_param { | |||
385 | u8 private_data_len; | 385 | u8 private_data_len; |
386 | u8 responder_resources; | 386 | u8 responder_resources; |
387 | u8 initiator_depth; | 387 | u8 initiator_depth; |
388 | u8 target_ack_delay; | ||
389 | u8 failover_accepted; | 388 | u8 failover_accepted; |
390 | u8 flow_control; | 389 | u8 flow_control; |
391 | u8 rnr_retry_count; | 390 | u8 rnr_retry_count; |
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 739fa4d0e539..30712ddd8a5e 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -111,6 +111,9 @@ | |||
111 | #define IB_QP1_QKEY 0x80010000 | 111 | #define IB_QP1_QKEY 0x80010000 |
112 | #define IB_QP_SET_QKEY 0x80000000 | 112 | #define IB_QP_SET_QKEY 0x80000000 |
113 | 113 | ||
114 | #define IB_DEFAULT_PKEY_PARTIAL 0x7FFF | ||
115 | #define IB_DEFAULT_PKEY_FULL 0xFFFF | ||
116 | |||
114 | enum { | 117 | enum { |
115 | IB_MGMT_MAD_HDR = 24, | 118 | IB_MGMT_MAD_HDR = 24, |
116 | IB_MGMT_MAD_DATA = 232, | 119 | IB_MGMT_MAD_DATA = 232, |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 55ebf035e620..50e907f42048 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -48,6 +48,7 @@ enum iscsi_uevent_e { | |||
48 | ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT = UEVENT_BASE + 14, | 48 | ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT = UEVENT_BASE + 14, |
49 | 49 | ||
50 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, | 50 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, |
51 | ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16, | ||
51 | 52 | ||
52 | /* up events */ | 53 | /* up events */ |
53 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, | 54 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, |
@@ -71,6 +72,8 @@ struct iscsi_uevent { | |||
71 | /* messages u -> k */ | 72 | /* messages u -> k */ |
72 | struct msg_create_session { | 73 | struct msg_create_session { |
73 | uint32_t initial_cmdsn; | 74 | uint32_t initial_cmdsn; |
75 | uint16_t cmds_max; | ||
76 | uint16_t queue_depth; | ||
74 | } c_session; | 77 | } c_session; |
75 | struct msg_destroy_session { | 78 | struct msg_destroy_session { |
76 | uint32_t sid; | 79 | uint32_t sid; |
@@ -136,6 +139,11 @@ struct iscsi_uevent { | |||
136 | */ | 139 | */ |
137 | uint32_t enable; | 140 | uint32_t enable; |
138 | } tgt_dscvr; | 141 | } tgt_dscvr; |
142 | struct msg_set_host_param { | ||
143 | uint32_t host_no; | ||
144 | uint32_t param; /* enum iscsi_host_param */ | ||
145 | uint32_t len; | ||
146 | } set_host_param; | ||
139 | } u; | 147 | } u; |
140 | union { | 148 | union { |
141 | /* messages k -> u */ | 149 | /* messages k -> u */ |
@@ -223,6 +231,11 @@ enum iscsi_param { | |||
223 | ISCSI_PARAM_CONN_PORT, | 231 | ISCSI_PARAM_CONN_PORT, |
224 | ISCSI_PARAM_CONN_ADDRESS, | 232 | ISCSI_PARAM_CONN_ADDRESS, |
225 | 233 | ||
234 | ISCSI_PARAM_USERNAME, | ||
235 | ISCSI_PARAM_USERNAME_IN, | ||
236 | ISCSI_PARAM_PASSWORD, | ||
237 | ISCSI_PARAM_PASSWORD_IN, | ||
238 | |||
226 | /* must always be last */ | 239 | /* must always be last */ |
227 | ISCSI_PARAM_MAX, | 240 | ISCSI_PARAM_MAX, |
228 | }; | 241 | }; |
@@ -249,6 +262,24 @@ enum iscsi_param { | |||
249 | #define ISCSI_SESS_RECOVERY_TMO (1 << ISCSI_PARAM_SESS_RECOVERY_TMO) | 262 | #define ISCSI_SESS_RECOVERY_TMO (1 << ISCSI_PARAM_SESS_RECOVERY_TMO) |
250 | #define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) | 263 | #define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) |
251 | #define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) | 264 | #define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) |
265 | #define ISCSI_USERNAME (1 << ISCSI_PARAM_USERNAME) | ||
266 | #define ISCSI_USERNAME_IN (1 << ISCSI_PARAM_USERNAME_IN) | ||
267 | #define ISCSI_PASSWORD (1 << ISCSI_PARAM_PASSWORD) | ||
268 | #define ISCSI_PASSWORD_IN (1 << ISCSI_PARAM_PASSWORD_IN) | ||
269 | |||
270 | /* iSCSI HBA params */ | ||
271 | enum iscsi_host_param { | ||
272 | ISCSI_HOST_PARAM_HWADDRESS, | ||
273 | ISCSI_HOST_PARAM_INITIATOR_NAME, | ||
274 | ISCSI_HOST_PARAM_NETDEV_NAME, | ||
275 | ISCSI_HOST_PARAM_IPADDRESS, | ||
276 | ISCSI_HOST_PARAM_MAX, | ||
277 | }; | ||
278 | |||
279 | #define ISCSI_HOST_HWADDRESS (1 << ISCSI_HOST_PARAM_HWADDRESS) | ||
280 | #define ISCSI_HOST_INITIATOR_NAME (1 << ISCSI_HOST_PARAM_INITIATOR_NAME) | ||
281 | #define ISCSI_HOST_NETDEV_NAME (1 << ISCSI_HOST_PARAM_NETDEV_NAME) | ||
282 | #define ISCSI_HOST_IPADDRESS (1 << ISCSI_HOST_PARAM_IPADDRESS) | ||
252 | 283 | ||
253 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 284 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
254 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 285 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
@@ -272,6 +303,9 @@ enum iscsi_param { | |||
272 | #define CAP_MULTI_CONN 0x40 | 303 | #define CAP_MULTI_CONN 0x40 |
273 | #define CAP_TEXT_NEGO 0x80 | 304 | #define CAP_TEXT_NEGO 0x80 |
274 | #define CAP_MARKERS 0x100 | 305 | #define CAP_MARKERS 0x100 |
306 | #define CAP_FW_DB 0x200 | ||
307 | #define CAP_SENDTARGETS_OFFLOAD 0x400 | ||
308 | #define CAP_DATA_PATH_OFFLOAD 0x800 | ||
275 | 309 | ||
276 | /* | 310 | /* |
277 | * These flags describes reason of stop_conn() call | 311 | * These flags describes reason of stop_conn() call |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ea0816d4904d..3f631b08a1ab 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -48,9 +48,8 @@ struct iscsi_nopin; | |||
48 | #define debug_scsi(fmt...) | 48 | #define debug_scsi(fmt...) |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #define ISCSI_XMIT_CMDS_MAX 128 /* must be power of 2 */ | 51 | #define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */ |
52 | #define ISCSI_MGMT_CMDS_MAX 32 /* must be power of 2 */ | 52 | #define ISCSI_MGMT_CMDS_MAX 16 /* must be power of 2 */ |
53 | #define ISCSI_CONN_MAX 1 | ||
54 | 53 | ||
55 | #define ISCSI_MGMT_ITT_OFFSET 0xa00 | 54 | #define ISCSI_MGMT_ITT_OFFSET 0xa00 |
56 | 55 | ||
@@ -73,6 +72,8 @@ struct iscsi_nopin; | |||
73 | #define ISCSI_AGE_SHIFT 28 | 72 | #define ISCSI_AGE_SHIFT 28 |
74 | #define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT) | 73 | #define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT) |
75 | 74 | ||
75 | #define ISCSI_ADDRESS_BUF_LEN 64 | ||
76 | |||
76 | struct iscsi_mgmt_task { | 77 | struct iscsi_mgmt_task { |
77 | /* | 78 | /* |
78 | * Becuae LLDs allocate their hdr differently, this is a pointer to | 79 | * Becuae LLDs allocate their hdr differently, this is a pointer to |
@@ -80,7 +81,7 @@ struct iscsi_mgmt_task { | |||
80 | */ | 81 | */ |
81 | struct iscsi_hdr *hdr; | 82 | struct iscsi_hdr *hdr; |
82 | char *data; /* mgmt payload */ | 83 | char *data; /* mgmt payload */ |
83 | int data_count; /* counts data to be sent */ | 84 | unsigned data_count; /* counts data to be sent */ |
84 | uint32_t itt; /* this ITT */ | 85 | uint32_t itt; /* this ITT */ |
85 | void *dd_data; /* driver/transport data */ | 86 | void *dd_data; /* driver/transport data */ |
86 | struct list_head running; | 87 | struct list_head running; |
@@ -90,6 +91,7 @@ enum { | |||
90 | ISCSI_TASK_COMPLETED, | 91 | ISCSI_TASK_COMPLETED, |
91 | ISCSI_TASK_PENDING, | 92 | ISCSI_TASK_PENDING, |
92 | ISCSI_TASK_RUNNING, | 93 | ISCSI_TASK_RUNNING, |
94 | ISCSI_TASK_ABORTING, | ||
93 | }; | 95 | }; |
94 | 96 | ||
95 | struct iscsi_cmd_task { | 97 | struct iscsi_cmd_task { |
@@ -99,16 +101,14 @@ struct iscsi_cmd_task { | |||
99 | */ | 101 | */ |
100 | struct iscsi_cmd *hdr; | 102 | struct iscsi_cmd *hdr; |
101 | int itt; /* this ITT */ | 103 | int itt; /* this ITT */ |
102 | int datasn; /* DataSN */ | ||
103 | 104 | ||
104 | uint32_t unsol_datasn; | 105 | uint32_t unsol_datasn; |
105 | int imm_count; /* imm-data (bytes) */ | 106 | unsigned imm_count; /* imm-data (bytes) */ |
106 | int unsol_count; /* unsolicited (bytes)*/ | 107 | unsigned unsol_count; /* unsolicited (bytes)*/ |
107 | /* offset in unsolicited stream (bytes); */ | 108 | /* offset in unsolicited stream (bytes); */ |
108 | int unsol_offset; | 109 | unsigned unsol_offset; |
109 | int data_count; /* remaining Data-Out */ | 110 | unsigned data_count; /* remaining Data-Out */ |
110 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ | 111 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ |
111 | int total_length; | ||
112 | struct iscsi_conn *conn; /* used connection */ | 112 | struct iscsi_conn *conn; /* used connection */ |
113 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ | 113 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ |
114 | 114 | ||
@@ -152,18 +152,11 @@ struct iscsi_conn { | |||
152 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ | 152 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ |
153 | 153 | ||
154 | /* xmit */ | 154 | /* xmit */ |
155 | struct kfifo *immqueue; /* immediate xmit queue */ | ||
156 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ | 155 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ |
157 | struct list_head mgmt_run_list; /* list of control tasks */ | 156 | struct list_head mgmt_run_list; /* list of control tasks */ |
158 | struct list_head xmitqueue; /* data-path cmd queue */ | 157 | struct list_head xmitqueue; /* data-path cmd queue */ |
159 | struct list_head run_list; /* list of cmds in progress */ | 158 | struct list_head run_list; /* list of cmds in progress */ |
160 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ | 159 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ |
161 | /* | ||
162 | * serializes connection xmit, access to kfifos: | ||
163 | * xmitqueue, immqueue, mgmtqueue | ||
164 | */ | ||
165 | struct mutex xmitmutex; | ||
166 | |||
167 | unsigned long suspend_tx; /* suspend Tx */ | 160 | unsigned long suspend_tx; /* suspend Tx */ |
168 | unsigned long suspend_rx; /* suspend Rx */ | 161 | unsigned long suspend_rx; /* suspend Rx */ |
169 | 162 | ||
@@ -174,8 +167,8 @@ struct iscsi_conn { | |||
174 | int tmabort_state; /* see TMABORT_INITIAL, etc.*/ | 167 | int tmabort_state; /* see TMABORT_INITIAL, etc.*/ |
175 | 168 | ||
176 | /* negotiated params */ | 169 | /* negotiated params */ |
177 | int max_recv_dlength; /* initiator_max_recv_dsl*/ | 170 | unsigned max_recv_dlength; /* initiator_max_recv_dsl*/ |
178 | int max_xmit_dlength; /* target_max_recv_dsl */ | 171 | unsigned max_xmit_dlength; /* target_max_recv_dsl */ |
179 | int hdrdgst_en; | 172 | int hdrdgst_en; |
180 | int datadgst_en; | 173 | int datadgst_en; |
181 | int ifmarker_en; | 174 | int ifmarker_en; |
@@ -183,6 +176,12 @@ struct iscsi_conn { | |||
183 | /* values userspace uses to id a conn */ | 176 | /* values userspace uses to id a conn */ |
184 | int persistent_port; | 177 | int persistent_port; |
185 | char *persistent_address; | 178 | char *persistent_address; |
179 | /* remote portal currently connected to */ | ||
180 | int portal_port; | ||
181 | char portal_address[ISCSI_ADDRESS_BUF_LEN]; | ||
182 | /* local address */ | ||
183 | int local_port; | ||
184 | char local_address[ISCSI_ADDRESS_BUF_LEN]; | ||
186 | 185 | ||
187 | /* MIB-statistics */ | 186 | /* MIB-statistics */ |
188 | uint64_t txdata_octets; | 187 | uint64_t txdata_octets; |
@@ -213,18 +212,25 @@ struct iscsi_session { | |||
213 | 212 | ||
214 | /* configuration */ | 213 | /* configuration */ |
215 | int initial_r2t_en; | 214 | int initial_r2t_en; |
216 | int max_r2t; | 215 | unsigned max_r2t; |
217 | int imm_data_en; | 216 | int imm_data_en; |
218 | int first_burst; | 217 | unsigned first_burst; |
219 | int max_burst; | 218 | unsigned max_burst; |
220 | int time2wait; | 219 | int time2wait; |
221 | int time2retain; | 220 | int time2retain; |
222 | int pdu_inorder_en; | 221 | int pdu_inorder_en; |
223 | int dataseq_inorder_en; | 222 | int dataseq_inorder_en; |
224 | int erl; | 223 | int erl; |
225 | int tpgt; | 224 | int tpgt; |
225 | char *username; | ||
226 | char *username_in; | ||
227 | char *password; | ||
228 | char *password_in; | ||
226 | char *targetname; | 229 | char *targetname; |
227 | 230 | char *initiatorname; | |
231 | /* hw address or netdev iscsi connection is bound to */ | ||
232 | char *hwaddress; | ||
233 | char *netdev; | ||
228 | /* control data */ | 234 | /* control data */ |
229 | struct iscsi_transport *tt; | 235 | struct iscsi_transport *tt; |
230 | struct Scsi_Host *host; | 236 | struct Scsi_Host *host; |
@@ -255,12 +261,22 @@ extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); | |||
255 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 261 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
256 | void (*done)(struct scsi_cmnd *)); | 262 | void (*done)(struct scsi_cmnd *)); |
257 | 263 | ||
264 | |||
265 | /* | ||
266 | * iSCSI host helpers. | ||
267 | */ | ||
268 | extern int iscsi_host_set_param(struct Scsi_Host *shost, | ||
269 | enum iscsi_host_param param, char *buf, | ||
270 | int buflen); | ||
271 | extern int iscsi_host_get_param(struct Scsi_Host *shost, | ||
272 | enum iscsi_host_param param, char *buf); | ||
273 | |||
258 | /* | 274 | /* |
259 | * session management | 275 | * session management |
260 | */ | 276 | */ |
261 | extern struct iscsi_cls_session * | 277 | extern struct iscsi_cls_session * |
262 | iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, | 278 | iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, |
263 | int, int, uint32_t, uint32_t *); | 279 | uint16_t, uint16_t, int, int, uint32_t, uint32_t *); |
264 | extern void iscsi_session_teardown(struct iscsi_cls_session *); | 280 | extern void iscsi_session_teardown(struct iscsi_cls_session *); |
265 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); | 281 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); |
266 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); | 282 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); |
@@ -289,8 +305,7 @@ extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
289 | /* | 305 | /* |
290 | * pdu and task processing | 306 | * pdu and task processing |
291 | */ | 307 | */ |
292 | extern int iscsi_check_assign_cmdsn(struct iscsi_session *, | 308 | extern void iscsi_update_cmdsn(struct iscsi_session *, struct iscsi_nopin *); |
293 | struct iscsi_nopin *); | ||
294 | extern void iscsi_prep_unsolicit_data_pdu(struct iscsi_cmd_task *, | 309 | extern void iscsi_prep_unsolicit_data_pdu(struct iscsi_cmd_task *, |
295 | struct iscsi_data *hdr); | 310 | struct iscsi_data *hdr); |
296 | extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *, | 311 | extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *, |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index a2e0c1032491..53e170586c26 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -135,4 +135,24 @@ extern void scsi_kunmap_atomic_sg(void *virt); | |||
135 | extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t); | 135 | extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t); |
136 | extern void scsi_free_sgtable(struct scatterlist *, int); | 136 | extern void scsi_free_sgtable(struct scatterlist *, int); |
137 | 137 | ||
138 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | ||
139 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | ||
140 | |||
141 | #define scsi_sg_count(cmd) ((cmd)->use_sg) | ||
142 | #define scsi_sglist(cmd) ((struct scatterlist *)(cmd)->request_buffer) | ||
143 | #define scsi_bufflen(cmd) ((cmd)->request_bufflen) | ||
144 | |||
145 | static inline void scsi_set_resid(struct scsi_cmnd *cmd, int resid) | ||
146 | { | ||
147 | cmd->resid = resid; | ||
148 | } | ||
149 | |||
150 | static inline int scsi_get_resid(struct scsi_cmnd *cmd) | ||
151 | { | ||
152 | return cmd->resid; | ||
153 | } | ||
154 | |||
155 | #define scsi_for_each_sg(cmd, sg, nseg, __i) \ | ||
156 | for (__i = 0, sg = scsi_sglist(cmd); __i < (nseg); __i++, (sg)++) | ||
157 | |||
138 | #endif /* _SCSI_SCSI_CMND_H */ | 158 | #endif /* _SCSI_SCSI_CMND_H */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 2f3c5b8b1d6a..d5057bc338ff 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -209,7 +209,6 @@ extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, | |||
209 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, | 209 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, |
210 | uint target, uint lun); | 210 | uint target, uint lun); |
211 | extern void scsi_remove_device(struct scsi_device *); | 211 | extern void scsi_remove_device(struct scsi_device *); |
212 | extern int scsi_device_cancel(struct scsi_device *, int); | ||
213 | 212 | ||
214 | extern int scsi_device_get(struct scsi_device *); | 213 | extern int scsi_device_get(struct scsi_device *); |
215 | extern void scsi_device_put(struct scsi_device *); | 214 | extern void scsi_device_put(struct scsi_device *); |
@@ -287,6 +286,7 @@ extern void scsi_target_block(struct device *); | |||
287 | extern void scsi_target_unblock(struct device *); | 286 | extern void scsi_target_unblock(struct device *); |
288 | extern void scsi_remove_target(struct device *); | 287 | extern void scsi_remove_target(struct device *); |
289 | extern void int_to_scsilun(unsigned int, struct scsi_lun *); | 288 | extern void int_to_scsilun(unsigned int, struct scsi_lun *); |
289 | extern int scsilun_to_int(struct scsi_lun *); | ||
290 | extern const char *scsi_device_state_name(enum scsi_device_state); | 290 | extern const char *scsi_device_state_name(enum scsi_device_state); |
291 | extern int scsi_is_sdev_device(const struct device *); | 291 | extern int scsi_is_sdev_device(const struct device *); |
292 | extern int scsi_is_target_device(const struct device *); | 292 | extern int scsi_is_target_device(const struct device *); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 68f461b7a835..ba07cf7c04ba 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -339,12 +339,6 @@ struct scsi_host_template { | |||
339 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | 339 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); |
340 | 340 | ||
341 | /* | 341 | /* |
342 | * suspend support | ||
343 | */ | ||
344 | int (*resume)(struct scsi_device *); | ||
345 | int (*suspend)(struct scsi_device *, pm_message_t state); | ||
346 | |||
347 | /* | ||
348 | * Name of proc directory | 342 | * Name of proc directory |
349 | */ | 343 | */ |
350 | char *proc_name; | 344 | char *proc_name; |
@@ -677,6 +671,10 @@ struct Scsi_Host { | |||
677 | #define shost_printk(prefix, shost, fmt, a...) \ | 671 | #define shost_printk(prefix, shost, fmt, a...) \ |
678 | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) | 672 | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) |
679 | 673 | ||
674 | static inline void *shost_priv(struct Scsi_Host *shost) | ||
675 | { | ||
676 | return (void *)shost->hostdata; | ||
677 | } | ||
680 | 678 | ||
681 | int scsi_is_host_device(const struct device *); | 679 | int scsi_is_host_device(const struct device *); |
682 | 680 | ||
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 1e797308640a..a0d80bcaa93d 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * FiberChannel transport specific attributes exported to sysfs. | 2 | * FiberChannel transport specific attributes exported to sysfs. |
3 | * | 3 | * |
4 | * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved. | 4 | * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved. |
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * ======== | 20 | * ======== |
21 | * | 21 | * |
22 | * Copyright (C) 2004-2005 James Smart, Emulex Corporation | 22 | * Copyright (C) 2004-2007 James Smart, Emulex Corporation |
23 | * Rewrite for host, target, device, and remote port attributes, | 23 | * Rewrite for host, target, device, and remote port attributes, |
24 | * statistics, and service functions... | 24 | * statistics, and service functions... |
25 | * | 25 | * |
@@ -62,8 +62,10 @@ enum fc_port_type { | |||
62 | FC_PORTTYPE_NLPORT, /* (Public) Loop w/ FLPort */ | 62 | FC_PORTTYPE_NLPORT, /* (Public) Loop w/ FLPort */ |
63 | FC_PORTTYPE_LPORT, /* (Private) Loop w/o FLPort */ | 63 | FC_PORTTYPE_LPORT, /* (Private) Loop w/o FLPort */ |
64 | FC_PORTTYPE_PTP, /* Point to Point w/ another NPort */ | 64 | FC_PORTTYPE_PTP, /* Point to Point w/ another NPort */ |
65 | FC_PORTTYPE_NPIV, /* VPORT based on NPIV */ | ||
65 | }; | 66 | }; |
66 | 67 | ||
68 | |||
67 | /* | 69 | /* |
68 | * fc_port_state: If you alter this, you also need to alter scsi_transport_fc.c | 70 | * fc_port_state: If you alter this, you also need to alter scsi_transport_fc.c |
69 | * (for the ascii descriptions). | 71 | * (for the ascii descriptions). |
@@ -83,7 +85,26 @@ enum fc_port_state { | |||
83 | }; | 85 | }; |
84 | 86 | ||
85 | 87 | ||
86 | /* | 88 | /* |
89 | * fc_vport_state: If you alter this, you also need to alter | ||
90 | * scsi_transport_fc.c (for the ascii descriptions). | ||
91 | */ | ||
92 | enum fc_vport_state { | ||
93 | FC_VPORT_UNKNOWN, | ||
94 | FC_VPORT_ACTIVE, | ||
95 | FC_VPORT_DISABLED, | ||
96 | FC_VPORT_LINKDOWN, | ||
97 | FC_VPORT_INITIALIZING, | ||
98 | FC_VPORT_NO_FABRIC_SUPP, | ||
99 | FC_VPORT_NO_FABRIC_RSCS, | ||
100 | FC_VPORT_FABRIC_LOGOUT, | ||
101 | FC_VPORT_FABRIC_REJ_WWN, | ||
102 | FC_VPORT_FAILED, | ||
103 | }; | ||
104 | |||
105 | |||
106 | |||
107 | /* | ||
87 | * FC Classes of Service | 108 | * FC Classes of Service |
88 | * Note: values are not enumerated, as they can be "or'd" together | 109 | * Note: values are not enumerated, as they can be "or'd" together |
89 | * for reporting (e.g. report supported_classes). If you alter this list, | 110 | * for reporting (e.g. report supported_classes). If you alter this list, |
@@ -96,7 +117,7 @@ enum fc_port_state { | |||
96 | #define FC_COS_CLASS4 0x10 | 117 | #define FC_COS_CLASS4 0x10 |
97 | #define FC_COS_CLASS6 0x40 | 118 | #define FC_COS_CLASS6 0x40 |
98 | 119 | ||
99 | /* | 120 | /* |
100 | * FC Port Speeds | 121 | * FC Port Speeds |
101 | * Note: values are not enumerated, as they can be "or'd" together | 122 | * Note: values are not enumerated, as they can be "or'd" together |
102 | * for reporting (e.g. report supported_speeds). If you alter this list, | 123 | * for reporting (e.g. report supported_speeds). If you alter this list, |
@@ -124,16 +145,114 @@ enum fc_tgtid_binding_type { | |||
124 | }; | 145 | }; |
125 | 146 | ||
126 | /* | 147 | /* |
127 | * FC Remote Port Roles | 148 | * FC Port Roles |
128 | * Note: values are not enumerated, as they can be "or'd" together | 149 | * Note: values are not enumerated, as they can be "or'd" together |
129 | * for reporting (e.g. report roles). If you alter this list, | 150 | * for reporting (e.g. report roles). If you alter this list, |
130 | * you also need to alter scsi_transport_fc.c (for the ascii descriptions). | 151 | * you also need to alter scsi_transport_fc.c (for the ascii descriptions). |
131 | */ | 152 | */ |
132 | #define FC_RPORT_ROLE_UNKNOWN 0x00 | 153 | #define FC_PORT_ROLE_UNKNOWN 0x00 |
133 | #define FC_RPORT_ROLE_FCP_TARGET 0x01 | 154 | #define FC_PORT_ROLE_FCP_TARGET 0x01 |
134 | #define FC_RPORT_ROLE_FCP_INITIATOR 0x02 | 155 | #define FC_PORT_ROLE_FCP_INITIATOR 0x02 |
135 | #define FC_RPORT_ROLE_IP_PORT 0x04 | 156 | #define FC_PORT_ROLE_IP_PORT 0x04 |
157 | |||
158 | /* The following are for compatibility */ | ||
159 | #define FC_RPORT_ROLE_UNKNOWN FC_PORT_ROLE_UNKNOWN | ||
160 | #define FC_RPORT_ROLE_FCP_TARGET FC_PORT_ROLE_FCP_TARGET | ||
161 | #define FC_RPORT_ROLE_FCP_INITIATOR FC_PORT_ROLE_FCP_INITIATOR | ||
162 | #define FC_RPORT_ROLE_IP_PORT FC_PORT_ROLE_IP_PORT | ||
163 | |||
164 | |||
165 | /* Macro for use in defining Virtual Port attributes */ | ||
166 | #define FC_VPORT_ATTR(_name,_mode,_show,_store) \ | ||
167 | struct class_device_attribute class_device_attr_vport_##_name = \ | ||
168 | __ATTR(_name,_mode,_show,_store) | ||
169 | |||
170 | |||
171 | /* | ||
172 | * FC Virtual Port Attributes | ||
173 | * | ||
174 | * This structure exists for each FC port is a virtual FC port. Virtual | ||
175 | * ports share the physical link with the Physical port. Each virtual | ||
176 | * ports has a unique presense on the SAN, and may be instantiated via | ||
177 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a | ||
178 | * unique presense, each vport has it's own view of the fabric, | ||
179 | * authentication priviledge, and priorities. | ||
180 | * | ||
181 | * A virtual port may support 1 or more FC4 roles. Typically it is a | ||
182 | * FCP Initiator. It could be a FCP Target, or exist sole for an IP over FC | ||
183 | * roles. FC port attributes for the vport will be reported on any | ||
184 | * fc_host class object allocated for an FCP Initiator. | ||
185 | * | ||
186 | * -- | ||
187 | * | ||
188 | * Fixed attributes are not expected to change. The driver is | ||
189 | * expected to set these values after receiving the fc_vport structure | ||
190 | * via the vport_create() call from the transport. | ||
191 | * The transport fully manages all get functions w/o driver interaction. | ||
192 | * | ||
193 | * Dynamic attributes are expected to change. The driver participates | ||
194 | * in all get/set operations via functions provided by the driver. | ||
195 | * | ||
196 | * Private attributes are transport-managed values. They are fully | ||
197 | * managed by the transport w/o driver interaction. | ||
198 | */ | ||
136 | 199 | ||
200 | #define FC_VPORT_SYMBOLIC_NAMELEN 64 | ||
201 | struct fc_vport { | ||
202 | /* Fixed Attributes */ | ||
203 | |||
204 | /* Dynamic Attributes */ | ||
205 | |||
206 | /* Private (Transport-managed) Attributes */ | ||
207 | enum fc_vport_state vport_state; | ||
208 | enum fc_vport_state vport_last_state; | ||
209 | u64 node_name; | ||
210 | u64 port_name; | ||
211 | u32 roles; | ||
212 | u32 vport_id; /* Admin Identifier for the vport */ | ||
213 | enum fc_port_type vport_type; | ||
214 | char symbolic_name[FC_VPORT_SYMBOLIC_NAMELEN]; | ||
215 | |||
216 | /* exported data */ | ||
217 | void *dd_data; /* Used for driver-specific storage */ | ||
218 | |||
219 | /* internal data */ | ||
220 | struct Scsi_Host *shost; /* Physical Port Parent */ | ||
221 | unsigned int channel; | ||
222 | u32 number; | ||
223 | u8 flags; | ||
224 | struct list_head peers; | ||
225 | struct device dev; | ||
226 | struct work_struct vport_delete_work; | ||
227 | } __attribute__((aligned(sizeof(unsigned long)))); | ||
228 | |||
229 | /* bit field values for struct fc_vport "flags" field: */ | ||
230 | #define FC_VPORT_CREATING 0x01 | ||
231 | #define FC_VPORT_DELETING 0x02 | ||
232 | #define FC_VPORT_DELETED 0x04 | ||
233 | #define FC_VPORT_DEL 0x06 /* Any DELETE state */ | ||
234 | |||
235 | #define dev_to_vport(d) \ | ||
236 | container_of(d, struct fc_vport, dev) | ||
237 | #define transport_class_to_vport(classdev) \ | ||
238 | dev_to_vport(classdev->dev) | ||
239 | #define vport_to_shost(v) \ | ||
240 | (v->shost) | ||
241 | #define vport_to_shost_channel(v) \ | ||
242 | (v->channel) | ||
243 | #define vport_to_parent(v) \ | ||
244 | (v->dev.parent) | ||
245 | |||
246 | |||
247 | /* Error return codes for vport_create() callback */ | ||
248 | #define VPCERR_UNSUPPORTED -ENOSYS /* no driver/adapter | ||
249 | support */ | ||
250 | #define VPCERR_BAD_WWN -ENOTUNIQ /* driver validation | ||
251 | of WWNs failed */ | ||
252 | #define VPCERR_NO_FABRIC_SUPP -EOPNOTSUPP /* Fabric connection | ||
253 | is loop or the | ||
254 | Fabric Port does | ||
255 | not support NPIV */ | ||
137 | 256 | ||
138 | /* | 257 | /* |
139 | * fc_rport_identifiers: This set of data contains all elements | 258 | * fc_rport_identifiers: This set of data contains all elements |
@@ -149,6 +268,7 @@ struct fc_rport_identifiers { | |||
149 | u32 roles; | 268 | u32 roles; |
150 | }; | 269 | }; |
151 | 270 | ||
271 | |||
152 | /* Macro for use in defining Remote Port attributes */ | 272 | /* Macro for use in defining Remote Port attributes */ |
153 | #define FC_RPORT_ATTR(_name,_mode,_show,_store) \ | 273 | #define FC_RPORT_ATTR(_name,_mode,_show,_store) \ |
154 | struct class_device_attribute class_device_attr_rport_##_name = \ | 274 | struct class_device_attribute class_device_attr_rport_##_name = \ |
@@ -278,7 +398,7 @@ struct fc_host_statistics { | |||
278 | u64 prim_seq_protocol_err_count; | 398 | u64 prim_seq_protocol_err_count; |
279 | u64 invalid_tx_word_count; | 399 | u64 invalid_tx_word_count; |
280 | u64 invalid_crc_count; | 400 | u64 invalid_crc_count; |
281 | 401 | ||
282 | /* fc4 statistics (only FCP supported currently) */ | 402 | /* fc4 statistics (only FCP supported currently) */ |
283 | u64 fcp_input_requests; | 403 | u64 fcp_input_requests; |
284 | u64 fcp_output_requests; | 404 | u64 fcp_output_requests; |
@@ -343,6 +463,7 @@ struct fc_host_attrs { | |||
343 | u8 supported_fc4s[FC_FC4_LIST_SIZE]; | 463 | u8 supported_fc4s[FC_FC4_LIST_SIZE]; |
344 | u32 supported_speeds; | 464 | u32 supported_speeds; |
345 | u32 maxframe_size; | 465 | u32 maxframe_size; |
466 | u16 max_npiv_vports; | ||
346 | char serial_number[FC_SERIAL_NUMBER_SIZE]; | 467 | char serial_number[FC_SERIAL_NUMBER_SIZE]; |
347 | 468 | ||
348 | /* Dynamic Attributes */ | 469 | /* Dynamic Attributes */ |
@@ -361,8 +482,11 @@ struct fc_host_attrs { | |||
361 | /* internal data */ | 482 | /* internal data */ |
362 | struct list_head rports; | 483 | struct list_head rports; |
363 | struct list_head rport_bindings; | 484 | struct list_head rport_bindings; |
485 | struct list_head vports; | ||
364 | u32 next_rport_number; | 486 | u32 next_rport_number; |
365 | u32 next_target_id; | 487 | u32 next_target_id; |
488 | u32 next_vport_number; | ||
489 | u16 npiv_vports_inuse; | ||
366 | 490 | ||
367 | /* work queues for rport state manipulation */ | 491 | /* work queues for rport state manipulation */ |
368 | char work_q_name[KOBJ_NAME_LEN]; | 492 | char work_q_name[KOBJ_NAME_LEN]; |
@@ -388,6 +512,8 @@ struct fc_host_attrs { | |||
388 | (((struct fc_host_attrs *)(x)->shost_data)->supported_speeds) | 512 | (((struct fc_host_attrs *)(x)->shost_data)->supported_speeds) |
389 | #define fc_host_maxframe_size(x) \ | 513 | #define fc_host_maxframe_size(x) \ |
390 | (((struct fc_host_attrs *)(x)->shost_data)->maxframe_size) | 514 | (((struct fc_host_attrs *)(x)->shost_data)->maxframe_size) |
515 | #define fc_host_max_npiv_vports(x) \ | ||
516 | (((struct fc_host_attrs *)(x)->shost_data)->max_npiv_vports) | ||
391 | #define fc_host_serial_number(x) \ | 517 | #define fc_host_serial_number(x) \ |
392 | (((struct fc_host_attrs *)(x)->shost_data)->serial_number) | 518 | (((struct fc_host_attrs *)(x)->shost_data)->serial_number) |
393 | #define fc_host_port_id(x) \ | 519 | #define fc_host_port_id(x) \ |
@@ -412,10 +538,16 @@ struct fc_host_attrs { | |||
412 | (((struct fc_host_attrs *)(x)->shost_data)->rports) | 538 | (((struct fc_host_attrs *)(x)->shost_data)->rports) |
413 | #define fc_host_rport_bindings(x) \ | 539 | #define fc_host_rport_bindings(x) \ |
414 | (((struct fc_host_attrs *)(x)->shost_data)->rport_bindings) | 540 | (((struct fc_host_attrs *)(x)->shost_data)->rport_bindings) |
541 | #define fc_host_vports(x) \ | ||
542 | (((struct fc_host_attrs *)(x)->shost_data)->vports) | ||
415 | #define fc_host_next_rport_number(x) \ | 543 | #define fc_host_next_rport_number(x) \ |
416 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) | 544 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) |
417 | #define fc_host_next_target_id(x) \ | 545 | #define fc_host_next_target_id(x) \ |
418 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) | 546 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) |
547 | #define fc_host_next_vport_number(x) \ | ||
548 | (((struct fc_host_attrs *)(x)->shost_data)->next_vport_number) | ||
549 | #define fc_host_npiv_vports_inuse(x) \ | ||
550 | (((struct fc_host_attrs *)(x)->shost_data)->npiv_vports_inuse) | ||
419 | #define fc_host_work_q_name(x) \ | 551 | #define fc_host_work_q_name(x) \ |
420 | (((struct fc_host_attrs *)(x)->shost_data)->work_q_name) | 552 | (((struct fc_host_attrs *)(x)->shost_data)->work_q_name) |
421 | #define fc_host_work_q(x) \ | 553 | #define fc_host_work_q(x) \ |
@@ -452,14 +584,20 @@ struct fc_function_template { | |||
452 | void (*dev_loss_tmo_callbk)(struct fc_rport *); | 584 | void (*dev_loss_tmo_callbk)(struct fc_rport *); |
453 | void (*terminate_rport_io)(struct fc_rport *); | 585 | void (*terminate_rport_io)(struct fc_rport *); |
454 | 586 | ||
587 | void (*set_vport_symbolic_name)(struct fc_vport *); | ||
588 | int (*vport_create)(struct fc_vport *, bool); | ||
589 | int (*vport_disable)(struct fc_vport *, bool); | ||
590 | int (*vport_delete)(struct fc_vport *); | ||
591 | |||
455 | /* allocation lengths for host-specific data */ | 592 | /* allocation lengths for host-specific data */ |
456 | u32 dd_fcrport_size; | 593 | u32 dd_fcrport_size; |
594 | u32 dd_fcvport_size; | ||
457 | 595 | ||
458 | /* | 596 | /* |
459 | * The driver sets these to tell the transport class it | 597 | * The driver sets these to tell the transport class it |
460 | * wants the attributes displayed in sysfs. If the show_ flag | 598 | * wants the attributes displayed in sysfs. If the show_ flag |
461 | * is not set, the attribute will be private to the transport | 599 | * is not set, the attribute will be private to the transport |
462 | * class | 600 | * class |
463 | */ | 601 | */ |
464 | 602 | ||
465 | /* remote port fixed attributes */ | 603 | /* remote port fixed attributes */ |
@@ -512,7 +650,7 @@ fc_remote_port_chkready(struct fc_rport *rport) | |||
512 | 650 | ||
513 | switch (rport->port_state) { | 651 | switch (rport->port_state) { |
514 | case FC_PORTSTATE_ONLINE: | 652 | case FC_PORTSTATE_ONLINE: |
515 | if (rport->roles & FC_RPORT_ROLE_FCP_TARGET) | 653 | if (rport->roles & FC_PORT_ROLE_FCP_TARGET) |
516 | result = 0; | 654 | result = 0; |
517 | else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) | 655 | else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) |
518 | result = DID_IMM_RETRY << 16; | 656 | result = DID_IMM_RETRY << 16; |
@@ -549,6 +687,27 @@ static inline void u64_to_wwn(u64 inm, u8 *wwn) | |||
549 | wwn[7] = inm & 0xff; | 687 | wwn[7] = inm & 0xff; |
550 | } | 688 | } |
551 | 689 | ||
690 | /** | ||
691 | * fc_vport_set_state() - called to set a vport's state. Saves the old state, | ||
692 | * excepting the transitory states of initializing and sending the ELS | ||
693 | * traffic to instantiate the vport on the link. | ||
694 | * | ||
695 | * Assumes the driver has surrounded this with the proper locking to ensure | ||
696 | * a coherent state change. | ||
697 | * | ||
698 | * @vport: virtual port whose state is changing | ||
699 | * @new_state: new state | ||
700 | **/ | ||
701 | static inline void | ||
702 | fc_vport_set_state(struct fc_vport *vport, enum fc_vport_state new_state) | ||
703 | { | ||
704 | if ((new_state != FC_VPORT_UNKNOWN) && | ||
705 | (new_state != FC_VPORT_INITIALIZING)) | ||
706 | vport->vport_last_state = vport->vport_state; | ||
707 | vport->vport_state = new_state; | ||
708 | } | ||
709 | |||
710 | |||
552 | struct scsi_transport_template *fc_attach_transport( | 711 | struct scsi_transport_template *fc_attach_transport( |
553 | struct fc_function_template *); | 712 | struct fc_function_template *); |
554 | void fc_release_transport(struct scsi_transport_template *); | 713 | void fc_release_transport(struct scsi_transport_template *); |
@@ -567,5 +726,6 @@ void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number, | |||
567 | * be sure to read the Vendor Type and ID formatting requirements | 726 | * be sure to read the Vendor Type and ID formatting requirements |
568 | * specified in scsi_netlink.h | 727 | * specified in scsi_netlink.h |
569 | */ | 728 | */ |
729 | int fc_vport_terminate(struct fc_vport *vport); | ||
570 | 730 | ||
571 | #endif /* SCSI_TRANSPORT_FC_H */ | 731 | #endif /* SCSI_TRANSPORT_FC_H */ |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index d5c218ddc527..706c0cd36c14 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -79,7 +79,8 @@ struct iscsi_transport { | |||
79 | char *name; | 79 | char *name; |
80 | unsigned int caps; | 80 | unsigned int caps; |
81 | /* LLD sets this to indicate what values it can export to sysfs */ | 81 | /* LLD sets this to indicate what values it can export to sysfs */ |
82 | unsigned int param_mask; | 82 | uint64_t param_mask; |
83 | uint64_t host_param_mask; | ||
83 | struct scsi_host_template *host_template; | 84 | struct scsi_host_template *host_template; |
84 | /* LLD connection data size */ | 85 | /* LLD connection data size */ |
85 | int conndata_size; | 86 | int conndata_size; |
@@ -89,7 +90,8 @@ struct iscsi_transport { | |||
89 | unsigned int max_conn; | 90 | unsigned int max_conn; |
90 | unsigned int max_cmd_len; | 91 | unsigned int max_cmd_len; |
91 | struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it, | 92 | struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it, |
92 | struct scsi_transport_template *t, uint32_t sn, uint32_t *hn); | 93 | struct scsi_transport_template *t, uint16_t, uint16_t, |
94 | uint32_t sn, uint32_t *hn); | ||
93 | void (*destroy_session) (struct iscsi_cls_session *session); | 95 | void (*destroy_session) (struct iscsi_cls_session *session); |
94 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, | 96 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, |
95 | uint32_t cid); | 97 | uint32_t cid); |
@@ -105,14 +107,18 @@ struct iscsi_transport { | |||
105 | enum iscsi_param param, char *buf); | 107 | enum iscsi_param param, char *buf); |
106 | int (*get_session_param) (struct iscsi_cls_session *session, | 108 | int (*get_session_param) (struct iscsi_cls_session *session, |
107 | enum iscsi_param param, char *buf); | 109 | enum iscsi_param param, char *buf); |
110 | int (*get_host_param) (struct Scsi_Host *shost, | ||
111 | enum iscsi_host_param param, char *buf); | ||
112 | int (*set_host_param) (struct Scsi_Host *shost, | ||
113 | enum iscsi_host_param param, char *buf, | ||
114 | int buflen); | ||
108 | int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | 115 | int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
109 | char *data, uint32_t data_size); | 116 | char *data, uint32_t data_size); |
110 | void (*get_stats) (struct iscsi_cls_conn *conn, | 117 | void (*get_stats) (struct iscsi_cls_conn *conn, |
111 | struct iscsi_stats *stats); | 118 | struct iscsi_stats *stats); |
112 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); | 119 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); |
113 | void (*init_mgmt_task) (struct iscsi_conn *conn, | 120 | void (*init_mgmt_task) (struct iscsi_conn *conn, |
114 | struct iscsi_mgmt_task *mtask, | 121 | struct iscsi_mgmt_task *mtask); |
115 | char *data, uint32_t data_size); | ||
116 | int (*xmit_cmd_task) (struct iscsi_conn *conn, | 122 | int (*xmit_cmd_task) (struct iscsi_conn *conn, |
117 | struct iscsi_cmd_task *ctask); | 123 | struct iscsi_cmd_task *ctask); |
118 | void (*cleanup_cmd_task) (struct iscsi_conn *conn, | 124 | void (*cleanup_cmd_task) (struct iscsi_conn *conn, |
@@ -124,7 +130,7 @@ struct iscsi_transport { | |||
124 | uint64_t *ep_handle); | 130 | uint64_t *ep_handle); |
125 | int (*ep_poll) (uint64_t ep_handle, int timeout_ms); | 131 | int (*ep_poll) (uint64_t ep_handle, int timeout_ms); |
126 | void (*ep_disconnect) (uint64_t ep_handle); | 132 | void (*ep_disconnect) (uint64_t ep_handle); |
127 | int (*tgt_dscvr) (enum iscsi_tgt_dscvr type, uint32_t host_no, | 133 | int (*tgt_dscvr) (struct Scsi_Host *shost, enum iscsi_tgt_dscvr type, |
128 | uint32_t enable, struct sockaddr *dst_addr); | 134 | uint32_t enable, struct sockaddr *dst_addr); |
129 | }; | 135 | }; |
130 | 136 | ||