diff options
Diffstat (limited to 'include')
539 files changed, 14509 insertions, 7456 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/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index dcebf6d61903..168b93fee529 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
@@ -18,4 +18,8 @@ | |||
18 | 18 | ||
19 | #define ANUBIS_CTRL1_NANDSEL (0x3) | 19 | #define ANUBIS_CTRL1_NANDSEL (0x3) |
20 | 20 | ||
21 | /* IDREG - revision */ | ||
22 | |||
23 | #define ANUBIS_IDREG_REVMASK (0x7) | ||
24 | |||
21 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ | 25 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index ab076de4a0d0..830d114261da 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
@@ -27,14 +27,8 @@ | |||
27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ | 27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ |
28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) | 28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) |
29 | 29 | ||
30 | #define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01900000 */ | 30 | #define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ |
31 | #define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD) | 31 | #define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23)) |
32 | |||
33 | #define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01A00000 */ | ||
34 | #define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD) | ||
35 | |||
36 | #define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ | ||
37 | #define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD) | ||
38 | 32 | ||
39 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) | 33 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) |
40 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) | 34 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) |
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h index 3b6498468d62..229ab2351db6 100644 --- a/include/asm-arm/arch-s3c2410/osiris-cpld.h +++ b/include/asm-arm/arch-s3c2410/osiris-cpld.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h | 1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h |
2 | * | 2 | * |
3 | * Copyright (c) 2005 Simtec Electronics | 3 | * Copyright 2005 Simtec Electronics |
4 | * http://www.simtec.co.uk/products/ | 4 | * http://www.simtec.co.uk/products/ |
5 | * Ben Dooks <ben@simtec.co.uk> | 5 | * Ben Dooks <ben@simtec.co.uk> |
6 | * | 6 | * |
@@ -14,12 +14,17 @@ | |||
14 | #ifndef __ASM_ARCH_OSIRISCPLD_H | 14 | #ifndef __ASM_ARCH_OSIRISCPLD_H |
15 | #define __ASM_ARCH_OSIRISCPLD_H | 15 | #define __ASM_ARCH_OSIRISCPLD_H |
16 | 16 | ||
17 | /* CTRL1 - NAND WP control */ | 17 | /* CTRL0 - NAND WP control */ |
18 | 18 | ||
19 | #define OSIRIS_CTRL1_NANDSEL (0x3) | 19 | #define OSIRIS_CTRL0_NANDSEL (0x3) |
20 | #define OSIRIS_CTRL1_BOOT_INT (1<<3) | 20 | #define OSIRIS_CTRL0_BOOT_INT (1<<3) |
21 | #define OSIRIS_CTRL1_PCMCIA (1<<4) | 21 | #define OSIRIS_CTRL0_PCMCIA (1<<4) |
22 | #define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6) | 22 | #define OSIRIS_CTRL0_FIX8 (1<<5) |
23 | #define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7) | 23 | #define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6) |
24 | #define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7) | ||
25 | |||
26 | #define OSIRIS_CTRL1_FIX8 (1<<0) | ||
27 | |||
28 | #define OSIRIS_ID_REVMASK (0x7) | ||
24 | 29 | ||
25 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ | 30 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index a14164dfa525..b5c74d2b9aaa 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -24,16 +24,19 @@ | |||
24 | 24 | ||
25 | /* we put the CPLD registers next, to get them out of the way */ | 25 | /* we put the CPLD registers next, to get them out of the way */ |
26 | 26 | ||
27 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000) | 27 | #define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000) |
28 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD) | 28 | #define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD) |
29 | 29 | ||
30 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000) | 30 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000) |
31 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<23)) | 31 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23)) |
32 | 32 | ||
33 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000) | 33 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000) |
34 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) | 34 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23)) |
35 | 35 | ||
36 | #define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000) | 36 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000) |
37 | #define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<23)) | 37 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) |
38 | |||
39 | #define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000) | ||
40 | #define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23)) | ||
38 | 41 | ||
39 | #endif /* __ASM_ARCH_OSIRISMAP_H */ | 42 | #endif /* __ASM_ARCH_OSIRISMAP_H */ |
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/linkage.h b/include/asm-arm/linkage.h index dbe4b4e31a5b..5a25632b1bc0 100644 --- a/include/asm-arm/linkage.h +++ b/include/asm-arm/linkage.h | |||
@@ -4,4 +4,8 @@ | |||
4 | #define __ALIGN .align 0 | 4 | #define __ALIGN .align 0 |
5 | #define __ALIGN_STR ".align 0" | 5 | #define __ALIGN_STR ".align 0" |
6 | 6 | ||
7 | #define ENDPROC(name) \ | ||
8 | .type name, %function; \ | ||
9 | END(name) | ||
10 | |||
7 | #endif | 11 | #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 2d0dad8c10ac..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 | ||
@@ -112,22 +119,22 @@ struct pt_regs { | |||
112 | #define fast_interrupts_enabled(regs) \ | 119 | #define fast_interrupts_enabled(regs) \ |
113 | (!((regs)->ARM_cpsr & PSR_F_BIT)) | 120 | (!((regs)->ARM_cpsr & PSR_F_BIT)) |
114 | 121 | ||
115 | #define condition_codes(regs) \ | ||
116 | ((regs)->ARM_cpsr & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT)) | ||
117 | |||
118 | /* Are the current registers suitable for user mode? | 122 | /* Are the current registers suitable for user mode? |
119 | * (used to maintain security in signal handlers) | 123 | * (used to maintain security in signal handlers) |
120 | */ | 124 | */ |
121 | static inline int valid_user_regs(struct pt_regs *regs) | 125 | static inline int valid_user_regs(struct pt_regs *regs) |
122 | { | 126 | { |
123 | if (user_mode(regs) && | 127 | if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) { |
124 | (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0) | 128 | regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); |
125 | return 1; | 129 | return 1; |
130 | } | ||
126 | 131 | ||
127 | /* | 132 | /* |
128 | * Force CPSR to something logical... | 133 | * Force CPSR to something logical... |
129 | */ | 134 | */ |
130 | 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; | ||
131 | 138 | ||
132 | return 0; | 139 | return 0; |
133 | } | 140 | } |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 250d7f145aca..bfdbebebdc1b 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -367,6 +367,7 @@ | |||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | 367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) |
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | 368 | #define __NR_splice (__NR_SYSCALL_BASE+340) |
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | 369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) |
370 | #define __NR_sync_file_range2 __NR_arm_sync_file_range | ||
370 | #define __NR_tee (__NR_SYSCALL_BASE+342) | 371 | #define __NR_tee (__NR_SYSCALL_BASE+342) |
371 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | 372 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) |
372 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | 373 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) |
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/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h index 80a21aa9ae77..af7f9535bab3 100644 --- a/include/asm-avr32/arch-at32ap/gpio.h +++ b/include/asm-avr32/arch-at32ap/gpio.h | |||
@@ -14,6 +14,8 @@ int gpio_direction_output(unsigned int gpio, int value); | |||
14 | int gpio_get_value(unsigned int gpio); | 14 | int gpio_get_value(unsigned int gpio); |
15 | void gpio_set_value(unsigned int gpio, int value); | 15 | void gpio_set_value(unsigned int gpio, int value); |
16 | 16 | ||
17 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
18 | |||
17 | static inline int gpio_to_irq(unsigned int gpio) | 19 | static inline int gpio_to_irq(unsigned int gpio) |
18 | { | 20 | { |
19 | return gpio + GPIO_IRQ_BASE; | 21 | return gpio + GPIO_IRQ_BASE; |
diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h index dabb955f3c00..d3cf35ab11ab 100644 --- a/include/asm-avr32/cache.h +++ b/include/asm-avr32/cache.h | |||
@@ -4,6 +4,15 @@ | |||
4 | #define L1_CACHE_SHIFT 5 | 4 | #define L1_CACHE_SHIFT 5 |
5 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 5 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
6 | 6 | ||
7 | /* | ||
8 | * Memory returned by kmalloc() may be used for DMA, so we must make | ||
9 | * sure that all such allocations are cache aligned. Otherwise, | ||
10 | * unrelated code may cause parts of the buffer to be read into the | ||
11 | * cache before the transfer is done, causing old data to be seen by | ||
12 | * the CPU. | ||
13 | */ | ||
14 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
15 | |||
7 | #ifndef __ASSEMBLER__ | 16 | #ifndef __ASSEMBLER__ |
8 | struct cache_info { | 17 | struct cache_info { |
9 | unsigned int ways; | 18 | unsigned int ways; |
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/blackfin.h b/include/asm-blackfin/blackfin.h index 14e58de73973..25b934b7f829 100644 --- a/include/asm-blackfin/blackfin.h +++ b/include/asm-blackfin/blackfin.h | |||
@@ -6,7 +6,11 @@ | |||
6 | #ifndef _BLACKFIN_H_ | 6 | #ifndef _BLACKFIN_H_ |
7 | #define _BLACKFIN_H_ | 7 | #define _BLACKFIN_H_ |
8 | 8 | ||
9 | #include <asm/macros.h> | 9 | #define LO(con32) ((con32) & 0xFFFF) |
10 | #define lo(con32) ((con32) & 0xFFFF) | ||
11 | #define HI(con32) (((con32) >> 16) & 0xFFFF) | ||
12 | #define hi(con32) (((con32) >> 16) & 0xFFFF) | ||
13 | |||
10 | #include <asm/mach/blackfin.h> | 14 | #include <asm/mach/blackfin.h> |
11 | #include <asm/bfin-global.h> | 15 | #include <asm/bfin-global.h> |
12 | 16 | ||
@@ -35,7 +39,9 @@ static inline void SSYNC (void) | |||
35 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 39 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
36 | static inline void SSYNC (void) | 40 | static inline void SSYNC (void) |
37 | { | 41 | { |
38 | __builtin_bfin_ssync(); | 42 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
43 | "ssync;\n\t" | ||
44 | ::); | ||
39 | } | 45 | } |
40 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 46 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
41 | static inline void SSYNC (void) | 47 | static inline void SSYNC (void) |
@@ -67,7 +73,9 @@ static inline void CSYNC (void) | |||
67 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 73 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
68 | static inline void CSYNC (void) | 74 | static inline void CSYNC (void) |
69 | { | 75 | { |
70 | __builtin_bfin_csync(); | 76 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
77 | "ssync;\n\t" | ||
78 | ::); | ||
71 | } | 79 | } |
72 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 80 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
73 | static inline void CSYNC (void) | 81 | static inline void CSYNC (void) |
@@ -76,6 +84,31 @@ static inline void CSYNC (void) | |||
76 | } | 84 | } |
77 | #endif | 85 | #endif |
78 | 86 | ||
87 | #else /* __ASSEMBLY__ */ | ||
88 | |||
89 | /* SSYNC & CSYNC implementations for assembly files */ | ||
90 | |||
91 | #define ssync(x) SSYNC(x) | ||
92 | #define csync(x) CSYNC(x) | ||
93 | |||
94 | #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
95 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
96 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
97 | |||
98 | #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
99 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
100 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
101 | |||
102 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
103 | #define SSYNC(scratch) nop; nop; nop; SSYNC; | ||
104 | #define CSYNC(scratch) nop; nop; nop; CSYNC; | ||
105 | |||
106 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
107 | #define SSYNC(scratch) SSYNC; | ||
108 | #define CSYNC(scratch) CSYNC; | ||
109 | |||
110 | #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */ | ||
111 | |||
79 | #endif /* __ASSEMBLY__ */ | 112 | #endif /* __ASSEMBLY__ */ |
80 | 113 | ||
81 | #endif /* _BLACKFIN_H_ */ | 114 | #endif /* _BLACKFIN_H_ */ |
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/dma-mapping.h b/include/asm-blackfin/dma-mapping.h index 7a77d7fe3a33..282fabccf6a6 100644 --- a/include/asm-blackfin/dma-mapping.h +++ b/include/asm-blackfin/dma-mapping.h | |||
@@ -15,6 +15,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
17 | 17 | ||
18 | #define dma_mapping_error | ||
19 | |||
18 | /* | 20 | /* |
19 | * Map a single buffer of the indicated size for DMA in streaming mode. | 21 | * Map a single buffer of the indicated size for DMA in streaming mode. |
20 | * The 32-bit bus address to use is returned. | 22 | * The 32-bit bus address to use is returned. |
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 aa0d5503e232..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 |
@@ -332,6 +388,7 @@ struct gpio_port_s { | |||
332 | unsigned short inen; | 388 | unsigned short inen; |
333 | 389 | ||
334 | unsigned short fer; | 390 | unsigned short fer; |
391 | unsigned short reserved; | ||
335 | }; | 392 | }; |
336 | #endif /*CONFIG_PM*/ | 393 | #endif /*CONFIG_PM*/ |
337 | 394 | ||
@@ -356,8 +413,10 @@ void gpio_free(unsigned short); | |||
356 | void gpio_set_value(unsigned short gpio, unsigned short arg); | 413 | void gpio_set_value(unsigned short gpio, unsigned short arg); |
357 | unsigned short gpio_get_value(unsigned short gpio); | 414 | unsigned short gpio_get_value(unsigned short gpio); |
358 | 415 | ||
416 | #ifndef BF548_FAMILY | ||
359 | #define gpio_get_value(gpio) get_gpio_data(gpio) | 417 | #define gpio_get_value(gpio) get_gpio_data(gpio) |
360 | #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 | ||
361 | 420 | ||
362 | void gpio_direction_input(unsigned short gpio); | 421 | void gpio_direction_input(unsigned short gpio); |
363 | 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/io.h b/include/asm-blackfin/io.h index eac8bcaf64c2..142cb333db29 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | 22 | ||
23 | static inline unsigned char readb(void __iomem *addr) | 23 | static inline unsigned char readb(const volatile void __iomem *addr) |
24 | { | 24 | { |
25 | unsigned int val; | 25 | unsigned int val; |
26 | int tmp; | 26 | int tmp; |
@@ -35,7 +35,7 @@ static inline unsigned char readb(void __iomem *addr) | |||
35 | return (unsigned char) val; | 35 | return (unsigned char) val; |
36 | } | 36 | } |
37 | 37 | ||
38 | static inline unsigned short readw(void __iomem *addr) | 38 | static inline unsigned short readw(const volatile void __iomem *addr) |
39 | { | 39 | { |
40 | unsigned int val; | 40 | unsigned int val; |
41 | int tmp; | 41 | int tmp; |
@@ -50,7 +50,7 @@ static inline unsigned short readw(void __iomem *addr) | |||
50 | return (unsigned short) val; | 50 | return (unsigned short) val; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline unsigned int readl(void __iomem *addr) | 53 | static inline unsigned int readl(const volatile void __iomem *addr) |
54 | { | 54 | { |
55 | unsigned int val; | 55 | unsigned int val; |
56 | int tmp; | 56 | int tmp; |
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/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index a84d3909345e..7302f290b93d 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -43,7 +43,8 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ | 45 | /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ |
46 | #if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) | 46 | #if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_4) \ |
47 | || defined(CONFIG_BF_REV_0_3)) | ||
47 | #define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in | 48 | #define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in |
48 | slot1 and store of a P register in slot 2 is not | 49 | slot1 and store of a P register in slot 2 is not |
49 | supported */ | 50 | supported */ |
@@ -76,11 +77,16 @@ | |||
76 | control */ | 77 | control */ |
77 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when | 78 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when |
78 | killed in a particular stage*/ | 79 | killed in a particular stage*/ |
80 | #define ANOMALY_05000311 /* Erroneous flag pin operations under specific | ||
81 | sequences */ | ||
79 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC | 82 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC |
80 | registers are interrupted */ | 83 | registers are interrupted */ |
81 | #define ANOMALY_05000311 /* Erroneous flag pin operations under specific sequences*/ | 84 | #define ANOMALY_05000313 /* PPI Is Level-Sensitive on First Transfer */ |
82 | 85 | #define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously On | |
83 | #endif | 86 | * Next System MMR Access */ |
87 | #define ANOMALY_05000319 /* Internal Voltage Regulator Values of 1.05V, 1.10V | ||
88 | * and 1.15V Not Allowed for LQFP Packages */ | ||
89 | #endif /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ | ||
84 | 90 | ||
85 | /* These issues only occur on 0.3 or 0.4 BF533 */ | 91 | /* These issues only occur on 0.3 or 0.4 BF533 */ |
86 | #if (defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) | 92 | #if (defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) |
@@ -134,14 +140,14 @@ | |||
134 | internal voltage regulator (VDDint) to increase. */ | 140 | internal voltage regulator (VDDint) to increase. */ |
135 | #define ANOMALY_05000270 /* High I/O activity causes the output voltage of the | 141 | #define ANOMALY_05000270 /* High I/O activity causes the output voltage of the |
136 | internal voltage regulator (VDDint) to decrease */ | 142 | internal voltage regulator (VDDint) to decrease */ |
137 | #endif | 143 | #endif /* issues only occur on 0.3 or 0.4 BF533 */ |
138 | 144 | ||
139 | /* These issues are only on 0.4 silicon */ | 145 | /* These issues are only on 0.4 silicon */ |
140 | #if (defined(CONFIG_BF_REV_0_4)) | 146 | #if (defined(CONFIG_BF_REV_0_4)) |
141 | #define ANOMALY_05000234 /* Incorrect Revision Number in DSPID Register */ | 147 | #define ANOMALY_05000234 /* Incorrect Revision Number in DSPID Register */ |
142 | #define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel | 148 | #define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel |
143 | (TDM) */ | 149 | (TDM) */ |
144 | #endif | 150 | #endif /* issues are only on 0.4 silicon */ |
145 | 151 | ||
146 | /* These issues are only on 0.3 silicon */ | 152 | /* These issues are only on 0.3 silicon */ |
147 | #if defined(CONFIG_BF_REV_0_3) | 153 | #if defined(CONFIG_BF_REV_0_3) |
@@ -170,6 +176,72 @@ | |||
170 | #define ANOMALY_05000233 /* PPI_FS3 is not driven in 2 or 3 internal Frame | 176 | #define ANOMALY_05000233 /* PPI_FS3 is not driven in 2 or 3 internal Frame |
171 | Sync Transmit Mode */ | 177 | Sync Transmit Mode */ |
172 | #define ANOMALY_05000271 /* Spontaneous reset of Internal Voltage Regulator */ | 178 | #define ANOMALY_05000271 /* Spontaneous reset of Internal Voltage Regulator */ |
179 | #endif /* only on 0.3 silicon */ | ||
180 | |||
181 | #if defined(CONFIG_BF_REV_0_2) | ||
182 | #define ANOMALY_05000067 /* Watchpoints (Hardware Breakpoints) are not | ||
183 | * supported */ | ||
184 | #define ANOMALY_05000109 /* Reserved bits in SYSCFG register not set at | ||
185 | * power on */ | ||
186 | #define ANOMALY_05000116 /* Trace Buffers may record discontinuities into | ||
187 | * emulation mode and/or exception, NMI, reset | ||
188 | * handlers */ | ||
189 | #define ANOMALY_05000123 /* DTEST_COMMAND initiated memory access may be | ||
190 | * incorrect if data cache or DMA is active */ | ||
191 | #define ANOMALY_05000124 /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, | ||
192 | * or 1:1 */ | ||
193 | #define ANOMALY_05000125 /* Erroneous exception when enabling cache */ | ||
194 | #define ANOMALY_05000126 /* SPI clock polarity and phase bits incorrect | ||
195 | * during booting */ | ||
196 | #define ANOMALY_05000137 /* DMEM_CONTROL is not set on Reset */ | ||
197 | #define ANOMALY_05000138 /* SPI boot will not complete if there is a zero fill | ||
198 | * block in the loader file */ | ||
199 | #define ANOMALY_05000140 /* Allowing the SPORT RX FIFO to fill will cause an | ||
200 | * overflow */ | ||
201 | #define ANOMALY_05000141 /* An Infinite Stall occurs with a particular sequence | ||
202 | * of consecutive dual dag events */ | ||
203 | #define ANOMALY_05000142 /* Interrupts may be lost when a programmable input | ||
204 | * flag is configured to be edge sensitive */ | ||
205 | #define ANOMALY_05000143 /* A read from external memory may return a wrong | ||
206 | * value with data cache enabled */ | ||
207 | #define ANOMALY_05000144 /* DMA and TESTSET conflict when both are accessing | ||
208 | * external memory */ | ||
209 | #define ANOMALY_05000145 /* In PWM_OUT mode, you must enable the PPI block to | ||
210 | * generate a waveform from PPI_CLK */ | ||
211 | #define ANOMALY_05000146 /* MDMA may lose the first few words of a descriptor | ||
212 | * chain */ | ||
213 | #define ANOMALY_05000147 /* The source MDMA descriptor may stop with a DMA | ||
214 | * Error */ | ||
215 | #define ANOMALY_05000148 /* When booting from a 16-bit asynchronous memory | ||
216 | * device, the upper 8-bits of each word must be | ||
217 | * 0x00 */ | ||
218 | #define ANOMALY_05000153 /* Frame Delay in SPORT Multichannel Mode */ | ||
219 | #define ANOMALY_05000154 /* SPORT TFS signal is active in Multi-channel mode | ||
220 | * outside of valid channels */ | ||
221 | #define ANOMALY_05000155 /* Timer1 can not be used for PWMOUT mode when a | ||
222 | * certain PPI mode is in use */ | ||
223 | #define ANOMALY_05000157 /* A killed 32-bit System MMR write will lead to | ||
224 | * the next system MMR access thinking it should be | ||
225 | * 32-bit. */ | ||
226 | #define ANOMALY_05000163 /* SPORT transmit data is not gated by external frame | ||
227 | * sync in certain conditions */ | ||
228 | #define ANOMALY_05000168 /* SDRAM auto-refresh and subsequent Power Ups */ | ||
229 | #define ANOMALY_05000169 /* DATA CPLB page miss can result in lost | ||
230 | * write-through cache data writes */ | ||
231 | #define ANOMALY_05000173 /* DMA vs Core accesses to external memory */ | ||
232 | #define ANOMALY_05000174 /* Cache Fill Buffer Data lost */ | ||
233 | #define ANOMALY_05000175 /* Overlapping Sequencer and Memory Stalls */ | ||
234 | #define ANOMALY_05000176 /* Multiplication of (-1) by (-1) followed by an | ||
235 | * accumulator saturation */ | ||
236 | #define ANOMALY_05000181 /* Disabling the PPI resets the PPI configuration | ||
237 | * registers */ | ||
238 | #define ANOMALY_05000185 /* PPI TX Mode with 2 External Frame Syncs */ | ||
239 | #define ANOMALY_05000191 /* PPI does not invert the Driving PPICLK edge in | ||
240 | * Transmit Modes */ | ||
241 | #define ANOMALY_05000192 /* In PPI Transmit Modes with External Frame Syncs | ||
242 | * POLC */ | ||
243 | #define ANOMALY_05000206 /* Internal Voltage Regulator may not start up */ | ||
244 | |||
173 | #endif | 245 | #endif |
174 | 246 | ||
175 | #endif /* _MACH_ANOMALY_H_ */ | 247 | #endif /* _MACH_ANOMALY_H_ */ |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index 23bf76aa3451..e043cafa3c42 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -78,6 +78,7 @@ struct bfin_serial_res { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct bfin_serial_res bfin_serial_resource[] = { | 80 | struct bfin_serial_res bfin_serial_resource[] = { |
81 | { | ||
81 | 0xFFC00400, | 82 | 0xFFC00400, |
82 | IRQ_UART_RX, | 83 | IRQ_UART_RX, |
83 | #ifdef CONFIG_SERIAL_BFIN_DMA | 84 | #ifdef CONFIG_SERIAL_BFIN_DMA |
@@ -88,6 +89,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
88 | CONFIG_UART0_CTS_PIN, | 89 | CONFIG_UART0_CTS_PIN, |
89 | CONFIG_UART0_RTS_PIN, | 90 | CONFIG_UART0_RTS_PIN, |
90 | #endif | 91 | #endif |
92 | } | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | 95 | ||
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/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index 7f040f5ba018..4453e614c3b1 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -73,8 +73,13 @@ | |||
73 | control */ | 73 | control */ |
74 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when | 74 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when |
75 | killed in a particular stage*/ | 75 | killed in a particular stage*/ |
76 | #define ANOMALY_05000310 /* False hardware errors caused by fetches at the | ||
77 | * boundary of reserved memory */ | ||
76 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC | 78 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC |
77 | registers are interrupted */ | 79 | registers are interrupted */ |
80 | #define ANOMALY_05000313 /* PPI is level sensitive on first transfer */ | ||
81 | #define ANOMALY_05000322 /* EMAC RMII mode at 10-Base-T speed: RX frames not | ||
82 | * received properly */ | ||
78 | #endif | 83 | #endif |
79 | 84 | ||
80 | #if defined(CONFIG_BF_REV_0_2) | 85 | #if defined(CONFIG_BF_REV_0_2) |
@@ -114,7 +119,21 @@ | |||
114 | DMA system instability */ | 119 | DMA system instability */ |
115 | #define ANOMALY_05000280 /* SPI Master boot mode does not work well with | 120 | #define ANOMALY_05000280 /* SPI Master boot mode does not work well with |
116 | Atmel Dataflash devices */ | 121 | Atmel Dataflash devices */ |
117 | 122 | #define ANOMALY_05000281 /* False Hardware Error Exception when ISR context | |
123 | * is not restored */ | ||
124 | #define ANOMALY_05000282 /* Memory DMA corruption with 32-bit data and traffic | ||
125 | * control */ | ||
126 | #define ANOMALY_05000283 /* System MMR Write Is Stalled Indefinitely When | ||
127 | * Killed in a Particular Stage */ | ||
128 | #define ANOMALY_05000285 /* New Feature: EMAC TX DMA Word Alignment | ||
129 | * (Not Available On Older Silicon) */ | ||
130 | #define ANOMALY_05000288 /* SPORTs may receive bad data if FIFOs fill up */ | ||
131 | #define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously | ||
132 | * On Next System MMR Access */ | ||
133 | #define ANOMALY_05000316 /* EMAC RMII mode: collisions occur in Full Duplex | ||
134 | * mode */ | ||
135 | #define ANOMALY_05000321 /* EMAC RMII mode: TX frames in half duplex fail with | ||
136 | * status No Carrier */ | ||
118 | #endif /* CONFIG_BF_REV_0_2 */ | 137 | #endif /* CONFIG_BF_REV_0_2 */ |
119 | 138 | ||
120 | #endif /* _MACH_ANOMALY_H_ */ | 139 | #endif /* _MACH_ANOMALY_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/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 23bf76aa3451..e043cafa3c42 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -78,6 +78,7 @@ struct bfin_serial_res { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct bfin_serial_res bfin_serial_resource[] = { | 80 | struct bfin_serial_res bfin_serial_resource[] = { |
81 | { | ||
81 | 0xFFC00400, | 82 | 0xFFC00400, |
82 | IRQ_UART_RX, | 83 | IRQ_UART_RX, |
83 | #ifdef CONFIG_SERIAL_BFIN_DMA | 84 | #ifdef CONFIG_SERIAL_BFIN_DMA |
@@ -88,6 +89,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
88 | CONFIG_UART0_CTS_PIN, | 89 | CONFIG_UART0_CTS_PIN, |
89 | CONFIG_UART0_RTS_PIN, | 90 | CONFIG_UART0_RTS_PIN, |
90 | #endif | 91 | #endif |
92 | } | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | 95 | ||
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 d39c396f850d..94ed381e5606 100644 --- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h | |||
@@ -39,7 +39,11 @@ | |||
39 | #define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS) | 39 | #define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS) |
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 | ||
43 | extern void bfin_write_DMEM_CONTROL(unsigned int val); | ||
44 | #else | ||
42 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) | 45 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) |
46 | #endif | ||
43 | #define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS) | 47 | #define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS) |
44 | #define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val) | 48 | #define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val) |
45 | #define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR) | 49 | #define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR) |
@@ -125,7 +129,11 @@ | |||
125 | #define DTEST_DATA3 0xFFE0040C | 129 | #define DTEST_DATA3 0xFFE0040C |
126 | */ | 130 | */ |
127 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) | 131 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) |
132 | #ifdef ANOMALY_05000125 | ||
133 | extern void bfin_write_IMEM_CONTROL(unsigned int val); | ||
134 | #else | ||
128 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) | 135 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) |
136 | #endif | ||
129 | #define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS) | 137 | #define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS) |
130 | #define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val) | 138 | #define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val) |
131 | #define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR) | 139 | #define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR) |
diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h index 76103526aec1..be1ece8c0c27 100644 --- a/include/asm-blackfin/mach-common/def_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h | |||
@@ -42,6 +42,12 @@ | |||
42 | 42 | ||
43 | #if defined(ANOMALY_05000198) | 43 | #if defined(ANOMALY_05000198) |
44 | 44 | ||
45 | #define bfin_read8(addr) ({ unsigned char __v; \ | ||
46 | __asm__ __volatile__ ("NOP;\n\t" \ | ||
47 | "%0 = b[%1] (z);\n\t" \ | ||
48 | : "=d"(__v) : "a"(addr)); \ | ||
49 | __v; }) | ||
50 | |||
45 | #define bfin_read16(addr) ({ unsigned __v; \ | 51 | #define bfin_read16(addr) ({ unsigned __v; \ |
46 | __asm__ __volatile__ ("NOP;\n\t"\ | 52 | __asm__ __volatile__ ("NOP;\n\t"\ |
47 | "%0 = w[%1] (z);\n\t"\ | 53 | "%0 = w[%1] (z);\n\t"\ |
@@ -52,6 +58,11 @@ | |||
52 | "%0 = [%1];\n\t"\ | 58 | "%0 = [%1];\n\t"\ |
53 | : "=d"(__v) : "a"(addr)); __v; }) | 59 | : "=d"(__v) : "a"(addr)); __v; }) |
54 | 60 | ||
61 | #define bfin_write8(addr, val) ({ \ | ||
62 | __asm__ __volatile__ ("NOP;\n\t" \ | ||
63 | "b[%0] = %1;\n\t" \ | ||
64 | : : "a"(addr), "d"(val) : "memory");}) | ||
65 | |||
55 | #define bfin_write16(addr,val) ({\ | 66 | #define bfin_write16(addr,val) ({\ |
56 | __asm__ __volatile__ ("NOP;\n\t"\ | 67 | __asm__ __volatile__ ("NOP;\n\t"\ |
57 | "w[%0] = %1;\n\t"\ | 68 | "w[%0] = %1;\n\t"\ |
@@ -64,6 +75,12 @@ | |||
64 | 75 | ||
65 | #else | 76 | #else |
66 | 77 | ||
78 | #define bfin_read8(addr) ({ unsigned char __v; \ | ||
79 | __asm__ __volatile__ ( \ | ||
80 | "%0 = b[%1] (z);\n\t" \ | ||
81 | :"=d"(__v) : "a"(addr)); \ | ||
82 | __v; }) | ||
83 | |||
67 | #define bfin_read16(addr) ({ unsigned __v; \ | 84 | #define bfin_read16(addr) ({ unsigned __v; \ |
68 | __asm__ __volatile__ (\ | 85 | __asm__ __volatile__ (\ |
69 | "%0 = w[%1] (z);\n\t"\ | 86 | "%0 = w[%1] (z);\n\t"\ |
@@ -74,6 +91,11 @@ | |||
74 | "%0 = [%1];\n\t"\ | 91 | "%0 = [%1];\n\t"\ |
75 | : "=d"(__v) : "a"(addr)); __v; }) | 92 | : "=d"(__v) : "a"(addr)); __v; }) |
76 | 93 | ||
94 | #define bfin_write8(addr, val) ({ \ | ||
95 | __asm__ __volatile__ ( \ | ||
96 | "b[%0] = %1; \n\t" \ | ||
97 | ::"a"(addr), "d"(val) : "memory");}) | ||
98 | |||
77 | #define bfin_write16(addr,val) ({\ | 99 | #define bfin_write16(addr,val) ({\ |
78 | __asm__ __volatile__ (\ | 100 | __asm__ __volatile__ (\ |
79 | "w[%0] = %1;\n\t"\ | 101 | "w[%0] = %1;\n\t"\ |
diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h deleted file mode 100644 index c0c04a2f2dd5..000000000000 --- a/include/asm-blackfin/macros.h +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /************************************************************************ | ||
2 | * | ||
3 | * macros.h | ||
4 | * | ||
5 | * (c) Copyright 2001-2003 Analog Devices, Inc. All rights reserved. | ||
6 | * | ||
7 | ************************************************************************/ | ||
8 | |||
9 | /* Defines various assembly macros. */ | ||
10 | |||
11 | #ifndef _MACROS_H | ||
12 | #define _MACROS_H | ||
13 | |||
14 | #define LO(con32) ((con32) & 0xFFFF) | ||
15 | #define lo(con32) ((con32) & 0xFFFF) | ||
16 | #define HI(con32) (((con32) >> 16) & 0xFFFF) | ||
17 | #define hi(con32) (((con32) >> 16) & 0xFFFF) | ||
18 | |||
19 | /* | ||
20 | * Set the corresponding bits in a System Register (SR); | ||
21 | * All bits set in "mask" will be set in the system register | ||
22 | * specified by "sys_reg" bitset_SR(sys_reg, mask), where | ||
23 | * sys_reg is the system register and mask are the bits to be set. | ||
24 | */ | ||
25 | #define bitset_SR(sys_reg, mask)\ | ||
26 | [--SP] = (R7:6);\ | ||
27 | r7 = sys_reg;\ | ||
28 | r6.l = (mask) & 0xffff;\ | ||
29 | r6.h = (mask) >> 16;\ | ||
30 | r7 = r7 | r6;\ | ||
31 | sys_reg = r7;\ | ||
32 | csync;\ | ||
33 | (R7:6) = [SP++] | ||
34 | |||
35 | /* | ||
36 | * Clear the corresponding bits in a System Register (SR); | ||
37 | * All bits set in "mask" will be cleared in the SR | ||
38 | * specified by "sys_reg" bitclr_SR(sys_reg, mask), where | ||
39 | * sys_reg is the SR and mask are the bits to be cleared. | ||
40 | */ | ||
41 | #define bitclr_SR(sys_reg, mask)\ | ||
42 | [--SP] = (R7:6);\ | ||
43 | r7 = sys_reg;\ | ||
44 | r7 =~ r7;\ | ||
45 | r6.l = (mask) & 0xffff;\ | ||
46 | r6.h = (mask) >> 16;\ | ||
47 | r7 = r7 | r6;\ | ||
48 | r7 =~ r7;\ | ||
49 | sys_reg = r7;\ | ||
50 | csync;\ | ||
51 | (R7:6) = [SP++] | ||
52 | |||
53 | /* | ||
54 | * Set the corresponding bits in a Memory Mapped Register (MMR); | ||
55 | * All bits set in "mask" will be set in the MMR specified by "mmr_reg" | ||
56 | * bitset_MMR(mmr_reg, mask), where mmr_reg is the MMR and mask are | ||
57 | * the bits to be set. | ||
58 | */ | ||
59 | #define bitset_MMR(mmr_reg, mask)\ | ||
60 | [--SP] = (R7:6);\ | ||
61 | [--SP] = P5;\ | ||
62 | p5.l = mmr_reg & 0xffff;\ | ||
63 | p5.h = mmr_reg >> 16;\ | ||
64 | r7 = [p5];\ | ||
65 | r6.l = (mask) & 0xffff;\ | ||
66 | r6.h = (mask) >> 16;\ | ||
67 | r7 = r7 | r6;\ | ||
68 | [p5] = r7;\ | ||
69 | csync;\ | ||
70 | p5 = [SP++];\ | ||
71 | (R7:6) = [SP++] | ||
72 | |||
73 | /* | ||
74 | * Clear the corresponding bits in a Memory Mapped Register (MMR); | ||
75 | * All bits set in "mask" will be cleared in the MMR specified by "mmr_reg" | ||
76 | * bitclr_MMRreg(mmr_reg, mask), where sys_reg is the MMR and mask are | ||
77 | * the bits to be cleared. | ||
78 | */ | ||
79 | #define bitclr_MMR(mmr_reg, mask)\ | ||
80 | [--SP] = (R7:6);\ | ||
81 | [--SP] = P5;\ | ||
82 | p5.l = mmr_reg & 0xffff;\ | ||
83 | p5.h = mmr_reg >> 16;\ | ||
84 | r7 = [p5];\ | ||
85 | r7 =~ r7;\ | ||
86 | r6.l = (mask) & 0xffff;\ | ||
87 | r6.h = (mask) >> 16;\ | ||
88 | r7 = r7 | r6;\ | ||
89 | r7 =~ r7;\ | ||
90 | [p5] = r7;\ | ||
91 | csync;\ | ||
92 | p5 = [SP++];\ | ||
93 | (R7:6) = [SP++] | ||
94 | |||
95 | #endif /* _MACROS_H */ | ||
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/processor.h b/include/asm-blackfin/processor.h index aba2b30a8ed8..6bb3e0d4705d 100644 --- a/include/asm-blackfin/processor.h +++ b/include/asm-blackfin/processor.h | |||
@@ -124,6 +124,10 @@ static inline __attribute_pure__ uint32_t bfin_compiled_revid(void) | |||
124 | return 4; | 124 | return 4; |
125 | #elif defined(CONFIG_BF_REV_0_5) | 125 | #elif defined(CONFIG_BF_REV_0_5) |
126 | return 5; | 126 | return 5; |
127 | #elif defined(CONFIG_BF_REV_ANY) | ||
128 | return 0xffff; | ||
129 | #else | ||
130 | return -1; | ||
127 | #endif | 131 | #endif |
128 | } | 132 | } |
129 | 133 | ||
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-blackfin/unistd.h b/include/asm-blackfin/unistd.h index 4df8790a67d5..0df9f2d322a3 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -369,7 +369,6 @@ | |||
369 | #define __ARCH_WANT_SYS_NICE | 369 | #define __ARCH_WANT_SYS_NICE |
370 | #define __ARCH_WANT_SYS_RT_SIGACTION | 370 | #define __ARCH_WANT_SYS_RT_SIGACTION |
371 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 371 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
372 | #endif | ||
373 | 372 | ||
374 | /* | 373 | /* |
375 | * "Conditional" syscalls | 374 | * "Conditional" syscalls |
@@ -379,4 +378,6 @@ | |||
379 | */ | 378 | */ |
380 | #define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall"); | 379 | #define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall"); |
381 | 380 | ||
381 | #endif /* __KERNEL__ */ | ||
382 | |||
382 | #endif /* __ASM_BFIN_UNISTD_H */ | 383 | #endif /* __ASM_BFIN_UNISTD_H */ |
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 2687c7715120..adde69985255 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | struct mm_struct; | 28 | #include <linux/sched.h> |
29 | struct vm_area_struct; | 29 | struct vm_area_struct; |
30 | #endif | 30 | #endif |
31 | 31 | ||
@@ -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/bitops/sched.h b/include/asm-generic/bitops/sched.h index 815bb0148060..604fab7031a6 100644 --- a/include/asm-generic/bitops/sched.h +++ b/include/asm-generic/bitops/sched.h | |||
@@ -6,28 +6,23 @@ | |||
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Every architecture must define this function. It's the fastest | 8 | * Every architecture must define this function. It's the fastest |
9 | * way of searching a 140-bit bitmap where the first 100 bits are | 9 | * way of searching a 100-bit bitmap. It's guaranteed that at least |
10 | * unlikely to be set. It's guaranteed that at least one of the 140 | 10 | * one of the 100 bits is cleared. |
11 | * bits is cleared. | ||
12 | */ | 11 | */ |
13 | static inline int sched_find_first_bit(const unsigned long *b) | 12 | static inline int sched_find_first_bit(const unsigned long *b) |
14 | { | 13 | { |
15 | #if BITS_PER_LONG == 64 | 14 | #if BITS_PER_LONG == 64 |
16 | if (unlikely(b[0])) | 15 | if (b[0]) |
17 | return __ffs(b[0]); | 16 | return __ffs(b[0]); |
18 | if (likely(b[1])) | 17 | return __ffs(b[1]) + 64; |
19 | return __ffs(b[1]) + 64; | ||
20 | return __ffs(b[2]) + 128; | ||
21 | #elif BITS_PER_LONG == 32 | 18 | #elif BITS_PER_LONG == 32 |
22 | if (unlikely(b[0])) | 19 | if (b[0]) |
23 | return __ffs(b[0]); | 20 | return __ffs(b[0]); |
24 | if (unlikely(b[1])) | 21 | if (b[1]) |
25 | return __ffs(b[1]) + 32; | 22 | return __ffs(b[1]) + 32; |
26 | if (unlikely(b[2])) | 23 | if (b[2]) |
27 | return __ffs(b[2]) + 64; | 24 | return __ffs(b[2]) + 64; |
28 | if (b[3]) | 25 | return __ffs(b[3]) + 96; |
29 | return __ffs(b[3]) + 96; | ||
30 | return __ffs(b[4]) + 128; | ||
31 | #else | 26 | #else |
32 | #error BITS_PER_LONG not defined | 27 | #error BITS_PER_LONG not defined |
33 | #endif | 28 | #endif |
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-generic/pgtable.h b/include/asm-generic/pgtable.h index dc8f99ee305f..7d7bcf990e99 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -27,13 +27,20 @@ do { \ | |||
27 | * Largely same as above, but only sets the access flags (dirty, | 27 | * Largely same as above, but only sets the access flags (dirty, |
28 | * accessed, and writable). Furthermore, we know it always gets set | 28 | * accessed, and writable). Furthermore, we know it always gets set |
29 | * to a "more permissive" setting, which allows most architectures | 29 | * to a "more permissive" setting, which allows most architectures |
30 | * to optimize this. | 30 | * to optimize this. We return whether the PTE actually changed, which |
31 | * in turn instructs the caller to do things like update__mmu_cache. | ||
32 | * This used to be done in the caller, but sparc needs minor faults to | ||
33 | * force that call on sun4c so we changed this macro slightly | ||
31 | */ | 34 | */ |
32 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 35 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
33 | do { \ | 36 | ({ \ |
34 | set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ | 37 | int __changed = !pte_same(*(__ptep), __entry); \ |
35 | flush_tlb_page(__vma, __address); \ | 38 | if (__changed) { \ |
36 | } while (0) | 39 | set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ |
40 | flush_tlb_page(__vma, __address); \ | ||
41 | } \ | ||
42 | __changed; \ | ||
43 | }) | ||
37 | #endif | 44 | #endif |
38 | 45 | ||
39 | #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 46 | #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
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/dma-mapping.h b/include/asm-i386/dma-mapping.h index 183eebeebbdc..f1d72d177f68 100644 --- a/include/asm-i386/dma-mapping.h +++ b/include/asm-i386/dma-mapping.h | |||
@@ -123,6 +123,8 @@ dma_mapping_error(dma_addr_t dma_addr) | |||
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
126 | extern int forbid_dac; | ||
127 | |||
126 | static inline int | 128 | static inline int |
127 | dma_supported(struct device *dev, u64 mask) | 129 | dma_supported(struct device *dev, u64 mask) |
128 | { | 130 | { |
@@ -134,6 +136,10 @@ dma_supported(struct device *dev, u64 mask) | |||
134 | if(mask < 0x00ffffff) | 136 | if(mask < 0x00ffffff) |
135 | return 0; | 137 | return 0; |
136 | 138 | ||
139 | /* Work around chipset bugs */ | ||
140 | if (forbid_dac > 0 && mask > 0xffffffffULL) | ||
141 | return 0; | ||
142 | |||
137 | return 1; | 143 | return 1; |
138 | } | 144 | } |
139 | 145 | ||
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/mach-es7000/mach_apic.h b/include/asm-i386/mach-es7000/mach_apic.h index 2d978928a395..caec64be516d 100644 --- a/include/asm-i386/mach-es7000/mach_apic.h +++ b/include/asm-i386/mach-es7000/mach_apic.h | |||
@@ -73,6 +73,10 @@ static inline void init_apic_ldr(void) | |||
73 | apic_write_around(APIC_LDR, val); | 73 | apic_write_around(APIC_LDR, val); |
74 | } | 74 | } |
75 | 75 | ||
76 | #ifndef CONFIG_X86_GENERICARCH | ||
77 | extern void enable_apic_mode(void); | ||
78 | #endif | ||
79 | |||
76 | extern int apic_version [MAX_APICS]; | 80 | extern int apic_version [MAX_APICS]; |
77 | static inline void setup_apic_routing(void) | 81 | static inline void setup_apic_routing(void) |
78 | { | 82 | { |
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index b9fb784e1fd5..8aa10547b4b1 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -18,6 +18,12 @@ extern int parse_unisys_oem (char *oemptr); | |||
18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(void); | 19 | extern void setup_unisys(void); |
20 | 20 | ||
21 | #ifndef CONFIG_X86_GENERICARCH | ||
22 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | ||
23 | extern int mps_oem_check(struct mp_config_table *mpc, char *oem, | ||
24 | char *productid); | ||
25 | #endif | ||
26 | |||
21 | #ifdef CONFIG_ACPI | 27 | #ifdef CONFIG_ACPI |
22 | 28 | ||
23 | static inline int es7000_check_dsdt(void) | 29 | static inline int es7000_check_dsdt(void) |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index d7a0512f88e0..7f846a7d6bcc 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -539,7 +539,7 @@ static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) | |||
539 | val = paravirt_read_msr(msr, &_err); \ | 539 | val = paravirt_read_msr(msr, &_err); \ |
540 | } while(0) | 540 | } while(0) |
541 | 541 | ||
542 | #define wrmsrl(msr,val) ((void)paravirt_write_msr(msr, val, 0)) | 542 | #define wrmsrl(msr,val) wrmsr(msr, (u32)((u64)(val)), ((u64)(val))>>32) |
543 | #define wrmsr_safe(msr,a,b) paravirt_write_msr(msr, a, b) | 543 | #define wrmsr_safe(msr,a,b) paravirt_write_msr(msr, a, b) |
544 | 544 | ||
545 | /* rdmsr with exception handling */ | 545 | /* rdmsr with exception handling */ |
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 2394589786ba..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; } |
@@ -285,32 +279,36 @@ static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | |||
285 | */ | 279 | */ |
286 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 280 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
287 | #define ptep_set_access_flags(vma, address, ptep, entry, dirty) \ | 281 | #define ptep_set_access_flags(vma, address, ptep, entry, dirty) \ |
288 | do { \ | 282 | ({ \ |
289 | if (dirty) { \ | 283 | int __changed = !pte_same(*(ptep), entry); \ |
284 | if (__changed && dirty) { \ | ||
290 | (ptep)->pte_low = (entry).pte_low; \ | 285 | (ptep)->pte_low = (entry).pte_low; \ |
291 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ | 286 | pte_update_defer((vma)->vm_mm, (address), (ptep)); \ |
292 | flush_tlb_page(vma, address); \ | 287 | flush_tlb_page(vma, address); \ |
293 | } \ | 288 | } \ |
294 | } while (0) | 289 | __changed; \ |
290 | }) | ||
295 | 291 | ||
296 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 292 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
297 | #define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \ | 293 | #define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \ |
298 | int ret = 0; \ | 294 | int __ret = 0; \ |
299 | if (pte_dirty(*ptep)) \ | 295 | if (pte_dirty(*(ptep))) \ |
300 | ret = test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low); \ | 296 | __ret = test_and_clear_bit(_PAGE_BIT_DIRTY, \ |
301 | if (ret) \ | 297 | &(ptep)->pte_low); \ |
302 | pte_update_defer(vma->vm_mm, addr, ptep); \ | 298 | if (__ret) \ |
303 | ret; \ | 299 | pte_update((vma)->vm_mm, addr, ptep); \ |
300 | __ret; \ | ||
304 | }) | 301 | }) |
305 | 302 | ||
306 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 303 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
307 | #define ptep_test_and_clear_young(vma, addr, ptep) ({ \ | 304 | #define ptep_test_and_clear_young(vma, addr, ptep) ({ \ |
308 | int ret = 0; \ | 305 | int __ret = 0; \ |
309 | if (pte_young(*ptep)) \ | 306 | if (pte_young(*(ptep))) \ |
310 | ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); \ | 307 | __ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, \ |
311 | if (ret) \ | 308 | &(ptep)->pte_low); \ |
312 | pte_update_defer(vma->vm_mm, addr, ptep); \ | 309 | if (__ret) \ |
313 | ret; \ | 310 | pte_update((vma)->vm_mm, addr, ptep); \ |
311 | __ret; \ | ||
314 | }) | 312 | }) |
315 | 313 | ||
316 | /* | 314 | /* |
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 670b706411b8..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)) |
@@ -533,16 +530,23 @@ extern void lazy_mmu_prot_update (pte_t pte); | |||
533 | * daccess_bit in ivt.S). | 530 | * daccess_bit in ivt.S). |
534 | */ | 531 | */ |
535 | #ifdef CONFIG_SMP | 532 | #ifdef CONFIG_SMP |
536 | # define ptep_set_access_flags(__vma, __addr, __ptep, __entry, __safely_writable) \ | 533 | # define ptep_set_access_flags(__vma, __addr, __ptep, __entry, __safely_writable) \ |
537 | do { \ | 534 | ({ \ |
538 | if (__safely_writable) { \ | 535 | int __changed = !pte_same(*(__ptep), __entry); \ |
539 | set_pte(__ptep, __entry); \ | 536 | if (__changed && __safely_writable) { \ |
540 | flush_tlb_page(__vma, __addr); \ | 537 | set_pte(__ptep, __entry); \ |
541 | } \ | 538 | flush_tlb_page(__vma, __addr); \ |
542 | } while (0) | 539 | } \ |
540 | __changed; \ | ||
541 | }) | ||
543 | #else | 542 | #else |
544 | # define ptep_set_access_flags(__vma, __addr, __ptep, __entry, __safely_writable) \ | 543 | # define ptep_set_access_flags(__vma, __addr, __ptep, __entry, __safely_writable) \ |
545 | ptep_establish(__vma, __addr, __ptep, __entry) | 544 | ({ \ |
545 | int __changed = !pte_same(*(__ptep), __entry); \ | ||
546 | if (__changed) \ | ||
547 | ptep_establish(__vma, __addr, __ptep, __entry); \ | ||
548 | __changed; \ | ||
549 | }) | ||
546 | #endif | 550 | #endif |
547 | 551 | ||
548 | # ifdef CONFIG_VIRTUAL_MEM_MAP | 552 | # ifdef CONFIG_VIRTUAL_MEM_MAP |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 291e8ceed6e6..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 |
@@ -696,8 +716,8 @@ static inline int | |||
696 | sn_change_coherence(u64 *new_domain, u64 *old_domain) | 716 | sn_change_coherence(u64 *new_domain, u64 *old_domain) |
697 | { | 717 | { |
698 | struct ia64_sal_retval ret_stuff; | 718 | struct ia64_sal_retval ret_stuff; |
699 | ia64_sal_oemcall(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain, | 719 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain, |
700 | (u64)old_domain, 0, 0, 0, 0, 0); | 720 | (u64)old_domain, 0, 0, 0, 0, 0); |
701 | return ret_stuff.status; | 721 | return ret_stuff.status; |
702 | } | 722 | } |
703 | 723 | ||
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/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/addrspace.h b/include/asm-mips/addrspace.h index c6275088cf65..0b3ff9c48409 100644 --- a/include/asm-mips/addrspace.h +++ b/include/asm-mips/addrspace.h | |||
@@ -129,28 +129,12 @@ | |||
129 | #define PHYS_TO_XKPHYS(cm,a) (_CONST64_(0x8000000000000000) | \ | 129 | #define PHYS_TO_XKPHYS(cm,a) (_CONST64_(0x8000000000000000) | \ |
130 | ((cm)<<59) | (a)) | 130 | ((cm)<<59) | (a)) |
131 | 131 | ||
132 | #if defined (CONFIG_CPU_R4300) \ | 132 | /* |
133 | || defined (CONFIG_CPU_R4X00) \ | 133 | * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting |
134 | || defined (CONFIG_CPU_R5000) \ | 134 | * the region, 3 bits for the CCA mode. This leaves 59 bits of which the |
135 | || defined (CONFIG_CPU_RM7000) \ | 135 | * R8000 implements most with its 48-bit physical address space. |
136 | || defined (CONFIG_CPU_NEVADA) \ | 136 | */ |
137 | || defined (CONFIG_CPU_TX49XX) \ | 137 | #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ |
138 | || defined (CONFIG_CPU_MIPS64) | ||
139 | #define TO_PHYS_MASK _CONST64_(0x0000000fffffffff) /* 2^^36 - 1 */ | ||
140 | #endif | ||
141 | |||
142 | #if defined (CONFIG_CPU_R8000) | ||
143 | /* We keep KUSIZE consistent with R4000 for now (2^^40) instead of (2^^48) */ | ||
144 | #define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */ | ||
145 | #endif | ||
146 | |||
147 | #if defined (CONFIG_CPU_R10000) | ||
148 | #define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */ | ||
149 | #endif | ||
150 | |||
151 | #if defined(CONFIG_CPU_SB1) || defined(CONFIG_CPU_SB1A) | ||
152 | #define TO_PHYS_MASK _CONST64_(0x00000fffffffffff) /* 2^^44 - 1 */ | ||
153 | #endif | ||
154 | 138 | ||
155 | #ifndef CONFIG_CPU_R8000 | 139 | #ifndef CONFIG_CPU_R8000 |
156 | 140 | ||
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index d995413e11fd..d9e81af53f78 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -238,10 +238,11 @@ static inline int test_and_set_bit(unsigned long nr, | |||
238 | volatile unsigned long *addr) | 238 | volatile unsigned long *addr) |
239 | { | 239 | { |
240 | unsigned short bit = nr & SZLONG_MASK; | 240 | unsigned short bit = nr & SZLONG_MASK; |
241 | unsigned long res; | ||
241 | 242 | ||
242 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 243 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
243 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 244 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
244 | unsigned long temp, res; | 245 | unsigned long temp; |
245 | 246 | ||
246 | __asm__ __volatile__( | 247 | __asm__ __volatile__( |
247 | " .set mips3 \n" | 248 | " .set mips3 \n" |
@@ -254,11 +255,9 @@ static inline int test_and_set_bit(unsigned long nr, | |||
254 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 255 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
255 | : "r" (1UL << bit), "m" (*m) | 256 | : "r" (1UL << bit), "m" (*m) |
256 | : "memory"); | 257 | : "memory"); |
257 | |||
258 | return res != 0; | ||
259 | } else if (cpu_has_llsc) { | 258 | } else if (cpu_has_llsc) { |
260 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 259 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
261 | unsigned long temp, res; | 260 | unsigned long temp; |
262 | 261 | ||
263 | __asm__ __volatile__( | 262 | __asm__ __volatile__( |
264 | " .set push \n" | 263 | " .set push \n" |
@@ -277,25 +276,22 @@ static inline int test_and_set_bit(unsigned long nr, | |||
277 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 276 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
278 | : "r" (1UL << bit), "m" (*m) | 277 | : "r" (1UL << bit), "m" (*m) |
279 | : "memory"); | 278 | : "memory"); |
280 | |||
281 | return res != 0; | ||
282 | } else { | 279 | } else { |
283 | volatile unsigned long *a = addr; | 280 | volatile unsigned long *a = addr; |
284 | unsigned long mask; | 281 | unsigned long mask; |
285 | int retval; | ||
286 | unsigned long flags; | 282 | unsigned long flags; |
287 | 283 | ||
288 | a += nr >> SZLONG_LOG; | 284 | a += nr >> SZLONG_LOG; |
289 | mask = 1UL << bit; | 285 | mask = 1UL << bit; |
290 | raw_local_irq_save(flags); | 286 | raw_local_irq_save(flags); |
291 | retval = (mask & *a) != 0; | 287 | res = (mask & *a); |
292 | *a |= mask; | 288 | *a |= mask; |
293 | raw_local_irq_restore(flags); | 289 | raw_local_irq_restore(flags); |
294 | |||
295 | return retval; | ||
296 | } | 290 | } |
297 | 291 | ||
298 | smp_mb(); | 292 | smp_mb(); |
293 | |||
294 | return res != 0; | ||
299 | } | 295 | } |
300 | 296 | ||
301 | /* | 297 | /* |
@@ -310,10 +306,11 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
310 | volatile unsigned long *addr) | 306 | volatile unsigned long *addr) |
311 | { | 307 | { |
312 | unsigned short bit = nr & SZLONG_MASK; | 308 | unsigned short bit = nr & SZLONG_MASK; |
309 | unsigned long res; | ||
313 | 310 | ||
314 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 311 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
315 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 312 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
316 | unsigned long temp, res; | 313 | unsigned long temp; |
317 | 314 | ||
318 | __asm__ __volatile__( | 315 | __asm__ __volatile__( |
319 | " .set mips3 \n" | 316 | " .set mips3 \n" |
@@ -327,12 +324,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
327 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 324 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
328 | : "r" (1UL << bit), "m" (*m) | 325 | : "r" (1UL << bit), "m" (*m) |
329 | : "memory"); | 326 | : "memory"); |
330 | |||
331 | return res != 0; | ||
332 | #ifdef CONFIG_CPU_MIPSR2 | 327 | #ifdef CONFIG_CPU_MIPSR2 |
333 | } else if (__builtin_constant_p(nr)) { | 328 | } else if (__builtin_constant_p(nr)) { |
334 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 329 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
335 | unsigned long temp, res; | 330 | unsigned long temp; |
336 | 331 | ||
337 | __asm__ __volatile__( | 332 | __asm__ __volatile__( |
338 | "1: " __LL "%0, %1 # test_and_clear_bit \n" | 333 | "1: " __LL "%0, %1 # test_and_clear_bit \n" |
@@ -346,12 +341,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
346 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 341 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
347 | : "ri" (bit), "m" (*m) | 342 | : "ri" (bit), "m" (*m) |
348 | : "memory"); | 343 | : "memory"); |
349 | |||
350 | return res; | ||
351 | #endif | 344 | #endif |
352 | } else if (cpu_has_llsc) { | 345 | } else if (cpu_has_llsc) { |
353 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 346 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
354 | unsigned long temp, res; | 347 | unsigned long temp; |
355 | 348 | ||
356 | __asm__ __volatile__( | 349 | __asm__ __volatile__( |
357 | " .set push \n" | 350 | " .set push \n" |
@@ -371,25 +364,22 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
371 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 364 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
372 | : "r" (1UL << bit), "m" (*m) | 365 | : "r" (1UL << bit), "m" (*m) |
373 | : "memory"); | 366 | : "memory"); |
374 | |||
375 | return res != 0; | ||
376 | } else { | 367 | } else { |
377 | volatile unsigned long *a = addr; | 368 | volatile unsigned long *a = addr; |
378 | unsigned long mask; | 369 | unsigned long mask; |
379 | int retval; | ||
380 | unsigned long flags; | 370 | unsigned long flags; |
381 | 371 | ||
382 | a += nr >> SZLONG_LOG; | 372 | a += nr >> SZLONG_LOG; |
383 | mask = 1UL << bit; | 373 | mask = 1UL << bit; |
384 | raw_local_irq_save(flags); | 374 | raw_local_irq_save(flags); |
385 | retval = (mask & *a) != 0; | 375 | res = (mask & *a); |
386 | *a &= ~mask; | 376 | *a &= ~mask; |
387 | raw_local_irq_restore(flags); | 377 | raw_local_irq_restore(flags); |
388 | |||
389 | return retval; | ||
390 | } | 378 | } |
391 | 379 | ||
392 | smp_mb(); | 380 | smp_mb(); |
381 | |||
382 | return res != 0; | ||
393 | } | 383 | } |
394 | 384 | ||
395 | /* | 385 | /* |
@@ -404,10 +394,11 @@ static inline int test_and_change_bit(unsigned long nr, | |||
404 | volatile unsigned long *addr) | 394 | volatile unsigned long *addr) |
405 | { | 395 | { |
406 | unsigned short bit = nr & SZLONG_MASK; | 396 | unsigned short bit = nr & SZLONG_MASK; |
397 | unsigned long res; | ||
407 | 398 | ||
408 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 399 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
409 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 400 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
410 | unsigned long temp, res; | 401 | unsigned long temp; |
411 | 402 | ||
412 | __asm__ __volatile__( | 403 | __asm__ __volatile__( |
413 | " .set mips3 \n" | 404 | " .set mips3 \n" |
@@ -420,11 +411,9 @@ static inline int test_and_change_bit(unsigned long nr, | |||
420 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 411 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
421 | : "r" (1UL << bit), "m" (*m) | 412 | : "r" (1UL << bit), "m" (*m) |
422 | : "memory"); | 413 | : "memory"); |
423 | |||
424 | return res != 0; | ||
425 | } else if (cpu_has_llsc) { | 414 | } else if (cpu_has_llsc) { |
426 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 415 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
427 | unsigned long temp, res; | 416 | unsigned long temp; |
428 | 417 | ||
429 | __asm__ __volatile__( | 418 | __asm__ __volatile__( |
430 | " .set push \n" | 419 | " .set push \n" |
@@ -443,24 +432,22 @@ static inline int test_and_change_bit(unsigned long nr, | |||
443 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 432 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
444 | : "r" (1UL << bit), "m" (*m) | 433 | : "r" (1UL << bit), "m" (*m) |
445 | : "memory"); | 434 | : "memory"); |
446 | |||
447 | return res != 0; | ||
448 | } else { | 435 | } else { |
449 | volatile unsigned long *a = addr; | 436 | volatile unsigned long *a = addr; |
450 | unsigned long mask, retval; | 437 | unsigned long mask; |
451 | unsigned long flags; | 438 | unsigned long flags; |
452 | 439 | ||
453 | a += nr >> SZLONG_LOG; | 440 | a += nr >> SZLONG_LOG; |
454 | mask = 1UL << bit; | 441 | mask = 1UL << bit; |
455 | raw_local_irq_save(flags); | 442 | raw_local_irq_save(flags); |
456 | retval = (mask & *a) != 0; | 443 | res = (mask & *a); |
457 | *a ^= mask; | 444 | *a ^= mask; |
458 | raw_local_irq_restore(flags); | 445 | raw_local_irq_restore(flags); |
459 | |||
460 | return retval; | ||
461 | } | 446 | } |
462 | 447 | ||
463 | smp_mb(); | 448 | smp_mb(); |
449 | |||
450 | return res != 0; | ||
464 | } | 451 | } |
465 | 452 | ||
466 | #include <asm-generic/bitops/non-atomic.h> | 453 | #include <asm-generic/bitops/non-atomic.h> |
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index b0c329783ac5..087126a5faf9 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -109,18 +109,12 @@ | |||
109 | #define MACH_COSINE_ORION 0 | 109 | #define MACH_COSINE_ORION 0 |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * Valid machtype for group GALILEO | ||
113 | */ | ||
114 | #define MACH_GROUP_GALILEO 11 /* Galileo Eval Boards */ | ||
115 | #define MACH_EV64120A 0 /* EV64120A */ | ||
116 | |||
117 | /* | ||
118 | * Valid machtype for group MOMENCO | 112 | * Valid machtype for group MOMENCO |
119 | */ | 113 | */ |
120 | #define MACH_GROUP_MOMENCO 12 /* Momentum Boards */ | 114 | #define MACH_GROUP_MOMENCO 12 /* Momentum Boards */ |
121 | #define MACH_MOMENCO_OCELOT 0 | 115 | #define MACH_MOMENCO_OCELOT 0 |
122 | #define MACH_MOMENCO_OCELOT_G 1 /* no more supported (may 2007) */ | 116 | #define MACH_MOMENCO_OCELOT_G 1 /* no more supported (may 2007) */ |
123 | #define MACH_MOMENCO_OCELOT_C 2 | 117 | #define MACH_MOMENCO_OCELOT_C 2 /* no more supported (jun 2007) */ |
124 | #define MACH_MOMENCO_JAGUAR_ATX 3 /* no more supported (may 2007) */ | 118 | #define MACH_MOMENCO_JAGUAR_ATX 3 /* no more supported (may 2007) */ |
125 | #define MACH_MOMENCO_OCELOT_3 4 | 119 | #define MACH_MOMENCO_OCELOT_3 4 |
126 | 120 | ||
@@ -194,13 +188,6 @@ | |||
194 | #define MACH_HP_LASERJET 1 | 188 | #define MACH_HP_LASERJET 1 |
195 | 189 | ||
196 | /* | 190 | /* |
197 | * Valid machtype for group LASAT | ||
198 | */ | ||
199 | #define MACH_GROUP_LASAT 21 | ||
200 | #define MACH_LASAT_100 0 /* Masquerade II/SP100/SP50/SP25 */ | ||
201 | #define MACH_LASAT_200 1 /* Masquerade PRO/SP200 */ | ||
202 | |||
203 | /* | ||
204 | * Valid machtype for group TITAN | 191 | * Valid machtype for group TITAN |
205 | */ | 192 | */ |
206 | #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ | 193 | #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ |
@@ -213,6 +200,27 @@ | |||
213 | #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ | 200 | #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ |
214 | #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ | 201 | #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ |
215 | 202 | ||
203 | /* | ||
204 | * Valid machtype for group LEMOTE | ||
205 | */ | ||
206 | #define MACH_GROUP_LEMOTE 27 | ||
207 | #define MACH_LEMOTE_FULONG 0 | ||
208 | |||
209 | /* | ||
210 | * Valid machtype for group PMC-MSP | ||
211 | */ | ||
212 | #define MACH_GROUP_MSP 26 /* PMC-Sierra MSP boards/CPUs */ | ||
213 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ | ||
214 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ | ||
215 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ | ||
216 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ | ||
217 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ | ||
218 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ | ||
219 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ | ||
220 | |||
221 | #define MACH_GROUP_WINDRIVER 28 /* Windriver boards */ | ||
222 | #define MACH_WRPPMC 1 | ||
223 | |||
216 | #define CL_SIZE COMMAND_LINE_SIZE | 224 | #define CL_SIZE COMMAND_LINE_SIZE |
217 | 225 | ||
218 | const char *get_system_type(void); | 226 | const char *get_system_type(void); |
diff --git a/include/asm-mips/cacheops.h b/include/asm-mips/cacheops.h index c4a1ec31ff6a..df7f2deb3b56 100644 --- a/include/asm-mips/cacheops.h +++ b/include/asm-mips/cacheops.h | |||
@@ -20,7 +20,11 @@ | |||
20 | #define Index_Load_Tag_D 0x05 | 20 | #define Index_Load_Tag_D 0x05 |
21 | #define Index_Store_Tag_I 0x08 | 21 | #define Index_Store_Tag_I 0x08 |
22 | #define Index_Store_Tag_D 0x09 | 22 | #define Index_Store_Tag_D 0x09 |
23 | #if defined(CONFIG_CPU_LOONGSON2) | ||
24 | #define Hit_Invalidate_I 0x00 | ||
25 | #else | ||
23 | #define Hit_Invalidate_I 0x10 | 26 | #define Hit_Invalidate_I 0x10 |
27 | #endif | ||
24 | #define Hit_Invalidate_D 0x11 | 28 | #define Hit_Invalidate_D 0x11 |
25 | #define Hit_Writeback_Inv_D 0x15 | 29 | #define Hit_Writeback_Inv_D 0x15 |
26 | 30 | ||
diff --git a/include/asm-mips/compat-signal.h b/include/asm-mips/compat-signal.h index 6599a901b63e..368a99e5c3e1 100644 --- a/include/asm-mips/compat-signal.h +++ b/include/asm-mips/compat-signal.h | |||
@@ -10,6 +10,68 @@ | |||
10 | 10 | ||
11 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
12 | 12 | ||
13 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
14 | |||
15 | typedef struct compat_siginfo { | ||
16 | int si_signo; | ||
17 | int si_code; | ||
18 | int si_errno; | ||
19 | |||
20 | union { | ||
21 | int _pad[SI_PAD_SIZE32]; | ||
22 | |||
23 | /* kill() */ | ||
24 | struct { | ||
25 | compat_pid_t _pid; /* sender's pid */ | ||
26 | compat_uid_t _uid; /* sender's uid */ | ||
27 | } _kill; | ||
28 | |||
29 | /* SIGCHLD */ | ||
30 | struct { | ||
31 | compat_pid_t _pid; /* which child */ | ||
32 | compat_uid_t _uid; /* sender's uid */ | ||
33 | int _status; /* exit code */ | ||
34 | compat_clock_t _utime; | ||
35 | compat_clock_t _stime; | ||
36 | } _sigchld; | ||
37 | |||
38 | /* IRIX SIGCHLD */ | ||
39 | struct { | ||
40 | compat_pid_t _pid; /* which child */ | ||
41 | compat_clock_t _utime; | ||
42 | int _status; /* exit code */ | ||
43 | compat_clock_t _stime; | ||
44 | } _irix_sigchld; | ||
45 | |||
46 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
47 | struct { | ||
48 | s32 _addr; /* faulting insn/memory ref. */ | ||
49 | } _sigfault; | ||
50 | |||
51 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
52 | struct { | ||
53 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
54 | int _fd; | ||
55 | } _sigpoll; | ||
56 | |||
57 | /* POSIX.1b timers */ | ||
58 | struct { | ||
59 | timer_t _tid; /* timer id */ | ||
60 | int _overrun; /* overrun count */ | ||
61 | compat_sigval_t _sigval;/* same as below */ | ||
62 | int _sys_private; /* not to be passed to user */ | ||
63 | } _timer; | ||
64 | |||
65 | /* POSIX.1b signals */ | ||
66 | struct { | ||
67 | compat_pid_t _pid; /* sender's pid */ | ||
68 | compat_uid_t _uid; /* sender's uid */ | ||
69 | compat_sigval_t _sigval; | ||
70 | } _rt; | ||
71 | |||
72 | } _sifields; | ||
73 | } compat_siginfo_t; | ||
74 | |||
13 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | 75 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, |
14 | const sigset_t *s) | 76 | const sigset_t *s) |
15 | { | 77 | { |
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/cpu-features.h b/include/asm-mips/cpu-features.h index 5e4bed123b48..d95a83e3e1d7 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -150,6 +150,10 @@ | |||
150 | #define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) | 150 | #define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) |
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #ifndef cpu_has_userlocal | ||
154 | #define cpu_has_userlocal (cpu_data[0].options & MIPS_CPU_ULRI) | ||
155 | #endif | ||
156 | |||
153 | #ifdef CONFIG_32BIT | 157 | #ifdef CONFIG_32BIT |
154 | # ifndef cpu_has_nofpuex | 158 | # ifndef cpu_has_nofpuex |
155 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) | 159 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) |
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index d38fdbf845b2..3857358fb6de 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -89,6 +89,8 @@ | |||
89 | #define PRID_IMP_34K 0x9500 | 89 | #define PRID_IMP_34K 0x9500 |
90 | #define PRID_IMP_24KE 0x9600 | 90 | #define PRID_IMP_24KE 0x9600 |
91 | #define PRID_IMP_74K 0x9700 | 91 | #define PRID_IMP_74K 0x9700 |
92 | #define PRID_IMP_LOONGSON1 0x4200 | ||
93 | #define PRID_IMP_LOONGSON2 0x6300 | ||
92 | 94 | ||
93 | /* | 95 | /* |
94 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE | 96 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE |
@@ -107,6 +109,7 @@ | |||
107 | * Definitions for 7:0 on legacy processors | 109 | * Definitions for 7:0 on legacy processors |
108 | */ | 110 | */ |
109 | 111 | ||
112 | #define PRID_REV_MASK 0x00ff | ||
110 | 113 | ||
111 | #define PRID_REV_TX4927 0x0022 | 114 | #define PRID_REV_TX4927 0x0022 |
112 | #define PRID_REV_TX4937 0x0030 | 115 | #define PRID_REV_TX4937 0x0030 |
@@ -123,6 +126,18 @@ | |||
123 | #define PRID_REV_VR4122 0x0070 | 126 | #define PRID_REV_VR4122 0x0070 |
124 | #define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ | 127 | #define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ |
125 | #define PRID_REV_VR4130 0x0080 | 128 | #define PRID_REV_VR4130 0x0080 |
129 | #define PRID_REV_34K_V1_0_2 0x0022 | ||
130 | |||
131 | /* | ||
132 | * Older processors used to encode processor version and revision in two | ||
133 | * 4-bit bitfields, the 4K seems to simply count up and even newer MTI cores | ||
134 | * have switched to use the 8-bits as 3:3:2 bitfield with the last field as | ||
135 | * the patch number. *ARGH* | ||
136 | */ | ||
137 | #define PRID_REV_ENCODE_44(ver, rev) \ | ||
138 | ((ver) << 4 | (rev)) | ||
139 | #define PRID_REV_ENCODE_332(ver, rev, patch) \ | ||
140 | ((ver) << 5 | (rev) << 2 | (patch)) | ||
126 | 141 | ||
127 | /* | 142 | /* |
128 | * FPU implementation/revision register (CP1 control register 0). | 143 | * FPU implementation/revision register (CP1 control register 0). |
@@ -200,7 +215,10 @@ | |||
200 | #define CPU_SB1A 62 | 215 | #define CPU_SB1A 62 |
201 | #define CPU_74K 63 | 216 | #define CPU_74K 63 |
202 | #define CPU_R14000 64 | 217 | #define CPU_R14000 64 |
203 | #define CPU_LAST 64 | 218 | #define CPU_LOONGSON1 65 |
219 | #define CPU_LOONGSON2 66 | ||
220 | |||
221 | #define CPU_LAST 66 | ||
204 | 222 | ||
205 | /* | 223 | /* |
206 | * ISA Level encodings | 224 | * ISA Level encodings |
@@ -246,6 +264,7 @@ | |||
246 | #define MIPS_CPU_PREFETCH 0x00080000 /* CPU has usable prefetch */ | 264 | #define MIPS_CPU_PREFETCH 0x00080000 /* CPU has usable prefetch */ |
247 | #define MIPS_CPU_VINT 0x00100000 /* CPU supports MIPSR2 vectored interrupts */ | 265 | #define MIPS_CPU_VINT 0x00100000 /* CPU supports MIPSR2 vectored interrupts */ |
248 | #define MIPS_CPU_VEIC 0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */ | 266 | #define MIPS_CPU_VEIC 0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */ |
267 | #define MIPS_CPU_ULRI 0x00400000 /* CPU has ULRI feature */ | ||
249 | 268 | ||
250 | /* | 269 | /* |
251 | * CPU ASE encodings | 270 | * CPU ASE encodings |
diff --git a/include/asm-mips/div64.h b/include/asm-mips/div64.h index 66189f5f6399..716371bd0980 100644 --- a/include/asm-mips/div64.h +++ b/include/asm-mips/div64.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define do_div64_32(res, high, low, base) ({ \ | 22 | #define do_div64_32(res, high, low, base) ({ \ |
23 | unsigned long __quot, __mod; \ | 23 | unsigned long __quot32, __mod32; \ |
24 | unsigned long __cf, __tmp, __tmp2, __i; \ | 24 | unsigned long __cf, __tmp, __tmp2, __i; \ |
25 | \ | 25 | \ |
26 | __asm__(".set push\n\t" \ | 26 | __asm__(".set push\n\t" \ |
@@ -48,12 +48,13 @@ | |||
48 | "bnez %4, 0b\n\t" \ | 48 | "bnez %4, 0b\n\t" \ |
49 | " srl %5, %1, 0x1f\n\t" \ | 49 | " srl %5, %1, 0x1f\n\t" \ |
50 | ".set pop" \ | 50 | ".set pop" \ |
51 | : "=&r" (__mod), "=&r" (__tmp), "=&r" (__quot), "=&r" (__cf), \ | 51 | : "=&r" (__mod32), "=&r" (__tmp), \ |
52 | "=&r" (__quot32), "=&r" (__cf), \ | ||
52 | "=&r" (__i), "=&r" (__tmp2) \ | 53 | "=&r" (__i), "=&r" (__tmp2) \ |
53 | : "Jr" (base), "0" (high), "1" (low)); \ | 54 | : "Jr" (base), "0" (high), "1" (low)); \ |
54 | \ | 55 | \ |
55 | (res) = __quot; \ | 56 | (res) = __quot32; \ |
56 | __mod; }) | 57 | __mod32; }) |
57 | 58 | ||
58 | #define do_div(n, base) ({ \ | 59 | #define do_div(n, base) ({ \ |
59 | unsigned long long __quot; \ | 60 | unsigned long long __quot; \ |
diff --git a/include/asm-mips/gpio.h b/include/asm-mips/gpio.h new file mode 100644 index 000000000000..06e46faf862d --- /dev/null +++ b/include/asm-mips/gpio.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_MIPS_GPIO_H | ||
2 | #define __ASM_MIPS_GPIO_H | ||
3 | |||
4 | #include <gpio.h> | ||
5 | |||
6 | #endif /* __ASM_MIPS_GPIO_H */ | ||
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 92ec2618560c..7ba92890ea13 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -178,6 +178,11 @@ extern void __iounmap(const volatile void __iomem *addr); | |||
178 | static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | 178 | static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, |
179 | unsigned long flags) | 179 | unsigned long flags) |
180 | { | 180 | { |
181 | void __iomem *addr = plat_ioremap(offset, size, flags); | ||
182 | |||
183 | if (addr) | ||
184 | return addr; | ||
185 | |||
181 | #define __IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) | 186 | #define __IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) |
182 | 187 | ||
183 | if (cpu_has_64bit_addresses) { | 188 | if (cpu_has_64bit_addresses) { |
@@ -207,7 +212,8 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
207 | */ | 212 | */ |
208 | if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && | 213 | if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && |
209 | flags == _CACHE_UNCACHED) | 214 | flags == _CACHE_UNCACHED) |
210 | return (void __iomem *)CKSEG1ADDR(phys_addr); | 215 | return (void __iomem *) |
216 | (unsigned long)CKSEG1ADDR(phys_addr); | ||
211 | } | 217 | } |
212 | 218 | ||
213 | return __ioremap(offset, size, flags); | 219 | return __ioremap(offset, size, flags); |
@@ -282,6 +288,9 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
282 | 288 | ||
283 | static inline void iounmap(const volatile void __iomem *addr) | 289 | static inline void iounmap(const volatile void __iomem *addr) |
284 | { | 290 | { |
291 | if (plat_iounmap(addr)) | ||
292 | return; | ||
293 | |||
285 | #define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) | 294 | #define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) |
286 | 295 | ||
287 | if (cpu_has_64bit_addresses || | 296 | if (cpu_has_64bit_addresses || |
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 91803ba30ff2..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() |
@@ -72,4 +72,13 @@ extern int allocate_irqno(void); | |||
72 | extern void alloc_legacy_irqno(void); | 72 | extern void alloc_legacy_irqno(void); |
73 | extern void free_irqno(unsigned int irq); | 73 | extern void free_irqno(unsigned int irq); |
74 | 74 | ||
75 | /* | ||
76 | * Before R2 the timer and performance counter interrupts were both fixed to | ||
77 | * IE7. Since R2 their number has to be read from the c0_intctl register. | ||
78 | */ | ||
79 | #define CP0_LEGACY_COMPARE_IRQ 7 | ||
80 | |||
81 | extern int cp0_compare_irq; | ||
82 | extern int cp0_perfcount_irq; | ||
83 | |||
75 | #endif /* _ASM_IRQ_H */ | 84 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-mips/lasat/ds1603.h b/include/asm-mips/lasat/ds1603.h deleted file mode 100644 index edcd7544b358..000000000000 --- a/include/asm-mips/lasat/ds1603.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #include <asm/addrspace.h> | ||
2 | |||
3 | /* Lasat 100 */ | ||
4 | #define DS1603_REG_100 (KSEG1ADDR(0x1c810000)) | ||
5 | #define DS1603_RST_100 (1 << 2) | ||
6 | #define DS1603_CLK_100 (1 << 0) | ||
7 | #define DS1603_DATA_SHIFT_100 1 | ||
8 | #define DS1603_DATA_100 (1 << DS1603_DATA_SHIFT_100) | ||
9 | |||
10 | /* Lasat 200 */ | ||
11 | #define DS1603_REG_200 (KSEG1ADDR(0x11000000)) | ||
12 | #define DS1603_RST_200 (1 << 3) | ||
13 | #define DS1603_CLK_200 (1 << 4) | ||
14 | #define DS1603_DATA_200 (1 << 5) | ||
15 | |||
16 | #define DS1603_DATA_REG_200 (DS1603_REG_200 + 0x10000) | ||
17 | #define DS1603_DATA_READ_SHIFT_200 9 | ||
18 | #define DS1603_DATA_READ_200 (1 << DS1603_DATA_READ_SHIFT_200) | ||
diff --git a/include/asm-mips/lasat/eeprom.h b/include/asm-mips/lasat/eeprom.h deleted file mode 100644 index 7b53edd5cd5f..000000000000 --- a/include/asm-mips/lasat/eeprom.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #include <asm/addrspace.h> | ||
2 | |||
3 | /* lasat 100 */ | ||
4 | #define AT93C_REG_100 KSEG1ADDR(0x1c810000) | ||
5 | #define AT93C_RDATA_REG_100 AT93C_REG_100 | ||
6 | #define AT93C_RDATA_SHIFT_100 4 | ||
7 | #define AT93C_WDATA_SHIFT_100 4 | ||
8 | #define AT93C_CS_M_100 ( 1 << 5 ) | ||
9 | #define AT93C_CLK_M_100 ( 1 << 3 ) | ||
10 | |||
11 | /* lasat 200 */ | ||
12 | #define AT93C_REG_200 KSEG1ADDR(0x11000000) | ||
13 | #define AT93C_RDATA_REG_200 (AT93C_REG_200+0x10000) | ||
14 | #define AT93C_RDATA_SHIFT_200 8 | ||
15 | #define AT93C_WDATA_SHIFT_200 2 | ||
16 | #define AT93C_CS_M_200 ( 1 << 0 ) | ||
17 | #define AT93C_CLK_M_200 ( 1 << 1 ) | ||
diff --git a/include/asm-mips/lasat/head.h b/include/asm-mips/lasat/head.h deleted file mode 100644 index f5589f31a197..000000000000 --- a/include/asm-mips/lasat/head.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Image header stuff | ||
3 | */ | ||
4 | #ifndef _HEAD_H | ||
5 | #define _HEAD_H | ||
6 | |||
7 | #define LASAT_K_MAGIC0_VAL 0xfedeabba | ||
8 | #define LASAT_K_MAGIC1_VAL 0x00bedead | ||
9 | |||
10 | #ifndef _LANGUAGE_ASSEMBLY | ||
11 | #include <linux/types.h> | ||
12 | struct bootloader_header { | ||
13 | u32 magic[2]; | ||
14 | u32 version; | ||
15 | u32 image_start; | ||
16 | u32 image_size; | ||
17 | u32 kernel_start; | ||
18 | u32 kernel_entry; | ||
19 | }; | ||
20 | #endif | ||
21 | |||
22 | #endif /* _HEAD_H */ | ||
diff --git a/include/asm-mips/lasat/lasat.h b/include/asm-mips/lasat/lasat.h deleted file mode 100644 index 42077e367a5b..000000000000 --- a/include/asm-mips/lasat/lasat.h +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | /* | ||
2 | * lasat.h | ||
3 | * | ||
4 | * Thomas Horsten <thh@lasat.com> | ||
5 | * Copyright (C) 2000 LASAT Networks A/S. | ||
6 | * | ||
7 | * This program is free software; you can distribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License (Version 2) as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
14 | * for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
19 | * | ||
20 | * Configuration for LASAT boards, loads the appropriate include files. | ||
21 | */ | ||
22 | #ifndef _LASAT_H | ||
23 | #define _LASAT_H | ||
24 | |||
25 | #ifndef _LANGUAGE_ASSEMBLY | ||
26 | |||
27 | extern struct lasat_misc { | ||
28 | volatile u32 *reset_reg; | ||
29 | volatile u32 *flash_wp_reg; | ||
30 | u32 flash_wp_bit; | ||
31 | } *lasat_misc; | ||
32 | |||
33 | enum lasat_mtdparts { | ||
34 | LASAT_MTD_BOOTLOADER, | ||
35 | LASAT_MTD_SERVICE, | ||
36 | LASAT_MTD_NORMAL, | ||
37 | LASAT_MTD_CONFIG, | ||
38 | LASAT_MTD_FS, | ||
39 | LASAT_MTD_LAST | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * The format of the data record in the EEPROM. | ||
44 | * See Documentation/LASAT/eeprom.txt for a detailed description | ||
45 | * of the fields in this struct, and the LASAT Hardware Configuration | ||
46 | * field specification for a detailed description of the config | ||
47 | * field. | ||
48 | */ | ||
49 | #include <linux/types.h> | ||
50 | |||
51 | #define LASAT_EEPROM_VERSION 7 | ||
52 | struct lasat_eeprom_struct { | ||
53 | unsigned int version; | ||
54 | unsigned int cfg[3]; | ||
55 | unsigned char hwaddr[6]; | ||
56 | unsigned char print_partno[12]; | ||
57 | unsigned char term0; | ||
58 | unsigned char print_serial[14]; | ||
59 | unsigned char term1; | ||
60 | unsigned char prod_partno[12]; | ||
61 | unsigned char term2; | ||
62 | unsigned char prod_serial[14]; | ||
63 | unsigned char term3; | ||
64 | unsigned char passwd_hash[16]; | ||
65 | unsigned char pwdnull; | ||
66 | unsigned char vendid; | ||
67 | unsigned char ts_ref; | ||
68 | unsigned char ts_signoff; | ||
69 | unsigned char reserved[11]; | ||
70 | unsigned char debugaccess; | ||
71 | unsigned short prid; | ||
72 | unsigned int serviceflag; | ||
73 | unsigned int ipaddr; | ||
74 | unsigned int netmask; | ||
75 | unsigned int crc32; | ||
76 | }; | ||
77 | |||
78 | struct lasat_eeprom_struct_pre7 { | ||
79 | unsigned int version; | ||
80 | unsigned int flags[3]; | ||
81 | unsigned char hwaddr0[6]; | ||
82 | unsigned char hwaddr1[6]; | ||
83 | unsigned char print_partno[9]; | ||
84 | unsigned char term0; | ||
85 | unsigned char print_serial[14]; | ||
86 | unsigned char term1; | ||
87 | unsigned char prod_partno[9]; | ||
88 | unsigned char term2; | ||
89 | unsigned char prod_serial[14]; | ||
90 | unsigned char term3; | ||
91 | unsigned char passwd_hash[24]; | ||
92 | unsigned char pwdnull; | ||
93 | unsigned char vendor; | ||
94 | unsigned char ts_ref; | ||
95 | unsigned char ts_signoff; | ||
96 | unsigned char reserved[6]; | ||
97 | unsigned int writecount; | ||
98 | unsigned int ipaddr; | ||
99 | unsigned int netmask; | ||
100 | unsigned int crc32; | ||
101 | }; | ||
102 | |||
103 | /* Configuration descriptor encoding - see the doc for details */ | ||
104 | |||
105 | #define LASAT_W0_DSCTYPE(v) ( ( (v) ) & 0xf ) | ||
106 | #define LASAT_W0_BMID(v) ( ( (v) >> 0x04 ) & 0xf ) | ||
107 | #define LASAT_W0_CPUTYPE(v) ( ( (v) >> 0x08 ) & 0xf ) | ||
108 | #define LASAT_W0_BUSSPEED(v) ( ( (v) >> 0x0c ) & 0xf ) | ||
109 | #define LASAT_W0_CPUCLK(v) ( ( (v) >> 0x10 ) & 0xf ) | ||
110 | #define LASAT_W0_SDRAMBANKSZ(v) ( ( (v) >> 0x14 ) & 0xf ) | ||
111 | #define LASAT_W0_SDRAMBANKS(v) ( ( (v) >> 0x18 ) & 0xf ) | ||
112 | #define LASAT_W0_L2CACHE(v) ( ( (v) >> 0x1c ) & 0xf ) | ||
113 | |||
114 | #define LASAT_W1_EDHAC(v) ( ( (v) ) & 0xf ) | ||
115 | #define LASAT_W1_HIFN(v) ( ( (v) >> 0x04 ) & 0x1 ) | ||
116 | #define LASAT_W1_ISDN(v) ( ( (v) >> 0x05 ) & 0x1 ) | ||
117 | #define LASAT_W1_IDE(v) ( ( (v) >> 0x06 ) & 0x1 ) | ||
118 | #define LASAT_W1_HDLC(v) ( ( (v) >> 0x07 ) & 0x1 ) | ||
119 | #define LASAT_W1_USVERSION(v) ( ( (v) >> 0x08 ) & 0x1 ) | ||
120 | #define LASAT_W1_4MACS(v) ( ( (v) >> 0x09 ) & 0x1 ) | ||
121 | #define LASAT_W1_EXTSERIAL(v) ( ( (v) >> 0x0a ) & 0x1 ) | ||
122 | #define LASAT_W1_FLASHSIZE(v) ( ( (v) >> 0x0c ) & 0xf ) | ||
123 | #define LASAT_W1_PCISLOTS(v) ( ( (v) >> 0x10 ) & 0xf ) | ||
124 | #define LASAT_W1_PCI1OPT(v) ( ( (v) >> 0x14 ) & 0xf ) | ||
125 | #define LASAT_W1_PCI2OPT(v) ( ( (v) >> 0x18 ) & 0xf ) | ||
126 | #define LASAT_W1_PCI3OPT(v) ( ( (v) >> 0x1c ) & 0xf ) | ||
127 | |||
128 | /* Routines specific to LASAT boards */ | ||
129 | |||
130 | #define LASAT_BMID_MASQUERADE2 0 | ||
131 | #define LASAT_BMID_MASQUERADEPRO 1 | ||
132 | #define LASAT_BMID_SAFEPIPE25 2 | ||
133 | #define LASAT_BMID_SAFEPIPE50 3 | ||
134 | #define LASAT_BMID_SAFEPIPE100 4 | ||
135 | #define LASAT_BMID_SAFEPIPE5000 5 | ||
136 | #define LASAT_BMID_SAFEPIPE7000 6 | ||
137 | #define LASAT_BMID_SAFEPIPE1000 7 | ||
138 | //#define LASAT_BMID_SAFEPIPE30 7 | ||
139 | //#define LASAT_BMID_SAFEPIPE5100 8 | ||
140 | //#define LASAT_BMID_SAFEPIPE7100 9 | ||
141 | #define LASAT_BMID_UNKNOWN 0xf | ||
142 | #define LASAT_MAX_BMID_NAMES 9 // no larger than 15! | ||
143 | |||
144 | #define LASAT_HAS_EDHAC ( 1 << 0 ) | ||
145 | #define LASAT_EDHAC_FAST ( 1 << 1 ) | ||
146 | #define LASAT_HAS_EADI ( 1 << 2 ) | ||
147 | #define LASAT_HAS_HIFN ( 1 << 3 ) | ||
148 | #define LASAT_HAS_ISDN ( 1 << 4 ) | ||
149 | #define LASAT_HAS_LEASEDLINE_IF ( 1 << 5 ) | ||
150 | #define LASAT_HAS_HDC ( 1 << 6 ) | ||
151 | |||
152 | #define LASAT_PRID_MASQUERADE2 0 | ||
153 | #define LASAT_PRID_MASQUERADEPRO 1 | ||
154 | #define LASAT_PRID_SAFEPIPE25 2 | ||
155 | #define LASAT_PRID_SAFEPIPE50 3 | ||
156 | #define LASAT_PRID_SAFEPIPE100 4 | ||
157 | #define LASAT_PRID_SAFEPIPE5000 5 | ||
158 | #define LASAT_PRID_SAFEPIPE7000 6 | ||
159 | #define LASAT_PRID_SAFEPIPE30 7 | ||
160 | #define LASAT_PRID_SAFEPIPE5100 8 | ||
161 | #define LASAT_PRID_SAFEPIPE7100 9 | ||
162 | |||
163 | #define LASAT_PRID_SAFEPIPE1110 10 | ||
164 | #define LASAT_PRID_SAFEPIPE3020 11 | ||
165 | #define LASAT_PRID_SAFEPIPE3030 12 | ||
166 | #define LASAT_PRID_SAFEPIPE5020 13 | ||
167 | #define LASAT_PRID_SAFEPIPE5030 14 | ||
168 | #define LASAT_PRID_SAFEPIPE1120 15 | ||
169 | #define LASAT_PRID_SAFEPIPE1130 16 | ||
170 | #define LASAT_PRID_SAFEPIPE6010 17 | ||
171 | #define LASAT_PRID_SAFEPIPE6110 18 | ||
172 | #define LASAT_PRID_SAFEPIPE6210 19 | ||
173 | #define LASAT_PRID_SAFEPIPE1020 20 | ||
174 | #define LASAT_PRID_SAFEPIPE1040 21 | ||
175 | #define LASAT_PRID_SAFEPIPE1060 22 | ||
176 | |||
177 | struct lasat_info { | ||
178 | unsigned int li_cpu_hz; | ||
179 | unsigned int li_bus_hz; | ||
180 | unsigned int li_bmid; | ||
181 | unsigned int li_memsize; | ||
182 | unsigned int li_flash_size; | ||
183 | unsigned int li_prid; | ||
184 | unsigned char li_bmstr[16]; | ||
185 | unsigned char li_namestr[32]; | ||
186 | unsigned char li_typestr[16]; | ||
187 | /* Info on the Flash layout */ | ||
188 | unsigned int li_flash_base; | ||
189 | unsigned long li_flashpart_base[LASAT_MTD_LAST]; | ||
190 | unsigned long li_flashpart_size[LASAT_MTD_LAST]; | ||
191 | struct lasat_eeprom_struct li_eeprom_info; | ||
192 | unsigned int li_eeprom_upgrade_version; | ||
193 | unsigned int li_debugaccess; | ||
194 | }; | ||
195 | |||
196 | extern struct lasat_info lasat_board_info; | ||
197 | |||
198 | static inline unsigned long lasat_flash_partition_start(int partno) | ||
199 | { | ||
200 | if (partno < 0 || partno >= LASAT_MTD_LAST) | ||
201 | return 0; | ||
202 | |||
203 | return lasat_board_info.li_flashpart_base[partno]; | ||
204 | } | ||
205 | |||
206 | static inline unsigned long lasat_flash_partition_size(int partno) | ||
207 | { | ||
208 | if (partno < 0 || partno >= LASAT_MTD_LAST) | ||
209 | return 0; | ||
210 | |||
211 | return lasat_board_info.li_flashpart_size[partno]; | ||
212 | } | ||
213 | |||
214 | /* Called from setup() to initialize the global board_info struct */ | ||
215 | extern int lasat_init_board_info(void); | ||
216 | |||
217 | /* Write the modified EEPROM info struct */ | ||
218 | extern void lasat_write_eeprom_info(void); | ||
219 | |||
220 | #define N_MACHTYPES 2 | ||
221 | /* for calibration of delays */ | ||
222 | |||
223 | /* the lasat_ndelay function is necessary because it is used at an | ||
224 | * early stage of the boot process where ndelay is not calibrated. | ||
225 | * It is used for the bit-banging rtc and eeprom drivers */ | ||
226 | |||
227 | #include <asm/delay.h> | ||
228 | /* calculating with the slowest board with 100 MHz clock */ | ||
229 | #define LASAT_100_DIVIDER 20 | ||
230 | /* All 200's run at 250 MHz clock */ | ||
231 | #define LASAT_200_DIVIDER 8 | ||
232 | |||
233 | extern unsigned int lasat_ndelay_divider; | ||
234 | |||
235 | static inline void lasat_ndelay(unsigned int ns) | ||
236 | { | ||
237 | __delay(ns / lasat_ndelay_divider); | ||
238 | } | ||
239 | |||
240 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | ||
241 | |||
242 | #define LASAT_SERVICEMODE_MAGIC_1 0xdeadbeef | ||
243 | #define LASAT_SERVICEMODE_MAGIC_2 0xfedeabba | ||
244 | |||
245 | /* Lasat 100 boards */ | ||
246 | #define LASAT_GT_BASE (KSEG1ADDR(0x14000000)) | ||
247 | |||
248 | /* Lasat 200 boards */ | ||
249 | #define Vrc5074_PHYS_BASE 0x1fa00000 | ||
250 | #define Vrc5074_BASE (KSEG1ADDR(Vrc5074_PHYS_BASE)) | ||
251 | #define PCI_WINDOW1 0x1a000000 | ||
252 | |||
253 | #endif /* _LASAT_H */ | ||
diff --git a/include/asm-mips/lasat/lasatint.h b/include/asm-mips/lasat/lasatint.h deleted file mode 100644 index 065474feeccc..000000000000 --- a/include/asm-mips/lasat/lasatint.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #define LASATINT_END 16 | ||
2 | |||
3 | /* lasat 100 */ | ||
4 | #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) | ||
5 | #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000)) | ||
6 | #define LASATINT_MASK_SHIFT_100 0 | ||
7 | |||
8 | /* lasat 200 */ | ||
9 | #define LASAT_INT_STATUS_REG_200 (KSEG1ADDR(0x1104003c)) | ||
10 | #define LASAT_INT_MASK_REG_200 (KSEG1ADDR(0x1104003c)) | ||
11 | #define LASATINT_MASK_SHIFT_200 16 | ||
12 | |||
diff --git a/include/asm-mips/lasat/picvue.h b/include/asm-mips/lasat/picvue.h deleted file mode 100644 index 42a492edc40e..000000000000 --- a/include/asm-mips/lasat/picvue.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* Lasat 100 */ | ||
2 | #define PVC_REG_100 KSEG1ADDR(0x1c820000) | ||
3 | #define PVC_DATA_SHIFT_100 0 | ||
4 | #define PVC_DATA_M_100 0xFF | ||
5 | #define PVC_E_100 (1 << 8) | ||
6 | #define PVC_RW_100 (1 << 9) | ||
7 | #define PVC_RS_100 (1 << 10) | ||
8 | |||
9 | /* Lasat 200 */ | ||
10 | #define PVC_REG_200 KSEG1ADDR(0x11000000) | ||
11 | #define PVC_DATA_SHIFT_200 24 | ||
12 | #define PVC_DATA_M_200 (0xFF << PVC_DATA_SHIFT_200) | ||
13 | #define PVC_E_200 (1 << 16) | ||
14 | #define PVC_RW_200 (1 << 17) | ||
15 | #define PVC_RS_200 (1 << 18) | ||
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h deleted file mode 100644 index 9e88c7669c7a..000000000000 --- a/include/asm-mips/lasat/serial.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #include <asm/lasat/lasat.h> | ||
2 | |||
3 | /* Lasat 100 boards serial configuration */ | ||
4 | #define LASAT_BASE_BAUD_100 ( 7372800 / 16 ) | ||
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | ||
6 | #define LASAT_UART_REGS_SHIFT_100 2 | ||
7 | #define LASATINT_UART_100 8 | ||
8 | |||
9 | /* * LASAT 200 boards serial configuration */ | ||
10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) | ||
11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) | ||
12 | #define LASAT_UART_REGS_SHIFT_200 3 | ||
13 | #define LASATINT_UART_200 13 | ||
diff --git a/include/asm-mips/mach-au1x00/au1xxx_gpio.h b/include/asm-mips/mach-au1x00/au1xxx_gpio.h deleted file mode 100644 index 27911e054ffc..000000000000 --- a/include/asm-mips/mach-au1x00/au1xxx_gpio.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __AU1XXX_GPIO_H | ||
2 | #define __AU1XXX_GPIO_H | ||
3 | |||
4 | void au1xxx_gpio1_set_inputs(void); | ||
5 | void au1xxx_gpio_tristate(int signal); | ||
6 | void au1xxx_gpio_write(int signal, int value); | ||
7 | int au1xxx_gpio_read(int signal); | ||
8 | |||
9 | typedef volatile struct | ||
10 | { | ||
11 | u32 dir; | ||
12 | u32 reserved; | ||
13 | u32 output; | ||
14 | u32 pinstate; | ||
15 | u32 inten; | ||
16 | u32 enable; | ||
17 | |||
18 | } AU1X00_GPIO2; | ||
19 | |||
20 | #endif //__AU1XXX_GPIO_H | ||
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index 8fcae21adbd5..4663e8b415c9 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h | |||
@@ -88,26 +88,26 @@ static const struct drive_list_entry dma_white_list [] = { | |||
88 | /* | 88 | /* |
89 | * Hitachi | 89 | * Hitachi |
90 | */ | 90 | */ |
91 | { "HITACHI_DK14FA-20" , "ALL" }, | 91 | { "HITACHI_DK14FA-20" , NULL }, |
92 | { "HTS726060M9AT00" , "ALL" }, | 92 | { "HTS726060M9AT00" , NULL }, |
93 | /* | 93 | /* |
94 | * Maxtor | 94 | * Maxtor |
95 | */ | 95 | */ |
96 | { "Maxtor 6E040L0" , "ALL" }, | 96 | { "Maxtor 6E040L0" , NULL }, |
97 | { "Maxtor 6Y080P0" , "ALL" }, | 97 | { "Maxtor 6Y080P0" , NULL }, |
98 | { "Maxtor 6Y160P0" , "ALL" }, | 98 | { "Maxtor 6Y160P0" , NULL }, |
99 | /* | 99 | /* |
100 | * Seagate | 100 | * Seagate |
101 | */ | 101 | */ |
102 | { "ST3120026A" , "ALL" }, | 102 | { "ST3120026A" , NULL }, |
103 | { "ST320014A" , "ALL" }, | 103 | { "ST320014A" , NULL }, |
104 | { "ST94011A" , "ALL" }, | 104 | { "ST94011A" , NULL }, |
105 | { "ST340016A" , "ALL" }, | 105 | { "ST340016A" , NULL }, |
106 | /* | 106 | /* |
107 | * Western Digital | 107 | * Western Digital |
108 | */ | 108 | */ |
109 | { "WDC WD400UE-00HCT0" , "ALL" }, | 109 | { "WDC WD400UE-00HCT0" , NULL }, |
110 | { "WDC WD400JB-00JJC0" , "ALL" }, | 110 | { "WDC WD400JB-00JJC0" , NULL }, |
111 | { NULL , NULL } | 111 | { NULL , NULL } |
112 | }; | 112 | }; |
113 | 113 | ||
@@ -116,9 +116,9 @@ static const struct drive_list_entry dma_black_list [] = { | |||
116 | /* | 116 | /* |
117 | * Western Digital | 117 | * Western Digital |
118 | */ | 118 | */ |
119 | { "WDC WD100EB-00CGH0" , "ALL" }, | 119 | { "WDC WD100EB-00CGH0" , NULL }, |
120 | { "WDC WD200BB-00AUA1" , "ALL" }, | 120 | { "WDC WD200BB-00AUA1" , NULL }, |
121 | { "WDC AC24300L" , "ALL" }, | 121 | { "WDC AC24300L" , NULL }, |
122 | { NULL , NULL } | 122 | { NULL , NULL } |
123 | }; | 123 | }; |
124 | #endif | 124 | #endif |
diff --git a/include/asm-mips/mach-au1x00/gpio.h b/include/asm-mips/mach-au1x00/gpio.h new file mode 100644 index 000000000000..2dc61e009a08 --- /dev/null +++ b/include/asm-mips/mach-au1x00/gpio.h | |||
@@ -0,0 +1,69 @@ | |||
1 | #ifndef _AU1XXX_GPIO_H_ | ||
2 | #define _AU1XXX_GPIO_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define AU1XXX_GPIO_BASE 200 | ||
7 | |||
8 | struct au1x00_gpio2 { | ||
9 | u32 dir; | ||
10 | u32 reserved; | ||
11 | u32 output; | ||
12 | u32 pinstate; | ||
13 | u32 inten; | ||
14 | u32 enable; | ||
15 | }; | ||
16 | |||
17 | extern int au1xxx_gpio_get_value(unsigned gpio); | ||
18 | extern void au1xxx_gpio_set_value(unsigned gpio, int value); | ||
19 | extern int au1xxx_gpio_direction_input(unsigned gpio); | ||
20 | extern int au1xxx_gpio_direction_output(unsigned gpio, int value); | ||
21 | |||
22 | |||
23 | /* Wrappers for the arch-neutral GPIO API */ | ||
24 | |||
25 | static inline int gpio_request(unsigned gpio, const char *label) | ||
26 | { | ||
27 | /* Not yet implemented */ | ||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | static inline void gpio_free(unsigned gpio) | ||
32 | { | ||
33 | /* Not yet implemented */ | ||
34 | } | ||
35 | |||
36 | static inline int gpio_direction_input(unsigned gpio) | ||
37 | { | ||
38 | return au1xxx_gpio_direction_input(gpio); | ||
39 | } | ||
40 | |||
41 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
42 | { | ||
43 | return au1xxx_gpio_direction_output(gpio, value); | ||
44 | } | ||
45 | |||
46 | static inline int gpio_get_value(unsigned gpio) | ||
47 | { | ||
48 | return au1xxx_gpio_get_value(gpio); | ||
49 | } | ||
50 | |||
51 | static inline void gpio_set_value(unsigned gpio, int value) | ||
52 | { | ||
53 | au1xxx_gpio_set_value(gpio, value); | ||
54 | } | ||
55 | |||
56 | static inline int gpio_to_irq(unsigned gpio) | ||
57 | { | ||
58 | return gpio; | ||
59 | } | ||
60 | |||
61 | static inline int irq_to_gpio(unsigned irq) | ||
62 | { | ||
63 | return irq; | ||
64 | } | ||
65 | |||
66 | /* For cansleep */ | ||
67 | #include <asm-generic/gpio.h> | ||
68 | |||
69 | #endif /* _AU1XXX_GPIO_H_ */ | ||
diff --git a/include/asm-mips/mach-au1x00/ioremap.h b/include/asm-mips/mach-au1x00/ioremap.h index 098fca4289bb..364cea2dc71f 100644 --- a/include/asm-mips/mach-au1x00/ioremap.h +++ b/include/asm-mips/mach-au1x00/ioremap.h | |||
@@ -28,4 +28,15 @@ static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) | |||
28 | return __fixup_bigphys_addr(phys_addr, size); | 28 | return __fixup_bigphys_addr(phys_addr, size); |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | ||
32 | unsigned long flags) | ||
33 | { | ||
34 | return NULL; | ||
35 | } | ||
36 | |||
37 | static inline int plat_iounmap(const volatile void __iomem *addr) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
31 | #endif /* __ASM_MACH_AU1X00_IOREMAP_H */ | 42 | #endif /* __ASM_MACH_AU1X00_IOREMAP_H */ |
diff --git a/include/asm-mips/mach-cobalt/cobalt.h b/include/asm-mips/mach-cobalt/cobalt.h index 684a501c04cf..9c9d2b998ca4 100644 --- a/include/asm-mips/mach-cobalt/cobalt.h +++ b/include/asm-mips/mach-cobalt/cobalt.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define COBALT_CPU_IRQ MIPS_CPU_IRQ_BASE | 30 | #define COBALT_CPU_IRQ MIPS_CPU_IRQ_BASE |
31 | 31 | ||
32 | #define COBALT_GALILEO_IRQ (COBALT_CPU_IRQ + 2) | 32 | #define COBALT_GALILEO_IRQ (COBALT_CPU_IRQ + 2) |
33 | #define COBALT_SCC_IRQ (COBALT_CPU_IRQ + 3) /* pre-production has 85C30 */ | ||
34 | #define COBALT_RAQ_SCSI_IRQ (COBALT_CPU_IRQ + 3) | 33 | #define COBALT_RAQ_SCSI_IRQ (COBALT_CPU_IRQ + 3) |
35 | #define COBALT_ETH0_IRQ (COBALT_CPU_IRQ + 3) | 34 | #define COBALT_ETH0_IRQ (COBALT_CPU_IRQ + 3) |
36 | #define COBALT_QUBE1_ETH0_IRQ (COBALT_CPU_IRQ + 4) | 35 | #define COBALT_QUBE1_ETH0_IRQ (COBALT_CPU_IRQ + 4) |
@@ -71,10 +70,6 @@ | |||
71 | 70 | ||
72 | extern int cobalt_board_id; | 71 | extern int cobalt_board_id; |
73 | 72 | ||
74 | #define PCI_CFG_SET(devfn,where) \ | ||
75 | GT_WRITE(GT_PCI0_CFGADDR_OFS, (0x80000000 | (PCI_SLOT (devfn) << 11) | \ | ||
76 | (PCI_FUNC (devfn) << 8) | (where))) | ||
77 | |||
78 | #define COBALT_LED_PORT (*(volatile unsigned char *) CKSEG1ADDR(0x1c000000)) | 73 | #define COBALT_LED_PORT (*(volatile unsigned char *) CKSEG1ADDR(0x1c000000)) |
79 | # define COBALT_LED_BAR_LEFT (1 << 0) /* Qube */ | 74 | # define COBALT_LED_BAR_LEFT (1 << 0) /* Qube */ |
80 | # define COBALT_LED_BAR_RIGHT (1 << 1) /* Qube */ | 75 | # define COBALT_LED_BAR_RIGHT (1 << 1) /* Qube */ |
diff --git a/include/asm-mips/mach-ev64120/mach-gt64120.h b/include/asm-mips/mach-ev64120/mach-gt64120.h deleted file mode 100644 index 7e272ce57ea3..000000000000 --- a/include/asm-mips/mach-ev64120/mach-gt64120.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * This is a direct copy of the ev96100.h file, with a global | ||
3 | * search and replace. The numbers are the same. | ||
4 | * | ||
5 | * The reason I'm duplicating this is so that the 64120/96100 | ||
6 | * defines won't be confusing in the source code. | ||
7 | */ | ||
8 | #ifndef __ASM_GALILEO_BOARDS_MIPS_EV64120_H | ||
9 | #define __ASM_GALILEO_BOARDS_MIPS_EV64120_H | ||
10 | |||
11 | /* | ||
12 | * GT64120 config space base address | ||
13 | */ | ||
14 | extern unsigned long gt64120_base; | ||
15 | |||
16 | #define GT64120_BASE (gt64120_base) | ||
17 | |||
18 | /* | ||
19 | * PCI Bus allocation | ||
20 | */ | ||
21 | #define GT_PCI_MEM_BASE 0x12000000UL | ||
22 | #define GT_PCI_MEM_SIZE 0x02000000UL | ||
23 | #define GT_PCI_IO_BASE 0x10000000UL | ||
24 | #define GT_PCI_IO_SIZE 0x02000000UL | ||
25 | #define GT_ISA_IO_BASE PCI_IO_BASE | ||
26 | |||
27 | /* | ||
28 | * Duart I/O ports. | ||
29 | */ | ||
30 | #define EV64120_COM1_BASE_ADDR (0x1d000000 + 0x20) | ||
31 | #define EV64120_COM2_BASE_ADDR (0x1d000000 + 0x00) | ||
32 | |||
33 | |||
34 | /* | ||
35 | * EV64120 interrupt controller register base. | ||
36 | */ | ||
37 | #define EV64120_ICTRL_REGS_BASE (KSEG1ADDR(0x1f000000)) | ||
38 | |||
39 | /* | ||
40 | * EV64120 UART register base. | ||
41 | */ | ||
42 | #define EV64120_UART0_REGS_BASE (KSEG1ADDR(EV64120_COM1_BASE_ADDR)) | ||
43 | #define EV64120_UART1_REGS_BASE (KSEG1ADDR(EV64120_COM2_BASE_ADDR)) | ||
44 | #define EV64120_BASE_BAUD ( 3686400 / 16 ) | ||
45 | #define EV64120_UART_IRQ 6 | ||
46 | |||
47 | /* | ||
48 | * PCI interrupts will come in on either the INTA or INTD interrups lines, | ||
49 | * which are mapped to the #2 and #5 interrupt pins of the MIPS. On our | ||
50 | * boards, they all either come in on IntD or they all come in on IntA, they | ||
51 | * aren't mixed. There can be numerous PCI interrupts, so we keep a list of the | ||
52 | * "requested" interrupt numbers and go through the list whenever we get an | ||
53 | * IntA/D. | ||
54 | * | ||
55 | * Interrupts < 8 are directly wired to the processor; PCI INTA is 8 and | ||
56 | * INTD is 11. | ||
57 | */ | ||
58 | #define GT_TIMER 4 | ||
59 | #define GT_INTA 2 | ||
60 | #define GT_INTD 5 | ||
61 | |||
62 | #endif /* __ASM_GALILEO_BOARDS_MIPS_EV64120_H */ | ||
diff --git a/include/asm-mips/mach-generic/gpio.h b/include/asm-mips/mach-generic/gpio.h new file mode 100644 index 000000000000..6eaf5efedf3a --- /dev/null +++ b/include/asm-mips/mach-generic/gpio.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __ASM_MACH_GENERIC_GPIO_H | ||
2 | #define __ASM_MACH_GENERIC_GPIO_H | ||
3 | |||
4 | int gpio_request(unsigned gpio, const char *label); | ||
5 | void gpio_free(unsigned gpio); | ||
6 | int gpio_direction_input(unsigned gpio); | ||
7 | int gpio_direction_output(unsigned gpio, int value); | ||
8 | int gpio_get_value(unsigned gpio); | ||
9 | void gpio_set_value(unsigned gpio, int value); | ||
10 | int gpio_to_irq(unsigned gpio); | ||
11 | int irq_to_gpio(unsigned irq); | ||
12 | |||
13 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
14 | |||
15 | #endif /* __ASM_MACH_GENERIC_GPIO_H */ | ||
diff --git a/include/asm-mips/mach-generic/ioremap.h b/include/asm-mips/mach-generic/ioremap.h index 9b64ff6e485d..b379938d47f0 100644 --- a/include/asm-mips/mach-generic/ioremap.h +++ b/include/asm-mips/mach-generic/ioremap.h | |||
@@ -20,4 +20,15 @@ static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) | |||
20 | return phys_addr; | 20 | return phys_addr; |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | ||
24 | unsigned long flags) | ||
25 | { | ||
26 | return NULL; | ||
27 | } | ||
28 | |||
29 | static inline int plat_iounmap(const volatile void __iomem *addr) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
23 | #endif /* __ASM_MACH_GENERIC_IOREMAP_H */ | 34 | #endif /* __ASM_MACH_GENERIC_IOREMAP_H */ |
diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h index 0ae9997bc9a8..c9fa4b14968d 100644 --- a/include/asm-mips/mach-generic/spaces.h +++ b/include/asm-mips/mach-generic/spaces.h | |||
@@ -10,38 +10,54 @@ | |||
10 | #ifndef _ASM_MACH_GENERIC_SPACES_H | 10 | #ifndef _ASM_MACH_GENERIC_SPACES_H |
11 | #define _ASM_MACH_GENERIC_SPACES_H | 11 | #define _ASM_MACH_GENERIC_SPACES_H |
12 | 12 | ||
13 | #include <linux/const.h> | ||
14 | |||
15 | /* | ||
16 | * This gives the physical RAM offset. | ||
17 | */ | ||
18 | #ifndef PHYS_OFFSET | ||
19 | #define PHYS_OFFSET _AC(0, UL) | ||
20 | #endif | ||
13 | 21 | ||
14 | #ifdef CONFIG_32BIT | 22 | #ifdef CONFIG_32BIT |
15 | 23 | ||
16 | #define CAC_BASE 0x80000000 | 24 | #define CAC_BASE _AC(0x80000000, UL) |
17 | #define IO_BASE 0xa0000000 | 25 | #define IO_BASE _AC(0xa0000000, UL) |
18 | #define UNCAC_BASE 0xa0000000 | 26 | #define UNCAC_BASE _AC(0xa0000000, UL) |
19 | #define MAP_BASE 0xc0000000 | ||
20 | 27 | ||
21 | /* | 28 | #ifndef MAP_BASE |
22 | * This handles the memory map. | 29 | #define MAP_BASE _AC(0xc0000000, UL) |
23 | * We handle pages at KSEG0 for kernels with 32 bit address space. | 30 | #endif |
24 | */ | ||
25 | #define PAGE_OFFSET 0x80000000UL | ||
26 | 31 | ||
27 | /* | 32 | /* |
28 | * Memory above this physical address will be considered highmem. | 33 | * Memory above this physical address will be considered highmem. |
29 | */ | 34 | */ |
30 | #ifndef HIGHMEM_START | 35 | #ifndef HIGHMEM_START |
31 | #define HIGHMEM_START 0x20000000UL | 36 | #define HIGHMEM_START _AC(0x20000000, UL) |
32 | #endif | 37 | #endif |
33 | 38 | ||
34 | #endif /* CONFIG_32BIT */ | 39 | #endif /* CONFIG_32BIT */ |
35 | 40 | ||
36 | #ifdef CONFIG_64BIT | 41 | #ifdef CONFIG_64BIT |
37 | 42 | ||
38 | /* | 43 | #ifndef CAC_BASE |
39 | * This handles the memory map. | ||
40 | */ | ||
41 | #ifdef CONFIG_DMA_NONCOHERENT | 44 | #ifdef CONFIG_DMA_NONCOHERENT |
42 | #define PAGE_OFFSET 0x9800000000000000UL | 45 | #define CAC_BASE _AC(0x9800000000000000, UL) |
43 | #else | 46 | #else |
44 | #define PAGE_OFFSET 0xa800000000000000UL | 47 | #define CAC_BASE _AC(0xa800000000000000, UL) |
48 | #endif | ||
49 | #endif | ||
50 | |||
51 | #ifndef IO_BASE | ||
52 | #define IO_BASE _AC(0x9000000000000000, UL) | ||
53 | #endif | ||
54 | |||
55 | #ifndef UNCAC_BASE | ||
56 | #define UNCAC_BASE _AC(0x9000000000000000, UL) | ||
57 | #endif | ||
58 | |||
59 | #ifndef MAP_BASE | ||
60 | #define MAP_BASE _AC(0xc000000000000000, UL) | ||
45 | #endif | 61 | #endif |
46 | 62 | ||
47 | /* | 63 | /* |
@@ -50,22 +66,20 @@ | |||
50 | * in the distant future. Nobody will care for a few years :-) | 66 | * in the distant future. Nobody will care for a few years :-) |
51 | */ | 67 | */ |
52 | #ifndef HIGHMEM_START | 68 | #ifndef HIGHMEM_START |
53 | #define HIGHMEM_START (1UL << 59UL) | 69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) |
54 | #endif | 70 | #endif |
55 | 71 | ||
56 | #ifdef CONFIG_DMA_NONCOHERENT | ||
57 | #define CAC_BASE 0x9800000000000000UL | ||
58 | #else | ||
59 | #define CAC_BASE 0xa800000000000000UL | ||
60 | #endif | ||
61 | #define IO_BASE 0x9000000000000000UL | ||
62 | #define UNCAC_BASE 0x9000000000000000UL | ||
63 | #define MAP_BASE 0xc000000000000000UL | ||
64 | |||
65 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | 72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) |
66 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
67 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
68 | 75 | ||
69 | #endif /* CONFIG_64BIT */ | 76 | #endif /* CONFIG_64BIT */ |
70 | 77 | ||
78 | /* | ||
79 | * This handles the memory map. | ||
80 | */ | ||
81 | #ifndef PAGE_OFFSET | ||
82 | #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) | ||
83 | #endif | ||
84 | |||
71 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ | 85 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h index ab20c026fd19..7f9fa6f66059 100644 --- a/include/asm-mips/mach-ip22/spaces.h +++ b/include/asm-mips/mach-ip22/spaces.h | |||
@@ -11,44 +11,17 @@ | |||
11 | #define _ASM_MACH_IP22_SPACES_H | 11 | #define _ASM_MACH_IP22_SPACES_H |
12 | 12 | ||
13 | 13 | ||
14 | #ifdef CONFIG_32BIT | ||
15 | |||
16 | #define CAC_BASE 0x80000000 | ||
17 | #define IO_BASE 0xa0000000 | ||
18 | #define UNCAC_BASE 0xa0000000 | ||
19 | #define MAP_BASE 0xc0000000 | ||
20 | |||
21 | /* | ||
22 | * This handles the memory map. | ||
23 | * We handle pages at KSEG0 for kernels with 32 bit address space. | ||
24 | */ | ||
25 | #define PAGE_OFFSET 0x80000000UL | ||
26 | |||
27 | /* | ||
28 | * Memory above this physical address will be considered highmem. | ||
29 | */ | ||
30 | #ifndef HIGHMEM_START | ||
31 | #define HIGHMEM_START 0x20000000UL | ||
32 | #endif | ||
33 | |||
34 | #endif /* CONFIG_32BIT */ | ||
35 | |||
36 | #ifdef CONFIG_64BIT | 14 | #ifdef CONFIG_64BIT |
37 | #define PAGE_OFFSET 0xffffffff80000000UL | ||
38 | 15 | ||
39 | #ifndef HIGHMEM_START | 16 | #define PAGE_OFFSET 0xffffffff80000000UL |
40 | #define HIGHMEM_START (1UL << 59UL) | ||
41 | #endif | ||
42 | 17 | ||
43 | #define CAC_BASE 0xffffffff80000000 | 18 | #define CAC_BASE 0xffffffff80000000 |
44 | #define IO_BASE 0xffffffffa0000000 | 19 | #define IO_BASE 0xffffffffa0000000 |
45 | #define UNCAC_BASE 0xffffffffa0000000 | 20 | #define UNCAC_BASE 0xffffffffa0000000 |
46 | #define MAP_BASE 0xc000000000000000 | 21 | #define MAP_BASE 0xc000000000000000 |
47 | 22 | ||
48 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | ||
49 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | ||
50 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | ||
51 | |||
52 | #endif /* CONFIG_64BIT */ | 23 | #endif /* CONFIG_64BIT */ |
53 | 24 | ||
25 | #include <asm/mach-generic/spaces.h> | ||
26 | |||
54 | #endif /* __ASM_MACH_IP22_SPACES_H */ | 27 | #endif /* __ASM_MACH_IP22_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip27/spaces.h b/include/asm-mips/mach-ip27/spaces.h index 45e61785ef42..b18802a0b17e 100644 --- a/include/asm-mips/mach-ip27/spaces.h +++ b/include/asm-mips/mach-ip27/spaces.h | |||
@@ -14,22 +14,17 @@ | |||
14 | * IP27 uses the R10000's uncached attribute feature. Attribute 3 selects | 14 | * IP27 uses the R10000's uncached attribute feature. Attribute 3 selects |
15 | * uncached memory addressing. | 15 | * uncached memory addressing. |
16 | */ | 16 | */ |
17 | #define CAC_BASE 0xa800000000000000 | ||
18 | 17 | ||
19 | #define HSPEC_BASE 0x9000000000000000 | 18 | #define HSPEC_BASE 0x9000000000000000 |
20 | #define IO_BASE 0x9200000000000000 | 19 | #define IO_BASE 0x9200000000000000 |
21 | #define MSPEC_BASE 0x9400000000000000 | 20 | #define MSPEC_BASE 0x9400000000000000 |
22 | #define UNCAC_BASE 0x9600000000000000 | 21 | #define UNCAC_BASE 0x9600000000000000 |
23 | #define MAP_BASE 0xc000000000000000 | ||
24 | 22 | ||
25 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | ||
26 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | ||
27 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | ||
28 | #define TO_MSPEC(x) (MSPEC_BASE | ((x) & TO_PHYS_MASK)) | 23 | #define TO_MSPEC(x) (MSPEC_BASE | ((x) & TO_PHYS_MASK)) |
29 | #define TO_HSPEC(x) (HSPEC_BASE | ((x) & TO_PHYS_MASK)) | 24 | #define TO_HSPEC(x) (HSPEC_BASE | ((x) & TO_PHYS_MASK)) |
30 | 25 | ||
31 | #define PAGE_OFFSET CAC_BASE | ||
32 | |||
33 | #define HIGHMEM_START (~0UL) | 26 | #define HIGHMEM_START (~0UL) |
34 | 27 | ||
28 | #include <asm/mach-generic/spaces.h> | ||
29 | |||
35 | #endif /* _ASM_MACH_IP27_SPACES_H */ | 30 | #endif /* _ASM_MACH_IP27_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip32/dma-coherence.h b/include/asm-mips/mach-ip32/dma-coherence.h index c3f9a6a20eb0..a5511ebb2d53 100644 --- a/include/asm-mips/mach-ip32/dma-coherence.h +++ b/include/asm-mips/mach-ip32/dma-coherence.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | 6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | #ifndef __ASM_MACH_IP35_DMA_COHERENCE_H | 9 | #ifndef __ASM_MACH_IP32_DMA_COHERENCE_H |
10 | #define __ASM_MACH_IP35_DMA_COHERENCE_H | 10 | #define __ASM_MACH_IP32_DMA_COHERENCE_H |
11 | 11 | ||
12 | #include <asm/ip32/crime.h> | 12 | #include <asm/ip32/crime.h> |
13 | 13 | ||
@@ -69,4 +69,4 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
69 | return 0; /* IP32 is non-cohernet */ | 69 | return 0; /* IP32 is non-cohernet */ |
70 | } | 70 | } |
71 | 71 | ||
72 | #endif /* __ASM_MACH_IP35_DMA_COHERENCE_H */ | 72 | #endif /* __ASM_MACH_IP32_DMA_COHERENCE_H */ |
diff --git a/include/asm-mips/mach-ip32/spaces.h b/include/asm-mips/mach-ip32/spaces.h deleted file mode 100644 index 44abe5c02389..000000000000 --- a/include/asm-mips/mach-ip32/spaces.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04, 05 Ralf Baechle (ralf@linux-mips.org) | ||
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | ||
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | ||
9 | */ | ||
10 | #ifndef _ASM_MACH_IP32_SPACES_H | ||
11 | #define _ASM_MACH_IP32_SPACES_H | ||
12 | |||
13 | /* | ||
14 | * Memory above this physical address will be considered highmem. | ||
15 | * Fixme: 59 bits is a fictive number and makes assumptions about processors | ||
16 | * in the distant future. Nobody will care for a few years :-) | ||
17 | */ | ||
18 | #ifndef HIGHMEM_START | ||
19 | #define HIGHMEM_START (1UL << 59UL) | ||
20 | #endif | ||
21 | |||
22 | #define CAC_BASE 0x9800000000000000UL | ||
23 | #define IO_BASE 0x9000000000000000UL | ||
24 | #define UNCAC_BASE 0x9000000000000000UL | ||
25 | #define MAP_BASE 0xc000000000000000UL | ||
26 | |||
27 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | ||
28 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | ||
29 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | ||
30 | |||
31 | /* | ||
32 | * This handles the memory map. | ||
33 | */ | ||
34 | #define PAGE_OFFSET CAC_BASE | ||
35 | |||
36 | #endif /* __ASM_MACH_IP32_SPACES_H */ | ||
diff --git a/include/asm-mips/mach-jmr3927/ioremap.h b/include/asm-mips/mach-jmr3927/ioremap.h new file mode 100644 index 000000000000..aa131ad7f717 --- /dev/null +++ b/include/asm-mips/mach-jmr3927/ioremap.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * include/asm-mips/mach-jmr3927/ioremap.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_JMR3927_IOREMAP_H | ||
10 | #define __ASM_MACH_JMR3927_IOREMAP_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | /* | ||
15 | * Allow physical addresses to be fixed up to help peripherals located | ||
16 | * outside the low 32-bit range -- generic pass-through version. | ||
17 | */ | ||
18 | static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) | ||
19 | { | ||
20 | return phys_addr; | ||
21 | } | ||
22 | |||
23 | static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | ||
24 | unsigned long flags) | ||
25 | { | ||
26 | #define TXX9_DIRECTMAP_BASE 0xff000000ul | ||
27 | if (offset >= TXX9_DIRECTMAP_BASE && | ||
28 | offset < TXX9_DIRECTMAP_BASE + 0xf0000) | ||
29 | return (void __iomem *)offset; | ||
30 | return NULL; | ||
31 | } | ||
32 | |||
33 | static inline int plat_iounmap(const volatile void __iomem *addr) | ||
34 | { | ||
35 | return (unsigned long)addr >= TXX9_DIRECTMAP_BASE; | ||
36 | } | ||
37 | |||
38 | #endif /* __ASM_MACH_JMR3927_IOREMAP_H */ | ||
diff --git a/include/asm-mips/mach-lasat/mach-gt64120.h b/include/asm-mips/mach-lasat/mach-gt64120.h deleted file mode 100644 index 1a9ad45cc135..000000000000 --- a/include/asm-mips/mach-lasat/mach-gt64120.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * This is a direct copy of the ev96100.h file, with a global | ||
3 | * search and replace. The numbers are the same. | ||
4 | * | ||
5 | * The reason I'm duplicating this is so that the 64120/96100 | ||
6 | * defines won't be confusing in the source code. | ||
7 | */ | ||
8 | #ifndef _ASM_GT64120_LASAT_GT64120_DEP_H | ||
9 | #define _ASM_GT64120_LASAT_GT64120_DEP_H | ||
10 | |||
11 | /* | ||
12 | * GT64120 config space base address on Lasat 100 | ||
13 | */ | ||
14 | #define GT64120_BASE (KSEG1ADDR(0x14000000)) | ||
15 | |||
16 | /* | ||
17 | * PCI Bus allocation | ||
18 | * | ||
19 | * (Guessing ...) | ||
20 | */ | ||
21 | #define GT_PCI_MEM_BASE 0x12000000UL | ||
22 | #define GT_PCI_MEM_SIZE 0x02000000UL | ||
23 | #define GT_PCI_IO_BASE 0x10000000UL | ||
24 | #define GT_PCI_IO_SIZE 0x02000000UL | ||
25 | #define GT_ISA_IO_BASE PCI_IO_BASE | ||
26 | |||
27 | #endif /* _ASM_GT64120_LASAT_GT64120_DEP_H */ | ||
diff --git a/include/asm-mips/mach-lemote/dma-coherence.h b/include/asm-mips/mach-lemote/dma-coherence.h new file mode 100644 index 000000000000..7e914777ebc4 --- /dev/null +++ b/include/asm-mips/mach-lemote/dma-coherence.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006, 07 Ralf Baechle <ralf@linux-mips.org> | ||
7 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology | ||
8 | * Author: Fuxin Zhang, zhangfx@lemote.com | ||
9 | * | ||
10 | */ | ||
11 | #ifndef __ASM_MACH_LEMOTE_DMA_COHERENCE_H | ||
12 | #define __ASM_MACH_LEMOTE_DMA_COHERENCE_H | ||
13 | |||
14 | struct device; | ||
15 | |||
16 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, | ||
17 | size_t size) | ||
18 | { | ||
19 | return virt_to_phys(addr) | 0x80000000; | ||
20 | } | ||
21 | |||
22 | static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, | ||
23 | struct page *page) | ||
24 | { | ||
25 | return page_to_phys(page) | 0x80000000; | ||
26 | } | ||
27 | |||
28 | static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
29 | { | ||
30 | return dma_addr & 0x7fffffff; | ||
31 | } | ||
32 | |||
33 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | static inline int plat_device_is_coherent(struct device *dev) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | #endif /* __ASM_MACH_LEMOTE_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-lemote/mc146818rtc.h b/include/asm-mips/mach-lemote/mc146818rtc.h new file mode 100644 index 000000000000..ed5147e11085 --- /dev/null +++ b/include/asm-mips/mach-lemote/mc146818rtc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1998, 2001, 03, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * RTC routines for PC style attached Dallas chip. | ||
9 | */ | ||
10 | #ifndef __ASM_MACH_LEMOTE_MC146818RTC_H | ||
11 | #define __ASM_MACH_LEMOTE_MC146818RTC_H | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | |||
15 | #define RTC_PORT(x) (0x70 + (x)) | ||
16 | #define RTC_IRQ 8 | ||
17 | |||
18 | static inline unsigned char CMOS_READ(unsigned long addr) | ||
19 | { | ||
20 | outb_p(addr, RTC_PORT(0)); | ||
21 | return inb_p(RTC_PORT(1)); | ||
22 | } | ||
23 | |||
24 | static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | ||
25 | { | ||
26 | outb_p(addr, RTC_PORT(0)); | ||
27 | outb_p(data, RTC_PORT(1)); | ||
28 | } | ||
29 | |||
30 | #define RTC_ALWAYS_BCD 0 | ||
31 | |||
32 | #ifndef mc146818_decode_year | ||
33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | ||
34 | #endif | ||
35 | |||
36 | #endif /* __ASM_MACH_LEMOTE_MC146818RTC_H */ | ||
diff --git a/include/asm-mips/mach-mips/kernel-entry-init.h b/include/asm-mips/mach-mips/kernel-entry-init.h new file mode 100644 index 000000000000..0b793e7bf67e --- /dev/null +++ b/include/asm-mips/mach-mips/kernel-entry-init.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Chris Dearman (chris@mips.com) | ||
7 | * Copyright (C) 2007 Mips Technologies, Inc. | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H | ||
10 | #define __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H | ||
11 | |||
12 | .macro kernel_entry_setup | ||
13 | #ifdef CONFIG_MIPS_MT_SMTC | ||
14 | mfc0 t0, CP0_CONFIG | ||
15 | bgez t0, 9f | ||
16 | mfc0 t0, CP0_CONFIG, 1 | ||
17 | bgez t0, 9f | ||
18 | mfc0 t0, CP0_CONFIG, 2 | ||
19 | bgez t0, 9f | ||
20 | mfc0 t0, CP0_CONFIG, 3 | ||
21 | and t0, 1<<2 | ||
22 | bnez t0, 0f | ||
23 | 9: | ||
24 | /* Assume we came from YAMON... */ | ||
25 | PTR_LA v0, 0x9fc00534 /* YAMON print */ | ||
26 | lw v0, (v0) | ||
27 | move a0, zero | ||
28 | PTR_LA a1, nonmt_processor | ||
29 | jal v0 | ||
30 | |||
31 | PTR_LA v0, 0x9fc00520 /* YAMON exit */ | ||
32 | lw v0, (v0) | ||
33 | li a0, 1 | ||
34 | jal v0 | ||
35 | |||
36 | 1: b 1b | ||
37 | |||
38 | __INITDATA | ||
39 | nonmt_processor: | ||
40 | .asciz "SMTC kernel requires the MT ASE to run\n" | ||
41 | __FINIT | ||
42 | 0: | ||
43 | #endif | ||
44 | .endm | ||
45 | |||
46 | /* | ||
47 | * Do SMP slave processor setup necessary before we can safely execute C code. | ||
48 | */ | ||
49 | .macro smp_slave_setup | ||
50 | .endm | ||
51 | |||
52 | #endif /* __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H */ | ||
diff --git a/include/asm-mips/mach-sim/cpu-feature-overrides.h b/include/asm-mips/mach-mipssim/cpu-feature-overrides.h index 779b02205737..779b02205737 100644 --- a/include/asm-mips/mach-sim/cpu-feature-overrides.h +++ b/include/asm-mips/mach-mipssim/cpu-feature-overrides.h | |||
diff --git a/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h b/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h deleted file mode 100644 index 57a12ded0613..000000000000 --- a/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2004 MontaVista Software Inc. | ||
7 | * Author: Manish Lachwani, mlachwani@mvista.com | ||
8 | * Copyright (C) 2004 Ralf Baechle | ||
9 | */ | ||
10 | #ifndef __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H | ||
11 | #define __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H | ||
12 | |||
13 | /* | ||
14 | * Momentum Ocelot-3 is based on Rm7900 processor which | ||
15 | * is based on the E9000 core. | ||
16 | */ | ||
17 | #define cpu_has_watch 1 | ||
18 | #define cpu_has_mips16 0 | ||
19 | #define cpu_has_divec 0 | ||
20 | #define cpu_has_vce 0 | ||
21 | #define cpu_has_cache_cdex_p 0 | ||
22 | #define cpu_has_cache_cdex_s 0 | ||
23 | #define cpu_has_prefetch 1 | ||
24 | #define cpu_has_mcheck 0 | ||
25 | #define cpu_has_ejtag 0 | ||
26 | |||
27 | #define cpu_has_llsc 1 | ||
28 | #define cpu_has_vtag_icache 0 | ||
29 | #define cpu_has_dc_aliases 0 | ||
30 | #define cpu_has_ic_fills_f_dc 0 | ||
31 | #define cpu_has_dsp 0 | ||
32 | #define cpu_icache_snoops_remote_store 0 | ||
33 | |||
34 | #define cpu_has_nofpuex 0 | ||
35 | #define cpu_has_64bits 1 | ||
36 | |||
37 | #define cpu_has_inclusive_pcaches 0 | ||
38 | |||
39 | #define cpu_dcache_line_size() 32 | ||
40 | #define cpu_icache_line_size() 32 | ||
41 | #define cpu_scache_line_size() 32 | ||
42 | |||
43 | #define cpu_has_mips32r1 0 | ||
44 | #define cpu_has_mips32r2 0 | ||
45 | #define cpu_has_mips64r1 0 | ||
46 | #define cpu_has_mips64r2 0 | ||
47 | |||
48 | #endif /* __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/mach-tx49xx/ioremap.h b/include/asm-mips/mach-tx49xx/ioremap.h new file mode 100644 index 000000000000..1e7beae72229 --- /dev/null +++ b/include/asm-mips/mach-tx49xx/ioremap.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * include/asm-mips/mach-tx49xx/ioremap.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_TX49XX_IOREMAP_H | ||
10 | #define __ASM_MACH_TX49XX_IOREMAP_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | /* | ||
15 | * Allow physical addresses to be fixed up to help peripherals located | ||
16 | * outside the low 32-bit range -- generic pass-through version. | ||
17 | */ | ||
18 | static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) | ||
19 | { | ||
20 | return phys_addr; | ||
21 | } | ||
22 | |||
23 | static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | ||
24 | unsigned long flags) | ||
25 | { | ||
26 | #ifdef CONFIG_64BIT | ||
27 | #define TXX9_DIRECTMAP_BASE 0xfff000000ul | ||
28 | #else | ||
29 | #define TXX9_DIRECTMAP_BASE 0xff000000ul | ||
30 | #endif | ||
31 | if (offset >= TXX9_DIRECTMAP_BASE && | ||
32 | offset < TXX9_DIRECTMAP_BASE + 0x400000) | ||
33 | return (void __iomem *)(unsigned long)(int)offset; | ||
34 | return NULL; | ||
35 | } | ||
36 | |||
37 | static inline int plat_iounmap(const volatile void __iomem *addr) | ||
38 | { | ||
39 | return (unsigned long)addr >= | ||
40 | (unsigned long)(int)(TXX9_DIRECTMAP_BASE & 0xffffffff); | ||
41 | } | ||
42 | |||
43 | #endif /* __ASM_MACH_TX49XX_IOREMAP_H */ | ||
diff --git a/include/asm-mips/mips-boards/atlasint.h b/include/asm-mips/mips-boards/atlasint.h index 76add42e486e..93ba1c1b2a4f 100644 --- a/include/asm-mips/mips-boards/atlasint.h +++ b/include/asm-mips/mips-boards/atlasint.h | |||
@@ -28,11 +28,6 @@ | |||
28 | 28 | ||
29 | #include <irq.h> | 29 | #include <irq.h> |
30 | 30 | ||
31 | /* | ||
32 | * Interrupts 0..7 are used for Atlas CPU interrupts (nonEIC mode) | ||
33 | */ | ||
34 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
35 | |||
36 | /* CPU interrupt offsets */ | 31 | /* CPU interrupt offsets */ |
37 | #define MIPSCPU_INT_SW0 0 | 32 | #define MIPSCPU_INT_SW0 0 |
38 | #define MIPSCPU_INT_SW1 1 | 33 | #define MIPSCPU_INT_SW1 1 |
@@ -42,7 +37,6 @@ | |||
42 | #define MIPSCPU_INT_MB2 4 | 37 | #define MIPSCPU_INT_MB2 4 |
43 | #define MIPSCPU_INT_MB3 5 | 38 | #define MIPSCPU_INT_MB3 5 |
44 | #define MIPSCPU_INT_MB4 6 | 39 | #define MIPSCPU_INT_MB4 6 |
45 | #define MIPSCPU_INT_CPUCTR 7 | ||
46 | 40 | ||
47 | /* | 41 | /* |
48 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts | 42 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts |
diff --git a/include/asm-mips/mips-boards/bonito64.h b/include/asm-mips/mips-boards/bonito64.h index cd7125610100..dc3fc32eedd8 100644 --- a/include/asm-mips/mips-boards/bonito64.h +++ b/include/asm-mips/mips-boards/bonito64.h | |||
@@ -26,7 +26,12 @@ | |||
26 | /* offsets from base register */ | 26 | /* offsets from base register */ |
27 | #define BONITO(x) (x) | 27 | #define BONITO(x) (x) |
28 | 28 | ||
29 | #else /* !__ASSEMBLY__ */ | 29 | #elif defined(CONFIG_LEMOTE_FULONG) |
30 | |||
31 | #define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x))) | ||
32 | #define BONITO_IRQ_BASE 32 | ||
33 | |||
34 | #else | ||
30 | 35 | ||
31 | /* | 36 | /* |
32 | * Algorithmics Bonito64 system controller register base. | 37 | * Algorithmics Bonito64 system controller register base. |
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index b98f1658cfd0..c8ebcc3e1267 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h | |||
@@ -73,12 +73,28 @@ | |||
73 | * CoreEMUL with Bonito System Controller is treated like a Core20K | 73 | * CoreEMUL with Bonito System Controller is treated like a Core20K |
74 | * CoreEMUL with SOC-it 101 System Controller is treated like a CoreMSC | 74 | * CoreEMUL with SOC-it 101 System Controller is treated like a CoreMSC |
75 | */ | 75 | */ |
76 | #define MIPS_REVISION_CORID_CORE_EMUL_BON 0x63 | 76 | #define MIPS_REVISION_CORID_CORE_EMUL_BON -1 |
77 | #define MIPS_REVISION_CORID_CORE_EMUL_MSC 0x65 | 77 | #define MIPS_REVISION_CORID_CORE_EMUL_MSC -2 |
78 | 78 | ||
79 | #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) | 79 | #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) |
80 | 80 | ||
81 | extern unsigned int mips_revision_corid; | 81 | extern int mips_revision_corid; |
82 | |||
83 | #define MIPS_REVISION_SCON_OTHER 0 | ||
84 | #define MIPS_REVISION_SCON_SOCITSC 1 | ||
85 | #define MIPS_REVISION_SCON_SOCITSCP 2 | ||
86 | |||
87 | /* Artificial SCON defines for MIPS_REVISION_SCON_OTHER */ | ||
88 | #define MIPS_REVISION_SCON_UNKNOWN -1 | ||
89 | #define MIPS_REVISION_SCON_GT64120 -2 | ||
90 | #define MIPS_REVISION_SCON_BONITO -3 | ||
91 | #define MIPS_REVISION_SCON_BRTL -4 | ||
92 | #define MIPS_REVISION_SCON_SOCIT -5 | ||
93 | #define MIPS_REVISION_SCON_ROCIT -6 | ||
94 | |||
95 | #define MIPS_REVISION_SCONID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 24) & 0xff) | ||
96 | |||
97 | extern int mips_revision_sconid; | ||
82 | 98 | ||
83 | #ifdef CONFIG_PCI | 99 | #ifdef CONFIG_PCI |
84 | extern void mips_pcibios_init(void); | 100 | extern void mips_pcibios_init(void); |
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h index 9180d6466113..7461318f1cd1 100644 --- a/include/asm-mips/mips-boards/maltaint.h +++ b/include/asm-mips/mips-boards/maltaint.h | |||
@@ -32,11 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | #define MALTA_INT_BASE 0 | 33 | #define MALTA_INT_BASE 0 |
34 | 34 | ||
35 | /* | ||
36 | * Interrupts 16..23 are used for Malta CPU interrupts (nonEIC mode) | ||
37 | */ | ||
38 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
39 | |||
40 | /* CPU interrupt offsets */ | 35 | /* CPU interrupt offsets */ |
41 | #define MIPSCPU_INT_SW0 0 | 36 | #define MIPSCPU_INT_SW0 0 |
42 | #define MIPSCPU_INT_SW1 1 | 37 | #define MIPSCPU_INT_SW1 1 |
@@ -49,7 +44,6 @@ | |||
49 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 44 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
50 | #define MIPSCPU_INT_MB4 6 | 45 | #define MIPSCPU_INT_MB4 6 |
51 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 | 46 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 |
52 | #define MIPSCPU_INT_CPUCTR 7 | ||
53 | 47 | ||
54 | /* | 48 | /* |
55 | * Interrupts 64..127 are used for Soc-it Classic interrupts | 49 | * Interrupts 64..127 are used for Soc-it Classic interrupts |
diff --git a/include/asm-mips/mips-boards/msc01_pci.h b/include/asm-mips/mips-boards/msc01_pci.h index 8eaefb837b9d..e036b7dd6deb 100644 --- a/include/asm-mips/mips-boards/msc01_pci.h +++ b/include/asm-mips/mips-boards/msc01_pci.h | |||
@@ -208,6 +208,7 @@ | |||
208 | * latter, they should be moved elsewhere. | 208 | * latter, they should be moved elsewhere. |
209 | */ | 209 | */ |
210 | #define MIPS_MSC01_PCI_REG_BASE 0x1bd00000 | 210 | #define MIPS_MSC01_PCI_REG_BASE 0x1bd00000 |
211 | #define MIPS_SOCITSC_PCI_REG_BASE 0x1ff10000 | ||
211 | 212 | ||
212 | extern unsigned long _pcictrl_msc; | 213 | extern unsigned long _pcictrl_msc; |
213 | 214 | ||
diff --git a/include/asm-mips/mips-boards/seadint.h b/include/asm-mips/mips-boards/seadint.h index 4f6a3933699d..e710bae07340 100644 --- a/include/asm-mips/mips-boards/seadint.h +++ b/include/asm-mips/mips-boards/seadint.h | |||
@@ -22,14 +22,7 @@ | |||
22 | 22 | ||
23 | #include <irq.h> | 23 | #include <irq.h> |
24 | 24 | ||
25 | /* | ||
26 | * Interrupts 0..7 are used for SEAD CPU interrupts | ||
27 | */ | ||
28 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
29 | |||
30 | #define MIPSCPU_INT_UART0 2 | 25 | #define MIPSCPU_INT_UART0 2 |
31 | #define MIPSCPU_INT_UART1 3 | 26 | #define MIPSCPU_INT_UART1 3 |
32 | 27 | ||
33 | #define MIPSCPU_INT_CPUCTR 7 | ||
34 | |||
35 | #endif /* !(_MIPS_SEADINT_H) */ | 28 | #endif /* !(_MIPS_SEADINT_H) */ |
diff --git a/include/asm-mips/mips-boards/simint.h b/include/asm-mips/mips-boards/simint.h index 54f2fe621d69..8ef6db76d5c1 100644 --- a/include/asm-mips/mips-boards/simint.h +++ b/include/asm-mips/mips-boards/simint.h | |||
@@ -21,15 +21,11 @@ | |||
21 | 21 | ||
22 | #define SIM_INT_BASE 0 | 22 | #define SIM_INT_BASE 0 |
23 | #define MIPSCPU_INT_MB0 2 | 23 | #define MIPSCPU_INT_MB0 2 |
24 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
25 | #define MIPS_CPU_TIMER_IRQ 7 | 24 | #define MIPS_CPU_TIMER_IRQ 7 |
26 | 25 | ||
27 | 26 | ||
28 | #define MIPSCPU_INT_CPUCTR 7 | ||
29 | |||
30 | #define MSC01E_INT_BASE 64 | 27 | #define MSC01E_INT_BASE 64 |
31 | 28 | ||
32 | #define MIPSCPU_INT_CPUCTR 7 | ||
33 | #define MSC01E_INT_CPUCTR 11 | 29 | #define MSC01E_INT_CPUCTR 11 |
34 | 30 | ||
35 | #endif | 31 | #endif |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 9985cb7c16e7..18f47f1e8cd5 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 2000 Silicon Graphics, Inc. |
8 | * Modified for further R[236]000 support by Paul M. Antoine, 1996. | 8 | * Modified for further R[236]000 support by Paul M. Antoine, 1996. |
9 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 9 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
10 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | 10 | * Copyright (C) 2000, 07 MIPS Technologies, Inc. |
11 | * Copyright (C) 2003, 2004 Maciej W. Rozycki | 11 | * Copyright (C) 2003, 2004 Maciej W. Rozycki |
12 | */ | 12 | */ |
13 | #ifndef _ASM_MIPSREGS_H | 13 | #ifndef _ASM_MIPSREGS_H |
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <asm/hazards.h> | 17 | #include <asm/hazards.h> |
18 | #include <asm/war.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * The following macros are especially useful for __asm__ | 21 | * The following macros are especially useful for __asm__ |
@@ -533,6 +534,12 @@ | |||
533 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) | 534 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) |
534 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) | 535 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) |
535 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) | 536 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) |
537 | #define MIPS_CONF3_ULRI (_ULCAST_(1) << 13) | ||
538 | |||
539 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | ||
540 | |||
541 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) | ||
542 | |||
536 | 543 | ||
537 | /* | 544 | /* |
538 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. | 545 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. |
@@ -700,10 +707,10 @@ do { \ | |||
700 | */ | 707 | */ |
701 | #define __read_64bit_c0_split(source, sel) \ | 708 | #define __read_64bit_c0_split(source, sel) \ |
702 | ({ \ | 709 | ({ \ |
703 | unsigned long long val; \ | 710 | unsigned long long __val; \ |
704 | unsigned long flags; \ | 711 | unsigned long __flags; \ |
705 | \ | 712 | \ |
706 | local_irq_save(flags); \ | 713 | local_irq_save(__flags); \ |
707 | if (sel == 0) \ | 714 | if (sel == 0) \ |
708 | __asm__ __volatile__( \ | 715 | __asm__ __volatile__( \ |
709 | ".set\tmips64\n\t" \ | 716 | ".set\tmips64\n\t" \ |
@@ -712,7 +719,7 @@ do { \ | |||
712 | "dsrl\t%M0, %M0, 32\n\t" \ | 719 | "dsrl\t%M0, %M0, 32\n\t" \ |
713 | "dsrl\t%L0, %L0, 32\n\t" \ | 720 | "dsrl\t%L0, %L0, 32\n\t" \ |
714 | ".set\tmips0" \ | 721 | ".set\tmips0" \ |
715 | : "=r" (val)); \ | 722 | : "=r" (__val)); \ |
716 | else \ | 723 | else \ |
717 | __asm__ __volatile__( \ | 724 | __asm__ __volatile__( \ |
718 | ".set\tmips64\n\t" \ | 725 | ".set\tmips64\n\t" \ |
@@ -721,17 +728,17 @@ do { \ | |||
721 | "dsrl\t%M0, %M0, 32\n\t" \ | 728 | "dsrl\t%M0, %M0, 32\n\t" \ |
722 | "dsrl\t%L0, %L0, 32\n\t" \ | 729 | "dsrl\t%L0, %L0, 32\n\t" \ |
723 | ".set\tmips0" \ | 730 | ".set\tmips0" \ |
724 | : "=r" (val)); \ | 731 | : "=r" (__val)); \ |
725 | local_irq_restore(flags); \ | 732 | local_irq_restore(__flags); \ |
726 | \ | 733 | \ |
727 | val; \ | 734 | __val; \ |
728 | }) | 735 | }) |
729 | 736 | ||
730 | #define __write_64bit_c0_split(source, sel, val) \ | 737 | #define __write_64bit_c0_split(source, sel, val) \ |
731 | do { \ | 738 | do { \ |
732 | unsigned long flags; \ | 739 | unsigned long __flags; \ |
733 | \ | 740 | \ |
734 | local_irq_save(flags); \ | 741 | local_irq_save(__flags); \ |
735 | if (sel == 0) \ | 742 | if (sel == 0) \ |
736 | __asm__ __volatile__( \ | 743 | __asm__ __volatile__( \ |
737 | ".set\tmips64\n\t" \ | 744 | ".set\tmips64\n\t" \ |
@@ -752,7 +759,7 @@ do { \ | |||
752 | "dmtc0\t%L0, " #source ", " #sel "\n\t" \ | 759 | "dmtc0\t%L0, " #source ", " #sel "\n\t" \ |
753 | ".set\tmips0" \ | 760 | ".set\tmips0" \ |
754 | : : "r" (val)); \ | 761 | : : "r" (val)); \ |
755 | local_irq_restore(flags); \ | 762 | local_irq_restore(__flags); \ |
756 | } while (0) | 763 | } while (0) |
757 | 764 | ||
758 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 765 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
@@ -770,6 +777,9 @@ do { \ | |||
770 | #define read_c0_context() __read_ulong_c0_register($4, 0) | 777 | #define read_c0_context() __read_ulong_c0_register($4, 0) |
771 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) | 778 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) |
772 | 779 | ||
780 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) | ||
781 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) | ||
782 | |||
773 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) | 783 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) |
774 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) | 784 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) |
775 | 785 | ||
@@ -1292,10 +1302,39 @@ static inline void tlb_probe(void) | |||
1292 | 1302 | ||
1293 | static inline void tlb_read(void) | 1303 | static inline void tlb_read(void) |
1294 | { | 1304 | { |
1305 | #if MIPS34K_MISSED_ITLB_WAR | ||
1306 | int res = 0; | ||
1307 | |||
1308 | __asm__ __volatile__( | ||
1309 | " .set push \n" | ||
1310 | " .set noreorder \n" | ||
1311 | " .set noat \n" | ||
1312 | " .set mips32r2 \n" | ||
1313 | " .word 0x41610001 # dvpe $1 \n" | ||
1314 | " move %0, $1 \n" | ||
1315 | " ehb \n" | ||
1316 | " .set pop \n" | ||
1317 | : "=r" (res)); | ||
1318 | |||
1319 | instruction_hazard(); | ||
1320 | #endif | ||
1321 | |||
1295 | __asm__ __volatile__( | 1322 | __asm__ __volatile__( |
1296 | ".set noreorder\n\t" | 1323 | ".set noreorder\n\t" |
1297 | "tlbr\n\t" | 1324 | "tlbr\n\t" |
1298 | ".set reorder"); | 1325 | ".set reorder"); |
1326 | |||
1327 | #if MIPS34K_MISSED_ITLB_WAR | ||
1328 | if ((res & _ULCAST_(1))) | ||
1329 | __asm__ __volatile__( | ||
1330 | " .set push \n" | ||
1331 | " .set noreorder \n" | ||
1332 | " .set noat \n" | ||
1333 | " .set mips32r2 \n" | ||
1334 | " .word 0x41600021 # evpe \n" | ||
1335 | " ehb \n" | ||
1336 | " .set pop \n"); | ||
1337 | #endif | ||
1299 | } | 1338 | } |
1300 | 1339 | ||
1301 | static inline void tlb_write_indexed(void) | 1340 | static inline void tlb_write_indexed(void) |
diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h index 399d03f1c4fc..de6d09ebbd80 100644 --- a/include/asm-mips/module.h +++ b/include/asm-mips/module.h | |||
@@ -112,6 +112,8 @@ search_module_dbetables(unsigned long addr) | |||
112 | #define MODULE_PROC_FAMILY "RM9000 " | 112 | #define MODULE_PROC_FAMILY "RM9000 " |
113 | #elif defined CONFIG_CPU_SB1 | 113 | #elif defined CONFIG_CPU_SB1 |
114 | #define MODULE_PROC_FAMILY "SB1 " | 114 | #define MODULE_PROC_FAMILY "SB1 " |
115 | #elif defined CONFIG_CPU_LOONGSON2 | ||
116 | #define MODULE_PROC_FAMILY "LOONGSON2 " | ||
115 | #else | 117 | #else |
116 | #error MODULE_PROC_FAMILY undefined for your processor configuration | 118 | #error MODULE_PROC_FAMILY undefined for your processor configuration |
117 | #endif | 119 | #endif |
@@ -122,6 +124,13 @@ search_module_dbetables(unsigned long addr) | |||
122 | #define MODULE_KERNEL_TYPE "64BIT " | 124 | #define MODULE_KERNEL_TYPE "64BIT " |
123 | #endif | 125 | #endif |
124 | 126 | ||
125 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_KERNEL_TYPE | 127 | #ifdef CONFIG_MIPS_MT_SMTC |
128 | #define MODULE_KERNEL_SMTC "MT_SMTC " | ||
129 | #else | ||
130 | #define MODULE_KERNEL_SMTC "" | ||
131 | #endif | ||
132 | |||
133 | #define MODULE_ARCH_VERMAGIC \ | ||
134 | MODULE_PROC_FAMILY MODULE_KERNEL_TYPE MODULE_KERNEL_SMTC | ||
126 | 135 | ||
127 | #endif /* _ASM_MODULE_H */ | 136 | #endif /* _ASM_MODULE_H */ |
diff --git a/include/asm-mips/nile4.h b/include/asm-mips/nile4.h deleted file mode 100644 index c3ca959aa4d9..000000000000 --- a/include/asm-mips/nile4.h +++ /dev/null | |||
@@ -1,310 +0,0 @@ | |||
1 | /* | ||
2 | * asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions | ||
3 | * | ||
4 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> | ||
5 | * Sony Software Development Center Europe (SDCE), Brussels | ||
6 | * | ||
7 | * This file is based on the following documentation: | ||
8 | * | ||
9 | * NEC Vrc 5074 System Controller Data Sheet, June 1998 | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_NILE4_H | ||
13 | #define _ASM_NILE4_H | ||
14 | |||
15 | #define NILE4_BASE 0xbfa00000 | ||
16 | #define NILE4_SIZE 0x00200000 /* 2 MB */ | ||
17 | |||
18 | |||
19 | /* | ||
20 | * Physical Device Address Registers (PDARs) | ||
21 | */ | ||
22 | |||
23 | #define NILE4_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ | ||
24 | #define NILE4_SDRAM1 0x0008 /* SDRAM Bank 1 [R/W] */ | ||
25 | #define NILE4_DCS2 0x0010 /* Device Chip-Select 2 [R/W] */ | ||
26 | #define NILE4_DCS3 0x0018 /* Device Chip-Select 3 [R/W] */ | ||
27 | #define NILE4_DCS4 0x0020 /* Device Chip-Select 4 [R/W] */ | ||
28 | #define NILE4_DCS5 0x0028 /* Device Chip-Select 5 [R/W] */ | ||
29 | #define NILE4_DCS6 0x0030 /* Device Chip-Select 6 [R/W] */ | ||
30 | #define NILE4_DCS7 0x0038 /* Device Chip-Select 7 [R/W] */ | ||
31 | #define NILE4_DCS8 0x0040 /* Device Chip-Select 8 [R/W] */ | ||
32 | #define NILE4_PCIW0 0x0060 /* PCI Address Window 0 [R/W] */ | ||
33 | #define NILE4_PCIW1 0x0068 /* PCI Address Window 1 [R/W] */ | ||
34 | #define NILE4_INTCS 0x0070 /* Controller Internal Registers and Devices */ | ||
35 | /* [R/W] */ | ||
36 | #define NILE4_BOOTCS 0x0078 /* Boot ROM Chip-Select [R/W] */ | ||
37 | |||
38 | |||
39 | /* | ||
40 | * CPU Interface Registers | ||
41 | */ | ||
42 | |||
43 | #define NILE4_CPUSTAT 0x0080 /* CPU Status [R/W] */ | ||
44 | #define NILE4_INTCTRL 0x0088 /* Interrupt Control [R/W] */ | ||
45 | #define NILE4_INTSTAT0 0x0090 /* Interrupt Status 0 [R] */ | ||
46 | #define NILE4_INTSTAT1 0x0098 /* Interrupt Status 1 and CPU Interrupt */ | ||
47 | /* Enable [R/W] */ | ||
48 | #define NILE4_INTCLR 0x00A0 /* Interrupt Clear [R/W] */ | ||
49 | #define NILE4_INTPPES 0x00A8 /* PCI Interrupt Control [R/W] */ | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Memory-Interface Registers | ||
54 | */ | ||
55 | |||
56 | #define NILE4_MEMCTRL 0x00C0 /* Memory Control */ | ||
57 | #define NILE4_ACSTIME 0x00C8 /* Memory Access Timing [R/W] */ | ||
58 | #define NILE4_CHKERR 0x00D0 /* Memory Check Error Status [R] */ | ||
59 | |||
60 | |||
61 | /* | ||
62 | * PCI-Bus Registers | ||
63 | */ | ||
64 | |||
65 | #define NILE4_PCICTRL 0x00E0 /* PCI Control [R/W] */ | ||
66 | #define NILE4_PCIARB 0x00E8 /* PCI Arbiter [R/W] */ | ||
67 | #define NILE4_PCIINIT0 0x00F0 /* PCI Master (Initiator) 0 [R/W] */ | ||
68 | #define NILE4_PCIINIT1 0x00F8 /* PCI Master (Initiator) 1 [R/W] */ | ||
69 | #define NILE4_PCIERR 0x00B8 /* PCI Error [R/W] */ | ||
70 | |||
71 | |||
72 | /* | ||
73 | * Local-Bus Registers | ||
74 | */ | ||
75 | |||
76 | #define NILE4_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ | ||
77 | #define NILE4_LCST2 0x0110 /* Local Bus Chip-Select Timing 2 [R/W] */ | ||
78 | #define NILE4_LCST3 0x0118 /* Local Bus Chip-Select Timing 3 [R/W] */ | ||
79 | #define NILE4_LCST4 0x0120 /* Local Bus Chip-Select Timing 4 [R/W] */ | ||
80 | #define NILE4_LCST5 0x0128 /* Local Bus Chip-Select Timing 5 [R/W] */ | ||
81 | #define NILE4_LCST6 0x0130 /* Local Bus Chip-Select Timing 6 [R/W] */ | ||
82 | #define NILE4_LCST7 0x0138 /* Local Bus Chip-Select Timing 7 [R/W] */ | ||
83 | #define NILE4_LCST8 0x0140 /* Local Bus Chip-Select Timing 8 [R/W] */ | ||
84 | #define NILE4_DCSFN 0x0150 /* Device Chip-Select Muxing and Output */ | ||
85 | /* Enables [R/W] */ | ||
86 | #define NILE4_DCSIO 0x0158 /* Device Chip-Selects As I/O Bits [R/W] */ | ||
87 | #define NILE4_BCST 0x0178 /* Local Boot Chip-Select Timing [R/W] */ | ||
88 | |||
89 | |||
90 | /* | ||
91 | * DMA Registers | ||
92 | */ | ||
93 | |||
94 | #define NILE4_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ | ||
95 | #define NILE4_DMASRCA0 0x0188 /* DMA Source Address 0 [R/W] */ | ||
96 | #define NILE4_DMADESA0 0x0190 /* DMA Destination Address 0 [R/W] */ | ||
97 | #define NILE4_DMACTRL1 0x0198 /* DMA Control 1 [R/W] */ | ||
98 | #define NILE4_DMASRCA1 0x01A0 /* DMA Source Address 1 [R/W] */ | ||
99 | #define NILE4_DMADESA1 0x01A8 /* DMA Destination Address 1 [R/W] */ | ||
100 | |||
101 | |||
102 | /* | ||
103 | * Timer Registers | ||
104 | */ | ||
105 | |||
106 | #define NILE4_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ | ||
107 | #define NILE4_T0CNTR 0x01C8 /* SDRAM Refresh Counter [R/W] */ | ||
108 | #define NILE4_T1CTRL 0x01D0 /* CPU-Bus Read Time-Out Control [R/W] */ | ||
109 | #define NILE4_T1CNTR 0x01D8 /* CPU-Bus Read Time-Out Counter [R/W] */ | ||
110 | #define NILE4_T2CTRL 0x01E0 /* General-Purpose Timer Control [R/W] */ | ||
111 | #define NILE4_T2CNTR 0x01E8 /* General-Purpose Timer Counter [R/W] */ | ||
112 | #define NILE4_T3CTRL 0x01F0 /* Watchdog Timer Control [R/W] */ | ||
113 | #define NILE4_T3CNTR 0x01F8 /* Watchdog Timer Counter [R/W] */ | ||
114 | |||
115 | |||
116 | /* | ||
117 | * PCI Configuration Space Registers | ||
118 | */ | ||
119 | |||
120 | #define NILE4_PCI_BASE 0x0200 | ||
121 | |||
122 | #define NILE4_VID 0x0200 /* PCI Vendor ID [R] */ | ||
123 | #define NILE4_DID 0x0202 /* PCI Device ID [R] */ | ||
124 | #define NILE4_PCICMD 0x0204 /* PCI Command [R/W] */ | ||
125 | #define NILE4_PCISTS 0x0206 /* PCI Status [R/W] */ | ||
126 | #define NILE4_REVID 0x0208 /* PCI Revision ID [R] */ | ||
127 | #define NILE4_CLASS 0x0209 /* PCI Class Code [R] */ | ||
128 | #define NILE4_CLSIZ 0x020C /* PCI Cache Line Size [R/W] */ | ||
129 | #define NILE4_MLTIM 0x020D /* PCI Latency Timer [R/W] */ | ||
130 | #define NILE4_HTYPE 0x020E /* PCI Header Type [R] */ | ||
131 | #define NILE4_BIST 0x020F /* BIST [R] (unimplemented) */ | ||
132 | #define NILE4_BARC 0x0210 /* PCI Base Address Register Control [R/W] */ | ||
133 | #define NILE4_BAR0 0x0218 /* PCI Base Address Register 0 [R/W] */ | ||
134 | #define NILE4_BAR1 0x0220 /* PCI Base Address Register 1 [R/W] */ | ||
135 | #define NILE4_CIS 0x0228 /* PCI Cardbus CIS Pointer [R] */ | ||
136 | /* (unimplemented) */ | ||
137 | #define NILE4_SSVID 0x022C /* PCI Sub-System Vendor ID [R/W] */ | ||
138 | #define NILE4_SSID 0x022E /* PCI Sub-System ID [R/W] */ | ||
139 | #define NILE4_ROM 0x0230 /* Expansion ROM Base Address [R] */ | ||
140 | /* (unimplemented) */ | ||
141 | #define NILE4_INTLIN 0x023C /* PCI Interrupt Line [R/W] */ | ||
142 | #define NILE4_INTPIN 0x023D /* PCI Interrupt Pin [R] */ | ||
143 | #define NILE4_MINGNT 0x023E /* PCI Min_Gnt [R] (unimplemented) */ | ||
144 | #define NILE4_MAXLAT 0x023F /* PCI Max_Lat [R] (unimplemented) */ | ||
145 | #define NILE4_BAR2 0x0240 /* PCI Base Address Register 2 [R/W] */ | ||
146 | #define NILE4_BAR3 0x0248 /* PCI Base Address Register 3 [R/W] */ | ||
147 | #define NILE4_BAR4 0x0250 /* PCI Base Address Register 4 [R/W] */ | ||
148 | #define NILE4_BAR5 0x0258 /* PCI Base Address Register 5 [R/W] */ | ||
149 | #define NILE4_BAR6 0x0260 /* PCI Base Address Register 6 [R/W] */ | ||
150 | #define NILE4_BAR7 0x0268 /* PCI Base Address Register 7 [R/W] */ | ||
151 | #define NILE4_BAR8 0x0270 /* PCI Base Address Register 8 [R/W] */ | ||
152 | #define NILE4_BARB 0x0278 /* PCI Base Address Register BOOT [R/W] */ | ||
153 | |||
154 | |||
155 | /* | ||
156 | * Serial-Port Registers | ||
157 | */ | ||
158 | |||
159 | #define NILE4_UART_BASE 0x0300 | ||
160 | |||
161 | #define NILE4_UARTRBR 0x0300 /* UART Receiver Data Buffer [R] */ | ||
162 | #define NILE4_UARTTHR 0x0300 /* UART Transmitter Data Holding [W] */ | ||
163 | #define NILE4_UARTIER 0x0308 /* UART Interrupt Enable [R/W] */ | ||
164 | #define NILE4_UARTDLL 0x0300 /* UART Divisor Latch LSB [R/W] */ | ||
165 | #define NILE4_UARTDLM 0x0308 /* UART Divisor Latch MSB [R/W] */ | ||
166 | #define NILE4_UARTIIR 0x0310 /* UART Interrupt ID [R] */ | ||
167 | #define NILE4_UARTFCR 0x0310 /* UART FIFO Control [W] */ | ||
168 | #define NILE4_UARTLCR 0x0318 /* UART Line Control [R/W] */ | ||
169 | #define NILE4_UARTMCR 0x0320 /* UART Modem Control [R/W] */ | ||
170 | #define NILE4_UARTLSR 0x0328 /* UART Line Status [R/W] */ | ||
171 | #define NILE4_UARTMSR 0x0330 /* UART Modem Status [R/W] */ | ||
172 | #define NILE4_UARTSCR 0x0338 /* UART Scratch [R/W] */ | ||
173 | |||
174 | #define NILE4_UART_BASE_BAUD 520833 /* 100 MHz / 12 / 16 */ | ||
175 | |||
176 | |||
177 | /* | ||
178 | * Interrupt Lines | ||
179 | */ | ||
180 | |||
181 | #define NILE4_INT_CPCE 0 /* CPU-Interface Parity-Error Interrupt */ | ||
182 | #define NILE4_INT_CNTD 1 /* CPU No-Target Decode Interrupt */ | ||
183 | #define NILE4_INT_MCE 2 /* Memory-Check Error Interrupt */ | ||
184 | #define NILE4_INT_DMA 3 /* DMA Controller Interrupt */ | ||
185 | #define NILE4_INT_UART 4 /* UART Interrupt */ | ||
186 | #define NILE4_INT_WDOG 5 /* Watchdog Timer Interrupt */ | ||
187 | #define NILE4_INT_GPT 6 /* General-Purpose Timer Interrupt */ | ||
188 | #define NILE4_INT_LBRTD 7 /* Local-Bus Ready Timer Interrupt */ | ||
189 | #define NILE4_INT_INTA 8 /* PCI Interrupt Signal INTA# */ | ||
190 | #define NILE4_INT_INTB 9 /* PCI Interrupt Signal INTB# */ | ||
191 | #define NILE4_INT_INTC 10 /* PCI Interrupt Signal INTC# */ | ||
192 | #define NILE4_INT_INTD 11 /* PCI Interrupt Signal INTD# */ | ||
193 | #define NILE4_INT_INTE 12 /* PCI Interrupt Signal INTE# (ISA cascade) */ | ||
194 | #define NILE4_INT_RESV 13 /* Reserved */ | ||
195 | #define NILE4_INT_PCIS 14 /* PCI SERR# Interrupt */ | ||
196 | #define NILE4_INT_PCIE 15 /* PCI Internal Error Interrupt */ | ||
197 | |||
198 | |||
199 | /* | ||
200 | * Nile 4 Register Access | ||
201 | */ | ||
202 | |||
203 | static inline void nile4_sync(void) | ||
204 | { | ||
205 | volatile u32 *p = (volatile u32 *)0xbfc00000; | ||
206 | (void)(*p); | ||
207 | } | ||
208 | |||
209 | static inline void nile4_out32(u32 offset, u32 val) | ||
210 | { | ||
211 | *(volatile u32 *)(NILE4_BASE+offset) = val; | ||
212 | nile4_sync(); | ||
213 | } | ||
214 | |||
215 | static inline u32 nile4_in32(u32 offset) | ||
216 | { | ||
217 | u32 val = *(volatile u32 *)(NILE4_BASE+offset); | ||
218 | nile4_sync(); | ||
219 | return val; | ||
220 | } | ||
221 | |||
222 | static inline void nile4_out16(u32 offset, u16 val) | ||
223 | { | ||
224 | *(volatile u16 *)(NILE4_BASE+offset) = val; | ||
225 | nile4_sync(); | ||
226 | } | ||
227 | |||
228 | static inline u16 nile4_in16(u32 offset) | ||
229 | { | ||
230 | u16 val = *(volatile u16 *)(NILE4_BASE+offset); | ||
231 | nile4_sync(); | ||
232 | return val; | ||
233 | } | ||
234 | |||
235 | static inline void nile4_out8(u32 offset, u8 val) | ||
236 | { | ||
237 | *(volatile u8 *)(NILE4_BASE+offset) = val; | ||
238 | nile4_sync(); | ||
239 | } | ||
240 | |||
241 | static inline u8 nile4_in8(u32 offset) | ||
242 | { | ||
243 | u8 val = *(volatile u8 *)(NILE4_BASE+offset); | ||
244 | nile4_sync(); | ||
245 | return val; | ||
246 | } | ||
247 | |||
248 | |||
249 | /* | ||
250 | * Physical Device Address Registers | ||
251 | */ | ||
252 | |||
253 | extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | ||
254 | int on_memory_bus, int visible); | ||
255 | |||
256 | |||
257 | /* | ||
258 | * PCI Master Registers | ||
259 | */ | ||
260 | |||
261 | #define NILE4_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ | ||
262 | #define NILE4_PCICMD_IO 1 /* PCI I/O Space */ | ||
263 | #define NILE4_PCICMD_MEM 3 /* PCI Memory Space */ | ||
264 | #define NILE4_PCICMD_CFG 5 /* PCI Configuration Space */ | ||
265 | |||
266 | |||
267 | /* | ||
268 | * PCI Address Spaces | ||
269 | * | ||
270 | * Note that these are multiplexed using PCIINIT[01]! | ||
271 | */ | ||
272 | |||
273 | #define NILE4_PCI_IO_BASE 0xa6000000 | ||
274 | #define NILE4_PCI_MEM_BASE 0xa8000000 | ||
275 | #define NILE4_PCI_CFG_BASE NILE4_PCI_MEM_BASE | ||
276 | #define NILE4_PCI_IACK_BASE NILE4_PCI_IO_BASE | ||
277 | |||
278 | |||
279 | extern void nile4_set_pmr(u32 pmr, u32 type, u32 addr); | ||
280 | |||
281 | |||
282 | /* | ||
283 | * Interrupt Programming | ||
284 | */ | ||
285 | |||
286 | #define NUM_I8259_INTERRUPTS 16 | ||
287 | #define NUM_NILE4_INTERRUPTS 16 | ||
288 | |||
289 | #define IRQ_I8259_CASCADE NILE4_INT_INTE | ||
290 | #define is_i8259_irq(irq) ((irq) < NUM_I8259_INTERRUPTS) | ||
291 | #define nile4_to_irq(n) ((n)+NUM_I8259_INTERRUPTS) | ||
292 | #define irq_to_nile4(n) ((n)-NUM_I8259_INTERRUPTS) | ||
293 | |||
294 | extern void nile4_map_irq(int nile4_irq, int cpu_irq); | ||
295 | extern void nile4_map_irq_all(int cpu_irq); | ||
296 | extern void nile4_enable_irq(unsigned int nile4_irq); | ||
297 | extern void nile4_disable_irq(unsigned int nile4_irq); | ||
298 | extern void nile4_disable_irq_all(void); | ||
299 | extern u16 nile4_get_irq_stat(int cpu_irq); | ||
300 | extern void nile4_enable_irq_output(int cpu_irq); | ||
301 | extern void nile4_disable_irq_output(int cpu_irq); | ||
302 | extern void nile4_set_pci_irq_polarity(int pci_irq, int high); | ||
303 | extern void nile4_set_pci_irq_level_or_edge(int pci_irq, int level); | ||
304 | extern void nile4_clear_irq(int nile4_irq); | ||
305 | extern void nile4_clear_irq_mask(u32 mask); | ||
306 | extern u8 nile4_i8259_iack(void); | ||
307 | extern void nile4_dump_irq_status(void); /* Debug */ | ||
308 | |||
309 | #endif | ||
310 | |||
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 5c3239dad0f2..b92dd8c760da 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -34,12 +34,8 @@ | |||
34 | 34 | ||
35 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
36 | 36 | ||
37 | /* | 37 | #include <linux/pfn.h> |
38 | * This gives the physical RAM offset. | 38 | #include <asm/io.h> |
39 | */ | ||
40 | #ifndef PHYS_OFFSET | ||
41 | #define PHYS_OFFSET 0UL | ||
42 | #endif | ||
43 | 39 | ||
44 | /* | 40 | /* |
45 | * It's normally defined only for FLATMEM config but it's | 41 | * It's normally defined only for FLATMEM config but it's |
@@ -48,9 +44,6 @@ | |||
48 | */ | 44 | */ |
49 | #define ARCH_PFN_OFFSET PFN_UP(PHYS_OFFSET) | 45 | #define ARCH_PFN_OFFSET PFN_UP(PHYS_OFFSET) |
50 | 46 | ||
51 | #include <linux/pfn.h> | ||
52 | #include <asm/io.h> | ||
53 | |||
54 | extern void clear_page(void * page); | 47 | extern void clear_page(void * page); |
55 | extern void copy_page(void * to, void * from); | 48 | extern void copy_page(void * to, void * from); |
56 | 49 | ||
@@ -150,11 +143,15 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
150 | * __pa()/__va() should be used only during mem init. | 143 | * __pa()/__va() should be used only during mem init. |
151 | */ | 144 | */ |
152 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) | 145 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
153 | #define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0) | 146 | #define __pa(x) \ |
147 | ({ \ | ||
148 | unsigned long __x = (unsigned long)(x); \ | ||
149 | __x < CKSEG0 ? XPHYSADDR(__x) : CPHYSADDR(__x); \ | ||
150 | }) | ||
154 | #else | 151 | #else |
155 | #define __pa_page_offset(x) PAGE_OFFSET | 152 | #define __pa(x) \ |
153 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) | ||
156 | #endif | 154 | #endif |
157 | #define __pa(x) ((unsigned long)(x) - __pa_page_offset(x) + PHYS_OFFSET) | ||
158 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) | 155 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) |
159 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0)) | 156 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0)) |
160 | 157 | ||
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index 3eea3ba0fca5..4fcc185cb2d1 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -56,7 +56,7 @@ extern void register_pci_controller(struct pci_controller *hose); | |||
56 | /* | 56 | /* |
57 | * board supplied pci irq fixup routine | 57 | * board supplied pci irq fixup routine |
58 | */ | 58 | */ |
59 | extern int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | 59 | extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
60 | 60 | ||
61 | 61 | ||
62 | /* Can be used to override the logic in pci_scan_bus for skipping | 62 | /* Can be used to override the logic in pci_scan_bus for skipping |
@@ -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/pmc-sierra/msp71xx/msp_cic_int.h b/include/asm-mips/pmc-sierra/msp71xx/msp_cic_int.h new file mode 100644 index 000000000000..c84bcf9570b1 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_cic_int.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* | ||
2 | * Defines for the MSP interrupt controller. | ||
3 | * | ||
4 | * Copyright (C) 1999 MIPS Technologies, Inc. All rights reserved. | ||
5 | * Author: Carsten Langgaard, carstenl@mips.com | ||
6 | * | ||
7 | * ######################################################################## | ||
8 | * | ||
9 | * This program is free software; you can distribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License (Version 2) as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
16 | * for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
21 | * | ||
22 | * ######################################################################## | ||
23 | */ | ||
24 | |||
25 | #ifndef _MSP_CIC_INT_H | ||
26 | #define _MSP_CIC_INT_H | ||
27 | |||
28 | /* | ||
29 | * The PMC-Sierra CIC interrupts are all centrally managed by the | ||
30 | * CIC sub-system. | ||
31 | * We attempt to keep the interrupt numbers as consistent as possible | ||
32 | * across all of the MSP devices, but some differences will creep in ... | ||
33 | * The interrupts which are directly forwarded to the MIPS core interrupts | ||
34 | * are assigned interrupts in the range 0-7, interrupts cascaded through | ||
35 | * the CIC are assigned interrupts 8-39. The cascade occurs on C_IRQ4 | ||
36 | * (MSP_INT_CIC). Currently we don't really distinguish between VPE1 | ||
37 | * and VPE0 (or thread contexts for that matter). Will have to fix. | ||
38 | * The PER interrupts are assigned interrupts in the range 40-71. | ||
39 | */ | ||
40 | |||
41 | |||
42 | /* | ||
43 | * IRQs directly forwarded to the CPU | ||
44 | */ | ||
45 | #define MSP_MIPS_INTBASE 0 | ||
46 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | ||
47 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | ||
48 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | ||
49 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | ||
50 | #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */ | ||
51 | #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */ | ||
52 | #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */ | ||
53 | #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */ | ||
54 | |||
55 | /* | ||
56 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) | ||
57 | * These defines should be tied to the register definitions for the CIC | ||
58 | * interrupt routine. For now, just use hard-coded values. | ||
59 | */ | ||
60 | #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8) | ||
61 | #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0) | ||
62 | /* External interrupt 0 */ | ||
63 | #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1) | ||
64 | /* External interrupt 1 */ | ||
65 | #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2) | ||
66 | /* External interrupt 2 */ | ||
67 | #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3) | ||
68 | /* External interrupt 3 */ | ||
69 | #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4) | ||
70 | /* CPU interface interrupt */ | ||
71 | #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5) | ||
72 | /* External interrupt 4 */ | ||
73 | #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6) | ||
74 | /* Cascaded IRQ for USB */ | ||
75 | #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7) | ||
76 | /* Sec engine mailbox IRQ */ | ||
77 | #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8) | ||
78 | /* External interrupt 5 */ | ||
79 | #define MSP_INT_TDM (MSP_CIC_INTBASE + 9) | ||
80 | /* TDM interrupt */ | ||
81 | #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10) | ||
82 | /* Cascaded IRQ for MAC 0 */ | ||
83 | #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11) | ||
84 | /* Cascaded IRQ for MAC 1 */ | ||
85 | #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12) | ||
86 | /* Cascaded IRQ for sec engine */ | ||
87 | #define MSP_INT_PER (MSP_CIC_INTBASE + 13) | ||
88 | /* Peripheral interrupt */ | ||
89 | #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14) | ||
90 | /* SLP timer 0 */ | ||
91 | #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15) | ||
92 | /* SLP timer 1 */ | ||
93 | #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16) | ||
94 | /* SLP timer 2 */ | ||
95 | #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17) | ||
96 | /* VPE0 MIPS timer */ | ||
97 | #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18) | ||
98 | /* Block Copy */ | ||
99 | #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19) | ||
100 | /* UART 0 */ | ||
101 | #define MSP_INT_PCI (MSP_CIC_INTBASE + 20) | ||
102 | /* PCI subsystem */ | ||
103 | #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21) | ||
104 | /* External interrupt 5 */ | ||
105 | #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22) | ||
106 | /* PCI Message Signal */ | ||
107 | #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23) | ||
108 | /* Cascaded ADSL2+ SAR IRQ */ | ||
109 | #define MSP_INT_DSL (MSP_CIC_INTBASE + 24) | ||
110 | /* ADSL2+ IRQ */ | ||
111 | #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25) | ||
112 | /* SLP error condition */ | ||
113 | #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26) | ||
114 | /* VPE1 MIPS timer */ | ||
115 | #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27) | ||
116 | /* VPE0 Performance counter */ | ||
117 | #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28) | ||
118 | /* VPE1 Performance counter */ | ||
119 | #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29) | ||
120 | /* External interrupt 5 */ | ||
121 | #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30) | ||
122 | /* VPE0 Software interrupt */ | ||
123 | #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31) | ||
124 | /* VPE0 Software interrupt */ | ||
125 | |||
126 | /* | ||
127 | * IRQs cascaded on CIC PER interrupt (MSP_INT_PER) | ||
128 | */ | ||
129 | #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32) | ||
130 | /* Reserved 0-1 */ | ||
131 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | ||
132 | /* UART 1 */ | ||
133 | /* Reserved 3-5 */ | ||
134 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | ||
135 | /* 2-wire */ | ||
136 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | ||
137 | /* Peripheral timer block out 0 */ | ||
138 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | ||
139 | /* Peripheral timer block out 1 */ | ||
140 | /* Reserved 9 */ | ||
141 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | ||
142 | /* SPI RX complete */ | ||
143 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | ||
144 | /* SPI TX complete */ | ||
145 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | ||
146 | /* GPIO */ | ||
147 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | ||
148 | /* Peripheral error */ | ||
149 | /* Reserved 14-31 */ | ||
150 | |||
151 | #endif /* !_MSP_CIC_INT_H */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_int.h b/include/asm-mips/pmc-sierra/msp71xx/msp_int.h new file mode 100644 index 000000000000..1d9f05474820 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_int.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Defines for the MSP interrupt handlers. | ||
3 | * | ||
4 | * Copyright (C) 2005, PMC-Sierra, Inc. All rights reserved. | ||
5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com | ||
6 | * | ||
7 | * ######################################################################## | ||
8 | * | ||
9 | * This program is free software; you can distribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License (Version 2) as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
16 | * for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
21 | * | ||
22 | * ######################################################################## | ||
23 | */ | ||
24 | |||
25 | #ifndef _MSP_INT_H | ||
26 | #define _MSP_INT_H | ||
27 | |||
28 | /* | ||
29 | * The PMC-Sierra MSP product line has at least two different interrupt | ||
30 | * controllers, the SLP register based scheme and the CIC interrupt | ||
31 | * controller block mechanism. This file distinguishes between them | ||
32 | * so that devices see a uniform interface. | ||
33 | */ | ||
34 | |||
35 | #if defined(CONFIG_IRQ_MSP_SLP) | ||
36 | #include "msp_slp_int.h" | ||
37 | #elif defined(CONFIG_IRQ_MSP_CIC) | ||
38 | #include "msp_cic_int.h" | ||
39 | #else | ||
40 | #error "What sort of interrupt controller does *your* MSP have?" | ||
41 | #endif | ||
42 | |||
43 | #endif /* !_MSP_INT_H */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_pci.h b/include/asm-mips/pmc-sierra/msp71xx/msp_pci.h new file mode 100644 index 000000000000..415606903617 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_pci.h | |||
@@ -0,0 +1,205 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2000-2006 PMC-Sierra INC. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it | ||
5 | * and/or modify it under the terms of the GNU General | ||
6 | * Public License as published by the Free Software | ||
7 | * Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be | ||
11 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
13 | * PURPOSE. See the GNU General Public License for more | ||
14 | * details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public | ||
17 | * License along with this program; if not, write to the Free | ||
18 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA | ||
19 | * 02139, USA. | ||
20 | * | ||
21 | * PMC-SIERRA INC. DISCLAIMS ANY LIABILITY OF ANY KIND | ||
22 | * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS | ||
23 | * SOFTWARE. | ||
24 | */ | ||
25 | |||
26 | #ifndef _MSP_PCI_H_ | ||
27 | #define _MSP_PCI_H_ | ||
28 | |||
29 | #define MSP_HAS_PCI(ID) (((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220)) | ||
30 | |||
31 | /* | ||
32 | * It is convenient to program the OATRAN register so that | ||
33 | * Athena virtual address space and PCI address space are | ||
34 | * the same. This is not a requirement, just a convenience. | ||
35 | * | ||
36 | * The only hard restrictions on the value of OATRAN is that | ||
37 | * OATRAN must not be programmed to allow translated memory | ||
38 | * addresses to fall within the lowest 512MB of | ||
39 | * PCI address space. This region is hardcoded | ||
40 | * for use as Athena PCI Host Controller target | ||
41 | * access memory space to the Athena's SDRAM. | ||
42 | * | ||
43 | * Note that OATRAN applies only to memory accesses, not | ||
44 | * to I/O accesses. | ||
45 | * | ||
46 | * To program OATRAN to make Athena virtual address space | ||
47 | * and PCI address space have the same values, OATRAN | ||
48 | * is to be programmed to 0xB8000000. The top seven | ||
49 | * bits of the value mimic the seven bits clipped off | ||
50 | * by the PCI Host controller. | ||
51 | * | ||
52 | * With OATRAN at the said value, when the CPU does | ||
53 | * an access to its virtual address at, say 0xB900_5000, | ||
54 | * the address appearing on the PCI bus will be | ||
55 | * 0xB900_5000. | ||
56 | * - Michael Penner | ||
57 | */ | ||
58 | #define MSP_PCI_OATRAN 0xB8000000UL | ||
59 | |||
60 | #define MSP_PCI_SPACE_BASE (MSP_PCI_OATRAN + 0x1002000UL) | ||
61 | #define MSP_PCI_SPACE_SIZE (0x3000000UL - 0x2000) | ||
62 | #define MSP_PCI_SPACE_END \ | ||
63 | (MSP_PCI_SPACE_BASE + MSP_PCI_SPACE_SIZE - 1) | ||
64 | #define MSP_PCI_IOSPACE_BASE (MSP_PCI_OATRAN + 0x1001000UL) | ||
65 | #define MSP_PCI_IOSPACE_SIZE 0x1000 | ||
66 | #define MSP_PCI_IOSPACE_END \ | ||
67 | (MSP_PCI_IOSPACE_BASE + MSP_PCI_IOSPACE_SIZE - 1) | ||
68 | |||
69 | /* IRQ for PCI status interrupts */ | ||
70 | #define PCI_STAT_IRQ 20 | ||
71 | |||
72 | #define QFLUSH_REG_1 0xB7F40000 | ||
73 | |||
74 | typedef volatile unsigned int pcireg; | ||
75 | typedef void * volatile ppcireg; | ||
76 | |||
77 | struct pci_block_copy | ||
78 | { | ||
79 | pcireg unused1; /* +0x00 */ | ||
80 | pcireg unused2; /* +0x04 */ | ||
81 | ppcireg unused3; /* +0x08 */ | ||
82 | ppcireg unused4; /* +0x0C */ | ||
83 | pcireg unused5; /* +0x10 */ | ||
84 | pcireg unused6; /* +0x14 */ | ||
85 | pcireg unused7; /* +0x18 */ | ||
86 | ppcireg unused8; /* +0x1C */ | ||
87 | ppcireg unused9; /* +0x20 */ | ||
88 | pcireg unusedA; /* +0x24 */ | ||
89 | ppcireg unusedB; /* +0x28 */ | ||
90 | ppcireg unusedC; /* +0x2C */ | ||
91 | }; | ||
92 | |||
93 | enum | ||
94 | { | ||
95 | config_device_vendor, /* 0 */ | ||
96 | config_status_command, /* 1 */ | ||
97 | config_class_revision, /* 2 */ | ||
98 | config_BIST_header_latency_cache, /* 3 */ | ||
99 | config_BAR0, /* 4 */ | ||
100 | config_BAR1, /* 5 */ | ||
101 | config_BAR2, /* 6 */ | ||
102 | config_not_used7, /* 7 */ | ||
103 | config_not_used8, /* 8 */ | ||
104 | config_not_used9, /* 9 */ | ||
105 | config_CIS, /* 10 */ | ||
106 | config_subsystem, /* 11 */ | ||
107 | config_not_used12, /* 12 */ | ||
108 | config_capabilities, /* 13 */ | ||
109 | config_not_used14, /* 14 */ | ||
110 | config_lat_grant_irq, /* 15 */ | ||
111 | config_message_control,/* 16 */ | ||
112 | config_message_addr, /* 17 */ | ||
113 | config_message_data, /* 18 */ | ||
114 | config_VPD_addr, /* 19 */ | ||
115 | config_VPD_data, /* 20 */ | ||
116 | config_maxregs /* 21 - number of registers */ | ||
117 | }; | ||
118 | |||
119 | struct msp_pci_regs | ||
120 | { | ||
121 | pcireg hop_unused_00; /* +0x00 */ | ||
122 | pcireg hop_unused_04; /* +0x04 */ | ||
123 | pcireg hop_unused_08; /* +0x08 */ | ||
124 | pcireg hop_unused_0C; /* +0x0C */ | ||
125 | pcireg hop_unused_10; /* +0x10 */ | ||
126 | pcireg hop_unused_14; /* +0x14 */ | ||
127 | pcireg hop_unused_18; /* +0x18 */ | ||
128 | pcireg hop_unused_1C; /* +0x1C */ | ||
129 | pcireg hop_unused_20; /* +0x20 */ | ||
130 | pcireg hop_unused_24; /* +0x24 */ | ||
131 | pcireg hop_unused_28; /* +0x28 */ | ||
132 | pcireg hop_unused_2C; /* +0x2C */ | ||
133 | pcireg hop_unused_30; /* +0x30 */ | ||
134 | pcireg hop_unused_34; /* +0x34 */ | ||
135 | pcireg if_control; /* +0x38 */ | ||
136 | pcireg oatran; /* +0x3C */ | ||
137 | pcireg reset_ctl; /* +0x40 */ | ||
138 | pcireg config_addr; /* +0x44 */ | ||
139 | pcireg hop_unused_48; /* +0x48 */ | ||
140 | pcireg msg_signaled_int_status; /* +0x4C */ | ||
141 | pcireg msg_signaled_int_mask; /* +0x50 */ | ||
142 | pcireg if_status; /* +0x54 */ | ||
143 | pcireg if_mask; /* +0x58 */ | ||
144 | pcireg hop_unused_5C; /* +0x5C */ | ||
145 | pcireg hop_unused_60; /* +0x60 */ | ||
146 | pcireg hop_unused_64; /* +0x64 */ | ||
147 | pcireg hop_unused_68; /* +0x68 */ | ||
148 | pcireg hop_unused_6C; /* +0x6C */ | ||
149 | pcireg hop_unused_70; /* +0x70 */ | ||
150 | |||
151 | struct pci_block_copy pci_bc[2] __attribute__((aligned(64))); | ||
152 | |||
153 | pcireg error_hdr1; /* +0xE0 */ | ||
154 | pcireg error_hdr2; /* +0xE4 */ | ||
155 | |||
156 | pcireg config[config_maxregs] __attribute__((aligned(256))); | ||
157 | |||
158 | }; | ||
159 | |||
160 | #define BPCI_CFGADDR_BUSNUM_SHF 16 | ||
161 | #define BPCI_CFGADDR_FUNCTNUM_SHF 8 | ||
162 | #define BPCI_CFGADDR_REGNUM_SHF 2 | ||
163 | #define BPCI_CFGADDR_ENABLE (1<<31) | ||
164 | |||
165 | #define BPCI_IFCONTROL_RTO (1<<20) /* Retry timeout */ | ||
166 | #define BPCI_IFCONTROL_HCE (1<<16) /* Host configuration enable */ | ||
167 | #define BPCI_IFCONTROL_CTO_SHF 12 /* Shift count for CTO bits */ | ||
168 | #define BPCI_IFCONTROL_SE (1<<5) /* Enable exceptions on errors */ | ||
169 | #define BPCI_IFCONTROL_BIST (1<<4) /* Use BIST in per. mode */ | ||
170 | #define BPCI_IFCONTROL_CAP (1<<3) /* Enable capabilities */ | ||
171 | #define BPCI_IFCONTROL_MMC_SHF 0 /* Shift count for MMC bits */ | ||
172 | |||
173 | #define BPCI_IFSTATUS_MGT (1<<8) /* Master Grant timeout */ | ||
174 | #define BPCI_IFSTATUS_MTT (1<<9) /* Master TRDY timeout */ | ||
175 | #define BPCI_IFSTATUS_MRT (1<<10) /* Master retry timeout */ | ||
176 | #define BPCI_IFSTATUS_BC0F (1<<13) /* Block copy 0 fault */ | ||
177 | #define BPCI_IFSTATUS_BC1F (1<<14) /* Block copy 1 fault */ | ||
178 | #define BPCI_IFSTATUS_PCIU (1<<15) /* PCI unable to respond */ | ||
179 | #define BPCI_IFSTATUS_BSIZ (1<<16) /* PCI access with illegal size */ | ||
180 | #define BPCI_IFSTATUS_BADD (1<<17) /* PCI access with illegal addr */ | ||
181 | #define BPCI_IFSTATUS_RTO (1<<18) /* Retry time out */ | ||
182 | #define BPCI_IFSTATUS_SER (1<<19) /* System error */ | ||
183 | #define BPCI_IFSTATUS_PER (1<<20) /* Parity error */ | ||
184 | #define BPCI_IFSTATUS_LCA (1<<21) /* Local CPU abort */ | ||
185 | #define BPCI_IFSTATUS_MEM (1<<22) /* Memory prot. violation */ | ||
186 | #define BPCI_IFSTATUS_ARB (1<<23) /* Arbiter timed out */ | ||
187 | #define BPCI_IFSTATUS_STA (1<<27) /* Signaled target abort */ | ||
188 | #define BPCI_IFSTATUS_TA (1<<28) /* Target abort */ | ||
189 | #define BPCI_IFSTATUS_MA (1<<29) /* Master abort */ | ||
190 | #define BPCI_IFSTATUS_PEI (1<<30) /* Parity error as initiator */ | ||
191 | #define BPCI_IFSTATUS_PET (1<<31) /* Parity error as target */ | ||
192 | |||
193 | #define BPCI_RESETCTL_PR (1<<0) /* True if reset asserted */ | ||
194 | #define BPCI_RESETCTL_RT (1<<4) /* Release time */ | ||
195 | #define BPCI_RESETCTL_CT (1<<8) /* Config time */ | ||
196 | #define BPCI_RESETCTL_PE (1<<12) /* PCI enabled */ | ||
197 | #define BPCI_RESETCTL_HM (1<<13) /* PCI host mode */ | ||
198 | #define BPCI_RESETCTL_RI (1<<14) /* PCI reset in */ | ||
199 | |||
200 | extern struct msp_pci_regs msp_pci_regs | ||
201 | __attribute__((section(".register"))); | ||
202 | extern unsigned long msp_pci_config_space | ||
203 | __attribute__((section(".register"))); | ||
204 | |||
205 | #endif /* !_MSP_PCI_H_ */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_prom.h b/include/asm-mips/pmc-sierra/msp71xx/msp_prom.h new file mode 100644 index 000000000000..14ca7dc382a8 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_prom.h | |||
@@ -0,0 +1,176 @@ | |||
1 | /* | ||
2 | * MIPS boards bootprom interface for the Linux kernel. | ||
3 | * | ||
4 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | ||
5 | * Author: Carsten Langgaard, carstenl@mips.com | ||
6 | * | ||
7 | * ######################################################################## | ||
8 | * | ||
9 | * This program is free software; you can distribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License (Version 2) as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
16 | * for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
21 | * | ||
22 | * ######################################################################## | ||
23 | */ | ||
24 | |||
25 | #ifndef _ASM_MSP_PROM_H | ||
26 | #define _ASM_MSP_PROM_H | ||
27 | |||
28 | #include <linux/types.h> | ||
29 | |||
30 | #define DEVICEID "deviceid" | ||
31 | #define FEATURES "features" | ||
32 | #define PROM_ENV "prom_env" | ||
33 | #define PROM_ENV_FILE "/proc/"PROM_ENV | ||
34 | #define PROM_ENV_SIZE 256 | ||
35 | |||
36 | #define CPU_DEVID_FAMILY 0x0000ff00 | ||
37 | #define CPU_DEVID_REVISION 0x000000ff | ||
38 | |||
39 | #define FPGA_IS_POLO(revision) \ | ||
40 | (((revision >= 0xb0) && (revision < 0xd0))) | ||
41 | #define FPGA_IS_5000(revision) \ | ||
42 | ((revision >= 0x80) && (revision <= 0x90)) | ||
43 | #define FPGA_IS_ZEUS(revision) ((revision < 0x7f)) | ||
44 | #define FPGA_IS_DUET(revision) \ | ||
45 | (((revision >= 0xa0) && (revision < 0xb0))) | ||
46 | #define FPGA_IS_MSP4200(revision) ((revision >= 0xd0)) | ||
47 | #define FPGA_IS_MSP7100(revision) ((revision >= 0xd0)) | ||
48 | |||
49 | #define MACHINE_TYPE_POLO "POLO" | ||
50 | #define MACHINE_TYPE_DUET "DUET" | ||
51 | #define MACHINE_TYPE_ZEUS "ZEUS" | ||
52 | #define MACHINE_TYPE_MSP2000REVB "MSP2000REVB" | ||
53 | #define MACHINE_TYPE_MSP5000 "MSP5000" | ||
54 | #define MACHINE_TYPE_MSP4200 "MSP4200" | ||
55 | #define MACHINE_TYPE_MSP7120 "MSP7120" | ||
56 | #define MACHINE_TYPE_MSP7130 "MSP7130" | ||
57 | #define MACHINE_TYPE_OTHER "OTHER" | ||
58 | |||
59 | #define MACHINE_TYPE_POLO_FPGA "POLO-FPGA" | ||
60 | #define MACHINE_TYPE_DUET_FPGA "DUET-FPGA" | ||
61 | #define MACHINE_TYPE_ZEUS_FPGA "ZEUS_FPGA" | ||
62 | #define MACHINE_TYPE_MSP2000REVB_FPGA "MSP2000REVB-FPGA" | ||
63 | #define MACHINE_TYPE_MSP5000_FPGA "MSP5000-FPGA" | ||
64 | #define MACHINE_TYPE_MSP4200_FPGA "MSP4200-FPGA" | ||
65 | #define MACHINE_TYPE_MSP7100_FPGA "MSP7100-FPGA" | ||
66 | #define MACHINE_TYPE_OTHER_FPGA "OTHER-FPGA" | ||
67 | |||
68 | /* Device Family definitions */ | ||
69 | #define FAMILY_FPGA 0x0000 | ||
70 | #define FAMILY_ZEUS 0x1000 | ||
71 | #define FAMILY_POLO 0x2000 | ||
72 | #define FAMILY_DUET 0x4000 | ||
73 | #define FAMILY_TRIAD 0x5000 | ||
74 | #define FAMILY_MSP4200 0x4200 | ||
75 | #define FAMILY_MSP4200_FPGA 0x4f00 | ||
76 | #define FAMILY_MSP7100 0x7100 | ||
77 | #define FAMILY_MSP7100_FPGA 0x7f00 | ||
78 | |||
79 | /* Device Type definitions */ | ||
80 | #define TYPE_MSP7120 0x7120 | ||
81 | #define TYPE_MSP7130 0x7130 | ||
82 | |||
83 | #define ENET_KEY 'E' | ||
84 | #define ENETTXD_KEY 'e' | ||
85 | #define PCI_KEY 'P' | ||
86 | #define PCIMUX_KEY 'p' | ||
87 | #define SEC_KEY 'S' | ||
88 | #define SPAD_KEY 'D' | ||
89 | #define TDM_KEY 'T' | ||
90 | #define ZSP_KEY 'Z' | ||
91 | |||
92 | #define FEATURE_NOEXIST '-' | ||
93 | #define FEATURE_EXIST '+' | ||
94 | |||
95 | #define ENET_MII 'M' | ||
96 | #define ENET_RMII 'R' | ||
97 | |||
98 | #define ENETTXD_FALLING 'F' | ||
99 | #define ENETTXD_RISING 'R' | ||
100 | |||
101 | #define PCI_HOST 'H' | ||
102 | #define PCI_PERIPHERAL 'P' | ||
103 | |||
104 | #define PCIMUX_FULL 'F' | ||
105 | #define PCIMUX_SINGLE 'S' | ||
106 | |||
107 | #define SEC_DUET 'D' | ||
108 | #define SEC_POLO 'P' | ||
109 | #define SEC_SLOW 'S' | ||
110 | #define SEC_TRIAD 'T' | ||
111 | |||
112 | #define SPAD_POLO 'P' | ||
113 | |||
114 | #define TDM_DUET 'D' /* DUET TDMs might exist */ | ||
115 | #define TDM_POLO 'P' /* POLO TDMs might exist */ | ||
116 | #define TDM_TRIAD 'T' /* TRIAD TDMs might exist */ | ||
117 | |||
118 | #define ZSP_DUET 'D' /* one DUET zsp engine */ | ||
119 | #define ZSP_TRIAD 'T' /* two TRIAD zsp engines */ | ||
120 | |||
121 | extern char *prom_getcmdline(void); | ||
122 | extern char *prom_getenv(char *name); | ||
123 | extern void prom_init_cmdline(void); | ||
124 | extern void prom_meminit(void); | ||
125 | extern void prom_fixup_mem_map(unsigned long start_mem, | ||
126 | unsigned long end_mem); | ||
127 | |||
128 | #ifdef CONFIG_MTD_PMC_MSP_RAMROOT | ||
129 | extern bool get_ramroot(void **start, unsigned long *size); | ||
130 | #endif | ||
131 | |||
132 | extern int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr); | ||
133 | extern unsigned long get_deviceid(void); | ||
134 | extern char identify_enet(unsigned long interface_num); | ||
135 | extern char identify_enetTxD(unsigned long interface_num); | ||
136 | extern char identify_pci(void); | ||
137 | extern char identify_sec(void); | ||
138 | extern char identify_spad(void); | ||
139 | extern char identify_sec(void); | ||
140 | extern char identify_tdm(void); | ||
141 | extern char identify_zsp(void); | ||
142 | extern unsigned long identify_family(void); | ||
143 | extern unsigned long identify_revision(void); | ||
144 | |||
145 | /* | ||
146 | * The following macro calls prom_printf and puts the format string | ||
147 | * into an init section so it can be reclaimed. | ||
148 | */ | ||
149 | #define ppfinit(f, x...) \ | ||
150 | do { \ | ||
151 | static char _f[] __initdata = KERN_INFO f; \ | ||
152 | printk(_f, ## x); \ | ||
153 | } while (0) | ||
154 | |||
155 | /* Memory descriptor management. */ | ||
156 | #define PROM_MAX_PMEMBLOCKS 7 /* 6 used */ | ||
157 | |||
158 | enum yamon_memtypes { | ||
159 | yamon_dontuse, | ||
160 | yamon_prom, | ||
161 | yamon_free, | ||
162 | }; | ||
163 | |||
164 | struct prom_pmemblock { | ||
165 | unsigned long base; /* Within KSEG0. */ | ||
166 | unsigned int size; /* In bytes. */ | ||
167 | unsigned int type; /* free or prom memory */ | ||
168 | }; | ||
169 | |||
170 | extern int prom_argc; | ||
171 | extern char **prom_argv; | ||
172 | extern char **prom_envp; | ||
173 | extern int *prom_vec; | ||
174 | extern struct prom_pmemblock *prom_getmdesc(void); | ||
175 | |||
176 | #endif /* !_ASM_MSP_PROM_H */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_regops.h b/include/asm-mips/pmc-sierra/msp71xx/msp_regops.h new file mode 100644 index 000000000000..60a5a38dd5b2 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_regops.h | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * SMP/VPE-safe functions to access "registers" (see note). | ||
3 | * | ||
4 | * NOTES: | ||
5 | * - These macros use ll/sc instructions, so it is your responsibility to | ||
6 | * ensure these are available on your platform before including this file. | ||
7 | * - The MIPS32 spec states that ll/sc results are undefined for uncached | ||
8 | * accesses. This means they can't be used on HW registers accessed | ||
9 | * through kseg1. Code which requires these macros for this purpose must | ||
10 | * front-end the registers with cached memory "registers" and have a single | ||
11 | * thread update the actual HW registers. | ||
12 | * - A maximum of 2k of code can be inserted between ll and sc. Every | ||
13 | * memory accesses between the instructions will increase the chance of | ||
14 | * sc failing and having to loop. | ||
15 | * - When using custom_read_reg32/custom_write_reg32 only perform the | ||
16 | * necessary logical operations on the register value in between these | ||
17 | * two calls. All other logic should be performed before the first call. | ||
18 | * - There is a bug on the R10000 chips which has a workaround. If you | ||
19 | * are affected by this bug, make sure to define the symbol 'R10000_LLSC_WAR' | ||
20 | * to be non-zero. If you are using this header from within linux, you may | ||
21 | * include <asm/war.h> before including this file to have this defined | ||
22 | * appropriately for you. | ||
23 | * | ||
24 | * Copyright 2005-2007 PMC-Sierra, Inc. | ||
25 | * | ||
26 | * This program is free software; you can redistribute it and/or modify it | ||
27 | * under the terms of the GNU General Public License as published by the | ||
28 | * Free Software Foundation; either version 2 of the License, or (at your | ||
29 | * option) any later version. | ||
30 | * | ||
31 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
32 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
33 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
34 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
35 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
40 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
41 | * | ||
42 | * You should have received a copy of the GNU General Public License along | ||
43 | * with this program; if not, write to the Free Software Foundation, Inc., 675 | ||
44 | * Mass Ave, Cambridge, MA 02139, USA. | ||
45 | */ | ||
46 | |||
47 | #ifndef __ASM_REGOPS_H__ | ||
48 | #define __ASM_REGOPS_H__ | ||
49 | |||
50 | #include <linux/types.h> | ||
51 | |||
52 | #include <asm/war.h> | ||
53 | |||
54 | #ifndef R10000_LLSC_WAR | ||
55 | #define R10000_LLSC_WAR 0 | ||
56 | #endif | ||
57 | |||
58 | #if R10000_LLSC_WAR == 1 | ||
59 | #define __beqz "beqzl " | ||
60 | #else | ||
61 | #define __beqz "beqz " | ||
62 | #endif | ||
63 | |||
64 | #ifndef _LINUX_TYPES_H | ||
65 | typedef unsigned int u32; | ||
66 | #endif | ||
67 | |||
68 | /* | ||
69 | * Sets all the masked bits to the corresponding value bits | ||
70 | */ | ||
71 | static inline void set_value_reg32(volatile u32 *const addr, | ||
72 | u32 const mask, | ||
73 | u32 const value) | ||
74 | { | ||
75 | u32 temp; | ||
76 | |||
77 | __asm__ __volatile__( | ||
78 | " .set push \n" | ||
79 | " .set mips3 \n" | ||
80 | "1: ll %0, %1 # set_value_reg32 \n" | ||
81 | " and %0, %2 \n" | ||
82 | " or %0, %3 \n" | ||
83 | " sc %0, %1 \n" | ||
84 | " "__beqz"%0, 1b \n" | ||
85 | " nop \n" | ||
86 | " .set pop \n" | ||
87 | : "=&r" (temp), "=m" (*addr) | ||
88 | : "ir" (~mask), "ir" (value), "m" (*addr)); | ||
89 | } | ||
90 | |||
91 | /* | ||
92 | * Sets all the masked bits to '1' | ||
93 | */ | ||
94 | static inline void set_reg32(volatile u32 *const addr, | ||
95 | u32 const mask) | ||
96 | { | ||
97 | u32 temp; | ||
98 | |||
99 | __asm__ __volatile__( | ||
100 | " .set push \n" | ||
101 | " .set mips3 \n" | ||
102 | "1: ll %0, %1 # set_reg32 \n" | ||
103 | " or %0, %2 \n" | ||
104 | " sc %0, %1 \n" | ||
105 | " "__beqz"%0, 1b \n" | ||
106 | " nop \n" | ||
107 | " .set pop \n" | ||
108 | : "=&r" (temp), "=m" (*addr) | ||
109 | : "ir" (mask), "m" (*addr)); | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * Sets all the masked bits to '0' | ||
114 | */ | ||
115 | static inline void clear_reg32(volatile u32 *const addr, | ||
116 | u32 const mask) | ||
117 | { | ||
118 | u32 temp; | ||
119 | |||
120 | __asm__ __volatile__( | ||
121 | " .set push \n" | ||
122 | " .set mips3 \n" | ||
123 | "1: ll %0, %1 # clear_reg32 \n" | ||
124 | " and %0, %2 \n" | ||
125 | " sc %0, %1 \n" | ||
126 | " "__beqz"%0, 1b \n" | ||
127 | " nop \n" | ||
128 | " .set pop \n" | ||
129 | : "=&r" (temp), "=m" (*addr) | ||
130 | : "ir" (~mask), "m" (*addr)); | ||
131 | } | ||
132 | |||
133 | /* | ||
134 | * Toggles all masked bits from '0' to '1' and '1' to '0' | ||
135 | */ | ||
136 | static inline void toggle_reg32(volatile u32 *const addr, | ||
137 | u32 const mask) | ||
138 | { | ||
139 | u32 temp; | ||
140 | |||
141 | __asm__ __volatile__( | ||
142 | " .set push \n" | ||
143 | " .set mips3 \n" | ||
144 | "1: ll %0, %1 # toggle_reg32 \n" | ||
145 | " xor %0, %2 \n" | ||
146 | " sc %0, %1 \n" | ||
147 | " "__beqz"%0, 1b \n" | ||
148 | " nop \n" | ||
149 | " .set pop \n" | ||
150 | : "=&r" (temp), "=m" (*addr) | ||
151 | : "ir" (mask), "m" (*addr)); | ||
152 | } | ||
153 | |||
154 | /* | ||
155 | * Read all masked bits others are returned as '0' | ||
156 | */ | ||
157 | static inline u32 read_reg32(volatile u32 *const addr, | ||
158 | u32 const mask) | ||
159 | { | ||
160 | u32 temp; | ||
161 | |||
162 | __asm__ __volatile__( | ||
163 | " .set push \n" | ||
164 | " .set noreorder \n" | ||
165 | " lw %0, %1 # read \n" | ||
166 | " and %0, %2 # mask \n" | ||
167 | " .set pop \n" | ||
168 | : "=&r" (temp) | ||
169 | : "m" (*addr), "ir" (mask)); | ||
170 | |||
171 | return temp; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * blocking_read_reg32 - Read address with blocking load | ||
176 | * | ||
177 | * Uncached writes need to be read back to ensure they reach RAM. | ||
178 | * The returned value must be 'used' to prevent from becoming a | ||
179 | * non-blocking load. | ||
180 | */ | ||
181 | static inline u32 blocking_read_reg32(volatile u32 *const addr) | ||
182 | { | ||
183 | u32 temp; | ||
184 | |||
185 | __asm__ __volatile__( | ||
186 | " .set push \n" | ||
187 | " .set noreorder \n" | ||
188 | " lw %0, %1 # read \n" | ||
189 | " move %0, %0 # block \n" | ||
190 | " .set pop \n" | ||
191 | : "=&r" (temp) | ||
192 | : "m" (*addr)); | ||
193 | |||
194 | return temp; | ||
195 | } | ||
196 | |||
197 | /* | ||
198 | * For special strange cases only: | ||
199 | * | ||
200 | * If you need custom processing within a ll/sc loop, use the following macros | ||
201 | * VERY CAREFULLY: | ||
202 | * | ||
203 | * u32 tmp; <-- Define a variable to hold the data | ||
204 | * | ||
205 | * custom_read_reg32(address, tmp); <-- Reads the address and put the value | ||
206 | * in the 'tmp' variable given | ||
207 | * | ||
208 | * From here on out, you are (basicly) atomic, so don't do anything too | ||
209 | * fancy! | ||
210 | * Also, this code may loop if the end of this block fails to write | ||
211 | * everything back safely due do the other CPU, so do NOT do anything | ||
212 | * with side-effects! | ||
213 | * | ||
214 | * custom_write_reg32(address, tmp); <-- Writes back 'tmp' safely. | ||
215 | */ | ||
216 | #define custom_read_reg32(address, tmp) \ | ||
217 | __asm__ __volatile__( \ | ||
218 | " .set push \n" \ | ||
219 | " .set mips3 \n" \ | ||
220 | "1: ll %0, %1 #custom_read_reg32 \n" \ | ||
221 | " .set pop \n" \ | ||
222 | : "=r" (tmp), "=m" (*address) \ | ||
223 | : "m" (*address)) | ||
224 | |||
225 | #define custom_write_reg32(address, tmp) \ | ||
226 | __asm__ __volatile__( \ | ||
227 | " .set push \n" \ | ||
228 | " .set mips3 \n" \ | ||
229 | " sc %0, %1 #custom_write_reg32 \n" \ | ||
230 | " "__beqz"%0, 1b \n" \ | ||
231 | " nop \n" \ | ||
232 | " .set pop \n" \ | ||
233 | : "=&r" (tmp), "=m" (*address) \ | ||
234 | : "0" (tmp), "m" (*address)) | ||
235 | |||
236 | #endif /* __ASM_REGOPS_H__ */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_regs.h b/include/asm-mips/pmc-sierra/msp71xx/msp_regs.h new file mode 100644 index 000000000000..0b56f55206c6 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_regs.h | |||
@@ -0,0 +1,667 @@ | |||
1 | /* | ||
2 | * Defines for the address space, registers and register configuration | ||
3 | * (bit masks, access macros etc) for the PMC-Sierra line of MSP products. | ||
4 | * This file contains addess maps for all the devices in the line of | ||
5 | * products but only has register definitions and configuration masks for | ||
6 | * registers which aren't definitely associated with any device. Things | ||
7 | * like clock settings, reset access, the ELB etc. Individual device | ||
8 | * drivers will reference the appropriate XXX_BASE value defined here | ||
9 | * and have individual registers offset from that. | ||
10 | * | ||
11 | * Copyright (C) 2005-2007 PMC-Sierra, Inc. All rights reserved. | ||
12 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com | ||
13 | * | ||
14 | * ######################################################################## | ||
15 | * | ||
16 | * This program is free software; you can distribute it and/or modify it | ||
17 | * under the terms of the GNU General Public License (Version 2) as | ||
18 | * published by the Free Software Foundation. | ||
19 | * | ||
20 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
21 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
22 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
23 | * for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License along | ||
26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
28 | * | ||
29 | * ######################################################################## | ||
30 | */ | ||
31 | |||
32 | #include <asm/addrspace.h> | ||
33 | #include <linux/types.h> | ||
34 | |||
35 | #ifndef _ASM_MSP_REGS_H | ||
36 | #define _ASM_MSP_REGS_H | ||
37 | |||
38 | /* | ||
39 | ######################################################################## | ||
40 | # Address space and device base definitions # | ||
41 | ######################################################################## | ||
42 | */ | ||
43 | |||
44 | /* | ||
45 | *************************************************************************** | ||
46 | * System Logic and Peripherals (ELB, UART0, etc) device address space * | ||
47 | *************************************************************************** | ||
48 | */ | ||
49 | #define MSP_SLP_BASE 0x1c000000 | ||
50 | /* System Logic and Peripherals */ | ||
51 | #define MSP_RST_BASE (MSP_SLP_BASE + 0x10) | ||
52 | /* System reset register base */ | ||
53 | #define MSP_RST_SIZE 0x0C /* System reset register space */ | ||
54 | |||
55 | #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C) | ||
56 | /* watchdog timer base */ | ||
57 | #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054) | ||
58 | /* internal timer base */ | ||
59 | #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100) | ||
60 | /* UART0 controller base */ | ||
61 | #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120) | ||
62 | /* Block Copy controller base */ | ||
63 | #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160) | ||
64 | /* Block Copy descriptor base */ | ||
65 | |||
66 | /* | ||
67 | *************************************************************************** | ||
68 | * PCI address space * | ||
69 | *************************************************************************** | ||
70 | */ | ||
71 | #define MSP_PCI_BASE 0x19000000 | ||
72 | |||
73 | /* | ||
74 | *************************************************************************** | ||
75 | * MSbus device address space * | ||
76 | *************************************************************************** | ||
77 | */ | ||
78 | #define MSP_MSB_BASE 0x18000000 | ||
79 | /* MSbus address start */ | ||
80 | #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000) | ||
81 | /* Peripheral device registers */ | ||
82 | #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000) | ||
83 | /* MAC A device registers */ | ||
84 | #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000) | ||
85 | /* MAC B device registers */ | ||
86 | #define MSP_MAC_SIZE 0xE0 /* MAC register space */ | ||
87 | |||
88 | #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000) | ||
89 | /* Security Engine registers */ | ||
90 | #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000) | ||
91 | /* MAC C device registers */ | ||
92 | #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000) | ||
93 | /* ADSL2 device registers */ | ||
94 | #define MSP_USB_BASE (MSP_MSB_BASE + 0xB40000) | ||
95 | /* USB device registers */ | ||
96 | #define MSP_USB_BASE_START (MSP_MSB_BASE + 0xB40100) | ||
97 | /* USB device registers */ | ||
98 | #define MSP_USB_BASE_END (MSP_MSB_BASE + 0xB401FF) | ||
99 | /* USB device registers */ | ||
100 | #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000) | ||
101 | /* CPU interface registers */ | ||
102 | |||
103 | /* Devices within the MSbus peripheral block */ | ||
104 | #define MSP_UART1_BASE (MSP_PER_BASE + 0x030) | ||
105 | /* UART1 controller base */ | ||
106 | #define MSP_SPI_BASE (MSP_PER_BASE + 0x058) | ||
107 | /* SPI/MPI control registers */ | ||
108 | #define MSP_TWI_BASE (MSP_PER_BASE + 0x090) | ||
109 | /* Two-wire control registers */ | ||
110 | #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0) | ||
111 | /* Programmable timer control */ | ||
112 | |||
113 | /* | ||
114 | *************************************************************************** | ||
115 | * Physical Memory configuration address space * | ||
116 | *************************************************************************** | ||
117 | */ | ||
118 | #define MSP_MEM_CFG_BASE 0x17f00000 | ||
119 | |||
120 | #define MSP_MEM_INDIRECT_CTL_10 0x10 | ||
121 | |||
122 | /* | ||
123 | * Notes: | ||
124 | * 1) The SPI registers are split into two blocks, one offset from the | ||
125 | * MSP_SPI_BASE by 0x00 and the other offset from the MSP_SPI_BASE by | ||
126 | * 0x68. The SPI driver definitions for the register must be aware | ||
127 | * of this. | ||
128 | * 2) The block copy engine register are divided into two regions, one | ||
129 | * for the control/configuration of the engine proper and one for the | ||
130 | * values of the descriptors used in the copy process. These have | ||
131 | * different base defines (CTRL_BASE vs DESC_BASE) | ||
132 | * 3) These constants are for physical addresses which means that they | ||
133 | * work correctly with "ioremap" and friends. This means that device | ||
134 | * drivers will need to remap these addresses using ioremap and perhaps | ||
135 | * the readw/writew macros. Or they could use the regptr() macro | ||
136 | * defined below, but the readw/writew calls are the correct thing. | ||
137 | * 4) The UARTs have an additional status register offset from the base | ||
138 | * address. This register isn't used in the standard 8250 driver but | ||
139 | * may be used in other software. Consult the hardware datasheet for | ||
140 | * offset details. | ||
141 | * 5) For some unknown reason the security engine (MSP_SEC_BASE) registers | ||
142 | * start at an offset of 0x84 from the base address but the block of | ||
143 | * registers before this is reserved for the security engine. The | ||
144 | * driver will have to be aware of this but it makes the register | ||
145 | * definitions line up better with the documentation. | ||
146 | */ | ||
147 | |||
148 | /* | ||
149 | ######################################################################## | ||
150 | # System register definitions. Not associated with a specific device # | ||
151 | ######################################################################## | ||
152 | */ | ||
153 | |||
154 | /* | ||
155 | * This macro maps the physical register number into uncached space | ||
156 | * and (for C code) casts it into a u32 pointer so it can be dereferenced | ||
157 | * Normally these would be accessed with ioremap and readX/writeX, but | ||
158 | * these are convenient for a lot of internal kernel code. | ||
159 | */ | ||
160 | #ifdef __ASSEMBLER__ | ||
161 | #define regptr(addr) (KSEG1ADDR(addr)) | ||
162 | #else | ||
163 | #define regptr(addr) ((volatile u32 *const)(KSEG1ADDR(addr))) | ||
164 | #endif | ||
165 | |||
166 | /* | ||
167 | *************************************************************************** | ||
168 | * System Logic and Peripherals (RESET, ELB, etc) registers * | ||
169 | *************************************************************************** | ||
170 | */ | ||
171 | |||
172 | /* System Control register definitions */ | ||
173 | #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00) | ||
174 | /* Device-ID RO */ | ||
175 | #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04) | ||
176 | /* Firmware-ID Register RW */ | ||
177 | #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08) | ||
178 | /* System-ID Register-0 RW */ | ||
179 | #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C) | ||
180 | /* System-ID Register-1 RW */ | ||
181 | |||
182 | /* System Reset register definitions */ | ||
183 | #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10) | ||
184 | /* System Reset Status RO */ | ||
185 | #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14) | ||
186 | /* System Set Reset WO */ | ||
187 | #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18) | ||
188 | /* System Clear Reset WO */ | ||
189 | |||
190 | /* System Clock Registers */ | ||
191 | #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C) | ||
192 | /* PCI clock generator RW */ | ||
193 | #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20) | ||
194 | /* UART clock generator RW */ | ||
195 | /* reserved (MSP_SLP_BASE + 0x24) */ | ||
196 | /* reserved (MSP_SLP_BASE + 0x28) */ | ||
197 | #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C) | ||
198 | /* PLL1 clock generator RW */ | ||
199 | #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30) | ||
200 | /* PLL0 clock generator RW */ | ||
201 | #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34) | ||
202 | /* MIPS clock generator RW */ | ||
203 | #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38) | ||
204 | /* Voice Eng clock generator RW */ | ||
205 | /* reserved (MSP_SLP_BASE + 0x3C) */ | ||
206 | #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40) | ||
207 | /* MS-Bus clock generator RW */ | ||
208 | #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44) | ||
209 | /* Sec & MAC clock generator RW */ | ||
210 | #define PERF_SLP_REG regptr(MSP_SLP_BASE + 0x48) | ||
211 | /* Per & TDM clock generator RW */ | ||
212 | |||
213 | /* Interrupt Controller Registers */ | ||
214 | #define SLP_INT_STS_REG regptr(MSP_SLP_BASE + 0x70) | ||
215 | /* Interrupt status register RW */ | ||
216 | #define SLP_INT_MSK_REG regptr(MSP_SLP_BASE + 0x74) | ||
217 | /* Interrupt enable/mask RW */ | ||
218 | #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78) | ||
219 | /* Security Engine mailbox RW */ | ||
220 | #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C) | ||
221 | /* Voice Engine mailbox RW */ | ||
222 | |||
223 | /* ELB Controller Registers */ | ||
224 | #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80) | ||
225 | /* ELB CS0 Configuration Reg */ | ||
226 | #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84) | ||
227 | /* ELB CS0 Base Address Reg */ | ||
228 | #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88) | ||
229 | /* ELB CS0 Mask Register */ | ||
230 | #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C) | ||
231 | /* ELB CS0 access register */ | ||
232 | |||
233 | #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90) | ||
234 | /* ELB CS1 Configuration Reg */ | ||
235 | #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94) | ||
236 | /* ELB CS1 Base Address Reg */ | ||
237 | #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98) | ||
238 | /* ELB CS1 Mask Register */ | ||
239 | #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C) | ||
240 | /* ELB CS1 access register */ | ||
241 | |||
242 | #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0) | ||
243 | /* ELB CS2 Configuration Reg */ | ||
244 | #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4) | ||
245 | /* ELB CS2 Base Address Reg */ | ||
246 | #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8) | ||
247 | /* ELB CS2 Mask Register */ | ||
248 | #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC) | ||
249 | /* ELB CS2 access register */ | ||
250 | |||
251 | #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0) | ||
252 | /* ELB CS3 Configuration Reg */ | ||
253 | #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4) | ||
254 | /* ELB CS3 Base Address Reg */ | ||
255 | #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8) | ||
256 | /* ELB CS3 Mask Register */ | ||
257 | #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC) | ||
258 | /* ELB CS3 access register */ | ||
259 | |||
260 | #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0) | ||
261 | /* ELB CS4 Configuration Reg */ | ||
262 | #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4) | ||
263 | /* ELB CS4 Base Address Reg */ | ||
264 | #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8) | ||
265 | /* ELB CS4 Mask Register */ | ||
266 | #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC) | ||
267 | /* ELB CS4 access register */ | ||
268 | |||
269 | #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0) | ||
270 | /* ELB CS5 Configuration Reg */ | ||
271 | #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4) | ||
272 | /* ELB CS5 Base Address Reg */ | ||
273 | #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8) | ||
274 | /* ELB CS5 Mask Register */ | ||
275 | #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC) | ||
276 | /* ELB CS5 access register */ | ||
277 | |||
278 | /* reserved 0xE0 - 0xE8 */ | ||
279 | #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC) | ||
280 | /* ELB single PC card detect */ | ||
281 | |||
282 | /* reserved 0xF0 - 0xF8 */ | ||
283 | #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC) | ||
284 | /* SDRAM read/ELB timing Reg */ | ||
285 | |||
286 | /* Extended UART status registers */ | ||
287 | #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0) | ||
288 | /* UART Status Register 0 */ | ||
289 | #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170) | ||
290 | /* UART Status Register 1 */ | ||
291 | |||
292 | /* Performance monitoring registers */ | ||
293 | #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140) | ||
294 | /* Performance monitor control */ | ||
295 | #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144) | ||
296 | /* Performance monitor clear */ | ||
297 | #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148) | ||
298 | /* Perf monitor counter high */ | ||
299 | #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C) | ||
300 | /* Perf monitor counter low */ | ||
301 | |||
302 | /* System control registers */ | ||
303 | #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150) | ||
304 | /* System control register */ | ||
305 | #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154) | ||
306 | /* System Error status 1 */ | ||
307 | #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158) | ||
308 | /* System Error status 2 */ | ||
309 | #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C) | ||
310 | /* System Interrupt config */ | ||
311 | |||
312 | /* Voice Engine Memory configuration */ | ||
313 | #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C) | ||
314 | /* Voice engine memory config */ | ||
315 | |||
316 | /* CPU/SLP Error Status registers */ | ||
317 | #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180) | ||
318 | /* CPU/SLP Error status 1 */ | ||
319 | #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184) | ||
320 | /* CPU/SLP Error status 1 */ | ||
321 | |||
322 | #define EXTENDED_GPIO_REG regptr(MSP_SLP_BASE + 0x188) | ||
323 | /* Extended GPIO register */ | ||
324 | |||
325 | /* System Error registers */ | ||
326 | #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190) | ||
327 | /* Int status for SLP errors */ | ||
328 | #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194) | ||
329 | /* Int mask for SLP errors */ | ||
330 | #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198) | ||
331 | /* External ELB reset */ | ||
332 | #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C) | ||
333 | /* Boot Status */ | ||
334 | |||
335 | /* Extended ELB addressing */ | ||
336 | #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0) | ||
337 | /* CS0 Extended address */ | ||
338 | #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4) | ||
339 | /* CS1 Extended address */ | ||
340 | #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8) | ||
341 | /* CS2 Extended address */ | ||
342 | #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC) | ||
343 | /* CS3 Extended address */ | ||
344 | /* reserved 0x1B0 */ | ||
345 | #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4) | ||
346 | /* CS5 Extended address */ | ||
347 | |||
348 | /* PLL Adjustment registers */ | ||
349 | #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200) | ||
350 | /* PLL0 lock status */ | ||
351 | #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204) | ||
352 | /* PLL Analog reset status */ | ||
353 | #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208) | ||
354 | /* PLL0 Adjustment value */ | ||
355 | #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C) | ||
356 | /* PLL1 Adjustment value */ | ||
357 | |||
358 | /* | ||
359 | *************************************************************************** | ||
360 | * Peripheral Register definitions * | ||
361 | *************************************************************************** | ||
362 | */ | ||
363 | |||
364 | /* Peripheral status */ | ||
365 | #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50) | ||
366 | /* Peripheral control register */ | ||
367 | #define PER_STS_REG regptr(MSP_PER_BASE + 0x54) | ||
368 | /* Peripheral status register */ | ||
369 | |||
370 | /* SPI/MPI Registers */ | ||
371 | #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58) | ||
372 | /* SPI/MPI Tx Size register */ | ||
373 | #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C) | ||
374 | /* SPI/MPI Rx Size register */ | ||
375 | #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60) | ||
376 | /* SPI/MPI Control register */ | ||
377 | #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64) | ||
378 | /* SPI/MPI Chip Select reg */ | ||
379 | #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0) | ||
380 | /* SPI/MPI Core Data reg */ | ||
381 | #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4) | ||
382 | /* SPI/MPI Core Control reg */ | ||
383 | #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8) | ||
384 | /* SPI/MPI Core Status reg */ | ||
385 | #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC) | ||
386 | /* SPI/MPI Core Ssel reg */ | ||
387 | #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0) | ||
388 | /* SPI/MPI Data FIFO reg */ | ||
389 | |||
390 | /* Peripheral Block Error Registers */ | ||
391 | #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70) | ||
392 | /* Error Bit Status Register */ | ||
393 | #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74) | ||
394 | /* Error Bit Mask Register */ | ||
395 | #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78) | ||
396 | /* Error Header 1 Register */ | ||
397 | #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C) | ||
398 | /* Error Header 2 Register */ | ||
399 | |||
400 | /* Peripheral Block Interrupt Registers */ | ||
401 | #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80) | ||
402 | /* Interrupt status register */ | ||
403 | #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84) | ||
404 | /* Interrupt Mask Register */ | ||
405 | #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88) | ||
406 | /* GPIO interrupt status reg */ | ||
407 | #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C) | ||
408 | /* GPIO interrupt MASK Reg */ | ||
409 | |||
410 | /* POLO GPIO registers */ | ||
411 | #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0) | ||
412 | /* Polo GPIO[8:0] data reg */ | ||
413 | #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4) | ||
414 | /* Polo GPIO[7:0] config reg */ | ||
415 | #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8) | ||
416 | /* Polo GPIO[15:8] config reg */ | ||
417 | #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC) | ||
418 | /* Polo GPIO[31:0] output drive */ | ||
419 | #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170) | ||
420 | /* Polo GPIO[23:16] config reg */ | ||
421 | #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174) | ||
422 | /* Polo GPIO[15:9] data reg */ | ||
423 | #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178) | ||
424 | /* Polo GPIO[23:16] data reg */ | ||
425 | #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C) | ||
426 | /* Polo GPIO[31:24] data reg */ | ||
427 | #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180) | ||
428 | /* Polo GPIO[39:32] data reg */ | ||
429 | #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184) | ||
430 | /* Polo GPIO[47:40] data reg */ | ||
431 | #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188) | ||
432 | /* Polo GPIO[54:48] data reg */ | ||
433 | #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | ||
434 | /* Polo GPIO[31:24] config reg */ | ||
435 | #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190) | ||
436 | /* Polo GPIO[39:32] config reg */ | ||
437 | #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194) | ||
438 | /* Polo GPIO[47:40] config reg */ | ||
439 | #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198) | ||
440 | /* Polo GPIO[54:48] config reg */ | ||
441 | #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C) | ||
442 | /* Polo GPIO[54:32] output drive */ | ||
443 | |||
444 | /* Generic GPIO registers */ | ||
445 | #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170) | ||
446 | /* GPIO[1:0] data register */ | ||
447 | #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174) | ||
448 | /* GPIO[5:2] data register */ | ||
449 | #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178) | ||
450 | /* GPIO[9:6] data register */ | ||
451 | #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C) | ||
452 | /* GPIO[15:10] data register */ | ||
453 | #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180) | ||
454 | /* GPIO[1:0] config register */ | ||
455 | #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184) | ||
456 | /* GPIO[5:2] config register */ | ||
457 | #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188) | ||
458 | /* GPIO[9:6] config register */ | ||
459 | #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | ||
460 | /* GPIO[15:10] config register */ | ||
461 | #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190) | ||
462 | /* GPIO[15:0] output drive */ | ||
463 | |||
464 | /* | ||
465 | *************************************************************************** | ||
466 | * CPU Interface register definitions * | ||
467 | *************************************************************************** | ||
468 | */ | ||
469 | #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00) | ||
470 | /* PCI-SDRAM queue flush trigger */ | ||
471 | #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04) | ||
472 | /* OCP Error Attribute 1 */ | ||
473 | #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08) | ||
474 | /* OCP Error Attribute 2 */ | ||
475 | #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C) | ||
476 | /* OCP Error Status */ | ||
477 | #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10) | ||
478 | /* CPU policy configuration */ | ||
479 | #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10) | ||
480 | /* Misc configuration options */ | ||
481 | |||
482 | /* Central Interrupt Controller Registers */ | ||
483 | #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000) | ||
484 | /* Central Interrupt registers */ | ||
485 | #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00) | ||
486 | /* External interrupt config */ | ||
487 | #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04) | ||
488 | /* CIC Interrupt Status */ | ||
489 | #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08) | ||
490 | /* VPE0 Interrupt Mask */ | ||
491 | #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C) | ||
492 | /* VPE1 Interrupt Mask */ | ||
493 | #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10) | ||
494 | /* Thread Context 0 Int Mask */ | ||
495 | #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14) | ||
496 | /* Thread Context 1 Int Mask */ | ||
497 | #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18) | ||
498 | /* Thread Context 2 Int Mask */ | ||
499 | #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18) | ||
500 | /* Thread Context 3 Int Mask */ | ||
501 | #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18) | ||
502 | /* Thread Context 4 Int Mask */ | ||
503 | #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18) | ||
504 | #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18) | ||
505 | #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18) | ||
506 | #define CIC_VPE0_SWINT_REG regptr(MSP_CIC_BASE + 0x08) | ||
507 | |||
508 | |||
509 | /* | ||
510 | *************************************************************************** | ||
511 | * Memory controller registers * | ||
512 | *************************************************************************** | ||
513 | */ | ||
514 | #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00) | ||
515 | #define MEM_SS_ADDR regptr(MSP_MEM_CFG_BASE + 0x00) | ||
516 | #define MEM_SS_DATA regptr(MSP_MEM_CFG_BASE + 0x04) | ||
517 | #define MEM_SS_WRITE regptr(MSP_MEM_CFG_BASE + 0x08) | ||
518 | |||
519 | /* | ||
520 | *************************************************************************** | ||
521 | * PCI controller registers * | ||
522 | *************************************************************************** | ||
523 | */ | ||
524 | #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00) | ||
525 | #define PCI_CONFIG_SPACE_REG regptr(MSP_PCI_BASE + 0x800) | ||
526 | #define PCI_JTAG_DEVID_REG regptr(MSP_SLP_BASE + 0x13c) | ||
527 | |||
528 | /* | ||
529 | ######################################################################## | ||
530 | # Register content & macro definitions # | ||
531 | ######################################################################## | ||
532 | */ | ||
533 | |||
534 | /* | ||
535 | *************************************************************************** | ||
536 | * DEV_ID defines * | ||
537 | *************************************************************************** | ||
538 | */ | ||
539 | #define DEV_ID_PCI_DIS (1 << 26) /* Set if PCI disabled */ | ||
540 | #define DEV_ID_PCI_HOST (1 << 20) /* Set if PCI host */ | ||
541 | #define DEV_ID_SINGLE_PC (1 << 19) /* Set if single PC Card */ | ||
542 | #define DEV_ID_FAMILY (0xff << 8) /* family ID code */ | ||
543 | #define POLO_ZEUS_SUB_FAMILY (0x7 << 16) /* sub family for Polo/Zeus */ | ||
544 | |||
545 | #define MSPFPGA_ID (0x00 << 8) /* you are on your own here */ | ||
546 | #define MSP5000_ID (0x50 << 8) | ||
547 | #define MSP4F00_ID (0x4f << 8) /* FPGA version of MSP4200 */ | ||
548 | #define MSP4E00_ID (0x4f << 8) /* FPGA version of MSP7120 */ | ||
549 | #define MSP4200_ID (0x42 << 8) | ||
550 | #define MSP4000_ID (0x40 << 8) | ||
551 | #define MSP2XXX_ID (0x20 << 8) | ||
552 | #define MSPZEUS_ID (0x10 << 8) | ||
553 | |||
554 | #define MSP2004_SUB_ID (0x0 << 16) | ||
555 | #define MSP2005_SUB_ID (0x1 << 16) | ||
556 | #define MSP2006_SUB_ID (0x1 << 16) | ||
557 | #define MSP2007_SUB_ID (0x2 << 16) | ||
558 | #define MSP2010_SUB_ID (0x3 << 16) | ||
559 | #define MSP2015_SUB_ID (0x4 << 16) | ||
560 | #define MSP2020_SUB_ID (0x5 << 16) | ||
561 | #define MSP2100_SUB_ID (0x6 << 16) | ||
562 | |||
563 | /* | ||
564 | *************************************************************************** | ||
565 | * RESET defines * | ||
566 | *************************************************************************** | ||
567 | */ | ||
568 | #define MSP_GR_RST (0x01 << 0) /* Global reset bit */ | ||
569 | #define MSP_MR_RST (0x01 << 1) /* MIPS reset bit */ | ||
570 | #define MSP_PD_RST (0x01 << 2) /* PVC DMA reset bit */ | ||
571 | #define MSP_PP_RST (0x01 << 3) /* PVC reset bit */ | ||
572 | /* reserved */ | ||
573 | #define MSP_EA_RST (0x01 << 6) /* Mac A reset bit */ | ||
574 | #define MSP_EB_RST (0x01 << 7) /* Mac B reset bit */ | ||
575 | #define MSP_SE_RST (0x01 << 8) /* Security Eng reset bit */ | ||
576 | #define MSP_PB_RST (0x01 << 9) /* Per block reset bit */ | ||
577 | #define MSP_EC_RST (0x01 << 10) /* Mac C reset bit */ | ||
578 | #define MSP_TW_RST (0x01 << 11) /* TWI reset bit */ | ||
579 | #define MSP_SPI_RST (0x01 << 12) /* SPI/MPI reset bit */ | ||
580 | #define MSP_U1_RST (0x01 << 13) /* UART1 reset bit */ | ||
581 | #define MSP_U0_RST (0x01 << 14) /* UART0 reset bit */ | ||
582 | |||
583 | /* | ||
584 | *************************************************************************** | ||
585 | * UART defines * | ||
586 | *************************************************************************** | ||
587 | */ | ||
588 | #ifndef CONFIG_MSP_FPGA | ||
589 | #define MSP_BASE_BAUD 25000000 | ||
590 | #else | ||
591 | #define MSP_BASE_BAUD 6000000 | ||
592 | #endif | ||
593 | #define MSP_UART_REG_LEN 0x20 | ||
594 | |||
595 | /* | ||
596 | *************************************************************************** | ||
597 | * ELB defines * | ||
598 | *************************************************************************** | ||
599 | */ | ||
600 | #define PCCARD_32 0x02 /* Set if is PCCARD 32 (Cardbus) */ | ||
601 | #define SINGLE_PCCARD 0x01 /* Set to enable single PC card */ | ||
602 | |||
603 | /* | ||
604 | *************************************************************************** | ||
605 | * CIC defines * | ||
606 | *************************************************************************** | ||
607 | */ | ||
608 | |||
609 | /* CIC_EXT_CFG_REG */ | ||
610 | #define EXT_INT_POL(eirq) (1 << (eirq + 8)) | ||
611 | #define EXT_INT_EDGE(eirq) (1 << eirq) | ||
612 | |||
613 | #define CIC_EXT_SET_TRIGGER_LEVEL(reg, eirq) (reg &= ~EXT_INT_EDGE(eirq)) | ||
614 | #define CIC_EXT_SET_TRIGGER_EDGE(reg, eirq) (reg |= EXT_INT_EDGE(eirq)) | ||
615 | #define CIC_EXT_SET_ACTIVE_HI(reg, eirq) (reg |= EXT_INT_POL(eirq)) | ||
616 | #define CIC_EXT_SET_ACTIVE_LO(reg, eirq) (reg &= ~EXT_INT_POL(eirq)) | ||
617 | #define CIC_EXT_SET_ACTIVE_RISING CIC_EXT_SET_ACTIVE_HI | ||
618 | #define CIC_EXT_SET_ACTIVE_FALLING CIC_EXT_SET_ACTIVE_LO | ||
619 | |||
620 | #define CIC_EXT_IS_TRIGGER_LEVEL(reg, eirq) \ | ||
621 | ((reg & EXT_INT_EDGE(eirq)) == 0) | ||
622 | #define CIC_EXT_IS_TRIGGER_EDGE(reg, eirq) (reg & EXT_INT_EDGE(eirq)) | ||
623 | #define CIC_EXT_IS_ACTIVE_HI(reg, eirq) (reg & EXT_INT_POL(eirq)) | ||
624 | #define CIC_EXT_IS_ACTIVE_LO(reg, eirq) \ | ||
625 | ((reg & EXT_INT_POL(eirq)) == 0) | ||
626 | #define CIC_EXT_IS_ACTIVE_RISING CIC_EXT_IS_ACTIVE_HI | ||
627 | #define CIC_EXT_IS_ACTIVE_FALLING CIC_EXT_IS_ACTIVE_LO | ||
628 | |||
629 | /* | ||
630 | *************************************************************************** | ||
631 | * Memory Controller defines * | ||
632 | *************************************************************************** | ||
633 | */ | ||
634 | |||
635 | /* Indirect memory controller registers */ | ||
636 | #define DDRC_CFG(n) (n) | ||
637 | #define DDRC_DEBUG(n) (0x04 + n) | ||
638 | #define DDRC_CTL(n) (0x40 + n) | ||
639 | |||
640 | /* Macro to perform DDRC indirect write */ | ||
641 | #define DDRC_INDIRECT_WRITE(reg, mask, value) \ | ||
642 | ({ \ | ||
643 | *MEM_SS_ADDR = (((mask) & 0xf) << 8) | ((reg) & 0xff); \ | ||
644 | *MEM_SS_DATA = (value); \ | ||
645 | *MEM_SS_WRITE = 1; \ | ||
646 | }) | ||
647 | |||
648 | /* | ||
649 | *************************************************************************** | ||
650 | * SPI/MPI Mode * | ||
651 | *************************************************************************** | ||
652 | */ | ||
653 | #define SPI_MPI_RX_BUSY 0x00008000 /* SPI/MPI Receive Busy */ | ||
654 | #define SPI_MPI_FIFO_EMPTY 0x00004000 /* SPI/MPI Fifo Empty */ | ||
655 | #define SPI_MPI_TX_BUSY 0x00002000 /* SPI/MPI Transmit Busy */ | ||
656 | #define SPI_MPI_FIFO_FULL 0x00001000 /* SPI/MPU FIFO full */ | ||
657 | |||
658 | /* | ||
659 | *************************************************************************** | ||
660 | * SPI/MPI Control Register * | ||
661 | *************************************************************************** | ||
662 | */ | ||
663 | #define SPI_MPI_RX_START 0x00000004 /* Start receive command */ | ||
664 | #define SPI_MPI_FLUSH_Q 0x00000002 /* Flush SPI/MPI Queue */ | ||
665 | #define SPI_MPI_TX_START 0x00000001 /* Start Transmit Command */ | ||
666 | |||
667 | #endif /* !_ASM_MSP_REGS_H */ | ||
diff --git a/include/asm-mips/pmc-sierra/msp71xx/msp_slp_int.h b/include/asm-mips/pmc-sierra/msp71xx/msp_slp_int.h new file mode 100644 index 000000000000..96d4c8ce8c83 --- /dev/null +++ b/include/asm-mips/pmc-sierra/msp71xx/msp_slp_int.h | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * Defines for the MSP interrupt controller. | ||
3 | * | ||
4 | * Copyright (C) 1999 MIPS Technologies, Inc. All rights reserved. | ||
5 | * Author: Carsten Langgaard, carstenl@mips.com | ||
6 | * | ||
7 | * ######################################################################## | ||
8 | * | ||
9 | * This program is free software; you can distribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License (Version 2) as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
16 | * for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
21 | * | ||
22 | * ######################################################################## | ||
23 | */ | ||
24 | |||
25 | #ifndef _MSP_SLP_INT_H | ||
26 | #define _MSP_SLP_INT_H | ||
27 | |||
28 | /* | ||
29 | * The PMC-Sierra SLP interrupts are arranged in a 3 level cascaded | ||
30 | * hierarchical system. The first level are the direct MIPS interrupts | ||
31 | * and are assigned the interrupt range 0-7. The second level is the SLM | ||
32 | * interrupt controller and is assigned the range 8-39. The third level | ||
33 | * comprises the Peripherial block, the PCI block, the PCI MSI block and | ||
34 | * the SLP. The PCI interrupts and the SLP errors are handled by the | ||
35 | * relevant subsystems so the core interrupt code needs only concern | ||
36 | * itself with the Peripheral block. These are assigned interrupts in | ||
37 | * the range 40-71. | ||
38 | */ | ||
39 | |||
40 | /* | ||
41 | * IRQs directly connected to CPU | ||
42 | */ | ||
43 | #define MSP_MIPS_INTBASE 0 | ||
44 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | ||
45 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | ||
46 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | ||
47 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | ||
48 | #define MSP_INT_C_IRQ2 4 /* Wired off, C_IRQ2 */ | ||
49 | #define MSP_INT_VE 5 /* IRQ for Voice Engine, C_IRQ3 */ | ||
50 | #define MSP_INT_SLP 6 /* IRQ for SLM block, C_IRQ4 */ | ||
51 | #define MSP_INT_TIMER 7 /* IRQ for the MIPS timer, C_IRQ5 */ | ||
52 | |||
53 | /* | ||
54 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) | ||
55 | * These defines should be tied to the register definition for the SLM | ||
56 | * interrupt routine. For now, just use hard-coded values. | ||
57 | */ | ||
58 | #define MSP_SLP_INTBASE (MSP_MIPS_INTBASE + 8) | ||
59 | #define MSP_INT_EXT0 (MSP_SLP_INTBASE + 0) | ||
60 | /* External interrupt 0 */ | ||
61 | #define MSP_INT_EXT1 (MSP_SLP_INTBASE + 1) | ||
62 | /* External interrupt 1 */ | ||
63 | #define MSP_INT_EXT2 (MSP_SLP_INTBASE + 2) | ||
64 | /* External interrupt 2 */ | ||
65 | #define MSP_INT_EXT3 (MSP_SLP_INTBASE + 3) | ||
66 | /* External interrupt 3 */ | ||
67 | /* Reserved 4-7 */ | ||
68 | |||
69 | /* | ||
70 | ************************************************************************* | ||
71 | * DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER * | ||
72 | * Some MSP produces have this interrupt labelled as Voice and some are * | ||
73 | * SEC mbox ... * | ||
74 | ************************************************************************* | ||
75 | */ | ||
76 | #define MSP_INT_SLP_VE (MSP_SLP_INTBASE + 8) | ||
77 | /* Cascaded IRQ for Voice Engine*/ | ||
78 | #define MSP_INT_SLP_TDM (MSP_SLP_INTBASE + 9) | ||
79 | /* TDM interrupt */ | ||
80 | #define MSP_INT_SLP_MAC0 (MSP_SLP_INTBASE + 10) | ||
81 | /* Cascaded IRQ for MAC 0 */ | ||
82 | #define MSP_INT_SLP_MAC1 (MSP_SLP_INTBASE + 11) | ||
83 | /* Cascaded IRQ for MAC 1 */ | ||
84 | #define MSP_INT_SEC (MSP_SLP_INTBASE + 12) | ||
85 | /* IRQ for security engine */ | ||
86 | #define MSP_INT_PER (MSP_SLP_INTBASE + 13) | ||
87 | /* Peripheral interrupt */ | ||
88 | #define MSP_INT_TIMER0 (MSP_SLP_INTBASE + 14) | ||
89 | /* SLP timer 0 */ | ||
90 | #define MSP_INT_TIMER1 (MSP_SLP_INTBASE + 15) | ||
91 | /* SLP timer 1 */ | ||
92 | #define MSP_INT_TIMER2 (MSP_SLP_INTBASE + 16) | ||
93 | /* SLP timer 2 */ | ||
94 | #define MSP_INT_SLP_TIMER (MSP_SLP_INTBASE + 17) | ||
95 | /* Cascaded MIPS timer */ | ||
96 | #define MSP_INT_BLKCP (MSP_SLP_INTBASE + 18) | ||
97 | /* Block Copy */ | ||
98 | #define MSP_INT_UART0 (MSP_SLP_INTBASE + 19) | ||
99 | /* UART 0 */ | ||
100 | #define MSP_INT_PCI (MSP_SLP_INTBASE + 20) | ||
101 | /* PCI subsystem */ | ||
102 | #define MSP_INT_PCI_DBELL (MSP_SLP_INTBASE + 21) | ||
103 | /* PCI doorbell */ | ||
104 | #define MSP_INT_PCI_MSI (MSP_SLP_INTBASE + 22) | ||
105 | /* PCI Message Signal */ | ||
106 | #define MSP_INT_PCI_BC0 (MSP_SLP_INTBASE + 23) | ||
107 | /* PCI Block Copy 0 */ | ||
108 | #define MSP_INT_PCI_BC1 (MSP_SLP_INTBASE + 24) | ||
109 | /* PCI Block Copy 1 */ | ||
110 | #define MSP_INT_SLP_ERR (MSP_SLP_INTBASE + 25) | ||
111 | /* SLP error condition */ | ||
112 | #define MSP_INT_MAC2 (MSP_SLP_INTBASE + 26) | ||
113 | /* IRQ for MAC2 */ | ||
114 | /* Reserved 26-31 */ | ||
115 | |||
116 | /* | ||
117 | * IRQs cascaded on SLP PER interrupt (MSP_INT_PER) | ||
118 | */ | ||
119 | #define MSP_PER_INTBASE (MSP_SLP_INTBASE + 32) | ||
120 | /* Reserved 0-1 */ | ||
121 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | ||
122 | /* UART 1 */ | ||
123 | /* Reserved 3-5 */ | ||
124 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | ||
125 | /* 2-wire */ | ||
126 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | ||
127 | /* Peripheral timer block out 0 */ | ||
128 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | ||
129 | /* Peripheral timer block out 1 */ | ||
130 | /* Reserved 9 */ | ||
131 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | ||
132 | /* SPI RX complete */ | ||
133 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | ||
134 | /* SPI TX complete */ | ||
135 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | ||
136 | /* GPIO */ | ||
137 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | ||
138 | /* Peripheral error */ | ||
139 | /* Reserved 14-31 */ | ||
140 | |||
141 | #endif /* !_MSP_SLP_INT_H */ | ||
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 5f80ba71ab92..1d8b9a8ae324 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -82,10 +82,6 @@ struct mips_fpu_struct { | |||
82 | unsigned int fcr31; | 82 | unsigned int fcr31; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | #define INIT_FPU { \ | ||
86 | {0,} \ | ||
87 | } | ||
88 | |||
89 | #define NUM_DSP_REGS 6 | 85 | #define NUM_DSP_REGS 6 |
90 | 86 | ||
91 | typedef __u32 dspreg_t; | 87 | typedef __u32 dspreg_t; |
@@ -95,8 +91,6 @@ struct mips_dsp_state { | |||
95 | unsigned int dspcontrol; | 91 | unsigned int dspcontrol; |
96 | }; | 92 | }; |
97 | 93 | ||
98 | #define INIT_DSP {{0,},} | ||
99 | |||
100 | #define INIT_CPUMASK { \ | 94 | #define INIT_CPUMASK { \ |
101 | {0,} \ | 95 | {0,} \ |
102 | } | 96 | } |
@@ -155,41 +149,63 @@ struct thread_struct { | |||
155 | #define MF_N64 0 | 149 | #define MF_N64 0 |
156 | 150 | ||
157 | #ifdef CONFIG_MIPS_MT_FPAFF | 151 | #ifdef CONFIG_MIPS_MT_FPAFF |
158 | #define FPAFF_INIT 0, INIT_CPUMASK, | 152 | #define FPAFF_INIT \ |
153 | .emulated_fp = 0, \ | ||
154 | .user_cpus_allowed = INIT_CPUMASK, | ||
159 | #else | 155 | #else |
160 | #define FPAFF_INIT | 156 | #define FPAFF_INIT |
161 | #endif /* CONFIG_MIPS_MT_FPAFF */ | 157 | #endif /* CONFIG_MIPS_MT_FPAFF */ |
162 | 158 | ||
163 | #define INIT_THREAD { \ | 159 | #define INIT_THREAD { \ |
164 | /* \ | 160 | /* \ |
165 | * saved main processor registers \ | 161 | * Saved main processor registers \ |
166 | */ \ | 162 | */ \ |
167 | 0, 0, 0, 0, 0, 0, 0, 0, \ | 163 | .reg16 = 0, \ |
168 | 0, 0, 0, \ | 164 | .reg17 = 0, \ |
169 | /* \ | 165 | .reg18 = 0, \ |
170 | * saved cp0 stuff \ | 166 | .reg19 = 0, \ |
171 | */ \ | 167 | .reg20 = 0, \ |
172 | 0, \ | 168 | .reg21 = 0, \ |
173 | /* \ | 169 | .reg22 = 0, \ |
174 | * saved fpu/fpu emulator stuff \ | 170 | .reg23 = 0, \ |
175 | */ \ | 171 | .reg29 = 0, \ |
176 | INIT_FPU, \ | 172 | .reg30 = 0, \ |
177 | /* \ | 173 | .reg31 = 0, \ |
178 | * fpu affinity state (null if not FPAFF) \ | 174 | /* \ |
179 | */ \ | 175 | * Saved cp0 stuff \ |
180 | FPAFF_INIT \ | 176 | */ \ |
181 | /* \ | 177 | .cp0_status = 0, \ |
182 | * saved dsp/dsp emulator stuff \ | 178 | /* \ |
183 | */ \ | 179 | * Saved FPU/FPU emulator stuff \ |
184 | INIT_DSP, \ | 180 | */ \ |
185 | /* \ | 181 | .fpu = { \ |
186 | * Other stuff associated with the process \ | 182 | .fpr = {0,}, \ |
187 | */ \ | 183 | .fcr31 = 0, \ |
188 | 0, 0, 0, 0, \ | 184 | }, \ |
189 | /* \ | 185 | /* \ |
190 | * For now the default is to fix address errors \ | 186 | * FPU affinity state (null if not FPAFF) \ |
191 | */ \ | 187 | */ \ |
192 | MF_FIXADE, 0, 0 \ | 188 | FPAFF_INIT \ |
189 | /* \ | ||
190 | * Saved DSP stuff \ | ||
191 | */ \ | ||
192 | .dsp = { \ | ||
193 | .dspr = {0, }, \ | ||
194 | .dspcontrol = 0, \ | ||
195 | }, \ | ||
196 | /* \ | ||
197 | * Other stuff associated with the process \ | ||
198 | */ \ | ||
199 | .cp0_badvaddr = 0, \ | ||
200 | .cp0_baduaddr = 0, \ | ||
201 | .error_code = 0, \ | ||
202 | .trap_no = 0, \ | ||
203 | /* \ | ||
204 | * For now the default is to fix address errors \ | ||
205 | */ \ | ||
206 | .mflags = MF_FIXADE, \ | ||
207 | .irix_trampoline = 0, \ | ||
208 | .irix_oldctx = 0, \ | ||
193 | } | 209 | } |
194 | 210 | ||
195 | struct task_struct; | 211 | struct task_struct; |
@@ -237,7 +253,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
237 | 253 | ||
238 | #define ARCH_HAS_PREFETCH | 254 | #define ARCH_HAS_PREFETCH |
239 | 255 | ||
240 | extern inline void prefetch(const void *addr) | 256 | static inline void prefetch(const void *addr) |
241 | { | 257 | { |
242 | __asm__ __volatile__( | 258 | __asm__ __volatile__( |
243 | " .set mips4 \n" | 259 | " .set mips4 \n" |
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 1906938285c0..85b44366343a 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -86,7 +86,7 @@ struct pt_regs { | |||
86 | 86 | ||
87 | extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); | 87 | extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); |
88 | 88 | ||
89 | extern NORET_TYPE void die(const char *, struct pt_regs *); | 89 | extern NORET_TYPE void die(const char *, struct pt_regs *) ATTRIB_NORET; |
90 | 90 | ||
91 | static inline void die_if_kernel(const char *str, struct pt_regs *regs) | 91 | static inline void die_if_kernel(const char *str, struct pt_regs *regs) |
92 | { | 92 | { |
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/serial.h b/include/asm-mips/serial.h index ce51213d84f9..c07ebd8eb9e7 100644 --- a/include/asm-mips/serial.h +++ b/include/asm-mips/serial.h | |||
@@ -19,159 +19,4 @@ | |||
19 | */ | 19 | */ |
20 | #define BASE_BAUD (1843200 / 16) | 20 | #define BASE_BAUD (1843200 / 16) |
21 | 21 | ||
22 | /* Standard COM flags (except for COM4, because of the 8514 problem) */ | ||
23 | #ifdef CONFIG_SERIAL_DETECT_IRQ | ||
24 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) | ||
25 | #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) | ||
26 | #else | ||
27 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
28 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | ||
29 | #endif | ||
30 | |||
31 | #ifdef CONFIG_MACH_JAZZ | ||
32 | #include <asm/jazz.h> | ||
33 | |||
34 | #ifndef CONFIG_OLIVETTI_M700 | ||
35 | /* Some Jazz machines seem to have an 8MHz crystal clock but I don't know | ||
36 | exactly which ones ... XXX */ | ||
37 | #define JAZZ_BASE_BAUD ( 8000000 / 16 ) /* ( 3072000 / 16) */ | ||
38 | #else | ||
39 | /* but the M700 isn't such a strange beast */ | ||
40 | #define JAZZ_BASE_BAUD BASE_BAUD | ||
41 | #endif | ||
42 | |||
43 | #define _JAZZ_SERIAL_INIT(int, base) \ | ||
44 | { .baud_base = JAZZ_BASE_BAUD, .irq = int, .flags = STD_COM_FLAGS, \ | ||
45 | .iomem_base = (u8 *) base, .iomem_reg_shift = 0, \ | ||
46 | .io_type = SERIAL_IO_MEM } | ||
47 | #define JAZZ_SERIAL_PORT_DEFNS \ | ||
48 | _JAZZ_SERIAL_INIT(JAZZ_SERIAL1_IRQ, JAZZ_SERIAL1_BASE), \ | ||
49 | _JAZZ_SERIAL_INIT(JAZZ_SERIAL2_IRQ, JAZZ_SERIAL2_BASE), | ||
50 | #else | ||
51 | #define JAZZ_SERIAL_PORT_DEFNS | ||
52 | #endif | ||
53 | |||
54 | /* | ||
55 | * Galileo EV64120 evaluation board | ||
56 | */ | ||
57 | #ifdef CONFIG_MIPS_EV64120 | ||
58 | #include <mach-gt64120.h> | ||
59 | #define EV64120_SERIAL_PORT_DEFNS \ | ||
60 | { .baud_base = EV64120_BASE_BAUD, .irq = EV64120_UART_IRQ, \ | ||
61 | .flags = STD_COM_FLAGS, \ | ||
62 | .iomem_base = EV64120_UART0_REGS_BASE, .iomem_reg_shift = 2, \ | ||
63 | .io_type = SERIAL_IO_MEM }, \ | ||
64 | { .baud_base = EV64120_BASE_BAUD, .irq = EV64120_UART_IRQ, \ | ||
65 | .flags = STD_COM_FLAGS, \ | ||
66 | .iomem_base = EV64120_UART1_REGS_BASE, .iomem_reg_shift = 2, \ | ||
67 | .io_type = SERIAL_IO_MEM }, | ||
68 | #else | ||
69 | #define EV64120_SERIAL_PORT_DEFNS | ||
70 | #endif | ||
71 | |||
72 | #ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT | ||
73 | #define STD_SERIAL_PORT_DEFNS \ | ||
74 | /* UART CLK PORT IRQ FLAGS */ \ | ||
75 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
76 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | ||
77 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | ||
78 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | ||
79 | |||
80 | #else /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ | ||
81 | #define STD_SERIAL_PORT_DEFNS | ||
82 | #endif /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ | ||
83 | |||
84 | #ifdef CONFIG_MOMENCO_OCELOT_3 | ||
85 | #define OCELOT_3_BASE_BAUD ( 20000000 / 16 ) | ||
86 | #define OCELOT_3_SERIAL_IRQ 6 | ||
87 | #define OCELOT_3_SERIAL_BASE (signed)0xfd000020 | ||
88 | |||
89 | #define _OCELOT_3_SERIAL_INIT(int, base) \ | ||
90 | { .baud_base = OCELOT_3_BASE_BAUD, irq: int, \ | ||
91 | .flags = STD_COM_FLAGS, \ | ||
92 | .iomem_base = (u8 *) base, iomem_reg_shift: 2, \ | ||
93 | io_type: SERIAL_IO_MEM } | ||
94 | |||
95 | #define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \ | ||
96 | _OCELOT_3_SERIAL_INIT(OCELOT_3_SERIAL_IRQ, OCELOT_3_SERIAL_BASE) | ||
97 | #else | ||
98 | #define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS | ||
99 | #endif | ||
100 | |||
101 | #ifdef CONFIG_MOMENCO_OCELOT | ||
102 | /* Ordinary NS16552 duart with a 20MHz crystal. */ | ||
103 | #define OCELOT_BASE_BAUD ( 20000000 / 16 ) | ||
104 | |||
105 | #define OCELOT_SERIAL1_IRQ 4 | ||
106 | #define OCELOT_SERIAL1_BASE 0xe0001020 | ||
107 | |||
108 | #define _OCELOT_SERIAL_INIT(int, base) \ | ||
109 | { .baud_base = OCELOT_BASE_BAUD, .irq = int, .flags = STD_COM_FLAGS, \ | ||
110 | .iomem_base = (u8 *) base, .iomem_reg_shift = 2, \ | ||
111 | .io_type = SERIAL_IO_MEM } | ||
112 | #define MOMENCO_OCELOT_SERIAL_PORT_DEFNS \ | ||
113 | _OCELOT_SERIAL_INIT(OCELOT_SERIAL1_IRQ, OCELOT_SERIAL1_BASE) | ||
114 | #else | ||
115 | #define MOMENCO_OCELOT_SERIAL_PORT_DEFNS | ||
116 | #endif | ||
117 | |||
118 | #ifdef CONFIG_MOMENCO_OCELOT_C | ||
119 | /* Ordinary NS16552 duart with a 20MHz crystal. */ | ||
120 | #define OCELOT_C_BASE_BAUD ( 20000000 / 16 ) | ||
121 | |||
122 | #define OCELOT_C_SERIAL1_IRQ 80 | ||
123 | #define OCELOT_C_SERIAL1_BASE 0xfd000020 | ||
124 | |||
125 | #define OCELOT_C_SERIAL2_IRQ 81 | ||
126 | #define OCELOT_C_SERIAL2_BASE 0xfd000000 | ||
127 | |||
128 | #define _OCELOT_C_SERIAL_INIT(int, base) \ | ||
129 | { .baud_base = OCELOT_C_BASE_BAUD, \ | ||
130 | .irq = (int), \ | ||
131 | .flags = STD_COM_FLAGS, \ | ||
132 | .iomem_base = (u8 *) base, \ | ||
133 | .iomem_reg_shift = 2, \ | ||
134 | .io_type = SERIAL_IO_MEM \ | ||
135 | } | ||
136 | #define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \ | ||
137 | _OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL1_IRQ, OCELOT_C_SERIAL1_BASE), \ | ||
138 | _OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL2_IRQ, OCELOT_C_SERIAL2_BASE) | ||
139 | #else | ||
140 | #define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS | ||
141 | #endif | ||
142 | |||
143 | #ifdef CONFIG_DDB5477 | ||
144 | #include <asm/ddb5xxx/ddb5477.h> | ||
145 | #define DDB5477_SERIAL_PORT_DEFNS \ | ||
146 | { .baud_base = BASE_BAUD, .irq = VRC5477_IRQ_UART0, \ | ||
147 | .flags = STD_COM_FLAGS, .iomem_base = (u8*)0xbfa04200, \ | ||
148 | .iomem_reg_shift = 3, .io_type = SERIAL_IO_MEM}, \ | ||
149 | { .baud_base = BASE_BAUD, .irq = VRC5477_IRQ_UART1, \ | ||
150 | .flags = STD_COM_FLAGS, .iomem_base = (u8*)0xbfa04240, \ | ||
151 | .iomem_reg_shift = 3, .io_type = SERIAL_IO_MEM}, | ||
152 | #else | ||
153 | #define DDB5477_SERIAL_PORT_DEFNS | ||
154 | #endif | ||
155 | |||
156 | #ifdef CONFIG_SGI_IP32 | ||
157 | /* | ||
158 | * The IP32 (SGI O2) has standard serial ports (UART 16550A) mapped in memory | ||
159 | * They are initialized in ip32_setup | ||
160 | */ | ||
161 | #define IP32_SERIAL_PORT_DEFNS \ | ||
162 | {},{}, | ||
163 | #else | ||
164 | #define IP32_SERIAL_PORT_DEFNS | ||
165 | #endif /* CONFIG_SGI_IP32 */ | ||
166 | |||
167 | #define SERIAL_PORT_DFNS \ | ||
168 | DDB5477_SERIAL_PORT_DEFNS \ | ||
169 | EV64120_SERIAL_PORT_DEFNS \ | ||
170 | IP32_SERIAL_PORT_DEFNS \ | ||
171 | JAZZ_SERIAL_PORT_DEFNS \ | ||
172 | STD_SERIAL_PORT_DEFNS \ | ||
173 | MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \ | ||
174 | MOMENCO_OCELOT_SERIAL_PORT_DEFNS \ | ||
175 | MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS | ||
176 | |||
177 | #endif /* _ASM_SERIAL_H */ | 22 | #endif /* _ASM_SERIAL_H */ |
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h index 1608fd71d6f7..13aef6af422c 100644 --- a/include/asm-mips/smp.h +++ b/include/asm-mips/smp.h | |||
@@ -49,13 +49,6 @@ extern struct call_data_struct *call_data; | |||
49 | extern cpumask_t phys_cpu_present_map; | 49 | extern cpumask_t phys_cpu_present_map; |
50 | #define cpu_possible_map phys_cpu_present_map | 50 | #define cpu_possible_map phys_cpu_present_map |
51 | 51 | ||
52 | extern cpumask_t cpu_callout_map; | ||
53 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | ||
54 | static inline int num_booting_cpus(void) | ||
55 | { | ||
56 | return cpus_weight(cpu_callout_map); | ||
57 | } | ||
58 | |||
59 | /* | 52 | /* |
60 | * These are defined by the board-specific code. | 53 | * These are defined by the board-specific code. |
61 | */ | 54 | */ |
diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index f257509b914f..ddaf36a1e389 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h | |||
@@ -146,9 +146,6 @@ extern unsigned int sni_brd_type; | |||
146 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE | 146 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE |
147 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) | 147 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) |
148 | 148 | ||
149 | #define SNI_DS1216_A20R_BASE 0xbc081ffc | ||
150 | #define SNI_DS1216_RM200_BASE 0xbcd41ffc | ||
151 | |||
152 | #define SNI_PCIT_INT_REG 0xbfff000c | 149 | #define SNI_PCIT_INT_REG 0xbfff000c |
153 | 150 | ||
154 | #define SNI_PCIT_INT_START 24 | 151 | #define SNI_PCIT_INT_START 24 |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 7afa1fdf70ca..ed33366b85b8 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -17,6 +17,18 @@ | |||
17 | #include <asm/mipsregs.h> | 17 | #include <asm/mipsregs.h> |
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | 19 | ||
20 | /* | ||
21 | * For SMTC kernel, global IE should be left set, and interrupts | ||
22 | * controlled exclusively via IXMT. | ||
23 | */ | ||
24 | #ifdef CONFIG_MIPS_MT_SMTC | ||
25 | #define STATMASK 0x1e | ||
26 | #elif defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) | ||
27 | #define STATMASK 0x3f | ||
28 | #else | ||
29 | #define STATMASK 0x1f | ||
30 | #endif | ||
31 | |||
20 | #ifdef CONFIG_MIPS_MT_SMTC | 32 | #ifdef CONFIG_MIPS_MT_SMTC |
21 | #include <asm/mipsmtregs.h> | 33 | #include <asm/mipsmtregs.h> |
22 | #endif /* CONFIG_MIPS_MT_SMTC */ | 34 | #endif /* CONFIG_MIPS_MT_SMTC */ |
@@ -236,10 +248,10 @@ | |||
236 | .set reorder | 248 | .set reorder |
237 | .set noat | 249 | .set noat |
238 | mfc0 a0, CP0_STATUS | 250 | mfc0 a0, CP0_STATUS |
239 | ori a0, 0x1f | ||
240 | xori a0, 0x1f | ||
241 | mtc0 a0, CP0_STATUS | ||
242 | li v1, 0xff00 | 251 | li v1, 0xff00 |
252 | ori a0, STATMASK | ||
253 | xori a0, STATMASK | ||
254 | mtc0 a0, CP0_STATUS | ||
243 | and a0, v1 | 255 | and a0, v1 |
244 | LONG_L v0, PT_STATUS(sp) | 256 | LONG_L v0, PT_STATUS(sp) |
245 | nor v1, $0, v1 | 257 | nor v1, $0, v1 |
@@ -249,10 +261,6 @@ | |||
249 | LONG_L $31, PT_R31(sp) | 261 | LONG_L $31, PT_R31(sp) |
250 | LONG_L $28, PT_R28(sp) | 262 | LONG_L $28, PT_R28(sp) |
251 | LONG_L $25, PT_R25(sp) | 263 | LONG_L $25, PT_R25(sp) |
252 | #ifdef CONFIG_64BIT | ||
253 | LONG_L $8, PT_R8(sp) | ||
254 | LONG_L $9, PT_R9(sp) | ||
255 | #endif | ||
256 | LONG_L $7, PT_R7(sp) | 264 | LONG_L $7, PT_R7(sp) |
257 | LONG_L $6, PT_R6(sp) | 265 | LONG_L $6, PT_R6(sp) |
258 | LONG_L $5, PT_R5(sp) | 266 | LONG_L $5, PT_R5(sp) |
@@ -273,16 +281,6 @@ | |||
273 | .endm | 281 | .endm |
274 | 282 | ||
275 | #else | 283 | #else |
276 | /* | ||
277 | * For SMTC kernel, global IE should be left set, and interrupts | ||
278 | * controlled exclusively via IXMT. | ||
279 | */ | ||
280 | |||
281 | #ifdef CONFIG_MIPS_MT_SMTC | ||
282 | #define STATMASK 0x1e | ||
283 | #else | ||
284 | #define STATMASK 0x1f | ||
285 | #endif | ||
286 | .macro RESTORE_SOME | 284 | .macro RESTORE_SOME |
287 | .set push | 285 | .set push |
288 | .set reorder | 286 | .set reorder |
@@ -385,9 +383,9 @@ | |||
385 | .macro CLI | 383 | .macro CLI |
386 | #if !defined(CONFIG_MIPS_MT_SMTC) | 384 | #if !defined(CONFIG_MIPS_MT_SMTC) |
387 | mfc0 t0, CP0_STATUS | 385 | mfc0 t0, CP0_STATUS |
388 | li t1, ST0_CU0 | 0x1f | 386 | li t1, ST0_CU0 | STATMASK |
389 | or t0, t1 | 387 | or t0, t1 |
390 | xori t0, 0x1f | 388 | xori t0, STATMASK |
391 | mtc0 t0, CP0_STATUS | 389 | mtc0 t0, CP0_STATUS |
392 | #else /* CONFIG_MIPS_MT_SMTC */ | 390 | #else /* CONFIG_MIPS_MT_SMTC */ |
393 | /* | 391 | /* |
@@ -420,9 +418,9 @@ | |||
420 | .macro STI | 418 | .macro STI |
421 | #if !defined(CONFIG_MIPS_MT_SMTC) | 419 | #if !defined(CONFIG_MIPS_MT_SMTC) |
422 | mfc0 t0, CP0_STATUS | 420 | mfc0 t0, CP0_STATUS |
423 | li t1, ST0_CU0 | 0x1f | 421 | li t1, ST0_CU0 | STATMASK |
424 | or t0, t1 | 422 | or t0, t1 |
425 | xori t0, 0x1e | 423 | xori t0, STATMASK & ~1 |
426 | mtc0 t0, CP0_STATUS | 424 | mtc0 t0, CP0_STATUS |
427 | #else /* CONFIG_MIPS_MT_SMTC */ | 425 | #else /* CONFIG_MIPS_MT_SMTC */ |
428 | /* | 426 | /* |
@@ -451,7 +449,8 @@ | |||
451 | .endm | 449 | .endm |
452 | 450 | ||
453 | /* | 451 | /* |
454 | * Just move to kernel mode and leave interrupts as they are. | 452 | * Just move to kernel mode and leave interrupts as they are. Note |
453 | * for the R3000 this means copying the previous enable from IEp. | ||
455 | * Set cp0 enable bit as sign that we're running on the kernel stack | 454 | * Set cp0 enable bit as sign that we're running on the kernel stack |
456 | */ | 455 | */ |
457 | .macro KMODE | 456 | .macro KMODE |
@@ -482,9 +481,14 @@ | |||
482 | move ra, t0 | 481 | move ra, t0 |
483 | #endif /* CONFIG_MIPS_MT_SMTC */ | 482 | #endif /* CONFIG_MIPS_MT_SMTC */ |
484 | mfc0 t0, CP0_STATUS | 483 | mfc0 t0, CP0_STATUS |
485 | li t1, ST0_CU0 | 0x1e | 484 | li t1, ST0_CU0 | (STATMASK & ~1) |
485 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) | ||
486 | andi t2, t0, ST0_IEP | ||
487 | srl t2, 2 | ||
488 | or t0, t2 | ||
489 | #endif | ||
486 | or t0, t1 | 490 | or t0, t1 |
487 | xori t0, 0x1e | 491 | xori t0, STATMASK & ~1 |
488 | mtc0 t0, CP0_STATUS | 492 | mtc0 t0, CP0_STATUS |
489 | #ifdef CONFIG_MIPS_MT_SMTC | 493 | #ifdef CONFIG_MIPS_MT_SMTC |
490 | _ehb | 494 | _ehb |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index bb0b289dbc9e..46bdb3f566f9 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -44,7 +44,7 @@ struct task_struct; | |||
44 | * different thread. | 44 | * different thread. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define switch_to(prev,next,last) \ | 47 | #define __mips_mt_fpaff_switch_to(prev) \ |
48 | do { \ | 48 | do { \ |
49 | if (cpu_has_fpu && \ | 49 | if (cpu_has_fpu && \ |
50 | (prev->thread.mflags & MF_FPUBOUND) && \ | 50 | (prev->thread.mflags & MF_FPUBOUND) && \ |
@@ -52,24 +52,24 @@ do { \ | |||
52 | prev->thread.mflags &= ~MF_FPUBOUND; \ | 52 | prev->thread.mflags &= ~MF_FPUBOUND; \ |
53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ | 53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ |
54 | } \ | 54 | } \ |
55 | if (cpu_has_dsp) \ | ||
56 | __save_dsp(prev); \ | ||
57 | next->thread.emulated_fp = 0; \ | 55 | next->thread.emulated_fp = 0; \ |
58 | (last) = resume(prev, next, task_thread_info(next)); \ | ||
59 | if (cpu_has_dsp) \ | ||
60 | __restore_dsp(current); \ | ||
61 | } while(0) | 56 | } while(0) |
62 | 57 | ||
63 | #else | 58 | #else |
59 | #define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0) | ||
60 | #endif | ||
61 | |||
64 | #define switch_to(prev,next,last) \ | 62 | #define switch_to(prev,next,last) \ |
65 | do { \ | 63 | do { \ |
64 | __mips_mt_fpaff_switch_to(prev); \ | ||
66 | if (cpu_has_dsp) \ | 65 | if (cpu_has_dsp) \ |
67 | __save_dsp(prev); \ | 66 | __save_dsp(prev); \ |
68 | (last) = resume(prev, next, task_thread_info(next)); \ | 67 | (last) = resume(prev, next, task_thread_info(next)); \ |
69 | if (cpu_has_dsp) \ | 68 | if (cpu_has_dsp) \ |
70 | __restore_dsp(current); \ | 69 | __restore_dsp(current); \ |
70 | if (cpu_has_userlocal) \ | ||
71 | write_c0_userlocal(task_thread_info(current)->tp_value);\ | ||
71 | } while(0) | 72 | } while(0) |
72 | #endif | ||
73 | 73 | ||
74 | /* | 74 | /* |
75 | * On SMP systems, when the scheduler does migration-cost autodetection, | 75 | * On SMP systems, when the scheduler does migration-cost autodetection, |
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/tx4938/rbtx4938.h b/include/asm-mips/tx4938/rbtx4938.h index 0fbedafdcea8..74e7d8061e58 100644 --- a/include/asm-mips/tx4938/rbtx4938.h +++ b/include/asm-mips/tx4938/rbtx4938.h | |||
@@ -105,12 +105,6 @@ | |||
105 | #define rbtx4938_pcireset_ptr \ | 105 | #define rbtx4938_pcireset_ptr \ |
106 | ((volatile unsigned char *)RBTX4938_PCIRESET_ADDR) | 106 | ((volatile unsigned char *)RBTX4938_PCIRESET_ADDR) |
107 | 107 | ||
108 | /* SPI */ | ||
109 | #define RBTX4938_SEEPROM1_CHIPID 0 | ||
110 | #define RBTX4938_SEEPROM2_CHIPID 1 | ||
111 | #define RBTX4938_SEEPROM3_CHIPID 2 | ||
112 | #define RBTX4938_SRTC_CHIPID 3 | ||
113 | |||
114 | /* | 108 | /* |
115 | * IRQ mappings | 109 | * IRQ mappings |
116 | */ | 110 | */ |
diff --git a/include/asm-mips/tx4938/spi.h b/include/asm-mips/tx4938/spi.h index 0dbbab820a5a..6a60c83e152b 100644 --- a/include/asm-mips/tx4938/spi.h +++ b/include/asm-mips/tx4938/spi.h | |||
@@ -14,61 +14,7 @@ | |||
14 | #ifndef __ASM_TX_BOARDS_TX4938_SPI_H | 14 | #ifndef __ASM_TX_BOARDS_TX4938_SPI_H |
15 | #define __ASM_TX_BOARDS_TX4938_SPI_H | 15 | #define __ASM_TX_BOARDS_TX4938_SPI_H |
16 | 16 | ||
17 | /* SPI */ | 17 | extern int spi_eeprom_register(int chipid); |
18 | struct spi_dev_desc { | ||
19 | unsigned int baud; | ||
20 | unsigned short tcss, tcsh, tcsr; /* CS setup/hold/recovery time */ | ||
21 | unsigned int byteorder:1; /* 0:LSB-First, 1:MSB-First */ | ||
22 | unsigned int polarity:1; /* 0:High-Active */ | ||
23 | unsigned int phase:1; /* 0:Sample-Then-Shift */ | ||
24 | }; | ||
25 | |||
26 | extern void txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on)) __init; | ||
27 | extern void txx9_spi_irqinit(int irc_irq) __init; | ||
28 | extern int txx9_spi_io(int chipid, struct spi_dev_desc *desc, | ||
29 | unsigned char **inbufs, unsigned int *incounts, | ||
30 | unsigned char **outbufs, unsigned int *outcounts, | ||
31 | int cansleep); | ||
32 | extern int spi_eeprom_write_enable(int chipid, int enable); | ||
33 | extern int spi_eeprom_read_status(int chipid); | ||
34 | extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); | 18 | extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); |
35 | extern int spi_eeprom_write(int chipid, int address, unsigned char *buf, int len); | ||
36 | extern void spi_eeprom_proc_create(struct proc_dir_entry *dir, int chipid) __init; | ||
37 | |||
38 | #define TXX9_IMCLK (txx9_gbus_clock / 2) | ||
39 | |||
40 | /* | ||
41 | * SPI | ||
42 | */ | ||
43 | |||
44 | /* SPMCR : SPI Master Control */ | ||
45 | #define TXx9_SPMCR_OPMODE 0xc0 | ||
46 | #define TXx9_SPMCR_CONFIG 0x40 | ||
47 | #define TXx9_SPMCR_ACTIVE 0x80 | ||
48 | #define TXx9_SPMCR_SPSTP 0x02 | ||
49 | #define TXx9_SPMCR_BCLR 0x01 | ||
50 | |||
51 | /* SPCR0 : SPI Status */ | ||
52 | #define TXx9_SPCR0_TXIFL_MASK 0xc000 | ||
53 | #define TXx9_SPCR0_RXIFL_MASK 0x3000 | ||
54 | #define TXx9_SPCR0_SIDIE 0x0800 | ||
55 | #define TXx9_SPCR0_SOEIE 0x0400 | ||
56 | #define TXx9_SPCR0_RBSIE 0x0200 | ||
57 | #define TXx9_SPCR0_TBSIE 0x0100 | ||
58 | #define TXx9_SPCR0_IFSPSE 0x0010 | ||
59 | #define TXx9_SPCR0_SBOS 0x0004 | ||
60 | #define TXx9_SPCR0_SPHA 0x0002 | ||
61 | #define TXx9_SPCR0_SPOL 0x0001 | ||
62 | |||
63 | /* SPSR : SPI Status */ | ||
64 | #define TXx9_SPSR_TBSI 0x8000 | ||
65 | #define TXx9_SPSR_RBSI 0x4000 | ||
66 | #define TXx9_SPSR_TBS_MASK 0x3800 | ||
67 | #define TXx9_SPSR_RBS_MASK 0x0700 | ||
68 | #define TXx9_SPSR_SPOE 0x0080 | ||
69 | #define TXx9_SPSR_IFSD 0x0008 | ||
70 | #define TXx9_SPSR_SIDLE 0x0004 | ||
71 | #define TXx9_SPSR_STRDY 0x0002 | ||
72 | #define TXx9_SPSR_SRRDY 0x0001 | ||
73 | 19 | ||
74 | #endif /* __ASM_TX_BOARDS_TX4938_SPI_H */ | 20 | #endif /* __ASM_TX_BOARDS_TX4938_SPI_H */ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 91c306fcfb72..ed16de0a6398 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -336,16 +336,20 @@ | |||
336 | #define __NR_epoll_pwait (__NR_Linux + 313) | 336 | #define __NR_epoll_pwait (__NR_Linux + 313) |
337 | #define __NR_ioprio_set (__NR_Linux + 314) | 337 | #define __NR_ioprio_set (__NR_Linux + 314) |
338 | #define __NR_ioprio_get (__NR_Linux + 315) | 338 | #define __NR_ioprio_get (__NR_Linux + 315) |
339 | #define __NR_utimensat (__NR_Linux + 316) | ||
340 | #define __NR_signalfd (__NR_Linux + 317) | ||
341 | #define __NR_timerfd (__NR_Linux + 318) | ||
342 | #define __NR_eventfd (__NR_Linux + 319) | ||
339 | 343 | ||
340 | /* | 344 | /* |
341 | * Offset of the last Linux o32 flavoured syscall | 345 | * Offset of the last Linux o32 flavoured syscall |
342 | */ | 346 | */ |
343 | #define __NR_Linux_syscalls 315 | 347 | #define __NR_Linux_syscalls 319 |
344 | 348 | ||
345 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 349 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
346 | 350 | ||
347 | #define __NR_O32_Linux 4000 | 351 | #define __NR_O32_Linux 4000 |
348 | #define __NR_O32_Linux_syscalls 315 | 352 | #define __NR_O32_Linux_syscalls 319 |
349 | 353 | ||
350 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 354 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
351 | 355 | ||
@@ -628,16 +632,20 @@ | |||
628 | #define __NR_epoll_pwait (__NR_Linux + 272) | 632 | #define __NR_epoll_pwait (__NR_Linux + 272) |
629 | #define __NR_ioprio_set (__NR_Linux + 273) | 633 | #define __NR_ioprio_set (__NR_Linux + 273) |
630 | #define __NR_ioprio_get (__NR_Linux + 274) | 634 | #define __NR_ioprio_get (__NR_Linux + 274) |
635 | #define __NR_utimensat (__NR_Linux + 275) | ||
636 | #define __NR_signalfd (__NR_Linux + 276) | ||
637 | #define __NR_timerfd (__NR_Linux + 277) | ||
638 | #define __NR_eventfd (__NR_Linux + 278) | ||
631 | 639 | ||
632 | /* | 640 | /* |
633 | * Offset of the last Linux 64-bit flavoured syscall | 641 | * Offset of the last Linux 64-bit flavoured syscall |
634 | */ | 642 | */ |
635 | #define __NR_Linux_syscalls 274 | 643 | #define __NR_Linux_syscalls 278 |
636 | 644 | ||
637 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 645 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
638 | 646 | ||
639 | #define __NR_64_Linux 5000 | 647 | #define __NR_64_Linux 5000 |
640 | #define __NR_64_Linux_syscalls 274 | 648 | #define __NR_64_Linux_syscalls 278 |
641 | 649 | ||
642 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 650 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
643 | 651 | ||
@@ -924,16 +932,20 @@ | |||
924 | #define __NR_epoll_pwait (__NR_Linux + 276) | 932 | #define __NR_epoll_pwait (__NR_Linux + 276) |
925 | #define __NR_ioprio_set (__NR_Linux + 277) | 933 | #define __NR_ioprio_set (__NR_Linux + 277) |
926 | #define __NR_ioprio_get (__NR_Linux + 278) | 934 | #define __NR_ioprio_get (__NR_Linux + 278) |
935 | #define __NR_utimensat (__NR_Linux + 279) | ||
936 | #define __NR_signalfd (__NR_Linux + 280) | ||
937 | #define __NR_timerfd (__NR_Linux + 281) | ||
938 | #define __NR_eventfd (__NR_Linux + 282) | ||
927 | 939 | ||
928 | /* | 940 | /* |
929 | * Offset of the last N32 flavoured syscall | 941 | * Offset of the last N32 flavoured syscall |
930 | */ | 942 | */ |
931 | #define __NR_Linux_syscalls 278 | 943 | #define __NR_Linux_syscalls 282 |
932 | 944 | ||
933 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 945 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
934 | 946 | ||
935 | #define __NR_N32_Linux 6000 | 947 | #define __NR_N32_Linux 6000 |
936 | #define __NR_N32_Linux_syscalls 278 | 948 | #define __NR_N32_Linux_syscalls 282 |
937 | 949 | ||
938 | #ifdef __KERNEL__ | 950 | #ifdef __KERNEL__ |
939 | 951 | ||
@@ -965,6 +977,22 @@ | |||
965 | # define __ARCH_WANT_COMPAT_SYS_TIME | 977 | # define __ARCH_WANT_COMPAT_SYS_TIME |
966 | # endif | 978 | # endif |
967 | 979 | ||
980 | /* whitelists for checksyscalls */ | ||
981 | #define __IGNORE_select | ||
982 | #define __IGNORE_vfork | ||
983 | #define __IGNORE_time | ||
984 | #define __IGNORE_uselib | ||
985 | #define __IGNORE_fadvise64_64 | ||
986 | #define __IGNORE_getdents64 | ||
987 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | ||
988 | #define __IGNORE_truncate64 | ||
989 | #define __IGNORE_ftruncate64 | ||
990 | #define __IGNORE_stat64 | ||
991 | #define __IGNORE_lstat64 | ||
992 | #define __IGNORE_fstat64 | ||
993 | #define __IGNORE_fstatat64 | ||
994 | #endif | ||
995 | |||
968 | #endif /* !__ASSEMBLY__ */ | 996 | #endif /* !__ASSEMBLY__ */ |
969 | 997 | ||
970 | /* | 998 | /* |
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-mips/war.h b/include/asm-mips/war.h index 13a3502eef44..9de52a5b0f3d 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -169,26 +169,28 @@ | |||
169 | 169 | ||
170 | /* | 170 | /* |
171 | * On the RM9000 there is a problem which makes the CreateDirtyExclusive | 171 | * On the RM9000 there is a problem which makes the CreateDirtyExclusive |
172 | * cache operation unusable on SMP systems. | 172 | * eache operation unusable on SMP systems. |
173 | */ | 173 | */ |
174 | #if defined(CONFIG_MOMENCO_JAGUAR_ATX) || defined(CONFIG_PMC_YOSEMITE) || \ | 174 | #if defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_BASLER_EXCITE) |
175 | defined(CONFIG_BASLER_EXCITE) | ||
176 | #define RM9000_CDEX_SMP_WAR 1 | 175 | #define RM9000_CDEX_SMP_WAR 1 |
177 | #endif | 176 | #endif |
178 | 177 | ||
179 | /* | 178 | /* |
180 | * The RM9000 has a bug (though PMC-Sierra opposes it being called that) | 179 | * The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra |
181 | * where invalid instructions in the same I-cache line worth of instructions | 180 | * opposes it being called that) where invalid instructions in the same |
182 | * being fetched may case spurious exceptions. | 181 | * I-cache line worth of instructions being fetched may case spurious |
182 | * exceptions. | ||
183 | */ | 183 | */ |
184 | #if defined(CONFIG_MOMENCO_JAGUAR_ATX) || defined(CONFIG_MOMENCO_OCELOT_3) || \ | 184 | #if defined(CONFIG_BASLER_EXCITE) || defined(CONFIG_MIPS_ATLAS) || \ |
185 | defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_BASLER_EXCITE) | 185 | defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MOMENCO_OCELOT) || \ |
186 | defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_SGI_IP32) || \ | ||
187 | defined(CONFIG_WR_PPMC) | ||
186 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 | 188 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 |
187 | #endif | 189 | #endif |
188 | 190 | ||
189 | 191 | ||
190 | /* | 192 | /* |
191 | * ON the R10000 upto version 2.6 (not sure about 2.7) there is a bug that | 193 | * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that |
192 | * may cause ll / sc and lld / scd sequences to execute non-atomically. | 194 | * may cause ll / sc and lld / scd sequences to execute non-atomically. |
193 | */ | 195 | */ |
194 | #ifdef CONFIG_SGI_IP27 | 196 | #ifdef CONFIG_SGI_IP27 |
@@ -196,6 +198,14 @@ | |||
196 | #endif | 198 | #endif |
197 | 199 | ||
198 | /* | 200 | /* |
201 | * 34K core erratum: "Problems Executing the TLBR Instruction" | ||
202 | */ | ||
203 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ | ||
204 | defined(CONFIG_PMC_MSP7120_FPGA) | ||
205 | #define MIPS34K_MISSED_ITLB_WAR 1 | ||
206 | #endif | ||
207 | |||
208 | /* | ||
199 | * Workarounds default to off | 209 | * Workarounds default to off |
200 | */ | 210 | */ |
201 | #ifndef ICACHE_REFILLS_WORKAROUND_WAR | 211 | #ifndef ICACHE_REFILLS_WORKAROUND_WAR |
@@ -234,5 +244,8 @@ | |||
234 | #ifndef R10000_LLSC_WAR | 244 | #ifndef R10000_LLSC_WAR |
235 | #define R10000_LLSC_WAR 0 | 245 | #define R10000_LLSC_WAR 0 |
236 | #endif | 246 | #endif |
247 | #ifndef MIPS34K_MISSED_ITLB_WAR | ||
248 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
249 | #endif | ||
237 | 250 | ||
238 | #endif /* _ASM_WAR_H */ | 251 | #endif /* _ASM_WAR_H */ |
diff --git a/include/asm-mips/watch.h b/include/asm-mips/watch.h deleted file mode 100644 index 6aa90cae1114..000000000000 --- a/include/asm-mips/watch.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1996, 1997, 1998, 2000, 2001 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef _ASM_WATCH_H | ||
9 | #define _ASM_WATCH_H | ||
10 | |||
11 | #include <linux/linkage.h> | ||
12 | |||
13 | /* | ||
14 | * Types of reference for watch_set() | ||
15 | */ | ||
16 | enum wref_type { | ||
17 | wr_save = 1, | ||
18 | wr_load = 2 | ||
19 | }; | ||
20 | |||
21 | extern asmlinkage void __watch_set(unsigned long addr, enum wref_type ref); | ||
22 | extern asmlinkage void __watch_clear(void); | ||
23 | extern asmlinkage void __watch_reenable(void); | ||
24 | |||
25 | #define watch_set(addr, ref) \ | ||
26 | if (cpu_has_watch) \ | ||
27 | __watch_set(addr, ref) | ||
28 | #define watch_clear() \ | ||
29 | if (cpu_has_watch) \ | ||
30 | __watch_clear() | ||
31 | #define watch_reenable() \ | ||
32 | if (cpu_has_watch) \ | ||
33 | __watch_reenable() | ||
34 | |||
35 | #endif /* _ASM_WATCH_H */ | ||
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/hardware.h b/include/asm-parisc/hardware.h index 76d880dc4bae..4e9626836bab 100644 --- a/include/asm-parisc/hardware.h +++ b/include/asm-parisc/hardware.h | |||
@@ -31,10 +31,11 @@ enum cpu_type { | |||
31 | pcxw = 8, /* pa8500 pa 2.0 */ | 31 | pcxw = 8, /* pa8500 pa 2.0 */ |
32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ | 32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ |
33 | pcxw2 = 10, /* pa8700 pa 2.0 */ | 33 | pcxw2 = 10, /* pa8700 pa 2.0 */ |
34 | mako = 11 /* pa8800 pa 2.0 */ | 34 | mako = 11, /* pa8800 pa 2.0 */ |
35 | mako2 = 12 /* pa8900 pa 2.0 */ | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ | 38 | extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ |
38 | 39 | ||
39 | struct parisc_driver; | 40 | struct parisc_driver; |
40 | 41 | ||
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h index 7a09d911b538..ad8cd0d069ea 100644 --- a/include/asm-parisc/linkage.h +++ b/include/asm-parisc/linkage.h | |||
@@ -8,8 +8,10 @@ | |||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * In parisc assembly a semicolon marks a comment while a | 10 | * In parisc assembly a semicolon marks a comment while a |
11 | * exclamation mark is used to seperate independend lines. | 11 | * exclamation mark is used to seperate independent lines. |
12 | */ | 12 | */ |
13 | #ifdef __ASSEMBLY__ | ||
14 | |||
13 | #define ENTRY(name) \ | 15 | #define ENTRY(name) \ |
14 | .export name !\ | 16 | .export name !\ |
15 | ALIGN !\ | 17 | ALIGN !\ |
@@ -24,5 +26,6 @@ name: | |||
24 | END(name) | 26 | END(name) |
25 | #endif | 27 | #endif |
26 | 28 | ||
29 | #endif /* __ASSEMBLY__ */ | ||
27 | 30 | ||
28 | #endif /* __ASM_PARISC_LINKAGE_H */ | 31 | #endif /* __ASM_PARISC_LINKAGE_H */ |
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/processor.h b/include/asm-parisc/processor.h index d2f396721d3e..6b294fb07a23 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc { | |||
69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ | 69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ |
70 | } pdc; | 70 | } pdc; |
71 | 71 | ||
72 | char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ | 72 | const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ |
73 | char *family_name; /* e.g. "1.1e" */ | 73 | const char *family_name; /* e.g. "1.1e" */ |
74 | }; | 74 | }; |
75 | 75 | ||
76 | 76 | ||
@@ -334,8 +334,8 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
334 | static inline int parisc_requires_coherency(void) | 334 | static inline int parisc_requires_coherency(void) |
335 | { | 335 | { |
336 | #ifdef CONFIG_PA8X00 | 336 | #ifdef CONFIG_PA8X00 |
337 | /* FIXME: also pa8900 - when we see one */ | 337 | return (boot_cpu_data.cpu_type == mako) || |
338 | return boot_cpu_data.cpu_type == mako; | 338 | (boot_cpu_data.cpu_type == mako2); |
339 | #else | 339 | #else |
340 | return 0; | 340 | return 0; |
341 | #endif | 341 | #endif |
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 7e9afa720d43..21fbfc5afd02 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -188,7 +188,6 @@ static inline void set_eiem(unsigned long val) | |||
188 | # define __lock_aligned __attribute__((__section__(".data.lock_aligned"))) | 188 | # define __lock_aligned __attribute__((__section__(".data.lock_aligned"))) |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #define KERNEL_START (0x10100000 - 0x1000) | ||
192 | #define arch_align_stack(x) (x) | 191 | #define arch_align_stack(x) (x) |
193 | 192 | ||
194 | #endif | 193 | #endif |
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-parisc/unistd.h b/include/asm-parisc/unistd.h index 2f7c40861c91..f74099bdca3c 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -792,8 +792,19 @@ | |||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | 792 | #define __NR_epoll_pwait (__NR_Linux + 297) |
793 | #define __NR_statfs64 (__NR_Linux + 298) | 793 | #define __NR_statfs64 (__NR_Linux + 298) |
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | 794 | #define __NR_fstatfs64 (__NR_Linux + 299) |
795 | #define __NR_kexec_load (__NR_Linux + 300) | ||
796 | #define __NR_utimensat (__NR_Linux + 301) | ||
797 | #define __NR_signalfd (__NR_Linux + 302) | ||
798 | #define __NR_timerfd (__NR_Linux + 303) | ||
799 | #define __NR_eventfd (__NR_Linux + 304) | ||
800 | |||
801 | #define __NR_Linux_syscalls (__NR_eventfd + 1) | ||
802 | |||
803 | |||
804 | #define __IGNORE_select /* newselect */ | ||
805 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | ||
806 | #define __IGNORE_utimes /* utime */ | ||
795 | 807 | ||
796 | #define __NR_Linux_syscalls (__NR_fstatfs64 + 1) | ||
797 | 808 | ||
798 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 809 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
799 | #define LINUX_GATEWAY_ADDR 0x100 | 810 | #define LINUX_GATEWAY_ADDR 0x100 |
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/irq.h b/include/asm-powerpc/irq.h index 4734cc178db5..05dd5a3eb3aa 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -138,10 +138,7 @@ struct irq_map_entry { | |||
138 | 138 | ||
139 | extern struct irq_map_entry irq_map[NR_IRQS]; | 139 | extern struct irq_map_entry irq_map[NR_IRQS]; |
140 | 140 | ||
141 | static inline irq_hw_number_t virq_to_hw(unsigned int virq) | 141 | extern irq_hw_number_t virq_to_hw(unsigned int virq); |
142 | { | ||
143 | return irq_map[virq].hwirq; | ||
144 | } | ||
145 | 142 | ||
146 | /** | 143 | /** |
147 | * irq_alloc_host - Allocate a new irq_host data structure | 144 | * irq_alloc_host - Allocate a new irq_host data structure |
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 c863bdb2889c..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) { |
@@ -673,10 +663,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
673 | } | 663 | } |
674 | 664 | ||
675 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 665 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
676 | do { \ | 666 | ({ \ |
677 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 667 | int __changed = !pte_same(*(__ptep), __entry); \ |
678 | flush_tlb_page_nohash(__vma, __address); \ | 668 | if (__changed) { \ |
679 | } while(0) | 669 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
670 | flush_tlb_page_nohash(__vma, __address); \ | ||
671 | } \ | ||
672 | __changed; \ | ||
673 | }) | ||
680 | 674 | ||
681 | /* | 675 | /* |
682 | * Macro to mark a page protection value as "uncacheable". | 676 | * Macro to mark a page protection value as "uncacheable". |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 704c4e669fe0..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) { |
@@ -413,10 +403,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
413 | :"cc"); | 403 | :"cc"); |
414 | } | 404 | } |
415 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 405 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
416 | do { \ | 406 | ({ \ |
417 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 407 | int __changed = !pte_same(*(__ptep), __entry); \ |
418 | flush_tlb_page_nohash(__vma, __address); \ | 408 | if (__changed) { \ |
419 | } while(0) | 409 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
410 | flush_tlb_page_nohash(__vma, __address); \ | ||
411 | } \ | ||
412 | __changed; \ | ||
413 | }) | ||
420 | 414 | ||
421 | /* | 415 | /* |
422 | * Macro to mark a page protection value as "uncacheable". | 416 | * Macro to mark a page protection value as "uncacheable". |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 700ca5928741..1cc3f9cb6f4e 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -311,3 +311,4 @@ COMPAT_SYS_SPU(utimensat) | |||
311 | COMPAT_SYS_SPU(signalfd) | 311 | COMPAT_SYS_SPU(signalfd) |
312 | COMPAT_SYS_SPU(timerfd) | 312 | COMPAT_SYS_SPU(timerfd) |
313 | SYSCALL_SPU(eventfd) | 313 | SYSCALL_SPU(eventfd) |
314 | COMPAT_SYS_SPU(sync_file_range2) | ||
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index e3c28dc31abf..f71c6061f1ec 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -330,10 +330,11 @@ | |||
330 | #define __NR_signalfd 305 | 330 | #define __NR_signalfd 305 |
331 | #define __NR_timerfd 306 | 331 | #define __NR_timerfd 306 |
332 | #define __NR_eventfd 307 | 332 | #define __NR_eventfd 307 |
333 | #define __NR_sync_file_range2 308 | ||
333 | 334 | ||
334 | #ifdef __KERNEL__ | 335 | #ifdef __KERNEL__ |
335 | 336 | ||
336 | #define __NR_syscalls 308 | 337 | #define __NR_syscalls 309 |
337 | 338 | ||
338 | #define __NR__exit __NR_exit | 339 | #define __NR__exit __NR_exit |
339 | #define NR_syscalls __NR_syscalls | 340 | #define NR_syscalls __NR_syscalls |
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 bed452d4a5f0..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) { |
@@ -694,10 +684,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
694 | } | 684 | } |
695 | 685 | ||
696 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 686 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
697 | do { \ | 687 | ({ \ |
698 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 688 | int __changed = !pte_same(*(__ptep), __entry); \ |
699 | flush_tlb_page_nohash(__vma, __address); \ | 689 | if (__changed) { \ |
700 | } while(0) | 690 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
691 | flush_tlb_page_nohash(__vma, __address); \ | ||
692 | } \ | ||
693 | __changed; \ | ||
694 | }) | ||
701 | 695 | ||
702 | /* | 696 | /* |
703 | * Macro to mark a page protection value as "uncacheable". | 697 | * Macro to mark a page protection value as "uncacheable". |
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index c17bdbf22067..ea486952f778 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | typedef struct { | 26 | typedef struct { |
27 | volatile int counter; | 27 | int counter; |
28 | } __attribute__ ((aligned (4))) atomic_t; | 28 | } __attribute__ ((aligned (4))) atomic_t; |
29 | #define ATOMIC_INIT(i) { (i) } | 29 | #define ATOMIC_INIT(i) { (i) } |
30 | 30 | ||
@@ -141,7 +141,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
141 | 141 | ||
142 | #ifdef __s390x__ | 142 | #ifdef __s390x__ |
143 | typedef struct { | 143 | typedef struct { |
144 | volatile long long counter; | 144 | long long counter; |
145 | } __attribute__ ((aligned (8))) atomic64_t; | 145 | } __attribute__ ((aligned (8))) atomic64_t; |
146 | #define ATOMIC64_INIT(i) { (i) } | 146 | #define ATOMIC64_INIT(i) { (i) } |
147 | 147 | ||
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h index 241756f80df3..021e7c3223ec 100644 --- a/include/asm-s390/cmb.h +++ b/include/asm-s390/cmb.h | |||
@@ -88,7 +88,6 @@ extern u64 cmf_read(struct ccw_device *cdev, int index); | |||
88 | * any | 88 | * any |
89 | **/ | 89 | **/ |
90 | extern int cmf_readall(struct ccw_device *cdev, struct cmbdata*data); | 90 | extern int cmf_readall(struct ccw_device *cdev, struct cmbdata*data); |
91 | extern void cmf_reset(struct ccw_device *cdev); | ||
92 | 91 | ||
93 | #endif /* __KERNEL__ */ | 92 | #endif /* __KERNEL__ */ |
94 | #endif /* S390_CMB_H */ | 93 | #endif /* S390_CMB_H */ |
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 8fe8d42e64c3..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 | */ |
@@ -744,7 +736,12 @@ ptep_establish(struct vm_area_struct *vma, | |||
744 | } | 736 | } |
745 | 737 | ||
746 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 738 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
747 | ptep_establish(__vma, __address, __ptep, __entry) | 739 | ({ \ |
740 | int __changed = !pte_same(*(__ptep), __entry); \ | ||
741 | if (__changed) \ | ||
742 | ptep_establish(__vma, __address, __ptep, __entry); \ | ||
743 | __changed; \ | ||
744 | }) | ||
748 | 745 | ||
749 | /* | 746 | /* |
750 | * Test and clear dirty bit in storage key. | 747 | * Test and clear dirty bit in storage key. |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index e0fcea8c64c3..3b972d4c6b29 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -216,6 +216,11 @@ static inline void cpu_relax(void) | |||
216 | barrier(); | 216 | barrier(); |
217 | } | 217 | } |
218 | 218 | ||
219 | static inline void psw_set_key(unsigned int key) | ||
220 | { | ||
221 | asm volatile("spka 0(%0)" : : "d" (key)); | ||
222 | } | ||
223 | |||
219 | /* | 224 | /* |
220 | * Set PSW to specified value. | 225 | * Set PSW to specified value. |
221 | */ | 226 | */ |
@@ -352,8 +357,8 @@ extern void (*s390_base_ext_handler_fn)(void); | |||
352 | /* | 357 | /* |
353 | * CPU idle notifier chain. | 358 | * CPU idle notifier chain. |
354 | */ | 359 | */ |
355 | #define CPU_IDLE 0 | 360 | #define S390_CPU_IDLE 0 |
356 | #define CPU_NOT_IDLE 1 | 361 | #define S390_CPU_NOT_IDLE 1 |
357 | 362 | ||
358 | struct notifier_block; | 363 | struct notifier_block; |
359 | int register_idle_notifier(struct notifier_block *nb); | 364 | int register_idle_notifier(struct notifier_block *nb); |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index fa6ca87080e8..332ee73688fc 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -470,14 +470,7 @@ struct user_regs_struct | |||
470 | #define regs_return_value(regs)((regs)->gprs[2]) | 470 | #define regs_return_value(regs)((regs)->gprs[2]) |
471 | #define profile_pc(regs) instruction_pointer(regs) | 471 | #define profile_pc(regs) instruction_pointer(regs) |
472 | extern void show_regs(struct pt_regs * regs); | 472 | extern void show_regs(struct pt_regs * regs); |
473 | #endif | 473 | #endif /* __KERNEL__ */ |
474 | |||
475 | static inline void | ||
476 | psw_set_key(unsigned int key) | ||
477 | { | ||
478 | asm volatile("spka 0(%0)" : : "d" (key)); | ||
479 | } | ||
480 | |||
481 | #endif /* __ASSEMBLY__ */ | 474 | #endif /* __ASSEMBLY__ */ |
482 | 475 | ||
483 | #endif /* _S390_PTRACE_H */ | 476 | #endif /* _S390_PTRACE_H */ |
diff --git a/include/asm-s390/sclp.h b/include/asm-s390/sclp.h index 21ed64773210..cb9faf1ea5cf 100644 --- a/include/asm-s390/sclp.h +++ b/include/asm-s390/sclp.h | |||
@@ -11,29 +11,6 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <asm/chpid.h> | 12 | #include <asm/chpid.h> |
13 | 13 | ||
14 | struct sccb_header { | ||
15 | u16 length; | ||
16 | u8 function_code; | ||
17 | u8 control_mask[3]; | ||
18 | u16 response_code; | ||
19 | } __attribute__((packed)); | ||
20 | |||
21 | #define LOADPARM_LEN 8 | ||
22 | |||
23 | struct sclp_readinfo_sccb { | ||
24 | struct sccb_header header; /* 0-7 */ | ||
25 | u16 rnmax; /* 8-9 */ | ||
26 | u8 rnsize; /* 10 */ | ||
27 | u8 _reserved0[24 - 11]; /* 11-23 */ | ||
28 | u8 loadparm[LOADPARM_LEN]; /* 24-31 */ | ||
29 | u8 _reserved1[91 - 32]; /* 32-90 */ | ||
30 | u8 flags; /* 91 */ | ||
31 | u8 _reserved2[100 - 92]; /* 92-99 */ | ||
32 | u32 rnsize2; /* 100-103 */ | ||
33 | u64 rnmax2; /* 104-111 */ | ||
34 | u8 _reserved3[4096 - 112]; /* 112-4095 */ | ||
35 | } __attribute__((packed, aligned(4096))); | ||
36 | |||
37 | #define SCLP_CHP_INFO_MASK_SIZE 32 | 14 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
38 | 15 | ||
39 | struct sclp_chp_info { | 16 | struct sclp_chp_info { |
@@ -42,12 +19,22 @@ struct sclp_chp_info { | |||
42 | u8 configured[SCLP_CHP_INFO_MASK_SIZE]; | 19 | u8 configured[SCLP_CHP_INFO_MASK_SIZE]; |
43 | }; | 20 | }; |
44 | 21 | ||
45 | extern struct sclp_readinfo_sccb s390_readinfo_sccb; | 22 | #define LOADPARM_LEN 8 |
46 | extern void sclp_readinfo_early(void); | 23 | |
47 | extern int sclp_sdias_blk_count(void); | 24 | struct sclp_ipl_info { |
48 | extern int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | 25 | int is_valid; |
49 | extern int sclp_chp_configure(struct chp_id chpid); | 26 | int has_dump; |
50 | extern int sclp_chp_deconfigure(struct chp_id chpid); | 27 | char loadparm[LOADPARM_LEN]; |
51 | extern int sclp_chp_read_info(struct sclp_chp_info *info); | 28 | }; |
29 | |||
30 | void sclp_readinfo_early(void); | ||
31 | void sclp_facilities_detect(void); | ||
32 | unsigned long long sclp_memory_detect(void); | ||
33 | int sclp_sdias_blk_count(void); | ||
34 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | ||
35 | int sclp_chp_configure(struct chp_id chpid); | ||
36 | int sclp_chp_deconfigure(struct chp_id chpid); | ||
37 | int sclp_chp_read_info(struct sclp_chp_info *info); | ||
38 | void sclp_get_ipl_info(struct sclp_ipl_info *info); | ||
52 | 39 | ||
53 | #endif /* _ASM_S390_SCLP_H */ | 40 | #endif /* _ASM_S390_SCLP_H */ |
diff --git a/include/asm-s390/sfp-machine.h b/include/asm-s390/sfp-machine.h index 8ca8c77b2d04..4e16aede4b06 100644 --- a/include/asm-s390/sfp-machine.h +++ b/include/asm-s390/sfp-machine.h | |||
@@ -27,9 +27,9 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | #define _FP_W_TYPE_SIZE 32 | 29 | #define _FP_W_TYPE_SIZE 32 |
30 | #define _FP_W_TYPE unsigned long | 30 | #define _FP_W_TYPE unsigned int |
31 | #define _FP_WS_TYPE signed long | 31 | #define _FP_WS_TYPE signed int |
32 | #define _FP_I_TYPE long | 32 | #define _FP_I_TYPE int |
33 | 33 | ||
34 | #define _FP_MUL_MEAT_S(R,X,Y) \ | 34 | #define _FP_MUL_MEAT_S(R,X,Y) \ |
35 | _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) | 35 | _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) |
diff --git a/include/asm-s390/sfp-util.h b/include/asm-s390/sfp-util.h index 8cabcd23d976..0addc6466d95 100644 --- a/include/asm-s390/sfp-util.h +++ b/include/asm-s390/sfp-util.h | |||
@@ -51,6 +51,16 @@ | |||
51 | wl = __wl; \ | 51 | wl = __wl; \ |
52 | }) | 52 | }) |
53 | 53 | ||
54 | #ifdef __s390x__ | ||
55 | #define udiv_qrnnd(q, r, n1, n0, d) \ | ||
56 | do { unsigned long __n; \ | ||
57 | unsigned int __r, __d; \ | ||
58 | __n = ((unsigned long)(n1) << 32) + n0; \ | ||
59 | __d = (d); \ | ||
60 | (q) = __n / __d; \ | ||
61 | (r) = __n % __d; \ | ||
62 | } while (0) | ||
63 | #else | ||
54 | #define udiv_qrnnd(q, r, n1, n0, d) \ | 64 | #define udiv_qrnnd(q, r, n1, n0, d) \ |
55 | do { unsigned int __r; \ | 65 | do { unsigned int __r; \ |
56 | (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ | 66 | (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ |
@@ -58,6 +68,7 @@ | |||
58 | } while (0) | 68 | } while (0) |
59 | extern unsigned long __udiv_qrnnd (unsigned int *, unsigned int, | 69 | extern unsigned long __udiv_qrnnd (unsigned int *, unsigned int, |
60 | unsigned int , unsigned int); | 70 | unsigned int , unsigned int); |
71 | #endif | ||
61 | 72 | ||
62 | #define UDIV_NEEDS_NORMALIZATION 0 | 73 | #define UDIV_NEEDS_NORMALIZATION 0 |
63 | 74 | ||
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/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/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-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 4f0a5ba0d6a0..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) |
@@ -446,6 +444,17 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, | |||
446 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) | 444 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) |
447 | #define GET_PFN(pfn) (pfn & 0x0fffffffUL) | 445 | #define GET_PFN(pfn) (pfn & 0x0fffffffUL) |
448 | 446 | ||
447 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | ||
448 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | ||
449 | ({ \ | ||
450 | int __changed = !pte_same(*(__ptep), __entry); \ | ||
451 | if (__changed) { \ | ||
452 | set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ | ||
453 | flush_tlb_page(__vma, __address); \ | ||
454 | } \ | ||
455 | (sparc_cpu_model == sun4c) || __changed; \ | ||
456 | }) | ||
457 | |||
449 | #include <asm-generic/pgtable.h> | 458 | #include <asm-generic/pgtable.h> |
450 | 459 | ||
451 | #endif /* !(__ASSEMBLY__) */ | 460 | #endif /* !(__ASSEMBLY__) */ |
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/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 4e21c2f3065c..c58ec1661df8 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -15,8 +15,7 @@ | |||
15 | static inline int | 15 | static inline int |
16 | dma_supported(struct device *dev, u64 mask) | 16 | dma_supported(struct device *dev, u64 mask) |
17 | { | 17 | { |
18 | BUG_ON(dev->bus != &pci_bus_type && | 18 | BUG_ON(dev->bus != &pci_bus_type); |
19 | dev->bus != &ebus_bus_type); | ||
20 | 19 | ||
21 | return pci_dma_supported(to_pci_dev(dev), mask); | 20 | return pci_dma_supported(to_pci_dev(dev), mask); |
22 | } | 21 | } |
@@ -24,8 +23,7 @@ dma_supported(struct device *dev, u64 mask) | |||
24 | static inline int | 23 | static inline int |
25 | dma_set_mask(struct device *dev, u64 dma_mask) | 24 | dma_set_mask(struct device *dev, u64 dma_mask) |
26 | { | 25 | { |
27 | BUG_ON(dev->bus != &pci_bus_type && | 26 | BUG_ON(dev->bus != &pci_bus_type); |
28 | dev->bus != &ebus_bus_type); | ||
29 | 27 | ||
30 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | 28 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); |
31 | } | 29 | } |
@@ -34,8 +32,7 @@ static inline void * | |||
34 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 32 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
35 | gfp_t flag) | 33 | gfp_t flag) |
36 | { | 34 | { |
37 | BUG_ON(dev->bus != &pci_bus_type && | 35 | BUG_ON(dev->bus != &pci_bus_type); |
38 | dev->bus != &ebus_bus_type); | ||
39 | 36 | ||
40 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); | 37 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); |
41 | } | 38 | } |
@@ -44,8 +41,7 @@ static inline void | |||
44 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 41 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
45 | dma_addr_t dma_handle) | 42 | dma_addr_t dma_handle) |
46 | { | 43 | { |
47 | BUG_ON(dev->bus != &pci_bus_type && | 44 | BUG_ON(dev->bus != &pci_bus_type); |
48 | dev->bus != &ebus_bus_type); | ||
49 | 45 | ||
50 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); | 46 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); |
51 | } | 47 | } |
@@ -54,8 +50,7 @@ static inline dma_addr_t | |||
54 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 50 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
55 | enum dma_data_direction direction) | 51 | enum dma_data_direction direction) |
56 | { | 52 | { |
57 | BUG_ON(dev->bus != &pci_bus_type && | 53 | BUG_ON(dev->bus != &pci_bus_type); |
58 | dev->bus != &ebus_bus_type); | ||
59 | 54 | ||
60 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); | 55 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); |
61 | } | 56 | } |
@@ -64,8 +59,7 @@ static inline void | |||
64 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 59 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
65 | enum dma_data_direction direction) | 60 | enum dma_data_direction direction) |
66 | { | 61 | { |
67 | BUG_ON(dev->bus != &pci_bus_type && | 62 | BUG_ON(dev->bus != &pci_bus_type); |
68 | dev->bus != &ebus_bus_type); | ||
69 | 63 | ||
70 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); | 64 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); |
71 | } | 65 | } |
@@ -75,8 +69,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
75 | unsigned long offset, size_t size, | 69 | unsigned long offset, size_t size, |
76 | enum dma_data_direction direction) | 70 | enum dma_data_direction direction) |
77 | { | 71 | { |
78 | BUG_ON(dev->bus != &pci_bus_type && | 72 | BUG_ON(dev->bus != &pci_bus_type); |
79 | dev->bus != &ebus_bus_type); | ||
80 | 73 | ||
81 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); | 74 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); |
82 | } | 75 | } |
@@ -85,8 +78,7 @@ static inline void | |||
85 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | 78 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, |
86 | enum dma_data_direction direction) | 79 | enum dma_data_direction direction) |
87 | { | 80 | { |
88 | BUG_ON(dev->bus != &pci_bus_type && | 81 | BUG_ON(dev->bus != &pci_bus_type); |
89 | dev->bus != &ebus_bus_type); | ||
90 | 82 | ||
91 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); | 83 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); |
92 | } | 84 | } |
@@ -95,8 +87,7 @@ static inline int | |||
95 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 87 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
96 | enum dma_data_direction direction) | 88 | enum dma_data_direction direction) |
97 | { | 89 | { |
98 | BUG_ON(dev->bus != &pci_bus_type && | 90 | BUG_ON(dev->bus != &pci_bus_type); |
99 | dev->bus != &ebus_bus_type); | ||
100 | 91 | ||
101 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | 92 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); |
102 | } | 93 | } |
@@ -105,8 +96,7 @@ static inline void | |||
105 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | 96 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, |
106 | enum dma_data_direction direction) | 97 | enum dma_data_direction direction) |
107 | { | 98 | { |
108 | BUG_ON(dev->bus != &pci_bus_type && | 99 | BUG_ON(dev->bus != &pci_bus_type); |
109 | dev->bus != &ebus_bus_type); | ||
110 | 100 | ||
111 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); | 101 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); |
112 | } | 102 | } |
@@ -115,8 +105,7 @@ static inline void | |||
115 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | 105 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, |
116 | enum dma_data_direction direction) | 106 | enum dma_data_direction direction) |
117 | { | 107 | { |
118 | BUG_ON(dev->bus != &pci_bus_type && | 108 | BUG_ON(dev->bus != &pci_bus_type); |
119 | dev->bus != &ebus_bus_type); | ||
120 | 109 | ||
121 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | 110 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, |
122 | size, (int)direction); | 111 | size, (int)direction); |
@@ -126,8 +115,7 @@ static inline void | |||
126 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | 115 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, |
127 | enum dma_data_direction direction) | 116 | enum dma_data_direction direction) |
128 | { | 117 | { |
129 | BUG_ON(dev->bus != &pci_bus_type && | 118 | BUG_ON(dev->bus != &pci_bus_type); |
130 | dev->bus != &ebus_bus_type); | ||
131 | 119 | ||
132 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | 120 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, |
133 | size, (int)direction); | 121 | size, (int)direction); |
@@ -137,8 +125,7 @@ static inline void | |||
137 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | 125 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, |
138 | enum dma_data_direction direction) | 126 | enum dma_data_direction direction) |
139 | { | 127 | { |
140 | BUG_ON(dev->bus != &pci_bus_type && | 128 | BUG_ON(dev->bus != &pci_bus_type); |
141 | dev->bus != &ebus_bus_type); | ||
142 | 129 | ||
143 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); | 130 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); |
144 | } | 131 | } |
@@ -147,8 +134,7 @@ static inline void | |||
147 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 134 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, |
148 | enum dma_data_direction direction) | 135 | enum dma_data_direction direction) |
149 | { | 136 | { |
150 | BUG_ON(dev->bus != &pci_bus_type && | 137 | BUG_ON(dev->bus != &pci_bus_type); |
151 | dev->bus != &ebus_bus_type); | ||
152 | 138 | ||
153 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); | 139 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); |
154 | } | 140 | } |
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h index 5c2f9d4b9f06..db2130a95d68 100644 --- a/include/asm-sparc64/hypervisor.h +++ b/include/asm-sparc64/hypervisor.h | |||
@@ -2615,8 +2615,9 @@ struct ldc_mtable_entry { | |||
2615 | /* ldc_revoke() | 2615 | /* ldc_revoke() |
2616 | * TRAP: HV_FAST_TRAP | 2616 | * TRAP: HV_FAST_TRAP |
2617 | * FUNCTION: HV_FAST_LDC_REVOKE | 2617 | * FUNCTION: HV_FAST_LDC_REVOKE |
2618 | * ARG0: cookie | 2618 | * ARG0: channel ID |
2619 | * ARG1: ldc_mtable_entry cookie | 2619 | * ARG1: cookie |
2620 | * ARG2: ldc_mtable_entry cookie | ||
2620 | * RET0: status | 2621 | * RET0: status |
2621 | */ | 2622 | */ |
2622 | #define HV_FAST_LDC_REVOKE 0xef | 2623 | #define HV_FAST_LDC_REVOKE 0xef |
@@ -2663,7 +2664,8 @@ extern unsigned long sun4v_ldc_mapin(unsigned long channel, | |||
2663 | unsigned long *ra, | 2664 | unsigned long *ra, |
2664 | unsigned long *perm); | 2665 | unsigned long *perm); |
2665 | extern unsigned long sun4v_ldc_unmap(unsigned long ra); | 2666 | extern unsigned long sun4v_ldc_unmap(unsigned long ra); |
2666 | extern unsigned long sun4v_ldc_revoke(unsigned long cookie, | 2667 | extern unsigned long sun4v_ldc_revoke(unsigned long channel, |
2668 | unsigned long cookie, | ||
2667 | unsigned long mte_cookie); | 2669 | unsigned long mte_cookie); |
2668 | #endif | 2670 | #endif |
2669 | 2671 | ||
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 5d233b42fe13..90781e34a95c 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -46,6 +46,7 @@ extern void irq_install_pre_handler(int virt_irq, | |||
46 | #define irq_canonicalize(irq) (irq) | 46 | #define irq_canonicalize(irq) (irq) |
47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); | 47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); |
48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); | 48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); |
49 | extern unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino); | ||
49 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | 50 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, |
50 | unsigned int msi_devino_start, | 51 | unsigned int msi_devino_start, |
51 | unsigned int msi_devino_end); | 52 | unsigned int msi_devino_end); |
diff --git a/include/asm-sparc64/mdesc.h b/include/asm-sparc64/mdesc.h index 124eb8ca2378..c6383982b53d 100644 --- a/include/asm-sparc64/mdesc.h +++ b/include/asm-sparc64/mdesc.h | |||
@@ -15,6 +15,7 @@ struct mdesc_node { | |||
15 | u64 node; | 15 | u64 node; |
16 | unsigned int unique_id; | 16 | unsigned int unique_id; |
17 | unsigned int num_arcs; | 17 | unsigned int num_arcs; |
18 | unsigned int irqs[2]; | ||
18 | struct property *properties; | 19 | struct property *properties; |
19 | struct mdesc_node *hash_next; | 20 | struct mdesc_node *hash_next; |
20 | struct mdesc_node *allnodes_next; | 21 | struct mdesc_node *allnodes_next; |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 6340a5253a34..23cc63f049a8 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -145,7 +145,7 @@ static int parport_isa_probe(int count) | |||
145 | */ | 145 | */ |
146 | if (parport_pc_probe_port(base, base + 0x400, | 146 | if (parport_pc_probe_port(base, base + 0x400, |
147 | child->irq, PARPORT_DMA_NOFIFO, | 147 | child->irq, PARPORT_DMA_NOFIFO, |
148 | child->bus->self)) | 148 | &child->bus->self->dev)) |
149 | count++; | 149 | count++; |
150 | } | 150 | } |
151 | } | 151 | } |
@@ -199,7 +199,8 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma) | |||
199 | 199 | ||
200 | if (parport_pc_probe_port(base, base + 0x400, | 200 | if (parport_pc_probe_port(base, base + 0x400, |
201 | edev->irqs[0], | 201 | edev->irqs[0], |
202 | count, ebus->self)) | 202 | count, |
203 | &ebus->self->dev)) | ||
203 | count++; | 204 | count++; |
204 | } | 205 | } |
205 | } | 206 | } |
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/tlb.h b/include/asm-sparc64/tlb.h index 7af1e1109c49..349d1d3e9c27 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SPARC64_TLB_H | 2 | #define _SPARC64_TLB_H |
3 | 3 | ||
4 | #include <linux/swap.h> | 4 | #include <linux/swap.h> |
5 | #include <linux/pagemap.h> | ||
5 | #include <asm/pgalloc.h> | 6 | #include <asm/pgalloc.h> |
6 | #include <asm/tlbflush.h> | 7 | #include <asm/tlbflush.h> |
7 | #include <asm/mmu_context.h> | 8 | #include <asm/mmu_context.h> |
diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h index 50cee7b296f4..7016b893ac9d 100644 --- a/include/asm-um/a.out.h +++ b/include/asm-um/a.out.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include "choose-mode.h" | 5 | #include "choose-mode.h" |
6 | 6 | ||
7 | #undef STACK_TOP | 7 | #undef STACK_TOP |
8 | #undef STACK_TOP_MAX | ||
8 | 9 | ||
9 | extern unsigned long stacksizelim; | 10 | extern unsigned long stacksizelim; |
10 | 11 | ||
diff --git a/include/asm-um/bug.h b/include/asm-um/bug.h index 3357c5e2468e..9e33b864c359 100644 --- a/include/asm-um/bug.h +++ b/include/asm-um/bug.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef __UM_BUG_H | 1 | #ifndef __UM_BUG_H |
2 | #define __UM_BUG_H | 2 | #define __UM_BUG_H |
3 | 3 | ||
4 | #include <asm/arch/bug.h> | 4 | #include <asm-generic/bug.h> |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index f5de80c31e88..e3f010bd12b3 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S | |||
@@ -20,6 +20,8 @@ | |||
20 | __ex_table : { *(__ex_table) } | 20 | __ex_table : { *(__ex_table) } |
21 | __stop___ex_table = .; | 21 | __stop___ex_table = .; |
22 | 22 | ||
23 | BUG_TABLE | ||
24 | |||
23 | __uml_setup_start = .; | 25 | __uml_setup_start = .; |
24 | .uml.setup.init : { *(.uml.setup.init) } | 26 | .uml.setup.init : { *(.uml.setup.init) } |
25 | __uml_setup_end = .; | 27 | __uml_setup_end = .; |
diff --git a/include/asm-um/paravirt.h b/include/asm-um/paravirt.h new file mode 100644 index 000000000000..9d6aaad80b5f --- /dev/null +++ b/include/asm-um/paravirt.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_PARAVIRT_H | ||
2 | #define __UM_PARAVIRT_H | ||
3 | |||
4 | #include "asm/arch/paravirt.h" | ||
5 | |||
6 | #endif | ||
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 08b9831f2e14..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; } |
@@ -395,12 +389,14 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
395 | * bit at the same time. */ | 389 | * bit at the same time. */ |
396 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 390 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
397 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 391 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
398 | do { \ | 392 | ({ \ |
399 | if (__dirty) { \ | 393 | int __changed = !pte_same(*(__ptep), __entry); \ |
400 | set_pte(__ptep, __entry); \ | 394 | if (__changed && __dirty) { \ |
401 | flush_tlb_page(__vma, __address); \ | 395 | set_pte(__ptep, __entry); \ |
402 | } \ | 396 | flush_tlb_page(__vma, __address); \ |
403 | } while (0) | 397 | } \ |
398 | __changed; \ | ||
399 | }) | ||
404 | 400 | ||
405 | /* Encode and de-code a swap entry */ | 401 | /* Encode and de-code a swap entry */ |
406 | #define __swp_type(x) (((x).val >> 1) & 0x3f) | 402 | #define __swp_type(x) (((x).val >> 1) & 0x3f) |
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-x86_64/unistd.h b/include/asm-x86_64/unistd.h index ae1ed05f2814..8696f8ad401e 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -626,9 +626,9 @@ __SYSCALL(__NR_utimensat, sys_utimensat) | |||
626 | __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) | 626 | __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) |
627 | #define __NR_signalfd 282 | 627 | #define __NR_signalfd 282 |
628 | __SYSCALL(__NR_signalfd, sys_signalfd) | 628 | __SYSCALL(__NR_signalfd, sys_signalfd) |
629 | #define __NR_timerfd 282 | 629 | #define __NR_timerfd 283 |
630 | __SYSCALL(__NR_timerfd, sys_timerfd) | 630 | __SYSCALL(__NR_timerfd, sys_timerfd) |
631 | #define __NR_eventfd 283 | 631 | #define __NR_eventfd 284 |
632 | __SYSCALL(__NR_eventfd, sys_eventfd) | 632 | __SYSCALL(__NR_eventfd, sys_eventfd) |
633 | 633 | ||
634 | #ifndef __NO_STUBS | 634 | #ifndef __NO_STUBS |
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 f317c270d4bf..bcf875e844fe 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -49,6 +49,7 @@ header-y += consolemap.h | |||
49 | header-y += const.h | 49 | header-y += const.h |
50 | header-y += cycx_cfm.h | 50 | header-y += cycx_cfm.h |
51 | header-y += dlm_device.h | 51 | header-y += dlm_device.h |
52 | header-y += dlm_netlink.h | ||
52 | header-y += dm-ioctl.h | 53 | header-y += dm-ioctl.h |
53 | header-y += dn.h | 54 | header-y += dn.h |
54 | header-y += dqblk_v1.h | 55 | header-y += dqblk_v1.h |
@@ -90,7 +91,6 @@ header-y += in6.h | |||
90 | header-y += in_route.h | 91 | header-y += in_route.h |
91 | header-y += ioctl.h | 92 | header-y += ioctl.h |
92 | header-y += ipmi_msgdefs.h | 93 | header-y += ipmi_msgdefs.h |
93 | header-y += ip_mp_alg.h | ||
94 | header-y += ipsec.h | 94 | header-y += ipsec.h |
95 | header-y += ipx.h | 95 | header-y += ipx.h |
96 | header-y += irda.h | 96 | header-y += irda.h |
@@ -225,6 +225,7 @@ unifdef-y += if_fddi.h | |||
225 | unifdef-y += if_frad.h | 225 | unifdef-y += if_frad.h |
226 | unifdef-y += if_ltalk.h | 226 | unifdef-y += if_ltalk.h |
227 | unifdef-y += if_link.h | 227 | unifdef-y += if_link.h |
228 | unifdef-y += if_pppol2tp.h | ||
228 | unifdef-y += if_pppox.h | 229 | unifdef-y += if_pppox.h |
229 | unifdef-y += if_shaper.h | 230 | unifdef-y += if_shaper.h |
230 | unifdef-y += if_tr.h | 231 | unifdef-y += if_tr.h |
@@ -246,7 +247,6 @@ unifdef-y += isdn.h | |||
246 | unifdef-y += isdnif.h | 247 | unifdef-y += isdnif.h |
247 | unifdef-y += isdn_divertif.h | 248 | unifdef-y += isdn_divertif.h |
248 | unifdef-y += isdn_ppp.h | 249 | unifdef-y += isdn_ppp.h |
249 | unifdef-y += isicom.h | ||
250 | unifdef-y += jbd.h | 250 | unifdef-y += jbd.h |
251 | unifdef-y += joystick.h | 251 | unifdef-y += joystick.h |
252 | 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 edb31bfff68f..b5a20162af32 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -126,6 +126,7 @@ enum { | |||
126 | ATA_REG_IRQ = ATA_REG_NSECT, | 126 | ATA_REG_IRQ = ATA_REG_NSECT, |
127 | 127 | ||
128 | /* ATA device commands */ | 128 | /* ATA device commands */ |
129 | ATA_CMD_DEV_RESET = 0x08, /* ATAPI device reset */ | ||
129 | ATA_CMD_CHK_POWER = 0xE5, /* check power mode */ | 130 | ATA_CMD_CHK_POWER = 0xE5, /* check power mode */ |
130 | ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ | 131 | ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ |
131 | ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ | 132 | ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ |
@@ -151,6 +152,7 @@ enum { | |||
151 | ATA_CMD_WRITE_MULTI_EXT = 0x39, | 152 | ATA_CMD_WRITE_MULTI_EXT = 0x39, |
152 | ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE, | 153 | ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE, |
153 | ATA_CMD_SET_FEATURES = 0xEF, | 154 | ATA_CMD_SET_FEATURES = 0xEF, |
155 | ATA_CMD_SET_MULTI = 0xC6, | ||
154 | ATA_CMD_PACKET = 0xA0, | 156 | ATA_CMD_PACKET = 0xA0, |
155 | ATA_CMD_VERIFY = 0x40, | 157 | ATA_CMD_VERIFY = 0x40, |
156 | ATA_CMD_VERIFY_EXT = 0x42, | 158 | ATA_CMD_VERIFY_EXT = 0x42, |
@@ -162,6 +164,8 @@ enum { | |||
162 | ATA_CMD_SET_MAX = 0xF9, | 164 | ATA_CMD_SET_MAX = 0xF9, |
163 | ATA_CMD_SET_MAX_EXT = 0x37, | 165 | ATA_CMD_SET_MAX_EXT = 0x37, |
164 | 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, | ||
165 | 169 | ||
166 | /* READ_LOG_EXT pages */ | 170 | /* READ_LOG_EXT pages */ |
167 | ATA_LOG_SATA_NCQ = 0x10, | 171 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -210,6 +214,28 @@ enum { | |||
210 | 0=to device, 1=to host */ | 214 | 0=to device, 1=to host */ |
211 | ATAPI_CDB_LEN = 16, | 215 | ATAPI_CDB_LEN = 16, |
212 | 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 | |||
213 | /* cable types */ | 239 | /* cable types */ |
214 | ATA_CBL_NONE = 0, | 240 | ATA_CBL_NONE = 0, |
215 | ATA_CBL_PATA40 = 1, | 241 | ATA_CBL_PATA40 = 1, |
@@ -249,7 +275,7 @@ enum ata_tf_protocols { | |||
249 | /* ATA taskfile protocols */ | 275 | /* ATA taskfile protocols */ |
250 | ATA_PROT_UNKNOWN, /* unknown/invalid */ | 276 | ATA_PROT_UNKNOWN, /* unknown/invalid */ |
251 | ATA_PROT_NODATA, /* no data */ | 277 | ATA_PROT_NODATA, /* no data */ |
252 | ATA_PROT_PIO, /* PIO single sector */ | 278 | ATA_PROT_PIO, /* PIO data xfer */ |
253 | ATA_PROT_DMA, /* DMA */ | 279 | ATA_PROT_DMA, /* DMA */ |
254 | ATA_PROT_NCQ, /* NCQ */ | 280 | ATA_PROT_NCQ, /* NCQ */ |
255 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ | 281 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ |
@@ -416,4 +442,9 @@ static inline int lba_48_ok(u64 block, u32 n_block) | |||
416 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); | 442 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); |
417 | } | 443 | } |
418 | 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 | |||
419 | #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 db5b00a792f5..fae138bd2207 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -868,11 +868,6 @@ void kblockd_flush_work(struct work_struct *work); | |||
868 | */ | 868 | */ |
869 | #define buffer_heads_over_limit 0 | 869 | #define buffer_heads_over_limit 0 |
870 | 870 | ||
871 | static inline long blk_congestion_wait(int rw, long timeout) | ||
872 | { | ||
873 | return io_schedule_timeout(timeout); | ||
874 | } | ||
875 | |||
876 | static inline long nr_blockdev_pages(void) | 871 | static inline long nr_blockdev_pages(void) |
877 | { | 872 | { |
878 | return 0; | 873 | return 0; |
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/console_struct.h b/include/linux/console_struct.h index a461f76fb004..dc77fed7b285 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * to achieve effects such as fast scrolling by changing the origin. | 9 | * to achieve effects such as fast scrolling by changing the origin. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_CONSOLE_STRUCT_H | ||
13 | #define _LINUX_CONSOLE_STRUCT_H | ||
14 | |||
12 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 16 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
@@ -130,3 +133,5 @@ extern void vc_SAK(struct work_struct *work); | |||
130 | #define CUR_DEFAULT CUR_UNDERLINE | 133 | #define CUR_DEFAULT CUR_UNDERLINE |
131 | 134 | ||
132 | #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) | 135 | #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) |
136 | |||
137 | #endif /* _LINUX_CONSOLE_STRUCT_H */ | ||
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/dlm.h b/include/linux/dlm.h index 1b1dcb9a40bb..be9d278761e0 100644 --- a/include/linux/dlm.h +++ b/include/linux/dlm.h | |||
@@ -2,7 +2,7 @@ | |||
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5 | ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6 | ** | 6 | ** |
7 | ** This copyrighted material is made available to anyone wishing to use, | 7 | ** This copyrighted material is made available to anyone wishing to use, |
8 | ** modify, copy, or redistribute it subject to the terms and conditions | 8 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -85,7 +85,11 @@ | |||
85 | * Only relevant to locks originating in userspace. A persistent lock will not | 85 | * Only relevant to locks originating in userspace. A persistent lock will not |
86 | * be removed if the process holding the lock exits. | 86 | * be removed if the process holding the lock exits. |
87 | * | 87 | * |
88 | * DLM_LKF_NODLKWT | 88 | * DLM_LKF_NODLCKWT |
89 | * | ||
90 | * Do not cancel the lock if it gets into conversion deadlock. | ||
91 | * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN. | ||
92 | * | ||
89 | * DLM_LKF_NODLCKBLK | 93 | * DLM_LKF_NODLCKBLK |
90 | * | 94 | * |
91 | * net yet implemented | 95 | * net yet implemented |
@@ -149,6 +153,7 @@ | |||
149 | #define DLM_LKF_ALTPR 0x00008000 | 153 | #define DLM_LKF_ALTPR 0x00008000 |
150 | #define DLM_LKF_ALTCW 0x00010000 | 154 | #define DLM_LKF_ALTCW 0x00010000 |
151 | #define DLM_LKF_FORCEUNLOCK 0x00020000 | 155 | #define DLM_LKF_FORCEUNLOCK 0x00020000 |
156 | #define DLM_LKF_TIMEOUT 0x00040000 | ||
152 | 157 | ||
153 | /* | 158 | /* |
154 | * Some return codes that are not in errno.h | 159 | * Some return codes that are not in errno.h |
@@ -199,11 +204,12 @@ struct dlm_lksb { | |||
199 | char * sb_lvbptr; | 204 | char * sb_lvbptr; |
200 | }; | 205 | }; |
201 | 206 | ||
207 | #define DLM_LSFL_NODIR 0x00000001 | ||
208 | #define DLM_LSFL_TIMEWARN 0x00000002 | ||
209 | #define DLM_LSFL_FS 0x00000004 | ||
202 | 210 | ||
203 | #ifdef __KERNEL__ | 211 | #ifdef __KERNEL__ |
204 | 212 | ||
205 | #define DLM_LSFL_NODIR 0x00000001 | ||
206 | |||
207 | /* | 213 | /* |
208 | * dlm_new_lockspace | 214 | * dlm_new_lockspace |
209 | * | 215 | * |
diff --git a/include/linux/dlm_device.h b/include/linux/dlm_device.h index c2735cab2ebf..9642277a152a 100644 --- a/include/linux/dlm_device.h +++ b/include/linux/dlm_device.h | |||
@@ -2,7 +2,7 @@ | |||
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5 | ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6 | ** | 6 | ** |
7 | ** This copyrighted material is made available to anyone wishing to use, | 7 | ** This copyrighted material is made available to anyone wishing to use, |
8 | ** modify, copy, or redistribute it subject to the terms and conditions | 8 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -18,21 +18,24 @@ | |||
18 | #define DLM_USER_LVB_LEN 32 | 18 | #define DLM_USER_LVB_LEN 32 |
19 | 19 | ||
20 | /* Version of the device interface */ | 20 | /* Version of the device interface */ |
21 | #define DLM_DEVICE_VERSION_MAJOR 5 | 21 | #define DLM_DEVICE_VERSION_MAJOR 6 |
22 | #define DLM_DEVICE_VERSION_MINOR 1 | 22 | #define DLM_DEVICE_VERSION_MINOR 0 |
23 | #define DLM_DEVICE_VERSION_PATCH 0 | 23 | #define DLM_DEVICE_VERSION_PATCH 0 |
24 | 24 | ||
25 | /* struct passed to the lock write */ | 25 | /* struct passed to the lock write */ |
26 | struct dlm_lock_params { | 26 | struct dlm_lock_params { |
27 | __u8 mode; | 27 | __u8 mode; |
28 | __u8 namelen; | 28 | __u8 namelen; |
29 | __u16 flags; | 29 | __u16 unused; |
30 | __u32 flags; | ||
30 | __u32 lkid; | 31 | __u32 lkid; |
31 | __u32 parent; | 32 | __u32 parent; |
32 | void __user *castparam; | 33 | __u64 xid; |
34 | __u64 timeout; | ||
35 | void __user *castparam; | ||
33 | void __user *castaddr; | 36 | void __user *castaddr; |
34 | void __user *bastparam; | 37 | void __user *bastparam; |
35 | void __user *bastaddr; | 38 | void __user *bastaddr; |
36 | struct dlm_lksb __user *lksb; | 39 | struct dlm_lksb __user *lksb; |
37 | char lvb[DLM_USER_LVB_LEN]; | 40 | char lvb[DLM_USER_LVB_LEN]; |
38 | char name[0]; | 41 | char name[0]; |
@@ -62,9 +65,15 @@ struct dlm_write_request { | |||
62 | } i; | 65 | } i; |
63 | }; | 66 | }; |
64 | 67 | ||
68 | struct dlm_device_version { | ||
69 | __u32 version[3]; | ||
70 | }; | ||
71 | |||
65 | /* struct read from the "device" fd, | 72 | /* struct read from the "device" fd, |
66 | consists mainly of userspace pointers for the library to use */ | 73 | consists mainly of userspace pointers for the library to use */ |
74 | |||
67 | struct dlm_lock_result { | 75 | struct dlm_lock_result { |
76 | __u32 version[3]; | ||
68 | __u32 length; | 77 | __u32 length; |
69 | void __user * user_astaddr; | 78 | void __user * user_astaddr; |
70 | void __user * user_astparam; | 79 | void __user * user_astparam; |
@@ -83,6 +92,7 @@ struct dlm_lock_result { | |||
83 | #define DLM_USER_CREATE_LOCKSPACE 4 | 92 | #define DLM_USER_CREATE_LOCKSPACE 4 |
84 | #define DLM_USER_REMOVE_LOCKSPACE 5 | 93 | #define DLM_USER_REMOVE_LOCKSPACE 5 |
85 | #define DLM_USER_PURGE 6 | 94 | #define DLM_USER_PURGE 6 |
95 | #define DLM_USER_DEADLOCK 7 | ||
86 | 96 | ||
87 | /* Arbitrary length restriction */ | 97 | /* Arbitrary length restriction */ |
88 | #define MAX_LS_NAME_LEN 64 | 98 | #define MAX_LS_NAME_LEN 64 |
diff --git a/include/linux/dlm_netlink.h b/include/linux/dlm_netlink.h new file mode 100644 index 000000000000..19276332707a --- /dev/null +++ b/include/linux/dlm_netlink.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Red Hat, Inc. All rights reserved. | ||
3 | * | ||
4 | * This copyrighted material is made available to anyone wishing to use, | ||
5 | * modify, copy, or redistribute it subject to the terms and conditions | ||
6 | * of the GNU General Public License v.2. | ||
7 | */ | ||
8 | |||
9 | #ifndef _DLM_NETLINK_H | ||
10 | #define _DLM_NETLINK_H | ||
11 | |||
12 | enum { | ||
13 | DLM_STATUS_WAITING = 1, | ||
14 | DLM_STATUS_GRANTED = 2, | ||
15 | DLM_STATUS_CONVERT = 3, | ||
16 | }; | ||
17 | |||
18 | #define DLM_LOCK_DATA_VERSION 1 | ||
19 | |||
20 | struct dlm_lock_data { | ||
21 | uint16_t version; | ||
22 | uint32_t lockspace_id; | ||
23 | int nodeid; | ||
24 | int ownpid; | ||
25 | uint32_t id; | ||
26 | uint32_t remid; | ||
27 | uint64_t xid; | ||
28 | int8_t status; | ||
29 | int8_t grmode; | ||
30 | int8_t rqmode; | ||
31 | unsigned long timestamp; | ||
32 | int resource_namelen; | ||
33 | char resource_name[DLM_RESNAME_MAXLEN]; | ||
34 | }; | ||
35 | |||
36 | enum { | ||
37 | DLM_CMD_UNSPEC = 0, | ||
38 | DLM_CMD_HELLO, /* user->kernel */ | ||
39 | DLM_CMD_TIMEOUT, /* kernel->user */ | ||
40 | __DLM_CMD_MAX, | ||
41 | }; | ||
42 | |||
43 | #define DLM_CMD_MAX (__DLM_CMD_MAX - 1) | ||
44 | |||
45 | enum { | ||
46 | DLM_TYPE_UNSPEC = 0, | ||
47 | DLM_TYPE_LOCK, | ||
48 | __DLM_TYPE_MAX, | ||
49 | }; | ||
50 | |||
51 | #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1) | ||
52 | |||
53 | #define DLM_GENL_VERSION 0x1 | ||
54 | #define DLM_GENL_NAME "DLM" | ||
55 | |||
56 | #endif /* _DLM_NETLINK_H */ | ||
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/eeprom_93cx6.h b/include/linux/eeprom_93cx6.h new file mode 100644 index 000000000000..d774b7778c91 --- /dev/null +++ b/include/linux/eeprom_93cx6.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | Copyright (C) 2004 - 2006 rt2x00 SourceForge Project | ||
3 | <http://rt2x00.serialmonkey.com> | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the | ||
17 | Free Software Foundation, Inc., | ||
18 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | Module: eeprom_93cx6 | ||
23 | Abstract: EEPROM reader datastructures for 93cx6 chipsets. | ||
24 | Supported chipsets: 93c46 & 93c66. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * EEPROM operation defines. | ||
29 | */ | ||
30 | #define PCI_EEPROM_WIDTH_93C46 6 | ||
31 | #define PCI_EEPROM_WIDTH_93C66 8 | ||
32 | #define PCI_EEPROM_WIDTH_OPCODE 3 | ||
33 | #define PCI_EEPROM_WRITE_OPCODE 0x05 | ||
34 | #define PCI_EEPROM_READ_OPCODE 0x06 | ||
35 | #define PCI_EEPROM_EWDS_OPCODE 0x10 | ||
36 | #define PCI_EEPROM_EWEN_OPCODE 0x13 | ||
37 | |||
38 | /** | ||
39 | * struct eeprom_93cx6 - control structure for setting the commands | ||
40 | * for reading the eeprom data. | ||
41 | * @data: private pointer for the driver. | ||
42 | * @register_read(struct eeprom_93cx6 *eeprom): handler to | ||
43 | * read the eeprom register, this function should set all reg_* fields. | ||
44 | * @register_write(struct eeprom_93cx6 *eeprom): handler to | ||
45 | * write to the eeprom register by using all reg_* fields. | ||
46 | * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines | ||
47 | * @reg_data_in: register field to indicate data input | ||
48 | * @reg_data_out: register field to indicate data output | ||
49 | * @reg_data_clock: register field to set the data clock | ||
50 | * @reg_chip_select: register field to set the chip select | ||
51 | * | ||
52 | * This structure is used for the communication between the driver | ||
53 | * and the eeprom_93cx6 handlers for reading the eeprom. | ||
54 | */ | ||
55 | struct eeprom_93cx6 { | ||
56 | void *data; | ||
57 | |||
58 | void (*register_read)(struct eeprom_93cx6 *eeprom); | ||
59 | void (*register_write)(struct eeprom_93cx6 *eeprom); | ||
60 | |||
61 | int width; | ||
62 | |||
63 | char reg_data_in; | ||
64 | char reg_data_out; | ||
65 | char reg_data_clock; | ||
66 | char reg_chip_select; | ||
67 | }; | ||
68 | |||
69 | extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, | ||
70 | const u8 word, u16 *data); | ||
71 | extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, | ||
72 | const u8 word, __le16 *data, const u16 words); | ||
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/eventfd.h b/include/linux/eventfd.h index 0d6ecc60b94d..b489fc6d0b62 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -19,7 +19,8 @@ int eventfd_signal(struct file *file, int n); | |||
19 | #else /* CONFIG_EVENTFD */ | 19 | #else /* CONFIG_EVENTFD */ |
20 | 20 | ||
21 | #define eventfd_fget(fd) ERR_PTR(-ENOSYS) | 21 | #define eventfd_fget(fd) ERR_PTR(-ENOSYS) |
22 | #define eventfd_signal(f, n) 0 | 22 | static inline int eventfd_signal(struct file *file, int n) |
23 | { return 0; } | ||
23 | 24 | ||
24 | #endif /* CONFIG_EVENTFD */ | 25 | #endif /* CONFIG_EVENTFD */ |
25 | 26 | ||
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/firewire-cdev.h b/include/linux/firewire-cdev.h index efbe1fda1a22..1a45d6f41b09 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -30,16 +30,38 @@ | |||
30 | #define FW_CDEV_EVENT_REQUEST 0x02 | 30 | #define FW_CDEV_EVENT_REQUEST 0x02 |
31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 | 31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 |
32 | 32 | ||
33 | /* The 'closure' fields are for user space to use. Data passed in the | 33 | /** |
34 | * 'closure' field for a request will be returned in the corresponding | 34 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types |
35 | * event. It's a 64-bit type so that it's a fixed size type big | 35 | * @closure: For arbitrary use by userspace |
36 | * enough to hold a pointer on all platforms. */ | 36 | * @type: Discriminates the fw_cdev_event_ types |
37 | 37 | * | |
38 | * This struct may be used to access generic members of all fw_cdev_event_ | ||
39 | * types regardless of the specific type. | ||
40 | * | ||
41 | * Data passed in the @closure field for a request will be returned in the | ||
42 | * corresponding event. It is big enough to hold a pointer on all platforms. | ||
43 | * The ioctl used to set @closure depends on the @type of event. | ||
44 | */ | ||
38 | struct fw_cdev_event_common { | 45 | struct fw_cdev_event_common { |
39 | __u64 closure; | 46 | __u64 closure; |
40 | __u32 type; | 47 | __u32 type; |
41 | }; | 48 | }; |
42 | 49 | ||
50 | /** | ||
51 | * struct fw_cdev_event_bus_reset - Sent when a bus reset occurred | ||
52 | * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_GET_INFO ioctl | ||
53 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_BUS_RESET | ||
54 | * @node_id: New node ID of this node | ||
55 | * @local_node_id: Node ID of the local node, i.e. of the controller | ||
56 | * @bm_node_id: Node ID of the bus manager | ||
57 | * @irm_node_id: Node ID of the iso resource manager | ||
58 | * @root_node_id: Node ID of the root node | ||
59 | * @generation: New bus generation | ||
60 | * | ||
61 | * This event is sent when the bus the device belongs to goes through a bus | ||
62 | * reset. It provides information about the new bus configuration, such as | ||
63 | * new node ID for this device, new root ID, and others. | ||
64 | */ | ||
43 | struct fw_cdev_event_bus_reset { | 65 | struct fw_cdev_event_bus_reset { |
44 | __u64 closure; | 66 | __u64 closure; |
45 | __u32 type; | 67 | __u32 type; |
@@ -51,6 +73,20 @@ struct fw_cdev_event_bus_reset { | |||
51 | __u32 generation; | 73 | __u32 generation; |
52 | }; | 74 | }; |
53 | 75 | ||
76 | /** | ||
77 | * struct fw_cdev_event_response - Sent when a response packet was received | ||
78 | * @closure: See &fw_cdev_event_common; | ||
79 | * set by %FW_CDEV_IOC_SEND_REQUEST ioctl | ||
80 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE | ||
81 | * @rcode: Response code returned by the remote node | ||
82 | * @length: Data length, i.e. the response's payload size in bytes | ||
83 | * @data: Payload data, if any | ||
84 | * | ||
85 | * This event is sent when the stack receives a response to an outgoing request | ||
86 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses | ||
87 | * carrying data (read and lock responses) follows immediately and can be | ||
88 | * accessed through the @data field. | ||
89 | */ | ||
54 | struct fw_cdev_event_response { | 90 | struct fw_cdev_event_response { |
55 | __u64 closure; | 91 | __u64 closure; |
56 | __u32 type; | 92 | __u32 type; |
@@ -59,6 +95,25 @@ struct fw_cdev_event_response { | |||
59 | __u32 data[0]; | 95 | __u32 data[0]; |
60 | }; | 96 | }; |
61 | 97 | ||
98 | /** | ||
99 | * struct fw_cdev_event_request - Sent on incoming request to an address region | ||
100 | * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl | ||
101 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST | ||
102 | * @tcode: Transaction code of the incoming request | ||
103 | * @offset: The offset into the 48-bit per-node address space | ||
104 | * @handle: Reference to the kernel-side pending request | ||
105 | * @length: Data length, i.e. the request's payload size in bytes | ||
106 | * @data: Incoming data, if any | ||
107 | * | ||
108 | * This event is sent when the stack receives an incoming request to an address | ||
109 | * region registered using the %FW_CDEV_IOC_ALLOCATE ioctl. The request is | ||
110 | * guaranteed to be completely contained in the specified region. Userspace is | ||
111 | * responsible for sending the response by %FW_CDEV_IOC_SEND_RESPONSE ioctl, | ||
112 | * using the same @handle. | ||
113 | * | ||
114 | * The payload data for requests carrying data (write and lock requests) | ||
115 | * follows immediately and can be accessed through the @data field. | ||
116 | */ | ||
62 | struct fw_cdev_event_request { | 117 | struct fw_cdev_event_request { |
63 | __u64 closure; | 118 | __u64 closure; |
64 | __u32 type; | 119 | __u32 type; |
@@ -69,14 +124,39 @@ struct fw_cdev_event_request { | |||
69 | __u32 data[0]; | 124 | __u32 data[0]; |
70 | }; | 125 | }; |
71 | 126 | ||
127 | /** | ||
128 | * struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed | ||
129 | * @closure: See &fw_cdev_event_common; | ||
130 | * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl | ||
131 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT | ||
132 | * @cycle: Cycle counter of the interrupt packet | ||
133 | * @header_length: Total length of following headers, in bytes | ||
134 | * @header: Stripped headers, if any | ||
135 | * | ||
136 | * This event is sent when the controller has completed an &fw_cdev_iso_packet | ||
137 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers | ||
138 | * stripped of all packets up until and including the interrupt packet are | ||
139 | * returned in the @header field. | ||
140 | */ | ||
72 | struct fw_cdev_event_iso_interrupt { | 141 | struct fw_cdev_event_iso_interrupt { |
73 | __u64 closure; | 142 | __u64 closure; |
74 | __u32 type; | 143 | __u32 type; |
75 | __u32 cycle; | 144 | __u32 cycle; |
76 | __u32 header_length; /* Length in bytes of following headers. */ | 145 | __u32 header_length; |
77 | __u32 header[0]; | 146 | __u32 header[0]; |
78 | }; | 147 | }; |
79 | 148 | ||
149 | /** | ||
150 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types | ||
151 | * @common: Valid for all types | ||
152 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET | ||
153 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE | ||
154 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST | ||
155 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT | ||
156 | * | ||
157 | * Convenience union for userspace use. Events could be read(2) into a char | ||
158 | * buffer and then cast to this union for further processing. | ||
159 | */ | ||
80 | union fw_cdev_event { | 160 | union fw_cdev_event { |
81 | struct fw_cdev_event_common common; | 161 | struct fw_cdev_event_common common; |
82 | struct fw_cdev_event_bus_reset bus_reset; | 162 | struct fw_cdev_event_bus_reset bus_reset; |
@@ -105,35 +185,47 @@ union fw_cdev_event { | |||
105 | */ | 185 | */ |
106 | #define FW_CDEV_VERSION 1 | 186 | #define FW_CDEV_VERSION 1 |
107 | 187 | ||
188 | /** | ||
189 | * struct fw_cdev_get_info - General purpose information ioctl | ||
190 | * @version: The version field is just a running serial number. | ||
191 | * We never break backwards compatibility, but may add more | ||
192 | * structs and ioctls in later revisions. | ||
193 | * @rom_length: If @rom is non-zero, at most rom_length bytes of configuration | ||
194 | * ROM will be copied into that user space address. In either | ||
195 | * case, @rom_length is updated with the actual length of the | ||
196 | * configuration ROM. | ||
197 | * @rom: If non-zero, address of a buffer to be filled by a copy of the | ||
198 | * local node's configuration ROM | ||
199 | * @bus_reset: If non-zero, address of a buffer to be filled by a | ||
200 | * &struct fw_cdev_event_bus_reset with the current state | ||
201 | * of the bus. This does not cause a bus reset to happen. | ||
202 | * @bus_reset_closure: Value of &closure in this and subsequent bus reset events | ||
203 | * @card: The index of the card this device belongs to | ||
204 | */ | ||
108 | struct fw_cdev_get_info { | 205 | struct fw_cdev_get_info { |
109 | /* The version field is just a running serial number. We | ||
110 | * never break backwards compatibility. Userspace passes in | ||
111 | * the version it expects and the kernel passes back the | ||
112 | * highest version it can provide. Even if the structs in | ||
113 | * this interface are extended in a later version, the kernel | ||
114 | * will not copy back more data than what was present in the | ||
115 | * interface version userspace expects. */ | ||
116 | __u32 version; | 206 | __u32 version; |
117 | |||
118 | /* If non-zero, at most rom_length bytes of config rom will be | ||
119 | * copied into that user space address. In either case, | ||
120 | * rom_length is updated with the actual length of the config | ||
121 | * rom. */ | ||
122 | __u32 rom_length; | 207 | __u32 rom_length; |
123 | __u64 rom; | 208 | __u64 rom; |
124 | |||
125 | /* If non-zero, a fw_cdev_event_bus_reset struct will be | ||
126 | * copied here with the current state of the bus. This does | ||
127 | * not cause a bus reset to happen. The value of closure in | ||
128 | * this and sub-sequent bus reset events is set to | ||
129 | * bus_reset_closure. */ | ||
130 | __u64 bus_reset; | 209 | __u64 bus_reset; |
131 | __u64 bus_reset_closure; | 210 | __u64 bus_reset_closure; |
132 | |||
133 | /* The index of the card this devices belongs to. */ | ||
134 | __u32 card; | 211 | __u32 card; |
135 | }; | 212 | }; |
136 | 213 | ||
214 | /** | ||
215 | * struct fw_cdev_send_request - Send an asynchronous request packet | ||
216 | * @tcode: Transaction code of the request | ||
217 | * @length: Length of outgoing payload, in bytes | ||
218 | * @offset: 48-bit offset at destination node | ||
219 | * @closure: Passed back to userspace in the response event | ||
220 | * @data: Userspace pointer to payload | ||
221 | * @generation: The bus generation where packet is valid | ||
222 | * | ||
223 | * Send a request to the device. This ioctl implements all outgoing requests. | ||
224 | * Both quadlet and block request specify the payload as a pointer to the data | ||
225 | * in the @data field. Once the transaction completes, the kernel writes an | ||
226 | * &fw_cdev_event_request event back. The @closure field is passed back to | ||
227 | * user space in the response event. | ||
228 | */ | ||
137 | struct fw_cdev_send_request { | 229 | struct fw_cdev_send_request { |
138 | __u32 tcode; | 230 | __u32 tcode; |
139 | __u32 length; | 231 | __u32 length; |
@@ -143,6 +235,19 @@ struct fw_cdev_send_request { | |||
143 | __u32 generation; | 235 | __u32 generation; |
144 | }; | 236 | }; |
145 | 237 | ||
238 | /** | ||
239 | * struct fw_cdev_send_response - Send an asynchronous response packet | ||
240 | * @rcode: Response code as determined by the userspace handler | ||
241 | * @length: Length of outgoing payload, in bytes | ||
242 | * @data: Userspace pointer to payload | ||
243 | * @handle: The handle from the &fw_cdev_event_request | ||
244 | * | ||
245 | * Send a response to an incoming request. By setting up an address range using | ||
246 | * the %FW_CDEV_IOC_ALLOCATE ioctl, userspace can listen for incoming requests. An | ||
247 | * incoming request will generate an %FW_CDEV_EVENT_REQUEST, and userspace must | ||
248 | * send a reply using this ioctl. The event has a handle to the kernel-side | ||
249 | * pending transaction, which should be used with this ioctl. | ||
250 | */ | ||
146 | struct fw_cdev_send_response { | 251 | struct fw_cdev_send_response { |
147 | __u32 rcode; | 252 | __u32 rcode; |
148 | __u32 length; | 253 | __u32 length; |
@@ -150,6 +255,21 @@ struct fw_cdev_send_response { | |||
150 | __u32 handle; | 255 | __u32 handle; |
151 | }; | 256 | }; |
152 | 257 | ||
258 | /** | ||
259 | * struct fw_cdev_allocate - Allocate a CSR address range | ||
260 | * @offset: Start offset of the address range | ||
261 | * @closure: To be passed back to userspace in request events | ||
262 | * @length: Length of the address range, in bytes | ||
263 | * @handle: Handle to the allocation, written by the kernel | ||
264 | * | ||
265 | * Allocate an address range in the 48-bit address space on the local node | ||
266 | * (the controller). This allows userspace to listen for requests with an | ||
267 | * offset within that address range. When the kernel receives a request | ||
268 | * within the range, an &fw_cdev_event_request event will be written back. | ||
269 | * The @closure field is passed back to userspace in the response event. | ||
270 | * The @handle field is an out parameter, returning a handle to the allocated | ||
271 | * range to be used for later deallocation of the range. | ||
272 | */ | ||
153 | struct fw_cdev_allocate { | 273 | struct fw_cdev_allocate { |
154 | __u64 offset; | 274 | __u64 offset; |
155 | __u64 closure; | 275 | __u64 closure; |
@@ -157,6 +277,11 @@ struct fw_cdev_allocate { | |||
157 | __u32 handle; | 277 | __u32 handle; |
158 | }; | 278 | }; |
159 | 279 | ||
280 | /** | ||
281 | * struct fw_cdev_deallocate - Free an address range allocation | ||
282 | * @handle: Handle to the address range, as returned by the kernel when the | ||
283 | * range was allocated | ||
284 | */ | ||
160 | struct fw_cdev_deallocate { | 285 | struct fw_cdev_deallocate { |
161 | __u32 handle; | 286 | __u32 handle; |
162 | }; | 287 | }; |
@@ -164,10 +289,41 @@ struct fw_cdev_deallocate { | |||
164 | #define FW_CDEV_LONG_RESET 0 | 289 | #define FW_CDEV_LONG_RESET 0 |
165 | #define FW_CDEV_SHORT_RESET 1 | 290 | #define FW_CDEV_SHORT_RESET 1 |
166 | 291 | ||
292 | /** | ||
293 | * struct fw_cdev_initiate_bus_reset - Initiate a bus reset | ||
294 | * @type: %FW_CDEV_SHORT_RESET or %FW_CDEV_LONG_RESET | ||
295 | * | ||
296 | * Initiate a bus reset for the bus this device is on. The bus reset can be | ||
297 | * either the original (long) bus reset or the arbitrated (short) bus reset | ||
298 | * introduced in 1394a-2000. | ||
299 | */ | ||
167 | struct fw_cdev_initiate_bus_reset { | 300 | struct fw_cdev_initiate_bus_reset { |
168 | __u32 type; | 301 | __u32 type; /* FW_CDEV_SHORT_RESET or FW_CDEV_LONG_RESET */ |
169 | }; | 302 | }; |
170 | 303 | ||
304 | /** | ||
305 | * struct fw_cdev_add_descriptor - Add contents to the local node's config ROM | ||
306 | * @immediate: If non-zero, immediate key to insert before pointer | ||
307 | * @key: Upper 8 bits of root directory pointer | ||
308 | * @data: Userspace pointer to contents of descriptor block | ||
309 | * @length: Length of descriptor block data, in bytes | ||
310 | * @handle: Handle to the descriptor, written by the kernel | ||
311 | * | ||
312 | * Add a descriptor block and optionally a preceding immediate key to the local | ||
313 | * node's configuration ROM. | ||
314 | * | ||
315 | * The @key field specifies the upper 8 bits of the descriptor root directory | ||
316 | * pointer and the @data and @length fields specify the contents. The @key | ||
317 | * should be of the form 0xXX000000. The offset part of the root directory entry | ||
318 | * will be filled in by the kernel. | ||
319 | * | ||
320 | * If not 0, the @immediate field specifies an immediate key which will be | ||
321 | * inserted before the root directory pointer. | ||
322 | * | ||
323 | * If successful, the kernel adds the descriptor and writes back a handle to the | ||
324 | * kernel-side object to be used for later removal of the descriptor block and | ||
325 | * immediate key. | ||
326 | */ | ||
171 | struct fw_cdev_add_descriptor { | 327 | struct fw_cdev_add_descriptor { |
172 | __u32 immediate; | 328 | __u32 immediate; |
173 | __u32 key; | 329 | __u32 key; |
@@ -176,6 +332,14 @@ struct fw_cdev_add_descriptor { | |||
176 | __u32 handle; | 332 | __u32 handle; |
177 | }; | 333 | }; |
178 | 334 | ||
335 | /** | ||
336 | * struct fw_cdev_remove_descriptor - Remove contents from the configuration ROM | ||
337 | * @handle: Handle to the descriptor, as returned by the kernel when the | ||
338 | * descriptor was added | ||
339 | * | ||
340 | * Remove a descriptor block and accompanying immediate key from the local | ||
341 | * node's configuration ROM. | ||
342 | */ | ||
179 | struct fw_cdev_remove_descriptor { | 343 | struct fw_cdev_remove_descriptor { |
180 | __u32 handle; | 344 | __u32 handle; |
181 | }; | 345 | }; |
@@ -183,12 +347,24 @@ struct fw_cdev_remove_descriptor { | |||
183 | #define FW_CDEV_ISO_CONTEXT_TRANSMIT 0 | 347 | #define FW_CDEV_ISO_CONTEXT_TRANSMIT 0 |
184 | #define FW_CDEV_ISO_CONTEXT_RECEIVE 1 | 348 | #define FW_CDEV_ISO_CONTEXT_RECEIVE 1 |
185 | 349 | ||
186 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG0 1 | 350 | /** |
187 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG1 2 | 351 | * struct fw_cdev_create_iso_context - Create a context for isochronous IO |
188 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG2 4 | 352 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE |
189 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG3 8 | 353 | * @header_size: Header size to strip for receive contexts |
190 | #define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS 15 | 354 | * @channel: Channel to bind to |
191 | 355 | * @speed: Speed to transmit at | |
356 | * @closure: To be returned in &fw_cdev_event_iso_interrupt | ||
357 | * @handle: Handle to context, written back by kernel | ||
358 | * | ||
359 | * Prior to sending or receiving isochronous I/O, a context must be created. | ||
360 | * The context records information about the transmit or receive configuration | ||
361 | * and typically maps to an underlying hardware resource. A context is set up | ||
362 | * for either sending or receiving. It is bound to a specific isochronous | ||
363 | * channel. | ||
364 | * | ||
365 | * If a context was successfully created, the kernel writes back a handle to the | ||
366 | * context, which must be passed in for subsequent operations on that context. | ||
367 | */ | ||
192 | struct fw_cdev_create_iso_context { | 368 | struct fw_cdev_create_iso_context { |
193 | __u32 type; | 369 | __u32 type; |
194 | __u32 header_size; | 370 | __u32 header_size; |
@@ -201,15 +377,49 @@ struct fw_cdev_create_iso_context { | |||
201 | #define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v) | 377 | #define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v) |
202 | #define FW_CDEV_ISO_INTERRUPT (1 << 16) | 378 | #define FW_CDEV_ISO_INTERRUPT (1 << 16) |
203 | #define FW_CDEV_ISO_SKIP (1 << 17) | 379 | #define FW_CDEV_ISO_SKIP (1 << 17) |
380 | #define FW_CDEV_ISO_SYNC (1 << 17) | ||
204 | #define FW_CDEV_ISO_TAG(v) ((v) << 18) | 381 | #define FW_CDEV_ISO_TAG(v) ((v) << 18) |
205 | #define FW_CDEV_ISO_SY(v) ((v) << 20) | 382 | #define FW_CDEV_ISO_SY(v) ((v) << 20) |
206 | #define FW_CDEV_ISO_HEADER_LENGTH(v) ((v) << 24) | 383 | #define FW_CDEV_ISO_HEADER_LENGTH(v) ((v) << 24) |
207 | 384 | ||
385 | /** | ||
386 | * struct fw_cdev_iso_packet - Isochronous packet | ||
387 | * @control: Contains the header length (8 uppermost bits), the sy field | ||
388 | * (4 bits), the tag field (2 bits), a sync flag (1 bit), | ||
389 | * a skip flag (1 bit), an interrupt flag (1 bit), and the | ||
390 | * payload length (16 lowermost bits) | ||
391 | * @header: Header and payload | ||
392 | * | ||
393 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. | ||
394 | * | ||
395 | * Use the FW_CDEV_ISO_ macros to fill in @control. The sy and tag fields are | ||
396 | * specified by IEEE 1394a and IEC 61883. | ||
397 | * | ||
398 | * FIXME - finish this documentation | ||
399 | */ | ||
208 | struct fw_cdev_iso_packet { | 400 | struct fw_cdev_iso_packet { |
209 | __u32 control; | 401 | __u32 control; |
210 | __u32 header[0]; | 402 | __u32 header[0]; |
211 | }; | 403 | }; |
212 | 404 | ||
405 | /** | ||
406 | * struct fw_cdev_queue_iso - Queue isochronous packets for I/O | ||
407 | * @packets: Userspace pointer to packet data | ||
408 | * @data: Pointer into mmap()'ed payload buffer | ||
409 | * @size: Size of packet data in bytes | ||
410 | * @handle: Isochronous context handle | ||
411 | * | ||
412 | * Queue a number of isochronous packets for reception or transmission. | ||
413 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, | ||
414 | * which describe how to transmit from or receive into a contiguous region | ||
415 | * of a mmap()'ed payload buffer. As part of the packet descriptors, | ||
416 | * a series of headers can be supplied, which will be prepended to the | ||
417 | * payload during DMA. | ||
418 | * | ||
419 | * The kernel may or may not queue all packets, but will write back updated | ||
420 | * values of the @packets, @data and @size fields, so the ioctl can be | ||
421 | * resubmitted easily. | ||
422 | */ | ||
213 | struct fw_cdev_queue_iso { | 423 | struct fw_cdev_queue_iso { |
214 | __u64 packets; | 424 | __u64 packets; |
215 | __u64 data; | 425 | __u64 data; |
@@ -217,6 +427,23 @@ struct fw_cdev_queue_iso { | |||
217 | __u32 handle; | 427 | __u32 handle; |
218 | }; | 428 | }; |
219 | 429 | ||
430 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG0 1 | ||
431 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG1 2 | ||
432 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG2 4 | ||
433 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG3 8 | ||
434 | #define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS 15 | ||
435 | |||
436 | /** | ||
437 | * struct fw_cdev_start_iso - Start an isochronous transmission or reception | ||
438 | * @cycle: Cycle in which to start I/O. If @cycle is greater than or | ||
439 | * equal to 0, the I/O will start on that cycle. | ||
440 | * @sync: Determines the value to wait for for receive packets that have | ||
441 | * the %FW_CDEV_ISO_SYNC bit set | ||
442 | * @tags: Tag filter bit mask. Only valid for isochronous reception. | ||
443 | * Determines the tag values for which packets will be accepted. | ||
444 | * Use FW_CDEV_ISO_CONTEXT_MATCH_ macros to set @tags. | ||
445 | * @handle: Isochronous context handle within which to transmit or receive | ||
446 | */ | ||
220 | struct fw_cdev_start_iso { | 447 | struct fw_cdev_start_iso { |
221 | __s32 cycle; | 448 | __s32 cycle; |
222 | __u32 sync; | 449 | __u32 sync; |
@@ -224,6 +451,10 @@ struct fw_cdev_start_iso { | |||
224 | __u32 handle; | 451 | __u32 handle; |
225 | }; | 452 | }; |
226 | 453 | ||
454 | /** | ||
455 | * struct fw_cdev_stop_iso - Stop an isochronous transmission or reception | ||
456 | * @handle: Handle of isochronous context to stop | ||
457 | */ | ||
227 | struct fw_cdev_stop_iso { | 458 | struct fw_cdev_stop_iso { |
228 | __u32 handle; | 459 | __u32 handle; |
229 | }; | 460 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b3ae77cccbb6..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 | ||
@@ -1054,7 +1058,7 @@ struct block_device_operations { | |||
1054 | }; | 1058 | }; |
1055 | 1059 | ||
1056 | /* | 1060 | /* |
1057 | * "descriptor" for what we're up to with a read for sendfile(). | 1061 | * "descriptor" for what we're up to with a read. |
1058 | * This allows us to use the same read code yet | 1062 | * This allows us to use the same read code yet |
1059 | * have multiple different users of the data that | 1063 | * have multiple different users of the data that |
1060 | * we read from a file. | 1064 | * we read from a file. |
@@ -1105,7 +1109,6 @@ struct file_operations { | |||
1105 | int (*aio_fsync) (struct kiocb *, int datasync); | 1109 | int (*aio_fsync) (struct kiocb *, int datasync); |
1106 | int (*fasync) (int, struct file *, int); | 1110 | int (*fasync) (int, struct file *, int); |
1107 | int (*lock) (struct file *, int, struct file_lock *); | 1111 | int (*lock) (struct file *, int, struct file_lock *); |
1108 | ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); | ||
1109 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); | 1112 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); |
1110 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1113 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1111 | int (*check_flags)(int); | 1114 | int (*check_flags)(int); |
@@ -1211,6 +1214,14 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1211 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1214 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1212 | } | 1215 | } |
1213 | 1216 | ||
1217 | /** | ||
1218 | * inc_nlink - directly increment an inode's link count | ||
1219 | * @inode: inode | ||
1220 | * | ||
1221 | * This is a low-level filesystem helper to replace any | ||
1222 | * direct filesystem manipulation of i_nlink. Currently, | ||
1223 | * it is only here for parity with dec_nlink(). | ||
1224 | */ | ||
1214 | static inline void inc_nlink(struct inode *inode) | 1225 | static inline void inc_nlink(struct inode *inode) |
1215 | { | 1226 | { |
1216 | inode->i_nlink++; | 1227 | inode->i_nlink++; |
@@ -1222,11 +1233,30 @@ static inline void inode_inc_link_count(struct inode *inode) | |||
1222 | mark_inode_dirty(inode); | 1233 | mark_inode_dirty(inode); |
1223 | } | 1234 | } |
1224 | 1235 | ||
1236 | /** | ||
1237 | * drop_nlink - directly drop an inode's link count | ||
1238 | * @inode: inode | ||
1239 | * | ||
1240 | * This is a low-level filesystem helper to replace any | ||
1241 | * direct filesystem manipulation of i_nlink. In cases | ||
1242 | * where we are attempting to track writes to the | ||
1243 | * filesystem, a decrement to zero means an imminent | ||
1244 | * write when the file is truncated and actually unlinked | ||
1245 | * on the filesystem. | ||
1246 | */ | ||
1225 | static inline void drop_nlink(struct inode *inode) | 1247 | static inline void drop_nlink(struct inode *inode) |
1226 | { | 1248 | { |
1227 | inode->i_nlink--; | 1249 | inode->i_nlink--; |
1228 | } | 1250 | } |
1229 | 1251 | ||
1252 | /** | ||
1253 | * clear_nlink - directly zero an inode's link count | ||
1254 | * @inode: inode | ||
1255 | * | ||
1256 | * This is a low-level filesystem helper to replace any | ||
1257 | * direct filesystem manipulation of i_nlink. See | ||
1258 | * drop_nlink() for why we care about i_nlink hitting zero. | ||
1259 | */ | ||
1230 | static inline void clear_nlink(struct inode *inode) | 1260 | static inline void clear_nlink(struct inode *inode) |
1231 | { | 1261 | { |
1232 | inode->i_nlink = 0; | 1262 | inode->i_nlink = 0; |
@@ -1584,6 +1614,9 @@ extern int __invalidate_device(struct block_device *); | |||
1584 | extern int invalidate_partition(struct gendisk *, int); | 1614 | extern int invalidate_partition(struct gendisk *, int); |
1585 | #endif | 1615 | #endif |
1586 | 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); | ||
1587 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1620 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1588 | pgoff_t start, pgoff_t end); | 1621 | pgoff_t start, pgoff_t end); |
1589 | 1622 | ||
@@ -1735,7 +1768,6 @@ extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | |||
1735 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | 1768 | unsigned long, loff_t, loff_t *, size_t, ssize_t); |
1736 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 1769 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
1737 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 1770 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
1738 | extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); | ||
1739 | extern void do_generic_mapping_read(struct address_space *mapping, | 1771 | extern void do_generic_mapping_read(struct address_space *mapping, |
1740 | struct file_ra_state *, struct file *, | 1772 | struct file_ra_state *, struct file *, |
1741 | loff_t *, read_descriptor_t *, read_actor_t); | 1773 | loff_t *, read_descriptor_t *, read_actor_t); |
@@ -1765,9 +1797,6 @@ extern int nonseekable_open(struct inode * inode, struct file * filp); | |||
1765 | #ifdef CONFIG_FS_XIP | 1797 | #ifdef CONFIG_FS_XIP |
1766 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, | 1798 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, |
1767 | loff_t *ppos); | 1799 | loff_t *ppos); |
1768 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, | ||
1769 | size_t count, read_actor_t actor, | ||
1770 | void *target); | ||
1771 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); | 1800 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); |
1772 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, | 1801 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, |
1773 | size_t len, loff_t *ppos); | 1802 | size_t len, loff_t *ppos); |
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/futex.h b/include/linux/futex.h index 899fc7f20edd..99650353adfa 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -17,7 +17,6 @@ union ktime; | |||
17 | #define FUTEX_LOCK_PI 6 | 17 | #define FUTEX_LOCK_PI 6 |
18 | #define FUTEX_UNLOCK_PI 7 | 18 | #define FUTEX_UNLOCK_PI 7 |
19 | #define FUTEX_TRYLOCK_PI 8 | 19 | #define FUTEX_TRYLOCK_PI 8 |
20 | #define FUTEX_CMP_REQUEUE_PI 9 | ||
21 | 20 | ||
22 | #define FUTEX_PRIVATE_FLAG 128 | 21 | #define FUTEX_PRIVATE_FLAG 128 |
23 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG | 22 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG |
@@ -98,14 +97,9 @@ struct robust_list_head { | |||
98 | #define FUTEX_OWNER_DIED 0x40000000 | 97 | #define FUTEX_OWNER_DIED 0x40000000 |
99 | 98 | ||
100 | /* | 99 | /* |
101 | * Some processes have been requeued on this PI-futex | ||
102 | */ | ||
103 | #define FUTEX_WAITER_REQUEUED 0x20000000 | ||
104 | |||
105 | /* | ||
106 | * The rest of the robust-futex field is for the TID: | 100 | * The rest of the robust-futex field is for the TID: |
107 | */ | 101 | */ |
108 | #define FUTEX_TID_MASK 0x0fffffff | 102 | #define FUTEX_TID_MASK 0x3fffffff |
109 | 103 | ||
110 | /* | 104 | /* |
111 | * This limit protects against a deliberately circular list. | 105 | * This limit protects against a deliberately circular list. |
@@ -139,7 +133,6 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | |||
139 | #define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ | 133 | #define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ |
140 | 134 | ||
141 | union futex_key { | 135 | union futex_key { |
142 | u32 __user *uaddr; | ||
143 | struct { | 136 | struct { |
144 | unsigned long pgoff; | 137 | unsigned long pgoff; |
145 | struct inode *inode; | 138 | struct inode *inode; |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 8b7e4c1e32ae..a44a6a078f0a 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -54,18 +54,6 @@ struct gfs2_inum { | |||
54 | __be64 no_addr; | 54 | __be64 no_addr; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct gfs2_inum_host { | ||
58 | __u64 no_formal_ino; | ||
59 | __u64 no_addr; | ||
60 | }; | ||
61 | |||
62 | static inline int gfs2_inum_equal(const struct gfs2_inum_host *ino1, | ||
63 | const struct gfs2_inum_host *ino2) | ||
64 | { | ||
65 | return ino1->no_formal_ino == ino2->no_formal_ino && | ||
66 | ino1->no_addr == ino2->no_addr; | ||
67 | } | ||
68 | |||
69 | /* | 57 | /* |
70 | * Generic metadata head structure | 58 | * Generic metadata head structure |
71 | * Every inplace buffer logged in the journal must start with this. | 59 | * Every inplace buffer logged in the journal must start with this. |
@@ -94,12 +82,6 @@ struct gfs2_meta_header { | |||
94 | __be32 __pad1; /* Was incarnation number in gfs1 */ | 82 | __be32 __pad1; /* Was incarnation number in gfs1 */ |
95 | }; | 83 | }; |
96 | 84 | ||
97 | struct gfs2_meta_header_host { | ||
98 | __u32 mh_magic; | ||
99 | __u32 mh_type; | ||
100 | __u32 mh_format; | ||
101 | }; | ||
102 | |||
103 | /* | 85 | /* |
104 | * super-block structure | 86 | * super-block structure |
105 | * | 87 | * |
@@ -139,23 +121,6 @@ struct gfs2_sb { | |||
139 | /* In gfs1, quota and license dinodes followed */ | 121 | /* In gfs1, quota and license dinodes followed */ |
140 | }; | 122 | }; |
141 | 123 | ||
142 | struct gfs2_sb_host { | ||
143 | struct gfs2_meta_header_host sb_header; | ||
144 | |||
145 | __u32 sb_fs_format; | ||
146 | __u32 sb_multihost_format; | ||
147 | |||
148 | __u32 sb_bsize; | ||
149 | __u32 sb_bsize_shift; | ||
150 | |||
151 | struct gfs2_inum_host sb_master_dir; /* Was jindex dinode in gfs1 */ | ||
152 | struct gfs2_inum_host sb_root_dir; | ||
153 | |||
154 | char sb_lockproto[GFS2_LOCKNAME_LEN]; | ||
155 | char sb_locktable[GFS2_LOCKNAME_LEN]; | ||
156 | /* In gfs1, quota and license dinodes followed */ | ||
157 | }; | ||
158 | |||
159 | /* | 124 | /* |
160 | * resource index structure | 125 | * resource index structure |
161 | */ | 126 | */ |
@@ -173,14 +138,6 @@ struct gfs2_rindex { | |||
173 | __u8 ri_reserved[64]; | 138 | __u8 ri_reserved[64]; |
174 | }; | 139 | }; |
175 | 140 | ||
176 | struct gfs2_rindex_host { | ||
177 | __u64 ri_addr; /* grp block disk address */ | ||
178 | __u64 ri_data0; /* first data location */ | ||
179 | __u32 ri_length; /* length of rgrp header in fs blocks */ | ||
180 | __u32 ri_data; /* num of data blocks in rgrp */ | ||
181 | __u32 ri_bitbytes; /* number of bytes in data bitmaps */ | ||
182 | }; | ||
183 | |||
184 | /* | 141 | /* |
185 | * resource group header structure | 142 | * resource group header structure |
186 | */ | 143 | */ |
@@ -212,13 +169,6 @@ struct gfs2_rgrp { | |||
212 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ | 169 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ |
213 | }; | 170 | }; |
214 | 171 | ||
215 | struct gfs2_rgrp_host { | ||
216 | __u32 rg_flags; | ||
217 | __u32 rg_free; | ||
218 | __u32 rg_dinodes; | ||
219 | __u64 rg_igeneration; | ||
220 | }; | ||
221 | |||
222 | /* | 172 | /* |
223 | * quota structure | 173 | * quota structure |
224 | */ | 174 | */ |
@@ -230,12 +180,6 @@ struct gfs2_quota { | |||
230 | __u8 qu_reserved[64]; | 180 | __u8 qu_reserved[64]; |
231 | }; | 181 | }; |
232 | 182 | ||
233 | struct gfs2_quota_host { | ||
234 | __u64 qu_limit; | ||
235 | __u64 qu_warn; | ||
236 | __u64 qu_value; | ||
237 | }; | ||
238 | |||
239 | /* | 183 | /* |
240 | * dinode structure | 184 | * dinode structure |
241 | */ | 185 | */ |
@@ -315,29 +259,11 @@ struct gfs2_dinode { | |||
315 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ | 259 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ |
316 | 260 | ||
317 | __be64 di_eattr; /* extended attribute block number */ | 261 | __be64 di_eattr; /* extended attribute block number */ |
262 | __be32 di_atime_nsec; /* nsec portion of atime */ | ||
263 | __be32 di_mtime_nsec; /* nsec portion of mtime */ | ||
264 | __be32 di_ctime_nsec; /* nsec portion of ctime */ | ||
318 | 265 | ||
319 | __u8 di_reserved[56]; | 266 | __u8 di_reserved[44]; |
320 | }; | ||
321 | |||
322 | struct gfs2_dinode_host { | ||
323 | __u64 di_size; /* number of bytes in file */ | ||
324 | __u64 di_blocks; /* number of blocks in file */ | ||
325 | |||
326 | /* This section varies from gfs1. Padding added to align with | ||
327 | * remainder of dinode | ||
328 | */ | ||
329 | __u64 di_goal_meta; /* rgrp to alloc from next */ | ||
330 | __u64 di_goal_data; /* data block goal */ | ||
331 | __u64 di_generation; /* generation number for NFS */ | ||
332 | |||
333 | __u32 di_flags; /* GFS2_DIF_... */ | ||
334 | __u16 di_height; /* height of metadata */ | ||
335 | |||
336 | /* These only apply to directories */ | ||
337 | __u16 di_depth; /* Number of bits in the table */ | ||
338 | __u32 di_entries; /* The number of entries in the directory */ | ||
339 | |||
340 | __u64 di_eattr; /* extended attribute block number */ | ||
341 | }; | 267 | }; |
342 | 268 | ||
343 | /* | 269 | /* |
@@ -414,16 +340,6 @@ struct gfs2_log_header { | |||
414 | __be32 lh_hash; | 340 | __be32 lh_hash; |
415 | }; | 341 | }; |
416 | 342 | ||
417 | struct gfs2_log_header_host { | ||
418 | struct gfs2_meta_header_host lh_header; | ||
419 | |||
420 | __u64 lh_sequence; /* Sequence number of this transaction */ | ||
421 | __u32 lh_flags; /* GFS2_LOG_HEAD_... */ | ||
422 | __u32 lh_tail; /* Block number of log tail */ | ||
423 | __u32 lh_blkno; | ||
424 | __u32 lh_hash; | ||
425 | }; | ||
426 | |||
427 | /* | 343 | /* |
428 | * Log type descriptor | 344 | * Log type descriptor |
429 | */ | 345 | */ |
@@ -464,11 +380,6 @@ struct gfs2_inum_range { | |||
464 | __be64 ir_length; | 380 | __be64 ir_length; |
465 | }; | 381 | }; |
466 | 382 | ||
467 | struct gfs2_inum_range_host { | ||
468 | __u64 ir_start; | ||
469 | __u64 ir_length; | ||
470 | }; | ||
471 | |||
472 | /* | 383 | /* |
473 | * Statfs change | 384 | * Statfs change |
474 | * Describes an change to the pool of free and allocated | 385 | * Describes an change to the pool of free and allocated |
@@ -481,12 +392,6 @@ struct gfs2_statfs_change { | |||
481 | __be64 sc_dinodes; | 392 | __be64 sc_dinodes; |
482 | }; | 393 | }; |
483 | 394 | ||
484 | struct gfs2_statfs_change_host { | ||
485 | __u64 sc_total; | ||
486 | __u64 sc_free; | ||
487 | __u64 sc_dinodes; | ||
488 | }; | ||
489 | |||
490 | /* | 395 | /* |
491 | * Quota change | 396 | * Quota change |
492 | * Describes an allocation change for a particular | 397 | * Describes an allocation change for a particular |
@@ -501,39 +406,12 @@ struct gfs2_quota_change { | |||
501 | __be32 qc_id; | 406 | __be32 qc_id; |
502 | }; | 407 | }; |
503 | 408 | ||
504 | struct gfs2_quota_change_host { | 409 | struct gfs2_quota_lvb { |
505 | __u64 qc_change; | 410 | __be32 qb_magic; |
506 | __u32 qc_flags; /* GFS2_QCF_... */ | 411 | __u32 __pad; |
507 | __u32 qc_id; | 412 | __be64 qb_limit; /* Hard limit of # blocks to alloc */ |
413 | __be64 qb_warn; /* Warn user when alloc is above this # */ | ||
414 | __be64 qb_value; /* Current # blocks allocated */ | ||
508 | }; | 415 | }; |
509 | 416 | ||
510 | #ifdef __KERNEL__ | ||
511 | /* Translation functions */ | ||
512 | |||
513 | extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf); | ||
514 | extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf); | ||
515 | extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); | ||
516 | extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); | ||
517 | extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); | ||
518 | extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf); | ||
519 | extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf); | ||
520 | extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf); | ||
521 | struct gfs2_inode; | ||
522 | extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); | ||
523 | extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); | ||
524 | extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); | ||
525 | extern void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf); | ||
526 | extern void gfs2_inum_range_in(struct gfs2_inum_range_host *ir, const void *buf); | ||
527 | extern void gfs2_inum_range_out(const struct gfs2_inum_range_host *ir, void *buf); | ||
528 | extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf); | ||
529 | extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf); | ||
530 | extern void gfs2_quota_change_in(struct gfs2_quota_change_host *qc, const void *buf); | ||
531 | |||
532 | /* Printing functions */ | ||
533 | |||
534 | extern void gfs2_rindex_print(const struct gfs2_rindex_host *ri); | ||
535 | extern void gfs2_dinode_print(const struct gfs2_inode *ip); | ||
536 | |||
537 | #endif /* __KERNEL__ */ | ||
538 | |||
539 | #endif /* __GFS2_ONDISK_DOT_H__ */ | 417 | #endif /* __GFS2_ONDISK_DOT_H__ */ |
diff --git a/include/linux/gpio_mouse.h b/include/linux/gpio_mouse.h new file mode 100644 index 000000000000..44ed7aa14d85 --- /dev/null +++ b/include/linux/gpio_mouse.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Driver for simulating a mouse on GPIO lines. | ||
3 | * | ||
4 | * Copyright (C) 2007 Atmel Corporation | ||
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 _GPIO_MOUSE_H | ||
12 | #define _GPIO_MOUSE_H | ||
13 | |||
14 | #define GPIO_MOUSE_POLARITY_ACT_HIGH 0x00 | ||
15 | #define GPIO_MOUSE_POLARITY_ACT_LOW 0x01 | ||
16 | |||
17 | #define GPIO_MOUSE_PIN_UP 0 | ||
18 | #define GPIO_MOUSE_PIN_DOWN 1 | ||
19 | #define GPIO_MOUSE_PIN_LEFT 2 | ||
20 | #define GPIO_MOUSE_PIN_RIGHT 3 | ||
21 | #define GPIO_MOUSE_PIN_BLEFT 4 | ||
22 | #define GPIO_MOUSE_PIN_BMIDDLE 5 | ||
23 | #define GPIO_MOUSE_PIN_BRIGHT 6 | ||
24 | #define GPIO_MOUSE_PIN_MAX 7 | ||
25 | |||
26 | /** | ||
27 | * struct gpio_mouse_platform_data | ||
28 | * @scan_ms: integer in ms specifying the scan periode. | ||
29 | * @polarity: Pin polarity, active high or low. | ||
30 | * @up: GPIO line for up value. | ||
31 | * @down: GPIO line for down value. | ||
32 | * @left: GPIO line for left value. | ||
33 | * @right: GPIO line for right value. | ||
34 | * @bleft: GPIO line for left button. | ||
35 | * @bmiddle: GPIO line for middle button. | ||
36 | * @bright: GPIO line for right button. | ||
37 | * | ||
38 | * This struct must be added to the platform_device in the board code. | ||
39 | * It is used by the gpio_mouse driver to setup GPIO lines and to | ||
40 | * calculate mouse movement. | ||
41 | */ | ||
42 | struct gpio_mouse_platform_data { | ||
43 | int scan_ms; | ||
44 | int polarity; | ||
45 | |||
46 | union { | ||
47 | struct { | ||
48 | int up; | ||
49 | int down; | ||
50 | int left; | ||
51 | int right; | ||
52 | |||
53 | int bleft; | ||
54 | int bmiddle; | ||
55 | int bright; | ||
56 | }; | ||
57 | int pins[GPIO_MOUSE_PIN_MAX]; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | #endif /* _GPIO_MOUSE_H */ | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 7803014f3a11..8d302298a161 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -79,6 +79,19 @@ | |||
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #ifdef CONFIG_PREEMPT | 81 | #ifdef CONFIG_PREEMPT |
82 | # define PREEMPT_CHECK_OFFSET 1 | ||
83 | #else | ||
84 | # define PREEMPT_CHECK_OFFSET 0 | ||
85 | #endif | ||
86 | |||
87 | /* | ||
88 | * Check whether we were atomic before we did preempt_disable(): | ||
89 | * (used by the scheduler) | ||
90 | */ | ||
91 | #define in_atomic_preempt_off() \ | ||
92 | ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET) | ||
93 | |||
94 | #ifdef CONFIG_PREEMPT | ||
82 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) | 95 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) |
83 | # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) | 96 | # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) |
84 | #else | 97 | #else |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 827ee748fd4c..898103b401f1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -263,19 +263,28 @@ struct hid_item { | |||
263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 | 263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 |
264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 | 264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 |
265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 | 265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 |
266 | #define HID_QUIRK_CYMOTION 0x00000800 | 266 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00000800 |
267 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 | 267 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00001000 |
268 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 | 268 | #define HID_QUIRK_INVERT_HWHEEL 0x00002000 |
269 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | 269 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00004000 |
270 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | 270 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000 |
271 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 271 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
272 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 272 | #define HID_QUIRK_IGNORE_MOUSE 0x00020000 |
273 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 273 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00040000 |
274 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | 274 | #define HID_QUIRK_DUPLICATE_USAGES 0x00080000 |
275 | #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 | 275 | #define HID_QUIRK_RESET_LEDS 0x00100000 |
276 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 | 276 | #define HID_QUIRK_HIDINPUT 0x00200000 |
277 | #define HID_QUIRK_RESET_LEDS 0x00400000 | 277 | #define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000 |
278 | #define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000 | 278 | #define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000 |
279 | |||
280 | /* | ||
281 | * Separate quirks for runtime report descriptor fixup | ||
282 | */ | ||
283 | |||
284 | #define HID_QUIRK_RDESC_CYMOTION 0x00000001 | ||
285 | #define HID_QUIRK_RDESC_LOGITECH 0x00000002 | ||
286 | #define HID_QUIRK_RDESC_SWAPPED_MIN_MAX 0x00000004 | ||
287 | #define HID_QUIRK_RDESC_PETALYNX 0x00000008 | ||
279 | 288 | ||
280 | /* | 289 | /* |
281 | * This is the global environment of the parser. This information is | 290 | * This is the global environment of the parser. This information is |
@@ -488,6 +497,11 @@ struct hid_descriptor { | |||
488 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 497 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
489 | 498 | ||
490 | /* HID core API */ | 499 | /* HID core API */ |
500 | |||
501 | #ifdef CONFIG_HID_DEBUG | ||
502 | extern int hid_debug; | ||
503 | #endif | ||
504 | |||
491 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 505 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
492 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | 506 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); |
493 | extern int hidinput_connect(struct hid_device *); | 507 | extern int hidinput_connect(struct hid_device *); |
@@ -506,6 +520,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); | |||
506 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); | 520 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); |
507 | int usbhid_quirks_init(char **quirks_param); | 521 | int usbhid_quirks_init(char **quirks_param); |
508 | void usbhid_quirks_exit(void); | 522 | void usbhid_quirks_exit(void); |
523 | void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **); | ||
509 | 524 | ||
510 | #ifdef CONFIG_HID_FF | 525 | #ifdef CONFIG_HID_FF |
511 | int hid_ff_init(struct hid_device *hid); | 526 | int hid_ff_init(struct hid_device *hid); |
@@ -523,14 +538,19 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | |||
523 | #else | 538 | #else |
524 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | 539 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } |
525 | #endif | 540 | #endif |
526 | #ifdef DEBUG | 541 | |
527 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 542 | #ifdef CONFIG_HID_DEBUG |
528 | __FILE__ , ## arg) | 543 | #define dbg_hid(format, arg...) if (hid_debug) \ |
544 | printk(KERN_DEBUG "%s: " format ,\ | ||
545 | __FILE__ , ## arg) | ||
546 | #define dbg_hid_line(format, arg...) if (hid_debug) \ | ||
547 | printk(format, ## arg) | ||
529 | #else | 548 | #else |
530 | #define dbg(format, arg...) do {} while (0) | 549 | #define dbg_hid(format, arg...) do {} while (0) |
550 | #define dbg_hid_line dbg_hid | ||
531 | #endif | 551 | #endif |
532 | 552 | ||
533 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 553 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ |
534 | __FILE__ , ## arg) | 554 | __FILE__ , ## arg) |
535 | #endif | 555 | #endif |
536 | 556 | ||
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/hugetlb.h b/include/linux/hugetlb.h index b4570b62ab85..2c13715e9dde 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -163,7 +163,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
163 | 163 | ||
164 | extern const struct file_operations hugetlbfs_file_operations; | 164 | extern const struct file_operations hugetlbfs_file_operations; |
165 | extern struct vm_operations_struct hugetlb_vm_ops; | 165 | extern struct vm_operations_struct hugetlb_vm_ops; |
166 | struct file *hugetlb_zero_setup(size_t); | 166 | struct file *hugetlb_file_setup(const char *name, size_t); |
167 | int hugetlb_get_quota(struct address_space *mapping); | 167 | int hugetlb_get_quota(struct address_space *mapping); |
168 | void hugetlb_put_quota(struct address_space *mapping); | 168 | void hugetlb_put_quota(struct address_space *mapping); |
169 | 169 | ||
@@ -185,7 +185,7 @@ static inline void set_file_hugepages(struct file *file) | |||
185 | 185 | ||
186 | #define is_file_hugepages(file) 0 | 186 | #define is_file_hugepages(file) 0 |
187 | #define set_file_hugepages(file) BUG() | 187 | #define set_file_hugepages(file) BUG() |
188 | #define hugetlb_zero_setup(size) ERR_PTR(-ENOSYS) | 188 | #define hugetlb_file_setup(name,size) ERR_PTR(-ENOSYS) |
189 | 189 | ||
190 | #endif /* !CONFIG_HUGETLBFS */ | 190 | #endif /* !CONFIG_HUGETLBFS */ |
191 | 191 | ||
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/ide.h b/include/linux/ide.h index 07aba87d369d..19ab25804056 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <asm/mutex.h> | ||
28 | 29 | ||
29 | /****************************************************************************** | 30 | /****************************************************************************** |
30 | * IDE driver configuration options (play with these as desired): | 31 | * IDE driver configuration options (play with these as desired): |
@@ -685,6 +686,8 @@ typedef struct hwif_s { | |||
685 | u8 mwdma_mask; | 686 | u8 mwdma_mask; |
686 | u8 swdma_mask; | 687 | u8 swdma_mask; |
687 | 688 | ||
689 | u8 cbl; /* cable type */ | ||
690 | |||
688 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 691 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
689 | 692 | ||
690 | struct pci_dev *pci_dev; /* for pci chipsets */ | 693 | struct pci_dev *pci_dev; /* for pci chipsets */ |
@@ -735,8 +738,8 @@ typedef struct hwif_s { | |||
735 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 738 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
736 | void (*dma_host_on)(ide_drive_t *drive); | 739 | void (*dma_host_on)(ide_drive_t *drive); |
737 | void (*dma_host_off)(ide_drive_t *drive); | 740 | void (*dma_host_off)(ide_drive_t *drive); |
738 | int (*ide_dma_lostirq)(ide_drive_t *drive); | 741 | void (*dma_lost_irq)(ide_drive_t *drive); |
739 | int (*ide_dma_timeout)(ide_drive_t *drive); | 742 | void (*dma_timeout)(ide_drive_t *drive); |
740 | 743 | ||
741 | void (*OUTB)(u8 addr, unsigned long port); | 744 | void (*OUTB)(u8 addr, unsigned long port); |
742 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 745 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); |
@@ -791,7 +794,6 @@ typedef struct hwif_s { | |||
791 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | 794 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ |
792 | unsigned reset : 1; /* reset after probe */ | 795 | unsigned reset : 1; /* reset after probe */ |
793 | unsigned autodma : 1; /* auto-attempt using DMA at boot */ | 796 | unsigned autodma : 1; /* auto-attempt using DMA at boot */ |
794 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ | ||
795 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | 797 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ |
796 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | 798 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ |
797 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 799 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
@@ -863,7 +865,7 @@ typedef struct hwgroup_s { | |||
863 | 865 | ||
864 | typedef struct ide_driver_s ide_driver_t; | 866 | typedef struct ide_driver_s ide_driver_t; |
865 | 867 | ||
866 | extern struct semaphore ide_setting_sem; | 868 | extern struct mutex ide_setting_mtx; |
867 | 869 | ||
868 | int set_io_32bit(ide_drive_t *, int); | 870 | int set_io_32bit(ide_drive_t *, int); |
869 | int set_pio_mode(ide_drive_t *, int); | 871 | int set_pio_mode(ide_drive_t *, int); |
@@ -1001,6 +1003,7 @@ struct ide_driver_s { | |||
1001 | struct device_driver gen_driver; | 1003 | struct device_driver gen_driver; |
1002 | int (*probe)(ide_drive_t *); | 1004 | int (*probe)(ide_drive_t *); |
1003 | void (*remove)(ide_drive_t *); | 1005 | void (*remove)(ide_drive_t *); |
1006 | void (*resume)(ide_drive_t *); | ||
1004 | void (*shutdown)(ide_drive_t *); | 1007 | void (*shutdown)(ide_drive_t *); |
1005 | #ifdef CONFIG_IDE_PROC_FS | 1008 | #ifdef CONFIG_IDE_PROC_FS |
1006 | ide_proc_entry_t *proc; | 1009 | ide_proc_entry_t *proc; |
@@ -1303,8 +1306,8 @@ extern int __ide_dma_check(ide_drive_t *); | |||
1303 | extern int ide_dma_setup(ide_drive_t *); | 1306 | extern int ide_dma_setup(ide_drive_t *); |
1304 | extern void ide_dma_start(ide_drive_t *); | 1307 | extern void ide_dma_start(ide_drive_t *); |
1305 | extern int __ide_dma_end(ide_drive_t *); | 1308 | extern int __ide_dma_end(ide_drive_t *); |
1306 | extern int __ide_dma_lostirq(ide_drive_t *); | 1309 | extern void ide_dma_lost_irq(ide_drive_t *); |
1307 | extern int __ide_dma_timeout(ide_drive_t *); | 1310 | extern void ide_dma_timeout(ide_drive_t *); |
1308 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1311 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
1309 | 1312 | ||
1310 | #else | 1313 | #else |
@@ -1381,11 +1384,11 @@ extern const ide_pio_timings_t ide_pio_timings[6]; | |||
1381 | 1384 | ||
1382 | 1385 | ||
1383 | extern spinlock_t ide_lock; | 1386 | extern spinlock_t ide_lock; |
1384 | extern struct semaphore ide_cfg_sem; | 1387 | extern struct mutex ide_cfg_mtx; |
1385 | /* | 1388 | /* |
1386 | * Structure locking: | 1389 | * Structure locking: |
1387 | * | 1390 | * |
1388 | * ide_cfg_sem and ide_lock together protect changes to | 1391 | * ide_cfg_mtx and ide_lock together protect changes to |
1389 | * ide_hwif_t->{next,hwgroup} | 1392 | * ide_hwif_t->{next,hwgroup} |
1390 | * ide_drive_t->next | 1393 | * ide_drive_t->next |
1391 | * | 1394 | * |
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/inetdevice.h b/include/linux/inetdevice.h index ae04901aa09a..d83fee2dc643 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/netdevice.h> | 8 | #include <linux/netdevice.h> |
9 | #include <linux/rcupdate.h> | 9 | #include <linux/rcupdate.h> |
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | ||
11 | 12 | ||
12 | struct ipv4_devconf | 13 | struct ipv4_devconf |
13 | { | 14 | { |
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/input.h b/include/linux/input.h index be2bf3a2b031..18c98b543030 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -108,6 +108,13 @@ struct input_absinfo { | |||
108 | 108 | ||
109 | /* | 109 | /* |
110 | * Keys and buttons | 110 | * Keys and buttons |
111 | * | ||
112 | * Most of the keys/buttons are modeled after USB HUT 1.12 | ||
113 | * (see http://www.usb.org/developers/hidpage). | ||
114 | * Abbreviations in the comments: | ||
115 | * AC - Application Control | ||
116 | * AL - Application Launch Button | ||
117 | * SC - System Control | ||
111 | */ | 118 | */ |
112 | 119 | ||
113 | #define KEY_RESERVED 0 | 120 | #define KEY_RESERVED 0 |
@@ -226,7 +233,7 @@ struct input_absinfo { | |||
226 | #define KEY_MUTE 113 | 233 | #define KEY_MUTE 113 |
227 | #define KEY_VOLUMEDOWN 114 | 234 | #define KEY_VOLUMEDOWN 114 |
228 | #define KEY_VOLUMEUP 115 | 235 | #define KEY_VOLUMEUP 115 |
229 | #define KEY_POWER 116 | 236 | #define KEY_POWER 116 /* SC System Power Down */ |
230 | #define KEY_KPEQUAL 117 | 237 | #define KEY_KPEQUAL 117 |
231 | #define KEY_KPPLUSMINUS 118 | 238 | #define KEY_KPPLUSMINUS 118 |
232 | #define KEY_PAUSE 119 | 239 | #define KEY_PAUSE 119 |
@@ -240,38 +247,39 @@ struct input_absinfo { | |||
240 | #define KEY_RIGHTMETA 126 | 247 | #define KEY_RIGHTMETA 126 |
241 | #define KEY_COMPOSE 127 | 248 | #define KEY_COMPOSE 127 |
242 | 249 | ||
243 | #define KEY_STOP 128 | 250 | #define KEY_STOP 128 /* AC Stop */ |
244 | #define KEY_AGAIN 129 | 251 | #define KEY_AGAIN 129 |
245 | #define KEY_PROPS 130 | 252 | #define KEY_PROPS 130 /* AC Properties */ |
246 | #define KEY_UNDO 131 | 253 | #define KEY_UNDO 131 /* AC Undo */ |
247 | #define KEY_FRONT 132 | 254 | #define KEY_FRONT 132 |
248 | #define KEY_COPY 133 | 255 | #define KEY_COPY 133 /* AC Copy */ |
249 | #define KEY_OPEN 134 | 256 | #define KEY_OPEN 134 /* AC Open */ |
250 | #define KEY_PASTE 135 | 257 | #define KEY_PASTE 135 /* AC Paste */ |
251 | #define KEY_FIND 136 | 258 | #define KEY_FIND 136 /* AC Search */ |
252 | #define KEY_CUT 137 | 259 | #define KEY_CUT 137 /* AC Cut */ |
253 | #define KEY_HELP 138 | 260 | #define KEY_HELP 138 /* AL Integrated Help Center */ |
254 | #define KEY_MENU 139 | 261 | #define KEY_MENU 139 /* Menu (show menu) */ |
255 | #define KEY_CALC 140 | 262 | #define KEY_CALC 140 /* AL Calculator */ |
256 | #define KEY_SETUP 141 | 263 | #define KEY_SETUP 141 |
257 | #define KEY_SLEEP 142 | 264 | #define KEY_SLEEP 142 /* SC System Sleep */ |
258 | #define KEY_WAKEUP 143 | 265 | #define KEY_WAKEUP 143 /* System Wake Up */ |
259 | #define KEY_FILE 144 | 266 | #define KEY_FILE 144 /* AL Local Machine Browser */ |
260 | #define KEY_SENDFILE 145 | 267 | #define KEY_SENDFILE 145 |
261 | #define KEY_DELETEFILE 146 | 268 | #define KEY_DELETEFILE 146 |
262 | #define KEY_XFER 147 | 269 | #define KEY_XFER 147 |
263 | #define KEY_PROG1 148 | 270 | #define KEY_PROG1 148 |
264 | #define KEY_PROG2 149 | 271 | #define KEY_PROG2 149 |
265 | #define KEY_WWW 150 | 272 | #define KEY_WWW 150 /* AL Internet Browser */ |
266 | #define KEY_MSDOS 151 | 273 | #define KEY_MSDOS 151 |
267 | #define KEY_COFFEE 152 | 274 | #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ |
275 | #define KEY_SCREENLOCK KEY_COFFEE | ||
268 | #define KEY_DIRECTION 153 | 276 | #define KEY_DIRECTION 153 |
269 | #define KEY_CYCLEWINDOWS 154 | 277 | #define KEY_CYCLEWINDOWS 154 |
270 | #define KEY_MAIL 155 | 278 | #define KEY_MAIL 155 |
271 | #define KEY_BOOKMARKS 156 | 279 | #define KEY_BOOKMARKS 156 /* AC Bookmarks */ |
272 | #define KEY_COMPUTER 157 | 280 | #define KEY_COMPUTER 157 |
273 | #define KEY_BACK 158 | 281 | #define KEY_BACK 158 /* AC Back */ |
274 | #define KEY_FORWARD 159 | 282 | #define KEY_FORWARD 159 /* AC Forward */ |
275 | #define KEY_CLOSECD 160 | 283 | #define KEY_CLOSECD 160 |
276 | #define KEY_EJECTCD 161 | 284 | #define KEY_EJECTCD 161 |
277 | #define KEY_EJECTCLOSECD 162 | 285 | #define KEY_EJECTCLOSECD 162 |
@@ -281,20 +289,20 @@ struct input_absinfo { | |||
281 | #define KEY_STOPCD 166 | 289 | #define KEY_STOPCD 166 |
282 | #define KEY_RECORD 167 | 290 | #define KEY_RECORD 167 |
283 | #define KEY_REWIND 168 | 291 | #define KEY_REWIND 168 |
284 | #define KEY_PHONE 169 | 292 | #define KEY_PHONE 169 /* Media Select Telephone */ |
285 | #define KEY_ISO 170 | 293 | #define KEY_ISO 170 |
286 | #define KEY_CONFIG 171 | 294 | #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ |
287 | #define KEY_HOMEPAGE 172 | 295 | #define KEY_HOMEPAGE 172 /* AC Home */ |
288 | #define KEY_REFRESH 173 | 296 | #define KEY_REFRESH 173 /* AC Refresh */ |
289 | #define KEY_EXIT 174 | 297 | #define KEY_EXIT 174 /* AC Exit */ |
290 | #define KEY_MOVE 175 | 298 | #define KEY_MOVE 175 |
291 | #define KEY_EDIT 176 | 299 | #define KEY_EDIT 176 |
292 | #define KEY_SCROLLUP 177 | 300 | #define KEY_SCROLLUP 177 |
293 | #define KEY_SCROLLDOWN 178 | 301 | #define KEY_SCROLLDOWN 178 |
294 | #define KEY_KPLEFTPAREN 179 | 302 | #define KEY_KPLEFTPAREN 179 |
295 | #define KEY_KPRIGHTPAREN 180 | 303 | #define KEY_KPRIGHTPAREN 180 |
296 | #define KEY_NEW 181 | 304 | #define KEY_NEW 181 /* AC New */ |
297 | #define KEY_REDO 182 | 305 | #define KEY_REDO 182 /* AC Redo/Repeat */ |
298 | 306 | ||
299 | #define KEY_F13 183 | 307 | #define KEY_F13 183 |
300 | #define KEY_F14 184 | 308 | #define KEY_F14 184 |
@@ -314,11 +322,11 @@ struct input_absinfo { | |||
314 | #define KEY_PROG3 202 | 322 | #define KEY_PROG3 202 |
315 | #define KEY_PROG4 203 | 323 | #define KEY_PROG4 203 |
316 | #define KEY_SUSPEND 205 | 324 | #define KEY_SUSPEND 205 |
317 | #define KEY_CLOSE 206 | 325 | #define KEY_CLOSE 206 /* AC Close */ |
318 | #define KEY_PLAY 207 | 326 | #define KEY_PLAY 207 |
319 | #define KEY_FASTFORWARD 208 | 327 | #define KEY_FASTFORWARD 208 |
320 | #define KEY_BASSBOOST 209 | 328 | #define KEY_BASSBOOST 209 |
321 | #define KEY_PRINT 210 | 329 | #define KEY_PRINT 210 /* AC Print */ |
322 | #define KEY_HP 211 | 330 | #define KEY_HP 211 |
323 | #define KEY_CAMERA 212 | 331 | #define KEY_CAMERA 212 |
324 | #define KEY_SOUND 213 | 332 | #define KEY_SOUND 213 |
@@ -327,11 +335,11 @@ struct input_absinfo { | |||
327 | #define KEY_CHAT 216 | 335 | #define KEY_CHAT 216 |
328 | #define KEY_SEARCH 217 | 336 | #define KEY_SEARCH 217 |
329 | #define KEY_CONNECT 218 | 337 | #define KEY_CONNECT 218 |
330 | #define KEY_FINANCE 219 | 338 | #define KEY_FINANCE 219 /* AL Checkbook/Finance */ |
331 | #define KEY_SPORT 220 | 339 | #define KEY_SPORT 220 |
332 | #define KEY_SHOP 221 | 340 | #define KEY_SHOP 221 |
333 | #define KEY_ALTERASE 222 | 341 | #define KEY_ALTERASE 222 |
334 | #define KEY_CANCEL 223 | 342 | #define KEY_CANCEL 223 /* AC Cancel */ |
335 | #define KEY_BRIGHTNESSDOWN 224 | 343 | #define KEY_BRIGHTNESSDOWN 224 |
336 | #define KEY_BRIGHTNESSUP 225 | 344 | #define KEY_BRIGHTNESSUP 225 |
337 | #define KEY_MEDIA 226 | 345 | #define KEY_MEDIA 226 |
@@ -341,10 +349,10 @@ struct input_absinfo { | |||
341 | #define KEY_KBDILLUMDOWN 229 | 349 | #define KEY_KBDILLUMDOWN 229 |
342 | #define KEY_KBDILLUMUP 230 | 350 | #define KEY_KBDILLUMUP 230 |
343 | 351 | ||
344 | #define KEY_SEND 231 | 352 | #define KEY_SEND 231 /* AC Send */ |
345 | #define KEY_REPLY 232 | 353 | #define KEY_REPLY 232 /* AC Reply */ |
346 | #define KEY_FORWARDMAIL 233 | 354 | #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ |
347 | #define KEY_SAVE 234 | 355 | #define KEY_SAVE 234 /* AC Save */ |
348 | #define KEY_DOCUMENTS 235 | 356 | #define KEY_DOCUMENTS 235 |
349 | 357 | ||
350 | #define KEY_BATTERY 236 | 358 | #define KEY_BATTERY 236 |
@@ -433,15 +441,15 @@ struct input_absinfo { | |||
433 | #define KEY_CLEAR 0x163 | 441 | #define KEY_CLEAR 0x163 |
434 | #define KEY_POWER2 0x164 | 442 | #define KEY_POWER2 0x164 |
435 | #define KEY_OPTION 0x165 | 443 | #define KEY_OPTION 0x165 |
436 | #define KEY_INFO 0x166 | 444 | #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ |
437 | #define KEY_TIME 0x167 | 445 | #define KEY_TIME 0x167 |
438 | #define KEY_VENDOR 0x168 | 446 | #define KEY_VENDOR 0x168 |
439 | #define KEY_ARCHIVE 0x169 | 447 | #define KEY_ARCHIVE 0x169 |
440 | #define KEY_PROGRAM 0x16a | 448 | #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ |
441 | #define KEY_CHANNEL 0x16b | 449 | #define KEY_CHANNEL 0x16b |
442 | #define KEY_FAVORITES 0x16c | 450 | #define KEY_FAVORITES 0x16c |
443 | #define KEY_EPG 0x16d | 451 | #define KEY_EPG 0x16d |
444 | #define KEY_PVR 0x16e | 452 | #define KEY_PVR 0x16e /* Media Select Home */ |
445 | #define KEY_MHP 0x16f | 453 | #define KEY_MHP 0x16f |
446 | #define KEY_LANGUAGE 0x170 | 454 | #define KEY_LANGUAGE 0x170 |
447 | #define KEY_TITLE 0x171 | 455 | #define KEY_TITLE 0x171 |
@@ -451,36 +459,36 @@ struct input_absinfo { | |||
451 | #define KEY_MODE 0x175 | 459 | #define KEY_MODE 0x175 |
452 | #define KEY_KEYBOARD 0x176 | 460 | #define KEY_KEYBOARD 0x176 |
453 | #define KEY_SCREEN 0x177 | 461 | #define KEY_SCREEN 0x177 |
454 | #define KEY_PC 0x178 | 462 | #define KEY_PC 0x178 /* Media Select Computer */ |
455 | #define KEY_TV 0x179 | 463 | #define KEY_TV 0x179 /* Media Select TV */ |
456 | #define KEY_TV2 0x17a | 464 | #define KEY_TV2 0x17a /* Media Select Cable */ |
457 | #define KEY_VCR 0x17b | 465 | #define KEY_VCR 0x17b /* Media Select VCR */ |
458 | #define KEY_VCR2 0x17c | 466 | #define KEY_VCR2 0x17c /* VCR Plus */ |
459 | #define KEY_SAT 0x17d | 467 | #define KEY_SAT 0x17d /* Media Select Satellite */ |
460 | #define KEY_SAT2 0x17e | 468 | #define KEY_SAT2 0x17e |
461 | #define KEY_CD 0x17f | 469 | #define KEY_CD 0x17f /* Media Select CD */ |
462 | #define KEY_TAPE 0x180 | 470 | #define KEY_TAPE 0x180 /* Media Select Tape */ |
463 | #define KEY_RADIO 0x181 | 471 | #define KEY_RADIO 0x181 |
464 | #define KEY_TUNER 0x182 | 472 | #define KEY_TUNER 0x182 /* Media Select Tuner */ |
465 | #define KEY_PLAYER 0x183 | 473 | #define KEY_PLAYER 0x183 |
466 | #define KEY_TEXT 0x184 | 474 | #define KEY_TEXT 0x184 |
467 | #define KEY_DVD 0x185 | 475 | #define KEY_DVD 0x185 /* Media Select DVD */ |
468 | #define KEY_AUX 0x186 | 476 | #define KEY_AUX 0x186 |
469 | #define KEY_MP3 0x187 | 477 | #define KEY_MP3 0x187 |
470 | #define KEY_AUDIO 0x188 | 478 | #define KEY_AUDIO 0x188 |
471 | #define KEY_VIDEO 0x189 | 479 | #define KEY_VIDEO 0x189 |
472 | #define KEY_DIRECTORY 0x18a | 480 | #define KEY_DIRECTORY 0x18a |
473 | #define KEY_LIST 0x18b | 481 | #define KEY_LIST 0x18b |
474 | #define KEY_MEMO 0x18c | 482 | #define KEY_MEMO 0x18c /* Media Select Messages */ |
475 | #define KEY_CALENDAR 0x18d | 483 | #define KEY_CALENDAR 0x18d |
476 | #define KEY_RED 0x18e | 484 | #define KEY_RED 0x18e |
477 | #define KEY_GREEN 0x18f | 485 | #define KEY_GREEN 0x18f |
478 | #define KEY_YELLOW 0x190 | 486 | #define KEY_YELLOW 0x190 |
479 | #define KEY_BLUE 0x191 | 487 | #define KEY_BLUE 0x191 |
480 | #define KEY_CHANNELUP 0x192 | 488 | #define KEY_CHANNELUP 0x192 /* Channel Increment */ |
481 | #define KEY_CHANNELDOWN 0x193 | 489 | #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ |
482 | #define KEY_FIRST 0x194 | 490 | #define KEY_FIRST 0x194 |
483 | #define KEY_LAST 0x195 | 491 | #define KEY_LAST 0x195 /* Recall Last */ |
484 | #define KEY_AB 0x196 | 492 | #define KEY_AB 0x196 |
485 | #define KEY_NEXT 0x197 | 493 | #define KEY_NEXT 0x197 |
486 | #define KEY_RESTART 0x198 | 494 | #define KEY_RESTART 0x198 |
@@ -491,21 +499,21 @@ struct input_absinfo { | |||
491 | #define KEY_DIGITS 0x19d | 499 | #define KEY_DIGITS 0x19d |
492 | #define KEY_TEEN 0x19e | 500 | #define KEY_TEEN 0x19e |
493 | #define KEY_TWEN 0x19f | 501 | #define KEY_TWEN 0x19f |
494 | #define KEY_VIDEOPHONE 0x1a0 | 502 | #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ |
495 | #define KEY_GAMES 0x1a1 | 503 | #define KEY_GAMES 0x1a1 /* Media Select Games */ |
496 | #define KEY_ZOOMIN 0x1a2 | 504 | #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ |
497 | #define KEY_ZOOMOUT 0x1a3 | 505 | #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ |
498 | #define KEY_ZOOMRESET 0x1a4 | 506 | #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ |
499 | #define KEY_WORDPROCESSOR 0x1a5 | 507 | #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ |
500 | #define KEY_EDITOR 0x1a6 | 508 | #define KEY_EDITOR 0x1a6 /* AL Text Editor */ |
501 | #define KEY_SPREADSHEET 0x1a7 | 509 | #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ |
502 | #define KEY_GRAPHICSEDITOR 0x1a8 | 510 | #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ |
503 | #define KEY_PRESENTATION 0x1a9 | 511 | #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ |
504 | #define KEY_DATABASE 0x1aa | 512 | #define KEY_DATABASE 0x1aa /* AL Database App */ |
505 | #define KEY_NEWS 0x1ab | 513 | #define KEY_NEWS 0x1ab /* AL Newsreader */ |
506 | #define KEY_VOICEMAIL 0x1ac | 514 | #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ |
507 | #define KEY_ADDRESSBOOK 0x1ad | 515 | #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ |
508 | #define KEY_MESSENGER 0x1ae | 516 | #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ |
509 | #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ | 517 | #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ |
510 | 518 | ||
511 | #define KEY_DEL_EOL 0x1c0 | 519 | #define KEY_DEL_EOL 0x1c0 |
@@ -603,6 +611,7 @@ struct input_absinfo { | |||
603 | #define SW_LID 0x00 /* set = lid shut */ | 611 | #define SW_LID 0x00 /* set = lid shut */ |
604 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | 612 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
605 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | 613 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
614 | #define SW_RADIO 0x03 /* set = radio enabled */ | ||
606 | #define SW_MAX 0x0f | 615 | #define SW_MAX 0x0f |
607 | 616 | ||
608 | /* | 617 | /* |
@@ -972,15 +981,15 @@ struct input_dev { | |||
972 | struct mutex mutex; /* serializes open and close operations */ | 981 | struct mutex mutex; /* serializes open and close operations */ |
973 | unsigned int users; | 982 | unsigned int users; |
974 | 983 | ||
975 | struct class_device cdev; | 984 | struct device dev; |
976 | union { /* temporarily so while we switching to struct device */ | 985 | union { /* temporarily so while we switching to struct device */ |
977 | struct device *parent; | 986 | struct device *dev; |
978 | } dev; | 987 | } cdev; |
979 | 988 | ||
980 | struct list_head h_list; | 989 | struct list_head h_list; |
981 | struct list_head node; | 990 | struct list_head node; |
982 | }; | 991 | }; |
983 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) | 992 | #define to_input_dev(d) container_of(d, struct input_dev, dev) |
984 | 993 | ||
985 | /* | 994 | /* |
986 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines | 995 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines |
@@ -1087,22 +1096,22 @@ struct input_handle { | |||
1087 | struct list_head h_node; | 1096 | struct list_head h_node; |
1088 | }; | 1097 | }; |
1089 | 1098 | ||
1090 | #define to_dev(n) container_of(n,struct input_dev,node) | 1099 | #define to_dev(n) container_of(n, struct input_dev, node) |
1091 | #define to_handler(n) container_of(n,struct input_handler,node) | 1100 | #define to_handler(n) container_of(n, struct input_handler, node) |
1092 | #define to_handle(n) container_of(n,struct input_handle,d_node) | 1101 | #define to_handle(n) container_of(n, struct input_handle, d_node) |
1093 | #define to_handle_h(n) container_of(n,struct input_handle,h_node) | 1102 | #define to_handle_h(n) container_of(n, struct input_handle, h_node) |
1094 | 1103 | ||
1095 | struct input_dev *input_allocate_device(void); | 1104 | struct input_dev *input_allocate_device(void); |
1096 | void input_free_device(struct input_dev *dev); | 1105 | void input_free_device(struct input_dev *dev); |
1097 | 1106 | ||
1098 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1107 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1099 | { | 1108 | { |
1100 | return to_input_dev(class_device_get(&dev->cdev)); | 1109 | return to_input_dev(get_device(&dev->dev)); |
1101 | } | 1110 | } |
1102 | 1111 | ||
1103 | static inline void input_put_device(struct input_dev *dev) | 1112 | static inline void input_put_device(struct input_dev *dev) |
1104 | { | 1113 | { |
1105 | class_device_put(&dev->cdev); | 1114 | put_device(&dev->dev); |
1106 | } | 1115 | } |
1107 | 1116 | ||
1108 | static inline void *input_get_drvdata(struct input_dev *dev) | 1117 | static inline void *input_get_drvdata(struct input_dev *dev) |
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/ioprio.h b/include/linux/ioprio.h index 8e2042b9d471..2eaa142cd061 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
@@ -47,8 +47,10 @@ enum { | |||
47 | #define IOPRIO_NORM (4) | 47 | #define IOPRIO_NORM (4) |
48 | static inline int task_ioprio(struct task_struct *task) | 48 | static inline int task_ioprio(struct task_struct *task) |
49 | { | 49 | { |
50 | WARN_ON(!ioprio_valid(task->ioprio)); | 50 | if (ioprio_valid(task->ioprio)) |
51 | return IOPRIO_PRIO_DATA(task->ioprio); | 51 | return IOPRIO_PRIO_DATA(task->ioprio); |
52 | |||
53 | return IOPRIO_NORM; | ||
52 | } | 54 | } |
53 | 55 | ||
54 | static inline int task_nice_ioprio(struct task_struct *task) | 56 | static inline int task_nice_ioprio(struct task_struct *task) |
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/kallsyms.h b/include/linux/kallsyms.h index 12178d2c882b..5f06527dca21 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef _LINUX_KALLSYMS_H | 5 | #ifndef _LINUX_KALLSYMS_H |
6 | #define _LINUX_KALLSYMS_H | 6 | #define _LINUX_KALLSYMS_H |
7 | 7 | ||
8 | #include <linux/errno.h> | ||
8 | 9 | ||
9 | #define KSYM_NAME_LEN 127 | 10 | #define KSYM_NAME_LEN 127 |
10 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + \ | 11 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + \ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 45353d757cd0..7a4852505914 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -218,10 +218,14 @@ enum { | |||
218 | DUMP_PREFIX_ADDRESS, | 218 | DUMP_PREFIX_ADDRESS, |
219 | DUMP_PREFIX_OFFSET | 219 | DUMP_PREFIX_OFFSET |
220 | }; | 220 | }; |
221 | extern void hex_dump_to_buffer(const void *buf, size_t len, char *linebuf, | 221 | extern void hex_dump_to_buffer(const void *buf, size_t len, |
222 | size_t linebuflen); | 222 | int rowsize, int groupsize, |
223 | extern void print_hex_dump(const char *level, int prefix_type, | 223 | char *linebuf, size_t linebuflen, bool ascii); |
224 | void *buf, size_t len); | 224 | extern void print_hex_dump(const char *level, const char *prefix_str, |
225 | int prefix_type, int rowsize, int groupsize, | ||
226 | void *buf, size_t len, bool ascii); | ||
227 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
228 | void *buf, size_t len); | ||
225 | #define hex_asc(x) "0123456789abcdef"[x] | 229 | #define hex_asc(x) "0123456789abcdef"[x] |
226 | 230 | ||
227 | #ifdef DEBUG | 231 | #ifdef DEBUG |
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 c762954bda14..dae7143644fe 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -261,12 +261,34 @@ static inline s64 ktime_to_ns(const ktime_t kt) | |||
261 | 261 | ||
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | /** | ||
265 | * ktime_equal - Compares two ktime_t variables to see if they are equal | ||
266 | * @cmp1: comparable1 | ||
267 | * @cmp2: comparable2 | ||
268 | * | ||
269 | * Compare two ktime_t variables, returns 1 if equal | ||
270 | */ | ||
271 | static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2) | ||
272 | { | ||
273 | return cmp1.tv64 == cmp2.tv64; | ||
274 | } | ||
275 | |||
264 | static inline s64 ktime_to_us(const ktime_t kt) | 276 | static inline s64 ktime_to_us(const ktime_t kt) |
265 | { | 277 | { |
266 | struct timeval tv = ktime_to_timeval(kt); | 278 | struct timeval tv = ktime_to_timeval(kt); |
267 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; | 279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; |
268 | } | 280 | } |
269 | 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 | |||
270 | /* | 292 | /* |
271 | * The resolution of the clocks. The resolution value is returned in | 293 | * The resolution of the clocks. The resolution value is returned in |
272 | * 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 a6a3113120a4..47cd2a1c5544 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -116,6 +116,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | |||
116 | enum { | 116 | enum { |
117 | /* various global constants */ | 117 | /* various global constants */ |
118 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 118 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
119 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | ||
119 | ATA_MAX_PORTS = 8, | 120 | ATA_MAX_PORTS = 8, |
120 | ATA_DEF_QUEUE = 1, | 121 | ATA_DEF_QUEUE = 1, |
121 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 122 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
@@ -136,6 +137,8 @@ enum { | |||
136 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ | 137 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ |
137 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ | 138 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ |
138 | ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */ | 139 | ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */ |
140 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ | ||
141 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ | ||
139 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 142 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
140 | 143 | ||
141 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ | 144 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ |
@@ -193,9 +196,9 @@ enum { | |||
193 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | 196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ |
194 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ | 197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ |
195 | 198 | ||
196 | ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ | ||
197 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 199 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
198 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 200 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
201 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ | ||
199 | 202 | ||
200 | /* struct ata_queued_cmd flags */ | 203 | /* struct ata_queued_cmd flags */ |
201 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 204 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
@@ -298,7 +301,6 @@ enum { | |||
298 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 301 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
299 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 302 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
300 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 303 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
301 | ATA_HORKAGE_DMA_RW_ONLY = (1 << 4), /* ATAPI DMA for RW only */ | ||
302 | }; | 304 | }; |
303 | 305 | ||
304 | enum hsm_task_states { | 306 | enum hsm_task_states { |
@@ -364,6 +366,9 @@ struct ata_host { | |||
364 | void *private_data; | 366 | void *private_data; |
365 | const struct ata_port_operations *ops; | 367 | const struct ata_port_operations *ops; |
366 | unsigned long flags; | 368 | unsigned long flags; |
369 | #ifdef CONFIG_ATA_ACPI | ||
370 | acpi_handle acpi_handle; | ||
371 | #endif | ||
367 | struct ata_port *simplex_claimed; /* channel owning the DMA */ | 372 | struct ata_port *simplex_claimed; /* channel owning the DMA */ |
368 | struct ata_port *ports[0]; | 373 | struct ata_port *ports[0]; |
369 | }; | 374 | }; |
@@ -429,7 +434,11 @@ struct ata_device { | |||
429 | struct ata_port *ap; | 434 | struct ata_port *ap; |
430 | unsigned int devno; /* 0 or 1 */ | 435 | unsigned int devno; /* 0 or 1 */ |
431 | unsigned long flags; /* ATA_DFLAG_xxx */ | 436 | unsigned long flags; /* ATA_DFLAG_xxx */ |
437 | unsigned int horkage; /* List of broken features */ | ||
432 | struct scsi_device *sdev; /* attached SCSI device */ | 438 | struct scsi_device *sdev; /* attached SCSI device */ |
439 | #ifdef CONFIG_ATA_ACPI | ||
440 | acpi_handle acpi_handle; | ||
441 | #endif | ||
433 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 442 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
434 | u64 n_sectors; /* size of device, if ATA */ | 443 | u64 n_sectors; /* size of device, if ATA */ |
435 | unsigned int class; /* ATA_DEV_xxx */ | 444 | unsigned int class; /* ATA_DEV_xxx */ |
@@ -457,11 +466,6 @@ struct ata_device { | |||
457 | /* error history */ | 466 | /* error history */ |
458 | struct ata_ering ering; | 467 | struct ata_ering ering; |
459 | int spdn_cnt; | 468 | int spdn_cnt; |
460 | unsigned int horkage; /* List of broken features */ | ||
461 | #ifdef CONFIG_ATA_ACPI | ||
462 | /* ACPI objects info */ | ||
463 | acpi_handle obj_handle; | ||
464 | #endif | ||
465 | }; | 469 | }; |
466 | 470 | ||
467 | /* Offset into struct ata_device. Fields above it are maintained | 471 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -490,6 +494,17 @@ struct ata_eh_context { | |||
490 | unsigned int did_probe_mask; | 494 | unsigned int did_probe_mask; |
491 | }; | 495 | }; |
492 | 496 | ||
497 | struct ata_acpi_drive | ||
498 | { | ||
499 | u32 pio; | ||
500 | u32 dma; | ||
501 | } __packed; | ||
502 | |||
503 | struct ata_acpi_gtm { | ||
504 | struct ata_acpi_drive drive[2]; | ||
505 | u32 flags; | ||
506 | } __packed; | ||
507 | |||
493 | struct ata_port { | 508 | struct ata_port { |
494 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ | 509 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
495 | const struct ata_port_operations *ops; | 510 | const struct ata_port_operations *ops; |
@@ -550,6 +565,10 @@ struct ata_port { | |||
550 | 565 | ||
551 | void *private_data; | 566 | void *private_data; |
552 | 567 | ||
568 | #ifdef CONFIG_ATA_ACPI | ||
569 | acpi_handle acpi_handle; | ||
570 | struct ata_acpi_gtm acpi_gtm; | ||
571 | #endif | ||
553 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 572 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ |
554 | }; | 573 | }; |
555 | 574 | ||
@@ -753,11 +772,13 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
753 | extern u8 ata_altstatus(struct ata_port *ap); | 772 | extern u8 ata_altstatus(struct ata_port *ap); |
754 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 773 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
755 | extern int ata_port_start (struct ata_port *ap); | 774 | extern int ata_port_start (struct ata_port *ap); |
775 | extern int ata_sff_port_start (struct ata_port *ap); | ||
756 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 776 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
757 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, | 777 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, |
758 | unsigned int buflen, int write_data); | 778 | unsigned int buflen, int write_data); |
759 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | 779 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
760 | unsigned int buflen, int write_data); | 780 | unsigned int buflen, int write_data); |
781 | extern void ata_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
761 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 782 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
762 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 783 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
763 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 784 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -772,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
772 | 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, |
773 | unsigned int ofs, unsigned int len); | 794 | unsigned int ofs, unsigned int len); |
774 | 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); |
775 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | ||
776 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 796 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
777 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 797 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
778 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 798 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -849,11 +869,11 @@ struct pci_bits { | |||
849 | unsigned long val; | 869 | unsigned long val; |
850 | }; | 870 | }; |
851 | 871 | ||
852 | extern int ata_pci_init_native_host(struct ata_host *host); | 872 | extern int ata_pci_init_sff_host(struct ata_host *host); |
853 | extern int ata_pci_init_bmdma(struct ata_host *host); | 873 | extern int ata_pci_init_bmdma(struct ata_host *host); |
854 | extern int ata_pci_prepare_native_host(struct pci_dev *pdev, | 874 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, |
855 | const struct ata_port_info * const * ppi, | 875 | const struct ata_port_info * const * ppi, |
856 | struct ata_host **r_host); | 876 | struct ata_host **r_host); |
857 | 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); |
858 | 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); |
859 | #endif /* CONFIG_PCI */ | 879 | #endif /* CONFIG_PCI */ |
@@ -1087,11 +1107,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap) | |||
1087 | { | 1107 | { |
1088 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1108 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
1089 | 1109 | ||
1090 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { | 1110 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) |
1091 | if (ata_msg_warn(ap)) | 1111 | DPRINTK("ATA: abnormal status 0x%X on port 0x%p\n", |
1092 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n", | 1112 | status, ap->ioaddr.status_addr); |
1093 | status, ap->ioaddr.status_addr); | ||
1094 | } | ||
1095 | 1113 | ||
1096 | return status; | 1114 | return status; |
1097 | } | 1115 | } |
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/cmd.h b/include/linux/mlx4/cmd.h index 4fb552d12f7a..7d1eaa97de13 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
@@ -54,6 +54,7 @@ enum { | |||
54 | MLX4_CMD_INIT_PORT = 0x9, | 54 | MLX4_CMD_INIT_PORT = 0x9, |
55 | MLX4_CMD_CLOSE_PORT = 0xa, | 55 | MLX4_CMD_CLOSE_PORT = 0xa, |
56 | MLX4_CMD_QUERY_HCA = 0xb, | 56 | MLX4_CMD_QUERY_HCA = 0xb, |
57 | MLX4_CMD_QUERY_PORT = 0x43, | ||
57 | MLX4_CMD_SET_PORT = 0xc, | 58 | MLX4_CMD_SET_PORT = 0xc, |
58 | MLX4_CMD_ACCESS_DDR = 0x2e, | 59 | MLX4_CMD_ACCESS_DDR = 0x2e, |
59 | MLX4_CMD_MAP_ICM = 0xffa, | 60 | MLX4_CMD_MAP_ICM = 0xffa, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 8c5f8fd86841..cfb78fb2c046 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | enum { | 42 | enum { |
43 | MLX4_FLAG_MSI_X = 1 << 0, | 43 | MLX4_FLAG_MSI_X = 1 << 0, |
44 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | enum { | 47 | enum { |
@@ -131,10 +132,10 @@ enum { | |||
131 | struct mlx4_caps { | 132 | struct mlx4_caps { |
132 | u64 fw_ver; | 133 | u64 fw_ver; |
133 | int num_ports; | 134 | int num_ports; |
134 | int vl_cap; | 135 | int vl_cap[MLX4_MAX_PORTS + 1]; |
135 | int mtu_cap; | 136 | int mtu_cap[MLX4_MAX_PORTS + 1]; |
136 | int gid_table_len; | 137 | int gid_table_len[MLX4_MAX_PORTS + 1]; |
137 | int pkey_table_len; | 138 | int pkey_table_len[MLX4_MAX_PORTS + 1]; |
138 | int local_ca_ack_delay; | 139 | int local_ca_ack_delay; |
139 | int num_uars; | 140 | int num_uars; |
140 | int bf_reg_size; | 141 | int bf_reg_size; |
@@ -171,10 +172,11 @@ struct mlx4_caps { | |||
171 | int num_pds; | 172 | int num_pds; |
172 | int reserved_pds; | 173 | int reserved_pds; |
173 | int mtt_entry_sz; | 174 | int mtt_entry_sz; |
175 | u32 max_msg_sz; | ||
174 | u32 page_size_cap; | 176 | u32 page_size_cap; |
175 | u32 flags; | 177 | u32 flags; |
176 | u16 stat_rate_support; | 178 | u16 stat_rate_support; |
177 | u8 port_width_cap; | 179 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
178 | }; | 180 | }; |
179 | 181 | ||
180 | struct mlx4_buf_list { | 182 | struct mlx4_buf_list { |
@@ -321,8 +323,9 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, | |||
321 | u64 db_rec, struct mlx4_srq *srq); | 323 | u64 db_rec, struct mlx4_srq *srq); |
322 | 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); |
323 | 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); | ||
324 | 327 | ||
325 | int mlx4_INIT_PORT(struct mlx4_dev *dev, struct mlx4_init_port_param *param, int port); | 328 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); |
326 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 329 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
327 | 330 | ||
328 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 331 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 9eeb61adf6a3..3968b943259a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -269,6 +269,10 @@ struct mlx4_wqe_data_seg { | |||
269 | __be64 addr; | 269 | __be64 addr; |
270 | }; | 270 | }; |
271 | 271 | ||
272 | enum { | ||
273 | MLX4_INLINE_ALIGN = 64, | ||
274 | }; | ||
275 | |||
272 | struct mlx4_wqe_inline_seg { | 276 | struct mlx4_wqe_inline_seg { |
273 | __be32 byte_count; | 277 | __be32 byte_count; |
274 | }; | 278 | }; |
@@ -278,6 +282,9 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
278 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, | 282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, |
279 | int sqd_event, struct mlx4_qp *qp); | 283 | int sqd_event, struct mlx4_qp *qp); |
280 | 284 | ||
285 | int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp, | ||
286 | struct mlx4_qp_context *context); | ||
287 | |||
281 | 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) |
282 | { | 289 | { |
283 | 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 e4183c6c7de3..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 |
@@ -603,6 +601,10 @@ static inline struct address_space *page_mapping(struct page *page) | |||
603 | 601 | ||
604 | if (unlikely(PageSwapCache(page))) | 602 | if (unlikely(PageSwapCache(page))) |
605 | mapping = &swapper_space; | 603 | mapping = &swapper_space; |
604 | #ifdef CONFIG_SLUB | ||
605 | else if (unlikely(PageSlab(page))) | ||
606 | mapping = NULL; | ||
607 | #endif | ||
606 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | 608 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) |
607 | mapping = NULL; | 609 | mapping = NULL; |
608 | return mapping; | 610 | return mapping; |
@@ -1068,6 +1070,10 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
1068 | 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, |
1069 | unsigned long len, unsigned long prot, | 1071 | unsigned long len, unsigned long prot, |
1070 | 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); | ||
1071 | 1077 | ||
1072 | 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, |
1073 | 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/mv643xx.h b/include/linux/mv643xx.h index c6d4ab86b83c..b021b3a2b65a 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -13,10 +13,6 @@ | |||
13 | #ifndef __ASM_MV643XX_H | 13 | #ifndef __ASM_MV643XX_H |
14 | #define __ASM_MV643XX_H | 14 | #define __ASM_MV643XX_H |
15 | 15 | ||
16 | #ifdef __mips__ | ||
17 | #include <asm/addrspace.h> | ||
18 | #include <asm/marvell.h> | ||
19 | #endif | ||
20 | #include <asm/types.h> | 16 | #include <asm/types.h> |
21 | 17 | ||
22 | /****************************************/ | 18 | /****************************************/ |
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/pata_platform.h b/include/linux/pata_platform.h index 2d5fd647e0e9..5799e8d50623 100644 --- a/include/linux/pata_platform.h +++ b/include/linux/pata_platform.h | |||
@@ -8,6 +8,11 @@ struct pata_platform_info { | |||
8 | * spacing used by ata_std_ports(). | 8 | * spacing used by ata_std_ports(). |
9 | */ | 9 | */ |
10 | unsigned int ioport_shift; | 10 | unsigned int ioport_shift; |
11 | /* | ||
12 | * Indicate platform specific irq types and initial | ||
13 | * IRQ flags when call request_irq() | ||
14 | */ | ||
15 | unsigned int irq_flags; | ||
11 | }; | 16 | }; |
12 | 17 | ||
13 | #endif /* __LINUX_PATA_PLATFORM_H */ | 18 | #endif /* __LINUX_PATA_PLATFORM_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index fbf3766dac1e..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 | ||
@@ -748,6 +758,17 @@ static inline void pci_release_regions(struct pci_dev *dev) { } | |||
748 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 758 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |
749 | static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { } | 759 | static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { } |
750 | 760 | ||
761 | static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from) | ||
762 | { return NULL; } | ||
763 | |||
764 | static inline struct pci_dev *pci_get_slot(struct pci_bus *bus, | ||
765 | unsigned int devfn) | ||
766 | { return NULL; } | ||
767 | |||
768 | static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | ||
769 | unsigned int devfn) | ||
770 | { return NULL; } | ||
771 | |||
751 | #endif /* CONFIG_PCI */ | 772 | #endif /* CONFIG_PCI */ |
752 | 773 | ||
753 | /* Include architecture-dependent settings and functions */ | 774 | /* Include architecture-dependent settings and functions */ |
@@ -865,5 +886,7 @@ extern int pci_pci_problems; | |||
865 | extern unsigned long pci_cardbus_io_size; | 886 | extern unsigned long pci_cardbus_io_size; |
866 | extern unsigned long pci_cardbus_mem_size; | 887 | extern unsigned long pci_cardbus_mem_size; |
867 | 888 | ||
889 | extern int pcibios_add_platform_entries(struct pci_dev *dev); | ||
890 | |||
868 | #endif /* __KERNEL__ */ | 891 | #endif /* __KERNEL__ */ |
869 | #endif /* LINUX_PCI_H */ | 892 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6a115cffea34..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 | ||
@@ -661,6 +668,7 @@ | |||
661 | #define PCI_DEVICE_ID_SI_965 0x0965 | 668 | #define PCI_DEVICE_ID_SI_965 0x0965 |
662 | #define PCI_DEVICE_ID_SI_966 0x0966 | 669 | #define PCI_DEVICE_ID_SI_966 0x0966 |
663 | #define PCI_DEVICE_ID_SI_968 0x0968 | 670 | #define PCI_DEVICE_ID_SI_968 0x0968 |
671 | #define PCI_DEVICE_ID_SI_1180 0x1180 | ||
664 | #define PCI_DEVICE_ID_SI_5511 0x5511 | 672 | #define PCI_DEVICE_ID_SI_5511 0x5511 |
665 | #define PCI_DEVICE_ID_SI_5513 0x5513 | 673 | #define PCI_DEVICE_ID_SI_5513 0x5513 |
666 | #define PCI_DEVICE_ID_SI_5517 0x5517 | 674 | #define PCI_DEVICE_ID_SI_5517 0x5517 |
@@ -731,7 +739,6 @@ | |||
731 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 | 739 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 |
732 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 | 740 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 |
733 | 741 | ||
734 | |||
735 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B | 742 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B |
736 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 | 743 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 |
737 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 | 744 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 |
@@ -777,7 +784,6 @@ | |||
777 | 784 | ||
778 | #define PCI_VENDOR_ID_SONY 0x104d | 785 | #define PCI_VENDOR_ID_SONY 0x104d |
779 | 786 | ||
780 | |||
781 | /* Winbond have two vendor IDs! See 0x10ad as well */ | 787 | /* Winbond have two vendor IDs! See 0x10ad as well */ |
782 | #define PCI_VENDOR_ID_WINBOND2 0x1050 | 788 | #define PCI_VENDOR_ID_WINBOND2 0x1050 |
783 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a | 789 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a |
@@ -815,7 +821,6 @@ | |||
815 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 821 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
816 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 822 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
817 | 823 | ||
818 | |||
819 | #define PCI_VENDOR_ID_UMC 0x1060 | 824 | #define PCI_VENDOR_ID_UMC 0x1060 |
820 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 825 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
821 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 826 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
@@ -831,7 +836,6 @@ | |||
831 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 836 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
832 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | 837 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 |
833 | 838 | ||
834 | |||
835 | #define PCI_VENDOR_ID_APPLE 0x106b | 839 | #define PCI_VENDOR_ID_APPLE 0x106b |
836 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 | 840 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 |
837 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e | 841 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e |
@@ -867,7 +871,6 @@ | |||
867 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 | 871 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 |
868 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 | 872 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 |
869 | 873 | ||
870 | |||
871 | #define PCI_VENDOR_ID_QLOGIC 0x1077 | 874 | #define PCI_VENDOR_ID_QLOGIC 0x1077 |
872 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 | 875 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 |
873 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 | 876 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 |
@@ -898,12 +901,9 @@ | |||
898 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 | 901 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 |
899 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 | 902 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 |
900 | 903 | ||
901 | |||
902 | |||
903 | #define PCI_VENDOR_ID_CONTAQ 0x1080 | 904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 |
904 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 | 905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 |
905 | 906 | ||
906 | |||
907 | #define PCI_VENDOR_ID_OLICOM 0x108d | 907 | #define PCI_VENDOR_ID_OLICOM 0x108d |
908 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 | 908 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 |
909 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 | 909 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 |
@@ -935,23 +935,19 @@ | |||
935 | #define PCI_DEVICE_ID_SII_3112 0x3112 | 935 | #define PCI_DEVICE_ID_SII_3112 0x3112 |
936 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 | 936 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 |
937 | 937 | ||
938 | |||
939 | #define PCI_VENDOR_ID_BROOKTREE 0x109e | 938 | #define PCI_VENDOR_ID_BROOKTREE 0x109e |
940 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 | 939 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 |
941 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 | 940 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 |
942 | 941 | ||
943 | |||
944 | #define PCI_VENDOR_ID_SGI 0x10a9 | 942 | #define PCI_VENDOR_ID_SGI 0x10a9 |
945 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 | 943 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 |
944 | #define PCI_DEVICE_ID_SGI_LITHIUM 0x1002 | ||
946 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a | 945 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a |
947 | #define PCI_VENDOR_ID_SGI_LITHIUM 0x1002 | ||
948 | |||
949 | 946 | ||
950 | #define PCI_VENDOR_ID_WINBOND 0x10ad | 947 | #define PCI_VENDOR_ID_WINBOND 0x10ad |
951 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 | 948 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 |
952 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 | 949 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 |
953 | 950 | ||
954 | |||
955 | #define PCI_VENDOR_ID_PLX 0x10b5 | 951 | #define PCI_VENDOR_ID_PLX 0x10b5 |
956 | #define PCI_DEVICE_ID_PLX_R685 0x1030 | 952 | #define PCI_DEVICE_ID_PLX_R685 0x1030 |
957 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a | 953 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a |
@@ -985,7 +981,6 @@ | |||
985 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 | 981 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 |
986 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a | 982 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a |
987 | 983 | ||
988 | |||
989 | #define PCI_VENDOR_ID_AL 0x10b9 | 984 | #define PCI_VENDOR_ID_AL 0x10b9 |
990 | #define PCI_DEVICE_ID_AL_M1533 0x1533 | 985 | #define PCI_DEVICE_ID_AL_M1533 0x1533 |
991 | #define PCI_DEVICE_ID_AL_M1535 0x1535 | 986 | #define PCI_DEVICE_ID_AL_M1535 0x1535 |
@@ -1008,18 +1003,14 @@ | |||
1008 | #define PCI_DEVICE_ID_AL_M5451 0x5451 | 1003 | #define PCI_DEVICE_ID_AL_M5451 0x5451 |
1009 | #define PCI_DEVICE_ID_AL_M7101 0x7101 | 1004 | #define PCI_DEVICE_ID_AL_M7101 0x7101 |
1010 | 1005 | ||
1011 | |||
1012 | |||
1013 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 | 1006 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 |
1014 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | 1007 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 |
1015 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 | 1008 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 |
1016 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 | 1009 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 |
1017 | 1010 | ||
1018 | |||
1019 | #define PCI_VENDOR_ID_TCONRAD 0x10da | 1011 | #define PCI_VENDOR_ID_TCONRAD 0x10da |
1020 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 | 1012 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 |
1021 | 1013 | ||
1022 | |||
1023 | #define PCI_VENDOR_ID_NVIDIA 0x10de | 1014 | #define PCI_VENDOR_ID_NVIDIA 0x10de |
1024 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 | 1015 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 |
1025 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 | 1016 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 |
@@ -1233,14 +1224,13 @@ | |||
1233 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | 1224 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E |
1234 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F | 1225 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F |
1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1226 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1227 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | ||
1228 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | ||
1236 | 1229 | ||
1237 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1230 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1238 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1231 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
1239 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 | 1232 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 |
1240 | 1233 | ||
1241 | |||
1242 | |||
1243 | |||
1244 | #define PCI_VENDOR_ID_INTERG 0x10ea | 1234 | #define PCI_VENDOR_ID_INTERG 0x10ea |
1245 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 | 1235 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 |
1246 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 | 1236 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 |
@@ -1259,7 +1249,6 @@ | |||
1259 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 | 1249 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 |
1260 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 | 1250 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 |
1261 | 1251 | ||
1262 | |||
1263 | #define PCI_VENDOR_ID_INIT 0x1101 | 1252 | #define PCI_VENDOR_ID_INIT 0x1101 |
1264 | 1253 | ||
1265 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ | 1254 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ |
@@ -1354,7 +1343,6 @@ | |||
1354 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1343 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
1355 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 | 1344 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
1356 | 1345 | ||
1357 | |||
1358 | #define PCI_VENDOR_ID_VORTEX 0x1119 | 1346 | #define PCI_VENDOR_ID_VORTEX 0x1119 |
1359 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 | 1347 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 |
1360 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 | 1348 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 |
@@ -1380,8 +1368,8 @@ | |||
1380 | #define PCI_VENDOR_ID_EF 0x111a | 1368 | #define PCI_VENDOR_ID_EF 0x111a |
1381 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 | 1369 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 |
1382 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 | 1370 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 |
1383 | #define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003 | 1371 | #define PCI_DEVICE_ID_EF_ATM_LANAI2 0x0003 |
1384 | #define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005 | 1372 | #define PCI_DEVICE_ID_EF_ATM_LANAIHB 0x0005 |
1385 | 1373 | ||
1386 | #define PCI_VENDOR_ID_IDT 0x111d | 1374 | #define PCI_VENDOR_ID_IDT 0x111d |
1387 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 | 1375 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 |
@@ -1389,7 +1377,6 @@ | |||
1389 | #define PCI_VENDOR_ID_FORE 0x1127 | 1377 | #define PCI_VENDOR_ID_FORE 0x1127 |
1390 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 | 1378 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 |
1391 | 1379 | ||
1392 | |||
1393 | #define PCI_VENDOR_ID_PHILIPS 0x1131 | 1380 | #define PCI_VENDOR_ID_PHILIPS 0x1131 |
1394 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 | 1381 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 |
1395 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 | 1382 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 |
@@ -1408,7 +1395,6 @@ | |||
1408 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 | 1395 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 |
1409 | 1396 | ||
1410 | 1397 | ||
1411 | |||
1412 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 | 1398 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 |
1413 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 | 1399 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 |
1414 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 | 1400 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 |
@@ -1416,7 +1402,6 @@ | |||
1416 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 | 1402 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 |
1417 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 | 1403 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 |
1418 | 1404 | ||
1419 | |||
1420 | #define PCI_VENDOR_ID_DIGI 0x114f | 1405 | #define PCI_VENDOR_ID_DIGI 0x114f |
1421 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 | 1406 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 |
1422 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 | 1407 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 |
@@ -1427,12 +1412,10 @@ | |||
1427 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA | 1412 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA |
1428 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB | 1413 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB |
1429 | 1414 | ||
1430 | |||
1431 | #define PCI_VENDOR_ID_XIRCOM 0x115d | 1415 | #define PCI_VENDOR_ID_XIRCOM 0x115d |
1432 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 | 1416 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 |
1433 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 | 1417 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 |
1434 | 1418 | ||
1435 | |||
1436 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 | 1419 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 |
1437 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1420 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1438 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1421 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
@@ -1501,7 +1484,6 @@ | |||
1501 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 | 1484 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 |
1502 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 | 1485 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 |
1503 | 1486 | ||
1504 | |||
1505 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e | 1487 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e |
1506 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 | 1488 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 |
1507 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 | 1489 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 |
@@ -1519,28 +1501,23 @@ | |||
1519 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1501 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
1520 | #define PCI_DEVICE_ID_V3_V351 0x0002 | 1502 | #define PCI_DEVICE_ID_V3_V351 0x0002 |
1521 | 1503 | ||
1522 | |||
1523 | #define PCI_VENDOR_ID_ATT 0x11c1 | 1504 | #define PCI_VENDOR_ID_ATT 0x11c1 |
1524 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 | 1505 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 |
1525 | 1506 | ||
1526 | |||
1527 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb | 1507 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb |
1528 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 | 1508 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 |
1529 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 | 1509 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 |
1530 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 | 1510 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 |
1531 | 1511 | ||
1532 | |||
1533 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 | 1512 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 |
1534 | #define PCI_DEVICE_ID_AD1889JS 0x1889 | 1513 | #define PCI_DEVICE_ID_AD1889JS 0x1889 |
1535 | 1514 | ||
1536 | |||
1537 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 | 1515 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 |
1538 | 1516 | ||
1539 | #define PCI_VENDOR_ID_ZORAN 0x11de | 1517 | #define PCI_VENDOR_ID_ZORAN 0x11de |
1540 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 | 1518 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 |
1541 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 | 1519 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 |
1542 | 1520 | ||
1543 | |||
1544 | #define PCI_VENDOR_ID_COMPEX 0x11f6 | 1521 | #define PCI_VENDOR_ID_COMPEX 0x11f6 |
1545 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 | 1522 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 |
1546 | 1523 | ||
@@ -1599,8 +1576,6 @@ | |||
1599 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 | 1576 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 |
1600 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 | 1577 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 |
1601 | 1578 | ||
1602 | |||
1603 | |||
1604 | #define PCI_VENDOR_ID_AVM 0x1244 | 1579 | #define PCI_VENDOR_ID_AVM 0x1244 |
1605 | #define PCI_DEVICE_ID_AVM_B1 0x0700 | 1580 | #define PCI_DEVICE_ID_AVM_B1 0x0700 |
1606 | #define PCI_DEVICE_ID_AVM_C4 0x0800 | 1581 | #define PCI_DEVICE_ID_AVM_C4 0x0800 |
@@ -1609,7 +1584,6 @@ | |||
1609 | #define PCI_DEVICE_ID_AVM_C2 0x1100 | 1584 | #define PCI_DEVICE_ID_AVM_C2 0x1100 |
1610 | #define PCI_DEVICE_ID_AVM_T1 0x1200 | 1585 | #define PCI_DEVICE_ID_AVM_T1 0x1200 |
1611 | 1586 | ||
1612 | |||
1613 | #define PCI_VENDOR_ID_STALLION 0x124d | 1587 | #define PCI_VENDOR_ID_STALLION 0x124d |
1614 | 1588 | ||
1615 | /* Allied Telesyn */ | 1589 | /* Allied Telesyn */ |
@@ -1632,7 +1606,6 @@ | |||
1632 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 | 1606 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 |
1633 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 | 1607 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 |
1634 | 1608 | ||
1635 | |||
1636 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 | 1609 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 |
1637 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 | 1610 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 |
1638 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 | 1611 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 |
@@ -1655,7 +1628,6 @@ | |||
1655 | 1628 | ||
1656 | #define PCI_VENDOR_ID_ALTEON 0x12ae | 1629 | #define PCI_VENDOR_ID_ALTEON 0x12ae |
1657 | 1630 | ||
1658 | |||
1659 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 | 1631 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 |
1660 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 | 1632 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 |
1661 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 | 1633 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 |
@@ -1686,7 +1658,6 @@ | |||
1686 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 | 1658 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 |
1687 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 | 1659 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 |
1688 | 1660 | ||
1689 | |||
1690 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 | 1661 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 |
1691 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 | 1662 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 |
1692 | 1663 | ||
@@ -1796,7 +1767,6 @@ | |||
1796 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 | 1767 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 |
1797 | #define PCI_DEVICE_ID_LMC_T1 0x0006 | 1768 | #define PCI_DEVICE_ID_LMC_T1 0x0006 |
1798 | 1769 | ||
1799 | |||
1800 | #define PCI_VENDOR_ID_NETGEAR 0x1385 | 1770 | #define PCI_VENDOR_ID_NETGEAR 0x1385 |
1801 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a | 1771 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a |
1802 | 1772 | ||
@@ -1899,6 +1869,8 @@ | |||
1899 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 | 1869 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 |
1900 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 | 1870 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 |
1901 | 1871 | ||
1872 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
1873 | |||
1902 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1874 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1903 | 1875 | ||
1904 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1876 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
@@ -1997,6 +1969,7 @@ | |||
1997 | 1969 | ||
1998 | #define PCI_VENDOR_ID_ENE 0x1524 | 1970 | #define PCI_VENDOR_ID_ENE 0x1524 |
1999 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | 1971 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 |
1972 | #define PCI_DEVICE_ID_ENE_CB712_SD_2 0x0551 | ||
2000 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1973 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
2001 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1974 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
2002 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1975 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
@@ -2006,13 +1979,10 @@ | |||
2006 | #define PCI_DEVICE_ID_ENE_720 0x1421 | 1979 | #define PCI_DEVICE_ID_ENE_720 0x1421 |
2007 | #define PCI_DEVICE_ID_ENE_722 0x1422 | 1980 | #define PCI_DEVICE_ID_ENE_722 0x1422 |
2008 | 1981 | ||
2009 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
2010 | |||
2011 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | 1982 | #define PCI_SUBVENDOR_ID_PERLE 0x155f |
2012 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | 1983 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 |
2013 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | 1984 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 |
2014 | 1985 | ||
2015 | |||
2016 | #define PCI_VENDOR_ID_SYBA 0x1592 | 1986 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2017 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 1987 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2018 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 1988 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
@@ -2031,8 +2001,10 @@ | |||
2031 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2001 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2032 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2002 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2033 | 2003 | ||
2034 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2004 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2005 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
2035 | 2006 | ||
2007 | #define PCI_VENDOR_ID_PDC 0x15e9 | ||
2036 | 2008 | ||
2037 | #define PCI_VENDOR_ID_FARSITE 0x1619 | 2009 | #define PCI_VENDOR_ID_FARSITE 0x1619 |
2038 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 | 2010 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 |
@@ -2049,6 +2021,8 @@ | |||
2049 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 | 2021 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 |
2050 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 | 2022 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 |
2051 | 2023 | ||
2024 | #define PCI_VENDOR_ID_ATHEROS 0x168c | ||
2025 | |||
2052 | #define PCI_VENDOR_ID_NETCELL 0x169c | 2026 | #define PCI_VENDOR_ID_NETCELL 0x169c |
2053 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 | 2027 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 |
2054 | 2028 | ||
@@ -2087,7 +2061,6 @@ | |||
2087 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 | 2061 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 |
2088 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 | 2062 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 |
2089 | 2063 | ||
2090 | |||
2091 | #define PCI_VENDOR_ID_SITECOM 0x182d | 2064 | #define PCI_VENDOR_ID_SITECOM 0x182d |
2092 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | 2065 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 |
2093 | 2066 | ||
@@ -2123,12 +2096,9 @@ | |||
2123 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 | 2096 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 |
2124 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 | 2097 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 |
2125 | 2098 | ||
2126 | |||
2127 | #define PCI_VENDOR_ID_AKS 0x416c | 2099 | #define PCI_VENDOR_ID_AKS 0x416c |
2128 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 | 2100 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 |
2129 | 2101 | ||
2130 | |||
2131 | |||
2132 | #define PCI_VENDOR_ID_S3 0x5333 | 2102 | #define PCI_VENDOR_ID_S3 0x5333 |
2133 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 | 2103 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 |
2134 | #define PCI_DEVICE_ID_S3_868 0x8880 | 2104 | #define PCI_DEVICE_ID_S3_868 0x8880 |
@@ -2140,7 +2110,6 @@ | |||
2140 | #define PCI_VENDOR_ID_DUNORD 0x5544 | 2110 | #define PCI_VENDOR_ID_DUNORD 0x5544 |
2141 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 | 2111 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 |
2142 | 2112 | ||
2143 | |||
2144 | #define PCI_VENDOR_ID_DCI 0x6666 | 2113 | #define PCI_VENDOR_ID_DCI 0x6666 |
2145 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 | 2114 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 |
2146 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 | 2115 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 |
@@ -2384,7 +2353,6 @@ | |||
2384 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 | 2353 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 |
2385 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 | 2354 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 |
2386 | 2355 | ||
2387 | |||
2388 | #define PCI_VENDOR_ID_HOLTEK 0x9412 | 2356 | #define PCI_VENDOR_ID_HOLTEK 0x9412 |
2389 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 | 2357 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 |
2390 | 2358 | ||
@@ -2400,6 +2368,8 @@ | |||
2400 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2368 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2401 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2369 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2402 | 2370 | ||
2371 | #define PCI_VENDOR_ID_3COM_2 0xa727 | ||
2372 | |||
2403 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2373 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2404 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2374 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2405 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | 2375 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 |
@@ -2408,13 +2378,7 @@ | |||
2408 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2378 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
2409 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 | 2379 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 |
2410 | 2380 | ||
2411 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
2412 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A | ||
2413 | |||
2414 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 | 2381 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 |
2415 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 | 2382 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 |
2416 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 | 2383 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 |
2417 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 | 2384 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 |
2418 | |||
2419 | #define PCI_VENDOR_ID_QUICKNET 0x15E2 | ||
2420 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h new file mode 100644 index 000000000000..1375f15797e7 --- /dev/null +++ b/include/linux/pda_power.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Common power driver for PDAs and phones with one or two external | ||
3 | * power supplies (AC/USB) connected to main and backup batteries, | ||
4 | * and optional builtin charger. | ||
5 | * | ||
6 | * Copyright © 2007 Anton Vorontsov <cbou@mail.ru> | ||
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 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PDA_POWER_H__ | ||
14 | #define __PDA_POWER_H__ | ||
15 | |||
16 | #define PDA_POWER_CHARGE_AC (1 << 0) | ||
17 | #define PDA_POWER_CHARGE_USB (1 << 1) | ||
18 | |||
19 | struct pda_power_pdata { | ||
20 | int (*is_ac_online)(void); | ||
21 | int (*is_usb_online)(void); | ||
22 | void (*set_charge)(int flags); | ||
23 | |||
24 | char **supplied_to; | ||
25 | size_t num_supplicants; | ||
26 | |||
27 | unsigned int wait_for_status; /* msecs, default is 500 */ | ||
28 | unsigned int wait_for_charger; /* msecs, default is 500 */ | ||
29 | }; | ||
30 | |||
31 | #endif /* __PDA_POWER_H__ */ | ||
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/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 8bcbc54e1b48..8e4120285f72 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -9,48 +9,125 @@ | |||
9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ | 9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ |
10 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ | 10 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ |
11 | 11 | ||
12 | /** | ||
13 | * struct pipe_buffer - a linux kernel pipe buffer | ||
14 | * @page: the page containing the data for the pipe buffer | ||
15 | * @offset: offset of data inside the @page | ||
16 | * @len: length of data inside the @page | ||
17 | * @ops: operations associated with this buffer. See @pipe_buf_operations. | ||
18 | * @flags: pipe buffer flags. See above. | ||
19 | * @private: private data owned by the ops. | ||
20 | **/ | ||
12 | struct pipe_buffer { | 21 | struct pipe_buffer { |
13 | struct page *page; | 22 | struct page *page; |
14 | unsigned int offset, len; | 23 | unsigned int offset, len; |
15 | const struct pipe_buf_operations *ops; | 24 | const struct pipe_buf_operations *ops; |
16 | unsigned int flags; | 25 | unsigned int flags; |
26 | unsigned long private; | ||
27 | }; | ||
28 | |||
29 | /** | ||
30 | * struct pipe_inode_info - a linux kernel pipe | ||
31 | * @wait: reader/writer wait point in case of empty/full pipe | ||
32 | * @nrbufs: the number of non-empty pipe buffers in this pipe | ||
33 | * @curbuf: the current pipe buffer entry | ||
34 | * @tmp_page: cached released page | ||
35 | * @readers: number of current readers of this pipe | ||
36 | * @writers: number of current writers of this pipe | ||
37 | * @waiting_writers: number of writers blocked waiting for room | ||
38 | * @r_counter: reader counter | ||
39 | * @w_counter: writer counter | ||
40 | * @fasync_readers: reader side fasync | ||
41 | * @fasync_writers: writer side fasync | ||
42 | * @inode: inode this pipe is attached to | ||
43 | * @bufs: the circular array of pipe buffers | ||
44 | **/ | ||
45 | struct pipe_inode_info { | ||
46 | wait_queue_head_t wait; | ||
47 | unsigned int nrbufs, curbuf; | ||
48 | struct page *tmp_page; | ||
49 | unsigned int readers; | ||
50 | unsigned int writers; | ||
51 | unsigned int waiting_writers; | ||
52 | unsigned int r_counter; | ||
53 | unsigned int w_counter; | ||
54 | struct fasync_struct *fasync_readers; | ||
55 | struct fasync_struct *fasync_writers; | ||
56 | struct inode *inode; | ||
57 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
17 | }; | 58 | }; |
18 | 59 | ||
19 | /* | 60 | /* |
20 | * Note on the nesting of these functions: | 61 | * Note on the nesting of these functions: |
21 | * | 62 | * |
22 | * ->pin() | 63 | * ->confirm() |
23 | * ->steal() | 64 | * ->steal() |
24 | * ... | 65 | * ... |
25 | * ->map() | 66 | * ->map() |
26 | * ... | 67 | * ... |
27 | * ->unmap() | 68 | * ->unmap() |
28 | * | 69 | * |
29 | * That is, ->map() must be called on a pinned buffer, same goes for ->steal(). | 70 | * That is, ->map() must be called on a confirmed buffer, |
71 | * same goes for ->steal(). See below for the meaning of each | ||
72 | * operation. Also see kerneldoc in fs/pipe.c for the pipe | ||
73 | * and generic variants of these hooks. | ||
30 | */ | 74 | */ |
31 | struct pipe_buf_operations { | 75 | struct pipe_buf_operations { |
76 | /* | ||
77 | * This is set to 1, if the generic pipe read/write may coalesce | ||
78 | * data into an existing buffer. If this is set to 0, a new pipe | ||
79 | * page segment is always used for new data. | ||
80 | */ | ||
32 | int can_merge; | 81 | int can_merge; |
82 | |||
83 | /* | ||
84 | * ->map() returns a virtual address mapping of the pipe buffer. | ||
85 | * The last integer flag reflects whether this should be an atomic | ||
86 | * mapping or not. The atomic map is faster, however you can't take | ||
87 | * page faults before calling ->unmap() again. So if you need to eg | ||
88 | * access user data through copy_to/from_user(), then you must get | ||
89 | * a non-atomic map. ->map() uses the KM_USER0 atomic slot for | ||
90 | * atomic maps, so you can't map more than one pipe_buffer at once | ||
91 | * and you have to be careful if mapping another page as source | ||
92 | * or destination for a copy (IOW, it has to use something else | ||
93 | * than KM_USER0). | ||
94 | */ | ||
33 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); | 95 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); |
96 | |||
97 | /* | ||
98 | * Undoes ->map(), finishes the virtual mapping of the pipe buffer. | ||
99 | */ | ||
34 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); | 100 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); |
35 | int (*pin)(struct pipe_inode_info *, struct pipe_buffer *); | 101 | |
102 | /* | ||
103 | * ->confirm() verifies that the data in the pipe buffer is there | ||
104 | * and that the contents are good. If the pages in the pipe belong | ||
105 | * to a file system, we may need to wait for IO completion in this | ||
106 | * hook. Returns 0 for good, or a negative error value in case of | ||
107 | * error. | ||
108 | */ | ||
109 | int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *); | ||
110 | |||
111 | /* | ||
112 | * When the contents of this pipe buffer has been completely | ||
113 | * consumed by a reader, ->release() is called. | ||
114 | */ | ||
36 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 115 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
116 | |||
117 | /* | ||
118 | * Attempt to take ownership of the pipe buffer and its contents. | ||
119 | * ->steal() returns 0 for success, in which case the contents | ||
120 | * of the pipe (the buf->page) is locked and now completely owned | ||
121 | * by the caller. The page may then be transferred to a different | ||
122 | * mapping, the most often used case is insertion into different | ||
123 | * file address space cache. | ||
124 | */ | ||
37 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | 125 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); |
38 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | ||
39 | }; | ||
40 | 126 | ||
41 | struct pipe_inode_info { | 127 | /* |
42 | wait_queue_head_t wait; | 128 | * Get a reference to the pipe buffer. |
43 | unsigned int nrbufs, curbuf; | 129 | */ |
44 | struct page *tmp_page; | 130 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); |
45 | unsigned int readers; | ||
46 | unsigned int writers; | ||
47 | unsigned int waiting_writers; | ||
48 | unsigned int r_counter; | ||
49 | unsigned int w_counter; | ||
50 | struct fasync_struct *fasync_readers; | ||
51 | struct fasync_struct *fasync_writers; | ||
52 | struct inode *inode; | ||
53 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
54 | }; | 131 | }; |
55 | 132 | ||
56 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 133 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
@@ -68,39 +145,7 @@ void __free_pipe_info(struct pipe_inode_info *); | |||
68 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); | 145 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); |
69 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); | 146 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); |
70 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | 147 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); |
71 | int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *); | 148 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); |
72 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); | 149 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
73 | 150 | ||
74 | /* | ||
75 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
76 | * add the splice flags here. | ||
77 | */ | ||
78 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
79 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
80 | /* we may still block on the fd we splice */ | ||
81 | /* from/to, of course */ | ||
82 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
83 | #define SPLICE_F_GIFT (0x08) /* pages passed in are a gift */ | ||
84 | |||
85 | /* | ||
86 | * Passed to the actors | ||
87 | */ | ||
88 | struct splice_desc { | ||
89 | unsigned int len, total_len; /* current and remaining length */ | ||
90 | unsigned int flags; /* splice flags */ | ||
91 | struct file *file; /* file to read/write */ | ||
92 | loff_t pos; /* file position */ | ||
93 | }; | ||
94 | |||
95 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
96 | struct splice_desc *); | ||
97 | |||
98 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
99 | loff_t *, size_t, unsigned int, | ||
100 | splice_actor *); | ||
101 | |||
102 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
103 | loff_t *, size_t, unsigned int, | ||
104 | splice_actor *); | ||
105 | |||
106 | #endif | 151 | #endif |
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 87545e0f0b58..273781c82e4d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -110,37 +110,67 @@ typedef int __bitwise suspend_state_t; | |||
110 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) | 110 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * struct pm_ops - Callbacks for managing platform dependent suspend states. | 113 | * struct pm_ops - Callbacks for managing platform dependent system sleep |
114 | * @valid: Callback to determine whether the given state can be entered. | 114 | * states. |
115 | * Valid states are advertised in /sys/power/state but can still | ||
116 | * be rejected by prepare or enter if the conditions aren't right. | ||
117 | * There is a %pm_valid_only_mem function available that can be assigned | ||
118 | * to this if you only implement mem sleep. | ||
119 | * | 115 | * |
120 | * @prepare: Prepare the platform for the given suspend state. Can return a | 116 | * @valid: Callback to determine if given system sleep state is supported by |
121 | * negative error code if necessary. | 117 | * the platform. |
118 | * Valid (ie. supported) states are advertised in /sys/power/state. Note | ||
119 | * that it still may be impossible to enter given system sleep state if the | ||
120 | * conditions aren't right. | ||
121 | * There is the %pm_valid_only_mem function available that can be assigned | ||
122 | * to this if the platform only supports mem sleep. | ||
122 | * | 123 | * |
123 | * @enter: Enter the given suspend state, must be assigned. Can return a | 124 | * @set_target: Tell the platform which system sleep state is going to be |
124 | * negative error code if necessary. | 125 | * entered. |
126 | * @set_target() is executed right prior to suspending devices. The | ||
127 | * information conveyed to the platform code by @set_target() should be | ||
128 | * disregarded by the platform as soon as @finish() is executed and if | ||
129 | * @prepare() fails. If @set_target() fails (ie. returns nonzero), | ||
130 | * @prepare(), @enter() and @finish() will not be called by the PM core. | ||
131 | * This callback is optional. However, if it is implemented, the argument | ||
132 | * passed to @prepare(), @enter() and @finish() is meaningless and should | ||
133 | * be ignored. | ||
125 | * | 134 | * |
126 | * @finish: Called when the system has left the given state and all devices | 135 | * @prepare: Prepare the platform for entering the system sleep state indicated |
127 | * are resumed. The return value is ignored. | 136 | * by @set_target() or represented by the argument if @set_target() is not |
137 | * implemented. | ||
138 | * @prepare() is called right after devices have been suspended (ie. the | ||
139 | * appropriate .suspend() method has been executed for each device) and | ||
140 | * before the nonboot CPUs are disabled (it is executed with IRQs enabled). | ||
141 | * This callback is optional. It returns 0 on success or a negative | ||
142 | * error code otherwise, in which case the system cannot enter the desired | ||
143 | * sleep state (@enter() and @finish() will not be called in that case). | ||
144 | * | ||
145 | * @enter: Enter the system sleep state indicated by @set_target() or | ||
146 | * represented by the argument if @set_target() is not implemented. | ||
147 | * This callback is mandatory. It returns 0 on success or a negative | ||
148 | * error code otherwise, in which case the system cannot enter the desired | ||
149 | * sleep state. | ||
150 | * | ||
151 | * @finish: Called when the system has just left a sleep state, right after | ||
152 | * the nonboot CPUs have been enabled and before devices are resumed (it is | ||
153 | * executed with IRQs enabled). If @set_target() is not implemented, the | ||
154 | * argument represents the sleep state being left. | ||
155 | * This callback is optional, but should be implemented by the platforms | ||
156 | * that implement @prepare(). If implemented, it is always called after | ||
157 | * @enter() (even if @enter() fails). | ||
128 | */ | 158 | */ |
129 | struct pm_ops { | 159 | struct pm_ops { |
130 | int (*valid)(suspend_state_t state); | 160 | int (*valid)(suspend_state_t state); |
161 | int (*set_target)(suspend_state_t state); | ||
131 | int (*prepare)(suspend_state_t state); | 162 | int (*prepare)(suspend_state_t state); |
132 | int (*enter)(suspend_state_t state); | 163 | int (*enter)(suspend_state_t state); |
133 | int (*finish)(suspend_state_t state); | 164 | int (*finish)(suspend_state_t state); |
134 | }; | 165 | }; |
135 | 166 | ||
167 | extern struct pm_ops *pm_ops; | ||
168 | |||
136 | /** | 169 | /** |
137 | * pm_set_ops - set platform dependent power management ops | 170 | * pm_set_ops - set platform dependent power management ops |
138 | * @pm_ops: The new power management operations to set. | 171 | * @pm_ops: The new power management operations to set. |
139 | */ | 172 | */ |
140 | extern void pm_set_ops(struct pm_ops *pm_ops); | 173 | extern void pm_set_ops(struct pm_ops *pm_ops); |
141 | extern struct pm_ops *pm_ops; | ||
142 | extern int pm_suspend(suspend_state_t state); | ||
143 | |||
144 | extern int pm_valid_only_mem(suspend_state_t state); | 174 | extern int pm_valid_only_mem(suspend_state_t state); |
145 | 175 | ||
146 | /** | 176 | /** |
@@ -161,6 +191,8 @@ extern void arch_suspend_disable_irqs(void); | |||
161 | */ | 191 | */ |
162 | extern void arch_suspend_enable_irqs(void); | 192 | extern void arch_suspend_enable_irqs(void); |
163 | 193 | ||
194 | extern int pm_suspend(suspend_state_t state); | ||
195 | |||
164 | /* | 196 | /* |
165 | * Device power management | 197 | * Device power management |
166 | */ | 198 | */ |
@@ -235,15 +267,10 @@ struct dev_pm_info { | |||
235 | unsigned can_wakeup:1; | 267 | unsigned can_wakeup:1; |
236 | #ifdef CONFIG_PM | 268 | #ifdef CONFIG_PM |
237 | unsigned should_wakeup:1; | 269 | unsigned should_wakeup:1; |
238 | pm_message_t prev_state; | ||
239 | void * saved_state; | ||
240 | struct device * pm_parent; | ||
241 | struct list_head entry; | 270 | struct list_head entry; |
242 | #endif | 271 | #endif |
243 | }; | 272 | }; |
244 | 273 | ||
245 | extern void device_pm_set_parent(struct device * dev, struct device * parent); | ||
246 | |||
247 | extern int device_power_down(pm_message_t state); | 274 | extern int device_power_down(pm_message_t state); |
248 | extern void device_power_up(void); | 275 | extern void device_power_up(void); |
249 | extern void device_resume(void); | 276 | extern void device_resume(void); |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h new file mode 100644 index 000000000000..606c0957997f --- /dev/null +++ b/include/linux/power_supply.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Universal power supply monitor class | ||
3 | * | ||
4 | * Copyright © 2007 Anton Vorontsov <cbou@mail.ru> | ||
5 | * Copyright © 2004 Szabolcs Gyurko | ||
6 | * Copyright © 2003 Ian Molton <spyro@f2s.com> | ||
7 | * | ||
8 | * Modified: 2004, Oct Szabolcs Gyurko | ||
9 | * | ||
10 | * You may use this code as per GPL version 2 | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_POWER_SUPPLY_H__ | ||
14 | #define __LINUX_POWER_SUPPLY_H__ | ||
15 | |||
16 | #include <linux/device.h> | ||
17 | #include <linux/workqueue.h> | ||
18 | #include <linux/leds.h> | ||
19 | |||
20 | /* | ||
21 | * All voltages, currents, charges, energies, time and temperatures in uV, | ||
22 | * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise | ||
23 | * stated. It's driver's job to convert its raw values to units in which | ||
24 | * this class operates. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * For systems where the charger determines the maximum battery capacity | ||
29 | * the min and max fields should be used to present these values to user | ||
30 | * space. Unused/unknown fields will not appear in sysfs. | ||
31 | */ | ||
32 | |||
33 | enum { | ||
34 | POWER_SUPPLY_STATUS_UNKNOWN = 0, | ||
35 | POWER_SUPPLY_STATUS_CHARGING, | ||
36 | POWER_SUPPLY_STATUS_DISCHARGING, | ||
37 | POWER_SUPPLY_STATUS_NOT_CHARGING, | ||
38 | POWER_SUPPLY_STATUS_FULL, | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | POWER_SUPPLY_HEALTH_UNKNOWN = 0, | ||
43 | POWER_SUPPLY_HEALTH_GOOD, | ||
44 | POWER_SUPPLY_HEALTH_OVERHEAT, | ||
45 | POWER_SUPPLY_HEALTH_DEAD, | ||
46 | POWER_SUPPLY_HEALTH_OVERVOLTAGE, | ||
47 | POWER_SUPPLY_HEALTH_UNSPEC_FAILURE, | ||
48 | }; | ||
49 | |||
50 | enum { | ||
51 | POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0, | ||
52 | POWER_SUPPLY_TECHNOLOGY_NiMH, | ||
53 | POWER_SUPPLY_TECHNOLOGY_LION, | ||
54 | POWER_SUPPLY_TECHNOLOGY_LIPO, | ||
55 | POWER_SUPPLY_TECHNOLOGY_LiFe, | ||
56 | POWER_SUPPLY_TECHNOLOGY_NiCd, | ||
57 | }; | ||
58 | |||
59 | enum { | ||
60 | POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0, | ||
61 | POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL, | ||
62 | POWER_SUPPLY_CAPACITY_LEVEL_LOW, | ||
63 | POWER_SUPPLY_CAPACITY_LEVEL_NORMAL, | ||
64 | POWER_SUPPLY_CAPACITY_LEVEL_HIGH, | ||
65 | POWER_SUPPLY_CAPACITY_LEVEL_FULL, | ||
66 | }; | ||
67 | |||
68 | enum power_supply_property { | ||
69 | /* Properties of type `int' */ | ||
70 | POWER_SUPPLY_PROP_STATUS = 0, | ||
71 | POWER_SUPPLY_PROP_HEALTH, | ||
72 | POWER_SUPPLY_PROP_PRESENT, | ||
73 | POWER_SUPPLY_PROP_ONLINE, | ||
74 | POWER_SUPPLY_PROP_TECHNOLOGY, | ||
75 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | ||
76 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | ||
77 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | ||
78 | POWER_SUPPLY_PROP_VOLTAGE_AVG, | ||
79 | POWER_SUPPLY_PROP_CURRENT_NOW, | ||
80 | POWER_SUPPLY_PROP_CURRENT_AVG, | ||
81 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, | ||
82 | POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, | ||
83 | POWER_SUPPLY_PROP_CHARGE_FULL, | ||
84 | POWER_SUPPLY_PROP_CHARGE_EMPTY, | ||
85 | POWER_SUPPLY_PROP_CHARGE_NOW, | ||
86 | POWER_SUPPLY_PROP_CHARGE_AVG, | ||
87 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, | ||
88 | POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, | ||
89 | POWER_SUPPLY_PROP_ENERGY_FULL, | ||
90 | POWER_SUPPLY_PROP_ENERGY_EMPTY, | ||
91 | POWER_SUPPLY_PROP_ENERGY_NOW, | ||
92 | POWER_SUPPLY_PROP_ENERGY_AVG, | ||
93 | POWER_SUPPLY_PROP_CAPACITY, /* in percents! */ | ||
94 | POWER_SUPPLY_PROP_CAPACITY_LEVEL, | ||
95 | POWER_SUPPLY_PROP_TEMP, | ||
96 | POWER_SUPPLY_PROP_TEMP_AMBIENT, | ||
97 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, | ||
98 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG, | ||
99 | POWER_SUPPLY_PROP_TIME_TO_FULL_NOW, | ||
100 | POWER_SUPPLY_PROP_TIME_TO_FULL_AVG, | ||
101 | /* Properties of type `const char *' */ | ||
102 | POWER_SUPPLY_PROP_MODEL_NAME, | ||
103 | POWER_SUPPLY_PROP_MANUFACTURER, | ||
104 | }; | ||
105 | |||
106 | enum power_supply_type { | ||
107 | POWER_SUPPLY_TYPE_BATTERY = 0, | ||
108 | POWER_SUPPLY_TYPE_UPS, | ||
109 | POWER_SUPPLY_TYPE_MAINS, | ||
110 | POWER_SUPPLY_TYPE_USB, | ||
111 | }; | ||
112 | |||
113 | union power_supply_propval { | ||
114 | int intval; | ||
115 | const char *strval; | ||
116 | }; | ||
117 | |||
118 | struct power_supply { | ||
119 | const char *name; | ||
120 | enum power_supply_type type; | ||
121 | enum power_supply_property *properties; | ||
122 | size_t num_properties; | ||
123 | |||
124 | char **supplied_to; | ||
125 | size_t num_supplicants; | ||
126 | |||
127 | int (*get_property)(struct power_supply *psy, | ||
128 | enum power_supply_property psp, | ||
129 | union power_supply_propval *val); | ||
130 | void (*external_power_changed)(struct power_supply *psy); | ||
131 | |||
132 | /* For APM emulation, think legacy userspace. */ | ||
133 | int use_for_apm; | ||
134 | |||
135 | /* private */ | ||
136 | struct device *dev; | ||
137 | struct work_struct changed_work; | ||
138 | |||
139 | #ifdef CONFIG_LEDS_TRIGGERS | ||
140 | struct led_trigger *charging_full_trig; | ||
141 | char *charging_full_trig_name; | ||
142 | struct led_trigger *charging_trig; | ||
143 | char *charging_trig_name; | ||
144 | struct led_trigger *full_trig; | ||
145 | char *full_trig_name; | ||
146 | struct led_trigger *online_trig; | ||
147 | char *online_trig_name; | ||
148 | #endif | ||
149 | }; | ||
150 | |||
151 | /* | ||
152 | * This is recommended structure to specify static power supply parameters. | ||
153 | * Generic one, parametrizable for different power supplies. Power supply | ||
154 | * class itself does not use it, but that's what implementing most platform | ||
155 | * drivers, should try reuse for consistency. | ||
156 | */ | ||
157 | |||
158 | struct power_supply_info { | ||
159 | const char *name; | ||
160 | int technology; | ||
161 | int voltage_max_design; | ||
162 | int voltage_min_design; | ||
163 | int charge_full_design; | ||
164 | int charge_empty_design; | ||
165 | int energy_full_design; | ||
166 | int energy_empty_design; | ||
167 | int use_for_apm; | ||
168 | }; | ||
169 | |||
170 | extern void power_supply_changed(struct power_supply *psy); | ||
171 | extern int power_supply_am_i_supplied(struct power_supply *psy); | ||
172 | |||
173 | extern int power_supply_register(struct device *parent, | ||
174 | struct power_supply *psy); | ||
175 | extern void power_supply_unregister(struct power_supply *psy); | ||
176 | |||
177 | /* For APM emulation, think legacy userspace. */ | ||
178 | extern struct class *power_supply_class; | ||
179 | |||
180 | #endif /* __LINUX_POWER_SUPPLY_H__ */ | ||
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 d58e74b98367..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 |
@@ -34,6 +35,8 @@ | |||
34 | #define SCHED_FIFO 1 | 35 | #define SCHED_FIFO 1 |
35 | #define SCHED_RR 2 | 36 | #define SCHED_RR 2 |
36 | #define SCHED_BATCH 3 | 37 | #define SCHED_BATCH 3 |
38 | /* SCHED_ISO: reserved but not implemented yet */ | ||
39 | #define SCHED_IDLE 5 | ||
37 | 40 | ||
38 | #ifdef __KERNEL__ | 41 | #ifdef __KERNEL__ |
39 | 42 | ||
@@ -130,6 +133,26 @@ extern unsigned long nr_active(void); | |||
130 | extern unsigned long nr_iowait(void); | 133 | extern unsigned long nr_iowait(void); |
131 | extern unsigned long weighted_cpuload(const int cpu); | 134 | extern unsigned long weighted_cpuload(const int cpu); |
132 | 135 | ||
136 | struct seq_file; | ||
137 | struct cfs_rq; | ||
138 | #ifdef CONFIG_SCHED_DEBUG | ||
139 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | ||
140 | extern void proc_sched_set_task(struct task_struct *p); | ||
141 | extern void | ||
142 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq, u64 now); | ||
143 | #else | ||
144 | static inline void | ||
145 | proc_sched_show_task(struct task_struct *p, struct seq_file *m) | ||
146 | { | ||
147 | } | ||
148 | static inline void proc_sched_set_task(struct task_struct *p) | ||
149 | { | ||
150 | } | ||
151 | static inline void | ||
152 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq, u64 now) | ||
153 | { | ||
154 | } | ||
155 | #endif | ||
133 | 156 | ||
134 | /* | 157 | /* |
135 | * Task state bitmask. NOTE! These bits are also | 158 | * Task state bitmask. NOTE! These bits are also |
@@ -193,6 +216,7 @@ struct task_struct; | |||
193 | extern void sched_init(void); | 216 | extern void sched_init(void); |
194 | extern void sched_init_smp(void); | 217 | extern void sched_init_smp(void); |
195 | extern void init_idle(struct task_struct *idle, int cpu); | 218 | extern void init_idle(struct task_struct *idle, int cpu); |
219 | extern void init_idle_bootup_task(struct task_struct *idle); | ||
196 | 220 | ||
197 | extern cpumask_t nohz_cpu_mask; | 221 | extern cpumask_t nohz_cpu_mask; |
198 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 222 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
@@ -264,6 +288,7 @@ extern signed long schedule_timeout_uninterruptible(signed long timeout); | |||
264 | asmlinkage void schedule(void); | 288 | asmlinkage void schedule(void); |
265 | 289 | ||
266 | struct nsproxy; | 290 | struct nsproxy; |
291 | struct user_namespace; | ||
267 | 292 | ||
268 | /* 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 */ |
269 | #define DEFAULT_MAX_MAP_COUNT 65536 | 294 | #define DEFAULT_MAX_MAP_COUNT 65536 |
@@ -479,7 +504,7 @@ struct signal_struct { | |||
479 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | 504 | * from jiffies_to_ns(utime + stime) if sched_clock uses something |
480 | * other than jiffies.) | 505 | * other than jiffies.) |
481 | */ | 506 | */ |
482 | unsigned long long sched_time; | 507 | unsigned long long sum_sched_runtime; |
483 | 508 | ||
484 | /* | 509 | /* |
485 | * We don't bother to synchronize most readers of this at all, | 510 | * We don't bother to synchronize most readers of this at all, |
@@ -506,6 +531,10 @@ struct signal_struct { | |||
506 | #ifdef CONFIG_TASKSTATS | 531 | #ifdef CONFIG_TASKSTATS |
507 | struct taskstats *stats; | 532 | struct taskstats *stats; |
508 | #endif | 533 | #endif |
534 | #ifdef CONFIG_AUDIT | ||
535 | unsigned audit_tty; | ||
536 | struct tty_audit_buf *tty_audit_buf; | ||
537 | #endif | ||
509 | }; | 538 | }; |
510 | 539 | ||
511 | /* Context switch must be unlocked if interrupts are to be enabled */ | 540 | /* Context switch must be unlocked if interrupts are to be enabled */ |
@@ -521,31 +550,6 @@ struct signal_struct { | |||
521 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ | 550 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ |
522 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ | 551 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ |
523 | 552 | ||
524 | |||
525 | /* | ||
526 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
527 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
528 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
529 | * values are inverted: lower p->prio value means higher priority. | ||
530 | * | ||
531 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
532 | * RT priority to be separate from the value exported to | ||
533 | * user-space. This allows kernel threads to set their | ||
534 | * priority to a value higher than any user task. Note: | ||
535 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
536 | */ | ||
537 | |||
538 | #define MAX_USER_RT_PRIO 100 | ||
539 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
540 | |||
541 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
542 | |||
543 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) | ||
544 | #define rt_task(p) rt_prio((p)->prio) | ||
545 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | ||
546 | #define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH) | ||
547 | #define has_rt_policy(p) unlikely(is_rt_policy((p)->policy)) | ||
548 | |||
549 | /* | 553 | /* |
550 | * Some day this will be a full-fledged user tracking system.. | 554 | * Some day this will be a full-fledged user tracking system.. |
551 | */ | 555 | */ |
@@ -583,13 +587,13 @@ struct reclaim_state; | |||
583 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 587 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
584 | struct sched_info { | 588 | struct sched_info { |
585 | /* cumulative counters */ | 589 | /* cumulative counters */ |
586 | unsigned long cpu_time, /* time spent on the cpu */ | 590 | unsigned long pcnt; /* # of times run on this cpu */ |
587 | run_delay, /* time spent waiting on a runqueue */ | 591 | unsigned long long cpu_time, /* time spent on the cpu */ |
588 | pcnt; /* # of timeslices run on this cpu */ | 592 | run_delay; /* time spent waiting on a runqueue */ |
589 | 593 | ||
590 | /* timestamps */ | 594 | /* timestamps */ |
591 | unsigned long last_arrival, /* when we last ran on a cpu */ | 595 | unsigned long long last_arrival,/* when we last ran on a cpu */ |
592 | last_queued; /* when we were last queued to run */ | 596 | last_queued; /* when we were last queued to run */ |
593 | }; | 597 | }; |
594 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ | 598 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ |
595 | 599 | ||
@@ -639,18 +643,24 @@ static inline int sched_info_on(void) | |||
639 | #endif | 643 | #endif |
640 | } | 644 | } |
641 | 645 | ||
642 | enum idle_type | 646 | enum cpu_idle_type { |
643 | { | 647 | CPU_IDLE, |
644 | SCHED_IDLE, | 648 | CPU_NOT_IDLE, |
645 | NOT_IDLE, | 649 | CPU_NEWLY_IDLE, |
646 | NEWLY_IDLE, | 650 | CPU_MAX_IDLE_TYPES |
647 | MAX_IDLE_TYPES | ||
648 | }; | 651 | }; |
649 | 652 | ||
650 | /* | 653 | /* |
651 | * sched-domains (multiprocessor balancing) declarations: | 654 | * sched-domains (multiprocessor balancing) declarations: |
652 | */ | 655 | */ |
653 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ | 656 | |
657 | /* | ||
658 | * Increase resolution of nice-level calculations: | ||
659 | */ | ||
660 | #define SCHED_LOAD_SHIFT 10 | ||
661 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | ||
662 | |||
663 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 5) | ||
654 | 664 | ||
655 | #ifdef CONFIG_SMP | 665 | #ifdef CONFIG_SMP |
656 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 666 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -719,14 +729,14 @@ struct sched_domain { | |||
719 | 729 | ||
720 | #ifdef CONFIG_SCHEDSTATS | 730 | #ifdef CONFIG_SCHEDSTATS |
721 | /* load_balance() stats */ | 731 | /* load_balance() stats */ |
722 | unsigned long lb_cnt[MAX_IDLE_TYPES]; | 732 | unsigned long lb_cnt[CPU_MAX_IDLE_TYPES]; |
723 | unsigned long lb_failed[MAX_IDLE_TYPES]; | 733 | unsigned long lb_failed[CPU_MAX_IDLE_TYPES]; |
724 | unsigned long lb_balanced[MAX_IDLE_TYPES]; | 734 | unsigned long lb_balanced[CPU_MAX_IDLE_TYPES]; |
725 | unsigned long lb_imbalance[MAX_IDLE_TYPES]; | 735 | unsigned long lb_imbalance[CPU_MAX_IDLE_TYPES]; |
726 | unsigned long lb_gained[MAX_IDLE_TYPES]; | 736 | unsigned long lb_gained[CPU_MAX_IDLE_TYPES]; |
727 | unsigned long lb_hot_gained[MAX_IDLE_TYPES]; | 737 | unsigned long lb_hot_gained[CPU_MAX_IDLE_TYPES]; |
728 | unsigned long lb_nobusyg[MAX_IDLE_TYPES]; | 738 | unsigned long lb_nobusyg[CPU_MAX_IDLE_TYPES]; |
729 | unsigned long lb_nobusyq[MAX_IDLE_TYPES]; | 739 | unsigned long lb_nobusyq[CPU_MAX_IDLE_TYPES]; |
730 | 740 | ||
731 | /* Active load balancing */ | 741 | /* Active load balancing */ |
732 | unsigned long alb_cnt; | 742 | unsigned long alb_cnt; |
@@ -753,12 +763,6 @@ struct sched_domain { | |||
753 | extern int partition_sched_domains(cpumask_t *partition1, | 763 | extern int partition_sched_domains(cpumask_t *partition1, |
754 | cpumask_t *partition2); | 764 | cpumask_t *partition2); |
755 | 765 | ||
756 | /* | ||
757 | * Maximum cache size the migration-costs auto-tuning code will | ||
758 | * search from: | ||
759 | */ | ||
760 | extern unsigned int max_cache_size; | ||
761 | |||
762 | #endif /* CONFIG_SMP */ | 766 | #endif /* CONFIG_SMP */ |
763 | 767 | ||
764 | 768 | ||
@@ -809,14 +813,86 @@ struct mempolicy; | |||
809 | struct pipe_inode_info; | 813 | struct pipe_inode_info; |
810 | struct uts_namespace; | 814 | struct uts_namespace; |
811 | 815 | ||
812 | enum sleep_type { | 816 | struct rq; |
813 | SLEEP_NORMAL, | 817 | struct sched_domain; |
814 | SLEEP_NONINTERACTIVE, | 818 | |
815 | SLEEP_INTERACTIVE, | 819 | struct sched_class { |
816 | SLEEP_INTERRUPTED, | 820 | struct sched_class *next; |
821 | |||
822 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, | ||
823 | int wakeup, u64 now); | ||
824 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, | ||
825 | int sleep, u64 now); | ||
826 | void (*yield_task) (struct rq *rq, struct task_struct *p); | ||
827 | |||
828 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p); | ||
829 | |||
830 | struct task_struct * (*pick_next_task) (struct rq *rq, u64 now); | ||
831 | void (*put_prev_task) (struct rq *rq, struct task_struct *p, u64 now); | ||
832 | |||
833 | int (*load_balance) (struct rq *this_rq, int this_cpu, | ||
834 | struct rq *busiest, | ||
835 | unsigned long max_nr_move, unsigned long max_load_move, | ||
836 | struct sched_domain *sd, enum cpu_idle_type idle, | ||
837 | int *all_pinned, unsigned long *total_load_moved); | ||
838 | |||
839 | void (*set_curr_task) (struct rq *rq); | ||
840 | void (*task_tick) (struct rq *rq, struct task_struct *p); | ||
841 | void (*task_new) (struct rq *rq, struct task_struct *p); | ||
817 | }; | 842 | }; |
818 | 843 | ||
819 | struct prio_array; | 844 | struct load_weight { |
845 | unsigned long weight, inv_weight; | ||
846 | }; | ||
847 | |||
848 | /* | ||
849 | * CFS stats for a schedulable entity (task, task-group etc) | ||
850 | * | ||
851 | * Current field usage histogram: | ||
852 | * | ||
853 | * 4 se->block_start | ||
854 | * 4 se->run_node | ||
855 | * 4 se->sleep_start | ||
856 | * 4 se->sleep_start_fair | ||
857 | * 6 se->load.weight | ||
858 | * 7 se->delta_fair | ||
859 | * 15 se->wait_runtime | ||
860 | */ | ||
861 | struct sched_entity { | ||
862 | long wait_runtime; | ||
863 | unsigned long delta_fair_run; | ||
864 | unsigned long delta_fair_sleep; | ||
865 | unsigned long delta_exec; | ||
866 | s64 fair_key; | ||
867 | struct load_weight load; /* for load-balancing */ | ||
868 | struct rb_node run_node; | ||
869 | unsigned int on_rq; | ||
870 | |||
871 | u64 wait_start_fair; | ||
872 | u64 wait_start; | ||
873 | u64 exec_start; | ||
874 | u64 sleep_start; | ||
875 | u64 sleep_start_fair; | ||
876 | u64 block_start; | ||
877 | u64 sleep_max; | ||
878 | u64 block_max; | ||
879 | u64 exec_max; | ||
880 | u64 wait_max; | ||
881 | u64 last_ran; | ||
882 | |||
883 | u64 sum_exec_runtime; | ||
884 | s64 sum_wait_runtime; | ||
885 | s64 sum_sleep_runtime; | ||
886 | unsigned long wait_runtime_overruns; | ||
887 | unsigned long wait_runtime_underruns; | ||
888 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
889 | struct sched_entity *parent; | ||
890 | /* rq on which this entity is (to be) queued: */ | ||
891 | struct cfs_rq *cfs_rq; | ||
892 | /* rq "owned" by this entity/group: */ | ||
893 | struct cfs_rq *my_q; | ||
894 | #endif | ||
895 | }; | ||
820 | 896 | ||
821 | struct task_struct { | 897 | struct task_struct { |
822 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 898 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
@@ -832,23 +908,20 @@ struct task_struct { | |||
832 | int oncpu; | 908 | int oncpu; |
833 | #endif | 909 | #endif |
834 | #endif | 910 | #endif |
835 | int load_weight; /* for niceness load balancing purposes */ | 911 | |
836 | int prio, static_prio, normal_prio; | 912 | int prio, static_prio, normal_prio; |
837 | struct list_head run_list; | 913 | struct list_head run_list; |
838 | struct prio_array *array; | 914 | struct sched_class *sched_class; |
915 | struct sched_entity se; | ||
839 | 916 | ||
840 | unsigned short ioprio; | 917 | unsigned short ioprio; |
841 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 918 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
842 | unsigned int btrace_seq; | 919 | unsigned int btrace_seq; |
843 | #endif | 920 | #endif |
844 | unsigned long sleep_avg; | ||
845 | unsigned long long timestamp, last_ran; | ||
846 | unsigned long long sched_time; /* sched_clock time spent running */ | ||
847 | enum sleep_type sleep_type; | ||
848 | 921 | ||
849 | unsigned int policy; | 922 | unsigned int policy; |
850 | cpumask_t cpus_allowed; | 923 | cpumask_t cpus_allowed; |
851 | unsigned int time_slice, first_time_slice; | 924 | unsigned int time_slice; |
852 | 925 | ||
853 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 926 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
854 | struct sched_info sched_info; | 927 | struct sched_info sched_info; |
@@ -905,7 +978,8 @@ struct task_struct { | |||
905 | unsigned int rt_priority; | 978 | unsigned int rt_priority; |
906 | cputime_t utime, stime; | 979 | cputime_t utime, stime; |
907 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 980 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
908 | struct timespec start_time; | 981 | struct timespec start_time; /* monotonic time */ |
982 | struct timespec real_start_time; /* boot based time */ | ||
909 | /* 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 */ |
910 | unsigned long min_flt, maj_flt; | 984 | unsigned long min_flt, maj_flt; |
911 | 985 | ||
@@ -1078,6 +1152,37 @@ struct task_struct { | |||
1078 | #endif | 1152 | #endif |
1079 | }; | 1153 | }; |
1080 | 1154 | ||
1155 | /* | ||
1156 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
1157 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
1158 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
1159 | * values are inverted: lower p->prio value means higher priority. | ||
1160 | * | ||
1161 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
1162 | * RT priority to be separate from the value exported to | ||
1163 | * user-space. This allows kernel threads to set their | ||
1164 | * priority to a value higher than any user task. Note: | ||
1165 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
1166 | */ | ||
1167 | |||
1168 | #define MAX_USER_RT_PRIO 100 | ||
1169 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
1170 | |||
1171 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
1172 | #define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
1173 | |||
1174 | static inline int rt_prio(int prio) | ||
1175 | { | ||
1176 | if (unlikely(prio < MAX_RT_PRIO)) | ||
1177 | return 1; | ||
1178 | return 0; | ||
1179 | } | ||
1180 | |||
1181 | static inline int rt_task(struct task_struct *p) | ||
1182 | { | ||
1183 | return rt_prio(p->prio); | ||
1184 | } | ||
1185 | |||
1081 | static inline pid_t process_group(struct task_struct *tsk) | 1186 | static inline pid_t process_group(struct task_struct *tsk) |
1082 | { | 1187 | { |
1083 | return tsk->signal->pgrp; | 1188 | return tsk->signal->pgrp; |
@@ -1162,6 +1267,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1162 | /* Not implemented yet, only for 486*/ | 1267 | /* Not implemented yet, only for 486*/ |
1163 | #define PF_STARTING 0x00000002 /* being created */ | 1268 | #define PF_STARTING 0x00000002 /* being created */ |
1164 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1269 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1270 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | ||
1165 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1271 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ |
1166 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1272 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ |
1167 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1273 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
@@ -1222,7 +1328,7 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1222 | 1328 | ||
1223 | extern unsigned long long sched_clock(void); | 1329 | extern unsigned long long sched_clock(void); |
1224 | extern unsigned long long | 1330 | extern unsigned long long |
1225 | current_sched_time(const struct task_struct *current_task); | 1331 | task_sched_runtime(struct task_struct *task); |
1226 | 1332 | ||
1227 | /* sched_exec is called by processes performing an exec */ | 1333 | /* sched_exec is called by processes performing an exec */ |
1228 | #ifdef CONFIG_SMP | 1334 | #ifdef CONFIG_SMP |
@@ -1231,6 +1337,8 @@ extern void sched_exec(void); | |||
1231 | #define sched_exec() {} | 1337 | #define sched_exec() {} |
1232 | #endif | 1338 | #endif |
1233 | 1339 | ||
1340 | extern void sched_clock_unstable_event(void); | ||
1341 | |||
1234 | #ifdef CONFIG_HOTPLUG_CPU | 1342 | #ifdef CONFIG_HOTPLUG_CPU |
1235 | extern void idle_task_exit(void); | 1343 | extern void idle_task_exit(void); |
1236 | #else | 1344 | #else |
@@ -1239,6 +1347,14 @@ static inline void idle_task_exit(void) {} | |||
1239 | 1347 | ||
1240 | extern void sched_idle_next(void); | 1348 | extern void sched_idle_next(void); |
1241 | 1349 | ||
1350 | extern unsigned int sysctl_sched_granularity; | ||
1351 | extern unsigned int sysctl_sched_wakeup_granularity; | ||
1352 | extern unsigned int sysctl_sched_batch_wakeup_granularity; | ||
1353 | extern unsigned int sysctl_sched_stat_granularity; | ||
1354 | extern unsigned int sysctl_sched_runtime_limit; | ||
1355 | extern unsigned int sysctl_sched_child_runs_first; | ||
1356 | extern unsigned int sysctl_sched_features; | ||
1357 | |||
1242 | #ifdef CONFIG_RT_MUTEXES | 1358 | #ifdef CONFIG_RT_MUTEXES |
1243 | extern int rt_mutex_getprio(struct task_struct *p); | 1359 | extern int rt_mutex_getprio(struct task_struct *p); |
1244 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 1360 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
@@ -1294,7 +1410,7 @@ extern struct task_struct *find_task_by_pid_type(int type, int pid); | |||
1294 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1410 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
1295 | 1411 | ||
1296 | /* per-UID process charging. */ | 1412 | /* per-UID process charging. */ |
1297 | extern struct user_struct * alloc_uid(uid_t); | 1413 | extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); |
1298 | static inline struct user_struct *get_uid(struct user_struct *u) | 1414 | static inline struct user_struct *get_uid(struct user_struct *u) |
1299 | { | 1415 | { |
1300 | atomic_inc(&u->__count); | 1416 | atomic_inc(&u->__count); |
@@ -1316,8 +1432,8 @@ extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, | |||
1316 | #else | 1432 | #else |
1317 | static inline void kick_process(struct task_struct *tsk) { } | 1433 | static inline void kick_process(struct task_struct *tsk) { } |
1318 | #endif | 1434 | #endif |
1319 | extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags)); | 1435 | extern void sched_fork(struct task_struct *p, int clone_flags); |
1320 | extern void FASTCALL(sched_exit(struct task_struct * p)); | 1436 | extern void sched_dead(struct task_struct *p); |
1321 | 1437 | ||
1322 | extern int in_group_p(gid_t); | 1438 | extern int in_group_p(gid_t); |
1323 | extern int in_egroup_p(gid_t); | 1439 | extern int in_egroup_p(gid_t); |
@@ -1405,7 +1521,7 @@ extern struct mm_struct * mm_alloc(void); | |||
1405 | extern void FASTCALL(__mmdrop(struct mm_struct *)); | 1521 | extern void FASTCALL(__mmdrop(struct mm_struct *)); |
1406 | static inline void mmdrop(struct mm_struct * mm) | 1522 | static inline void mmdrop(struct mm_struct * mm) |
1407 | { | 1523 | { |
1408 | if (atomic_dec_and_test(&mm->mm_count)) | 1524 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) |
1409 | __mmdrop(mm); | 1525 | __mmdrop(mm); |
1410 | } | 1526 | } |
1411 | 1527 | ||
@@ -1637,10 +1753,7 @@ static inline unsigned int task_cpu(const struct task_struct *p) | |||
1637 | return task_thread_info(p)->cpu; | 1753 | return task_thread_info(p)->cpu; |
1638 | } | 1754 | } |
1639 | 1755 | ||
1640 | static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | 1756 | extern void set_task_cpu(struct task_struct *p, unsigned int cpu); |
1641 | { | ||
1642 | task_thread_info(p)->cpu = cpu; | ||
1643 | } | ||
1644 | 1757 | ||
1645 | #else | 1758 | #else |
1646 | 1759 | ||
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 e7367c74e1bb..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 |
@@ -1579,6 +1610,10 @@ static inline ktime_t net_timedelta(ktime_t t) | |||
1579 | return ktime_sub(ktime_get_real(), t); | 1610 | return ktime_sub(ktime_get_real(), t); |
1580 | } | 1611 | } |
1581 | 1612 | ||
1613 | static inline ktime_t net_invalid_timestamp(void) | ||
1614 | { | ||
1615 | return ktime_set(0, 0); | ||
1616 | } | ||
1582 | 1617 | ||
1583 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); | 1618 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); |
1584 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); | 1619 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); |
@@ -1604,7 +1639,7 @@ static inline int skb_csum_unnecessary(const struct sk_buff *skb) | |||
1604 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the | 1639 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the |
1605 | * hardware has already verified the correctness of the checksum. | 1640 | * hardware has already verified the correctness of the checksum. |
1606 | */ | 1641 | */ |
1607 | static inline unsigned int skb_checksum_complete(struct sk_buff *skb) | 1642 | static inline __sum16 skb_checksum_complete(struct sk_buff *skb) |
1608 | { | 1643 | { |
1609 | return skb_csum_unnecessary(skb) ? | 1644 | return skb_csum_unnecessary(skb) ? |
1610 | 0 : __skb_checksum_complete(skb); | 1645 | 0 : __skb_checksum_complete(skb); |
@@ -1705,6 +1740,20 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1705 | { } | 1740 | { } |
1706 | #endif | 1741 | #endif |
1707 | 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 | |||
1708 | static inline int skb_is_gso(const struct sk_buff *skb) | 1757 | static inline int skb_is_gso(const struct sk_buff *skb) |
1709 | { | 1758 | { |
1710 | 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 a015236cc572..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 |
@@ -82,8 +69,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
82 | * to do various tricks to work around compiler limitations in order to | 69 | * to do various tricks to work around compiler limitations in order to |
83 | * ensure proper constant folding. | 70 | * ensure proper constant folding. |
84 | */ | 71 | */ |
85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ | 72 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ |
86 | (MAX_ORDER + PAGE_SHIFT) : 25) | 73 | (MAX_ORDER + PAGE_SHIFT - 1) : 25) |
87 | 74 | ||
88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) | 75 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) |
89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) | 76 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) |
@@ -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 0764c829d967..a582f6771525 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -28,7 +28,7 @@ struct kmem_cache { | |||
28 | int size; /* The size of an object including meta data */ | 28 | int size; /* The size of an object including meta data */ |
29 | int objsize; /* The size of an object without meta data */ | 29 | int objsize; /* The size of an object without meta data */ |
30 | int offset; /* Free pointer offset. */ | 30 | int offset; /* Free pointer offset. */ |
31 | unsigned int order; | 31 | int order; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Avoid an extra cache line for UP, SMP and for the node local to | 34 | * Avoid an extra cache line for UP, SMP and for the node local to |
@@ -56,7 +56,13 @@ struct kmem_cache { | |||
56 | /* | 56 | /* |
57 | * Kmalloc subsystem. | 57 | * Kmalloc subsystem. |
58 | */ | 58 | */ |
59 | #define KMALLOC_SHIFT_LOW 3 | 59 | #if defined(ARCH_KMALLOC_MINALIGN) && ARCH_KMALLOC_MINALIGN > 8 |
60 | #define KMALLOC_MIN_SIZE ARCH_KMALLOC_MINALIGN | ||
61 | #else | ||
62 | #define KMALLOC_MIN_SIZE 8 | ||
63 | #endif | ||
64 | |||
65 | #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) | ||
60 | 66 | ||
61 | /* | 67 | /* |
62 | * We keep the general caches in an array of slab caches that are used for | 68 | * We keep the general caches in an array of slab caches that are used for |
@@ -70,15 +76,15 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
70 | */ | 76 | */ |
71 | static inline int kmalloc_index(size_t size) | 77 | static inline int kmalloc_index(size_t size) |
72 | { | 78 | { |
73 | /* | 79 | if (!size) |
74 | * We should return 0 if size == 0 but we use the smallest object | 80 | return 0; |
75 | * here for SLAB legacy reasons. | ||
76 | */ | ||
77 | WARN_ON_ONCE(size == 0); | ||
78 | 81 | ||
79 | if (size > KMALLOC_MAX_SIZE) | 82 | if (size > KMALLOC_MAX_SIZE) |
80 | return -1; | 83 | return -1; |
81 | 84 | ||
85 | if (size <= KMALLOC_MIN_SIZE) | ||
86 | return KMALLOC_SHIFT_LOW; | ||
87 | |||
82 | if (size > 64 && size <= 96) | 88 | if (size > 64 && size <= 96) |
83 | return 1; | 89 | return 1; |
84 | if (size > 128 && size <= 192) | 90 | if (size > 128 && size <= 192) |
@@ -153,13 +159,28 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
153 | #define SLUB_DMA 0 | 159 | #define SLUB_DMA 0 |
154 | #endif | 160 | #endif |
155 | 161 | ||
162 | |||
163 | /* | ||
164 | * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. | ||
165 | * | ||
166 | * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault. | ||
167 | * | ||
168 | * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. | ||
169 | * Both make kfree a no-op. | ||
170 | */ | ||
171 | #define ZERO_SIZE_PTR ((void *)16) | ||
172 | |||
173 | |||
174 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
175 | void *__kmalloc(size_t size, gfp_t flags); | ||
176 | |||
156 | static inline void *kmalloc(size_t size, gfp_t flags) | 177 | static inline void *kmalloc(size_t size, gfp_t flags) |
157 | { | 178 | { |
158 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 179 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
159 | struct kmem_cache *s = kmalloc_slab(size); | 180 | struct kmem_cache *s = kmalloc_slab(size); |
160 | 181 | ||
161 | if (!s) | 182 | if (!s) |
162 | return NULL; | 183 | return ZERO_SIZE_PTR; |
163 | 184 | ||
164 | return kmem_cache_alloc(s, flags); | 185 | return kmem_cache_alloc(s, flags); |
165 | } else | 186 | } else |
@@ -172,7 +193,7 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
172 | struct kmem_cache *s = kmalloc_slab(size); | 193 | struct kmem_cache *s = kmalloc_slab(size); |
173 | 194 | ||
174 | if (!s) | 195 | if (!s) |
175 | return NULL; | 196 | return ZERO_SIZE_PTR; |
176 | 197 | ||
177 | return kmem_cache_zalloc(s, flags); | 198 | return kmem_cache_zalloc(s, flags); |
178 | } else | 199 | } else |
@@ -180,7 +201,8 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
180 | } | 201 | } |
181 | 202 | ||
182 | #ifdef CONFIG_NUMA | 203 | #ifdef CONFIG_NUMA |
183 | 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); | ||
184 | 206 | ||
185 | 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) |
186 | { | 208 | { |
@@ -188,7 +210,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
188 | struct kmem_cache *s = kmalloc_slab(size); | 210 | struct kmem_cache *s = kmalloc_slab(size); |
189 | 211 | ||
190 | if (!s) | 212 | if (!s) |
191 | return NULL; | 213 | return ZERO_SIZE_PTR; |
192 | 214 | ||
193 | return kmem_cache_alloc_node(s, flags, node); | 215 | return kmem_cache_alloc_node(s, flags, node); |
194 | } else | 216 | } else |
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h index cc9be4a11861..014e73b31fc0 100644 --- a/include/linux/sm501-regs.h +++ b/include/linux/sm501-regs.h | |||
@@ -64,6 +64,11 @@ | |||
64 | #define SM501_DEBUG_CONTROL (0x000034) | 64 | #define SM501_DEBUG_CONTROL (0x000034) |
65 | 65 | ||
66 | /* power management */ | 66 | /* power management */ |
67 | #define SM501_POWERMODE_P2X_SRC (1<<29) | ||
68 | #define SM501_POWERMODE_V2X_SRC (1<<20) | ||
69 | #define SM501_POWERMODE_M_SRC (1<<12) | ||
70 | #define SM501_POWERMODE_M1_SRC (1<<4) | ||
71 | |||
67 | #define SM501_CURRENT_GATE (0x000038) | 72 | #define SM501_CURRENT_GATE (0x000038) |
68 | #define SM501_CURRENT_CLOCK (0x00003C) | 73 | #define SM501_CURRENT_CLOCK (0x00003C) |
69 | #define SM501_POWER_MODE_0_GATE (0x000040) | 74 | #define SM501_POWER_MODE_0_GATE (0x000040) |
@@ -104,6 +109,9 @@ | |||
104 | #define SM501_DEVICEID (0x000060) | 109 | #define SM501_DEVICEID (0x000060) |
105 | /* 0x050100A0 */ | 110 | /* 0x050100A0 */ |
106 | 111 | ||
112 | #define SM501_DEVICEID_SM501 (0x05010000) | ||
113 | #define SM501_DEVICEID_IDMASK (0xffff0000) | ||
114 | |||
107 | #define SM501_PLLCLOCK_COUNT (0x000064) | 115 | #define SM501_PLLCLOCK_COUNT (0x000064) |
108 | #define SM501_MISC_TIMING (0x000068) | 116 | #define SM501_MISC_TIMING (0x000068) |
109 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) | 117 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) |
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/spi/spi.h b/include/linux/spi/spi.h index b6bedc3ee95c..1be5ea059477 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -341,9 +341,14 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
341 | * chip transactions together. | 341 | * chip transactions together. |
342 | * | 342 | * |
343 | * (ii) When the transfer is the last one in the message, the chip may | 343 | * (ii) When the transfer is the last one in the message, the chip may |
344 | * stay selected until the next transfer. This is purely a performance | 344 | * stay selected until the next transfer. On multi-device SPI busses |
345 | * hint; the controller driver may need to select a different device | 345 | * with nothing blocking messages going to other devices, this is just |
346 | * for the next message. | 346 | * a performance hint; starting a message to another device deselects |
347 | * this one. But in other cases, this can be used to ensure correctness. | ||
348 | * Some devices need protocol transactions to be built from a series of | ||
349 | * spi_message submissions, where the content of one message is determined | ||
350 | * by the results of previous messages and where the whole transaction | ||
351 | * ends when the chipselect goes intactive. | ||
347 | * | 352 | * |
348 | * The code that submits an spi_message (and its spi_transfers) | 353 | * The code that submits an spi_message (and its spi_transfers) |
349 | * to the lower layers is responsible for managing its memory. | 354 | * to the lower layers is responsible for managing its memory. |
@@ -480,14 +485,15 @@ static inline void spi_message_free(struct spi_message *m) | |||
480 | /** | 485 | /** |
481 | * spi_setup - setup SPI mode and clock rate | 486 | * spi_setup - setup SPI mode and clock rate |
482 | * @spi: the device whose settings are being modified | 487 | * @spi: the device whose settings are being modified |
483 | * Context: can sleep | 488 | * Context: can sleep, and no requests are queued to the device |
484 | * | 489 | * |
485 | * SPI protocol drivers may need to update the transfer mode if the | 490 | * SPI protocol drivers may need to update the transfer mode if the |
486 | * device doesn't work with the mode 0 default. They may likewise need | 491 | * device doesn't work with its default. They may likewise need |
487 | * to update clock rates or word sizes from initial values. This function | 492 | * to update clock rates or word sizes from initial values. This function |
488 | * changes those settings, and must be called from a context that can sleep. | 493 | * changes those settings, and must be called from a context that can sleep. |
489 | * The changes take effect the next time the device is selected and data | 494 | * Except for SPI_CS_HIGH, which takes effect immediately, the changes take |
490 | * is transferred to or from it. | 495 | * effect the next time the device is selected and data is transferred to |
496 | * or from it. When this function returns, the spi device is deselected. | ||
491 | * | 497 | * |
492 | * Note that this call will fail if the protocol driver specifies an option | 498 | * Note that this call will fail if the protocol driver specifies an option |
493 | * that the underlying controller or its driver does not support. For | 499 | * that the underlying controller or its driver does not support. For |
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/splice.h b/include/linux/splice.h new file mode 100644 index 000000000000..33e447f98a54 --- /dev/null +++ b/include/linux/splice.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * Function declerations and data structures related to the splice | ||
3 | * implementation. | ||
4 | * | ||
5 | * Copyright (C) 2007 Jens Axboe <jens.axboe@oracle.com> | ||
6 | * | ||
7 | */ | ||
8 | #ifndef SPLICE_H | ||
9 | #define SPLICE_H | ||
10 | |||
11 | #include <linux/pipe_fs_i.h> | ||
12 | |||
13 | /* | ||
14 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
15 | * add the splice flags here. | ||
16 | */ | ||
17 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
18 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
19 | /* we may still block on the fd we splice */ | ||
20 | /* from/to, of course */ | ||
21 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
22 | #define SPLICE_F_GIFT (0x08) /* pages passed in are a gift */ | ||
23 | |||
24 | /* | ||
25 | * Passed to the actors | ||
26 | */ | ||
27 | struct splice_desc { | ||
28 | unsigned int len, total_len; /* current and remaining length */ | ||
29 | unsigned int flags; /* splice flags */ | ||
30 | /* | ||
31 | * actor() private data | ||
32 | */ | ||
33 | union { | ||
34 | void __user *userptr; /* memory to write to */ | ||
35 | struct file *file; /* file to read/write */ | ||
36 | void *data; /* cookie */ | ||
37 | } u; | ||
38 | loff_t pos; /* file position */ | ||
39 | }; | ||
40 | |||
41 | struct partial_page { | ||
42 | unsigned int offset; | ||
43 | unsigned int len; | ||
44 | unsigned long private; | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * Passed to splice_to_pipe | ||
49 | */ | ||
50 | struct splice_pipe_desc { | ||
51 | struct page **pages; /* page map */ | ||
52 | struct partial_page *partial; /* pages[] may not be contig */ | ||
53 | int nr_pages; /* number of pages in map */ | ||
54 | unsigned int flags; /* splice flags */ | ||
55 | const struct pipe_buf_operations *ops;/* ops associated with output pipe */ | ||
56 | }; | ||
57 | |||
58 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
59 | struct splice_desc *); | ||
60 | typedef int (splice_direct_actor)(struct pipe_inode_info *, | ||
61 | struct splice_desc *); | ||
62 | |||
63 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
64 | loff_t *, size_t, unsigned int, | ||
65 | splice_actor *); | ||
66 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, | ||
67 | struct splice_desc *, splice_actor *); | ||
68 | extern ssize_t splice_to_pipe(struct pipe_inode_info *, | ||
69 | struct splice_pipe_desc *); | ||
70 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, | ||
71 | splice_direct_actor *); | ||
72 | |||
73 | #endif | ||
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/svc.h b/include/linux/sunrpc/svc.h index 4a7ae8ab6eb8..129d50f2225c 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -253,7 +253,7 @@ struct svc_rqst { | |||
253 | * determine what device number | 253 | * determine what device number |
254 | * to report (real or virtual) | 254 | * to report (real or virtual) |
255 | */ | 255 | */ |
256 | int rq_sendfile_ok; /* turned off in gss privacy | 256 | int rq_splice_ok; /* turned off in gss privacy |
257 | * to prevent encrypting page | 257 | * to prevent encrypting page |
258 | * cache pages */ | 258 | * cache pages */ |
259 | wait_queue_head_t rq_wait; /* synchronization */ | 259 | wait_queue_head_t rq_wait; /* synchronization */ |
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/syscalls.h b/include/linux/syscalls.h index b02070eac422..83d0ec11235e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -598,6 +598,8 @@ asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); | |||
598 | 598 | ||
599 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 599 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
600 | unsigned int flags); | 600 | unsigned int flags); |
601 | asmlinkage long sys_sync_file_range2(int fd, unsigned int flags, | ||
602 | loff_t offset, loff_t nbytes); | ||
601 | asmlinkage long sys_get_robust_list(int pid, | 603 | asmlinkage long sys_get_robust_list(int pid, |
602 | struct robust_list_head __user * __user *head_ptr, | 604 | struct robust_list_head __user * __user *head_ptr, |
603 | size_t __user *len_ptr); | 605 | size_t __user *len_ptr); |
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 a9d1f049cc15..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 |
@@ -98,7 +98,7 @@ | |||
98 | .cache_nice_tries = 0, \ | 98 | .cache_nice_tries = 0, \ |
99 | .busy_idx = 0, \ | 99 | .busy_idx = 0, \ |
100 | .idle_idx = 0, \ | 100 | .idle_idx = 0, \ |
101 | .newidle_idx = 1, \ | 101 | .newidle_idx = 0, \ |
102 | .wake_idx = 0, \ | 102 | .wake_idx = 0, \ |
103 | .forkexec_idx = 0, \ | 103 | .forkexec_idx = 0, \ |
104 | .flags = SD_LOAD_BALANCE \ | 104 | .flags = SD_LOAD_BALANCE \ |
@@ -128,14 +128,15 @@ | |||
128 | .imbalance_pct = 125, \ | 128 | .imbalance_pct = 125, \ |
129 | .cache_nice_tries = 1, \ | 129 | .cache_nice_tries = 1, \ |
130 | .busy_idx = 2, \ | 130 | .busy_idx = 2, \ |
131 | .idle_idx = 1, \ | 131 | .idle_idx = 0, \ |
132 | .newidle_idx = 2, \ | 132 | .newidle_idx = 0, \ |
133 | .wake_idx = 1, \ | 133 | .wake_idx = 1, \ |
134 | .forkexec_idx = 1, \ | 134 | .forkexec_idx = 1, \ |
135 | .flags = SD_LOAD_BALANCE \ | 135 | .flags = SD_LOAD_BALANCE \ |
136 | | SD_BALANCE_NEWIDLE \ | 136 | | SD_BALANCE_NEWIDLE \ |
137 | | SD_BALANCE_EXEC \ | 137 | | SD_BALANCE_EXEC \ |
138 | | SD_WAKE_AFFINE \ | 138 | | SD_WAKE_AFFINE \ |
139 | | SD_WAKE_IDLE \ | ||
139 | | SD_SHARE_PKG_RESOURCES\ | 140 | | SD_SHARE_PKG_RESOURCES\ |
140 | | BALANCE_FOR_MC_POWER, \ | 141 | | BALANCE_FOR_MC_POWER, \ |
141 | .last_balance = jiffies, \ | 142 | .last_balance = jiffies, \ |
@@ -158,14 +159,15 @@ | |||
158 | .imbalance_pct = 125, \ | 159 | .imbalance_pct = 125, \ |
159 | .cache_nice_tries = 1, \ | 160 | .cache_nice_tries = 1, \ |
160 | .busy_idx = 2, \ | 161 | .busy_idx = 2, \ |
161 | .idle_idx = 1, \ | 162 | .idle_idx = 0, \ |
162 | .newidle_idx = 2, \ | 163 | .newidle_idx = 0, \ |
163 | .wake_idx = 1, \ | 164 | .wake_idx = 1, \ |
164 | .forkexec_idx = 1, \ | 165 | .forkexec_idx = 1, \ |
165 | .flags = SD_LOAD_BALANCE \ | 166 | .flags = SD_LOAD_BALANCE \ |
166 | | SD_BALANCE_NEWIDLE \ | 167 | | SD_BALANCE_NEWIDLE \ |
167 | | SD_BALANCE_EXEC \ | 168 | | SD_BALANCE_EXEC \ |
168 | | SD_WAKE_AFFINE \ | 169 | | SD_WAKE_AFFINE \ |
170 | | SD_WAKE_IDLE \ | ||
169 | | BALANCE_FOR_PKG_POWER,\ | 171 | | BALANCE_FOR_PKG_POWER,\ |
170 | .last_balance = jiffies, \ | 172 | .last_balance = jiffies, \ |
171 | .balance_interval = 1, \ | 173 | .balance_interval = 1, \ |
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 94bd38a6d947..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 |
@@ -729,6 +741,22 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
729 | .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) | 741 | .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) |
730 | 742 | ||
731 | /** | 743 | /** |
744 | * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb | ||
745 | * device with a specific interface protocol | ||
746 | * @vend: the 16 bit USB Vendor ID | ||
747 | * @prod: the 16 bit USB Product ID | ||
748 | * @pr: bInterfaceProtocol value | ||
749 | * | ||
750 | * This macro is used to create a struct usb_device_id that matches a | ||
751 | * specific interface protocol of devices. | ||
752 | */ | ||
753 | #define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \ | ||
754 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_PROTOCOL, \ | ||
755 | .idVendor = (vend), \ | ||
756 | .idProduct = (prod), \ | ||
757 | .bInterfaceProtocol = (pr) | ||
758 | |||
759 | /** | ||
732 | * USB_DEVICE_INFO - macro used to describe a class of usb devices | 760 | * USB_DEVICE_INFO - macro used to describe a class of usb devices |
733 | * @cl: bDeviceClass value | 761 | * @cl: bDeviceClass value |
734 | * @sc: bDeviceSubClass value | 762 | * @sc: bDeviceSubClass value |
@@ -754,6 +782,28 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
754 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ | 782 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ |
755 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | 783 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) |
756 | 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 | |||
757 | /* ----------------------------------------------------------------------- */ | 807 | /* ----------------------------------------------------------------------- */ |
758 | 808 | ||
759 | /* Stuff for dynamic usb ids */ | 809 | /* Stuff for dynamic usb ids */ |
@@ -800,10 +850,15 @@ struct usbdrv_wrap { | |||
800 | * do (or don't) show up otherwise in the filesystem. | 850 | * do (or don't) show up otherwise in the filesystem. |
801 | * @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. |
802 | * @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. | ||
803 | * @pre_reset: Called by usb_reset_composite_device() when the device | 855 | * @pre_reset: Called by usb_reset_composite_device() when the device |
804 | * is about to be reset. | 856 | * is about to be reset. |
805 | * @post_reset: Called by usb_reset_composite_device() after the device | 857 | * @post_reset: Called by usb_reset_composite_device() after the device |
806 | * 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. | ||
807 | * @id_table: USB drivers use ID table to support hotplugging. | 862 | * @id_table: USB drivers use ID table to support hotplugging. |
808 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 863 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
809 | * or your driver's probe function will never get called. | 864 | * or your driver's probe function will never get called. |
@@ -843,9 +898,10 @@ struct usb_driver { | |||
843 | 898 | ||
844 | int (*suspend) (struct usb_interface *intf, pm_message_t message); | 899 | int (*suspend) (struct usb_interface *intf, pm_message_t message); |
845 | int (*resume) (struct usb_interface *intf); | 900 | int (*resume) (struct usb_interface *intf); |
901 | int (*reset_resume)(struct usb_interface *intf); | ||
846 | 902 | ||
847 | void (*pre_reset) (struct usb_interface *intf); | 903 | int (*pre_reset)(struct usb_interface *intf); |
848 | void (*post_reset) (struct usb_interface *intf); | 904 | int (*post_reset)(struct usb_interface *intf); |
849 | 905 | ||
850 | const struct usb_device_id *id_table; | 906 | const struct usb_device_id *id_table; |
851 | 907 | ||
@@ -948,6 +1004,7 @@ extern int usb_disabled(void); | |||
948 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ | 1004 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ |
949 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt | 1005 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt |
950 | * needed */ | 1006 | * needed */ |
1007 | #define URB_FREE_BUFFER 0x0100 /* Free transfer buffer with the URB */ | ||
951 | 1008 | ||
952 | struct usb_iso_packet_descriptor { | 1009 | struct usb_iso_packet_descriptor { |
953 | unsigned int offset; | 1010 | unsigned int offset; |
@@ -958,11 +1015,26 @@ struct usb_iso_packet_descriptor { | |||
958 | 1015 | ||
959 | struct urb; | 1016 | struct urb; |
960 | 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 | |||
961 | typedef void (*usb_complete_t)(struct urb *); | 1031 | typedef void (*usb_complete_t)(struct urb *); |
962 | 1032 | ||
963 | /** | 1033 | /** |
964 | * struct urb - USB Request Block | 1034 | * struct urb - USB Request Block |
965 | * @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 | ||
966 | * @pipe: Holds endpoint number, direction, type, and more. | 1038 | * @pipe: Holds endpoint number, direction, type, and more. |
967 | * Create these values with the eight macros available; | 1039 | * Create these values with the eight macros available; |
968 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" | 1040 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" |
@@ -1135,6 +1207,8 @@ struct urb | |||
1135 | /* 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 */ |
1136 | 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 |
1137 | * current owner */ | 1209 | * current owner */ |
1210 | struct list_head anchor_list; /* the URB may be anchored by the driver */ | ||
1211 | struct usb_anchor *anchor; | ||
1138 | struct usb_device *dev; /* (in) pointer to associated device */ | 1212 | struct usb_device *dev; /* (in) pointer to associated device */ |
1139 | unsigned int pipe; /* (in) pipe information */ | 1213 | unsigned int pipe; /* (in) pipe information */ |
1140 | int status; /* (return) non-ISO status */ | 1214 | int status; /* (return) non-ISO status */ |
@@ -1270,6 +1344,11 @@ extern struct urb *usb_get_urb(struct urb *urb); | |||
1270 | 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); |
1271 | extern int usb_unlink_urb(struct urb *urb); | 1345 | extern int usb_unlink_urb(struct urb *urb); |
1272 | 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); | ||
1273 | 1352 | ||
1274 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 1353 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
1275 | 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/videodev2.h b/include/linux/videodev2.h index e7560389079c..d16a2b57dc81 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -243,8 +243,7 @@ struct v4l2_capability | |||
243 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | 243 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ |
244 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 244 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
245 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 245 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
246 | #define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */ | 246 | #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ |
247 | #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */ | ||
248 | 247 | ||
249 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 248 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
250 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 249 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
@@ -616,12 +615,16 @@ struct v4l2_framebuffer | |||
616 | #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 | 615 | #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 |
617 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | 616 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 |
618 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | 617 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 |
618 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 | ||
619 | #define V4L2_FBUF_CAP_GLOBAL_INV_ALPHA 0x0080 | ||
619 | /* Flags for the 'flags' field. */ | 620 | /* Flags for the 'flags' field. */ |
620 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 621 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
621 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 622 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
622 | #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 | 623 | #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 |
623 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | 624 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 |
624 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 625 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
626 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | ||
627 | #define V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA 0x0040 | ||
625 | 628 | ||
626 | struct v4l2_clip | 629 | struct v4l2_clip |
627 | { | 630 | { |
diff --git a/include/linux/wait.h b/include/linux/wait.h index e820d00e1383..0e686280450b 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -366,15 +366,15 @@ static inline void remove_wait_queue_locked(wait_queue_head_t *q, | |||
366 | 366 | ||
367 | /* | 367 | /* |
368 | * These are the old interfaces to sleep waiting for an event. | 368 | * These are the old interfaces to sleep waiting for an event. |
369 | * They are racy. DO NOT use them, use the wait_event* interfaces above. | 369 | * They are racy. DO NOT use them, use the wait_event* interfaces above. |
370 | * We plan to remove these interfaces during 2.7. | 370 | * We plan to remove these interfaces. |
371 | */ | 371 | */ |
372 | extern void FASTCALL(sleep_on(wait_queue_head_t *q)); | 372 | extern void sleep_on(wait_queue_head_t *q); |
373 | extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q, | 373 | extern long sleep_on_timeout(wait_queue_head_t *q, |
374 | signed long timeout)); | 374 | signed long timeout); |
375 | extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q)); | 375 | extern void interruptible_sleep_on(wait_queue_head_t *q); |
376 | extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q, | 376 | extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, |
377 | signed long timeout)); | 377 | signed long timeout); |
378 | 378 | ||
379 | /* | 379 | /* |
380 | * Waitqueues which are removed from the waitqueue_head at wakeup time | 380 | * Waitqueues which are removed from the waitqueue_head at wakeup time |
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/ax88796.h b/include/net/ax88796.h new file mode 100644 index 000000000000..ee786a043b3d --- /dev/null +++ b/include/net/ax88796.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* include/net/ax88796.h | ||
2 | * | ||
3 | * Copyright 2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
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 | |||
12 | #ifndef __NET_AX88796_PLAT_H | ||
13 | #define __NET_AX88796_PLAT_H | ||
14 | |||
15 | #define AXFLG_HAS_EEPROM (1<<0) | ||
16 | #define AXFLG_MAC_FROMDEV (1<<1) /* device already has MAC */ | ||
17 | |||
18 | struct ax_plat_data { | ||
19 | unsigned int flags; | ||
20 | unsigned char wordlength; /* 1 or 2 */ | ||
21 | unsigned char dcr_val; /* default value for DCR */ | ||
22 | unsigned char rcr_val; /* default value for RCR */ | ||
23 | unsigned char gpoc_val; /* default value for GPOC */ | ||
24 | u32 *reg_offsets; /* register offsets */ | ||
25 | }; | ||
26 | |||
27 | #endif /* __NET_AX88796_PLAT_H */ | ||
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/cipso_ipv4.h b/include/net/cipso_ipv4.h index 4f90f5554fac..a6bb94530cfd 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -203,12 +203,10 @@ static inline int cipso_v4_cache_add(const struct sk_buff *skb, | |||
203 | 203 | ||
204 | #ifdef CONFIG_NETLABEL | 204 | #ifdef CONFIG_NETLABEL |
205 | void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway); | 205 | void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway); |
206 | int cipso_v4_socket_setattr(const struct socket *sock, | 206 | int cipso_v4_sock_setattr(struct sock *sk, |
207 | const struct cipso_v4_doi *doi_def, | 207 | const struct cipso_v4_doi *doi_def, |
208 | const struct netlbl_lsm_secattr *secattr); | 208 | const struct netlbl_lsm_secattr *secattr); |
209 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr); | 209 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr); |
210 | int cipso_v4_socket_getattr(const struct socket *sock, | ||
211 | struct netlbl_lsm_secattr *secattr); | ||
212 | int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | 210 | int cipso_v4_skbuff_getattr(const struct sk_buff *skb, |
213 | struct netlbl_lsm_secattr *secattr); | 211 | struct netlbl_lsm_secattr *secattr); |
214 | int cipso_v4_validate(unsigned char **option); | 212 | int cipso_v4_validate(unsigned char **option); |
@@ -220,9 +218,9 @@ static inline void cipso_v4_error(struct sk_buff *skb, | |||
220 | return; | 218 | return; |
221 | } | 219 | } |
222 | 220 | ||
223 | static inline int cipso_v4_socket_setattr(const struct socket *sock, | 221 | static inline int cipso_v4_sock_setattr(struct sock *sk, |
224 | const struct cipso_v4_doi *doi_def, | 222 | const struct cipso_v4_doi *doi_def, |
225 | const struct netlbl_lsm_secattr *secattr) | 223 | const struct netlbl_lsm_secattr *secattr) |
226 | { | 224 | { |
227 | return -ENOSYS; | 225 | return -ENOSYS; |
228 | } | 226 | } |
@@ -233,12 +231,6 @@ static inline int cipso_v4_sock_getattr(struct sock *sk, | |||
233 | return -ENOSYS; | 231 | return -ENOSYS; |
234 | } | 232 | } |
235 | 233 | ||
236 | static inline int cipso_v4_socket_getattr(const struct socket *sock, | ||
237 | struct netlbl_lsm_secattr *secattr) | ||
238 | { | ||
239 | return -ENOSYS; | ||
240 | } | ||
241 | |||
242 | static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | 234 | static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb, |
243 | struct netlbl_lsm_secattr *secattr) | 235 | struct netlbl_lsm_secattr *secattr) |
244 | { | 236 | { |
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 f0248fb8e196..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 | /* |
@@ -289,4 +291,21 @@ static inline void irlap_clear_disconnect(struct irlap_cb *self) | |||
289 | self->disconnect_pending = FALSE; | 291 | self->disconnect_pending = FALSE; |
290 | } | 292 | } |
291 | 293 | ||
294 | /* | ||
295 | * Function irlap_next_state (self, state) | ||
296 | * | ||
297 | * Switches state and provides debug information | ||
298 | * | ||
299 | */ | ||
300 | static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | ||
301 | { | ||
302 | /* | ||
303 | if (!self || self->magic != LAP_MAGIC) | ||
304 | return; | ||
305 | |||
306 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | ||
307 | */ | ||
308 | self->state = state; | ||
309 | } | ||
310 | |||
292 | #endif | 311 | #endif |
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/netlabel.h b/include/net/netlabel.h index 83da7e1f0d3d..9b7d6f2ac9a3 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -332,17 +332,15 @@ static inline int netlbl_secattr_catmap_setrng( | |||
332 | */ | 332 | */ |
333 | 333 | ||
334 | #ifdef CONFIG_NETLABEL | 334 | #ifdef CONFIG_NETLABEL |
335 | int netlbl_socket_setattr(const struct socket *sock, | 335 | int netlbl_sock_setattr(struct sock *sk, |
336 | const struct netlbl_lsm_secattr *secattr); | 336 | const struct netlbl_lsm_secattr *secattr); |
337 | int netlbl_sock_getattr(struct sock *sk, | 337 | int netlbl_sock_getattr(struct sock *sk, |
338 | struct netlbl_lsm_secattr *secattr); | 338 | struct netlbl_lsm_secattr *secattr); |
339 | int netlbl_socket_getattr(const struct socket *sock, | ||
340 | struct netlbl_lsm_secattr *secattr); | ||
341 | int netlbl_skbuff_getattr(const struct sk_buff *skb, | 339 | int netlbl_skbuff_getattr(const struct sk_buff *skb, |
342 | struct netlbl_lsm_secattr *secattr); | 340 | struct netlbl_lsm_secattr *secattr); |
343 | void netlbl_skbuff_err(struct sk_buff *skb, int error); | 341 | void netlbl_skbuff_err(struct sk_buff *skb, int error); |
344 | #else | 342 | #else |
345 | static inline int netlbl_socket_setattr(const struct socket *sock, | 343 | static inline int netlbl_sock_setattr(struct sock *sk, |
346 | const struct netlbl_lsm_secattr *secattr) | 344 | const struct netlbl_lsm_secattr *secattr) |
347 | { | 345 | { |
348 | return -ENOSYS; | 346 | return -ENOSYS; |
@@ -354,12 +352,6 @@ static inline int netlbl_sock_getattr(struct sock *sk, | |||
354 | return -ENOSYS; | 352 | return -ENOSYS; |
355 | } | 353 | } |
356 | 354 | ||
357 | static inline int netlbl_socket_getattr(const struct socket *sock, | ||
358 | struct netlbl_lsm_secattr *secattr) | ||
359 | { | ||
360 | return -ENOSYS; | ||
361 | } | ||
362 | |||
363 | static inline int netlbl_skbuff_getattr(const struct sk_buff *skb, | 355 | static inline int netlbl_skbuff_getattr(const struct sk_buff *skb, |
364 | struct netlbl_lsm_secattr *secattr) | 356 | struct netlbl_lsm_secattr *secattr) |
365 | { | 357 | { |
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/sctp/sctp.h b/include/net/sctp/sctp.h index dda72bf5b9b4..16baef4dab7e 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -503,6 +503,13 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | |||
503 | return frag; | 503 | return frag; |
504 | } | 504 | } |
505 | 505 | ||
506 | static inline void sctp_assoc_pending_pmtu(struct sctp_association *asoc) | ||
507 | { | ||
508 | |||
509 | sctp_assoc_sync_pmtu(asoc); | ||
510 | asoc->pmtu_pending = 0; | ||
511 | } | ||
512 | |||
506 | /* Walk through a list of TLV parameters. Don't trust the | 513 | /* Walk through a list of TLV parameters. Don't trust the |
507 | * individual parameter lengths and instead depend on | 514 | * individual parameter lengths and instead depend on |
508 | * the chunk length to indicate when to stop. Make sure | 515 | * the chunk length to indicate when to stop. Make sure |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 5e81984b8478..ee4559b11302 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -912,6 +912,9 @@ struct sctp_transport { | |||
912 | */ | 912 | */ |
913 | __u16 pathmaxrxt; | 913 | __u16 pathmaxrxt; |
914 | 914 | ||
915 | /* is the Path MTU update pending on this tranport */ | ||
916 | __u8 pmtu_pending; | ||
917 | |||
915 | /* PMTU : The current known path MTU. */ | 918 | /* PMTU : The current known path MTU. */ |
916 | __u32 pathmtu; | 919 | __u32 pathmtu; |
917 | 920 | ||
@@ -1006,6 +1009,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); | |||
1006 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); | 1009 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); |
1007 | unsigned long sctp_transport_timeout(struct sctp_transport *); | 1010 | unsigned long sctp_transport_timeout(struct sctp_transport *); |
1008 | void sctp_transport_reset(struct sctp_transport *); | 1011 | void sctp_transport_reset(struct sctp_transport *); |
1012 | void sctp_transport_update_pmtu(struct sctp_transport *, u32); | ||
1009 | 1013 | ||
1010 | 1014 | ||
1011 | /* This is the structure we use to queue packets as they come into | 1015 | /* This is the structure we use to queue packets as they come into |
@@ -1565,6 +1569,9 @@ struct sctp_association { | |||
1565 | */ | 1569 | */ |
1566 | __u16 pathmaxrxt; | 1570 | __u16 pathmaxrxt; |
1567 | 1571 | ||
1572 | /* Flag that path mtu update is pending */ | ||
1573 | __u8 pmtu_pending; | ||
1574 | |||
1568 | /* Association : The smallest PMTU discovered for all of the | 1575 | /* Association : The smallest PMTU discovered for all of the |
1569 | * PMTU : peer's transport addresses. | 1576 | * PMTU : peer's transport addresses. |
1570 | */ | 1577 | */ |
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/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index eae7e2e84497..ad6e278ba7f2 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -126,4 +126,6 @@ | |||
126 | #define MANFID_POSSIO 0x030c | 126 | #define MANFID_POSSIO 0x030c |
127 | #define PRODID_POSSIO_GCC 0x0003 | 127 | #define PRODID_POSSIO_GCC 0x0003 |
128 | 128 | ||
129 | #define MANFID_NEC 0x0010 | ||
130 | |||
129 | #endif /* _LINUX_CISCODE_H */ | 131 | #endif /* _LINUX_CISCODE_H */ |
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 | ||