diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-m68k/page.h | 8 | ||||
-rw-r--r-- | include/asm-parisc/page.h | 18 | ||||
-rw-r--r-- | include/linux/mtd/cfi.h | 13 |
3 files changed, 22 insertions, 17 deletions
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index db017f838c29..fcc165ddd09e 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _M68K_PAGE_H | 2 | #define _M68K_PAGE_H |
3 | 3 | ||
4 | 4 | ||
5 | #ifdef __KERNEL__ | ||
6 | |||
5 | /* PAGE_SHIFT determines the page size */ | 7 | /* PAGE_SHIFT determines the page size */ |
6 | #ifndef CONFIG_SUN3 | 8 | #ifndef CONFIG_SUN3 |
7 | #define PAGE_SHIFT (12) | 9 | #define PAGE_SHIFT (12) |
@@ -15,8 +17,6 @@ | |||
15 | #endif | 17 | #endif |
16 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 18 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
17 | 19 | ||
18 | #ifdef __KERNEL__ | ||
19 | |||
20 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
21 | 21 | ||
22 | #if PAGE_SHIFT < 13 | 22 | #if PAGE_SHIFT < 13 |
@@ -175,8 +175,8 @@ static inline void *__va(unsigned long x) | |||
175 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 175 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
176 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 176 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
177 | 177 | ||
178 | #endif /* __KERNEL__ */ | ||
179 | |||
180 | #include <asm-generic/page.h> | 178 | #include <asm-generic/page.h> |
181 | 179 | ||
180 | #endif /* __KERNEL__ */ | ||
181 | |||
182 | #endif /* _M68K_PAGE_H */ | 182 | #endif /* _M68K_PAGE_H */ |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 0695bc958d56..57d6d82756dd 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -1,22 +1,14 @@ | |||
1 | #ifndef _PARISC_PAGE_H | 1 | #ifndef _PARISC_PAGE_H |
2 | #define _PARISC_PAGE_H | 2 | #define _PARISC_PAGE_H |
3 | 3 | ||
4 | #if !defined(__KERNEL__) | ||
5 | /* this is for userspace applications (4k page size) */ | ||
6 | # define PAGE_SHIFT 12 /* 4k */ | ||
7 | # define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
8 | # define PAGE_MASK (~(PAGE_SIZE-1)) | ||
9 | #endif | ||
10 | |||
11 | |||
12 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
13 | 5 | ||
14 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) | 6 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
15 | # define PAGE_SHIFT 12 /* 4k */ | 7 | # define PAGE_SHIFT 12 |
16 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) | 8 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) |
17 | # define PAGE_SHIFT 14 /* 16k */ | 9 | # define PAGE_SHIFT 14 |
18 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) | 10 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) |
19 | # define PAGE_SHIFT 16 /* 64k */ | 11 | # define PAGE_SHIFT 16 |
20 | #else | 12 | #else |
21 | # error "unknown default kernel page size" | 13 | # error "unknown default kernel page size" |
22 | #endif | 14 | #endif |
@@ -188,9 +180,9 @@ extern int npmem_ranges; | |||
188 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 180 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
189 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 181 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
190 | 182 | ||
191 | #endif /* __KERNEL__ */ | ||
192 | |||
193 | #include <asm-generic/memory_model.h> | 183 | #include <asm-generic/memory_model.h> |
194 | #include <asm-generic/page.h> | 184 | #include <asm-generic/page.h> |
195 | 185 | ||
186 | #endif /* __KERNEL__ */ | ||
187 | |||
196 | #endif /* _PARISC_PAGE_H */ | 188 | #endif /* _PARISC_PAGE_H */ |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 09bfae6938b3..123948b14547 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -199,6 +199,18 @@ struct cfi_pri_amdstd { | |||
199 | uint8_t TopBottom; | 199 | uint8_t TopBottom; |
200 | } __attribute__((packed)); | 200 | } __attribute__((packed)); |
201 | 201 | ||
202 | /* Vendor-Specific PRI for Atmel chips (command set 0x0002) */ | ||
203 | |||
204 | struct cfi_pri_atmel { | ||
205 | uint8_t pri[3]; | ||
206 | uint8_t MajorVersion; | ||
207 | uint8_t MinorVersion; | ||
208 | uint8_t Features; | ||
209 | uint8_t BottomBoot; | ||
210 | uint8_t BurstMode; | ||
211 | uint8_t PageMode; | ||
212 | } __attribute__((packed)); | ||
213 | |||
202 | struct cfi_pri_query { | 214 | struct cfi_pri_query { |
203 | uint8_t NumFields; | 215 | uint8_t NumFields; |
204 | uint32_t ProtField[1]; /* Not host ordered */ | 216 | uint32_t ProtField[1]; /* Not host ordered */ |
@@ -464,6 +476,7 @@ struct cfi_fixup { | |||
464 | #define CFI_ID_ANY 0xffff | 476 | #define CFI_ID_ANY 0xffff |
465 | 477 | ||
466 | #define CFI_MFR_AMD 0x0001 | 478 | #define CFI_MFR_AMD 0x0001 |
479 | #define CFI_MFR_ATMEL 0x001F | ||
467 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 480 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ |
468 | 481 | ||
469 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 482 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |